Allow resetting an empty inferior-tty
[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
e3487908 596XSLTPROC
81ecdfbb 597GDB_NM_FILE
393fd4c3
YQ
598LTLIBBABELTRACE
599LIBBABELTRACE
600HAVE_LIBBABELTRACE
81ecdfbb
RW
601frags
602target_subdir
603CONFIG_UNINSTALL
604CONFIG_INSTALL
605CONFIG_CLEAN
606CONFIG_ALL
607CONFIG_SRCS
608CONFIG_DEPS
609CONFIG_OBS
610PROFILE_CFLAGS
611ENABLE_CFLAGS
612SIM_OBS
613SIM
614XMKMF
615GDBTK_SRC_DIR
616GDBTK_CFLAGS
617GDBTKLIBS
618X_LIBS
619X_LDFLAGS
620X_CFLAGS
621TK_XINCLUDES
622TK_DEPS
623TK_LIBRARY
624TK_INCLUDE
625TK_STUB_LIB_SPEC
626TK_STUB_LIB_FLAG
627TK_STUB_LIB_FILE
628TK_LIB_SPEC
629TK_LIB_FLAG
630TK_LIB_FILE
631TK_SRC_DIR
632TK_BIN_DIR
633TK_VERSION
634TCL_DEPS
635TCL_LIBRARY
636TCL_INCLUDE
637TCL_STUB_LIB_SPEC
638TCL_STUB_LIB_FLAG
639TCL_STUB_LIB_FILE
640TCL_LIB_SPEC
641TCL_LIB_FLAG
642TCL_LIB_FILE
643TCL_SRC_DIR
644TCL_BIN_DIR
645TCL_PATCH_LEVEL
646TCL_VERSION
647WIN32LDAPP
648GUI_CFLAGS_X
649LIBGUI
608e2dbb
TT
650LTLIBLZMA
651LIBLZMA
652HAVE_LIBLZMA
81ecdfbb
RW
653WIN32LIBS
654SER_HARDWIRE
655WERROR_CFLAGS
656WARN_CFLAGS
657SYSTEM_GDBINIT
81ecdfbb
RW
658TARGET_SYSTEM_ROOT
659CONFIG_LDFLAGS
f6528abd 660RDYNAMIC
81ecdfbb 661ALLOCA
58bfce93
MM
662LTLIBIPT
663LIBIPT
664HAVE_LIBIPT
4df42755
DE
665HAVE_GUILE_FALSE
666HAVE_GUILE_TRUE
ed3ef339
DE
667GUILE_LIBS
668GUILE_CPPFLAGS
e76c5d17
DE
669GUILD_TARGET_FLAG
670GUILD
ed3ef339 671pkg_config_prog_path
4df42755
DE
672HAVE_PYTHON_FALSE
673HAVE_PYTHON_TRUE
ac534cba
JB
674PYTHON_LIBS
675PYTHON_CPPFLAGS
81ecdfbb 676PYTHON_CFLAGS
ec685c5e 677python_prog_path
81ecdfbb
RW
678LTLIBEXPAT
679LIBEXPAT
680HAVE_LIBEXPAT
b8e0a31c 681JIT_READER_DIR
f997c383 682TARGET_PTR
39037522 683READLINE_TEXI_INCFLAG
81ecdfbb
RW
684READLINE_CFLAGS
685READLINE_DEPS
686READLINE
016a3251
DD
687LTLIBICONV
688LIBICONV
711a72d3
L
689zlibinc
690zlibdir
81ecdfbb
RW
691MIG
692WINDRES
693DLLTOOL
c971b7fa 694AR
81ecdfbb
RW
695YFLAGS
696YACC
c971b7fa 697RANLIB
81ecdfbb 698LN_S
c971b7fa
PA
699INSTALL_DATA
700INSTALL_SCRIPT
701INSTALL_PROGRAM
702AWK
81ecdfbb
RW
703REPORT_BUGS_TEXI
704REPORT_BUGS_TO
705PKGVERSION
b292c783 706HAVE_NATIVE_GCORE_TARGET
81ecdfbb
RW
707TARGET_OBS
708subdirs
709GDB_DATADIR
710DEBUGDIR
5048e516
JK
711MAKEINFO_EXTRA_FLAGS
712MAKEINFOFLAGS
713MAKEINFO
81ecdfbb
RW
714PACKAGE
715GNULIB_STDINT_H
81ecdfbb
RW
716CATOBJEXT
717GENCAT
718INSTOBJEXT
719DATADIRNAME
720CATALOGS
721POSUB
722GMSGFMT
723XGETTEXT
724INCINTL
725LIBINTL_DEP
726LIBINTL
727USE_NLS
728SET_MAKE
729GMAKE_FALSE
730GMAKE_TRUE
731MAKE
732CCDEPMODE
733DEPDIR
734am__leading_dot
a994041d 735COMPILER_CFLAGS
3bc3d82a 736COMPILER
4869db5e
RM
737INSTALL_STRIP_PROGRAM
738STRIP
739install_sh
81ecdfbb
RW
740target_os
741target_vendor
742target_cpu
743target
744host_os
745host_vendor
746host_cpu
747host
748build_os
749build_vendor
750build_cpu
751build
c971b7fa
PA
752EGREP
753GREP
754CPP
3bc3d82a
PA
755ac_ct_CXX
756CXXFLAGS
757CXX
81ecdfbb
RW
758OBJEXT
759EXEEXT
760ac_ct_CC
761CPPFLAGS
762LDFLAGS
763CFLAGS
764CC
765MAINT
766MAINTAINER_MODE_FALSE
767MAINTAINER_MODE_TRUE
768target_alias
769host_alias
770build_alias
771LIBS
772ECHO_T
773ECHO_N
774ECHO_C
775DEFS
776mandir
777localedir
778libdir
779psdir
780pdfdir
781dvidir
782htmldir
783infodir
784docdir
785oldincludedir
786includedir
787localstatedir
788sharedstatedir
789sysconfdir
790datadir
791datarootdir
792libexecdir
793sbindir
794bindir
795program_transform_name
796prefix
797exec_prefix
798PACKAGE_URL
799PACKAGE_BUGREPORT
800PACKAGE_STRING
801PACKAGE_VERSION
802PACKAGE_TARNAME
803PACKAGE_NAME
804PATH_SEPARATOR
805SHELL'
a4ce5b0d 806ac_subst_files='host_makefile_frag'
81ecdfbb
RW
807ac_user_opts='
808enable_option_checking
809enable_maintainer_mode
da2f07f1
JK
810enable_plugins
811enable_largefile
3bc3d82a 812enable_build_with_cxx
81ecdfbb
RW
813with_separate_debug_dir
814with_gdb_datadir
815with_relocated_sources
7349ff92 816with_auto_load_dir
bccbefd2 817with_auto_load_safe_path
81ecdfbb
RW
818enable_targets
819enable_64_bit_bfd
820enable_gdbcli
821enable_gdbmi
822enable_tui
823enable_gdbtk
05e7c244 824with_libunwind_ia64
81ecdfbb
RW
825with_curses
826enable_profiling
827with_pkgversion
828with_bugurl
711a72d3 829with_system_zlib
016a3251
DD
830with_gnu_ld
831enable_rpath
81ecdfbb 832with_libiconv_prefix
478aac75 833with_iconv_bin
81ecdfbb 834with_system_readline
b8e0a31c 835with_jit_reader_dir
81ecdfbb 836with_expat
81ecdfbb
RW
837with_libexpat_prefix
838with_python
ed3ef339 839with_guile
a8db4212 840enable_libmcheck
58bfce93
MM
841with_intel_pt
842with_libipt_prefix
81ecdfbb
RW
843with_included_regex
844with_sysroot
845with_system_gdbinit
846enable_werror
847enable_build_warnings
848enable_gdb_build_warnings
608e2dbb
TT
849with_lzma
850with_liblzma_prefix
81ecdfbb
RW
851with_tcl
852with_tk
853with_x
854enable_sim
855enable_multi_ice
496c0e1b 856enable_gdbserver
393fd4c3
YQ
857with_babeltrace
858with_libbabeltrace_prefix
81ecdfbb
RW
859'
860 ac_precious_vars='build_alias
861host_alias
862target_alias
863CC
864CFLAGS
865LDFLAGS
866LIBS
867CPPFLAGS
3bc3d82a
PA
868CXX
869CXXFLAGS
870CCC
81ecdfbb 871CPP
f06e05e0
JK
872MAKEINFO
873MAKEINFOFLAGS
81ecdfbb
RW
874YACC
875YFLAGS
876XMKMF'
5ae98d25 877ac_subdirs_all='testsuite
81ecdfbb
RW
878gdbtk
879multi-ice
880gdbserver'
c906108c
SS
881
882# Initialize some variables set by options.
bec39cab
AC
883ac_init_help=
884ac_init_version=false
81ecdfbb
RW
885ac_unrecognized_opts=
886ac_unrecognized_sep=
c906108c
SS
887# The variables have the same names as the options, with
888# dashes changed to underlines.
bec39cab 889cache_file=/dev/null
c906108c 890exec_prefix=NONE
c906108c 891no_create=
c906108c
SS
892no_recursion=
893prefix=NONE
894program_prefix=NONE
895program_suffix=NONE
896program_transform_name=s,x,x,
897silent=
898site=
899srcdir=
c906108c
SS
900verbose=
901x_includes=NONE
902x_libraries=NONE
bec39cab
AC
903
904# Installation directory options.
905# These are left unexpanded so users can "make install exec_prefix=/foo"
906# and all the variables that are supposed to be based on exec_prefix
907# by default will actually change.
908# Use braces instead of parens because sh, perl, etc. also accept them.
81ecdfbb 909# (The list follows the same order as the GNU Coding Standards.)
c906108c
SS
910bindir='${exec_prefix}/bin'
911sbindir='${exec_prefix}/sbin'
912libexecdir='${exec_prefix}/libexec'
81ecdfbb
RW
913datarootdir='${prefix}/share'
914datadir='${datarootdir}'
c906108c
SS
915sysconfdir='${prefix}/etc'
916sharedstatedir='${prefix}/com'
917localstatedir='${prefix}/var'
c906108c
SS
918includedir='${prefix}/include'
919oldincludedir='/usr/include'
81ecdfbb
RW
920docdir='${datarootdir}/doc/${PACKAGE}'
921infodir='${datarootdir}/info'
922htmldir='${docdir}'
923dvidir='${docdir}'
924pdfdir='${docdir}'
925psdir='${docdir}'
926libdir='${exec_prefix}/lib'
927localedir='${datarootdir}/locale'
928mandir='${datarootdir}/man'
c906108c 929
c906108c 930ac_prev=
81ecdfbb 931ac_dashdash=
c906108c
SS
932for ac_option
933do
c906108c
SS
934 # If the previous option needs an argument, assign it.
935 if test -n "$ac_prev"; then
81ecdfbb 936 eval $ac_prev=\$ac_option
c906108c
SS
937 ac_prev=
938 continue
939 fi
940
81ecdfbb
RW
941 case $ac_option in
942 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
943 *) ac_optarg=yes ;;
944 esac
c906108c
SS
945
946 # Accept the important Cygnus configure options, so we can diagnose typos.
947
81ecdfbb
RW
948 case $ac_dashdash$ac_option in
949 --)
950 ac_dashdash=yes ;;
c906108c
SS
951
952 -bindir | --bindir | --bindi | --bind | --bin | --bi)
953 ac_prev=bindir ;;
954 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
bec39cab 955 bindir=$ac_optarg ;;
c906108c
SS
956
957 -build | --build | --buil | --bui | --bu)
bec39cab 958 ac_prev=build_alias ;;
c906108c 959 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
bec39cab 960 build_alias=$ac_optarg ;;
c906108c
SS
961
962 -cache-file | --cache-file | --cache-fil | --cache-fi \
963 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
964 ac_prev=cache_file ;;
965 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
966 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
bec39cab
AC
967 cache_file=$ac_optarg ;;
968
969 --config-cache | -C)
970 cache_file=config.cache ;;
c906108c 971
81ecdfbb 972 -datadir | --datadir | --datadi | --datad)
c906108c 973 ac_prev=datadir ;;
81ecdfbb 974 -datadir=* | --datadir=* | --datadi=* | --datad=*)
bec39cab 975 datadir=$ac_optarg ;;
c906108c 976
81ecdfbb
RW
977 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
978 | --dataroo | --dataro | --datar)
979 ac_prev=datarootdir ;;
980 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
981 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
982 datarootdir=$ac_optarg ;;
983
c906108c 984 -disable-* | --disable-*)
81ecdfbb 985 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
c906108c 986 # Reject names that are not valid shell variable names.
81ecdfbb
RW
987 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
988 as_fn_error "invalid feature name: $ac_useropt"
989 ac_useropt_orig=$ac_useropt
990 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
991 case $ac_user_opts in
992 *"
993"enable_$ac_useropt"
994"*) ;;
995 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
996 ac_unrecognized_sep=', ';;
997 esac
998 eval enable_$ac_useropt=no ;;
999
1000 -docdir | --docdir | --docdi | --doc | --do)
1001 ac_prev=docdir ;;
1002 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1003 docdir=$ac_optarg ;;
1004
1005 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1006 ac_prev=dvidir ;;
1007 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1008 dvidir=$ac_optarg ;;
c906108c
SS
1009
1010 -enable-* | --enable-*)
81ecdfbb 1011 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
c906108c 1012 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1013 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1014 as_fn_error "invalid feature name: $ac_useropt"
1015 ac_useropt_orig=$ac_useropt
1016 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1017 case $ac_user_opts in
1018 *"
1019"enable_$ac_useropt"
1020"*) ;;
1021 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1022 ac_unrecognized_sep=', ';;
b4e70030 1023 esac
81ecdfbb 1024 eval enable_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1025
1026 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1027 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1028 | --exec | --exe | --ex)
1029 ac_prev=exec_prefix ;;
1030 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1031 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1032 | --exec=* | --exe=* | --ex=*)
bec39cab 1033 exec_prefix=$ac_optarg ;;
c906108c
SS
1034
1035 -gas | --gas | --ga | --g)
1036 # Obsolete; use --with-gas.
1037 with_gas=yes ;;
1038
bec39cab
AC
1039 -help | --help | --hel | --he | -h)
1040 ac_init_help=long ;;
1041 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1042 ac_init_help=recursive ;;
1043 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1044 ac_init_help=short ;;
c906108c
SS
1045
1046 -host | --host | --hos | --ho)
bec39cab 1047 ac_prev=host_alias ;;
c906108c 1048 -host=* | --host=* | --hos=* | --ho=*)
bec39cab 1049 host_alias=$ac_optarg ;;
c906108c 1050
81ecdfbb
RW
1051 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1052 ac_prev=htmldir ;;
1053 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1054 | --ht=*)
1055 htmldir=$ac_optarg ;;
1056
c906108c
SS
1057 -includedir | --includedir | --includedi | --included | --include \
1058 | --includ | --inclu | --incl | --inc)
1059 ac_prev=includedir ;;
1060 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1061 | --includ=* | --inclu=* | --incl=* | --inc=*)
bec39cab 1062 includedir=$ac_optarg ;;
c906108c
SS
1063
1064 -infodir | --infodir | --infodi | --infod | --info | --inf)
1065 ac_prev=infodir ;;
1066 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
bec39cab 1067 infodir=$ac_optarg ;;
c906108c
SS
1068
1069 -libdir | --libdir | --libdi | --libd)
1070 ac_prev=libdir ;;
1071 -libdir=* | --libdir=* | --libdi=* | --libd=*)
bec39cab 1072 libdir=$ac_optarg ;;
c906108c
SS
1073
1074 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1075 | --libexe | --libex | --libe)
1076 ac_prev=libexecdir ;;
1077 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1078 | --libexe=* | --libex=* | --libe=*)
bec39cab 1079 libexecdir=$ac_optarg ;;
c906108c 1080
81ecdfbb
RW
1081 -localedir | --localedir | --localedi | --localed | --locale)
1082 ac_prev=localedir ;;
1083 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1084 localedir=$ac_optarg ;;
1085
c906108c 1086 -localstatedir | --localstatedir | --localstatedi | --localstated \
81ecdfbb 1087 | --localstate | --localstat | --localsta | --localst | --locals)
c906108c
SS
1088 ac_prev=localstatedir ;;
1089 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
81ecdfbb 1090 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
bec39cab 1091 localstatedir=$ac_optarg ;;
c906108c
SS
1092
1093 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1094 ac_prev=mandir ;;
1095 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
bec39cab 1096 mandir=$ac_optarg ;;
c906108c
SS
1097
1098 -nfp | --nfp | --nf)
1099 # Obsolete; use --without-fp.
1100 with_fp=no ;;
1101
1102 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
bec39cab 1103 | --no-cr | --no-c | -n)
c906108c
SS
1104 no_create=yes ;;
1105
1106 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1107 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1108 no_recursion=yes ;;
1109
1110 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1111 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1112 | --oldin | --oldi | --old | --ol | --o)
1113 ac_prev=oldincludedir ;;
1114 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1115 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1116 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
bec39cab 1117 oldincludedir=$ac_optarg ;;
c906108c
SS
1118
1119 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1120 ac_prev=prefix ;;
1121 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
bec39cab 1122 prefix=$ac_optarg ;;
c906108c
SS
1123
1124 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1125 | --program-pre | --program-pr | --program-p)
1126 ac_prev=program_prefix ;;
1127 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1128 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
bec39cab 1129 program_prefix=$ac_optarg ;;
c906108c
SS
1130
1131 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1132 | --program-suf | --program-su | --program-s)
1133 ac_prev=program_suffix ;;
1134 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1135 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
bec39cab 1136 program_suffix=$ac_optarg ;;
c906108c
SS
1137
1138 -program-transform-name | --program-transform-name \
1139 | --program-transform-nam | --program-transform-na \
1140 | --program-transform-n | --program-transform- \
1141 | --program-transform | --program-transfor \
1142 | --program-transfo | --program-transf \
1143 | --program-trans | --program-tran \
1144 | --progr-tra | --program-tr | --program-t)
1145 ac_prev=program_transform_name ;;
1146 -program-transform-name=* | --program-transform-name=* \
1147 | --program-transform-nam=* | --program-transform-na=* \
1148 | --program-transform-n=* | --program-transform-=* \
1149 | --program-transform=* | --program-transfor=* \
1150 | --program-transfo=* | --program-transf=* \
1151 | --program-trans=* | --program-tran=* \
1152 | --progr-tra=* | --program-tr=* | --program-t=*)
bec39cab 1153 program_transform_name=$ac_optarg ;;
c906108c 1154
81ecdfbb
RW
1155 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1156 ac_prev=pdfdir ;;
1157 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1158 pdfdir=$ac_optarg ;;
1159
1160 -psdir | --psdir | --psdi | --psd | --ps)
1161 ac_prev=psdir ;;
1162 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1163 psdir=$ac_optarg ;;
1164
c906108c
SS
1165 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1166 | -silent | --silent | --silen | --sile | --sil)
1167 silent=yes ;;
1168
1169 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1170 ac_prev=sbindir ;;
1171 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1172 | --sbi=* | --sb=*)
bec39cab 1173 sbindir=$ac_optarg ;;
c906108c
SS
1174
1175 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1176 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1177 | --sharedst | --shareds | --shared | --share | --shar \
1178 | --sha | --sh)
1179 ac_prev=sharedstatedir ;;
1180 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1181 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1182 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1183 | --sha=* | --sh=*)
bec39cab 1184 sharedstatedir=$ac_optarg ;;
c906108c
SS
1185
1186 -site | --site | --sit)
1187 ac_prev=site ;;
1188 -site=* | --site=* | --sit=*)
bec39cab 1189 site=$ac_optarg ;;
3ace7edb 1190
c906108c
SS
1191 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1192 ac_prev=srcdir ;;
1193 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
bec39cab 1194 srcdir=$ac_optarg ;;
c906108c
SS
1195
1196 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1197 | --syscon | --sysco | --sysc | --sys | --sy)
1198 ac_prev=sysconfdir ;;
1199 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1200 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
bec39cab 1201 sysconfdir=$ac_optarg ;;
c906108c
SS
1202
1203 -target | --target | --targe | --targ | --tar | --ta | --t)
bec39cab 1204 ac_prev=target_alias ;;
c906108c 1205 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
bec39cab 1206 target_alias=$ac_optarg ;;
c906108c
SS
1207
1208 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1209 verbose=yes ;;
1210
bec39cab
AC
1211 -version | --version | --versio | --versi | --vers | -V)
1212 ac_init_version=: ;;
c906108c
SS
1213
1214 -with-* | --with-*)
81ecdfbb 1215 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
c906108c 1216 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1217 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1218 as_fn_error "invalid package name: $ac_useropt"
1219 ac_useropt_orig=$ac_useropt
1220 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1221 case $ac_user_opts in
1222 *"
1223"with_$ac_useropt"
1224"*) ;;
1225 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1226 ac_unrecognized_sep=', ';;
b4e70030 1227 esac
81ecdfbb 1228 eval with_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1229
1230 -without-* | --without-*)
81ecdfbb 1231 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
c906108c 1232 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1233 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1234 as_fn_error "invalid package name: $ac_useropt"
1235 ac_useropt_orig=$ac_useropt
1236 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1237 case $ac_user_opts in
1238 *"
1239"with_$ac_useropt"
1240"*) ;;
1241 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1242 ac_unrecognized_sep=', ';;
1243 esac
1244 eval with_$ac_useropt=no ;;
c906108c
SS
1245
1246 --x)
1247 # Obsolete; use --with-x.
1248 with_x=yes ;;
1249
1250 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1251 | --x-incl | --x-inc | --x-in | --x-i)
1252 ac_prev=x_includes ;;
1253 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1254 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
bec39cab 1255 x_includes=$ac_optarg ;;
c906108c
SS
1256
1257 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1258 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1259 ac_prev=x_libraries ;;
1260 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1261 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
bec39cab 1262 x_libraries=$ac_optarg ;;
c906108c 1263
81ecdfbb
RW
1264 -*) as_fn_error "unrecognized option: \`$ac_option'
1265Try \`$0 --help' for more information."
c906108c
SS
1266 ;;
1267
bec39cab
AC
1268 *=*)
1269 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1270 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1271 case $ac_envvar in #(
1272 '' | [0-9]* | *[!_$as_cr_alnum]* )
1273 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1274 esac
1275 eval $ac_envvar=\$ac_optarg
bec39cab
AC
1276 export $ac_envvar ;;
1277
c906108c 1278 *)
bec39cab 1279 # FIXME: should be removed in autoconf 3.0.
81ecdfbb 1280 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
bec39cab 1281 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
81ecdfbb 1282 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
bec39cab 1283 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
c906108c
SS
1284 ;;
1285
1286 esac
1287done
1288
1289if test -n "$ac_prev"; then
bec39cab 1290 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
81ecdfbb 1291 as_fn_error "missing argument to $ac_option"
c906108c 1292fi
c906108c 1293
81ecdfbb
RW
1294if test -n "$ac_unrecognized_opts"; then
1295 case $enable_option_checking in
1296 no) ;;
1297 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
1298 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
b4e70030 1299 esac
81ecdfbb 1300fi
b4e70030 1301
81ecdfbb
RW
1302# Check all directory arguments for consistency.
1303for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1304 datadir sysconfdir sharedstatedir localstatedir includedir \
1305 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1306 libdir localedir mandir
b4e70030 1307do
81ecdfbb
RW
1308 eval ac_val=\$$ac_var
1309 # Remove trailing slashes.
1310 case $ac_val in
1311 */ )
1312 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1313 eval $ac_var=\$ac_val;;
1314 esac
1315 # Be sure to have absolute directory names.
b4e70030 1316 case $ac_val in
81ecdfbb
RW
1317 [\\/$]* | ?:[\\/]* ) continue;;
1318 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
c906108c 1319 esac
81ecdfbb 1320 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
c906108c
SS
1321done
1322
bec39cab
AC
1323# There might be people who depend on the old broken behavior: `$host'
1324# used to hold the argument of --host etc.
1325# FIXME: To remove some day.
1326build=$build_alias
1327host=$host_alias
1328target=$target_alias
1329
1330# FIXME: To remove some day.
1331if test "x$host_alias" != x; then
1332 if test "x$build_alias" = x; then
1333 cross_compiling=maybe
81ecdfbb 1334 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
bec39cab
AC
1335 If a cross compiler is detected then cross compile mode will be used." >&2
1336 elif test "x$build_alias" != "x$host_alias"; then
1337 cross_compiling=yes
1338 fi
1339fi
c906108c 1340
bec39cab
AC
1341ac_tool_prefix=
1342test -n "$host_alias" && ac_tool_prefix=$host_alias-
1343
1344test "$silent" = yes && exec 6>/dev/null
c906108c 1345
c906108c 1346
81ecdfbb
RW
1347ac_pwd=`pwd` && test -n "$ac_pwd" &&
1348ac_ls_di=`ls -di .` &&
1349ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1350 as_fn_error "working directory cannot be determined"
1351test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1352 as_fn_error "pwd does not report name of working directory"
1353
1354
c906108c
SS
1355# Find the source files, if location was not specified.
1356if test -z "$srcdir"; then
1357 ac_srcdir_defaulted=yes
81ecdfbb
RW
1358 # Try the directory containing this script, then the parent directory.
1359 ac_confdir=`$as_dirname -- "$as_myself" ||
1360$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1361 X"$as_myself" : 'X\(//\)[^/]' \| \
1362 X"$as_myself" : 'X\(//\)$' \| \
1363 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1364$as_echo X"$as_myself" |
1365 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1366 s//\1/
1367 q
1368 }
1369 /^X\(\/\/\)[^/].*/{
1370 s//\1/
1371 q
1372 }
1373 /^X\(\/\/\)$/{
1374 s//\1/
1375 q
1376 }
1377 /^X\(\/\).*/{
1378 s//\1/
1379 q
1380 }
1381 s/.*/./; q'`
c906108c 1382 srcdir=$ac_confdir
81ecdfbb 1383 if test ! -r "$srcdir/$ac_unique_file"; then
c906108c
SS
1384 srcdir=..
1385 fi
1386else
1387 ac_srcdir_defaulted=no
1388fi
81ecdfbb
RW
1389if test ! -r "$srcdir/$ac_unique_file"; then
1390 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1391 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
1392fi
1393ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1394ac_abs_confdir=`(
1395 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
1396 pwd)`
1397# When building in place, set srcdir=.
1398if test "$ac_abs_confdir" = "$ac_pwd"; then
1399 srcdir=.
1400fi
1401# Remove unnecessary trailing slashes from srcdir.
1402# Double slashes in file names in object file debugging info
1403# mess up M-x gdb in Emacs.
1404case $srcdir in
1405*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1406esac
1407for ac_var in $ac_precious_vars; do
1408 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1409 eval ac_env_${ac_var}_value=\$${ac_var}
1410 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1411 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1412done
c906108c 1413
bec39cab
AC
1414#
1415# Report the --help message.
1416#
1417if test "$ac_init_help" = "long"; then
1418 # Omit some internal or obsolete options to make the list less imposing.
1419 # This message is too long to be a string in the A/UX 3.1 sh.
1420 cat <<_ACEOF
1421\`configure' configures this package to adapt to many kinds of systems.
1422
1423Usage: $0 [OPTION]... [VAR=VALUE]...
1424
1425To assign environment variables (e.g., CC, CFLAGS...), specify them as
1426VAR=VALUE. See below for descriptions of some of the useful variables.
1427
1428Defaults for the options are specified in brackets.
1429
1430Configuration:
1431 -h, --help display this help and exit
1432 --help=short display options specific to this package
1433 --help=recursive display the short help of all the included packages
1434 -V, --version display version information and exit
1435 -q, --quiet, --silent do not print \`checking...' messages
1436 --cache-file=FILE cache test results in FILE [disabled]
1437 -C, --config-cache alias for \`--cache-file=config.cache'
1438 -n, --no-create do not create output files
1439 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1440
bec39cab
AC
1441Installation directories:
1442 --prefix=PREFIX install architecture-independent files in PREFIX
81ecdfbb 1443 [$ac_default_prefix]
bec39cab 1444 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
81ecdfbb 1445 [PREFIX]
bec39cab
AC
1446
1447By default, \`make install' will install all the files in
1448\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1449an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1450for instance \`--prefix=\$HOME'.
1451
1452For better control, use the options below.
1453
1454Fine tuning of the installation directories:
81ecdfbb
RW
1455 --bindir=DIR user executables [EPREFIX/bin]
1456 --sbindir=DIR system admin executables [EPREFIX/sbin]
1457 --libexecdir=DIR program executables [EPREFIX/libexec]
1458 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1459 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1460 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1461 --libdir=DIR object code libraries [EPREFIX/lib]
1462 --includedir=DIR C header files [PREFIX/include]
1463 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1464 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1465 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1466 --infodir=DIR info documentation [DATAROOTDIR/info]
1467 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1468 --mandir=DIR man documentation [DATAROOTDIR/man]
1469 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1470 --htmldir=DIR html documentation [DOCDIR]
1471 --dvidir=DIR dvi documentation [DOCDIR]
1472 --pdfdir=DIR pdf documentation [DOCDIR]
1473 --psdir=DIR ps documentation [DOCDIR]
bec39cab
AC
1474_ACEOF
1475
1476 cat <<\_ACEOF
1477
9009e1ae
MR
1478Program names:
1479 --program-prefix=PREFIX prepend PREFIX to installed program names
1480 --program-suffix=SUFFIX append SUFFIX to installed program names
1481 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1482
bec39cab
AC
1483X features:
1484 --x-includes=DIR X include files are in DIR
1485 --x-libraries=DIR X library files are in DIR
1486
1487System types:
1488 --build=BUILD configure for building on BUILD [guessed]
1489 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1490 --target=TARGET configure for building compilers for TARGET [HOST]
1491_ACEOF
1492fi
1493
1494if test -n "$ac_init_help"; then
1495
1496 cat <<\_ACEOF
1497
1498Optional Features:
81ecdfbb 1499 --disable-option-checking ignore unrecognized --enable/--with options
bec39cab
AC
1500 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1501 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
85981d60
AC
1502 --enable-maintainer-mode enable make rules and dependencies not useful
1503 (and sometimes confusing) to the casual installer
2974be62 1504 --enable-plugins Enable support for plugins
da2f07f1 1505 --disable-largefile omit support for large files
1baf5149
PA
1506 --disable-build-with-cxx
1507 build with C compiler instead of C++ compiler
a1220294
TT
1508 --enable-targets=TARGETS
1509 alternative target configurations
c0993dbe 1510 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
bec39cab
AC
1511 --disable-gdbcli disable command-line interface (CLI)
1512 --disable-gdbmi disable machine-interface (MI)
1513 --enable-tui enable full-screen terminal user interface (TUI)
1514 --enable-gdbtk enable gdbtk graphical user interface (GUI)
1515 --enable-profiling enable profiling of GDB
3841debe 1516 --disable-rpath do not hardcode runtime library paths
17ef446e 1517 --enable-libmcheck Try linking with -lmcheck if available
a1220294 1518 --enable-werror treat compile warnings as errors
32c1c914 1519 --enable-build-warnings enable build-time compiler warnings if gcc is used
a1220294 1520 --enable-gdb-build-warnings
32c1c914 1521 enable GDB specific build-time compiler warnings if
a1220294 1522 gcc is used
32c1c914 1523 --enable-sim link gdb with simulator
bec39cab 1524 --enable-multi-ice build the multi-ice-gdb-server
496c0e1b
JB
1525 --enable-gdbserver automatically build gdbserver (yes/no/auto, default
1526 is auto)
bec39cab
AC
1527
1528Optional Packages:
1529 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1530 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
a1220294 1531 --with-separate-debug-dir=PATH
32c1c914 1532 look for global separate debug info in this path
62e4f60c 1533 [LIBDIR/debug]
b14b1491
TT
1534 --with-gdb-datadir=PATH look for global separate data files in this path
1535 [DATADIR/gdb]
29b0e8a2 1536 --with-relocated-sources=PATH
32c1c914 1537 automatically relocate this path for source files
7349ff92 1538 --with-auto-load-dir=PATH
aff139ff 1539 directories from which to load auto-loaded scripts
1564a261 1540 [$debugdir:$datadir/auto-load]
bccbefd2 1541 --with-auto-load-safe-path=PATH
aff139ff 1542 directories safe to hold auto-loaded files
7349ff92 1543 [--with-auto-load-dir]
bccbefd2
JK
1544 --without-auto-load-safe-path
1545 do not restrict auto-loaded files locations
05e7c244 1546 --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets
cb01cfba
JB
1547 --with-curses use the curses library instead of the termcap
1548 library
c16158bc
JM
1549 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
1550 --with-bugurl=URL Direct users to URL to report a bug
711a72d3 1551 --with-system-zlib use installed libz
016a3251
DD
1552 --with-gnu-ld assume the C compiler uses GNU ld default=no
1553 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
1554 --without-libiconv-prefix don't search for libiconv in includedir and libdir
478aac75 1555 --with-iconv-bin=PATH specify where to find the iconv program
6a30b0a5 1556 --with-system-readline use installed readline library
b8e0a31c
SD
1557 --with-jit-reader-dir=PATH
1558 directory to load the JIT readers from
5c39566f 1559 --with-expat include expat support (auto/yes/no)
3841debe
DJ
1560 --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib
1561 --without-libexpat-prefix don't search for libexpat in includedir and libdir
0c4a4063
DE
1562 --with-python[=PYTHON] include python support
1563 (auto/yes/no/<python-program>)
ed3ef339
DE
1564 --with-guile[=GUILE] include guile support
1565 (auto/yes/no/<guile-version>/<pkg-config-program>)
bc504a31 1566 --with-intel-pt include Intel Processor Trace support (auto/yes/no)
58bfce93
MM
1567 --with-libipt-prefix[=DIR] search for libipt in DIR/include and DIR/lib
1568 --without-libipt-prefix don't search for libipt in includedir and libdir
a1220294
TT
1569 --without-included-regex
1570 don't use included regex; this is the default on
1571 systems with version 2 of the GNU C library (use
1572 with caution on other system)
81ecdfbb 1573 --with-sysroot[=DIR] search for usr/lib et al within DIR
b14b1491 1574 --with-system-gdbinit=PATH
32c1c914 1575 automatically load a system-wide gdbinit file
608e2dbb
TT
1576 --with-lzma support lzma compression (auto/yes/no)
1577 --with-liblzma-prefix[=DIR] search for liblzma in DIR/include and DIR/lib
1578 --without-liblzma-prefix don't search for liblzma in includedir and libdir
5062cc19
KS
1579 --with-tcl directory containing tcl configuration (tclConfig.sh)
1580 --with-tk directory containing tk configuration (tkConfig.sh)
bec39cab 1581 --with-x use the X Window System
393fd4c3
YQ
1582 --with-babeltrace include babeltrace support (auto/yes/no)
1583 --with-libbabeltrace-prefix[=DIR] search for libbabeltrace in DIR/include and DIR/lib
1584 --without-libbabeltrace-prefix don't search for libbabeltrace in includedir and libdir
bec39cab
AC
1585
1586Some influential environment variables:
1587 CC C compiler command
1588 CFLAGS C compiler flags
1589 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1590 nonstandard directory <lib dir>
81ecdfbb
RW
1591 LIBS libraries to pass to the linker, e.g. -l<library>
1592 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1593 you have headers in a nonstandard directory <include dir>
3bc3d82a
PA
1594 CXX C++ compiler command
1595 CXXFLAGS C++ compiler flags
bec39cab 1596 CPP C preprocessor
f06e05e0
JK
1597 MAKEINFO Parent configure detects if it is of sufficient version.
1598 MAKEINFOFLAGS
1599 Parameters for MAKEINFO.
81ecdfbb
RW
1600 YACC The `Yet Another C Compiler' implementation to use. Defaults to
1601 the first program found out of: `bison -y', `byacc', `yacc'.
1602 YFLAGS The list of arguments that will be passed by default to $YACC.
1603 This script will default YFLAGS to the empty string to avoid a
1604 default value of `-d' given by some make applications.
1605 XMKMF Path to xmkmf, Makefile generator for X Window System
bec39cab
AC
1606
1607Use these variables to override the choices made by `configure' or to help
1608it to find libraries and programs with nonstandard names/locations.
1609
81ecdfbb 1610Report bugs to the package provider.
bec39cab 1611_ACEOF
81ecdfbb 1612ac_status=$?
bec39cab
AC
1613fi
1614
1615if test "$ac_init_help" = "recursive"; then
1616 # If there are subdirs, report their specific --help.
bec39cab 1617 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
81ecdfbb
RW
1618 test -d "$ac_dir" ||
1619 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1620 continue
bec39cab
AC
1621 ac_builddir=.
1622
81ecdfbb
RW
1623case "$ac_dir" in
1624.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1625*)
1626 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1627 # A ".." for each directory in $ac_dir_suffix.
1628 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1629 case $ac_top_builddir_sub in
1630 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1631 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1632 esac ;;
1633esac
1634ac_abs_top_builddir=$ac_pwd
1635ac_abs_builddir=$ac_pwd$ac_dir_suffix
1636# for backward compatibility:
1637ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
1638
1639case $srcdir in
81ecdfbb 1640 .) # We are building in place.
bec39cab 1641 ac_srcdir=.
81ecdfbb
RW
1642 ac_top_srcdir=$ac_top_builddir_sub
1643 ac_abs_top_srcdir=$ac_pwd ;;
1644 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 1645 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
1646 ac_top_srcdir=$srcdir
1647 ac_abs_top_srcdir=$srcdir ;;
1648 *) # Relative name.
1649 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1650 ac_top_srcdir=$ac_top_build_prefix$srcdir
1651 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 1652esac
81ecdfbb 1653ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 1654
81ecdfbb
RW
1655 cd "$ac_dir" || { ac_status=$?; continue; }
1656 # Check for guested configure.
1657 if test -f "$ac_srcdir/configure.gnu"; then
1658 echo &&
1659 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1660 elif test -f "$ac_srcdir/configure"; then
1661 echo &&
1662 $SHELL "$ac_srcdir/configure" --help=recursive
3ace7edb 1663 else
81ecdfbb
RW
1664 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1665 fi || ac_status=$?
1666 cd "$ac_pwd" || { ac_status=$?; break; }
bec39cab
AC
1667 done
1668fi
1669
81ecdfbb 1670test -n "$ac_init_help" && exit $ac_status
bec39cab
AC
1671if $ac_init_version; then
1672 cat <<\_ACEOF
81ecdfbb
RW
1673configure
1674generated by GNU Autoconf 2.64
bec39cab 1675
81ecdfbb 1676Copyright (C) 2009 Free Software Foundation, Inc.
bec39cab
AC
1677This configure script is free software; the Free Software Foundation
1678gives unlimited permission to copy, distribute and modify it.
1679_ACEOF
81ecdfbb 1680 exit
bec39cab 1681fi
bec39cab 1682
81ecdfbb
RW
1683## ------------------------ ##
1684## Autoconf initialization. ##
1685## ------------------------ ##
bec39cab 1686
81ecdfbb
RW
1687# ac_fn_c_try_compile LINENO
1688# --------------------------
1689# Try to compile conftest.$ac_ext, and return whether this succeeded.
1690ac_fn_c_try_compile ()
1691{
1692 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1693 rm -f conftest.$ac_objext
1694 if { { ac_try="$ac_compile"
1695case "(($ac_try" in
1696 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1697 *) ac_try_echo=$ac_try;;
1698esac
1699eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1700$as_echo "$ac_try_echo"; } >&5
1701 (eval "$ac_compile") 2>conftest.err
1702 ac_status=$?
1703 if test -s conftest.err; then
1704 grep -v '^ *+' conftest.err >conftest.er1
1705 cat conftest.er1 >&5
1706 mv -f conftest.er1 conftest.err
1707 fi
1708 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1709 test $ac_status = 0; } && {
1710 test -z "$ac_c_werror_flag" ||
1711 test ! -s conftest.err
1712 } && test -s conftest.$ac_objext; then :
1713 ac_retval=0
1714else
1715 $as_echo "$as_me: failed program was:" >&5
1716sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1717
81ecdfbb
RW
1718 ac_retval=1
1719fi
1720 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1721 return $ac_retval
1722
1723} # ac_fn_c_try_compile
1724
3bc3d82a
PA
1725# ac_fn_cxx_try_compile LINENO
1726# ----------------------------
1727# Try to compile conftest.$ac_ext, and return whether this succeeded.
1728ac_fn_cxx_try_compile ()
1729{
1730 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1731 rm -f conftest.$ac_objext
1732 if { { ac_try="$ac_compile"
1733case "(($ac_try" in
1734 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1735 *) ac_try_echo=$ac_try;;
1736esac
1737eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1738$as_echo "$ac_try_echo"; } >&5
1739 (eval "$ac_compile") 2>conftest.err
1740 ac_status=$?
1741 if test -s conftest.err; then
1742 grep -v '^ *+' conftest.err >conftest.er1
1743 cat conftest.er1 >&5
1744 mv -f conftest.er1 conftest.err
1745 fi
1746 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1747 test $ac_status = 0; } && {
1748 test -z "$ac_cxx_werror_flag" ||
1749 test ! -s conftest.err
1750 } && test -s conftest.$ac_objext; then :
1751 ac_retval=0
1752else
1753 $as_echo "$as_me: failed program was:" >&5
1754sed 's/^/| /' conftest.$ac_ext >&5
1755
1756 ac_retval=1
1757fi
1758 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1759 return $ac_retval
1760
1761} # ac_fn_cxx_try_compile
1762
81ecdfbb
RW
1763# ac_fn_c_try_cpp LINENO
1764# ----------------------
1765# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1766ac_fn_c_try_cpp ()
bec39cab 1767{
81ecdfbb
RW
1768 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1769 if { { ac_try="$ac_cpp conftest.$ac_ext"
1770case "(($ac_try" in
1771 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1772 *) ac_try_echo=$ac_try;;
1773esac
1774eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1775$as_echo "$ac_try_echo"; } >&5
1776 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1777 ac_status=$?
1778 if test -s conftest.err; then
1779 grep -v '^ *+' conftest.err >conftest.er1
1780 cat conftest.er1 >&5
1781 mv -f conftest.er1 conftest.err
1782 fi
1783 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1784 test $ac_status = 0; } >/dev/null && {
1785 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1786 test ! -s conftest.err
1787 }; then :
1788 ac_retval=0
1789else
1790 $as_echo "$as_me: failed program was:" >&5
1791sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1792
81ecdfbb
RW
1793 ac_retval=1
1794fi
1795 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1796 return $ac_retval
bec39cab 1797
81ecdfbb 1798} # ac_fn_c_try_cpp
bec39cab 1799
81ecdfbb
RW
1800# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1801# -------------------------------------------------------
1802# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1803# the include files in INCLUDES and setting the cache variable VAR
1804# accordingly.
1805ac_fn_c_check_header_mongrel ()
1806{
1807 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1808 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1809 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1810$as_echo_n "checking for $2... " >&6; }
1811if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1812 $as_echo_n "(cached) " >&6
1813fi
1814eval ac_res=\$$3
1815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1816$as_echo "$ac_res" >&6; }
1817else
1818 # Is the header compilable?
1819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1820$as_echo_n "checking $2 usability... " >&6; }
1821cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1822/* end confdefs.h. */
1823$4
1824#include <$2>
1825_ACEOF
1826if ac_fn_c_try_compile "$LINENO"; then :
1827 ac_header_compiler=yes
1828else
1829 ac_header_compiler=no
1830fi
1831rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1833$as_echo "$ac_header_compiler" >&6; }
bec39cab 1834
81ecdfbb
RW
1835# Is the header present?
1836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1837$as_echo_n "checking $2 presence... " >&6; }
1838cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1839/* end confdefs.h. */
1840#include <$2>
1841_ACEOF
1842if ac_fn_c_try_cpp "$LINENO"; then :
1843 ac_header_preproc=yes
1844else
1845 ac_header_preproc=no
1846fi
1847rm -f conftest.err conftest.$ac_ext
1848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1849$as_echo "$ac_header_preproc" >&6; }
bec39cab 1850
81ecdfbb
RW
1851# So? What about this header?
1852case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1853 yes:no: )
1854 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1855$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1856 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1857$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1858 ;;
1859 no:yes:* )
1860 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1861$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1862 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1863$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1864 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1865$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1866 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1867$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1868 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1869$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1870 ;;
1871esac
1872 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1873$as_echo_n "checking for $2... " >&6; }
1874if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1875 $as_echo_n "(cached) " >&6
1876else
1877 eval "$3=\$ac_header_compiler"
1878fi
1879eval ac_res=\$$3
1880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1881$as_echo "$ac_res" >&6; }
1882fi
1883 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 1884
81ecdfbb 1885} # ac_fn_c_check_header_mongrel
bec39cab 1886
81ecdfbb
RW
1887# ac_fn_c_try_run LINENO
1888# ----------------------
1889# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1890# that executables *can* be run.
1891ac_fn_c_try_run ()
1892{
1893 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1894 if { { ac_try="$ac_link"
1895case "(($ac_try" in
1896 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1897 *) ac_try_echo=$ac_try;;
1898esac
1899eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1900$as_echo "$ac_try_echo"; } >&5
1901 (eval "$ac_link") 2>&5
1902 ac_status=$?
1903 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1904 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1905 { { case "(($ac_try" in
1906 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1907 *) ac_try_echo=$ac_try;;
1908esac
1909eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1910$as_echo "$ac_try_echo"; } >&5
1911 (eval "$ac_try") 2>&5
1912 ac_status=$?
1913 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1914 test $ac_status = 0; }; }; then :
1915 ac_retval=0
1916else
1917 $as_echo "$as_me: program exited with status $ac_status" >&5
1918 $as_echo "$as_me: failed program was:" >&5
1919sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1920
81ecdfbb
RW
1921 ac_retval=$ac_status
1922fi
1923 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1924 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1925 return $ac_retval
bec39cab 1926
81ecdfbb 1927} # ac_fn_c_try_run
bec39cab 1928
81ecdfbb
RW
1929# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1930# -------------------------------------------------------
1931# Tests whether HEADER exists and can be compiled using the include files in
1932# INCLUDES, setting the cache variable VAR accordingly.
1933ac_fn_c_check_header_compile ()
1934{
1935 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1937$as_echo_n "checking for $2... " >&6; }
1938if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1939 $as_echo_n "(cached) " >&6
1940else
1941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1942/* end confdefs.h. */
1943$4
1944#include <$2>
bec39cab 1945_ACEOF
81ecdfbb
RW
1946if ac_fn_c_try_compile "$LINENO"; then :
1947 eval "$3=yes"
1948else
1949 eval "$3=no"
1950fi
1951rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1952fi
1953eval ac_res=\$$3
1954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1955$as_echo "$ac_res" >&6; }
1956 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 1957
81ecdfbb 1958} # ac_fn_c_check_header_compile
bec39cab 1959
2974be62
AM
1960# ac_fn_c_try_link LINENO
1961# -----------------------
1962# Try to link conftest.$ac_ext, and return whether this succeeded.
1963ac_fn_c_try_link ()
1964{
1965 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1966 rm -f conftest.$ac_objext conftest$ac_exeext
1967 if { { ac_try="$ac_link"
1968case "(($ac_try" in
1969 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1970 *) ac_try_echo=$ac_try;;
1971esac
1972eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1973$as_echo "$ac_try_echo"; } >&5
1974 (eval "$ac_link") 2>conftest.err
1975 ac_status=$?
1976 if test -s conftest.err; then
1977 grep -v '^ *+' conftest.err >conftest.er1
1978 cat conftest.er1 >&5
1979 mv -f conftest.er1 conftest.err
1980 fi
1981 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1982 test $ac_status = 0; } && {
1983 test -z "$ac_c_werror_flag" ||
1984 test ! -s conftest.err
1985 } && test -s conftest$ac_exeext && {
1986 test "$cross_compiling" = yes ||
1987 $as_test_x conftest$ac_exeext
1988 }; then :
1989 ac_retval=0
1990else
1991 $as_echo "$as_me: failed program was:" >&5
1992sed 's/^/| /' conftest.$ac_ext >&5
1993
1994 ac_retval=1
1995fi
1996 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1997 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1998 # interfere with the next link command; also delete a directory that is
1999 # left behind by Apple's compiler. We do this before executing the actions.
2000 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2001 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2002 return $ac_retval
2003
2004} # ac_fn_c_try_link
2005
81ecdfbb
RW
2006# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2007# --------------------------------------------
2008# Tries to find the compile-time value of EXPR in a program that includes
2009# INCLUDES, setting VAR accordingly. Returns whether the value could be
2010# computed
2011ac_fn_c_compute_int ()
2012{
2013 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2014 if test "$cross_compiling" = yes; then
2015 # Depending upon the size, compute the lo and hi bounds.
2016cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2017/* end confdefs.h. */
2018$4
2019int
2020main ()
2021{
2022static int test_array [1 - 2 * !(($2) >= 0)];
2023test_array [0] = 0
bec39cab 2024
81ecdfbb
RW
2025 ;
2026 return 0;
2027}
2028_ACEOF
2029if ac_fn_c_try_compile "$LINENO"; then :
2030 ac_lo=0 ac_mid=0
2031 while :; do
2032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2033/* end confdefs.h. */
2034$4
2035int
2036main ()
2037{
2038static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2039test_array [0] = 0
bec39cab 2040
81ecdfbb
RW
2041 ;
2042 return 0;
2043}
2044_ACEOF
2045if ac_fn_c_try_compile "$LINENO"; then :
2046 ac_hi=$ac_mid; break
2047else
2048 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2049 if test $ac_lo -le $ac_mid; then
2050 ac_lo= ac_hi=
2051 break
2052 fi
2053 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
c906108c 2054fi
81ecdfbb
RW
2055rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2056 done
c906108c 2057else
81ecdfbb
RW
2058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2059/* end confdefs.h. */
2060$4
2061int
2062main ()
2063{
2064static int test_array [1 - 2 * !(($2) < 0)];
2065test_array [0] = 0
bec39cab 2066
81ecdfbb
RW
2067 ;
2068 return 0;
2069}
2070_ACEOF
2071if ac_fn_c_try_compile "$LINENO"; then :
2072 ac_hi=-1 ac_mid=-1
2073 while :; do
2074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2075/* end confdefs.h. */
2076$4
2077int
2078main ()
2079{
2080static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2081test_array [0] = 0
bec39cab 2082
81ecdfbb
RW
2083 ;
2084 return 0;
2085}
2086_ACEOF
2087if ac_fn_c_try_compile "$LINENO"; then :
2088 ac_lo=$ac_mid; break
2089else
2090 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2091 if test $ac_mid -le $ac_hi; then
2092 ac_lo= ac_hi=
2093 break
2094 fi
2095 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2096fi
2097rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2098 done
2099else
2100 ac_lo= ac_hi=
2101fi
2102rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2103fi
2104rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2105# Binary search between lo and hi bounds.
2106while test "x$ac_lo" != "x$ac_hi"; do
2107 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2109/* end confdefs.h. */
2110$4
2111int
2112main ()
2113{
2114static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2115test_array [0] = 0
bec39cab 2116
81ecdfbb
RW
2117 ;
2118 return 0;
2119}
2120_ACEOF
2121if ac_fn_c_try_compile "$LINENO"; then :
2122 ac_hi=$ac_mid
2123else
2124 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2125fi
2126rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2127done
2128case $ac_lo in #((
2129?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2130'') ac_retval=1 ;;
2131esac
2132 else
2133 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2134/* end confdefs.h. */
2135$4
2136static long int longval () { return $2; }
2137static unsigned long int ulongval () { return $2; }
2138#include <stdio.h>
2139#include <stdlib.h>
2140int
2141main ()
2142{
bec39cab 2143
81ecdfbb
RW
2144 FILE *f = fopen ("conftest.val", "w");
2145 if (! f)
2146 return 1;
2147 if (($2) < 0)
2148 {
2149 long int i = longval ();
2150 if (i != ($2))
2151 return 1;
2152 fprintf (f, "%ld", i);
2153 }
2154 else
2155 {
2156 unsigned long int i = ulongval ();
2157 if (i != ($2))
2158 return 1;
2159 fprintf (f, "%lu", i);
2160 }
2161 /* Do not output a trailing newline, as this causes \r\n confusion
2162 on some platforms. */
2163 return ferror (f) || fclose (f) != 0;
bec39cab 2164
81ecdfbb
RW
2165 ;
2166 return 0;
2167}
2168_ACEOF
2169if ac_fn_c_try_run "$LINENO"; then :
2170 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2171else
2172 ac_retval=1
2173fi
2174rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2175 conftest.$ac_objext conftest.beam conftest.$ac_ext
2176rm -f conftest.val
bec39cab 2177
81ecdfbb
RW
2178 fi
2179 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2180 return $ac_retval
bec39cab 2181
81ecdfbb 2182} # ac_fn_c_compute_int
bec39cab 2183
55a8c076
YQ
2184# ac_fn_c_check_func LINENO FUNC VAR
2185# ----------------------------------
2186# Tests whether FUNC exists, setting the cache variable VAR accordingly
2187ac_fn_c_check_func ()
81ecdfbb
RW
2188{
2189 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2191$as_echo_n "checking for $2... " >&6; }
2192if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2193 $as_echo_n "(cached) " >&6
2194else
81ecdfbb
RW
2195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2196/* end confdefs.h. */
55a8c076
YQ
2197/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2198 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2199#define $2 innocuous_$2
2200
2201/* System header to define __stub macros and hopefully few prototypes,
2202 which can conflict with char $2 (); below.
2203 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2204 <limits.h> exists even on freestanding compilers. */
2205
2206#ifdef __STDC__
2207# include <limits.h>
2208#else
2209# include <assert.h>
2210#endif
2211
2212#undef $2
2213
2214/* Override any GCC internal prototype to avoid an error.
2215 Use char because int might match the return type of a GCC
2216 builtin and then its argument prototype would still apply. */
2217#ifdef __cplusplus
2218extern "C"
2219#endif
2220char $2 ();
2221/* The GNU C library defines this for functions which it implements
2222 to always fail with ENOSYS. Some functions are actually named
2223 something starting with __ and the normal name is an alias. */
2224#if defined __stub_$2 || defined __stub___$2
2225choke me
2226#endif
2227
2228int
2229main ()
2230{
2231return $2 ();
2232 ;
2233 return 0;
2234}
2235_ACEOF
2236if ac_fn_c_try_link "$LINENO"; then :
2237 eval "$3=yes"
2238else
2239 eval "$3=no"
2240fi
2241rm -f core conftest.err conftest.$ac_objext \
2242 conftest$ac_exeext conftest.$ac_ext
2243fi
2244eval ac_res=\$$3
2245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2246$as_echo "$ac_res" >&6; }
2247 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2248
2249} # ac_fn_c_check_func
2250
07697489
PA
2251# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2252# -------------------------------------------
2253# Tests whether TYPE exists after having included INCLUDES, setting cache
2254# variable VAR accordingly.
2255ac_fn_c_check_type ()
2256{
2257 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2258 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2259$as_echo_n "checking for $2... " >&6; }
2260if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2261 $as_echo_n "(cached) " >&6
2262else
2263 eval "$3=no"
2264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2265/* end confdefs.h. */
2266$4
2267int
2268main ()
2269{
2270if (sizeof ($2))
2271 return 0;
2272 ;
2273 return 0;
2274}
2275_ACEOF
2276if ac_fn_c_try_compile "$LINENO"; then :
2277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2278/* end confdefs.h. */
2279$4
2280int
2281main ()
2282{
2283if (sizeof (($2)))
2284 return 0;
2285 ;
2286 return 0;
2287}
2288_ACEOF
2289if ac_fn_c_try_compile "$LINENO"; then :
2290
2291else
2292 eval "$3=yes"
2293fi
2294rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2295fi
2296rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2297fi
2298eval ac_res=\$$3
2299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2300$as_echo "$ac_res" >&6; }
2301 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2302
2303} # ac_fn_c_check_type
2304
770d76d7
PA
2305# ac_fn_c_check_decl LINENO SYMBOL VAR
2306# ------------------------------------
2307# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2308ac_fn_c_check_decl ()
2309{
2310 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2311 as_decl_name=`echo $2|sed 's/ *(.*//'`
2312 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2313 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2314$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2315if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2316 $as_echo_n "(cached) " >&6
2317else
2318 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2319/* end confdefs.h. */
2320$4
2321int
2322main ()
2323{
2324#ifndef $as_decl_name
2325#ifdef __cplusplus
2326 (void) $as_decl_use;
2327#else
2328 (void) $as_decl_name;
2329#endif
2330#endif
2331
2332 ;
2333 return 0;
2334}
2335_ACEOF
2336if ac_fn_c_try_compile "$LINENO"; then :
2337 eval "$3=yes"
2338else
2339 eval "$3=no"
2340fi
2341rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2342fi
2343eval ac_res=\$$3
2344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2345$as_echo "$ac_res" >&6; }
2346 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2347
2348} # ac_fn_c_check_decl
2349
55a8c076
YQ
2350# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2351# ----------------------------------------------------
2352# Tries to find if the field MEMBER exists in type AGGR, after including
2353# INCLUDES, setting cache variable VAR accordingly.
2354ac_fn_c_check_member ()
2355{
2356 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2357 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2358$as_echo_n "checking for $2.$3... " >&6; }
2359if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
2360 $as_echo_n "(cached) " >&6
2361else
2362 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2363/* end confdefs.h. */
2364$5
2365int
2366main ()
2367{
2368static $2 ac_aggr;
2369if (ac_aggr.$3)
2370return 0;
2371 ;
2372 return 0;
2373}
2374_ACEOF
2375if ac_fn_c_try_compile "$LINENO"; then :
2376 eval "$4=yes"
2377else
2378 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2379/* end confdefs.h. */
2380$5
2381int
2382main ()
2383{
2384static $2 ac_aggr;
2385if (sizeof ac_aggr.$3)
2386return 0;
2387 ;
2388 return 0;
2389}
2390_ACEOF
2391if ac_fn_c_try_compile "$LINENO"; then :
2392 eval "$4=yes"
2393else
2394 eval "$4=no"
2395fi
2396rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2397fi
2398rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2399fi
2400eval ac_res=\$$4
2401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2402$as_echo "$ac_res" >&6; }
2403 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2404
2405} # ac_fn_c_check_member
81ecdfbb
RW
2406cat >config.log <<_ACEOF
2407This file contains any messages produced by compilers while
2408running configure, to aid debugging if configure makes a mistake.
d5af19ba 2409
81ecdfbb
RW
2410It was created by $as_me, which was
2411generated by GNU Autoconf 2.64. Invocation command line was
b4e70030 2412
81ecdfbb 2413 $ $0 $@
413ccac7 2414
81ecdfbb
RW
2415_ACEOF
2416exec 5>>config.log
2417{
2418cat <<_ASUNAME
2419## --------- ##
2420## Platform. ##
2421## --------- ##
413ccac7 2422
81ecdfbb
RW
2423hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2424uname -m = `(uname -m) 2>/dev/null || echo unknown`
2425uname -r = `(uname -r) 2>/dev/null || echo unknown`
2426uname -s = `(uname -s) 2>/dev/null || echo unknown`
2427uname -v = `(uname -v) 2>/dev/null || echo unknown`
85981d60 2428
81ecdfbb
RW
2429/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2430/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
413ccac7 2431
81ecdfbb
RW
2432/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2433/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2434/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2435/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2436/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2437/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2438/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
c906108c 2439
81ecdfbb 2440_ASUNAME
bec39cab 2441
bec39cab
AC
2442as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2443for as_dir in $PATH
2444do
2445 IFS=$as_save_IFS
2446 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2447 $as_echo "PATH: $as_dir"
2448 done
2449IFS=$as_save_IFS
bec39cab 2450
81ecdfbb 2451} >&5
bec39cab 2452
81ecdfbb 2453cat >&5 <<_ACEOF
bec39cab 2454
bec39cab 2455
81ecdfbb
RW
2456## ----------- ##
2457## Core tests. ##
2458## ----------- ##
2459
2460_ACEOF
2461
2462
2463# Keep a trace of the command line.
2464# Strip out --no-create and --no-recursion so they do not pile up.
2465# Strip out --silent because we don't want to record it for future runs.
2466# Also quote any args containing shell meta-characters.
2467# Make two passes to allow for proper duplicate-argument suppression.
2468ac_configure_args=
2469ac_configure_args0=
2470ac_configure_args1=
2471ac_must_keep_next=false
2472for ac_pass in 1 2
2473do
2474 for ac_arg
2475 do
2476 case $ac_arg in
2477 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2478 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2479 | -silent | --silent | --silen | --sile | --sil)
2480 continue ;;
2481 *\'*)
2482 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2483 esac
2484 case $ac_pass in
2485 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2486 2)
2487 as_fn_append ac_configure_args1 " '$ac_arg'"
2488 if test $ac_must_keep_next = true; then
2489 ac_must_keep_next=false # Got value, back to normal.
2490 else
2491 case $ac_arg in
2492 *=* | --config-cache | -C | -disable-* | --disable-* \
2493 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2494 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2495 | -with-* | --with-* | -without-* | --without-* | --x)
2496 case "$ac_configure_args0 " in
2497 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2498 esac
2499 ;;
2500 -* ) ac_must_keep_next=true ;;
2501 esac
2502 fi
2503 as_fn_append ac_configure_args " '$ac_arg'"
2504 ;;
2505 esac
2506 done
2507done
2508{ ac_configure_args0=; unset ac_configure_args0;}
2509{ ac_configure_args1=; unset ac_configure_args1;}
2510
2511# When interrupted or exit'd, cleanup temporary files, and complete
2512# config.log. We remove comments because anyway the quotes in there
2513# would cause problems or look ugly.
2514# WARNING: Use '\'' to represent an apostrophe within the trap.
2515# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2516trap 'exit_status=$?
2517 # Save into config.log some information that might help in debugging.
2518 {
2519 echo
2520
2521 cat <<\_ASBOX
2522## ---------------- ##
2523## Cache variables. ##
2524## ---------------- ##
2525_ASBOX
2526 echo
2527 # The following way of writing the cache mishandles newlines in values,
2528(
2529 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2530 eval ac_val=\$$ac_var
2531 case $ac_val in #(
2532 *${as_nl}*)
2533 case $ac_var in #(
2534 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2535$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2536 esac
2537 case $ac_var in #(
2538 _ | IFS | as_nl) ;; #(
2539 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2540 *) { eval $ac_var=; unset $ac_var;} ;;
2541 esac ;;
2542 esac
2543 done
2544 (set) 2>&1 |
2545 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2546 *${as_nl}ac_space=\ *)
2547 sed -n \
2548 "s/'\''/'\''\\\\'\'''\''/g;
2549 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2550 ;; #(
2551 *)
2552 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2553 ;;
2554 esac |
2555 sort
2556)
2557 echo
2558
2559 cat <<\_ASBOX
2560## ----------------- ##
2561## Output variables. ##
2562## ----------------- ##
2563_ASBOX
2564 echo
2565 for ac_var in $ac_subst_vars
2566 do
2567 eval ac_val=\$$ac_var
2568 case $ac_val in
2569 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2570 esac
2571 $as_echo "$ac_var='\''$ac_val'\''"
2572 done | sort
2573 echo
2574
2575 if test -n "$ac_subst_files"; then
2576 cat <<\_ASBOX
2577## ------------------- ##
2578## File substitutions. ##
2579## ------------------- ##
2580_ASBOX
2581 echo
2582 for ac_var in $ac_subst_files
2583 do
2584 eval ac_val=\$$ac_var
2585 case $ac_val in
2586 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2587 esac
2588 $as_echo "$ac_var='\''$ac_val'\''"
2589 done | sort
2590 echo
2591 fi
2592
2593 if test -s confdefs.h; then
2594 cat <<\_ASBOX
2595## ----------- ##
2596## confdefs.h. ##
2597## ----------- ##
2598_ASBOX
2599 echo
2600 cat confdefs.h
2601 echo
2602 fi
2603 test "$ac_signal" != 0 &&
2604 $as_echo "$as_me: caught signal $ac_signal"
2605 $as_echo "$as_me: exit $exit_status"
2606 } >&5
2607 rm -f core *.core core.conftest.* &&
2608 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2609 exit $exit_status
2610' 0
2611for ac_signal in 1 2 13 15; do
2612 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2613done
2614ac_signal=0
2615
2616# confdefs.h avoids OS command line length limits that DEFS can exceed.
2617rm -f -r conftest* confdefs.h
2618
2619$as_echo "/* confdefs.h */" > confdefs.h
2620
2621# Predefined preprocessor variables.
2622
2623cat >>confdefs.h <<_ACEOF
2624#define PACKAGE_NAME "$PACKAGE_NAME"
2625_ACEOF
2626
2627cat >>confdefs.h <<_ACEOF
2628#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2629_ACEOF
2630
2631cat >>confdefs.h <<_ACEOF
2632#define PACKAGE_VERSION "$PACKAGE_VERSION"
2633_ACEOF
2634
2635cat >>confdefs.h <<_ACEOF
2636#define PACKAGE_STRING "$PACKAGE_STRING"
2637_ACEOF
2638
2639cat >>confdefs.h <<_ACEOF
2640#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2641_ACEOF
2642
2643cat >>confdefs.h <<_ACEOF
2644#define PACKAGE_URL "$PACKAGE_URL"
2645_ACEOF
2646
2647
2648# Let the site file select an alternate cache file if it wants to.
2649# Prefer an explicitly selected file to automatically selected ones.
2650ac_site_file1=NONE
2651ac_site_file2=NONE
2652if test -n "$CONFIG_SITE"; then
2653 ac_site_file1=$CONFIG_SITE
2654elif test "x$prefix" != xNONE; then
2655 ac_site_file1=$prefix/share/config.site
2656 ac_site_file2=$prefix/etc/config.site
2657else
2658 ac_site_file1=$ac_default_prefix/share/config.site
2659 ac_site_file2=$ac_default_prefix/etc/config.site
2660fi
2661for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2662do
2663 test "x$ac_site_file" = xNONE && continue
2664 if test -r "$ac_site_file"; then
2665 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2666$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2667 sed 's/^/| /' "$ac_site_file" >&5
2668 . "$ac_site_file"
2669 fi
2670done
2671
2672if test -r "$cache_file"; then
2673 # Some versions of bash will fail to source /dev/null (special
2674 # files actually), so we avoid doing that.
2675 if test -f "$cache_file"; then
2676 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2677$as_echo "$as_me: loading cache $cache_file" >&6;}
2678 case $cache_file in
2679 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2680 *) . "./$cache_file";;
2681 esac
2682 fi
2683else
2684 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2685$as_echo "$as_me: creating cache $cache_file" >&6;}
2686 >$cache_file
bec39cab
AC
2687fi
2688
81ecdfbb
RW
2689# Check that the precious variables saved in the cache have kept the same
2690# value.
2691ac_cache_corrupted=false
2692for ac_var in $ac_precious_vars; do
2693 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2694 eval ac_new_set=\$ac_env_${ac_var}_set
2695 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2696 eval ac_new_val=\$ac_env_${ac_var}_value
2697 case $ac_old_set,$ac_new_set in
2698 set,)
2699 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2700$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2701 ac_cache_corrupted=: ;;
2702 ,set)
2703 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2704$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2705 ac_cache_corrupted=: ;;
2706 ,);;
2707 *)
2708 if test "x$ac_old_val" != "x$ac_new_val"; then
2709 # differences in whitespace do not lead to failure.
2710 ac_old_val_w=`echo x $ac_old_val`
2711 ac_new_val_w=`echo x $ac_new_val`
2712 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2713 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2714$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2715 ac_cache_corrupted=:
2716 else
2717 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2718$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2719 eval $ac_var=\$ac_old_val
2720 fi
2721 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2722$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2723 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2724$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2725 fi;;
2726 esac
2727 # Pass precious variables to config.status.
2728 if test "$ac_new_set" = set; then
2729 case $ac_new_val in
2730 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2731 *) ac_arg=$ac_var=$ac_new_val ;;
2732 esac
2733 case " $ac_configure_args " in
2734 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2735 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2736 esac
2737 fi
2738done
2739if $ac_cache_corrupted; then
2740 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2741$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2742 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2743$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2744 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2745fi
2746## -------------------- ##
2747## Main body of script. ##
2748## -------------------- ##
2749
2750ac_ext=c
2751ac_cpp='$CPP $CPPFLAGS'
2752ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2753ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2754ac_compiler_gnu=$ac_cv_c_compiler_gnu
2755
2756
2757
2758
2759
2760ac_config_headers="$ac_config_headers config.h:config.in"
2761
2762
2763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2764$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2765 # Check whether --enable-maintainer-mode was given.
2766if test "${enable_maintainer_mode+set}" = set; then :
2767 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2768else
2769 USE_MAINTAINER_MODE=no
2770fi
2771
2772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
2773$as_echo "$USE_MAINTAINER_MODE" >&6; }
2774 if test $USE_MAINTAINER_MODE = yes; then
2775 MAINTAINER_MODE_TRUE=
2776 MAINTAINER_MODE_FALSE='#'
2777else
2778 MAINTAINER_MODE_TRUE='#'
2779 MAINTAINER_MODE_FALSE=
2780fi
2781
2782 MAINT=$MAINTAINER_MODE_TRUE
2783
2784
2785
17ef446e 2786# Set the 'development' global.
270c9937 2787. $srcdir/../bfd/development.sh
f5f1cdb6 2788
81ecdfbb
RW
2789ac_ext=c
2790ac_cpp='$CPP $CPPFLAGS'
2791ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2792ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2793ac_compiler_gnu=$ac_cv_c_compiler_gnu
2794if test -n "$ac_tool_prefix"; then
2795 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2796set dummy ${ac_tool_prefix}gcc; ac_word=$2
2797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2798$as_echo_n "checking for $ac_word... " >&6; }
2799if test "${ac_cv_prog_CC+set}" = set; then :
2800 $as_echo_n "(cached) " >&6
c906108c
SS
2801else
2802 if test -n "$CC"; then
2803 ac_cv_prog_CC="$CC" # Let the user override the test.
2804else
bec39cab
AC
2805as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2806for as_dir in $PATH
2807do
2808 IFS=$as_save_IFS
2809 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2810 for ac_exec_ext in '' $ac_executable_extensions; do
2811 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2812 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2813 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2814 break 2
2815 fi
2816done
81ecdfbb
RW
2817 done
2818IFS=$as_save_IFS
bec39cab 2819
c906108c
SS
2820fi
2821fi
bec39cab 2822CC=$ac_cv_prog_CC
c906108c 2823if test -n "$CC"; then
81ecdfbb
RW
2824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2825$as_echo "$CC" >&6; }
c906108c 2826else
81ecdfbb
RW
2827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2828$as_echo "no" >&6; }
c906108c
SS
2829fi
2830
81ecdfbb 2831
b4e70030
JB
2832fi
2833if test -z "$ac_cv_prog_CC"; then
2834 ac_ct_CC=$CC
81ecdfbb
RW
2835 # Extract the first word of "gcc", so it can be a program name with args.
2836set dummy gcc; ac_word=$2
2837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2838$as_echo_n "checking for $ac_word... " >&6; }
2839if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
2840 $as_echo_n "(cached) " >&6
b4e70030
JB
2841else
2842 if test -n "$ac_ct_CC"; then
2843 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2844else
2845as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2846for as_dir in $PATH
2847do
2848 IFS=$as_save_IFS
2849 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2850 for ac_exec_ext in '' $ac_executable_extensions; do
2851 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2852 ac_cv_prog_ac_ct_CC="gcc"
2853 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b4e70030 2854 break 2
4e8d927d 2855 fi
b4e70030 2856done
81ecdfbb
RW
2857 done
2858IFS=$as_save_IFS
b4e70030
JB
2859
2860fi
2861fi
2862ac_ct_CC=$ac_cv_prog_ac_ct_CC
2863if test -n "$ac_ct_CC"; then
81ecdfbb
RW
2864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2865$as_echo "$ac_ct_CC" >&6; }
b4e70030 2866else
81ecdfbb
RW
2867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2868$as_echo "no" >&6; }
b4e70030
JB
2869fi
2870
81ecdfbb
RW
2871 if test "x$ac_ct_CC" = x; then
2872 CC=""
2873 else
2874 case $cross_compiling:$ac_tool_warned in
2875yes:)
2876{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2877$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2878ac_tool_warned=yes ;;
2879esac
2880 CC=$ac_ct_CC
2881 fi
b4e70030
JB
2882else
2883 CC="$ac_cv_prog_CC"
2884fi
2885
c906108c 2886if test -z "$CC"; then
81ecdfbb
RW
2887 if test -n "$ac_tool_prefix"; then
2888 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2889set dummy ${ac_tool_prefix}cc; ac_word=$2
2890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2891$as_echo_n "checking for $ac_word... " >&6; }
2892if test "${ac_cv_prog_CC+set}" = set; then :
2893 $as_echo_n "(cached) " >&6
c906108c
SS
2894else
2895 if test -n "$CC"; then
2896 ac_cv_prog_CC="$CC" # Let the user override the test.
2897else
bec39cab
AC
2898as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2899for as_dir in $PATH
2900do
2901 IFS=$as_save_IFS
2902 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2903 for ac_exec_ext in '' $ac_executable_extensions; do
2904 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2905 ac_cv_prog_CC="${ac_tool_prefix}cc"
2906 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2907 break 2
2908 fi
2909done
81ecdfbb
RW
2910 done
2911IFS=$as_save_IFS
2912
2913fi
2914fi
2915CC=$ac_cv_prog_CC
2916if test -n "$CC"; then
2917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2918$as_echo "$CC" >&6; }
2919else
2920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2921$as_echo "no" >&6; }
2922fi
2923
2924
2925 fi
2926fi
2927if test -z "$CC"; then
2928 # Extract the first word of "cc", so it can be a program name with args.
2929set dummy cc; ac_word=$2
2930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2931$as_echo_n "checking for $ac_word... " >&6; }
2932if test "${ac_cv_prog_CC+set}" = set; then :
2933 $as_echo_n "(cached) " >&6
2934else
2935 if test -n "$CC"; then
2936 ac_cv_prog_CC="$CC" # Let the user override the test.
2937else
2938 ac_prog_rejected=no
2939as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2940for as_dir in $PATH
2941do
2942 IFS=$as_save_IFS
2943 test -z "$as_dir" && as_dir=.
2944 for ac_exec_ext in '' $ac_executable_extensions; do
2945 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2946 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2947 ac_prog_rejected=yes
2948 continue
2949 fi
2950 ac_cv_prog_CC="cc"
2951 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2952 break 2
2953 fi
2954done
2955 done
2956IFS=$as_save_IFS
bec39cab 2957
c906108c
SS
2958if test $ac_prog_rejected = yes; then
2959 # We found a bogon in the path, so make sure we never use it.
2960 set dummy $ac_cv_prog_CC
2961 shift
bec39cab 2962 if test $# != 0; then
c906108c
SS
2963 # We chose a different compiler from the bogus one.
2964 # However, it has the same basename, so the bogon will be chosen
2965 # first if we set CC to just the basename; use the full file name.
2966 shift
bec39cab 2967 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
c906108c
SS
2968 fi
2969fi
2970fi
2971fi
bec39cab 2972CC=$ac_cv_prog_CC
c906108c 2973if test -n "$CC"; then
81ecdfbb
RW
2974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2975$as_echo "$CC" >&6; }
c906108c 2976else
81ecdfbb
RW
2977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2978$as_echo "no" >&6; }
c906108c
SS
2979fi
2980
81ecdfbb 2981
bec39cab
AC
2982fi
2983if test -z "$CC"; then
2984 if test -n "$ac_tool_prefix"; then
81ecdfbb 2985 for ac_prog in cl.exe
bec39cab
AC
2986 do
2987 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2988set dummy $ac_tool_prefix$ac_prog; ac_word=$2
81ecdfbb
RW
2989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2990$as_echo_n "checking for $ac_word... " >&6; }
2991if test "${ac_cv_prog_CC+set}" = set; then :
2992 $as_echo_n "(cached) " >&6
c906108c
SS
2993else
2994 if test -n "$CC"; then
2995 ac_cv_prog_CC="$CC" # Let the user override the test.
2996else
bec39cab
AC
2997as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2998for as_dir in $PATH
2999do
3000 IFS=$as_save_IFS
3001 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
3002 for ac_exec_ext in '' $ac_executable_extensions; do
3003 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 3004 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
81ecdfbb 3005 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
3006 break 2
3007 fi
3008done
81ecdfbb
RW
3009 done
3010IFS=$as_save_IFS
bec39cab 3011
c906108c
SS
3012fi
3013fi
bec39cab 3014CC=$ac_cv_prog_CC
c906108c 3015if test -n "$CC"; then
81ecdfbb
RW
3016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3017$as_echo "$CC" >&6; }
c906108c 3018else
81ecdfbb
RW
3019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3020$as_echo "no" >&6; }
c906108c 3021fi
bec39cab 3022
81ecdfbb 3023
bec39cab
AC
3024 test -n "$CC" && break
3025 done
3026fi
3027if test -z "$CC"; then
3028 ac_ct_CC=$CC
81ecdfbb 3029 for ac_prog in cl.exe
bec39cab
AC
3030do
3031 # Extract the first word of "$ac_prog", so it can be a program name with args.
3032set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
3033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3034$as_echo_n "checking for $ac_word... " >&6; }
3035if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3036 $as_echo_n "(cached) " >&6
bec39cab
AC
3037else
3038 if test -n "$ac_ct_CC"; then
3039 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3040else
3041as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3042for as_dir in $PATH
3043do
3044 IFS=$as_save_IFS
3045 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
3046 for ac_exec_ext in '' $ac_executable_extensions; do
3047 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 3048 ac_cv_prog_ac_ct_CC="$ac_prog"
81ecdfbb 3049 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab 3050 break 2
c906108c 3051 fi
bec39cab 3052done
81ecdfbb
RW
3053 done
3054IFS=$as_save_IFS
bec39cab
AC
3055
3056fi
3057fi
3058ac_ct_CC=$ac_cv_prog_ac_ct_CC
3059if test -n "$ac_ct_CC"; then
81ecdfbb
RW
3060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3061$as_echo "$ac_ct_CC" >&6; }
bec39cab 3062else
81ecdfbb
RW
3063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3064$as_echo "no" >&6; }
c906108c
SS
3065fi
3066
81ecdfbb 3067
bec39cab
AC
3068 test -n "$ac_ct_CC" && break
3069done
c906108c 3070
81ecdfbb
RW
3071 if test "x$ac_ct_CC" = x; then
3072 CC=""
3073 else
3074 case $cross_compiling:$ac_tool_warned in
3075yes:)
3076{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3077$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3078ac_tool_warned=yes ;;
3079esac
3080 CC=$ac_ct_CC
3081 fi
bec39cab
AC
3082fi
3083
3084fi
3085
3086
81ecdfbb
RW
3087test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3088$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3089as_fn_error "no acceptable C compiler found in \$PATH
3090See \`config.log' for more details." "$LINENO" 5; }
bec39cab
AC
3091
3092# Provide some information about the compiler.
81ecdfbb
RW
3093$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3094set X $ac_compile
3095ac_compiler=$2
3096for ac_option in --version -v -V -qversion; do
3097 { { ac_try="$ac_compiler $ac_option >&5"
3098case "(($ac_try" in
3099 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3100 *) ac_try_echo=$ac_try;;
3101esac
3102eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3103$as_echo "$ac_try_echo"; } >&5
3104 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
bec39cab 3105 ac_status=$?
81ecdfbb
RW
3106 if test -s conftest.err; then
3107 sed '10a\
3108... rest of stderr output deleted ...
3109 10q' conftest.err >conftest.er1
3110 cat conftest.er1 >&5
3111 rm -f conftest.er1 conftest.err
3112 fi
3113 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3114 test $ac_status = 0; }
3115done
bec39cab 3116
81ecdfbb 3117cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3118/* end confdefs.h. */
3119
3120int
3121main ()
3122{
3123
3124 ;
3125 return 0;
3126}
3127_ACEOF
3128ac_clean_files_save=$ac_clean_files
81ecdfbb 3129ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out"
bec39cab
AC
3130# Try to create an executable without -o first, disregard a.out.
3131# It will help us diagnose broken compilers, and finding out an intuition
3132# of exeext.
81ecdfbb
RW
3133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3134$as_echo_n "checking for C compiler default output file name... " >&6; }
3135ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3136
3137# The possible output files:
3138ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3139
3140ac_rmfiles=
3141for ac_file in $ac_files
3142do
3143 case $ac_file in
3144 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3145 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3146 esac
3147done
3148rm -f $ac_rmfiles
3149
3150if { { ac_try="$ac_link_default"
3151case "(($ac_try" in
3152 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3153 *) ac_try_echo=$ac_try;;
3154esac
3155eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3156$as_echo "$ac_try_echo"; } >&5
3157 (eval "$ac_link_default") 2>&5
3158 ac_status=$?
3159 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3160 test $ac_status = 0; }; then :
3161 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3162# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3163# in a Makefile. We should not override ac_cv_exeext if it was cached,
3164# so that the user can short-circuit this test for compilers unknown to
3165# Autoconf.
3166for ac_file in $ac_files ''
bec39cab
AC
3167do
3168 test -f "$ac_file" || continue
3169 case $ac_file in
81ecdfbb 3170 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
b4e70030
JB
3171 ;;
3172 [ab].out )
3173 # We found the default executable, but exeext='' is most
3174 # certainly right.
3175 break;;
3176 *.* )
81ecdfbb
RW
3177 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3178 then :; else
3179 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3180 fi
3181 # We set ac_cv_exeext here because the later test for it is not
3182 # safe: cross compilers may not add the suffix if given an `-o'
3183 # argument, so we may need to know it at that point already.
3184 # Even if this section looks crufty: it has the advantage of
3185 # actually working.
b4e70030
JB
3186 break;;
3187 * )
3188 break;;
bec39cab
AC
3189 esac
3190done
81ecdfbb
RW
3191test "$ac_cv_exeext" = no && ac_cv_exeext=
3192
bec39cab 3193else
81ecdfbb
RW
3194 ac_file=''
3195fi
3196{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3197$as_echo "$ac_file" >&6; }
3198if test -z "$ac_file"; then :
3199 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3200sed 's/^/| /' conftest.$ac_ext >&5
3201
81ecdfbb
RW
3202{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3203$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3204{ as_fn_set_status 77
3205as_fn_error "C compiler cannot create executables
3206See \`config.log' for more details." "$LINENO" 5; }; }
bec39cab 3207fi
b4e70030 3208ac_exeext=$ac_cv_exeext
b4e70030 3209
81ecdfbb 3210# Check that the compiler produces executables we can run. If not, either
bec39cab 3211# the compiler is broken, or we cross compile.
81ecdfbb
RW
3212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3213$as_echo_n "checking whether the C compiler works... " >&6; }
bec39cab
AC
3214# If not cross compiling, check that we can run a simple program.
3215if test "$cross_compiling" != yes; then
3216 if { ac_try='./$ac_file'
81ecdfbb
RW
3217 { { case "(($ac_try" in
3218 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3219 *) ac_try_echo=$ac_try;;
3220esac
3221eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3222$as_echo "$ac_try_echo"; } >&5
3223 (eval "$ac_try") 2>&5
bec39cab 3224 ac_status=$?
81ecdfbb
RW
3225 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3226 test $ac_status = 0; }; }; then
bec39cab 3227 cross_compiling=no
c906108c 3228 else
bec39cab
AC
3229 if test "$cross_compiling" = maybe; then
3230 cross_compiling=yes
3231 else
81ecdfbb
RW
3232 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3233$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3234as_fn_error "cannot run C compiled programs.
bec39cab 3235If you meant to cross compile, use \`--host'.
81ecdfbb 3236See \`config.log' for more details." "$LINENO" 5; }
bec39cab 3237 fi
c906108c 3238 fi
bec39cab 3239fi
81ecdfbb
RW
3240{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3241$as_echo "yes" >&6; }
bec39cab 3242
81ecdfbb 3243rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out
b4e70030 3244ac_clean_files=$ac_clean_files_save
81ecdfbb 3245# Check that the compiler produces executables we can run. If not, either
b4e70030 3246# the compiler is broken, or we cross compile.
81ecdfbb
RW
3247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3248$as_echo_n "checking whether we are cross compiling... " >&6; }
3249{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3250$as_echo "$cross_compiling" >&6; }
3251
3252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3253$as_echo_n "checking for suffix of executables... " >&6; }
3254if { { ac_try="$ac_link"
3255case "(($ac_try" in
3256 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3257 *) ac_try_echo=$ac_try;;
3258esac
3259eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3260$as_echo "$ac_try_echo"; } >&5
3261 (eval "$ac_link") 2>&5
bec39cab 3262 ac_status=$?
81ecdfbb
RW
3263 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3264 test $ac_status = 0; }; then :
b4e70030
JB
3265 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3266# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3267# work properly (i.e., refer to `conftest.exe'), while it won't with
3268# `rm'.
3269for ac_file in conftest.exe conftest conftest.*; do
3270 test -f "$ac_file" || continue
3271 case $ac_file in
81ecdfbb 3272 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
b4e70030 3273 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
b4e70030
JB
3274 break;;
3275 * ) break;;
3276 esac
3277done
c906108c 3278else
81ecdfbb
RW
3279 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3280$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3281as_fn_error "cannot compute suffix of executables: cannot compile and link
3282See \`config.log' for more details." "$LINENO" 5; }
c906108c 3283fi
b4e70030 3284rm -f conftest$ac_cv_exeext
81ecdfbb
RW
3285{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3286$as_echo "$ac_cv_exeext" >&6; }
c906108c 3287
b4e70030 3288rm -f conftest.$ac_ext
bec39cab
AC
3289EXEEXT=$ac_cv_exeext
3290ac_exeext=$EXEEXT
81ecdfbb
RW
3291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3292$as_echo_n "checking for suffix of object files... " >&6; }
3293if test "${ac_cv_objext+set}" = set; then :
3294 $as_echo_n "(cached) " >&6
bec39cab 3295else
81ecdfbb 3296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
3297/* end confdefs.h. */
3298
3299int
3300main ()
3301{
3302
3303 ;
3304 return 0;
3305}
3306_ACEOF
3307rm -f conftest.o conftest.obj
81ecdfbb
RW
3308if { { ac_try="$ac_compile"
3309case "(($ac_try" in
3310 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3311 *) ac_try_echo=$ac_try;;
3312esac
3313eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3314$as_echo "$ac_try_echo"; } >&5
3315 (eval "$ac_compile") 2>&5
3316 ac_status=$?
3317 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3318 test $ac_status = 0; }; then :
3319 for ac_file in conftest.o conftest.obj conftest.*; do
3320 test -f "$ac_file" || continue;
bec39cab 3321 case $ac_file in
81ecdfbb 3322 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
bec39cab
AC
3323 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3324 break;;
3325 esac
3326done
c906108c 3327else
81ecdfbb 3328 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3329sed 's/^/| /' conftest.$ac_ext >&5
3330
81ecdfbb
RW
3331{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3332$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3333as_fn_error "cannot compute suffix of object files: cannot compile
3334See \`config.log' for more details." "$LINENO" 5; }
c906108c 3335fi
b4e70030 3336rm -f conftest.$ac_cv_objext conftest.$ac_ext
bec39cab 3337fi
81ecdfbb
RW
3338{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3339$as_echo "$ac_cv_objext" >&6; }
bec39cab
AC
3340OBJEXT=$ac_cv_objext
3341ac_objext=$OBJEXT
81ecdfbb
RW
3342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3343$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3344if test "${ac_cv_c_compiler_gnu+set}" = set; then :
3345 $as_echo_n "(cached) " >&6
c906108c 3346else
81ecdfbb 3347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3348/* end confdefs.h. */
3349
3350int
3351main ()
3352{
3353#ifndef __GNUC__
3354 choke me
3355#endif
3356
3357 ;
3358 return 0;
3359}
3360_ACEOF
81ecdfbb 3361if ac_fn_c_try_compile "$LINENO"; then :
bec39cab
AC
3362 ac_compiler_gnu=yes
3363else
81ecdfbb 3364 ac_compiler_gnu=no
bec39cab 3365fi
81ecdfbb 3366rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab
AC
3367ac_cv_c_compiler_gnu=$ac_compiler_gnu
3368
3369fi
81ecdfbb
RW
3370{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3371$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3372if test $ac_compiler_gnu = yes; then
3373 GCC=yes
3374else
3375 GCC=
3376fi
bec39cab
AC
3377ac_test_CFLAGS=${CFLAGS+set}
3378ac_save_CFLAGS=$CFLAGS
81ecdfbb
RW
3379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3380$as_echo_n "checking whether $CC accepts -g... " >&6; }
3381if test "${ac_cv_prog_cc_g+set}" = set; then :
3382 $as_echo_n "(cached) " >&6
bec39cab 3383else
81ecdfbb
RW
3384 ac_save_c_werror_flag=$ac_c_werror_flag
3385 ac_c_werror_flag=yes
3386 ac_cv_prog_cc_g=no
3387 CFLAGS="-g"
3388 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3389/* end confdefs.h. */
3390
3391int
3392main ()
3393{
3394
3395 ;
3396 return 0;
3397}
3398_ACEOF
81ecdfbb 3399if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
3400 ac_cv_prog_cc_g=yes
3401else
81ecdfbb
RW
3402 CFLAGS=""
3403 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3404/* end confdefs.h. */
3405
3406int
3407main ()
3408{
3409
3410 ;
3411 return 0;
3412}
3413_ACEOF
3414if ac_fn_c_try_compile "$LINENO"; then :
3415
3416else
3417 ac_c_werror_flag=$ac_save_c_werror_flag
3418 CFLAGS="-g"
3419 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3420/* end confdefs.h. */
3421
3422int
3423main ()
3424{
c906108c 3425
81ecdfbb
RW
3426 ;
3427 return 0;
3428}
3429_ACEOF
3430if ac_fn_c_try_compile "$LINENO"; then :
3431 ac_cv_prog_cc_g=yes
3432fi
3433rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3434fi
3435rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4e8d927d 3436fi
81ecdfbb
RW
3437rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3438 ac_c_werror_flag=$ac_save_c_werror_flag
bec39cab 3439fi
81ecdfbb
RW
3440{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3441$as_echo "$ac_cv_prog_cc_g" >&6; }
c906108c 3442if test "$ac_test_CFLAGS" = set; then
bec39cab 3443 CFLAGS=$ac_save_CFLAGS
c906108c
SS
3444elif test $ac_cv_prog_cc_g = yes; then
3445 if test "$GCC" = yes; then
3446 CFLAGS="-g -O2"
3447 else
3448 CFLAGS="-g"
3449 fi
3450else
3451 if test "$GCC" = yes; then
3452 CFLAGS="-O2"
3453 else
3454 CFLAGS=
3455 fi
3456fi
81ecdfbb
RW
3457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3458$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3459if test "${ac_cv_prog_cc_c89+set}" = set; then :
3460 $as_echo_n "(cached) " >&6
bec39cab 3461else
81ecdfbb 3462 ac_cv_prog_cc_c89=no
bec39cab 3463ac_save_CC=$CC
81ecdfbb 3464cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3465/* end confdefs.h. */
c906108c
SS
3466#include <stdarg.h>
3467#include <stdio.h>
3468#include <sys/types.h>
3469#include <sys/stat.h>
3470/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3471struct buf { int x; };
3472FILE * (*rcsopen) (struct buf *, struct stat *, int);
3473static char *e (p, i)
3474 char **p;
3475 int i;
3476{
3477 return p[i];
3478}
3479static char *f (char * (*g) (char **, int), char **p, ...)
3480{
3481 char *s;
3482 va_list v;
3483 va_start (v,p);
3484 s = g (p, va_arg (v,int));
3485 va_end (v);
3486 return s;
3487}
bec39cab
AC
3488
3489/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3490 function prototypes and stuff, but not '\xHH' hex character constants.
3491 These don't provoke an error unfortunately, instead are silently treated
81ecdfbb 3492 as 'x'. The following induces an error, until -std is added to get
bec39cab
AC
3493 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3494 array size at least. It's necessary to write '\x00'==0 to get something
81ecdfbb 3495 that's true only with -std. */
bec39cab
AC
3496int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3497
81ecdfbb
RW
3498/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3499 inside strings and character constants. */
3500#define FOO(x) 'x'
3501int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3502
c906108c
SS
3503int test (int i, double x);
3504struct s1 {int (*f) (int a);};
3505struct s2 {int (*f) (double a);};
3506int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3507int argc;
3508char **argv;
bec39cab
AC
3509int
3510main ()
3511{
c906108c 3512return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
bec39cab
AC
3513 ;
3514 return 0;
3515}
3516_ACEOF
81ecdfbb
RW
3517for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3518 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
bec39cab
AC
3519do
3520 CC="$ac_save_CC $ac_arg"
81ecdfbb
RW
3521 if ac_fn_c_try_compile "$LINENO"; then :
3522 ac_cv_prog_cc_c89=$ac_arg
c906108c 3523fi
81ecdfbb
RW
3524rm -f core conftest.err conftest.$ac_objext
3525 test "x$ac_cv_prog_cc_c89" != "xno" && break
c906108c 3526done
81ecdfbb 3527rm -f conftest.$ac_ext
bec39cab 3528CC=$ac_save_CC
c906108c
SS
3529
3530fi
81ecdfbb
RW
3531# AC_CACHE_VAL
3532case "x$ac_cv_prog_cc_c89" in
3533 x)
3534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3535$as_echo "none needed" >&6; } ;;
3536 xno)
3537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3538$as_echo "unsupported" >&6; } ;;
bec39cab 3539 *)
81ecdfbb
RW
3540 CC="$CC $ac_cv_prog_cc_c89"
3541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3542$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
c906108c 3543esac
81ecdfbb 3544if test "x$ac_cv_prog_cc_c89" != xno; then :
c906108c 3545
b4e70030
JB
3546fi
3547
bec39cab
AC
3548ac_ext=c
3549ac_cpp='$CPP $CPPFLAGS'
3550ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3551ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3552ac_compiler_gnu=$ac_cv_c_compiler_gnu
c906108c 3553
3bc3d82a
PA
3554ac_ext=cpp
3555ac_cpp='$CXXCPP $CPPFLAGS'
3556ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3557ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3558ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3559if test -z "$CXX"; then
3560 if test -n "$CCC"; then
3561 CXX=$CCC
3562 else
3563 if test -n "$ac_tool_prefix"; then
3564 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3565 do
3566 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3567set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3569$as_echo_n "checking for $ac_word... " >&6; }
3570if test "${ac_cv_prog_CXX+set}" = set; then :
3571 $as_echo_n "(cached) " >&6
3572else
3573 if test -n "$CXX"; then
3574 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3575else
3576as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3577for as_dir in $PATH
3578do
3579 IFS=$as_save_IFS
3580 test -z "$as_dir" && as_dir=.
3581 for ac_exec_ext in '' $ac_executable_extensions; do
3582 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3583 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3584 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3585 break 2
3586 fi
3587done
3588 done
3589IFS=$as_save_IFS
3590
3591fi
3592fi
3593CXX=$ac_cv_prog_CXX
3594if test -n "$CXX"; then
3595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
3596$as_echo "$CXX" >&6; }
3597else
3598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3599$as_echo "no" >&6; }
3600fi
3601
3602
3603 test -n "$CXX" && break
3604 done
3605fi
3606if test -z "$CXX"; then
3607 ac_ct_CXX=$CXX
3608 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3609do
3610 # Extract the first word of "$ac_prog", so it can be a program name with args.
3611set dummy $ac_prog; ac_word=$2
3612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3613$as_echo_n "checking for $ac_word... " >&6; }
3614if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
3615 $as_echo_n "(cached) " >&6
3616else
3617 if test -n "$ac_ct_CXX"; then
3618 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3619else
3620as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3621for as_dir in $PATH
3622do
3623 IFS=$as_save_IFS
3624 test -z "$as_dir" && as_dir=.
3625 for ac_exec_ext in '' $ac_executable_extensions; do
3626 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3627 ac_cv_prog_ac_ct_CXX="$ac_prog"
3628 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3629 break 2
3630 fi
3631done
3632 done
3633IFS=$as_save_IFS
3634
3635fi
3636fi
3637ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3638if test -n "$ac_ct_CXX"; then
3639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
3640$as_echo "$ac_ct_CXX" >&6; }
3641else
3642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3643$as_echo "no" >&6; }
3644fi
3645
3646
3647 test -n "$ac_ct_CXX" && break
3648done
3649
3650 if test "x$ac_ct_CXX" = x; then
3651 CXX="g++"
3652 else
3653 case $cross_compiling:$ac_tool_warned in
3654yes:)
3655{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3656$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3657ac_tool_warned=yes ;;
3658esac
3659 CXX=$ac_ct_CXX
3660 fi
3661fi
3662
3663 fi
3664fi
3665# Provide some information about the compiler.
3666$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
3667set X $ac_compile
3668ac_compiler=$2
3669for ac_option in --version -v -V -qversion; do
3670 { { ac_try="$ac_compiler $ac_option >&5"
3671case "(($ac_try" in
3672 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3673 *) ac_try_echo=$ac_try;;
3674esac
3675eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3676$as_echo "$ac_try_echo"; } >&5
3677 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3678 ac_status=$?
3679 if test -s conftest.err; then
3680 sed '10a\
3681... rest of stderr output deleted ...
3682 10q' conftest.err >conftest.er1
3683 cat conftest.er1 >&5
3684 rm -f conftest.er1 conftest.err
3685 fi
3686 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3687 test $ac_status = 0; }
3688done
3689
3690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
3691$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
3692if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
3693 $as_echo_n "(cached) " >&6
3694else
3695 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3696/* end confdefs.h. */
3697
3698int
3699main ()
3700{
3701#ifndef __GNUC__
3702 choke me
3703#endif
3704
3705 ;
3706 return 0;
3707}
3708_ACEOF
3709if ac_fn_cxx_try_compile "$LINENO"; then :
3710 ac_compiler_gnu=yes
3711else
3712 ac_compiler_gnu=no
3713fi
3714rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3715ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3716
3717fi
3718{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
3719$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
3720if test $ac_compiler_gnu = yes; then
3721 GXX=yes
3722else
3723 GXX=
3724fi
3725ac_test_CXXFLAGS=${CXXFLAGS+set}
3726ac_save_CXXFLAGS=$CXXFLAGS
3727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
3728$as_echo_n "checking whether $CXX accepts -g... " >&6; }
3729if test "${ac_cv_prog_cxx_g+set}" = set; then :
3730 $as_echo_n "(cached) " >&6
3731else
3732 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
3733 ac_cxx_werror_flag=yes
3734 ac_cv_prog_cxx_g=no
3735 CXXFLAGS="-g"
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 ac_cv_prog_cxx_g=yes
3749else
3750 CXXFLAGS=""
3751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3752/* end confdefs.h. */
3753
3754int
3755main ()
3756{
3757
3758 ;
3759 return 0;
3760}
3761_ACEOF
3762if ac_fn_cxx_try_compile "$LINENO"; then :
3763
3764else
3765 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3766 CXXFLAGS="-g"
3767 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3768/* end confdefs.h. */
3769
3770int
3771main ()
3772{
3773
3774 ;
3775 return 0;
3776}
3777_ACEOF
3778if ac_fn_cxx_try_compile "$LINENO"; then :
3779 ac_cv_prog_cxx_g=yes
3780fi
3781rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3782fi
3783rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3784fi
3785rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3786 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3787fi
3788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
3789$as_echo "$ac_cv_prog_cxx_g" >&6; }
3790if test "$ac_test_CXXFLAGS" = set; then
3791 CXXFLAGS=$ac_save_CXXFLAGS
3792elif test $ac_cv_prog_cxx_g = yes; then
3793 if test "$GXX" = yes; then
3794 CXXFLAGS="-g -O2"
3795 else
3796 CXXFLAGS="-g"
3797 fi
3798else
3799 if test "$GXX" = yes; then
3800 CXXFLAGS="-O2"
3801 else
3802 CXXFLAGS=
3803 fi
3804fi
3805ac_ext=c
3806ac_cpp='$CPP $CPPFLAGS'
3807ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3808ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3809ac_compiler_gnu=$ac_cv_c_compiler_gnu
3810
3811
60ca704f 3812
bec39cab
AC
3813ac_ext=c
3814ac_cpp='$CPP $CPPFLAGS'
3815ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3816ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3817ac_compiler_gnu=$ac_cv_c_compiler_gnu
81ecdfbb
RW
3818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3819$as_echo_n "checking how to run the C preprocessor... " >&6; }
bec39cab
AC
3820# On Suns, sometimes $CPP names a directory.
3821if test -n "$CPP" && test -d "$CPP"; then
3822 CPP=
8bb2c122 3823fi
bec39cab 3824if test -z "$CPP"; then
81ecdfbb
RW
3825 if test "${ac_cv_prog_CPP+set}" = set; then :
3826 $as_echo_n "(cached) " >&6
bec39cab
AC
3827else
3828 # Double quotes because CPP needs to be expanded
3829 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3830 do
3831 ac_preproc_ok=false
3832for ac_c_preproc_warn_flag in '' yes
3833do
3834 # Use a header file that comes with gcc, so configuring glibc
3835 # with a fresh cross-compiler works.
3836 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3837 # <limits.h> exists even on freestanding compilers.
3838 # On the NeXT, cc -E runs the code through the compiler's parser,
3839 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3841/* end confdefs.h. */
3842#ifdef __STDC__
3843# include <limits.h>
3844#else
3845# include <assert.h>
3846#endif
3847 Syntax error
3848_ACEOF
81ecdfbb 3849if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3850
81ecdfbb 3851else
bec39cab
AC
3852 # Broken: fails on valid input.
3853continue
3854fi
3855rm -f conftest.err conftest.$ac_ext
3856
81ecdfbb 3857 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3858 # can be detected and how.
81ecdfbb 3859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3860/* end confdefs.h. */
3861#include <ac_nonexistent.h>
3862_ACEOF
81ecdfbb 3863if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3864 # Broken: success on invalid input.
3865continue
8bb2c122 3866else
bec39cab
AC
3867 # Passes both tests.
3868ac_preproc_ok=:
3869break
8bb2c122 3870fi
bec39cab 3871rm -f conftest.err conftest.$ac_ext
8bb2c122 3872
bec39cab
AC
3873done
3874# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3875rm -f conftest.err conftest.$ac_ext
81ecdfbb 3876if $ac_preproc_ok; then :
bec39cab
AC
3877 break
3878fi
8bb2c122 3879
bec39cab
AC
3880 done
3881 ac_cv_prog_CPP=$CPP
ddc9cd0f 3882
c906108c 3883fi
bec39cab
AC
3884 CPP=$ac_cv_prog_CPP
3885else
3886 ac_cv_prog_CPP=$CPP
c906108c 3887fi
81ecdfbb
RW
3888{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3889$as_echo "$CPP" >&6; }
bec39cab
AC
3890ac_preproc_ok=false
3891for ac_c_preproc_warn_flag in '' yes
3892do
3893 # Use a header file that comes with gcc, so configuring glibc
3894 # with a fresh cross-compiler works.
3895 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3896 # <limits.h> exists even on freestanding compilers.
3897 # On the NeXT, cc -E runs the code through the compiler's parser,
3898 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3899 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3900/* end confdefs.h. */
3901#ifdef __STDC__
3902# include <limits.h>
3903#else
3904# include <assert.h>
3905#endif
3906 Syntax error
3907_ACEOF
81ecdfbb 3908if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3909
81ecdfbb 3910else
bec39cab
AC
3911 # Broken: fails on valid input.
3912continue
3913fi
3914rm -f conftest.err conftest.$ac_ext
3915
81ecdfbb 3916 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3917 # can be detected and how.
81ecdfbb 3918 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3919/* end confdefs.h. */
3920#include <ac_nonexistent.h>
3921_ACEOF
81ecdfbb 3922if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3923 # Broken: success on invalid input.
3924continue
c906108c 3925else
bec39cab
AC
3926 # Passes both tests.
3927ac_preproc_ok=:
3928break
c906108c 3929fi
bec39cab 3930rm -f conftest.err conftest.$ac_ext
c906108c 3931
bec39cab
AC
3932done
3933# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3934rm -f conftest.err conftest.$ac_ext
81ecdfbb
RW
3935if $ac_preproc_ok; then :
3936
c906108c 3937else
81ecdfbb
RW
3938 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3939$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3940as_fn_error "C preprocessor \"$CPP\" fails sanity check
3941See \`config.log' for more details." "$LINENO" 5; }
c906108c 3942fi
c906108c 3943
bec39cab
AC
3944ac_ext=c
3945ac_cpp='$CPP $CPPFLAGS'
3946ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3947ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3948ac_compiler_gnu=$ac_cv_c_compiler_gnu
3949
3950
81ecdfbb
RW
3951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3952$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3953if test "${ac_cv_path_GREP+set}" = set; then :
3954 $as_echo_n "(cached) " >&6
4e8d927d 3955else
81ecdfbb
RW
3956 if test -z "$GREP"; then
3957 ac_path_GREP_found=false
3958 # Loop through the user's path and test for each of PROGNAME-LIST
3959 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3960for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3961do
3962 IFS=$as_save_IFS
3963 test -z "$as_dir" && as_dir=.
3964 for ac_prog in grep ggrep; do
3965 for ac_exec_ext in '' $ac_executable_extensions; do
3966 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3967 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3968# Check for GNU ac_path_GREP and select it if it is found.
3969 # Check for GNU $ac_path_GREP
3970case `"$ac_path_GREP" --version 2>&1` in
3971*GNU*)
3972 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3973*)
3974 ac_count=0
3975 $as_echo_n 0123456789 >"conftest.in"
3976 while :
3977 do
3978 cat "conftest.in" "conftest.in" >"conftest.tmp"
3979 mv "conftest.tmp" "conftest.in"
3980 cp "conftest.in" "conftest.nl"
3981 $as_echo 'GREP' >> "conftest.nl"
3982 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3983 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3984 as_fn_arith $ac_count + 1 && ac_count=$as_val
3985 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3986 # Best one so far, save it but keep looking for a better one
3987 ac_cv_path_GREP="$ac_path_GREP"
3988 ac_path_GREP_max=$ac_count
bec39cab 3989 fi
81ecdfbb
RW
3990 # 10*(2^10) chars as input seems more than enough
3991 test $ac_count -gt 10 && break
3992 done
3993 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3994esac
bec39cab 3995
81ecdfbb
RW
3996 $ac_path_GREP_found && break 3
3997 done
3998 done
3999 done
4000IFS=$as_save_IFS
4001 if test -z "$ac_cv_path_GREP"; then
4002 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4003 fi
c906108c 4004else
81ecdfbb 4005 ac_cv_path_GREP=$GREP
c906108c 4006fi
c906108c 4007
81ecdfbb
RW
4008fi
4009{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4010$as_echo "$ac_cv_path_GREP" >&6; }
4011 GREP="$ac_cv_path_GREP"
c906108c 4012
c906108c 4013
81ecdfbb
RW
4014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4015$as_echo_n "checking for egrep... " >&6; }
4016if test "${ac_cv_path_EGREP+set}" = set; then :
4017 $as_echo_n "(cached) " >&6
783e057b 4018else
81ecdfbb
RW
4019 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4020 then ac_cv_path_EGREP="$GREP -E"
4021 else
4022 if test -z "$EGREP"; then
4023 ac_path_EGREP_found=false
4024 # Loop through the user's path and test for each of PROGNAME-LIST
4025 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4026for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
783e057b
DJ
4027do
4028 IFS=$as_save_IFS
4029 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
4030 for ac_prog in egrep; do
4031 for ac_exec_ext in '' $ac_executable_extensions; do
4032 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4033 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4034# Check for GNU ac_path_EGREP and select it if it is found.
4035 # Check for GNU $ac_path_EGREP
4036case `"$ac_path_EGREP" --version 2>&1` in
4037*GNU*)
4038 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4039*)
4040 ac_count=0
4041 $as_echo_n 0123456789 >"conftest.in"
4042 while :
4043 do
4044 cat "conftest.in" "conftest.in" >"conftest.tmp"
4045 mv "conftest.tmp" "conftest.in"
4046 cp "conftest.in" "conftest.nl"
4047 $as_echo 'EGREP' >> "conftest.nl"
4048 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4049 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4050 as_fn_arith $ac_count + 1 && ac_count=$as_val
4051 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4052 # Best one so far, save it but keep looking for a better one
4053 ac_cv_path_EGREP="$ac_path_EGREP"
4054 ac_path_EGREP_max=$ac_count
4055 fi
4056 # 10*(2^10) chars as input seems more than enough
4057 test $ac_count -gt 10 && break
4058 done
4059 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4060esac
bec39cab 4061
81ecdfbb
RW
4062 $ac_path_EGREP_found && break 3
4063 done
4064 done
4065 done
4066IFS=$as_save_IFS
4067 if test -z "$ac_cv_path_EGREP"; then
4068 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
783e057b 4069 fi
783e057b 4070else
81ecdfbb 4071 ac_cv_path_EGREP=$EGREP
783e057b
DJ
4072fi
4073
81ecdfbb 4074 fi
783e057b 4075fi
81ecdfbb
RW
4076{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4077$as_echo "$ac_cv_path_EGREP" >&6; }
4078 EGREP="$ac_cv_path_EGREP"
4079
783e057b 4080
81ecdfbb
RW
4081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4082$as_echo_n "checking for ANSI C header files... " >&6; }
4083if test "${ac_cv_header_stdc+set}" = set; then :
4084 $as_echo_n "(cached) " >&6
783e057b 4085else
81ecdfbb 4086 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 4087/* end confdefs.h. */
783e057b 4088#include <stdlib.h>
bec39cab 4089#include <stdarg.h>
783e057b
DJ
4090#include <string.h>
4091#include <float.h>
c906108c 4092
bec39cab
AC
4093int
4094main ()
4095{
c906108c 4096
bec39cab
AC
4097 ;
4098 return 0;
4099}
4100_ACEOF
81ecdfbb 4101if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4102 ac_cv_header_stdc=yes
c906108c 4103else
81ecdfbb 4104 ac_cv_header_stdc=no
c906108c 4105fi
81ecdfbb 4106rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 4107
783e057b
DJ
4108if test $ac_cv_header_stdc = yes; then
4109 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
81ecdfbb 4110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4111/* end confdefs.h. */
4112#include <string.h>
c906108c 4113
783e057b
DJ
4114_ACEOF
4115if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4116 $EGREP "memchr" >/dev/null 2>&1; then :
4117
c906108c 4118else
783e057b 4119 ac_cv_header_stdc=no
c906108c 4120fi
783e057b 4121rm -f conftest*
c906108c
SS
4122
4123fi
4124
783e057b
DJ
4125if test $ac_cv_header_stdc = yes; then
4126 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
81ecdfbb 4127 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4128/* end confdefs.h. */
4129#include <stdlib.h>
bec39cab 4130
783e057b
DJ
4131_ACEOF
4132if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4133 $EGREP "free" >/dev/null 2>&1; then :
4134
bec39cab 4135else
783e057b 4136 ac_cv_header_stdc=no
bec39cab 4137fi
783e057b 4138rm -f conftest*
bec39cab
AC
4139
4140fi
bec39cab 4141
783e057b
DJ
4142if test $ac_cv_header_stdc = yes; then
4143 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
81ecdfbb 4144 if test "$cross_compiling" = yes; then :
783e057b 4145 :
bec39cab 4146else
81ecdfbb 4147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4148/* end confdefs.h. */
4149#include <ctype.h>
81ecdfbb 4150#include <stdlib.h>
783e057b
DJ
4151#if ((' ' & 0x0FF) == 0x020)
4152# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4153# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4154#else
4155# define ISLOWER(c) \
4156 (('a' <= (c) && (c) <= 'i') \
4157 || ('j' <= (c) && (c) <= 'r') \
4158 || ('s' <= (c) && (c) <= 'z'))
4159# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4160#endif
4161
4162#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4163int
4164main ()
4165{
4166 int i;
4167 for (i = 0; i < 256; i++)
4168 if (XOR (islower (i), ISLOWER (i))
4169 || toupper (i) != TOUPPER (i))
81ecdfbb
RW
4170 return 2;
4171 return 0;
783e057b
DJ
4172}
4173_ACEOF
81ecdfbb 4174if ac_fn_c_try_run "$LINENO"; then :
783e057b 4175
81ecdfbb
RW
4176else
4177 ac_cv_header_stdc=no
783e057b 4178fi
81ecdfbb
RW
4179rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4180 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 4181fi
81ecdfbb 4182
783e057b
DJ
4183fi
4184fi
81ecdfbb
RW
4185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4186$as_echo "$ac_cv_header_stdc" >&6; }
783e057b
DJ
4187if test $ac_cv_header_stdc = yes; then
4188
81ecdfbb 4189$as_echo "#define STDC_HEADERS 1" >>confdefs.h
783e057b
DJ
4190
4191fi
4192
4193# On IRIX 5.3, sys/types and inttypes.h are conflicting.
783e057b
DJ
4194for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4195 inttypes.h stdint.h unistd.h
81ecdfbb
RW
4196do :
4197 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4198ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4199"
4200eval as_val=\$$as_ac_Header
4201 if test "x$as_val" = x""yes; then :
783e057b 4202 cat >>confdefs.h <<_ACEOF
81ecdfbb 4203#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
783e057b
DJ
4204_ACEOF
4205
4206fi
4207
4208done
4209
4210
4211
81ecdfbb
RW
4212 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4213if test "x$ac_cv_header_minix_config_h" = x""yes; then :
783e057b
DJ
4214 MINIX=yes
4215else
4216 MINIX=
4217fi
4218
4219
4220 if test "$MINIX" = yes; then
4221
81ecdfbb 4222$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
783e057b
DJ
4223
4224
81ecdfbb 4225$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
783e057b
DJ
4226
4227
81ecdfbb 4228$as_echo "#define _MINIX 1" >>confdefs.h
783e057b
DJ
4229
4230 fi
4231
4232
81ecdfbb
RW
4233 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4234$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4235if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
4236 $as_echo_n "(cached) " >&6
783e057b 4237else
81ecdfbb 4238 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4239/* end confdefs.h. */
4240
c971b7fa
PA
4241# define __EXTENSIONS__ 1
4242 $ac_includes_default
783e057b
DJ
4243int
4244main ()
4245{
4246
4247 ;
4248 return 0;
4249}
4250_ACEOF
81ecdfbb 4251if ac_fn_c_try_compile "$LINENO"; then :
783e057b
DJ
4252 ac_cv_safe_to_define___extensions__=yes
4253else
81ecdfbb 4254 ac_cv_safe_to_define___extensions__=no
783e057b 4255fi
81ecdfbb 4256rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b 4257fi
81ecdfbb
RW
4258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4259$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
783e057b 4260 test $ac_cv_safe_to_define___extensions__ = yes &&
81ecdfbb 4261 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
783e057b 4262
81ecdfbb 4263 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
783e057b 4264
81ecdfbb 4265 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
783e057b 4266
81ecdfbb 4267 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
783e057b 4268
81ecdfbb 4269 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
783e057b
DJ
4270
4271
c971b7fa
PA
4272ac_aux_dir=
4273for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4274 for ac_t in install-sh install.sh shtool; do
4275 if test -f "$ac_dir/$ac_t"; then
4276 ac_aux_dir=$ac_dir
4277 ac_install_sh="$ac_aux_dir/$ac_t -c"
4278 break 2
4279 fi
4280 done
4281done
4282if test -z "$ac_aux_dir"; then
4283 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
4284fi
770d76d7 4285
c971b7fa
PA
4286# These three variables are undocumented and unsupported,
4287# and are intended to be withdrawn in a future Autoconf release.
4288# They can cause serious problems if a builder's source tree is in a directory
4289# whose full name contains unusual characters.
4290ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4291ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4292ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
770d76d7 4293
770d76d7 4294
c971b7fa
PA
4295# Make sure we can run config.sub.
4296$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
4297 as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
770d76d7 4298
c971b7fa
PA
4299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4300$as_echo_n "checking build system type... " >&6; }
4301if test "${ac_cv_build+set}" = set; then :
4302 $as_echo_n "(cached) " >&6
770d76d7 4303else
c971b7fa
PA
4304 ac_build_alias=$build_alias
4305test "x$ac_build_alias" = x &&
4306 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4307test "x$ac_build_alias" = x &&
4308 as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
4309ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
4310 as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
4311
770d76d7 4312fi
c971b7fa
PA
4313{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4314$as_echo "$ac_cv_build" >&6; }
4315case $ac_cv_build in
4316*-*-*) ;;
4317*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
770d76d7 4318esac
c971b7fa
PA
4319build=$ac_cv_build
4320ac_save_IFS=$IFS; IFS='-'
4321set x $ac_cv_build
4322shift
4323build_cpu=$1
4324build_vendor=$2
4325shift; shift
4326# Remember, the first character of IFS is used to create $*,
4327# except with old shells:
4328build_os=$*
4329IFS=$ac_save_IFS
4330case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
770d76d7
PA
4331
4332
c971b7fa
PA
4333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4334$as_echo_n "checking host system type... " >&6; }
4335if test "${ac_cv_host+set}" = set; then :
81ecdfbb
RW
4336 $as_echo_n "(cached) " >&6
4337else
c971b7fa
PA
4338 if test "x$host_alias" = x; then
4339 ac_cv_host=$ac_cv_build
81ecdfbb 4340else
c971b7fa
PA
4341 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
4342 as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
81ecdfbb 4343fi
81ecdfbb
RW
4344
4345fi
c971b7fa
PA
4346{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4347$as_echo "$ac_cv_host" >&6; }
4348case $ac_cv_host in
4349*-*-*) ;;
4350*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
81ecdfbb 4351esac
c971b7fa
PA
4352host=$ac_cv_host
4353ac_save_IFS=$IFS; IFS='-'
4354set x $ac_cv_host
4355shift
4356host_cpu=$1
4357host_vendor=$2
4358shift; shift
4359# Remember, the first character of IFS is used to create $*,
4360# except with old shells:
4361host_os=$*
4362IFS=$ac_save_IFS
4363case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3388710e
JM
4364
4365
4366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4367$as_echo_n "checking target system type... " >&6; }
4368if test "${ac_cv_target+set}" = set; then :
4369 $as_echo_n "(cached) " >&6
4370else
4371 if test "x$target_alias" = x; then
4372 ac_cv_target=$ac_cv_host
4373else
4374 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
4375 as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
4376fi
4377
4378fi
4379{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4380$as_echo "$ac_cv_target" >&6; }
4381case $ac_cv_target in
4382*-*-*) ;;
4383*) as_fn_error "invalid value of canonical target" "$LINENO" 5;;
4384esac
4385target=$ac_cv_target
4386ac_save_IFS=$IFS; IFS='-'
4387set x $ac_cv_target
4388shift
4389target_cpu=$1
4390target_vendor=$2
4391shift; shift
4392# Remember, the first character of IFS is used to create $*,
4393# except with old shells:
4394target_os=$*
4395IFS=$ac_save_IFS
4396case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4397
4398
4399# The aliases save the names the user supplied, while $host etc.
4400# will get canonicalized.
4401test -n "$target_alias" &&
4402 test "$program_prefix$program_suffix$program_transform_name" = \
4403 NONENONEs,x,x, &&
4404 program_prefix=${target_alias}-
4405
4406# The tests for host and target for $enable_largefile require
4407# canonical names.
4408
4409
81ecdfbb 4410
da2f07f1
JK
4411# As the $enable_largefile decision depends on --enable-plugins we must set it
4412# even in directories otherwise not depending on the $plugins option.
4413
4414
2974be62
AM
4415 maybe_plugins=no
4416 for ac_header in dlfcn.h
4417do :
4418 ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
4419"
4420if test "x$ac_cv_header_dlfcn_h" = x""yes; then :
4421 cat >>confdefs.h <<_ACEOF
4422#define HAVE_DLFCN_H 1
4423_ACEOF
4424 maybe_plugins=yes
4425fi
4426
4427done
4428
4429 for ac_header in windows.h
4430do :
4431 ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
4432"
4433if test "x$ac_cv_header_windows_h" = x""yes; then :
4434 cat >>confdefs.h <<_ACEOF
4435#define HAVE_WINDOWS_H 1
4436_ACEOF
4437 maybe_plugins=yes
4438fi
4439
4440done
4441
4442
4443 # Check whether --enable-plugins was given.
da2f07f1
JK
4444if test "${enable_plugins+set}" = set; then :
4445 enableval=$enable_plugins; case "${enableval}" in
2974be62
AM
4446 no) plugins=no ;;
4447 *) plugins=yes
4448 if test "$maybe_plugins" != "yes" ; then
4449 as_fn_error "Building with plugin support requires a host that supports dlopen." "$LINENO" 5
4450 fi ;;
4451 esac
da2f07f1 4452else
2974be62
AM
4453 plugins=$maybe_plugins
4454
da2f07f1
JK
4455fi
4456
2974be62
AM
4457 if test "$plugins" = "yes"; then
4458 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
4459$as_echo_n "checking for library containing dlopen... " >&6; }
4460if test "${ac_cv_search_dlopen+set}" = set; then :
4461 $as_echo_n "(cached) " >&6
4462else
4463 ac_func_search_save_LIBS=$LIBS
4464cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4465/* end confdefs.h. */
4466
4467/* Override any GCC internal prototype to avoid an error.
4468 Use char because int might match the return type of a GCC
4469 builtin and then its argument prototype would still apply. */
4470#ifdef __cplusplus
4471extern "C"
4472#endif
4473char dlopen ();
4474int
4475main ()
4476{
4477return dlopen ();
4478 ;
4479 return 0;
4480}
4481_ACEOF
4482for ac_lib in '' dl; do
4483 if test -z "$ac_lib"; then
4484 ac_res="none required"
4485 else
4486 ac_res=-l$ac_lib
4487 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4488 fi
4489 if ac_fn_c_try_link "$LINENO"; then :
4490 ac_cv_search_dlopen=$ac_res
4491fi
4492rm -f core conftest.err conftest.$ac_objext \
4493 conftest$ac_exeext
4494 if test "${ac_cv_search_dlopen+set}" = set; then :
4495 break
4496fi
4497done
4498if test "${ac_cv_search_dlopen+set}" = set; then :
4499
4500else
4501 ac_cv_search_dlopen=no
4502fi
4503rm conftest.$ac_ext
4504LIBS=$ac_func_search_save_LIBS
4505fi
4506{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
4507$as_echo "$ac_cv_search_dlopen" >&6; }
4508ac_res=$ac_cv_search_dlopen
4509if test "$ac_res" != no; then :
4510 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4511
4512fi
4513
4514 fi
da2f07f1
JK
4515
4516
4517case "${host}" in
4518 sparc-*-solaris*|i[3-7]86-*-solaris*)
4519 # On native 32bit sparc and ia32 solaris, large-file and procfs support
4520 # are mutually exclusive; and without procfs support, the bfd/ elf module
4521 # cannot provide certain routines such as elfcore_write_prpsinfo
4522 # or elfcore_write_prstatus. So unless the user explicitly requested
4523 # large-file support through the --enable-largefile switch, disable
4524 # large-file support in favor of procfs support.
4525 test "${target}" = "${host}" -a "x$plugins" = xno \
4526 && : ${enable_largefile="no"}
4527 ;;
4528esac
4529
4530# Check whether --enable-largefile was given.
4531if test "${enable_largefile+set}" = set; then :
4532 enableval=$enable_largefile;
4533fi
4534
4535if test "$enable_largefile" != no; then
4536
4537 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4538$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
4539if test "${ac_cv_sys_largefile_CC+set}" = set; then :
4540 $as_echo_n "(cached) " >&6
4541else
4542 ac_cv_sys_largefile_CC=no
4543 if test "$GCC" != yes; then
4544 ac_save_CC=$CC
4545 while :; do
4546 # IRIX 6.2 and later do not support large files by default,
4547 # so use the C compiler's -n32 option if that helps.
4548 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4549/* end confdefs.h. */
4550#include <sys/types.h>
4551 /* Check that off_t can represent 2**63 - 1 correctly.
4552 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4553 since some C++ compilers masquerading as C compilers
4554 incorrectly reject 9223372036854775807. */
4555#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4556 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4557 && LARGE_OFF_T % 2147483647 == 1)
4558 ? 1 : -1];
4559int
4560main ()
4561{
4562
4563 ;
4564 return 0;
4565}
4566_ACEOF
4567 if ac_fn_c_try_compile "$LINENO"; then :
4568 break
4569fi
4570rm -f core conftest.err conftest.$ac_objext
4571 CC="$CC -n32"
4572 if ac_fn_c_try_compile "$LINENO"; then :
4573 ac_cv_sys_largefile_CC=' -n32'; break
4574fi
4575rm -f core conftest.err conftest.$ac_objext
4576 break
4577 done
4578 CC=$ac_save_CC
4579 rm -f conftest.$ac_ext
4580 fi
4581fi
4582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4583$as_echo "$ac_cv_sys_largefile_CC" >&6; }
4584 if test "$ac_cv_sys_largefile_CC" != no; then
4585 CC=$CC$ac_cv_sys_largefile_CC
4586 fi
4587
4588 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4589$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
4590if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
4591 $as_echo_n "(cached) " >&6
4592else
4593 while :; do
4594 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4595/* end confdefs.h. */
4596#include <sys/types.h>
4597 /* Check that off_t can represent 2**63 - 1 correctly.
4598 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4599 since some C++ compilers masquerading as C compilers
4600 incorrectly reject 9223372036854775807. */
4601#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4602 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4603 && LARGE_OFF_T % 2147483647 == 1)
4604 ? 1 : -1];
4605int
4606main ()
4607{
4608
4609 ;
4610 return 0;
4611}
4612_ACEOF
4613if ac_fn_c_try_compile "$LINENO"; then :
4614 ac_cv_sys_file_offset_bits=no; break
4615fi
4616rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4617 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4618/* end confdefs.h. */
4619#define _FILE_OFFSET_BITS 64
4620#include <sys/types.h>
4621 /* Check that off_t can represent 2**63 - 1 correctly.
4622 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4623 since some C++ compilers masquerading as C compilers
4624 incorrectly reject 9223372036854775807. */
4625#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4626 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4627 && LARGE_OFF_T % 2147483647 == 1)
4628 ? 1 : -1];
4629int
4630main ()
4631{
4632
4633 ;
4634 return 0;
4635}
4636_ACEOF
4637if ac_fn_c_try_compile "$LINENO"; then :
4638 ac_cv_sys_file_offset_bits=64; break
4639fi
4640rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4641 ac_cv_sys_file_offset_bits=unknown
4642 break
4643done
4644fi
4645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4646$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4647case $ac_cv_sys_file_offset_bits in #(
4648 no | unknown) ;;
4649 *)
4650cat >>confdefs.h <<_ACEOF
4651#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4652_ACEOF
4653;;
4654esac
4655rm -rf conftest*
4656 if test $ac_cv_sys_file_offset_bits = unknown; then
4657 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4658$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
4659if test "${ac_cv_sys_large_files+set}" = set; then :
4660 $as_echo_n "(cached) " >&6
4661else
4662 while :; do
4663 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4664/* end confdefs.h. */
4665#include <sys/types.h>
4666 /* Check that off_t can represent 2**63 - 1 correctly.
4667 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4668 since some C++ compilers masquerading as C compilers
4669 incorrectly reject 9223372036854775807. */
4670#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4671 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4672 && LARGE_OFF_T % 2147483647 == 1)
4673 ? 1 : -1];
4674int
4675main ()
4676{
4677
4678 ;
4679 return 0;
4680}
4681_ACEOF
4682if ac_fn_c_try_compile "$LINENO"; then :
4683 ac_cv_sys_large_files=no; break
4684fi
4685rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4687/* end confdefs.h. */
4688#define _LARGE_FILES 1
4689#include <sys/types.h>
4690 /* Check that off_t can represent 2**63 - 1 correctly.
4691 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4692 since some C++ compilers masquerading as C compilers
4693 incorrectly reject 9223372036854775807. */
4694#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4695 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4696 && LARGE_OFF_T % 2147483647 == 1)
4697 ? 1 : -1];
4698int
4699main ()
4700{
4701
4702 ;
4703 return 0;
4704}
4705_ACEOF
4706if ac_fn_c_try_compile "$LINENO"; then :
4707 ac_cv_sys_large_files=1; break
4708fi
4709rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4710 ac_cv_sys_large_files=unknown
4711 break
4712done
4713fi
4714{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4715$as_echo "$ac_cv_sys_large_files" >&6; }
4716case $ac_cv_sys_large_files in #(
4717 no | unknown) ;;
4718 *)
4719cat >>confdefs.h <<_ACEOF
4720#define _LARGE_FILES $ac_cv_sys_large_files
4721_ACEOF
4722;;
4723esac
4724rm -rf conftest*
4725 fi
4726fi
4727
4728
4729
81ecdfbb
RW
4730
4731
4732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5
4733$as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; }
4734if test "${am_cv_prog_cc_stdc+set}" = set; then :
4735 $as_echo_n "(cached) " >&6
4736else
4737 am_cv_prog_cc_stdc=no
4738ac_save_CC="$CC"
4739# Don't try gcc -ansi; that turns off useful extensions and
4740# breaks some systems' header files.
4741# AIX -qlanglvl=ansi
4742# Ultrix and OSF/1 -std1
4743# HP-UX 10.20 and later -Ae
4744# HP-UX older versions -Aa -D_HPUX_SOURCE
4745# SVR4 -Xc -D__EXTENSIONS__
4746for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4747do
783e057b 4748 CC="$ac_save_CC $ac_arg"
81ecdfbb 4749 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4750/* end confdefs.h. */
4751#include <stdarg.h>
4752#include <stdio.h>
4753#include <sys/types.h>
4754#include <sys/stat.h>
4755/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4756struct buf { int x; };
4757FILE * (*rcsopen) (struct buf *, struct stat *, int);
4758static char *e (p, i)
4759 char **p;
4760 int i;
4761{
4762 return p[i];
4763}
4764static char *f (char * (*g) (char **, int), char **p, ...)
4765{
4766 char *s;
4767 va_list v;
4768 va_start (v,p);
4769 s = g (p, va_arg (v,int));
4770 va_end (v);
4771 return s;
4772}
4773int test (int i, double x);
4774struct s1 {int (*f) (int a);};
4775struct s2 {int (*f) (double a);};
4776int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4777int argc;
4778char **argv;
4779
4780int
4781main ()
4782{
4783
4784return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4785
4786 ;
4787 return 0;
4788}
4789_ACEOF
81ecdfbb 4790if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4791 am_cv_prog_cc_stdc="$ac_arg"; break
783e057b 4792fi
81ecdfbb 4793rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
4794done
4795CC="$ac_save_CC"
4796
4797fi
4798
4799if test -z "$am_cv_prog_cc_stdc"; then
81ecdfbb
RW
4800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4801$as_echo "none needed" >&6; }
783e057b 4802else
81ecdfbb
RW
4803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5
4804$as_echo "$am_cv_prog_cc_stdc" >&6; }
783e057b
DJ
4805fi
4806case "x$am_cv_prog_cc_stdc" in
4807 x|xno) ;;
4808 *) CC="$CC $am_cv_prog_cc_stdc" ;;
4809esac
4810
4869db5e
RM
4811# expand $ac_aux_dir to an absolute path
4812am_aux_dir=`cd $ac_aux_dir && pwd`
4813
4814if test x"${install_sh}" != xset; then
4815 case $am_aux_dir in
4816 *\ * | *\ *)
4817 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
4818 *)
4819 install_sh="\${SHELL} $am_aux_dir/install-sh"
4820 esac
4821fi
4822
4823# Installed binaries are usually stripped using `strip' when the user
4824# run `make install-strip'. However `strip' might not be the right
4825# tool to use in cross-compilation environments, therefore Automake
4826# will honor the `STRIP' environment variable to overrule this program.
4827if test "$cross_compiling" != no; then
4828 if test -n "$ac_tool_prefix"; then
4829 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4830set dummy ${ac_tool_prefix}strip; ac_word=$2
4831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4832$as_echo_n "checking for $ac_word... " >&6; }
4833if test "${ac_cv_prog_STRIP+set}" = set; then :
4834 $as_echo_n "(cached) " >&6
4835else
4836 if test -n "$STRIP"; then
4837 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4838else
4839as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4840for as_dir in $PATH
4841do
4842 IFS=$as_save_IFS
4843 test -z "$as_dir" && as_dir=.
4844 for ac_exec_ext in '' $ac_executable_extensions; do
4845 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4846 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4847 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4848 break 2
4849 fi
4850done
4851 done
4852IFS=$as_save_IFS
4853
4854fi
4855fi
4856STRIP=$ac_cv_prog_STRIP
4857if test -n "$STRIP"; then
4858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
4859$as_echo "$STRIP" >&6; }
4860else
4861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4862$as_echo "no" >&6; }
4863fi
4864
4865
4866fi
4867if test -z "$ac_cv_prog_STRIP"; then
4868 ac_ct_STRIP=$STRIP
4869 # Extract the first word of "strip", so it can be a program name with args.
4870set dummy strip; ac_word=$2
4871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4872$as_echo_n "checking for $ac_word... " >&6; }
4873if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
4874 $as_echo_n "(cached) " >&6
4875else
4876 if test -n "$ac_ct_STRIP"; then
4877 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
4878else
4879as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4880for as_dir in $PATH
4881do
4882 IFS=$as_save_IFS
4883 test -z "$as_dir" && as_dir=.
4884 for ac_exec_ext in '' $ac_executable_extensions; do
4885 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4886 ac_cv_prog_ac_ct_STRIP="strip"
4887 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4888 break 2
4889 fi
4890done
4891 done
4892IFS=$as_save_IFS
4893
4894fi
4895fi
4896ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
4897if test -n "$ac_ct_STRIP"; then
4898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
4899$as_echo "$ac_ct_STRIP" >&6; }
4900else
4901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4902$as_echo "no" >&6; }
4903fi
4904
4905 if test "x$ac_ct_STRIP" = x; then
4906 STRIP=":"
4907 else
4908 case $cross_compiling:$ac_tool_warned in
4909yes:)
4910{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4911$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4912ac_tool_warned=yes ;;
4913esac
4914 STRIP=$ac_ct_STRIP
4915 fi
4916else
4917 STRIP="$ac_cv_prog_STRIP"
4918fi
4919
4920fi
4921INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
4922
783e057b
DJ
4923
4924ac_aux_dir=
81ecdfbb
RW
4925for ac_dir in .. "$srcdir"/..; do
4926 for ac_t in install-sh install.sh shtool; do
4927 if test -f "$ac_dir/$ac_t"; then
4928 ac_aux_dir=$ac_dir
4929 ac_install_sh="$ac_aux_dir/$ac_t -c"
4930 break 2
4931 fi
4932 done
783e057b
DJ
4933done
4934if test -z "$ac_aux_dir"; then
81ecdfbb 4935 as_fn_error "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
783e057b 4936fi
81ecdfbb
RW
4937
4938# These three variables are undocumented and unsupported,
4939# and are intended to be withdrawn in a future Autoconf release.
4940# They can cause serious problems if a builder's source tree is in a directory
4941# whose full name contains unusual characters.
4942ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4943ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4944ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4945
783e057b 4946
783e057b 4947
9009e1ae
MR
4948test "$program_prefix" != NONE &&
4949 program_transform_name="s&^&$program_prefix&;$program_transform_name"
4950# Use a double $ so make ignores it.
4951test "$program_suffix" != NONE &&
4952 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
4953# Double any \ or $.
4954# By default was `s,x,x', remove it if useless.
4955ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
4956program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
4957
81ecdfbb 4958
3bc3d82a
PA
4959# See if we are building with C++, and substitute COMPILER.
4960
4961 # Check whether --enable-build-with-cxx was given.
4962if test "${enable_build_with_cxx+set}" = set; then :
4963 enableval=$enable_build_with_cxx; case $enableval in
4964 yes | no)
4965 ;;
4966 *)
4967 as_fn_error "bad value $enableval for --enable-build-with-cxx" "$LINENO" 5 ;;
4968 esac
4969else
a2358508 4970 enable_build_with_cxx=yes
3bc3d82a
PA
4971fi
4972
4973
4974 if test "$enable_build_with_cxx" = "yes"; then
dad44a1f 4975 COMPILER='$(CXX)'
a994041d 4976 COMPILER_CFLAGS='$(CXXFLAGS)'
3bc3d82a
PA
4977 else
4978 COMPILER='$(CC)'
a994041d 4979 COMPILER_CFLAGS='$(CFLAGS)'
3bc3d82a
PA
4980 fi
4981
4982
4983
a994041d 4984
a417dc56
RW
4985# Dependency checking.
4986rm -rf .tst 2>/dev/null
4987mkdir .tst 2>/dev/null
4988if test -d .tst; then
4989 am__leading_dot=.
4990else
4991 am__leading_dot=_
4992fi
4993rmdir .tst 2>/dev/null
4994
4995DEPDIR="${am__leading_dot}deps"
4996
81ecdfbb 4997ac_config_commands="$ac_config_commands depdir"
a417dc56
RW
4998
4999
5000depcc="$CC" am_compiler_list=
5001
5002am_depcomp=$ac_aux_dir/depcomp
81ecdfbb
RW
5003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
5004$as_echo_n "checking dependency style of $depcc... " >&6; }
5005if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
5006 $as_echo_n "(cached) " >&6
a417dc56
RW
5007else
5008 if test -f "$am_depcomp"; then
5009 # We make a subdir and do the tests there. Otherwise we can end up
5010 # making bogus files that we don't know about and never remove. For
5011 # instance it was reported that on HP-UX the gcc test will end up
5012 # making a dummy file named `D' -- because `-MD' means `put the output
5013 # in D'.
5014 mkdir conftest.dir
5015 # Copy depcomp to subdir because otherwise we won't find it if we're
5016 # using a relative directory.
5017 cp "$am_depcomp" conftest.dir
5018 cd conftest.dir
5019 # We will build objects and dependencies in a subdirectory because
5020 # it helps to detect inapplicable dependency modes. For instance
5021 # both Tru64's cc and ICC support -MD to output dependencies as a
5022 # side effect of compilation, but ICC will put the dependencies in
5023 # the current directory while Tru64 will put them in the object
5024 # directory.
5025 mkdir sub
5026
5027 am_cv_CC_dependencies_compiler_type=none
5028 if test "$am_compiler_list" = ""; then
5029 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
5030 fi
5031 for depmode in $am_compiler_list; do
5032 if test $depmode = none; then break; fi
5033
81ecdfbb 5034 $as_echo "$as_me:$LINENO: trying $depmode" >&5
a417dc56
RW
5035 # Setup a source with many dependencies, because some compilers
5036 # like to wrap large dependency lists on column 80 (with \), and
5037 # we should not choose a depcomp mode which is confused by this.
5038 #
5039 # We need to recreate these files for each test, as the compiler may
5040 # overwrite some of them when testing with obscure command lines.
5041 # This happens at least with the AIX C compiler.
5042 : > sub/conftest.c
5043 for i in 1 2 3 4 5 6; do
5044 echo '#include "conftst'$i'.h"' >> sub/conftest.c
5045 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
5046 # Solaris 8's {/usr,}/bin/sh.
5047 touch sub/conftst$i.h
5048 done
5049 echo "include sub/conftest.Po" > confmf
5050
5051 # We check with `-c' and `-o' for the sake of the "dashmstdout"
5052 # mode. It turns out that the SunPro C++ compiler does not properly
5053 # handle `-M -o', and we need to detect this.
5054 depcmd="depmode=$depmode \
5055 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
5056 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
5057 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
5058 echo "| $depcmd" | sed -e 's/ */ /g' >&5
5059 if env $depcmd > conftest.err 2>&1 &&
5060 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
5061 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
5062 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
5063 # icc doesn't choke on unknown options, it will just issue warnings
5064 # or remarks (even with -Werror). So we grep stderr for any message
5065 # that says an option was ignored or not supported.
5066 # When given -MP, icc 7.0 and 7.1 complain thusly:
5067 # icc: Command line warning: ignoring option '-M'; no argument required
5068 # The diagnosis changed in icc 8.0:
5069 # icc: Command line remark: option '-MP' not supported
5070 if (grep 'ignoring option' conftest.err ||
5071 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
5072 am_cv_CC_dependencies_compiler_type=$depmode
81ecdfbb 5073 $as_echo "$as_me:$LINENO: success" >&5
a417dc56
RW
5074 break
5075 fi
5076 fi
81ecdfbb 5077 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
a417dc56
RW
5078 sed -e 's/^/| /' < conftest.err >&5
5079 done
5080
5081 cd ..
5082 rm -rf conftest.dir
5083else
5084 am_cv_CC_dependencies_compiler_type=none
5085fi
5086
5087fi
81ecdfbb
RW
5088{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
5089$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
a417dc56 5090if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
81ecdfbb 5091then as_fn_error "no usable dependency style found" "$LINENO" 5
a417dc56
RW
5092else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
5093
5094fi
5095
5096
5097# Check for the 'make' the user wants to use.
5098for ac_prog in make
5099do
5100 # Extract the first word of "$ac_prog", so it can be a program name with args.
5101set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
5102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5103$as_echo_n "checking for $ac_word... " >&6; }
5104if test "${ac_cv_prog_MAKE+set}" = set; then :
5105 $as_echo_n "(cached) " >&6
a417dc56
RW
5106else
5107 if test -n "$MAKE"; then
5108 ac_cv_prog_MAKE="$MAKE" # Let the user override the test.
5109else
5110as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5111for as_dir in $PATH
5112do
5113 IFS=$as_save_IFS
5114 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5115 for ac_exec_ext in '' $ac_executable_extensions; do
5116 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
a417dc56 5117 ac_cv_prog_MAKE="$ac_prog"
81ecdfbb 5118 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
a417dc56
RW
5119 break 2
5120 fi
5121done
81ecdfbb
RW
5122 done
5123IFS=$as_save_IFS
a417dc56
RW
5124
5125fi
5126fi
5127MAKE=$ac_cv_prog_MAKE
5128if test -n "$MAKE"; then
81ecdfbb
RW
5129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
5130$as_echo "$MAKE" >&6; }
a417dc56 5131else
81ecdfbb
RW
5132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5133$as_echo "no" >&6; }
a417dc56
RW
5134fi
5135
81ecdfbb 5136
a417dc56
RW
5137 test -n "$MAKE" && break
5138done
5139
5140MAKE_IS_GNU=
5141case "`$MAKE --version 2>&1 | sed 1q`" in
5142 *GNU*)
5143 MAKE_IS_GNU=yes
5144 ;;
5145esac
81ecdfbb 5146 if test "$MAKE_IS_GNU" = yes; then
a417dc56
RW
5147 GMAKE_TRUE=
5148 GMAKE_FALSE='#'
5149else
5150 GMAKE_TRUE='#'
5151 GMAKE_FALSE=
5152fi
5153
81ecdfbb
RW
5154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
5155$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
5156set x ${MAKE-make}
5157ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
5158if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
5159 $as_echo_n "(cached) " >&6
a417dc56
RW
5160else
5161 cat >conftest.make <<\_ACEOF
81ecdfbb 5162SHELL = /bin/sh
a417dc56 5163all:
81ecdfbb 5164 @echo '@@@%%%=$(MAKE)=@@@%%%'
a417dc56
RW
5165_ACEOF
5166# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
81ecdfbb
RW
5167case `${MAKE-make} -f conftest.make 2>/dev/null` in
5168 *@@@%%%=?*=@@@%%%*)
5169 eval ac_cv_prog_make_${ac_make}_set=yes;;
5170 *)
5171 eval ac_cv_prog_make_${ac_make}_set=no;;
5172esac
a417dc56
RW
5173rm -f conftest.make
5174fi
81ecdfbb
RW
5175if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
5176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5177$as_echo "yes" >&6; }
a417dc56
RW
5178 SET_MAKE=
5179else
81ecdfbb
RW
5180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5181$as_echo "no" >&6; }
a417dc56
RW
5182 SET_MAKE="MAKE=${MAKE-make}"
5183fi
5184
5185
648d586d
JB
5186gnulib_extra_configure_args=
5187# If large-file support is disabled, make sure gnulib does the same.
5188if test "$enable_largefile" = no; then
5189gnulib_extra_configure_args="$gnulib_extra_configure_args --disable-largefile"
5190fi
5191
c971b7fa
PA
5192# Configure gnulib. We need to build gnulib under some other
5193# directory not "gnulib", to avoid the problem of both GDB and
5194# GDBserver wanting to build it in the same directory, when building
5195# in the source dir.
783e057b 5196
c971b7fa
PA
5197 in_src="gnulib"
5198 in_build="build-gnulib"
648d586d 5199 in_extra_args="$gnulib_extra_configure_args"
c971b7fa
PA
5200
5201 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
5202 # so they do not pile up.
5203 ac_sub_configure_args=
5204 ac_prev=
5205 eval "set x $ac_configure_args"
5206 shift
5207 for ac_arg
5208 do
5209 if test -n "$ac_prev"; then
5210 ac_prev=
5211 continue
5212 fi
5213 case $ac_arg in
5214 -cache-file | --cache-file | --cache-fil | --cache-fi \
5215 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
5216 ac_prev=cache_file ;;
5217 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
5218 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
5219 | --c=*)
5220 ;;
5221 --config-cache | -C)
5222 ;;
5223 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
5224 ac_prev=srcdir ;;
5225 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
5226 ;;
5227 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
5228 ac_prev=prefix ;;
5229 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
5230 ;;
5231 --disable-option-checking)
5232 ;;
5233 *)
5234 case $ac_arg in
5235 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
5236 esac
5237 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
5238 esac
5239 done
5240
5241 # Always prepend --prefix to ensure using the same prefix
5242 # in subdir configurations.
5243 ac_arg="--prefix=$prefix"
5244 case $ac_arg in
5245 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
5246 esac
5247 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
5248
5249 # Pass --silent
5250 if test "$silent" = yes; then
5251 ac_sub_configure_args="--silent $ac_sub_configure_args"
5252 fi
5253
5254 # Always prepend --disable-option-checking to silence warnings, since
5255 # different subdirs can have different --enable and --with options.
5256 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
5257
5258 ac_popdir=`pwd`
5259 ac_dir=$in_build
5260
5261 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
5262 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
5263 $as_echo "$ac_msg" >&6
5264 as_dir="$ac_dir"; as_fn_mkdir_p
5265
38ea300a
PA
5266 case $srcdir in
5267 [\\/]* | ?:[\\/]* )
5268 ac_srcdir=$srcdir/$in_src ;;
5269 *) # Relative name.
5270 ac_srcdir=../$srcdir/$in_src ;;
5271 esac
c971b7fa
PA
5272
5273 cd "$ac_dir"
5274
5275 ac_sub_configure=$ac_srcdir/configure
5276
5277 # Make the cache file name correct relative to the subdirectory.
5278 case $cache_file in
5279 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
5280 *) # Relative name.
5281 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
5282 esac
5283
648d586d
JB
5284 if test -n "$in_extra_args"; then
5285 # Add the extra args at the end.
5286 ac_sub_configure_args="$ac_sub_configure_args $in_extra_args"
5287 fi
5288
c971b7fa
PA
5289 { $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
5290$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
5291 # The eval makes quoting arguments work.
5292 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
5293 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
5294 as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
5295
5296 cd "$ac_popdir"
783e057b 5297
c971b7fa
PA
5298
5299
5300CONFIG_OBS=
5301CONFIG_DEPS=
5302CONFIG_SRCS=
5303ENABLE_CFLAGS=
5304
5305CONFIG_ALL=
5306CONFIG_CLEAN=
5307CONFIG_INSTALL=
5308CONFIG_UNINSTALL=
5309
5310# If we haven't got the data from the intl directory,
5311# assume NLS is disabled.
5312USE_NLS=no
5313LIBINTL=
5314LIBINTL_DEP=
5315INCINTL=
5316XGETTEXT=
5317GMSGFMT=
5318POSUB=
783e057b
DJ
5319
5320if test -f ../intl/config.intl; then
5321 . ../intl/config.intl
5322fi
81ecdfbb
RW
5323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
5324$as_echo_n "checking whether NLS is requested... " >&6; }
783e057b 5325if test x"$USE_NLS" != xyes; then
81ecdfbb
RW
5326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5327$as_echo "no" >&6; }
783e057b 5328else
81ecdfbb
RW
5329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5330$as_echo "yes" >&6; }
783e057b 5331
81ecdfbb 5332$as_echo "#define ENABLE_NLS 1" >>confdefs.h
783e057b
DJ
5333
5334
81ecdfbb
RW
5335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
5336$as_echo_n "checking for catalogs to be installed... " >&6; }
783e057b
DJ
5337 # Look for .po and .gmo files in the source directory.
5338 CATALOGS=
5339 XLINGUAS=
5340 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
5341 # If there aren't any .gmo files the shell will give us the
5342 # literal string "../path/to/srcdir/po/*.gmo" which has to be
5343 # weeded out.
5344 case "$cat" in *\**)
5345 continue;;
5346 esac
5347 # The quadruple backslash is collapsed to a double backslash
5348 # by the backticks, then collapsed again by the double quotes,
5349 # leaving us with one backslash in the sed expression (right
5350 # before the dot that mustn't act as a wildcard).
c971b7fa
PA
5351 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
5352 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
5353 # The user is allowed to set LINGUAS to a list of languages to
5354 # install catalogs for. If it's empty that means "all of them."
5355 if test "x$LINGUAS" = x; then
5356 CATALOGS="$CATALOGS $cat"
5357 XLINGUAS="$XLINGUAS $lang"
5358 else
5359 case "$LINGUAS" in *$lang*)
5360 CATALOGS="$CATALOGS $cat"
5361 XLINGUAS="$XLINGUAS $lang"
5362 ;;
5363 esac
e28b3332
DJ
5364 fi
5365 done
c971b7fa
PA
5366 LINGUAS="$XLINGUAS"
5367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
5368$as_echo "$LINGUAS" >&6; }
5369
5370
5371 DATADIRNAME=share
5372
5373 INSTOBJEXT=.mo
5374
5375 GENCAT=gencat
5376
5377 CATOBJEXT=.gmo
e28b3332 5378
e28b3332
DJ
5379fi
5380
c971b7fa
PA
5381localedir='${datadir}/locale'
5382
5383
5384if test x"$USE_NLS" = xyes; then
5385 CONFIG_ALL="$CONFIG_ALL all-po"
5386 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
5387 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
5388 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
e28b3332 5389fi
e28b3332 5390
c971b7fa
PA
5391GNULIB=build-gnulib/import
5392
5393# For Makefile dependencies.
5394GNULIB_STDINT_H=
5395if test x"$STDINT_H" != x; then
5396 GNULIB_STDINT_H=$GNULIB/$STDINT_H
e28b3332
DJ
5397fi
5398
5399
c971b7fa
PA
5400PACKAGE=gdb
5401
5402cat >>confdefs.h <<_ACEOF
5403#define PACKAGE "$PACKAGE"
5404_ACEOF
5405
5406
5407
5408# We never need to detect it in this sub-configure.
5409# But preserve it for config.status --recheck.
5410
5411
5412
5413MAKEINFO_EXTRA_FLAGS=""
5414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5
5415$as_echo_n "checking whether $MAKEINFO supports @click... " >&6; }
5416if test "${gdb_cv_have_makeinfo_click+set}" = set; then :
5417 $as_echo_n "(cached) " >&6
5418else
5419 echo '@clicksequence{a @click{} b}' >conftest.texinfo
5420 if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then
5421 gdb_cv_have_makeinfo_click=yes
5422 else
5423 gdb_cv_have_makeinfo_click=no
5424 fi
5425fi
5426{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5
5427$as_echo "$gdb_cv_have_makeinfo_click" >&6; }
5428if test x"$gdb_cv_have_makeinfo_click" = xyes; then
5429 MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK"
5430fi
e28b3332
DJ
5431
5432
bec39cab
AC
5433
5434
81ecdfbb
RW
5435# Check whether --with-separate-debug-dir was given.
5436if test "${with_separate_debug_dir+set}" = set; then :
5437 withval=$with_separate_debug_dir;
b14b1491
TT
5438 DEBUGDIR=$withval
5439else
5440 DEBUGDIR=${libdir}/debug
81ecdfbb
RW
5441fi
5442
20e95c23 5443
783e057b
DJ
5444 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5445 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 5446 ac_define_dir=`eval echo $DEBUGDIR`
783e057b 5447 ac_define_dir=`eval echo $ac_define_dir`
20e95c23 5448
783e057b
DJ
5449cat >>confdefs.h <<_ACEOF
5450#define DEBUGDIR "$ac_define_dir"
20e95c23 5451_ACEOF
20e95c23 5452
20e95c23 5453
20e95c23 5454
0c4a4063 5455
b14b1491
TT
5456 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
5457 if test "x$prefix" = xNONE; then
5458 test_prefix=/usr/local
5459 else
5460 test_prefix=$prefix
5461 fi
783e057b 5462 else
b14b1491 5463 test_prefix=$exec_prefix
783e057b 5464 fi
b14b1491
TT
5465 value=0
5466 case ${ac_define_dir} in
5467 "${test_prefix}"|"${test_prefix}/"*|\
5468 '${exec_prefix}'|'${exec_prefix}/'*)
5469 value=1
5470 ;;
5471 esac
5472
5473cat >>confdefs.h <<_ACEOF
5474#define DEBUGDIR_RELOCATABLE $value
5475_ACEOF
5476
5477
5478
0c4a4063 5479
f83d8a90
DE
5480# We can't pass paths as command line arguments.
5481# Mingw32 tries to be clever and will convert the paths for us.
5482# For example -DBINDIR="/usr/local/bin" passed on the command line may get
5483# converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin".
5484# This breaks GDB's relocatable path conversions since paths passed in
5485# config.h would not get so translated, the path prefixes no longer match.
5486
5487 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5488 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5489 ac_define_dir=`eval echo $bindir`
5490 ac_define_dir=`eval echo $ac_define_dir`
5491
5492cat >>confdefs.h <<_ACEOF
5493#define BINDIR "$ac_define_dir"
5494_ACEOF
5495
5496
5497
b14b1491
TT
5498# GDB's datadir relocation
5499
5500
5501
81ecdfbb
RW
5502# Check whether --with-gdb-datadir was given.
5503if test "${with_gdb_datadir+set}" = set; then :
5504 withval=$with_gdb_datadir;
b14b1491 5505 GDB_DATADIR=$withval
20e95c23 5506else
b14b1491 5507 GDB_DATADIR=${datadir}/gdb
81ecdfbb
RW
5508fi
5509
20e95c23 5510
b14b1491
TT
5511 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5512 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5513 ac_define_dir=`eval echo $GDB_DATADIR`
5514 ac_define_dir=`eval echo $ac_define_dir`
5515
5516cat >>confdefs.h <<_ACEOF
5517#define GDB_DATADIR "$ac_define_dir"
20e95c23
DJ
5518_ACEOF
5519
b14b1491
TT
5520
5521
0c4a4063 5522
b14b1491
TT
5523 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
5524 if test "x$prefix" = xNONE; then
5525 test_prefix=/usr/local
5526 else
5527 test_prefix=$prefix
5528 fi
5529 else
5530 test_prefix=$exec_prefix
5531 fi
5532 value=0
5533 case ${ac_define_dir} in
5534 "${test_prefix}"|"${test_prefix}/"*|\
5535 '${exec_prefix}'|'${exec_prefix}/'*)
5536 value=1
5537 ;;
5538 esac
5539
5540cat >>confdefs.h <<_ACEOF
5541#define GDB_DATADIR_RELOCATABLE $value
5542_ACEOF
5543
5544
783e057b 5545
20e95c23 5546
0c4a4063 5547
81ecdfbb
RW
5548# Check whether --with-relocated-sources was given.
5549if test "${with_relocated_sources+set}" = set; then :
5550 withval=$with_relocated_sources; reloc_srcdir="${withval}"
29b0e8a2
JM
5551
5552 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5553 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5554 ac_define_dir=`eval echo $reloc_srcdir`
5555 ac_define_dir=`eval echo $ac_define_dir`
5556
5557cat >>confdefs.h <<_ACEOF
5558#define RELOC_SRCDIR "$ac_define_dir"
5559_ACEOF
5560
5561
5562
81ecdfbb
RW
5563fi
5564
29b0e8a2 5565
7349ff92
JK
5566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5
5567$as_echo_n "checking for default auto-load directory... " >&6; }
5568
5569# Check whether --with-auto-load-dir was given.
5570if test "${with_auto_load_dir+set}" = set; then :
5571 withval=$with_auto_load_dir;
5572else
1564a261 5573 with_auto_load_dir='$debugdir:$datadir/auto-load'
7349ff92
JK
5574fi
5575
1564a261 5576escape_dir=`echo $with_auto_load_dir | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'`
7349ff92
JK
5577
5578 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5579 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5580 ac_define_dir=`eval echo $escape_dir`
5581 ac_define_dir=`eval echo $ac_define_dir`
5582
5583cat >>confdefs.h <<_ACEOF
5584#define AUTO_LOAD_DIR "$ac_define_dir"
5585_ACEOF
5586
5587
5588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5
5589$as_echo "$with_auto_load_dir" >&6; }
5590
bccbefd2
JK
5591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5
5592$as_echo_n "checking for default auto-load safe-path... " >&6; }
5593
5594# Check whether --with-auto-load-safe-path was given.
5595if test "${with_auto_load_safe_path+set}" = set; then :
5596 withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then
6dea1fbd
JK
5597 with_auto_load_safe_path="/"
5598 fi
bccbefd2 5599else
7349ff92 5600 with_auto_load_safe_path="$with_auto_load_dir"
bccbefd2
JK
5601fi
5602
1564a261 5603escape_dir=`echo $with_auto_load_safe_path | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'`
bccbefd2
JK
5604
5605 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5606 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6dea1fbd 5607 ac_define_dir=`eval echo $escape_dir`
bccbefd2
JK
5608 ac_define_dir=`eval echo $ac_define_dir`
5609
5610cat >>confdefs.h <<_ACEOF
6dea1fbd 5611#define AUTO_LOAD_SAFE_PATH "$ac_define_dir"
bccbefd2
JK
5612_ACEOF
5613
5614
5615{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
5616$as_echo "$with_auto_load_safe_path" >&6; }
5617
29b0e8a2 5618
20e95c23 5619
5ae98d25 5620subdirs="$subdirs testsuite"
20e95c23
DJ
5621
5622
783e057b 5623# Check whether to support alternative target configurations
81ecdfbb
RW
5624# Check whether --enable-targets was given.
5625if test "${enable_targets+set}" = set; then :
5626 enableval=$enable_targets; case "${enableval}" in
5627 yes | "") as_fn_error "enable-targets option must specify target names or 'all'" "$LINENO" 5
783e057b
DJ
5628 ;;
5629 no) enable_targets= ;;
5630 *) enable_targets=$enableval ;;
5631esac
81ecdfbb
RW
5632fi
5633
20e95c23 5634
783e057b 5635# Check whether to enable 64-bit support on 32-bit hosts
81ecdfbb
RW
5636# Check whether --enable-64-bit-bfd was given.
5637if test "${enable_64_bit_bfd+set}" = set; then :
5638 enableval=$enable_64_bit_bfd; case "${enableval}" in
783e057b
DJ
5639 yes) want64=true ;;
5640 no) want64=false ;;
81ecdfbb 5641 *) as_fn_error "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
783e057b
DJ
5642esac
5643else
5644 want64=false
81ecdfbb
RW
5645fi
5646
783e057b
DJ
5647# Provide defaults for some variables set by the per-host and per-target
5648# configuration.
5649gdb_host_obs=posix-hdep.o
20e95c23 5650
783e057b
DJ
5651if test "${target}" = "${host}"; then
5652 gdb_native=yes
5653else
5654 gdb_native=no
5655fi
20e95c23 5656
783e057b 5657. $srcdir/configure.host
20e95c23 5658
fb23d554
SDJ
5659# Add in the common host objects.
5660. $srcdir/common/common.host
5661gdb_host_obs="$gdb_host_obs $common_host_obs"
5662
783e057b 5663# Accumulate some settings from configure.tgt over all enabled targets
20e95c23 5664
783e057b
DJ
5665TARGET_OBS=
5666all_targets=
b292c783 5667HAVE_NATIVE_GCORE_TARGET=
20e95c23 5668
783e057b 5669for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
20e95c23 5670do
783e057b
DJ
5671 if test "$targ_alias" = "all"; then
5672 all_targets=true
5673 else
5674 # Canonicalize the secondary target names.
5675 result=`$ac_config_sub $targ_alias 2>/dev/null`
5676 if test -n "$result"; then
5677 targ=$result
5678 else
5679 targ=$targ_alias
5680 fi
20e95c23 5681
783e057b 5682 . ${srcdir}/configure.tgt
20e95c23 5683
bf307134
JB
5684 if test -z "${gdb_target_obs}"; then :
5685 as_fn_error "configuration ${targ} is unsupported." "$LINENO" 5
5686fi
5687
783e057b
DJ
5688 # Target-specific object files
5689 for i in ${gdb_target_obs}; do
5690 case " $TARGET_OBS " in
5691 *" ${i} "*) ;;
5692 *)
5693 TARGET_OBS="$TARGET_OBS ${i}"
5694 ;;
5695 esac
5696 done
20e95c23 5697
783e057b
DJ
5698 # Check whether this target needs 64-bit CORE_ADDR
5699 if test x${want64} = xfalse; then
5700 . ${srcdir}/../bfd/config.bfd
5701 fi
b292c783
JK
5702
5703 # Check whether this target is native and supports gcore.
5704 if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \
5705 && $gdb_have_gcore; then
5706 HAVE_NATIVE_GCORE_TARGET=1
5707 fi
783e057b 5708 fi
20e95c23
DJ
5709done
5710
783e057b
DJ
5711if test x${all_targets} = xtrue; then
5712
5713 # We want all 64-bit targets if we either:
5714 # - run on a 64-bit host or
5715 # - already require 64-bit support for some other target or
5716 # - the --enable-64-bit-bfd option was supplied
5717 # Otherwise we only support all 32-bit targets.
5718 #
5719 # NOTE: This test must be in sync with the corresponding
5720 # tests in BFD!
20e95c23 5721
783e057b 5722 if test x${want64} = xfalse; then
81ecdfbb
RW
5723 # The cast to long int works around a bug in the HP C Compiler
5724# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5725# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5726# This bug is HP SR number 8606223364.
5727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
5728$as_echo_n "checking size of long... " >&6; }
5729if test "${ac_cv_sizeof_long+set}" = set; then :
5730 $as_echo_n "(cached) " >&6
c0993dbe 5731else
81ecdfbb 5732 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
c0993dbe 5733
81ecdfbb
RW
5734else
5735 if test "$ac_cv_type_long" = yes; then
5736 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5737$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5738{ as_fn_set_status 77
5739as_fn_error "cannot compute sizeof (long)
5740See \`config.log' for more details." "$LINENO" 5; }; }
5741 else
5742 ac_cv_sizeof_long=0
5743 fi
c0993dbe 5744fi
81ecdfbb 5745
c0993dbe 5746fi
81ecdfbb
RW
5747{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
5748$as_echo "$ac_cv_sizeof_long" >&6; }
c0993dbe 5749
c0993dbe 5750
c0993dbe 5751
c0993dbe
UW
5752cat >>confdefs.h <<_ACEOF
5753#define SIZEOF_LONG $ac_cv_sizeof_long
5754_ACEOF
5755
5756
5757 if test "x${ac_cv_sizeof_long}" = "x8"; then
5758 want64=true
5759 fi
5760 fi
5761 if test x${want64} = xtrue; then
5762 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
5763 else
5764 TARGET_OBS='$(ALL_TARGET_OBS)'
5765 fi
5766fi
5767
5768
5769
b292c783 5770
c0993dbe
UW
5771# For other settings, only the main target counts.
5772gdb_sim=
5773gdb_osabi=
5774build_gdbserver=
5775targ=$target; . ${srcdir}/configure.tgt
5776
5777# Fetch the default architecture and default target vector from BFD.
5778targ=$target; . $srcdir/../bfd/config.bfd
5779
5780# We only want the first architecture, so strip off the others if
5781# there is more than one.
5782targ_archs=`echo $targ_archs | sed 's/ .*//'`
5783
5784if test "x$targ_archs" != x; then
5785
5786cat >>confdefs.h <<_ACEOF
5787#define DEFAULT_BFD_ARCH $targ_archs
5788_ACEOF
5789
5790fi
5791if test "x$targ_defvec" != x; then
5792
5793cat >>confdefs.h <<_ACEOF
5794#define DEFAULT_BFD_VEC $targ_defvec
5795_ACEOF
5796
5797fi
5798
c0993dbe
UW
5799# The CLI cannot be disabled yet, but may be in the future.
5800
5801# Enable CLI.
81ecdfbb
RW
5802# Check whether --enable-gdbcli was given.
5803if test "${enable_gdbcli+set}" = set; then :
5804 enableval=$enable_gdbcli; case $enableval in
c0993dbe
UW
5805 yes)
5806 ;;
5807 no)
81ecdfbb 5808 as_fn_error "the command-line interface cannot be disabled yet" "$LINENO" 5 ;;
c0993dbe 5809 *)
81ecdfbb 5810 as_fn_error "bad value $enableval for --enable-gdbcli" "$LINENO" 5 ;;
c0993dbe
UW
5811 esac
5812else
5813 enable_gdbcli=yes
81ecdfbb
RW
5814fi
5815
c0993dbe
UW
5816if test x"$enable_gdbcli" = xyes; then
5817 if test -d $srcdir/cli; then
5818 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
5819 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
5820 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
5821 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
5822 fi
5823fi
5824
5825# Enable MI.
81ecdfbb
RW
5826# Check whether --enable-gdbmi was given.
5827if test "${enable_gdbmi+set}" = set; then :
5828 enableval=$enable_gdbmi; case $enableval in
c0993dbe
UW
5829 yes | no)
5830 ;;
5831 *)
81ecdfbb 5832 as_fn_error "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
c0993dbe
UW
5833 esac
5834else
5835 enable_gdbmi=yes
81ecdfbb
RW
5836fi
5837
c0993dbe
UW
5838if test x"$enable_gdbmi" = xyes; then
5839 if test -d $srcdir/mi; then
5840 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
5841 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
5842 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
5843 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
5844 fi
5845fi
5846
5847# Enable TUI.
81ecdfbb
RW
5848# Check whether --enable-tui was given.
5849if test "${enable_tui+set}" = set; then :
5850 enableval=$enable_tui; case $enableval in
3ca64bd3 5851 yes | no | auto)
c0993dbe
UW
5852 ;;
5853 *)
81ecdfbb 5854 as_fn_error "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
c0993dbe
UW
5855 esac
5856else
3ca64bd3 5857 enable_tui=auto
81ecdfbb
RW
5858fi
5859
c0993dbe
UW
5860
5861# Enable gdbtk.
81ecdfbb
RW
5862# Check whether --enable-gdbtk was given.
5863if test "${enable_gdbtk+set}" = set; then :
5864 enableval=$enable_gdbtk; case $enableval in
c0993dbe
UW
5865 yes | no)
5866 ;;
5867 *)
81ecdfbb 5868 as_fn_error "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
c0993dbe
UW
5869 esac
5870else
5062cc19 5871 if test -d $srcdir/gdbtk; then
c0993dbe
UW
5872 enable_gdbtk=yes
5873 else
5874 enable_gdbtk=no
5875 fi
81ecdfbb
RW
5876fi
5877
c0993dbe
UW
5878# We unconditionally disable gdbtk tests on selected platforms.
5879case $host_os in
5880 go32* | windows*)
81ecdfbb
RW
5881 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
5882$as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
c0993dbe
UW
5883 enable_gdbtk=no ;;
5884esac
5885
05e7c244 5886# Libunwind support for ia64.
bec39cab 5887
05e7c244
JK
5888
5889# Check whether --with-libunwind-ia64 was given.
5890if test "${with_libunwind_ia64+set}" = set; then :
5891 withval=$with_libunwind_ia64;
bec39cab 5892else
05e7c244
JK
5893 with_libunwind_ia64=auto
5894fi
bec39cab 5895
05e7c244
JK
5896
5897# Backward compatibility option.
5898if test "${with_libunwind+set}" = set; then
5899 if test x"$with_libunwind_ia64" != xauto; then
5900 as_fn_error "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5
5901 fi
5902 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5
5903$as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;}
5904 with_libunwind_ia64="$with_libunwind"
5905fi
5906
5907case "$with_libunwind_ia64" in
5908 yes | no)
5909 ;;
5910 auto)
5911 for ac_header in libunwind-ia64.h
81ecdfbb 5912do :
b54a8fd7
PA
5913 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
5914if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
bec39cab 5915 cat >>confdefs.h <<_ACEOF
b54a8fd7 5916#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
5917_ACEOF
5918
5919fi
5920
5921done
5922
05e7c244
JK
5923 with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h
5924 ;;
5925 *)
5926 as_fn_error "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5
5927 ;;
5928esac
bec39cab 5929
05e7c244 5930if test x"$with_libunwind_ia64" = xyes; then
b54a8fd7 5931 for ac_header in libunwind-ia64.h
81ecdfbb 5932do :
b54a8fd7
PA
5933 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
5934if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
bec39cab 5935 cat >>confdefs.h <<_ACEOF
b54a8fd7 5936#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
5937_ACEOF
5938
5939fi
5940
5941done
5942
05e7c244
JK
5943 if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then
5944 as_fn_error "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5
5945 fi
5946 CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o"
5947 CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o"
5948 CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c"
a9322a30
TT
5949fi
5950
cb01cfba
JB
5951opt_curses=no
5952
81ecdfbb
RW
5953# Check whether --with-curses was given.
5954if test "${with_curses+set}" = set; then :
5955 withval=$with_curses; opt_curses=$withval
5956fi
5957
cb01cfba 5958
76a39ba7 5959prefer_curses=no
cb01cfba 5960if test "$opt_curses" = "yes"; then
76a39ba7 5961 prefer_curses=yes
cb01cfba
JB
5962fi
5963
a9322a30 5964# Profiling support.
81ecdfbb
RW
5965# Check whether --enable-profiling was given.
5966if test "${enable_profiling+set}" = set; then :
5967 enableval=$enable_profiling; case $enableval in
a9322a30
TT
5968 yes | no)
5969 ;;
5970 *)
81ecdfbb 5971 as_fn_error "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
a9322a30
TT
5972 esac
5973else
5974 enable_profiling=no
81ecdfbb 5975fi
bec39cab 5976
a9322a30
TT
5977
5978for ac_func in monstartup _mcleanup
81ecdfbb
RW
5979do :
5980 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
5981ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
5982eval as_val=\$$as_ac_var
5983 if test "x$as_val" = x""yes; then :
5984 cat >>confdefs.h <<_ACEOF
5985#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 5986_ACEOF
a9322a30 5987
81ecdfbb
RW
5988fi
5989done
a9322a30 5990
81ecdfbb
RW
5991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
5992$as_echo_n "checking for _etext... " >&6; }
5993if test "${ac_cv_var__etext+set}" = set; then :
5994 $as_echo_n "(cached) " >&6
5995else
5996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5997/* end confdefs.h. */
5998#include <stdlib.h>
5999extern char _etext;
a9322a30
TT
6000
6001int
6002main ()
6003{
6004free (&_etext);
6005 ;
6006 return 0;
6007}
bec39cab 6008_ACEOF
81ecdfbb 6009if ac_fn_c_try_link "$LINENO"; then :
a9322a30 6010 ac_cv_var__etext=yes
bec39cab 6011else
81ecdfbb 6012 ac_cv_var__etext=no
bec39cab 6013fi
81ecdfbb
RW
6014rm -f core conftest.err conftest.$ac_objext \
6015 conftest$ac_exeext conftest.$ac_ext
bec39cab 6016fi
81ecdfbb
RW
6017{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
6018$as_echo "$ac_cv_var__etext" >&6; }
a9322a30 6019if test $ac_cv_var__etext = yes; then
60ca704f 6020
81ecdfbb 6021$as_echo "#define HAVE__ETEXT 1" >>confdefs.h
bec39cab 6022
bec39cab 6023fi
81ecdfbb
RW
6024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
6025$as_echo_n "checking for etext... " >&6; }
6026if test "${ac_cv_var_etext+set}" = set; then :
6027 $as_echo_n "(cached) " >&6
bec39cab 6028else
81ecdfbb 6029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6030/* end confdefs.h. */
a9322a30
TT
6031#include <stdlib.h>
6032extern char etext;
bec39cab
AC
6033
6034int
6035main ()
6036{
a9322a30 6037free (&etext);
bec39cab
AC
6038 ;
6039 return 0;
6040}
6041_ACEOF
81ecdfbb 6042if ac_fn_c_try_link "$LINENO"; then :
a9322a30 6043 ac_cv_var_etext=yes
bec39cab 6044else
81ecdfbb 6045 ac_cv_var_etext=no
bec39cab 6046fi
81ecdfbb
RW
6047rm -f core conftest.err conftest.$ac_objext \
6048 conftest$ac_exeext conftest.$ac_ext
bec39cab 6049fi
81ecdfbb
RW
6050{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
6051$as_echo "$ac_cv_var_etext" >&6; }
a9322a30
TT
6052if test $ac_cv_var_etext = yes; then
6053
81ecdfbb 6054$as_echo "#define HAVE_ETEXT 1" >>confdefs.h
bec39cab
AC
6055
6056fi
a9322a30
TT
6057if test "$enable_profiling" = yes ; then
6058 if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
81ecdfbb 6059 as_fn_error "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
a9322a30
TT
6060 fi
6061 PROFILE_CFLAGS=-pg
6062 OLD_CFLAGS="$CFLAGS"
6063 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
bec39cab 6064
81ecdfbb
RW
6065 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
6066$as_echo_n "checking whether $CC supports -pg... " >&6; }
6067if test "${ac_cv_cc_supports_pg+set}" = set; then :
6068 $as_echo_n "(cached) " >&6
bec39cab 6069else
81ecdfbb 6070 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6071/* end confdefs.h. */
bec39cab
AC
6072
6073int
6074main ()
6075{
a9322a30 6076int x;
bec39cab
AC
6077 ;
6078 return 0;
6079}
6080_ACEOF
81ecdfbb 6081if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 6082 ac_cv_cc_supports_pg=yes
bec39cab 6083else
81ecdfbb 6084 ac_cv_cc_supports_pg=no
bec39cab 6085fi
81ecdfbb 6086rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 6087fi
81ecdfbb
RW
6088{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
6089$as_echo "$ac_cv_cc_supports_pg" >&6; }
bec39cab 6090
a9322a30 6091 if test $ac_cv_cc_supports_pg = no; then
81ecdfbb 6092 as_fn_error "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
a9322a30 6093 fi
bec39cab 6094
a9322a30 6095 CFLAGS="$OLD_CFLAGS"
bec39cab
AC
6096fi
6097
c16158bc
JM
6098
6099
81ecdfbb
RW
6100# Check whether --with-pkgversion was given.
6101if test "${with_pkgversion+set}" = set; then :
6102 withval=$with_pkgversion; case "$withval" in
6103 yes) as_fn_error "package version not specified" "$LINENO" 5 ;;
c16158bc
JM
6104 no) PKGVERSION= ;;
6105 *) PKGVERSION="($withval) " ;;
6106 esac
6107else
6108 PKGVERSION="(GDB) "
6109
81ecdfbb 6110fi
c16158bc
JM
6111
6112
6113
6114
81ecdfbb
RW
6115
6116# Check whether --with-bugurl was given.
6117if test "${with_bugurl+set}" = set; then :
6118 withval=$with_bugurl; case "$withval" in
6119 yes) as_fn_error "bug URL not specified" "$LINENO" 5 ;;
c16158bc
JM
6120 no) BUGURL=
6121 ;;
6122 *) BUGURL="$withval"
6123 ;;
6124 esac
6125else
6126 BUGURL="http://www.gnu.org/software/gdb/bugs/"
6127
81ecdfbb
RW
6128fi
6129
c16158bc
JM
6130 case ${BUGURL} in
6131 "")
6132 REPORT_BUGS_TO=
6133 REPORT_BUGS_TEXI=
6134 ;;
6135 *)
6136 REPORT_BUGS_TO="<$BUGURL>"
6137 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
6138 ;;
6139 esac;
6140
6141
6142
6143
6144cat >>confdefs.h <<_ACEOF
6145#define PKGVERSION "$PKGVERSION"
6146_ACEOF
6147
6148
6149cat >>confdefs.h <<_ACEOF
6150#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
6151_ACEOF
6152
6153
bec39cab
AC
6154# --------------------- #
6155# Checks for programs. #
6156# --------------------- #
6157
6158for ac_prog in gawk mawk nawk awk
6159do
6160 # Extract the first word of "$ac_prog", so it can be a program name with args.
6161set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
6162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6163$as_echo_n "checking for $ac_word... " >&6; }
6164if test "${ac_cv_prog_AWK+set}" = set; then :
6165 $as_echo_n "(cached) " >&6
bec39cab
AC
6166else
6167 if test -n "$AWK"; then
6168 ac_cv_prog_AWK="$AWK" # Let the user override the test.
6169else
6170as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6171for as_dir in $PATH
6172do
6173 IFS=$as_save_IFS
6174 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6175 for ac_exec_ext in '' $ac_executable_extensions; do
6176 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6177 ac_cv_prog_AWK="$ac_prog"
81ecdfbb 6178 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6179 break 2
6180 fi
6181done
81ecdfbb
RW
6182 done
6183IFS=$as_save_IFS
bec39cab
AC
6184
6185fi
6186fi
6187AWK=$ac_cv_prog_AWK
6188if test -n "$AWK"; then
81ecdfbb
RW
6189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
6190$as_echo "$AWK" >&6; }
bec39cab 6191else
81ecdfbb
RW
6192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6193$as_echo "no" >&6; }
bec39cab
AC
6194fi
6195
bec39cab 6196
81ecdfbb 6197 test -n "$AWK" && break
bec39cab
AC
6198done
6199
c971b7fa
PA
6200# Find a good install program. We prefer a C program (faster),
6201# so one script is as good as another. But avoid the broken or
6202# incompatible versions:
6203# SysV /etc/install, /usr/sbin/install
6204# SunOS /usr/etc/install
6205# IRIX /sbin/install
6206# AIX /bin/install
6207# AmigaOS /C/install, which installs bootblocks on floppy discs
6208# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6209# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6210# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6211# OS/2's system install, which has a completely different semantic
6212# ./install, which can be erroneously created by make from ./install.sh.
6213# Reject install programs that cannot install multiple files.
6214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6215$as_echo_n "checking for a BSD-compatible install... " >&6; }
6216if test -z "$INSTALL"; then
6217if test "${ac_cv_path_install+set}" = set; then :
6218 $as_echo_n "(cached) " >&6
6219else
6220 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6221for as_dir in $PATH
6222do
6223 IFS=$as_save_IFS
6224 test -z "$as_dir" && as_dir=.
6225 # Account for people who put trailing slashes in PATH elements.
6226case $as_dir/ in #((
6227 ./ | .// | /[cC]/* | \
6228 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
6229 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
6230 /usr/ucb/* ) ;;
6231 *)
6232 # OSF1 and SCO ODT 3.0 have their own names for install.
6233 # Don't use installbsd from OSF since it installs stuff as root
6234 # by default.
6235 for ac_prog in ginstall scoinst install; do
6236 for ac_exec_ext in '' $ac_executable_extensions; do
6237 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
6238 if test $ac_prog = install &&
6239 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6240 # AIX install. It has an incompatible calling convention.
6241 :
6242 elif test $ac_prog = install &&
6243 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6244 # program-specific install script used by HP pwplus--don't use.
6245 :
6246 else
6247 rm -rf conftest.one conftest.two conftest.dir
6248 echo one > conftest.one
6249 echo two > conftest.two
6250 mkdir conftest.dir
6251 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6252 test -s conftest.one && test -s conftest.two &&
6253 test -s conftest.dir/conftest.one &&
6254 test -s conftest.dir/conftest.two
6255 then
6256 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6257 break 3
6258 fi
6259 fi
6260 fi
6261 done
6262 done
6263 ;;
6264esac
6265
6266 done
6267IFS=$as_save_IFS
6268
6269rm -rf conftest.one conftest.two conftest.dir
6270
6271fi
6272 if test "${ac_cv_path_install+set}" = set; then
6273 INSTALL=$ac_cv_path_install
6274 else
6275 # As a last resort, use the slow shell script. Don't cache a
6276 # value for INSTALL within a source directory, because that will
6277 # break other packages using the cache if that directory is
6278 # removed, or if the value is a relative name.
6279 INSTALL=$ac_install_sh
6280 fi
6281fi
6282{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6283$as_echo "$INSTALL" >&6; }
6284
6285# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6286# It thinks the first close brace ends the variable substitution.
6287test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6288
6289test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6290
6291test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
bec39cab 6292
81ecdfbb
RW
6293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
6294$as_echo_n "checking whether ln -s works... " >&6; }
bec39cab
AC
6295LN_S=$as_ln_s
6296if test "$LN_S" = "ln -s"; then
81ecdfbb
RW
6297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6298$as_echo "yes" >&6; }
bec39cab 6299else
81ecdfbb
RW
6300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
6301$as_echo "no, using $LN_S" >&6; }
bec39cab
AC
6302fi
6303
6304if test -n "$ac_tool_prefix"; then
6305 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6306set dummy ${ac_tool_prefix}ranlib; ac_word=$2
81ecdfbb
RW
6307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6308$as_echo_n "checking for $ac_word... " >&6; }
6309if test "${ac_cv_prog_RANLIB+set}" = set; then :
6310 $as_echo_n "(cached) " >&6
bec39cab
AC
6311else
6312 if test -n "$RANLIB"; then
6313 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6314else
6315as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6316for as_dir in $PATH
6317do
6318 IFS=$as_save_IFS
6319 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6320 for ac_exec_ext in '' $ac_executable_extensions; do
6321 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6322 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
81ecdfbb 6323 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6324 break 2
6325 fi
6326done
81ecdfbb
RW
6327 done
6328IFS=$as_save_IFS
bec39cab
AC
6329
6330fi
6331fi
6332RANLIB=$ac_cv_prog_RANLIB
6333if test -n "$RANLIB"; then
81ecdfbb
RW
6334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6335$as_echo "$RANLIB" >&6; }
bec39cab 6336else
81ecdfbb
RW
6337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6338$as_echo "no" >&6; }
bec39cab
AC
6339fi
6340
81ecdfbb 6341
bec39cab
AC
6342fi
6343if test -z "$ac_cv_prog_RANLIB"; then
6344 ac_ct_RANLIB=$RANLIB
6345 # Extract the first word of "ranlib", so it can be a program name with args.
6346set dummy ranlib; ac_word=$2
81ecdfbb
RW
6347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6348$as_echo_n "checking for $ac_word... " >&6; }
6349if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
6350 $as_echo_n "(cached) " >&6
bec39cab
AC
6351else
6352 if test -n "$ac_ct_RANLIB"; then
6353 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6354else
6355as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6356for as_dir in $PATH
6357do
6358 IFS=$as_save_IFS
6359 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6360 for ac_exec_ext in '' $ac_executable_extensions; do
6361 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6362 ac_cv_prog_ac_ct_RANLIB="ranlib"
81ecdfbb 6363 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6364 break 2
6365 fi
6366done
81ecdfbb
RW
6367 done
6368IFS=$as_save_IFS
bec39cab 6369
bec39cab
AC
6370fi
6371fi
6372ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6373if test -n "$ac_ct_RANLIB"; then
81ecdfbb
RW
6374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6375$as_echo "$ac_ct_RANLIB" >&6; }
bec39cab 6376else
81ecdfbb
RW
6377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6378$as_echo "no" >&6; }
bec39cab
AC
6379fi
6380
81ecdfbb
RW
6381 if test "x$ac_ct_RANLIB" = x; then
6382 RANLIB=":"
6383 else
6384 case $cross_compiling:$ac_tool_warned in
6385yes:)
6386{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6387$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6388ac_tool_warned=yes ;;
6389esac
6390 RANLIB=$ac_ct_RANLIB
6391 fi
bec39cab
AC
6392else
6393 RANLIB="$ac_cv_prog_RANLIB"
6394fi
6395
6396for ac_prog in 'bison -y' byacc
6397do
6398 # Extract the first word of "$ac_prog", so it can be a program name with args.
6399set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
6400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6401$as_echo_n "checking for $ac_word... " >&6; }
6402if test "${ac_cv_prog_YACC+set}" = set; then :
6403 $as_echo_n "(cached) " >&6
bec39cab
AC
6404else
6405 if test -n "$YACC"; then
6406 ac_cv_prog_YACC="$YACC" # Let the user override the test.
6407else
6408as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6409for as_dir in $PATH
6410do
6411 IFS=$as_save_IFS
6412 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6413 for ac_exec_ext in '' $ac_executable_extensions; do
6414 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6415 ac_cv_prog_YACC="$ac_prog"
81ecdfbb 6416 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6417 break 2
6418 fi
6419done
81ecdfbb
RW
6420 done
6421IFS=$as_save_IFS
bec39cab
AC
6422
6423fi
6424fi
6425YACC=$ac_cv_prog_YACC
6426if test -n "$YACC"; then
81ecdfbb
RW
6427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
6428$as_echo "$YACC" >&6; }
bec39cab 6429else
81ecdfbb
RW
6430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6431$as_echo "no" >&6; }
bec39cab
AC
6432fi
6433
81ecdfbb 6434
bec39cab
AC
6435 test -n "$YACC" && break
6436done
6437test -n "$YACC" || YACC="yacc"
6438
6439
6440if test -n "$ac_tool_prefix"; then
6441 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6442set dummy ${ac_tool_prefix}ar; ac_word=$2
81ecdfbb
RW
6443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6444$as_echo_n "checking for $ac_word... " >&6; }
6445if test "${ac_cv_prog_AR+set}" = set; then :
6446 $as_echo_n "(cached) " >&6
bec39cab
AC
6447else
6448 if test -n "$AR"; then
6449 ac_cv_prog_AR="$AR" # Let the user override the test.
6450else
6451as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6452for as_dir in $PATH
6453do
6454 IFS=$as_save_IFS
6455 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6456 for ac_exec_ext in '' $ac_executable_extensions; do
6457 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6458 ac_cv_prog_AR="${ac_tool_prefix}ar"
81ecdfbb 6459 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6460 break 2
6461 fi
6462done
81ecdfbb
RW
6463 done
6464IFS=$as_save_IFS
bec39cab
AC
6465
6466fi
6467fi
6468AR=$ac_cv_prog_AR
6469if test -n "$AR"; then
81ecdfbb
RW
6470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6471$as_echo "$AR" >&6; }
bec39cab 6472else
81ecdfbb
RW
6473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6474$as_echo "no" >&6; }
bec39cab
AC
6475fi
6476
81ecdfbb 6477
bec39cab
AC
6478fi
6479if test -z "$ac_cv_prog_AR"; then
6480 ac_ct_AR=$AR
6481 # Extract the first word of "ar", so it can be a program name with args.
6482set dummy ar; ac_word=$2
81ecdfbb
RW
6483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6484$as_echo_n "checking for $ac_word... " >&6; }
6485if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
6486 $as_echo_n "(cached) " >&6
bec39cab
AC
6487else
6488 if test -n "$ac_ct_AR"; then
6489 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6490else
6491as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6492for as_dir in $PATH
6493do
6494 IFS=$as_save_IFS
6495 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6496 for ac_exec_ext in '' $ac_executable_extensions; do
6497 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6498 ac_cv_prog_ac_ct_AR="ar"
81ecdfbb 6499 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6500 break 2
6501 fi
6502done
81ecdfbb
RW
6503 done
6504IFS=$as_save_IFS
bec39cab
AC
6505
6506fi
6507fi
6508ac_ct_AR=$ac_cv_prog_ac_ct_AR
6509if test -n "$ac_ct_AR"; then
81ecdfbb
RW
6510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6511$as_echo "$ac_ct_AR" >&6; }
bec39cab 6512else
81ecdfbb
RW
6513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6514$as_echo "no" >&6; }
bec39cab
AC
6515fi
6516
81ecdfbb
RW
6517 if test "x$ac_ct_AR" = x; then
6518 AR=""
6519 else
6520 case $cross_compiling:$ac_tool_warned in
6521yes:)
6522{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6523$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6524ac_tool_warned=yes ;;
6525esac
6526 AR=$ac_ct_AR
6527 fi
bec39cab
AC
6528else
6529 AR="$ac_cv_prog_AR"
6530fi
6531
6532if test -n "$ac_tool_prefix"; then
6533 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
6534set dummy ${ac_tool_prefix}dlltool; ac_word=$2
81ecdfbb
RW
6535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6536$as_echo_n "checking for $ac_word... " >&6; }
6537if test "${ac_cv_prog_DLLTOOL+set}" = set; then :
6538 $as_echo_n "(cached) " >&6
bec39cab
AC
6539else
6540 if test -n "$DLLTOOL"; then
6541 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
6542else
6543as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6544for as_dir in $PATH
6545do
6546 IFS=$as_save_IFS
6547 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6548 for ac_exec_ext in '' $ac_executable_extensions; do
6549 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6550 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
81ecdfbb 6551 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6552 break 2
6553 fi
6554done
81ecdfbb
RW
6555 done
6556IFS=$as_save_IFS
bec39cab
AC
6557
6558fi
6559fi
6560DLLTOOL=$ac_cv_prog_DLLTOOL
6561if test -n "$DLLTOOL"; then
81ecdfbb
RW
6562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
6563$as_echo "$DLLTOOL" >&6; }
bec39cab 6564else
81ecdfbb
RW
6565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6566$as_echo "no" >&6; }
bec39cab
AC
6567fi
6568
81ecdfbb 6569
bec39cab
AC
6570fi
6571if test -z "$ac_cv_prog_DLLTOOL"; then
6572 ac_ct_DLLTOOL=$DLLTOOL
6573 # Extract the first word of "dlltool", so it can be a program name with args.
6574set dummy dlltool; ac_word=$2
81ecdfbb
RW
6575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6576$as_echo_n "checking for $ac_word... " >&6; }
6577if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then :
6578 $as_echo_n "(cached) " >&6
bec39cab
AC
6579else
6580 if test -n "$ac_ct_DLLTOOL"; then
6581 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
6582else
6583as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6584for as_dir in $PATH
6585do
6586 IFS=$as_save_IFS
6587 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6588 for ac_exec_ext in '' $ac_executable_extensions; do
6589 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6590 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
81ecdfbb 6591 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6592 break 2
6593 fi
6594done
81ecdfbb
RW
6595 done
6596IFS=$as_save_IFS
bec39cab
AC
6597
6598fi
6599fi
6600ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
6601if test -n "$ac_ct_DLLTOOL"; then
81ecdfbb
RW
6602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
6603$as_echo "$ac_ct_DLLTOOL" >&6; }
bec39cab 6604else
81ecdfbb
RW
6605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6606$as_echo "no" >&6; }
bec39cab
AC
6607fi
6608
81ecdfbb
RW
6609 if test "x$ac_ct_DLLTOOL" = x; then
6610 DLLTOOL=""
6611 else
6612 case $cross_compiling:$ac_tool_warned in
6613yes:)
6614{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6615$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6616ac_tool_warned=yes ;;
6617esac
6618 DLLTOOL=$ac_ct_DLLTOOL
6619 fi
bec39cab
AC
6620else
6621 DLLTOOL="$ac_cv_prog_DLLTOOL"
6622fi
6623
6624if test -n "$ac_tool_prefix"; then
6625 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
6626set dummy ${ac_tool_prefix}windres; ac_word=$2
81ecdfbb
RW
6627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6628$as_echo_n "checking for $ac_word... " >&6; }
6629if test "${ac_cv_prog_WINDRES+set}" = set; then :
6630 $as_echo_n "(cached) " >&6
bec39cab
AC
6631else
6632 if test -n "$WINDRES"; then
6633 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
6634else
6635as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6636for as_dir in $PATH
6637do
6638 IFS=$as_save_IFS
6639 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6640 for ac_exec_ext in '' $ac_executable_extensions; do
6641 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6642 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
81ecdfbb 6643 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6644 break 2
6645 fi
6646done
81ecdfbb
RW
6647 done
6648IFS=$as_save_IFS
bec39cab
AC
6649
6650fi
6651fi
6652WINDRES=$ac_cv_prog_WINDRES
6653if test -n "$WINDRES"; then
81ecdfbb
RW
6654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
6655$as_echo "$WINDRES" >&6; }
bec39cab 6656else
81ecdfbb
RW
6657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6658$as_echo "no" >&6; }
bec39cab
AC
6659fi
6660
81ecdfbb 6661
bec39cab
AC
6662fi
6663if test -z "$ac_cv_prog_WINDRES"; then
6664 ac_ct_WINDRES=$WINDRES
6665 # Extract the first word of "windres", so it can be a program name with args.
6666set dummy windres; ac_word=$2
81ecdfbb
RW
6667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6668$as_echo_n "checking for $ac_word... " >&6; }
6669if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then :
6670 $as_echo_n "(cached) " >&6
bec39cab
AC
6671else
6672 if test -n "$ac_ct_WINDRES"; then
6673 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
6674else
6675as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6676for as_dir in $PATH
6677do
6678 IFS=$as_save_IFS
6679 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6680 for ac_exec_ext in '' $ac_executable_extensions; do
6681 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6682 ac_cv_prog_ac_ct_WINDRES="windres"
81ecdfbb 6683 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6684 break 2
6685 fi
6686done
81ecdfbb
RW
6687 done
6688IFS=$as_save_IFS
bec39cab
AC
6689
6690fi
6691fi
6692ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
6693if test -n "$ac_ct_WINDRES"; then
81ecdfbb
RW
6694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
6695$as_echo "$ac_ct_WINDRES" >&6; }
bec39cab 6696else
81ecdfbb
RW
6697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6698$as_echo "no" >&6; }
c906108c 6699fi
bec39cab 6700
81ecdfbb
RW
6701 if test "x$ac_ct_WINDRES" = x; then
6702 WINDRES=""
6703 else
6704 case $cross_compiling:$ac_tool_warned in
6705yes:)
6706{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6707$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6708ac_tool_warned=yes ;;
6709esac
6710 WINDRES=$ac_ct_WINDRES
6711 fi
c906108c 6712else
bec39cab 6713 WINDRES="$ac_cv_prog_WINDRES"
c906108c
SS
6714fi
6715
bec39cab 6716
036c3acb
TS
6717case $host_os in
6718 gnu*)
6719 # Needed for GNU Hurd hosts.
6720 if test -n "$ac_tool_prefix"; then
bec39cab
AC
6721 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
6722set dummy ${ac_tool_prefix}mig; ac_word=$2
81ecdfbb
RW
6723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6724$as_echo_n "checking for $ac_word... " >&6; }
6725if test "${ac_cv_prog_MIG+set}" = set; then :
6726 $as_echo_n "(cached) " >&6
c906108c 6727else
bec39cab
AC
6728 if test -n "$MIG"; then
6729 ac_cv_prog_MIG="$MIG" # Let the user override the test.
6730else
6731as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6732for as_dir in $PATH
6733do
6734 IFS=$as_save_IFS
6735 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6736 for ac_exec_ext in '' $ac_executable_extensions; do
6737 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6738 ac_cv_prog_MIG="${ac_tool_prefix}mig"
81ecdfbb 6739 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6740 break 2
6741 fi
6742done
81ecdfbb
RW
6743 done
6744IFS=$as_save_IFS
bec39cab 6745
c906108c 6746fi
bec39cab
AC
6747fi
6748MIG=$ac_cv_prog_MIG
6749if test -n "$MIG"; then
81ecdfbb
RW
6750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
6751$as_echo "$MIG" >&6; }
c906108c 6752else
81ecdfbb
RW
6753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6754$as_echo "no" >&6; }
c906108c
SS
6755fi
6756
81ecdfbb 6757
bec39cab
AC
6758fi
6759if test -z "$ac_cv_prog_MIG"; then
6760 ac_ct_MIG=$MIG
6761 # Extract the first word of "mig", so it can be a program name with args.
6762set dummy mig; ac_word=$2
81ecdfbb
RW
6763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6764$as_echo_n "checking for $ac_word... " >&6; }
6765if test "${ac_cv_prog_ac_ct_MIG+set}" = set; then :
6766 $as_echo_n "(cached) " >&6
bec39cab
AC
6767else
6768 if test -n "$ac_ct_MIG"; then
6769 ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
6770else
6771as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6772for as_dir in $PATH
6773do
6774 IFS=$as_save_IFS
6775 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6776 for ac_exec_ext in '' $ac_executable_extensions; do
6777 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6778 ac_cv_prog_ac_ct_MIG="mig"
81ecdfbb 6779 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6780 break 2
6781 fi
6782done
81ecdfbb
RW
6783 done
6784IFS=$as_save_IFS
c906108c 6785
bec39cab
AC
6786fi
6787fi
6788ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
6789if test -n "$ac_ct_MIG"; then
81ecdfbb
RW
6790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
6791$as_echo "$ac_ct_MIG" >&6; }
bec39cab 6792else
81ecdfbb
RW
6793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6794$as_echo "no" >&6; }
bec39cab 6795fi
c906108c 6796
81ecdfbb
RW
6797 if test "x$ac_ct_MIG" = x; then
6798 MIG=""
6799 else
6800 case $cross_compiling:$ac_tool_warned in
6801yes:)
6802{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6803$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6804ac_tool_warned=yes ;;
6805esac
6806 MIG=$ac_ct_MIG
6807 fi
bec39cab
AC
6808else
6809 MIG="$ac_cv_prog_MIG"
6810fi
c906108c 6811
036c3acb
TS
6812 if test x"$MIG" = x; then
6813 as_fn_error "MIG not found but required for $host hosts" "$LINENO" 5
6814 fi
6815 ;;
6816esac
c906108c 6817
bec39cab
AC
6818# ---------------------- #
6819# Checks for libraries. #
6820# ---------------------- #
c906108c 6821
bec39cab 6822# We might need to link with -lm; most simulators need it.
81ecdfbb
RW
6823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
6824$as_echo_n "checking for main in -lm... " >&6; }
6825if test "${ac_cv_lib_m_main+set}" = set; then :
6826 $as_echo_n "(cached) " >&6
bec39cab
AC
6827else
6828 ac_check_lib_save_LIBS=$LIBS
6829LIBS="-lm $LIBS"
81ecdfbb 6830cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6831/* end confdefs.h. */
c906108c 6832
c906108c 6833
bec39cab
AC
6834int
6835main ()
6836{
81ecdfbb 6837return main ();
bec39cab
AC
6838 ;
6839 return 0;
6840}
6841_ACEOF
81ecdfbb 6842if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
6843 ac_cv_lib_m_main=yes
6844else
81ecdfbb 6845 ac_cv_lib_m_main=no
bec39cab 6846fi
81ecdfbb
RW
6847rm -f core conftest.err conftest.$ac_objext \
6848 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
6849LIBS=$ac_check_lib_save_LIBS
6850fi
81ecdfbb
RW
6851{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
6852$as_echo "$ac_cv_lib_m_main" >&6; }
6853if test "x$ac_cv_lib_m_main" = x""yes; then :
bec39cab
AC
6854 cat >>confdefs.h <<_ACEOF
6855#define HAVE_LIBM 1
6856_ACEOF
6857
6858 LIBS="-lm $LIBS"
c906108c 6859
c906108c 6860fi
bec39cab
AC
6861
6862
6863# We need to link with -lw to get `wctype' on Solaris before Solaris
6864# 2.6. Solaris 2.6 and beyond have this function in libc, and have a
6865# libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
6866# is known to have this problem). Therefore we avoid libw if we can.
81ecdfbb
RW
6867ac_fn_c_check_func "$LINENO" "wctype" "ac_cv_func_wctype"
6868if test "x$ac_cv_func_wctype" = x""yes; then :
bec39cab 6869
c906108c 6870else
81ecdfbb
RW
6871 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype in -lw" >&5
6872$as_echo_n "checking for wctype in -lw... " >&6; }
6873if test "${ac_cv_lib_w_wctype+set}" = set; then :
6874 $as_echo_n "(cached) " >&6
bec39cab
AC
6875else
6876 ac_check_lib_save_LIBS=$LIBS
6877LIBS="-lw $LIBS"
81ecdfbb 6878cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6879/* end confdefs.h. */
c906108c 6880
81ecdfbb
RW
6881/* Override any GCC internal prototype to avoid an error.
6882 Use char because int might match the return type of a GCC
6883 builtin and then its argument prototype would still apply. */
bec39cab
AC
6884#ifdef __cplusplus
6885extern "C"
6886#endif
bec39cab
AC
6887char wctype ();
6888int
6889main ()
6890{
81ecdfbb 6891return wctype ();
bec39cab
AC
6892 ;
6893 return 0;
6894}
6895_ACEOF
81ecdfbb 6896if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
6897 ac_cv_lib_w_wctype=yes
6898else
81ecdfbb 6899 ac_cv_lib_w_wctype=no
bec39cab 6900fi
81ecdfbb
RW
6901rm -f core conftest.err conftest.$ac_objext \
6902 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
6903LIBS=$ac_check_lib_save_LIBS
6904fi
81ecdfbb
RW
6905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_w_wctype" >&5
6906$as_echo "$ac_cv_lib_w_wctype" >&6; }
6907if test "x$ac_cv_lib_w_wctype" = x""yes; then :
bec39cab
AC
6908 cat >>confdefs.h <<_ACEOF
6909#define HAVE_LIBW 1
6910_ACEOF
c906108c 6911
bec39cab 6912 LIBS="-lw $LIBS"
c906108c 6913
bec39cab 6914fi
c906108c 6915
bec39cab 6916fi
c906108c 6917
ddc9cd0f 6918
bec39cab 6919# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
81ecdfbb
RW
6920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
6921$as_echo_n "checking for library containing gethostbyname... " >&6; }
6922if test "${ac_cv_search_gethostbyname+set}" = set; then :
6923 $as_echo_n "(cached) " >&6
bec39cab
AC
6924else
6925 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6926cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6927/* end confdefs.h. */
ddc9cd0f 6928
81ecdfbb
RW
6929/* Override any GCC internal prototype to avoid an error.
6930 Use char because int might match the return type of a GCC
6931 builtin and then its argument prototype would still apply. */
bec39cab
AC
6932#ifdef __cplusplus
6933extern "C"
6934#endif
bec39cab
AC
6935char gethostbyname ();
6936int
6937main ()
6938{
81ecdfbb 6939return gethostbyname ();
bec39cab
AC
6940 ;
6941 return 0;
6942}
6943_ACEOF
81ecdfbb
RW
6944for ac_lib in '' nsl; do
6945 if test -z "$ac_lib"; then
6946 ac_res="none required"
6947 else
6948 ac_res=-l$ac_lib
b4e70030 6949 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
6950 fi
6951 if ac_fn_c_try_link "$LINENO"; then :
6952 ac_cv_search_gethostbyname=$ac_res
6953fi
6954rm -f core conftest.err conftest.$ac_objext \
6955 conftest$ac_exeext
6956 if test "${ac_cv_search_gethostbyname+set}" = set; then :
6957 break
6958fi
6959done
6960if test "${ac_cv_search_gethostbyname+set}" = set; then :
ddc9cd0f 6961
bec39cab 6962else
81ecdfbb 6963 ac_cv_search_gethostbyname=no
bec39cab 6964fi
81ecdfbb 6965rm conftest.$ac_ext
bec39cab
AC
6966LIBS=$ac_func_search_save_LIBS
6967fi
81ecdfbb
RW
6968{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
6969$as_echo "$ac_cv_search_gethostbyname" >&6; }
6970ac_res=$ac_cv_search_gethostbyname
6971if test "$ac_res" != no; then :
6972 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
96baa820 6973
bec39cab 6974fi
96baa820 6975
c906108c 6976
b4e70030 6977# Some systems (e.g. Solaris) have `socketpair' in libsocket.
81ecdfbb
RW
6978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
6979$as_echo_n "checking for library containing socketpair... " >&6; }
6980if test "${ac_cv_search_socketpair+set}" = set; then :
6981 $as_echo_n "(cached) " >&6
b4e70030
JB
6982else
6983 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6984cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
6985/* end confdefs.h. */
6986
81ecdfbb
RW
6987/* Override any GCC internal prototype to avoid an error.
6988 Use char because int might match the return type of a GCC
6989 builtin and then its argument prototype would still apply. */
b4e70030
JB
6990#ifdef __cplusplus
6991extern "C"
6992#endif
b4e70030
JB
6993char socketpair ();
6994int
6995main ()
6996{
81ecdfbb 6997return socketpair ();
b4e70030
JB
6998 ;
6999 return 0;
7000}
7001_ACEOF
81ecdfbb
RW
7002for ac_lib in '' socket; do
7003 if test -z "$ac_lib"; then
7004 ac_res="none required"
7005 else
7006 ac_res=-l$ac_lib
b4e70030 7007 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
7008 fi
7009 if ac_fn_c_try_link "$LINENO"; then :
7010 ac_cv_search_socketpair=$ac_res
7011fi
7012rm -f core conftest.err conftest.$ac_objext \
7013 conftest$ac_exeext
7014 if test "${ac_cv_search_socketpair+set}" = set; then :
7015 break
7016fi
7017done
7018if test "${ac_cv_search_socketpair+set}" = set; then :
b4e70030 7019
b4e70030 7020else
81ecdfbb 7021 ac_cv_search_socketpair=no
b4e70030 7022fi
81ecdfbb 7023rm conftest.$ac_ext
b4e70030
JB
7024LIBS=$ac_func_search_save_LIBS
7025fi
81ecdfbb
RW
7026{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
7027$as_echo "$ac_cv_search_socketpair" >&6; }
7028ac_res=$ac_cv_search_socketpair
7029if test "$ac_res" != no; then :
7030 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
b4e70030
JB
7031
7032fi
7033
7034
233a11ab 7035# Link in zlib if we can. This allows us to read compressed debug sections.
b040ad30 7036
711a72d3 7037 # Use the system's zlib library.
39f3de7c
L
7038 zlibdir="-L\$(top_builddir)/../zlib"
7039 zlibinc="-I\$(top_srcdir)/../zlib"
b040ad30 7040
711a72d3
L
7041# Check whether --with-system-zlib was given.
7042if test "${with_system_zlib+set}" = set; then :
afa59b79
L
7043 withval=$with_system_zlib; if test x$with_system_zlib = xyes ; then
7044 zlibdir=
7045 zlibinc=
7046 fi
b040ad30 7047
233a11ab 7048fi
233a11ab 7049
233a11ab 7050
233a11ab 7051
b040ad30 7052
233a11ab 7053
25268153 7054# On FreeBSD we may need libutil for kinfo_getvmmap (used by fbsd-nat.c).
37773e78 7055# On GNU/kFreeBSD systems, FreeBSD libutil is renamed to libutil-freebsd.
25268153
JB
7056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getvmmap" >&5
7057$as_echo_n "checking for library containing kinfo_getvmmap... " >&6; }
7058if test "${ac_cv_search_kinfo_getvmmap+set}" = set; then :
7059 $as_echo_n "(cached) " >&6
7060else
7061 ac_func_search_save_LIBS=$LIBS
7062cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7063/* end confdefs.h. */
7064
7065/* Override any GCC internal prototype to avoid an error.
7066 Use char because int might match the return type of a GCC
7067 builtin and then its argument prototype would still apply. */
7068#ifdef __cplusplus
7069extern "C"
7070#endif
7071char kinfo_getvmmap ();
7072int
7073main ()
7074{
7075return kinfo_getvmmap ();
7076 ;
7077 return 0;
7078}
7079_ACEOF
37773e78 7080for ac_lib in '' util util-freebsd; do
25268153
JB
7081 if test -z "$ac_lib"; then
7082 ac_res="none required"
7083 else
7084 ac_res=-l$ac_lib
7085 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7086 fi
7087 if ac_fn_c_try_link "$LINENO"; then :
7088 ac_cv_search_kinfo_getvmmap=$ac_res
7089fi
7090rm -f core conftest.err conftest.$ac_objext \
7091 conftest$ac_exeext
7092 if test "${ac_cv_search_kinfo_getvmmap+set}" = set; then :
7093 break
7094fi
7095done
7096if test "${ac_cv_search_kinfo_getvmmap+set}" = set; then :
7097
7098else
7099 ac_cv_search_kinfo_getvmmap=no
7100fi
7101rm conftest.$ac_ext
7102LIBS=$ac_func_search_save_LIBS
7103fi
7104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getvmmap" >&5
7105$as_echo "$ac_cv_search_kinfo_getvmmap" >&6; }
7106ac_res=$ac_cv_search_kinfo_getvmmap
7107if test "$ac_res" != no; then :
7108 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7109
7110$as_echo "#define HAVE_KINFO_GETVMMAP 1" >>confdefs.h
7111
7112fi
7113
7114
77f120bf 7115
016a3251
DD
7116 if test "X$prefix" = "XNONE"; then
7117 acl_final_prefix="$ac_default_prefix"
7118 else
7119 acl_final_prefix="$prefix"
7120 fi
7121 if test "X$exec_prefix" = "XNONE"; then
7122 acl_final_exec_prefix='${prefix}'
7123 else
7124 acl_final_exec_prefix="$exec_prefix"
7125 fi
7126 acl_save_prefix="$prefix"
7127 prefix="$acl_final_prefix"
7128 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
7129 prefix="$acl_save_prefix"
7130
7131
7132# Check whether --with-gnu-ld was given.
7133if test "${with_gnu_ld+set}" = set; then :
7134 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
7135else
7136 with_gnu_ld=no
7137fi
7138
7139# Prepare PATH_SEPARATOR.
7140# The user is always right.
7141if test "${PATH_SEPARATOR+set}" != set; then
7142 echo "#! /bin/sh" >conf$$.sh
7143 echo "exit 0" >>conf$$.sh
7144 chmod +x conf$$.sh
7145 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
7146 PATH_SEPARATOR=';'
7147 else
7148 PATH_SEPARATOR=:
7149 fi
7150 rm -f conf$$.sh
7151fi
7152ac_prog=ld
7153if test "$GCC" = yes; then
7154 # Check if gcc -print-prog-name=ld gives a path.
7155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
7156$as_echo_n "checking for ld used by GCC... " >&6; }
7157 case $host in
7158 *-*-mingw*)
7159 # gcc leaves a trailing carriage return which upsets mingw
7160 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
7161 *)
7162 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
7163 esac
7164 case $ac_prog in
7165 # Accept absolute paths.
7166 [\\/]* | [A-Za-z]:[\\/]*)
7167 re_direlt='/[^/][^/]*/\.\./'
7168 # Canonicalize the path of ld
7169 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
7170 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
7171 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
7172 done
7173 test -z "$LD" && LD="$ac_prog"
7174 ;;
7175 "")
7176 # If it fails, then pretend we aren't using GCC.
7177 ac_prog=ld
7178 ;;
7179 *)
7180 # If it is relative, then search for the first ld in PATH.
7181 with_gnu_ld=unknown
7182 ;;
7183 esac
7184elif test "$with_gnu_ld" = yes; then
7185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
7186$as_echo_n "checking for GNU ld... " >&6; }
7187else
7188 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
7189$as_echo_n "checking for non-GNU ld... " >&6; }
7190fi
7191if test "${acl_cv_path_LD+set}" = set; then :
7192 $as_echo_n "(cached) " >&6
7193else
7194 if test -z "$LD"; then
7195 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
7196 for ac_dir in $PATH; do
7197 test -z "$ac_dir" && ac_dir=.
7198 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
7199 acl_cv_path_LD="$ac_dir/$ac_prog"
7200 # Check to see if the program is GNU ld. I'd rather use --version,
7201 # but apparently some GNU ld's only accept -v.
7202 # Break only if it was the GNU/non-GNU ld that we prefer.
7203 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
7204 test "$with_gnu_ld" != no && break
7205 else
7206 test "$with_gnu_ld" != yes && break
7207 fi
7208 fi
7209 done
7210 IFS="$ac_save_ifs"
7211else
7212 acl_cv_path_LD="$LD" # Let the user override the test with a path.
7213fi
7214fi
7215
7216LD="$acl_cv_path_LD"
7217if test -n "$LD"; then
7218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
7219$as_echo "$LD" >&6; }
7220else
7221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7222$as_echo "no" >&6; }
7223fi
7224test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
7225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
7226$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
7227if test "${acl_cv_prog_gnu_ld+set}" = set; then :
7228 $as_echo_n "(cached) " >&6
7229else
7230 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
7231if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
7232 acl_cv_prog_gnu_ld=yes
7233else
7234 acl_cv_prog_gnu_ld=no
7235fi
7236fi
7237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
7238$as_echo "$acl_cv_prog_gnu_ld" >&6; }
7239with_gnu_ld=$acl_cv_prog_gnu_ld
7240
7241
7242
7243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
7244$as_echo_n "checking for shared library run path origin... " >&6; }
7245if test "${acl_cv_rpath+set}" = set; then :
7246 $as_echo_n "(cached) " >&6
7247else
7248
7249 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
7250 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
7251 . ./conftest.sh
7252 rm -f ./conftest.sh
7253 acl_cv_rpath=done
7254
7255fi
7256{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
7257$as_echo "$acl_cv_rpath" >&6; }
7258 wl="$acl_cv_wl"
7259 libext="$acl_cv_libext"
7260 shlibext="$acl_cv_shlibext"
7261 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
7262 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
7263 hardcode_direct="$acl_cv_hardcode_direct"
7264 hardcode_minus_L="$acl_cv_hardcode_minus_L"
7265 # Check whether --enable-rpath was given.
7266if test "${enable_rpath+set}" = set; then :
7267 enableval=$enable_rpath; :
7268else
7269 enable_rpath=yes
7270fi
7271
7272
7273
7274
7275
7276
7277
7278
7279 use_additional=yes
7280
7281 acl_save_prefix="$prefix"
7282 prefix="$acl_final_prefix"
7283 acl_save_exec_prefix="$exec_prefix"
7284 exec_prefix="$acl_final_exec_prefix"
7285
7286 eval additional_includedir=\"$includedir\"
7287 eval additional_libdir=\"$libdir\"
7288
7289 exec_prefix="$acl_save_exec_prefix"
7290 prefix="$acl_save_prefix"
77f120bf 7291
6c7a06a3 7292
81ecdfbb
RW
7293# Check whether --with-libiconv-prefix was given.
7294if test "${with_libiconv_prefix+set}" = set; then :
7295 withval=$with_libiconv_prefix;
016a3251
DD
7296 if test "X$withval" = "Xno"; then
7297 use_additional=no
7298 else
7299 if test "X$withval" = "X"; then
7300
7301 acl_save_prefix="$prefix"
7302 prefix="$acl_final_prefix"
7303 acl_save_exec_prefix="$exec_prefix"
7304 exec_prefix="$acl_final_exec_prefix"
7305
7306 eval additional_includedir=\"$includedir\"
7307 eval additional_libdir=\"$libdir\"
7308
7309 exec_prefix="$acl_save_exec_prefix"
7310 prefix="$acl_save_prefix"
7311
7312 else
7313 additional_includedir="$withval/include"
7314 additional_libdir="$withval/lib"
7315 fi
7316 fi
6c7a06a3 7317
81ecdfbb
RW
7318fi
7319
016a3251
DD
7320 LIBICONV=
7321 LTLIBICONV=
7322 INCICONV=
7323 rpathdirs=
7324 ltrpathdirs=
7325 names_already_handled=
7326 names_next_round='iconv '
7327 while test -n "$names_next_round"; do
7328 names_this_round="$names_next_round"
7329 names_next_round=
7330 for name in $names_this_round; do
7331 already_handled=
7332 for n in $names_already_handled; do
7333 if test "$n" = "$name"; then
7334 already_handled=yes
7335 break
7336 fi
7337 done
7338 if test -z "$already_handled"; then
7339 names_already_handled="$names_already_handled $name"
7340 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
7341 eval value=\"\$HAVE_LIB$uppername\"
7342 if test -n "$value"; then
7343 if test "$value" = yes; then
7344 eval value=\"\$LIB$uppername\"
7345 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
7346 eval value=\"\$LTLIB$uppername\"
7347 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
7348 else
7349 :
7350 fi
7351 else
7352 found_dir=
7353 found_la=
7354 found_so=
7355 found_a=
7356 if test $use_additional = yes; then
7357 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
7358 found_dir="$additional_libdir"
7359 found_so="$additional_libdir/lib$name.$shlibext"
7360 if test -f "$additional_libdir/lib$name.la"; then
7361 found_la="$additional_libdir/lib$name.la"
7362 fi
7363 else
7364 if test -f "$additional_libdir/lib$name.$libext"; then
7365 found_dir="$additional_libdir"
7366 found_a="$additional_libdir/lib$name.$libext"
7367 if test -f "$additional_libdir/lib$name.la"; then
7368 found_la="$additional_libdir/lib$name.la"
7369 fi
7370 fi
7371 fi
7372 fi
7373 if test "X$found_dir" = "X"; then
7374 for x in $LDFLAGS $LTLIBICONV; do
7375
7376 acl_save_prefix="$prefix"
7377 prefix="$acl_final_prefix"
7378 acl_save_exec_prefix="$exec_prefix"
7379 exec_prefix="$acl_final_exec_prefix"
7380 eval x=\"$x\"
7381 exec_prefix="$acl_save_exec_prefix"
7382 prefix="$acl_save_prefix"
7383
7384 case "$x" in
7385 -L*)
7386 dir=`echo "X$x" | sed -e 's/^X-L//'`
7387 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
7388 found_dir="$dir"
7389 found_so="$dir/lib$name.$shlibext"
7390 if test -f "$dir/lib$name.la"; then
7391 found_la="$dir/lib$name.la"
7392 fi
7393 else
7394 if test -f "$dir/lib$name.$libext"; then
7395 found_dir="$dir"
7396 found_a="$dir/lib$name.$libext"
7397 if test -f "$dir/lib$name.la"; then
7398 found_la="$dir/lib$name.la"
7399 fi
7400 fi
7401 fi
7402 ;;
7403 esac
7404 if test "X$found_dir" != "X"; then
7405 break
7406 fi
7407 done
7408 fi
7409 if test "X$found_dir" != "X"; then
7410 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
7411 if test "X$found_so" != "X"; then
7412 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
7413 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
7414 else
7415 haveit=
7416 for x in $ltrpathdirs; do
7417 if test "X$x" = "X$found_dir"; then
7418 haveit=yes
7419 break
7420 fi
7421 done
7422 if test -z "$haveit"; then
7423 ltrpathdirs="$ltrpathdirs $found_dir"
7424 fi
7425 if test "$hardcode_direct" = yes; then
7426 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
7427 else
7428 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
7429 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
7430 haveit=
7431 for x in $rpathdirs; do
7432 if test "X$x" = "X$found_dir"; then
7433 haveit=yes
7434 break
7435 fi
7436 done
7437 if test -z "$haveit"; then
7438 rpathdirs="$rpathdirs $found_dir"
7439 fi
7440 else
7441 haveit=
7442 for x in $LDFLAGS $LIBICONV; do
7443
7444 acl_save_prefix="$prefix"
7445 prefix="$acl_final_prefix"
7446 acl_save_exec_prefix="$exec_prefix"
7447 exec_prefix="$acl_final_exec_prefix"
7448 eval x=\"$x\"
7449 exec_prefix="$acl_save_exec_prefix"
7450 prefix="$acl_save_prefix"
7451
7452 if test "X$x" = "X-L$found_dir"; then
7453 haveit=yes
7454 break
7455 fi
7456 done
7457 if test -z "$haveit"; then
7458 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
7459 fi
7460 if test "$hardcode_minus_L" != no; then
7461 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
7462 else
7463 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
7464 fi
7465 fi
7466 fi
7467 fi
7468 else
7469 if test "X$found_a" != "X"; then
7470 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
7471 else
7472 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
7473 fi
7474 fi
7475 additional_includedir=
7476 case "$found_dir" in
7477 */lib | */lib/)
7478 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
7479 additional_includedir="$basedir/include"
7480 ;;
7481 esac
7482 if test "X$additional_includedir" != "X"; then
7483 if test "X$additional_includedir" != "X/usr/include"; then
7484 haveit=
7485 if test "X$additional_includedir" = "X/usr/local/include"; then
7486 if test -n "$GCC"; then
7487 case $host_os in
7488 linux*) haveit=yes;;
7489 esac
7490 fi
7491 fi
7492 if test -z "$haveit"; then
7493 for x in $CPPFLAGS $INCICONV; do
7494
7495 acl_save_prefix="$prefix"
7496 prefix="$acl_final_prefix"
7497 acl_save_exec_prefix="$exec_prefix"
7498 exec_prefix="$acl_final_exec_prefix"
7499 eval x=\"$x\"
7500 exec_prefix="$acl_save_exec_prefix"
7501 prefix="$acl_save_prefix"
7502
7503 if test "X$x" = "X-I$additional_includedir"; then
7504 haveit=yes
7505 break
7506 fi
7507 done
7508 if test -z "$haveit"; then
7509 if test -d "$additional_includedir"; then
7510 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
7511 fi
7512 fi
7513 fi
7514 fi
7515 fi
7516 if test -n "$found_la"; then
7517 save_libdir="$libdir"
7518 case "$found_la" in
7519 */* | *\\*) . "$found_la" ;;
7520 *) . "./$found_la" ;;
7521 esac
7522 libdir="$save_libdir"
7523 for dep in $dependency_libs; do
7524 case "$dep" in
7525 -L*)
7526 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
7527 if test "X$additional_libdir" != "X/usr/lib"; then
7528 haveit=
7529 if test "X$additional_libdir" = "X/usr/local/lib"; then
7530 if test -n "$GCC"; then
7531 case $host_os in
7532 linux*) haveit=yes;;
7533 esac
7534 fi
7535 fi
7536 if test -z "$haveit"; then
7537 haveit=
7538 for x in $LDFLAGS $LIBICONV; do
7539
7540 acl_save_prefix="$prefix"
7541 prefix="$acl_final_prefix"
7542 acl_save_exec_prefix="$exec_prefix"
7543 exec_prefix="$acl_final_exec_prefix"
7544 eval x=\"$x\"
7545 exec_prefix="$acl_save_exec_prefix"
7546 prefix="$acl_save_prefix"
7547
7548 if test "X$x" = "X-L$additional_libdir"; then
7549 haveit=yes
7550 break
7551 fi
7552 done
7553 if test -z "$haveit"; then
7554 if test -d "$additional_libdir"; then
7555 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
7556 fi
7557 fi
7558 haveit=
7559 for x in $LDFLAGS $LTLIBICONV; do
7560
7561 acl_save_prefix="$prefix"
7562 prefix="$acl_final_prefix"
7563 acl_save_exec_prefix="$exec_prefix"
7564 exec_prefix="$acl_final_exec_prefix"
7565 eval x=\"$x\"
7566 exec_prefix="$acl_save_exec_prefix"
7567 prefix="$acl_save_prefix"
7568
7569 if test "X$x" = "X-L$additional_libdir"; then
7570 haveit=yes
7571 break
7572 fi
7573 done
7574 if test -z "$haveit"; then
7575 if test -d "$additional_libdir"; then
7576 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
7577 fi
7578 fi
7579 fi
7580 fi
7581 ;;
7582 -R*)
7583 dir=`echo "X$dep" | sed -e 's/^X-R//'`
7584 if test "$enable_rpath" != no; then
7585 haveit=
7586 for x in $rpathdirs; do
7587 if test "X$x" = "X$dir"; then
7588 haveit=yes
7589 break
7590 fi
7591 done
7592 if test -z "$haveit"; then
7593 rpathdirs="$rpathdirs $dir"
7594 fi
7595 haveit=
7596 for x in $ltrpathdirs; do
7597 if test "X$x" = "X$dir"; then
7598 haveit=yes
7599 break
7600 fi
7601 done
7602 if test -z "$haveit"; then
7603 ltrpathdirs="$ltrpathdirs $dir"
7604 fi
7605 fi
7606 ;;
7607 -l*)
7608 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
7609 ;;
7610 *.la)
7611 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
7612 ;;
7613 *)
7614 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
7615 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
7616 ;;
7617 esac
7618 done
7619 fi
7620 else
7621 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
7622 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
7623 fi
7624 fi
7625 fi
7626 done
7627 done
7628 if test "X$rpathdirs" != "X"; then
7629 if test -n "$hardcode_libdir_separator"; then
7630 alldirs=
7631 for found_dir in $rpathdirs; do
7632 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
7633 done
7634 acl_save_libdir="$libdir"
7635 libdir="$alldirs"
7636 eval flag=\"$hardcode_libdir_flag_spec\"
7637 libdir="$acl_save_libdir"
7638 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
7639 else
7640 for found_dir in $rpathdirs; do
7641 acl_save_libdir="$libdir"
7642 libdir="$found_dir"
7643 eval flag=\"$hardcode_libdir_flag_spec\"
7644 libdir="$acl_save_libdir"
7645 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
7646 done
7647 fi
7648 fi
7649 if test "X$ltrpathdirs" != "X"; then
7650 for found_dir in $ltrpathdirs; do
7651 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
7652 done
7653 fi
7654
7655
7656
7657
7658
6c7a06a3 7659
6c7a06a3 7660
81ecdfbb
RW
7661 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
7662$as_echo_n "checking for iconv... " >&6; }
7663if test "${am_cv_func_iconv+set}" = set; then :
7664 $as_echo_n "(cached) " >&6
d542061a 7665else
6c7a06a3
TT
7666
7667 am_cv_func_iconv="no, consider installing GNU libiconv"
7668 am_cv_lib_iconv=no
016a3251
DD
7669 am_save_CPPFLAGS="$CPPFLAGS"
7670 CPPFLAGS="$CPPFLAGS $INCICONV"
7671 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 7672/* end confdefs.h. */
6c7a06a3
TT
7673#include <stdlib.h>
7674#include <iconv.h>
d542061a
UW
7675int
7676main ()
7677{
6c7a06a3 7678iconv_t cd = iconv_open("","");
016a3251
DD
7679 iconv(cd,NULL,NULL,NULL,NULL);
7680 iconv_close(cd);
d542061a
UW
7681 ;
7682 return 0;
7683}
7684_ACEOF
81ecdfbb 7685if ac_fn_c_try_link "$LINENO"; then :
016a3251 7686 am_cv_func_iconv=yes
d542061a 7687fi
81ecdfbb
RW
7688rm -f core conftest.err conftest.$ac_objext \
7689 conftest$ac_exeext conftest.$ac_ext
016a3251 7690 CPPFLAGS="$am_save_CPPFLAGS"
94ae1714 7691
016a3251
DD
7692 if test "$am_cv_func_iconv" != yes && test -d ../libiconv; then
7693 for _libs in .libs _libs; do
7694 am_save_CPPFLAGS="$CPPFLAGS"
7695 am_save_LIBS="$LIBS"
7696 CPPFLAGS="$CPPFLAGS -I../libiconv/include"
7697 LIBS="$LIBS ../libiconv/lib/$_libs/libiconv.a"
7698 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 7699/* end confdefs.h. */
6c7a06a3
TT
7700#include <stdlib.h>
7701#include <iconv.h>
d542061a
UW
7702int
7703main ()
7704{
6c7a06a3 7705iconv_t cd = iconv_open("","");
016a3251
DD
7706 iconv(cd,NULL,NULL,NULL,NULL);
7707 iconv_close(cd);
d542061a
UW
7708 ;
7709 return 0;
7710}
7711_ACEOF
81ecdfbb 7712if ac_fn_c_try_link "$LINENO"; then :
016a3251
DD
7713 INCICONV="-I../libiconv/include"
7714 LIBICONV='${top_builddir}'/../libiconv/lib/$_libs/libiconv.a
7715 LTLIBICONV='${top_builddir}'/../libiconv/lib/libiconv.la
7716 am_cv_lib_iconv=yes
7717 am_cv_func_iconv=yes
d542061a 7718fi
81ecdfbb
RW
7719rm -f core conftest.err conftest.$ac_objext \
7720 conftest$ac_exeext conftest.$ac_ext
016a3251
DD
7721 CPPFLAGS="$am_save_CPPFLAGS"
7722 LIBS="$am_save_LIBS"
7723 if test "$am_cv_func_iconv" = "yes"; then
7724 break
7725 fi
7726 done
77f120bf 7727 fi
94ae1714 7728
4edb1e84 7729 if test "$am_cv_func_iconv" != yes; then
6c7a06a3 7730 am_save_CPPFLAGS="$CPPFLAGS"
4edb1e84 7731 am_save_LIBS="$LIBS"
016a3251
DD
7732 CPPFLAGS="$LIBS $INCICONV"
7733 LIBS="$LIBS $LIBICONV"
81ecdfbb 7734 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7735/* end confdefs.h. */
6c7a06a3
TT
7736#include <stdlib.h>
7737#include <iconv.h>
bec39cab
AC
7738int
7739main ()
7740{
6c7a06a3
TT
7741iconv_t cd = iconv_open("","");
7742 iconv(cd,NULL,NULL,NULL,NULL);
7743 iconv_close(cd);
bec39cab
AC
7744 ;
7745 return 0;
7746}
7747_ACEOF
81ecdfbb 7748if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 7749 am_cv_lib_iconv=yes
6c7a06a3 7750 am_cv_func_iconv=yes
627af7ea 7751fi
81ecdfbb
RW
7752rm -f core conftest.err conftest.$ac_objext \
7753 conftest$ac_exeext conftest.$ac_ext
fc3b640d 7754 CPPFLAGS="$am_save_CPPFLAGS"
016a3251 7755 LIBS="$am_save_LIBS"
6c7a06a3
TT
7756 fi
7757
7758fi
81ecdfbb
RW
7759{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
7760$as_echo "$am_cv_func_iconv" >&6; }
016a3251
DD
7761 if test "$am_cv_func_iconv" = yes; then
7762
7763$as_echo "#define HAVE_ICONV 1" >>confdefs.h
94ae1714 7764
016a3251 7765 fi
fc3b640d 7766 if test "$am_cv_lib_iconv" = yes; then
016a3251
DD
7767
7768 for element in $INCICONV; do
7769 haveit=
7770 for x in $CPPFLAGS; do
7771
7772 acl_save_prefix="$prefix"
7773 prefix="$acl_final_prefix"
7774 acl_save_exec_prefix="$exec_prefix"
7775 exec_prefix="$acl_final_exec_prefix"
7776 eval x=\"$x\"
7777 exec_prefix="$acl_save_exec_prefix"
7778 prefix="$acl_save_prefix"
7779
7780 if test "X$x" = "X$element"; then
7781 haveit=yes
7782 break
7783 fi
7784 done
7785 if test -z "$haveit"; then
7786 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
7787 fi
7788 done
7789
7790 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
7791$as_echo_n "checking how to link with libiconv... " >&6; }
7792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
7793$as_echo "$LIBICONV" >&6; }
94ae1714 7794 else
016a3251
DD
7795 LIBICONV=
7796 LTLIBICONV=
fc3b640d 7797 fi
94ae1714 7798
6c7a06a3 7799
6c7a06a3 7800
016a3251 7801 if test "$am_cv_func_iconv" = yes; then
81ecdfbb
RW
7802 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
7803$as_echo_n "checking for iconv declaration... " >&6; }
7804 if test "${am_cv_proto_iconv+set}" = set; then :
7805 $as_echo_n "(cached) " >&6
6c7a06a3
TT
7806else
7807
81ecdfbb 7808 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
7809/* end confdefs.h. */
7810
6c7a06a3
TT
7811#include <stdlib.h>
7812#include <iconv.h>
7813extern
b4e70030 7814#ifdef __cplusplus
6c7a06a3 7815"C"
b4e70030 7816#endif
6c7a06a3
TT
7817#if defined(__STDC__) || defined(__cplusplus)
7818size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
7819#else
7820size_t iconv();
7821#endif
7822
b4e70030
JB
7823int
7824main ()
7825{
6c7a06a3 7826
b4e70030
JB
7827 ;
7828 return 0;
7829}
7830_ACEOF
81ecdfbb 7831if ac_fn_c_try_compile "$LINENO"; then :
6c7a06a3 7832 am_cv_proto_iconv_arg1=""
4e8d927d 7833else
81ecdfbb 7834 am_cv_proto_iconv_arg1="const"
b4e70030 7835fi
81ecdfbb 7836rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6c7a06a3
TT
7837 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);"
7838fi
7839
7840 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
81ecdfbb 7841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
6c7a06a3 7842 }$am_cv_proto_iconv" >&5
81ecdfbb
RW
7843$as_echo "${ac_t:-
7844 }$am_cv_proto_iconv" >&6; }
6c7a06a3
TT
7845
7846cat >>confdefs.h <<_ACEOF
7847#define ICONV_CONST $am_cv_proto_iconv_arg1
7848_ACEOF
7849
7850 fi
6c7a06a3
TT
7851
7852
478aac75
DE
7853# GDB may fork/exec the iconv program to get the list of supported character
7854# sets. Allow the user to specify where to find it.
7855# There are several factors affecting the choice of option name:
7856# - There is already --with-libiconv-prefix but we can't use it, it specifies
7857# the build-time location of libiconv files.
7858# - The program we need to find is iconv, which comes with glibc. The user
7859# doesn't necessarily have libiconv installed. Therefore naming this
7860# --with-libiconv-foo feels wrong.
7861# - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is
7862# defined to work on directories not files (though it really doesn't know
7863# the difference).
7864# - Calling this --with-iconv-prefix is perceived to cause too much confusion
7865# with --with-libiconv-prefix.
7866# Putting these together is why the option name is --with-iconv-bin.
7867
7868
7869# Check whether --with-iconv-bin was given.
7870if test "${with_iconv_bin+set}" = set; then :
7871 withval=$with_iconv_bin; iconv_bin="${withval}"
7872
7873cat >>confdefs.h <<_ACEOF
7874#define ICONV_BIN "${iconv_bin}"
7875_ACEOF
7876
7877
7878 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
7879 if test "x$prefix" = xNONE; then
7880 test_prefix=/usr/local
7881 else
7882 test_prefix=$prefix
7883 fi
7884 else
7885 test_prefix=$exec_prefix
7886 fi
7887 value=0
7888 case ${iconv_bin} in
7889 "${test_prefix}"|"${test_prefix}/"*|\
7890 '${exec_prefix}'|'${exec_prefix}/'*)
7891 value=1
7892 ;;
7893 esac
7894
7895cat >>confdefs.h <<_ACEOF
7896#define ICONV_BIN_RELOCATABLE $value
7897_ACEOF
7898
7899
7900
7901fi
7902
7903
cb01cfba 7904# For the TUI, we need enhanced curses functionality.
bd8a8e1b 7905if test x"$enable_tui" != xno; then
cb01cfba
JB
7906 prefer_curses=yes
7907fi
7908
7909curses_found=no
7910if test x"$prefer_curses" = xyes; then
7911 # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
7912 # curses library because the latter might not provide all the
7913 # functionality we need. However, this leads to problems on systems
7914 # where the linker searches /usr/local/lib, but the compiler doesn't
7915 # search /usr/local/include, if ncurses is installed in /usr/local. A
7916 # default installation of ncurses on alpha*-dec-osf* will lead to such
7917 # a situation.
81ecdfbb
RW
7918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
7919$as_echo_n "checking for library containing waddstr... " >&6; }
7920if test "${ac_cv_search_waddstr+set}" = set; then :
7921 $as_echo_n "(cached) " >&6
6c7a06a3
TT
7922else
7923 ac_func_search_save_LIBS=$LIBS
81ecdfbb 7924cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
7925/* end confdefs.h. */
7926
81ecdfbb
RW
7927/* Override any GCC internal prototype to avoid an error.
7928 Use char because int might match the return type of a GCC
7929 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
7930#ifdef __cplusplus
7931extern "C"
7932#endif
6c7a06a3
TT
7933char waddstr ();
7934int
7935main ()
7936{
81ecdfbb 7937return waddstr ();
6c7a06a3
TT
7938 ;
7939 return 0;
7940}
7941_ACEOF
81ecdfbb
RW
7942for ac_lib in '' ncurses cursesX curses; do
7943 if test -z "$ac_lib"; then
7944 ac_res="none required"
7945 else
7946 ac_res=-l$ac_lib
7947 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7948 fi
7949 if ac_fn_c_try_link "$LINENO"; then :
7950 ac_cv_search_waddstr=$ac_res
7951fi
7952rm -f core conftest.err conftest.$ac_objext \
7953 conftest$ac_exeext
7954 if test "${ac_cv_search_waddstr+set}" = set; then :
7955 break
7956fi
7957done
7958if test "${ac_cv_search_waddstr+set}" = set; then :
7959
6c7a06a3 7960else
81ecdfbb
RW
7961 ac_cv_search_waddstr=no
7962fi
7963rm conftest.$ac_ext
7964LIBS=$ac_func_search_save_LIBS
7965fi
7966{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
7967$as_echo "$ac_cv_search_waddstr" >&6; }
7968ac_res=$ac_cv_search_waddstr
7969if test "$ac_res" != no; then :
7970 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3
TT
7971
7972fi
7973
7974
cb01cfba
JB
7975 if test "$ac_cv_search_waddstr" != no; then
7976 curses_found=yes
7977 fi
7978fi
7979
7980# Check whether we should enable the TUI, but only do so if we really
7981# can.
7982if test x"$enable_tui" != xno; then
7983 if test -d $srcdir/tui; then
7984 if test "$curses_found" != no; then
6c7a06a3
TT
7985 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
7986 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
7987 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
7988 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
6c7a06a3
TT
7989 else
7990 if test x"$enable_tui" = xyes; then
81ecdfbb 7991 as_fn_error "no enhanced curses library found; disable TUI" "$LINENO" 5
6c7a06a3 7992 else
81ecdfbb
RW
7993 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
7994$as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
6c7a06a3
TT
7995 fi
7996 fi
7997 fi
7998fi
7999
8000# Since GDB uses Readline, we need termcap functionality. In many
8001# cases this will be provided by the curses library, but some systems
8002# have a seperate termcap library, or no curses library at all.
8003
8004case $host_os in
8005 cygwin*)
8006 if test -d $srcdir/libtermcap; then
8007 LIBS="../libtermcap/libtermcap.a $LIBS"
8008 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
8009 fi ;;
8010 go32* | *djgpp*)
8011 ac_cv_search_tgetent="none required"
8012 ;;
6c7a06a3
TT
8013esac
8014
8015# These are the libraries checked by Readline.
81ecdfbb
RW
8016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
8017$as_echo_n "checking for library containing tgetent... " >&6; }
8018if test "${ac_cv_search_tgetent+set}" = set; then :
8019 $as_echo_n "(cached) " >&6
6c7a06a3
TT
8020else
8021 ac_func_search_save_LIBS=$LIBS
81ecdfbb 8022cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
8023/* end confdefs.h. */
8024
81ecdfbb
RW
8025/* Override any GCC internal prototype to avoid an error.
8026 Use char because int might match the return type of a GCC
8027 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
8028#ifdef __cplusplus
8029extern "C"
8030#endif
6c7a06a3
TT
8031char tgetent ();
8032int
8033main ()
8034{
81ecdfbb 8035return tgetent ();
6c7a06a3
TT
8036 ;
8037 return 0;
8038}
8039_ACEOF
81ecdfbb
RW
8040for ac_lib in '' termcap tinfo curses ncurses; do
8041 if test -z "$ac_lib"; then
8042 ac_res="none required"
8043 else
8044 ac_res=-l$ac_lib
6c7a06a3 8045 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
8046 fi
8047 if ac_fn_c_try_link "$LINENO"; then :
8048 ac_cv_search_tgetent=$ac_res
8049fi
8050rm -f core conftest.err conftest.$ac_objext \
8051 conftest$ac_exeext
8052 if test "${ac_cv_search_tgetent+set}" = set; then :
8053 break
8054fi
8055done
8056if test "${ac_cv_search_tgetent+set}" = set; then :
6c7a06a3 8057
6c7a06a3 8058else
81ecdfbb 8059 ac_cv_search_tgetent=no
6c7a06a3 8060fi
81ecdfbb 8061rm conftest.$ac_ext
6c7a06a3
TT
8062LIBS=$ac_func_search_save_LIBS
8063fi
81ecdfbb
RW
8064{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
8065$as_echo "$ac_cv_search_tgetent" >&6; }
8066ac_res=$ac_cv_search_tgetent
8067if test "$ac_res" != no; then :
8068 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3 8069
06825bd1
MK
8070fi
8071
06825bd1 8072
bec39cab 8073if test "$ac_cv_search_tgetent" = no; then
7a85168d 8074 CONFIG_OBS="$CONFIG_OBS stub-termcap.o"
8ee53726
MK
8075fi
8076
3841debe 8077
81ecdfbb
RW
8078# Check whether --with-system-readline was given.
8079if test "${with_system_readline+set}" = set; then :
8080 withval=$with_system_readline;
8081fi
6a30b0a5 8082
6a30b0a5
AS
8083
8084if test "$with_system_readline" = yes; then
8085 READLINE=-lreadline
8086 READLINE_DEPS=
8087 READLINE_CFLAGS=
39037522 8088 READLINE_TEXI_INCFLAG=
6a30b0a5
AS
8089else
8090 READLINE='$(READLINE_DIR)/libreadline.a'
8091 READLINE_DEPS='$(READLINE)'
8092 READLINE_CFLAGS='-I$(READLINE_SRC)/..'
39037522 8093 READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
6a30b0a5
AS
8094fi
8095
8096
8097
8098
8099
f997c383
SD
8100# Generate jit-reader.h
8101
8102# This is typedeffed to GDB_CORE_ADDR in jit-reader.h
8103TARGET_PTR=
8104
8105# The cast to long int works around a bug in the HP C Compiler
8106# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8107# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8108# This bug is HP SR number 8606223364.
8109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5
8110$as_echo_n "checking size of unsigned long long... " >&6; }
8111if test "${ac_cv_sizeof_unsigned_long_long+set}" = set; then :
8112 $as_echo_n "(cached) " >&6
8113else
8114 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then :
8115
8116else
8117 if test "$ac_cv_type_unsigned_long_long" = yes; then
8118 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8119$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8120{ as_fn_set_status 77
8121as_fn_error "cannot compute sizeof (unsigned long long)
8122See \`config.log' for more details." "$LINENO" 5; }; }
8123 else
8124 ac_cv_sizeof_unsigned_long_long=0
8125 fi
8126fi
8127
8128fi
8129{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5
8130$as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; }
8131
8132
8133
8134cat >>confdefs.h <<_ACEOF
8135#define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
8136_ACEOF
8137
8138
8139# The cast to long int works around a bug in the HP C Compiler
8140# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8141# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8142# This bug is HP SR number 8606223364.
8143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
8144$as_echo_n "checking size of unsigned long... " >&6; }
8145if test "${ac_cv_sizeof_unsigned_long+set}" = set; then :
8146 $as_echo_n "(cached) " >&6
8147else
8148 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then :
8149
8150else
8151 if test "$ac_cv_type_unsigned_long" = yes; then
8152 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8153$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8154{ as_fn_set_status 77
8155as_fn_error "cannot compute sizeof (unsigned long)
8156See \`config.log' for more details." "$LINENO" 5; }; }
8157 else
8158 ac_cv_sizeof_unsigned_long=0
8159 fi
8160fi
8161
8162fi
8163{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
8164$as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
8165
8166
8167
8168cat >>confdefs.h <<_ACEOF
8169#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
8170_ACEOF
8171
8172
8173# The cast to long int works around a bug in the HP C Compiler
8174# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8175# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8176# This bug is HP SR number 8606223364.
8177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5
8178$as_echo_n "checking size of unsigned __int128... " >&6; }
8179if test "${ac_cv_sizeof_unsigned___int128+set}" = set; then :
8180 $as_echo_n "(cached) " >&6
8181else
8182 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then :
8183
8184else
8185 if test "$ac_cv_type_unsigned___int128" = yes; then
8186 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8187$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8188{ as_fn_set_status 77
8189as_fn_error "cannot compute sizeof (unsigned __int128)
8190See \`config.log' for more details." "$LINENO" 5; }; }
8191 else
8192 ac_cv_sizeof_unsigned___int128=0
8193 fi
8194fi
8195
8196fi
8197{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5
8198$as_echo "$ac_cv_sizeof_unsigned___int128" >&6; }
8199
8200
8201
8202cat >>confdefs.h <<_ACEOF
8203#define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128
8204_ACEOF
8205
8206
8207
8208if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
8209 TARGET_PTR="unsigned long"
8210elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
8211 TARGET_PTR="unsigned long long"
8212elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
8213 TARGET_PTR="unsigned __int128"
8214else
8215 TARGET_PTR="unsigned long"
8216fi
8217
8218
8219ac_config_files="$ac_config_files jit-reader.h:jit-reader.in"
8220
8221
a2d08b9e
SD
8222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
8223$as_echo_n "checking for library containing dlopen... " >&6; }
8224if test "${ac_cv_search_dlopen+set}" = set; then :
8225 $as_echo_n "(cached) " >&6
8226else
8227 ac_func_search_save_LIBS=$LIBS
8228cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8229/* end confdefs.h. */
8230
8231/* Override any GCC internal prototype to avoid an error.
8232 Use char because int might match the return type of a GCC
8233 builtin and then its argument prototype would still apply. */
8234#ifdef __cplusplus
8235extern "C"
8236#endif
8237char dlopen ();
8238int
8239main ()
8240{
8241return dlopen ();
8242 ;
8243 return 0;
8244}
8245_ACEOF
8246for ac_lib in '' dl; do
8247 if test -z "$ac_lib"; then
8248 ac_res="none required"
8249 else
8250 ac_res=-l$ac_lib
8251 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8252 fi
8253 if ac_fn_c_try_link "$LINENO"; then :
8254 ac_cv_search_dlopen=$ac_res
8255fi
8256rm -f core conftest.err conftest.$ac_objext \
8257 conftest$ac_exeext
8258 if test "${ac_cv_search_dlopen+set}" = set; then :
8259 break
8260fi
8261done
8262if test "${ac_cv_search_dlopen+set}" = set; then :
8263
8264else
8265 ac_cv_search_dlopen=no
8266fi
8267rm conftest.$ac_ext
8268LIBS=$ac_func_search_save_LIBS
8269fi
8270{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
8271$as_echo "$ac_cv_search_dlopen" >&6; }
8272ac_res=$ac_cv_search_dlopen
8273if test "$ac_res" != no; then :
8274 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8275
8276fi
8277
8278
39037522 8279
b8e0a31c
SD
8280
8281# Check whether --with-jit-reader-dir was given.
8282if test "${with_jit_reader_dir+set}" = set; then :
8283 withval=$with_jit_reader_dir;
8284 JIT_READER_DIR=$withval
8285else
8286 JIT_READER_DIR=${libdir}/gdb
8287fi
8288
8289
8290 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
8291 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
8292 ac_define_dir=`eval echo $JIT_READER_DIR`
8293 ac_define_dir=`eval echo $ac_define_dir`
8294
8295cat >>confdefs.h <<_ACEOF
8296#define JIT_READER_DIR "$ac_define_dir"
8297_ACEOF
8298
8299
8300
8301
8302 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
8303 if test "x$prefix" = xNONE; then
8304 test_prefix=/usr/local
8305 else
8306 test_prefix=$prefix
8307 fi
8308 else
8309 test_prefix=$exec_prefix
8310 fi
8311 value=0
8312 case ${ac_define_dir} in
8313 "${test_prefix}"|"${test_prefix}/"*|\
8314 '${exec_prefix}'|'${exec_prefix}/'*)
8315 value=1
8316 ;;
8317 esac
8318
8319cat >>confdefs.h <<_ACEOF
8320#define JIT_READER_DIR_RELOCATABLE $value
8321_ACEOF
8322
8323
8324
8325
8326
81ecdfbb
RW
8327# Check whether --with-expat was given.
8328if test "${with_expat+set}" = set; then :
8329 withval=$with_expat;
5c39566f
DJ
8330else
8331 with_expat=auto
81ecdfbb
RW
8332fi
8333
8334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
8335$as_echo_n "checking whether to use expat... " >&6; }
8336{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
8337$as_echo "$with_expat" >&6; }
5c39566f
DJ
8338
8339if test "${with_expat}" = no; then
81ecdfbb
RW
8340 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
8341$as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
5c39566f
DJ
8342 HAVE_LIBEXPAT=no
8343else
8344
3841debe
DJ
8345
8346
8347
8348
8349
8350
8351
8352 use_additional=yes
8353
8354 acl_save_prefix="$prefix"
8355 prefix="$acl_final_prefix"
8356 acl_save_exec_prefix="$exec_prefix"
8357 exec_prefix="$acl_final_exec_prefix"
8358
8359 eval additional_includedir=\"$includedir\"
8360 eval additional_libdir=\"$libdir\"
8361
8362 exec_prefix="$acl_save_exec_prefix"
8363 prefix="$acl_save_prefix"
8364
8365
81ecdfbb
RW
8366# Check whether --with-libexpat-prefix was given.
8367if test "${with_libexpat_prefix+set}" = set; then :
8368 withval=$with_libexpat_prefix;
3841debe
DJ
8369 if test "X$withval" = "Xno"; then
8370 use_additional=no
8371 else
8372 if test "X$withval" = "X"; then
8373
8374 acl_save_prefix="$prefix"
8375 prefix="$acl_final_prefix"
8376 acl_save_exec_prefix="$exec_prefix"
8377 exec_prefix="$acl_final_exec_prefix"
8378
8379 eval additional_includedir=\"$includedir\"
8380 eval additional_libdir=\"$libdir\"
8381
8382 exec_prefix="$acl_save_exec_prefix"
8383 prefix="$acl_save_prefix"
8384
8385 else
8386 additional_includedir="$withval/include"
8387 additional_libdir="$withval/lib"
8388 fi
8389 fi
8390
81ecdfbb
RW
8391fi
8392
3841debe
DJ
8393 LIBEXPAT=
8394 LTLIBEXPAT=
8395 INCEXPAT=
8396 rpathdirs=
8397 ltrpathdirs=
8398 names_already_handled=
8399 names_next_round='expat '
8400 while test -n "$names_next_round"; do
8401 names_this_round="$names_next_round"
8402 names_next_round=
8403 for name in $names_this_round; do
8404 already_handled=
8405 for n in $names_already_handled; do
8406 if test "$n" = "$name"; then
8407 already_handled=yes
8408 break
8409 fi
8410 done
8411 if test -z "$already_handled"; then
8412 names_already_handled="$names_already_handled $name"
8413 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
8414 eval value=\"\$HAVE_LIB$uppername\"
8415 if test -n "$value"; then
8416 if test "$value" = yes; then
8417 eval value=\"\$LIB$uppername\"
8418 test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
8419 eval value=\"\$LTLIB$uppername\"
8420 test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
8421 else
8422 :
8423 fi
8424 else
8425 found_dir=
8426 found_la=
8427 found_so=
8428 found_a=
8429 if test $use_additional = yes; then
8430 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
8431 found_dir="$additional_libdir"
8432 found_so="$additional_libdir/lib$name.$shlibext"
8433 if test -f "$additional_libdir/lib$name.la"; then
8434 found_la="$additional_libdir/lib$name.la"
8435 fi
8436 else
8437 if test -f "$additional_libdir/lib$name.$libext"; then
8438 found_dir="$additional_libdir"
8439 found_a="$additional_libdir/lib$name.$libext"
8440 if test -f "$additional_libdir/lib$name.la"; then
8441 found_la="$additional_libdir/lib$name.la"
8442 fi
8443 fi
8444 fi
8445 fi
8446 if test "X$found_dir" = "X"; then
8447 for x in $LDFLAGS $LTLIBEXPAT; do
8448
8449 acl_save_prefix="$prefix"
8450 prefix="$acl_final_prefix"
8451 acl_save_exec_prefix="$exec_prefix"
8452 exec_prefix="$acl_final_exec_prefix"
8453 eval x=\"$x\"
8454 exec_prefix="$acl_save_exec_prefix"
8455 prefix="$acl_save_prefix"
8456
8457 case "$x" in
8458 -L*)
8459 dir=`echo "X$x" | sed -e 's/^X-L//'`
8460 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
8461 found_dir="$dir"
8462 found_so="$dir/lib$name.$shlibext"
8463 if test -f "$dir/lib$name.la"; then
8464 found_la="$dir/lib$name.la"
8465 fi
8466 else
8467 if test -f "$dir/lib$name.$libext"; then
8468 found_dir="$dir"
8469 found_a="$dir/lib$name.$libext"
8470 if test -f "$dir/lib$name.la"; then
8471 found_la="$dir/lib$name.la"
8472 fi
8473 fi
8474 fi
8475 ;;
8476 esac
8477 if test "X$found_dir" != "X"; then
8478 break
8479 fi
8480 done
8481 fi
8482 if test "X$found_dir" != "X"; then
8483 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
8484 if test "X$found_so" != "X"; then
8485 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
8486 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
8487 else
8488 haveit=
8489 for x in $ltrpathdirs; do
8490 if test "X$x" = "X$found_dir"; then
8491 haveit=yes
8492 break
8493 fi
8494 done
8495 if test -z "$haveit"; then
8496 ltrpathdirs="$ltrpathdirs $found_dir"
8497 fi
8498 if test "$hardcode_direct" = yes; then
8499 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
8500 else
8501 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
8502 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
8503 haveit=
8504 for x in $rpathdirs; do
8505 if test "X$x" = "X$found_dir"; then
8506 haveit=yes
8507 break
8508 fi
8509 done
8510 if test -z "$haveit"; then
8511 rpathdirs="$rpathdirs $found_dir"
8512 fi
8513 else
8514 haveit=
8515 for x in $LDFLAGS $LIBEXPAT; do
8516
8517 acl_save_prefix="$prefix"
8518 prefix="$acl_final_prefix"
8519 acl_save_exec_prefix="$exec_prefix"
8520 exec_prefix="$acl_final_exec_prefix"
8521 eval x=\"$x\"
8522 exec_prefix="$acl_save_exec_prefix"
8523 prefix="$acl_save_prefix"
8524
8525 if test "X$x" = "X-L$found_dir"; then
8526 haveit=yes
8527 break
8528 fi
8529 done
8530 if test -z "$haveit"; then
8531 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
8532 fi
8533 if test "$hardcode_minus_L" != no; then
8534 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
8535 else
8536 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
8537 fi
8538 fi
8539 fi
8540 fi
8541 else
8542 if test "X$found_a" != "X"; then
8543 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
8544 else
8545 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
8546 fi
8547 fi
8548 additional_includedir=
8549 case "$found_dir" in
8550 */lib | */lib/)
8551 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
8552 additional_includedir="$basedir/include"
8553 ;;
8554 esac
8555 if test "X$additional_includedir" != "X"; then
8556 if test "X$additional_includedir" != "X/usr/include"; then
8557 haveit=
8558 if test "X$additional_includedir" = "X/usr/local/include"; then
8559 if test -n "$GCC"; then
8560 case $host_os in
8561 linux*) haveit=yes;;
8562 esac
8563 fi
8564 fi
8565 if test -z "$haveit"; then
8566 for x in $CPPFLAGS $INCEXPAT; do
8567
8568 acl_save_prefix="$prefix"
8569 prefix="$acl_final_prefix"
8570 acl_save_exec_prefix="$exec_prefix"
8571 exec_prefix="$acl_final_exec_prefix"
8572 eval x=\"$x\"
8573 exec_prefix="$acl_save_exec_prefix"
8574 prefix="$acl_save_prefix"
8575
8576 if test "X$x" = "X-I$additional_includedir"; then
8577 haveit=yes
8578 break
8579 fi
8580 done
8581 if test -z "$haveit"; then
8582 if test -d "$additional_includedir"; then
8583 INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
8584 fi
8585 fi
8586 fi
8587 fi
8588 fi
8589 if test -n "$found_la"; then
8590 save_libdir="$libdir"
8591 case "$found_la" in
8592 */* | *\\*) . "$found_la" ;;
8593 *) . "./$found_la" ;;
8594 esac
8595 libdir="$save_libdir"
8596 for dep in $dependency_libs; do
8597 case "$dep" in
8598 -L*)
8599 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
8600 if test "X$additional_libdir" != "X/usr/lib"; then
8601 haveit=
8602 if test "X$additional_libdir" = "X/usr/local/lib"; then
8603 if test -n "$GCC"; then
8604 case $host_os in
8605 linux*) haveit=yes;;
8606 esac
8607 fi
8608 fi
8609 if test -z "$haveit"; then
8610 haveit=
8611 for x in $LDFLAGS $LIBEXPAT; do
8612
8613 acl_save_prefix="$prefix"
8614 prefix="$acl_final_prefix"
8615 acl_save_exec_prefix="$exec_prefix"
8616 exec_prefix="$acl_final_exec_prefix"
8617 eval x=\"$x\"
8618 exec_prefix="$acl_save_exec_prefix"
8619 prefix="$acl_save_prefix"
8620
8621 if test "X$x" = "X-L$additional_libdir"; then
8622 haveit=yes
8623 break
8624 fi
8625 done
8626 if test -z "$haveit"; then
8627 if test -d "$additional_libdir"; then
8628 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
8629 fi
8630 fi
8631 haveit=
8632 for x in $LDFLAGS $LTLIBEXPAT; do
8633
8634 acl_save_prefix="$prefix"
8635 prefix="$acl_final_prefix"
8636 acl_save_exec_prefix="$exec_prefix"
8637 exec_prefix="$acl_final_exec_prefix"
8638 eval x=\"$x\"
8639 exec_prefix="$acl_save_exec_prefix"
8640 prefix="$acl_save_prefix"
8641
8642 if test "X$x" = "X-L$additional_libdir"; then
8643 haveit=yes
8644 break
8645 fi
8646 done
8647 if test -z "$haveit"; then
8648 if test -d "$additional_libdir"; then
8649 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
8650 fi
8651 fi
8652 fi
8653 fi
8654 ;;
8655 -R*)
8656 dir=`echo "X$dep" | sed -e 's/^X-R//'`
8657 if test "$enable_rpath" != no; then
8658 haveit=
8659 for x in $rpathdirs; do
8660 if test "X$x" = "X$dir"; then
8661 haveit=yes
8662 break
8663 fi
8664 done
8665 if test -z "$haveit"; then
8666 rpathdirs="$rpathdirs $dir"
8667 fi
8668 haveit=
8669 for x in $ltrpathdirs; do
8670 if test "X$x" = "X$dir"; then
8671 haveit=yes
8672 break
8673 fi
8674 done
8675 if test -z "$haveit"; then
8676 ltrpathdirs="$ltrpathdirs $dir"
8677 fi
8678 fi
8679 ;;
8680 -l*)
8681 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
8682 ;;
8683 *.la)
8684 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
8685 ;;
8686 *)
8687 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
8688 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
8689 ;;
81ecdfbb
RW
8690 esac
8691 done
8692 fi
8693 else
8694 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
8695 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
8696 fi
8697 fi
8698 fi
8699 done
8700 done
8701 if test "X$rpathdirs" != "X"; then
8702 if test -n "$hardcode_libdir_separator"; then
8703 alldirs=
8704 for found_dir in $rpathdirs; do
8705 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
8706 done
8707 acl_save_libdir="$libdir"
8708 libdir="$alldirs"
8709 eval flag=\"$hardcode_libdir_flag_spec\"
8710 libdir="$acl_save_libdir"
8711 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
8712 else
8713 for found_dir in $rpathdirs; do
8714 acl_save_libdir="$libdir"
8715 libdir="$found_dir"
8716 eval flag=\"$hardcode_libdir_flag_spec\"
8717 libdir="$acl_save_libdir"
8718 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
8719 done
8720 fi
8721 fi
8722 if test "X$ltrpathdirs" != "X"; then
8723 for found_dir in $ltrpathdirs; do
8724 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
8725 done
8726 fi
a9322a30
TT
8727
8728
81ecdfbb 8729 ac_save_CPPFLAGS="$CPPFLAGS"
a9322a30 8730
81ecdfbb
RW
8731 for element in $INCEXPAT; do
8732 haveit=
8733 for x in $CPPFLAGS; do
a9322a30 8734
81ecdfbb
RW
8735 acl_save_prefix="$prefix"
8736 prefix="$acl_final_prefix"
8737 acl_save_exec_prefix="$exec_prefix"
8738 exec_prefix="$acl_final_exec_prefix"
8739 eval x=\"$x\"
8740 exec_prefix="$acl_save_exec_prefix"
8741 prefix="$acl_save_prefix"
a8111142 8742
81ecdfbb
RW
8743 if test "X$x" = "X$element"; then
8744 haveit=yes
8745 break
8746 fi
8747 done
8748 if test -z "$haveit"; then
8749 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
8750 fi
8751 done
a9322a30
TT
8752
8753
81ecdfbb
RW
8754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
8755$as_echo_n "checking for libexpat... " >&6; }
8756if test "${ac_cv_libexpat+set}" = set; then :
8757 $as_echo_n "(cached) " >&6
bec39cab 8758else
bec39cab 8759
81ecdfbb
RW
8760 ac_save_LIBS="$LIBS"
8761 LIBS="$LIBS $LIBEXPAT"
8762 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8763/* end confdefs.h. */
81ecdfbb
RW
8764#include "expat.h"
8765int
8766main ()
8767{
8768XML_Parser p = XML_ParserCreate (0);
8769 ;
8770 return 0;
8771}
bec39cab 8772_ACEOF
81ecdfbb
RW
8773if ac_fn_c_try_link "$LINENO"; then :
8774 ac_cv_libexpat=yes
c906108c 8775else
81ecdfbb 8776 ac_cv_libexpat=no
bec39cab 8777fi
81ecdfbb
RW
8778rm -f core conftest.err conftest.$ac_objext \
8779 conftest$ac_exeext conftest.$ac_ext
8780 LIBS="$ac_save_LIBS"
c906108c 8781
95ca63c4 8782fi
81ecdfbb
RW
8783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
8784$as_echo "$ac_cv_libexpat" >&6; }
8785 if test "$ac_cv_libexpat" = yes; then
8786 HAVE_LIBEXPAT=yes
bec39cab 8787
81ecdfbb 8788$as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
bec39cab 8789
81ecdfbb
RW
8790 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
8791$as_echo_n "checking how to link with libexpat... " >&6; }
8792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
8793$as_echo "$LIBEXPAT" >&6; }
8794 else
8795 HAVE_LIBEXPAT=no
8796 CPPFLAGS="$ac_save_CPPFLAGS"
8797 LIBEXPAT=
8798 LTLIBEXPAT=
8799 fi
95ca63c4
CF
8800
8801
8802
7cb9022a
MK
8803
8804
bec39cab 8805
81ecdfbb
RW
8806 if test "$HAVE_LIBEXPAT" != yes; then
8807 if test "$with_expat" = yes; then
8808 as_fn_error "expat is missing or unusable" "$LINENO" 5
8809 else
8810 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
8811$as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
8812 fi
8813 else
8814 save_LIBS=$LIBS
8815 LIBS="$LIBS $LIBEXPAT"
8816 for ac_func in XML_StopParser
8817do :
8818 ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
8819if test "x$ac_cv_func_XML_StopParser" = x""yes; then :
bec39cab 8820 cat >>confdefs.h <<_ACEOF
81ecdfbb 8821#define HAVE_XML_STOPPARSER 1
bec39cab 8822_ACEOF
95ca63c4 8823
bec39cab 8824fi
bec39cab 8825done
95ca63c4 8826
81ecdfbb
RW
8827 LIBS=$save_LIBS
8828 fi
a9322a30
TT
8829fi
8830
d344e670
DE
8831# --------------------- #
8832# Check for libpython. #
8833# --------------------- #
8834
a9322a30 8835
a9322a30
TT
8836
8837
ec685c5e 8838
0c4a4063 8839
81ecdfbb
RW
8840# Check whether --with-python was given.
8841if test "${with_python+set}" = set; then :
8842 withval=$with_python;
bec39cab 8843else
81ecdfbb 8844 with_python=auto
bec39cab 8845fi
bec39cab 8846
81ecdfbb
RW
8847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
8848$as_echo_n "checking whether to use python... " >&6; }
8849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
8850$as_echo "$with_python" >&6; }
9a156167 8851
81ecdfbb
RW
8852if test "${with_python}" = no; then
8853 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
8854$as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
8855 have_libpython=no
bec39cab 8856else
81ecdfbb 8857 case "${with_python}" in
8c85a4e2 8858 [\\/]* | ?:[\\/]*)
ec685c5e
DE
8859 if test -d ${with_python}; then
8860 # Assume the python binary is ${with_python}/bin/python.
ec685c5e 8861 python_prog="${with_python}/bin/python"
0c4a4063 8862 python_prefix=
9c4ea6c5
JB
8863 # If python does not exit ${with_python}/bin, then try in
8864 # ${with_python}. On Windows/MinGW, this is where the Python
8865 # executable is.
8866 if test ! -x "${python_prog}"; then
8867 python_prog="${with_python}/python"
8868 python_prefix=
8869 fi
e7a30f46 8870 if test ! -x "${python_prog}"; then
ec685c5e
DE
8871 # Fall back to gdb 7.0/7.1 behaviour.
8872 python_prog=missing
0c4a4063 8873 python_prefix=${with_python}
ec685c5e 8874 fi
e7a30f46 8875 elif test -x "${with_python}"; then
ec685c5e
DE
8876 # While we can't run python compiled for $host (unless host == build),
8877 # the user could write a script that provides the needed information,
8878 # so we support that.
ec685c5e 8879 python_prog=${with_python}
0c4a4063 8880 python_prefix=
ec685c5e
DE
8881 else
8882 as_fn_error "invalid value for --with-python" "$LINENO" 5
8883 fi
81ecdfbb 8884 ;;
ec685c5e
DE
8885 */*)
8886 # Disallow --with-python=foo/bar.
81ecdfbb
RW
8887 as_fn_error "invalid value for --with-python" "$LINENO" 5
8888 ;;
ec685c5e
DE
8889 *)
8890 # The user has either specified auto, yes, or the name of the python
8891 # program assumed to be in $PATH.
8892 python_prefix=
8893 case "${with_python}" in
8894 yes | auto)
8895 if test ${build} = ${host}; then
8896 # Extract the first word of "python", so it can be a program name with args.
8897set dummy python; ac_word=$2
8898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8899$as_echo_n "checking for $ac_word... " >&6; }
8900if test "${ac_cv_path_python_prog_path+set}" = set; then :
8901 $as_echo_n "(cached) " >&6
8902else
8903 case $python_prog_path in
8904 [\\/]* | ?:[\\/]*)
8905 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
8906 ;;
8907 *)
8908 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8909for as_dir in $PATH
8910do
8911 IFS=$as_save_IFS
8912 test -z "$as_dir" && as_dir=.
8913 for ac_exec_ext in '' $ac_executable_extensions; do
8914 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8915 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
8916 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8917 break 2
8918 fi
8919done
8920 done
8921IFS=$as_save_IFS
8922
8923 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
8924 ;;
8925esac
8926fi
8927python_prog_path=$ac_cv_path_python_prog_path
8928if test -n "$python_prog_path"; then
8929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
8930$as_echo "$python_prog_path" >&6; }
8931else
8932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8933$as_echo "no" >&6; }
8934fi
8935
8936
8937 if test "${python_prog_path}" = missing; then
8938 python_prog=missing
8939 else
8940 python_prog=${python_prog_path}
8941 fi
8942 else
8943 # Not much we can do except assume the cross-compiler will find the
8944 # right files.
8945 python_prog=missing
8946 fi
8947 ;;
8948 *)
8949 # While we can't run python compiled for $host (unless host == build),
8950 # the user could write a script that provides the needed information,
8951 # so we support that.
8952 python_prog="${with_python}"
8953 # Extract the first word of "${python_prog}", so it can be a program name with args.
8954set dummy ${python_prog}; ac_word=$2
8955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8956$as_echo_n "checking for $ac_word... " >&6; }
8957if test "${ac_cv_path_python_prog_path+set}" = set; then :
8958 $as_echo_n "(cached) " >&6
8959else
8960 case $python_prog_path in
8961 [\\/]* | ?:[\\/]*)
8962 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
8963 ;;
8964 *)
8965 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8966for as_dir in $PATH
8967do
8968 IFS=$as_save_IFS
8969 test -z "$as_dir" && as_dir=.
8970 for ac_exec_ext in '' $ac_executable_extensions; do
8971 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8972 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
8973 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8974 break 2
8975 fi
8976done
8977 done
8978IFS=$as_save_IFS
8979
8980 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
8981 ;;
8982esac
8983fi
8984python_prog_path=$ac_cv_path_python_prog_path
8985if test -n "$python_prog_path"; then
8986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
8987$as_echo "$python_prog_path" >&6; }
8988else
8989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8990$as_echo "no" >&6; }
8991fi
8992
8993
8994 if test "${python_prog_path}" = missing; then
8995 as_fn_error "unable to find python program ${python_prog}" "$LINENO" 5
8996 fi
8997 ;;
8998 esac
81ecdfbb
RW
8999 esac
9000
ec685c5e 9001 if test "${python_prog}" != missing; then
e7a30f46
DE
9002 # We have a python program to use, but it may be too old.
9003 # Don't flag an error for --with-python=auto (the default).
9004 have_python_config=yes
ec685c5e
DE
9005 python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
9006 if test $? != 0; then
e7a30f46
DE
9007 have_python_config=failed
9008 if test "${with_python}" != auto; then
9009 as_fn_error "failure running python-config --includes" "$LINENO" 5
9010 fi
ec685c5e
DE
9011 fi
9012 python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
9013 if test $? != 0; then
e7a30f46
DE
9014 have_python_config=failed
9015 if test "${with_python}" != auto; then
9016 as_fn_error "failure running python-config --ldflags" "$LINENO" 5
9017 fi
ec685c5e 9018 fi
0c4a4063
DE
9019 python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
9020 if test $? != 0; then
e7a30f46
DE
9021 have_python_config=failed
9022 if test "${with_python}" != auto; then
9023 as_fn_error "failure running python-config --exec-prefix" "$LINENO" 5
9024 fi
0c4a4063 9025 fi
ec685c5e 9026 else
ac534cba
JB
9027 # We do not have a python executable we can use to determine where
9028 # to find the Python headers and libs. We cannot guess the include
9029 # path from the python_prefix either, because that include path
9030 # depends on the Python version. So, there is nothing much we can
9031 # do except assume that the compiler will be able to find those files.
9032 python_includes=
9033 python_libs=
0c4a4063 9034 have_python_config=no
ec685c5e 9035 fi
bec39cab 9036
ec685c5e
DE
9037 # If we have python-config, only try the configuration it provides.
9038 # Otherwise fallback on the old way of trying different versions of
9039 # python in turn.
81ecdfbb 9040
ec685c5e
DE
9041 have_libpython=no
9042 if test "${have_python_config}" = yes; then
c1039e3c
JB
9043 # Determine the Python version by extracting "-lpython<version>"
9044 # part of the python_libs. <version> is usually X.Y with X and Y
9045 # being decimal numbers, but can also be XY (seen on Windows).
9046 #
9047 # The extraction is performed using sed with a regular expression.
9048 # Initially, the regexp used was using the '?' quantifier to make
9049 # the dot in the version number optional. Unfortunately, this
9050 # does not work with non-GNU versions of sed because, because of
9051 # what looks like a limitation (the '?' quantifier does not work
9052 # with back-references). We work around this limitation by using
9053 # the '*' quantifier instead. It means that, in theory, we might
9054 # match unexpected version strings such as "-lpython2..7", but
9055 # this seems unlikely in practice. And even if that happens,
9056 # an error will be triggered later on, when checking that version
9057 # number.
ec685c5e 9058 python_version=`echo " ${python_libs} " \
c1039e3c 9059 | sed -e 's,^.* -l\(python[0-9]*[.]*[0-9]*\).*$,\1,'`
0c4a4063
DE
9060 case "${python_version}" in
9061 python*)
ec685c5e
DE
9062
9063 version=${python_version}
9064
9065 new_CPPFLAGS=${python_includes}
9066 new_LIBS=${python_libs}
81ecdfbb
RW
9067 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
9068$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 9069 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 9070 save_LIBS=$LIBS
ec685c5e
DE
9071 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9072 LIBS="$LIBS $new_LIBS"
9073 found_usable_python=no
81ecdfbb 9074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9075/* end confdefs.h. */
ac534cba 9076#include "Python.h"
81ecdfbb
RW
9077int
9078main ()
9079{
9080Py_Initialize ();
9081 ;
9082 return 0;
9083}
bec39cab 9084_ACEOF
81ecdfbb 9085if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
9086 have_libpython=${version}
9087 found_usable_python=yes
ac534cba
JB
9088 PYTHON_CPPFLAGS=$new_CPPFLAGS
9089 PYTHON_LIBS=$new_LIBS
9a156167 9090fi
81ecdfbb
RW
9091rm -f core conftest.err conftest.$ac_objext \
9092 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
9093 CPPFLAGS=$save_CPPFLAGS
9094 LIBS=$save_LIBS
ec685c5e
DE
9095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
9096$as_echo "${found_usable_python}" >&6; }
9a156167 9097
0c4a4063
DE
9098 ;;
9099 *)
ec685c5e 9100 as_fn_error "unable to determine python version from ${python_libs}" "$LINENO" 5
0c4a4063
DE
9101 ;;
9102 esac
e7a30f46 9103 elif test "${have_python_config}" != failed; then
ec685c5e 9104 if test "${have_libpython}" = no; then
9a156167 9105
420697bb
TT
9106 version=python2.7
9107
9108 new_CPPFLAGS=${python_includes}
9109 new_LIBS="${python_libs} -lpython2.7"
9110 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
9111$as_echo_n "checking for ${version}... " >&6; }
9112 save_CPPFLAGS=$CPPFLAGS
9113 save_LIBS=$LIBS
9114 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9115 LIBS="$LIBS $new_LIBS"
9116 found_usable_python=no
9117 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9118/* end confdefs.h. */
ac534cba 9119#include "Python.h"
420697bb
TT
9120int
9121main ()
9122{
9123Py_Initialize ();
9124 ;
9125 return 0;
9126}
9127_ACEOF
9128if ac_fn_c_try_link "$LINENO"; then :
9129 have_libpython=${version}
9130 found_usable_python=yes
ac534cba
JB
9131 PYTHON_CPPFLAGS=$new_CPPFLAGS
9132 PYTHON_LIBS=$new_LIBS
420697bb
TT
9133fi
9134rm -f core conftest.err conftest.$ac_objext \
9135 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
9136 CPPFLAGS=$save_CPPFLAGS
9137 LIBS=$save_LIBS
420697bb
TT
9138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
9139$as_echo "${found_usable_python}" >&6; }
9140
9141 fi
9142 if test "${have_libpython}" = no; then
9143
ec685c5e
DE
9144 version=python2.6
9145
9146 new_CPPFLAGS=${python_includes}
9147 new_LIBS="${python_libs} -lpython2.6"
9148 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
9149$as_echo_n "checking for ${version}... " >&6; }
9150 save_CPPFLAGS=$CPPFLAGS
9151 save_LIBS=$LIBS
9152 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9153 LIBS="$LIBS $new_LIBS"
9154 found_usable_python=no
9155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9156/* end confdefs.h. */
ac534cba 9157#include "Python.h"
ec685c5e
DE
9158int
9159main ()
9160{
9161Py_Initialize ();
9162 ;
9163 return 0;
9164}
9165_ACEOF
9166if ac_fn_c_try_link "$LINENO"; then :
9167 have_libpython=${version}
9168 found_usable_python=yes
ac534cba
JB
9169 PYTHON_CPPFLAGS=$new_CPPFLAGS
9170 PYTHON_LIBS=$new_LIBS
ec685c5e
DE
9171fi
9172rm -f core conftest.err conftest.$ac_objext \
9173 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
9174 CPPFLAGS=$save_CPPFLAGS
9175 LIBS=$save_LIBS
ec685c5e
DE
9176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
9177$as_echo "${found_usable_python}" >&6; }
9a156167 9178
81ecdfbb 9179 fi
ec685c5e 9180 if test ${have_libpython} = no; then
9a156167 9181
81ecdfbb 9182 version=python2.5
9a156167 9183
ec685c5e
DE
9184 new_CPPFLAGS=${python_includes}
9185 new_LIBS="${python_libs} -lpython2.5"
81ecdfbb
RW
9186 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
9187$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 9188 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 9189 save_LIBS=$LIBS
ec685c5e
DE
9190 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9191 LIBS="$LIBS $new_LIBS"
9192 found_usable_python=no
81ecdfbb 9193 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 9194/* end confdefs.h. */
ac534cba 9195#include "Python.h"
81ecdfbb
RW
9196int
9197main ()
9198{
9199Py_Initialize ();
9200 ;
9201 return 0;
9202}
436868fb 9203_ACEOF
81ecdfbb 9204if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
9205 have_libpython=${version}
9206 found_usable_python=yes
ac534cba
JB
9207 PYTHON_CPPFLAGS=$new_CPPFLAGS
9208 PYTHON_LIBS=$new_LIBS
436868fb 9209fi
81ecdfbb
RW
9210rm -f core conftest.err conftest.$ac_objext \
9211 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
9212 CPPFLAGS=$save_CPPFLAGS
9213 LIBS=$save_LIBS
ec685c5e
DE
9214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
9215$as_echo "${found_usable_python}" >&6; }
a9322a30 9216
81ecdfbb 9217 fi
ec685c5e 9218 if test ${have_libpython} = no; then
a9322a30 9219
81ecdfbb 9220 version=python2.4
a9322a30 9221
ec685c5e
DE
9222 new_CPPFLAGS=${python_includes}
9223 new_LIBS="${python_libs} -lpython2.4"
81ecdfbb
RW
9224 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
9225$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 9226 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 9227 save_LIBS=$LIBS
ec685c5e
DE
9228 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9229 LIBS="$LIBS $new_LIBS"
9230 found_usable_python=no
81ecdfbb 9231 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 9232/* end confdefs.h. */
ac534cba 9233#include "Python.h"
a9322a30
TT
9234int
9235main ()
9236{
81ecdfbb 9237Py_Initialize ();
a9322a30
TT
9238 ;
9239 return 0;
9240}
436868fb 9241_ACEOF
81ecdfbb 9242if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
9243 have_libpython=${version}
9244 found_usable_python=yes
ac534cba
JB
9245 PYTHON_CPPFLAGS=$new_CPPFLAGS
9246 PYTHON_LIBS=$new_LIBS
436868fb 9247fi
81ecdfbb
RW
9248rm -f core conftest.err conftest.$ac_objext \
9249 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
9250 CPPFLAGS=$save_CPPFLAGS
9251 LIBS=$save_LIBS
ec685c5e
DE
9252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
9253$as_echo "${found_usable_python}" >&6; }
81ecdfbb 9254
ec685c5e
DE
9255 fi
9256 fi
9c4ea6c5 9257 if test "${have_libpython}" = python2.7 -o "${have_libpython}" = python27; then
11763c18
TT
9258
9259$as_echo "#define HAVE_LIBPYTHON2_7 1" >>confdefs.h
9260
9c4ea6c5 9261 elif test "${have_libpython}" = python2.6 -o "${have_libpython}" = python26; then
ec685c5e
DE
9262
9263$as_echo "#define HAVE_LIBPYTHON2_6 1" >>confdefs.h
9264
9c4ea6c5 9265 elif test "${have_libpython}" = python2.5 -o "${have_libpython}" = python25; then
ec685c5e
DE
9266
9267$as_echo "#define HAVE_LIBPYTHON2_5 1" >>confdefs.h
9268
9c4ea6c5 9269 elif test "${have_libpython}" = python2.4 -o "${have_libpython}" = python24; then
81ecdfbb
RW
9270
9271$as_echo "#define HAVE_LIBPYTHON2_4 1" >>confdefs.h
9272
81ecdfbb 9273 fi
ec685c5e
DE
9274
9275 if test "${have_libpython}" = no; then
81ecdfbb
RW
9276 case "${with_python}" in
9277 yes)
9278 as_fn_error "python is missing or unusable" "$LINENO" 5
9279 ;;
9280 auto)
9281 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
9282$as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
9283 ;;
9284 *)
9285 as_fn_error "no usable python found at ${with_python}" "$LINENO" 5
9286 ;;
9287 esac
0c4a4063
DE
9288 else
9289 if test -n "${python_prefix}"; then
9290
9291cat >>confdefs.h <<_ACEOF
9292#define WITH_PYTHON_PATH "${python_prefix}"
9293_ACEOF
9294
9295
9296 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
9297 if test "x$prefix" = xNONE; then
9298 test_prefix=/usr/local
9299 else
9300 test_prefix=$prefix
9301 fi
9302 else
9303 test_prefix=$exec_prefix
9304 fi
9305 value=0
9306 case ${python_prefix} in
9307 "${test_prefix}"|"${test_prefix}/"*|\
9308 '${exec_prefix}'|'${exec_prefix}/'*)
9309 value=1
9310 ;;
9311 esac
9312
9313cat >>confdefs.h <<_ACEOF
9314#define PYTHON_PATH_RELOCATABLE $value
9315_ACEOF
9316
9317
9318 fi
81ecdfbb 9319 fi
436868fb 9320fi
436868fb 9321
ec685c5e 9322if test "${have_libpython}" != no; then
436868fb 9323
81ecdfbb 9324$as_echo "#define HAVE_PYTHON 1" >>confdefs.h
436868fb 9325
81ecdfbb
RW
9326 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
9327 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
9328 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
94f7449c 9329 CONFIG_INSTALL="$CONFIG_INSTALL install-python"
81ecdfbb 9330 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
436868fb 9331
81ecdfbb
RW
9332 # Flags needed to compile Python code (taken from python-config --cflags).
9333 # We cannot call python-config directly because it will output whatever was
9334 # used when compiling the Python interpreter itself, including flags which
9335 # would make the python-related objects be compiled differently from the
9336 # rest of GDB (e.g., -O2 and -fPIC).
9337 if test "${GCC}" = yes; then
9338 tentative_python_cflags="-fno-strict-aliasing -DNDEBUG -fwrapv"
9339 fi
436868fb 9340
81ecdfbb
RW
9341 if test "x${tentative_python_cflags}" != x; then
9342 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
9343$as_echo_n "checking compiler flags for python code... " >&6; }
9344 for flag in ${tentative_python_cflags}; do
9345 # Check that the compiler accepts it
9346 saved_CFLAGS="$CFLAGS"
9347 CFLAGS="$CFLAGS $flag"
9348 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9349/* end confdefs.h. */
81ecdfbb 9350
a9322a30
TT
9351int
9352main ()
9353{
a9322a30
TT
9354
9355 ;
9356 return 0;
9357}
bec39cab 9358_ACEOF
81ecdfbb
RW
9359if ac_fn_c_try_compile "$LINENO"; then :
9360 PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
bec39cab 9361fi
81ecdfbb
RW
9362rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9363 CFLAGS="$saved_CFLAGS"
9364 done
9365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
9366$as_echo "${PYTHON_CFLAGS}" >&6; }
9367 fi
043b6510 9368
c83393b9
JB
9369 # On x64 Windows, Python's include headers, and pyconfig.h in
9370 # particular, rely on MS_WIN64 macro to detect that it's a 64bit
9371 # version of Windows. Unfortunately, MS_WIN64 is only defined if
9372 # _MSC_VER, a Microsoft-specific macro, is defined. So, when
9373 # building on x64 Windows with GCC, we define MS_WIN64 ourselves.
9374 # The issue was reported to the Python community, but still isn't
9375 # solved as of 2012-10-02 (http://bugs.python.org/issue4709).
9376
043b6510 9377 case "$gdb_host" in
c83393b9
JB
9378 mingw64)
9379 if test "${GCC}" = yes; then
9380 CPPFLAGS="$CPPFLAGS -DMS_WIN64"
9381 fi
9382 ;;
043b6510 9383 esac
a8db4212
YPK
9384
9385 # Note that "python -m threading" cannot be used to check for
9386 # threading support due to a bug in Python 2.7.3
9387 # (http://bugs.python.org/issue15567).
9388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether python supports threads" >&5
9389$as_echo_n "checking whether python supports threads... " >&6; }
9390 saved_CPPFLAGS="${CPPFLAGS}"
9391 CPPFLAGS="${PYTHON_CPPFLAGS}"
9392 # Note that the test is reversed so that python_has_threads=yes on
9393 # unexpected failures.
9394 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9395/* end confdefs.h. */
9396
9397#include <Python.h>
9398#ifdef WITH_THREAD
9399# error
9400#endif
9401
9402_ACEOF
9403if ac_fn_c_try_cpp "$LINENO"; then :
9404 python_has_threads=no
9405else
9406 python_has_threads=yes
9407fi
9408rm -f conftest.err conftest.$ac_ext
9409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_has_threads}" >&5
9410$as_echo "${python_has_threads}" >&6; }
9411 CPPFLAGS="${saved_CPPFLAGS}"
81ecdfbb 9412else
6dddc817
DE
9413 # Even if Python support is not compiled in, we need to have this file
9414 # included so that the "python" command, et.al., still exists.
9415 CONFIG_OBS="$CONFIG_OBS python.o"
9416 CONFIG_SRCS="$CONFIG_SRCS python/python.c"
a9322a30 9417fi
9a156167 9418
a4a1c157
PA
9419# Work around Python http://bugs.python.org/issue10112. See also
9420# http://bugs.python.org/issue11410, otherwise -Wl,--dynamic-list has
9421# no effect. Note that the only test after this that uses Python is
9422# the -rdynamic/-Wl,--dynamic-list test, and we do want that one to be
9423# run without -export-dynamic too.
9424PYTHON_LIBS=`echo $PYTHON_LIBS | sed -e 's/-Xlinker -export-dynamic//'`
9425
9426
ed3ef339
DE
9427
9428
4df42755
DE
9429 if test "${have_libpython}" != no; then
9430 HAVE_PYTHON_TRUE=
9431 HAVE_PYTHON_FALSE='#'
9432else
9433 HAVE_PYTHON_TRUE='#'
9434 HAVE_PYTHON_FALSE=
9435fi
9436
ed3ef339
DE
9437
9438# -------------------- #
9439# Check for libguile. #
9440# -------------------- #
9441
9442
e1402065
DE
9443
9444
9445
9446
9447# Check whether --with-guile was given.
9448if test "${with_guile+set}" = set; then :
9449 withval=$with_guile;
9450else
9451 with_guile=auto
9452fi
9453
9454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use guile" >&5
9455$as_echo_n "checking whether to use guile... " >&6; }
9456{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_guile" >&5
9457$as_echo "$with_guile" >&6; }
9458
ed3ef339
DE
9459# Extract the first word of "pkg-config", so it can be a program name with args.
9460set dummy pkg-config; ac_word=$2
9461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9462$as_echo_n "checking for $ac_word... " >&6; }
9463if test "${ac_cv_path_pkg_config_prog_path+set}" = set; then :
9464 $as_echo_n "(cached) " >&6
9465else
9466 case $pkg_config_prog_path in
9467 [\\/]* | ?:[\\/]*)
9468 ac_cv_path_pkg_config_prog_path="$pkg_config_prog_path" # Let the user override the test with a path.
9469 ;;
9470 *)
9471 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9472for as_dir in $PATH
9473do
9474 IFS=$as_save_IFS
9475 test -z "$as_dir" && as_dir=.
9476 for ac_exec_ext in '' $ac_executable_extensions; do
9477 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9478 ac_cv_path_pkg_config_prog_path="$as_dir/$ac_word$ac_exec_ext"
9479 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9480 break 2
9481 fi
9482done
9483 done
9484IFS=$as_save_IFS
9485
9486 test -z "$ac_cv_path_pkg_config_prog_path" && ac_cv_path_pkg_config_prog_path="missing"
9487 ;;
9488esac
9489fi
9490pkg_config_prog_path=$ac_cv_path_pkg_config_prog_path
9491if test -n "$pkg_config_prog_path"; then
9492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config_prog_path" >&5
9493$as_echo "$pkg_config_prog_path" >&6; }
9494else
9495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9496$as_echo "no" >&6; }
9497fi
9498
9499
9500
214ab2da 9501try_guile_versions="guile-2.2 guile-2.0"
ed3ef339
DE
9502have_libguile=no
9503case "${with_guile}" in
9504no)
9505 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: guile support disabled; some features will be unavailable." >&5
9506$as_echo "$as_me: WARNING: guile support disabled; some features will be unavailable." >&2;}
9507 ;;
9508auto)
e1402065
DE
9509 if test "${pkg_config_prog_path}" = "missing"; then
9510 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found, guile support disabled" >&5
9511$as_echo "$as_me: WARNING: pkg-config not found, guile support disabled" >&2;}
9512 else
ed3ef339
DE
9513
9514 pkg_config=${pkg_config_prog_path}
9515 guile_version_list=${try_guile_versions}
9516 flag_errors=no
9517
ed3ef339
DE
9518 found_usable_guile=checking
9519 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
9520$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
9521 for guile_version in ${guile_version_list}; do
9522 ${pkg_config} --exists ${guile_version} 2>/dev/null
9523 if test $? != 0; then
9524 continue
9525 fi
9526 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
9527 if test $? != 0; then
9528 as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
9529 fi
9530 new_LIBS=`${pkg_config} --libs ${guile_version}`
9531 if test $? != 0; then
9532 as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
9533 fi
9534 found_usable_guile=${guile_version}
9535 break
9536 done
9537 if test "${found_usable_guile}" = "checking"; then
9538 if test "${flag_errors}" = "yes"; then
9539 as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
9540 else
9541 found_usable_guile=no
9542 fi
9543 fi
9544 if test "${found_usable_guile}" != no; then
9545 save_CPPFLAGS=$CPPFLAGS
9546 save_LIBS=$LIBS
9547 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9548 LIBS="$LIBS $new_LIBS"
9549 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9550/* end confdefs.h. */
9551#include "libguile.h"
9552int
9553main ()
9554{
9555scm_init_guile ();
9556 ;
9557 return 0;
9558}
9559_ACEOF
9560if ac_fn_c_try_link "$LINENO"; then :
9561 have_libguile=yes
9562 GUILE_CPPFLAGS=$new_CPPFLAGS
9563 GUILE_LIBS=$new_LIBS
9564else
9565 found_usable_guile=no
9566fi
9567rm -f core conftest.err conftest.$ac_objext \
9568 conftest$ac_exeext conftest.$ac_ext
92fab5a6
AW
9569 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
9570if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then :
9571
9572$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
9573
9574
9575fi
9576
ed3ef339
DE
9577 CPPFLAGS=$save_CPPFLAGS
9578 LIBS=$save_LIBS
9579 if test "${found_usable_guile}" = no; then
9580 if test "${flag_errors}" = yes; then
9581 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9582$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9583as_fn_error "linking guile version ${guile_version} test program failed
9584See \`config.log' for more details." "$LINENO" 5; }
9585 fi
9586 fi
9587 fi
9588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
9589$as_echo "${found_usable_guile}" >&6; }
9590
e1402065 9591 fi
ed3ef339
DE
9592 ;;
9593yes)
e1402065
DE
9594 if test "${pkg_config_prog_path}" = "missing"; then
9595 as_fn_error "pkg-config not found" "$LINENO" 5
9596 fi
ed3ef339
DE
9597
9598 pkg_config=${pkg_config_prog_path}
9599 guile_version_list=${try_guile_versions}
9600 flag_errors=yes
9601
ed3ef339
DE
9602 found_usable_guile=checking
9603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
9604$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
9605 for guile_version in ${guile_version_list}; do
9606 ${pkg_config} --exists ${guile_version} 2>/dev/null
9607 if test $? != 0; then
9608 continue
9609 fi
9610 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
9611 if test $? != 0; then
9612 as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
9613 fi
9614 new_LIBS=`${pkg_config} --libs ${guile_version}`
9615 if test $? != 0; then
9616 as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
9617 fi
9618 found_usable_guile=${guile_version}
9619 break
9620 done
9621 if test "${found_usable_guile}" = "checking"; then
9622 if test "${flag_errors}" = "yes"; then
9623 as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
9624 else
9625 found_usable_guile=no
9626 fi
9627 fi
9628 if test "${found_usable_guile}" != no; then
9629 save_CPPFLAGS=$CPPFLAGS
9630 save_LIBS=$LIBS
9631 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9632 LIBS="$LIBS $new_LIBS"
9633 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9634/* end confdefs.h. */
9635#include "libguile.h"
9636int
9637main ()
9638{
9639scm_init_guile ();
9640 ;
9641 return 0;
9642}
9643_ACEOF
9644if ac_fn_c_try_link "$LINENO"; then :
9645 have_libguile=yes
9646 GUILE_CPPFLAGS=$new_CPPFLAGS
9647 GUILE_LIBS=$new_LIBS
9648else
9649 found_usable_guile=no
9650fi
9651rm -f core conftest.err conftest.$ac_objext \
9652 conftest$ac_exeext conftest.$ac_ext
92fab5a6
AW
9653 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
9654if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then :
9655
9656$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
9657
9658
9659fi
9660
ed3ef339
DE
9661 CPPFLAGS=$save_CPPFLAGS
9662 LIBS=$save_LIBS
9663 if test "${found_usable_guile}" = no; then
9664 if test "${flag_errors}" = yes; then
9665 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9666$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9667as_fn_error "linking guile version ${guile_version} test program failed
9668See \`config.log' for more details." "$LINENO" 5; }
9669 fi
9670 fi
9671 fi
9672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
9673$as_echo "${found_usable_guile}" >&6; }
9674
9675 ;;
9676[\\/]* | ?:[\\/]*)
e1402065 9677 if test -x "${with_guile}"; then
ed3ef339
DE
9678
9679 pkg_config=${with_guile}
9680 guile_version_list=${try_guile_versions}
9681 flag_errors=yes
9682
ed3ef339
DE
9683 found_usable_guile=checking
9684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
9685$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
9686 for guile_version in ${guile_version_list}; do
9687 ${pkg_config} --exists ${guile_version} 2>/dev/null
9688 if test $? != 0; then
9689 continue
9690 fi
9691 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
9692 if test $? != 0; then
9693 as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
9694 fi
9695 new_LIBS=`${pkg_config} --libs ${guile_version}`
9696 if test $? != 0; then
9697 as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
9698 fi
9699 found_usable_guile=${guile_version}
9700 break
9701 done
9702 if test "${found_usable_guile}" = "checking"; then
9703 if test "${flag_errors}" = "yes"; then
9704 as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
9705 else
9706 found_usable_guile=no
9707 fi
9708 fi
9709 if test "${found_usable_guile}" != no; then
9710 save_CPPFLAGS=$CPPFLAGS
9711 save_LIBS=$LIBS
9712 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9713 LIBS="$LIBS $new_LIBS"
9714 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9715/* end confdefs.h. */
9716#include "libguile.h"
9717int
9718main ()
9719{
9720scm_init_guile ();
9721 ;
9722 return 0;
9723}
9724_ACEOF
9725if ac_fn_c_try_link "$LINENO"; then :
9726 have_libguile=yes
9727 GUILE_CPPFLAGS=$new_CPPFLAGS
9728 GUILE_LIBS=$new_LIBS
9729else
9730 found_usable_guile=no
9731fi
9732rm -f core conftest.err conftest.$ac_objext \
9733 conftest$ac_exeext conftest.$ac_ext
92fab5a6
AW
9734 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
9735if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then :
9736
9737$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
9738
9739
9740fi
9741
ed3ef339
DE
9742 CPPFLAGS=$save_CPPFLAGS
9743 LIBS=$save_LIBS
9744 if test "${found_usable_guile}" = no; then
9745 if test "${flag_errors}" = yes; then
9746 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9747$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9748as_fn_error "linking guile version ${guile_version} test program failed
9749See \`config.log' for more details." "$LINENO" 5; }
9750 fi
9751 fi
9752 fi
9753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
9754$as_echo "${found_usable_guile}" >&6; }
9755
e1402065
DE
9756 else
9757 as_fn_error "Guile config program not executable: ${with_guile}" "$LINENO" 5
9758 fi
ed3ef339
DE
9759 ;;
9760"" | */*)
9761 # Disallow --with=guile="" and --with-guile=foo/bar.
9762 as_fn_error "invalid value for --with-guile" "$LINENO" 5
9763 ;;
9764*)
9765 # A space separate list of guile versions to try, in order.
e1402065
DE
9766 if test "${pkg_config_prog_path}" = "missing"; then
9767 as_fn_error "pkg-config not found" "$LINENO" 5
9768 fi
ed3ef339
DE
9769
9770 pkg_config=${pkg_config_prog_path}
9771 guile_version_list=${with_guile}
9772 flag_errors=yes
9773
ed3ef339
DE
9774 found_usable_guile=checking
9775 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
9776$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
9777 for guile_version in ${guile_version_list}; do
9778 ${pkg_config} --exists ${guile_version} 2>/dev/null
9779 if test $? != 0; then
9780 continue
9781 fi
9782 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
9783 if test $? != 0; then
9784 as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
9785 fi
9786 new_LIBS=`${pkg_config} --libs ${guile_version}`
9787 if test $? != 0; then
9788 as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
9789 fi
9790 found_usable_guile=${guile_version}
9791 break
9792 done
9793 if test "${found_usable_guile}" = "checking"; then
9794 if test "${flag_errors}" = "yes"; then
9795 as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
9796 else
9797 found_usable_guile=no
9798 fi
9799 fi
9800 if test "${found_usable_guile}" != no; then
9801 save_CPPFLAGS=$CPPFLAGS
9802 save_LIBS=$LIBS
9803 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9804 LIBS="$LIBS $new_LIBS"
9805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9806/* end confdefs.h. */
9807#include "libguile.h"
9808int
9809main ()
9810{
9811scm_init_guile ();
9812 ;
9813 return 0;
9814}
9815_ACEOF
9816if ac_fn_c_try_link "$LINENO"; then :
9817 have_libguile=yes
9818 GUILE_CPPFLAGS=$new_CPPFLAGS
9819 GUILE_LIBS=$new_LIBS
9820else
9821 found_usable_guile=no
9822fi
9823rm -f core conftest.err conftest.$ac_objext \
9824 conftest$ac_exeext conftest.$ac_ext
92fab5a6
AW
9825 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
9826if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then :
9827
9828$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
9829
9830
9831fi
9832
ed3ef339
DE
9833 CPPFLAGS=$save_CPPFLAGS
9834 LIBS=$save_LIBS
9835 if test "${found_usable_guile}" = no; then
9836 if test "${flag_errors}" = yes; then
9837 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9838$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9839as_fn_error "linking guile version ${guile_version} test program failed
9840See \`config.log' for more details." "$LINENO" 5; }
9841 fi
9842 fi
9843 fi
9844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
9845$as_echo "${found_usable_guile}" >&6; }
9846
9847 ;;
9848esac
9849
e76c5d17 9850if test "${have_libguile}" != no; then
d342a0da
DE
9851 case "${with_guile}" in
9852 [\\/]* | ?:[\\/]*)
e76c5d17
DE
9853
9854 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
9855$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
9856if test "${ac_cv_guild_program_name+set}" = set; then :
9857 $as_echo_n "(cached) " >&6
9858else
d342a0da 9859 ac_cv_guild_program_name="`"${with_guile}" --variable guild "${guile_version}"`"
e76c5d17
DE
9860
9861 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
9862 # the 'guild' and 'bindir' variables. In that case, try to guess
9863 # what the program name is, at the risk of getting it wrong if
9864 # Guile was configured with '--program-suffix' or similar.
9865 if test "x$ac_cv_guild_program_name" = "x"; then
d342a0da 9866 guile_exec_prefix="`"${with_guile}" --variable exec_prefix "${guile_version}"`"
e76c5d17
DE
9867 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
9868 fi
9869
9870fi
9871{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
9872$as_echo "$ac_cv_guild_program_name" >&6; }
9873
9874 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
9875 as_fn_error "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
9876 fi
9877
9878 GUILD="$ac_cv_guild_program_name"
9879
9880
d342a0da
DE
9881 ;;
9882 *)
9883
9884 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
9885$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
9886if test "${ac_cv_guild_program_name+set}" = set; then :
9887 $as_echo_n "(cached) " >&6
9888else
9889 ac_cv_guild_program_name="`"${pkg_config_prog_path}" --variable guild "${guile_version}"`"
9890
9891 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
9892 # the 'guild' and 'bindir' variables. In that case, try to guess
9893 # what the program name is, at the risk of getting it wrong if
9894 # Guile was configured with '--program-suffix' or similar.
9895 if test "x$ac_cv_guild_program_name" = "x"; then
9896 guile_exec_prefix="`"${pkg_config_prog_path}" --variable exec_prefix "${guile_version}"`"
9897 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
9898 fi
9899
9900fi
9901{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
9902$as_echo "$ac_cv_guild_program_name" >&6; }
9903
9904 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
9905 as_fn_error "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
9906 fi
9907
9908 GUILD="$ac_cv_guild_program_name"
9909
9910
9911 ;;
9912 esac
e76c5d17
DE
9913
9914
9915 if test "$cross_compiling" = no; then
9916 GUILD_TARGET_FLAG=
9917 else
9918 GUILD_TARGET_FLAG="--target=$host"
9919 fi
9920
9921
9922
9923
9924 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether guild supports this host" >&5
9925$as_echo_n "checking whether guild supports this host... " >&6; }
9926if test "${ac_cv_guild_ok+set}" = set; then :
9927 $as_echo_n "(cached) " >&6
9928else
9929 echo "$ac_cv_guild_program_name compile $GUILD_TARGET_FLAG -o conftest.go $srcdir/guile/lib/gdb/support.scm" >&5
9930 if "$ac_cv_guild_program_name" compile $GUILD_TARGET_FLAG -o conftest.go "$srcdir/guile/lib/gdb/support.scm" >&5 2>&5; then
9931 ac_cv_guild_ok=yes
9932 else
9933 ac_cv_guild_ok=no
9934 fi
9935fi
9936{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_ok" >&5
9937$as_echo "$ac_cv_guild_ok" >&6; }
9938
9939 if test "$ac_cv_guild_ok" = no; then
9940 have_libguile=no
9941 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling guile support" >&5
9942$as_echo "$as_me: WARNING: disabling guile support" >&2;}
9943 fi
9944fi
9945
ed3ef339
DE
9946if test "${have_libguile}" != no; then
9947
9948$as_echo "#define HAVE_GUILE 1" >>confdefs.h
9949
9950 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_GUILE_OBS)"
9951 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_GUILE_DEPS)"
9952 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_GUILE_SRCS)"
9953 CONFIG_INSTALL="$CONFIG_INSTALL install-guile"
9954 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_GUILE_CFLAGS)"
16954d5d
LC
9955
9956 save_LIBS="$LIBS"
9957 save_CPPFLAGS="$CPPFLAGS"
9958 LIBS="$GUILE_LIBS"
9959 CPPFLAGS="$GUILE_CPPFLAGS"
9960 for ac_func in scm_new_smob
9961do :
9962 ac_fn_c_check_func "$LINENO" "scm_new_smob" "ac_cv_func_scm_new_smob"
9963if test "x$ac_cv_func_scm_new_smob" = x""yes; then :
9964 cat >>confdefs.h <<_ACEOF
9965#define HAVE_SCM_NEW_SMOB 1
9966_ACEOF
9967
9968fi
9969done
9970
9971 LIBS="$save_LIBS"
9972 CPPFLAGS="$save_CPPFLAGS"
ed3ef339
DE
9973else
9974 # Even if Guile support is not compiled in, we need to have these files
9975 # included.
9976 CONFIG_OBS="$CONFIG_OBS guile.o"
9977 CONFIG_SRCS="$CONFIG_SRCS guile/guile.c"
9978fi
9a156167 9979
ac534cba 9980
4df42755
DE
9981 if test "${have_libguile}" != no; then
9982 HAVE_GUILE_TRUE=
9983 HAVE_GUILE_FALSE='#'
9984else
9985 HAVE_GUILE_TRUE='#'
9986 HAVE_GUILE_FALSE=
9987fi
9988
ac534cba 9989
d344e670
DE
9990# --------------------- #
9991# Check for libmcheck. #
9992# --------------------- #
9993
a8db4212
YPK
9994# Enable -lmcheck by default (it provides cheap-enough memory mangling),
9995# but turn it off if Python is enabled with threads, since -lmcheck is
9996# not thread safe (http://sourceware.org/bugzilla/show_bug.cgi?id=9939),
9997# and for releases.
17ef446e
PA
9998if test \( "${have_libpython}" = "no" -o "${python_has_threads}" = "no" \) \
9999 && $development; then
10000 libmcheck_default=yes
10001else
10002 libmcheck_default=no
a8db4212
YPK
10003fi
10004
17ef446e
PA
10005 # Check whether --enable-libmcheck was given.
10006if test "${enable_libmcheck+set}" = set; then :
10007 enableval=$enable_libmcheck; case "${enableval}" in
10008 yes | y) ENABLE_LIBMCHECK="yes" ;;
10009 no | n) ENABLE_LIBMCHECK="no" ;;
10010 *) as_fn_error "bad value ${enableval} for --enable-libmcheck" "$LINENO" 5 ;;
10011 esac
10012fi
10013
10014
10015 if test -z "${ENABLE_LIBMCHECK}"; then
10016 ENABLE_LIBMCHECK=${libmcheck_default}
a8db4212 10017 fi
17ef446e
PA
10018
10019 if test "$ENABLE_LIBMCHECK" = "yes" ; then
10020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lmcheck" >&5
a8db4212
YPK
10021$as_echo_n "checking for main in -lmcheck... " >&6; }
10022if test "${ac_cv_lib_mcheck_main+set}" = set; then :
10023 $as_echo_n "(cached) " >&6
10024else
10025 ac_check_lib_save_LIBS=$LIBS
10026LIBS="-lmcheck $LIBS"
10027cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10028/* end confdefs.h. */
10029
10030
10031int
10032main ()
10033{
10034return main ();
10035 ;
10036 return 0;
10037}
10038_ACEOF
10039if ac_fn_c_try_link "$LINENO"; then :
10040 ac_cv_lib_mcheck_main=yes
10041else
10042 ac_cv_lib_mcheck_main=no
10043fi
10044rm -f core conftest.err conftest.$ac_objext \
10045 conftest$ac_exeext conftest.$ac_ext
10046LIBS=$ac_check_lib_save_LIBS
10047fi
10048{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mcheck_main" >&5
10049$as_echo "$ac_cv_lib_mcheck_main" >&6; }
10050if test "x$ac_cv_lib_mcheck_main" = x""yes; then :
10051 cat >>confdefs.h <<_ACEOF
10052#define HAVE_LIBMCHECK 1
10053_ACEOF
10054
10055 LIBS="-lmcheck $LIBS"
10056
10057fi
10058
17ef446e
PA
10059 fi
10060
10061
10062if test "$ENABLE_LIBMCHECK" = "yes" \
10063 -a "${have_libpython}" != "no" \
10064 -a "${python_has_threads}" = "yes" ; then
10065 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&5
10066$as_echo "$as_me: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&2;}
a8db4212
YPK
10067fi
10068
58bfce93
MM
10069
10070# Check whether --with-intel_pt was given.
10071if test "${with_intel_pt+set}" = set; then :
10072 withval=$with_intel_pt;
10073else
10074 with_intel_pt=auto
10075fi
10076
10077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5
10078$as_echo_n "checking whether to use intel pt... " >&6; }
10079{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5
10080$as_echo "$with_intel_pt" >&6; }
10081
10082if test "${with_intel_pt}" = no; then
bc504a31
PA
10083 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&5
10084$as_echo "$as_me: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&2;}
58bfce93
MM
10085 HAVE_LIBIPT=no
10086else
5599c404
MM
10087 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10088/* end confdefs.h. */
10089
10090#include <linux/perf_event.h>
10091#ifndef PERF_ATTR_SIZE_VER5
10092# error
10093#endif
10094
10095_ACEOF
10096if ac_fn_c_try_cpp "$LINENO"; then :
10097 perf_event=yes
10098else
10099 perf_event=no
10100fi
10101rm -f conftest.err conftest.$ac_ext
10102 if test "$perf_event" != yes; then
10103 if test "$with_intel_pt" = yes; then
10104 as_fn_error "linux/perf_event.h missing or too old" "$LINENO" 5
10105 else
10106 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5
10107$as_echo "$as_me: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&2;}
10108 fi
10109 fi
10110
58bfce93
MM
10111
10112
10113
10114
10115
10116
10117
10118
10119 use_additional=yes
10120
10121 acl_save_prefix="$prefix"
10122 prefix="$acl_final_prefix"
10123 acl_save_exec_prefix="$exec_prefix"
10124 exec_prefix="$acl_final_exec_prefix"
10125
10126 eval additional_includedir=\"$includedir\"
10127 eval additional_libdir=\"$libdir\"
10128
10129 exec_prefix="$acl_save_exec_prefix"
10130 prefix="$acl_save_prefix"
10131
10132
10133# Check whether --with-libipt-prefix was given.
10134if test "${with_libipt_prefix+set}" = set; then :
10135 withval=$with_libipt_prefix;
10136 if test "X$withval" = "Xno"; then
10137 use_additional=no
10138 else
10139 if test "X$withval" = "X"; then
10140
10141 acl_save_prefix="$prefix"
10142 prefix="$acl_final_prefix"
10143 acl_save_exec_prefix="$exec_prefix"
10144 exec_prefix="$acl_final_exec_prefix"
10145
10146 eval additional_includedir=\"$includedir\"
10147 eval additional_libdir=\"$libdir\"
10148
10149 exec_prefix="$acl_save_exec_prefix"
10150 prefix="$acl_save_prefix"
10151
10152 else
10153 additional_includedir="$withval/include"
10154 additional_libdir="$withval/lib"
10155 fi
10156 fi
10157
10158fi
10159
10160 LIBIPT=
10161 LTLIBIPT=
10162 INCIPT=
10163 rpathdirs=
10164 ltrpathdirs=
10165 names_already_handled=
10166 names_next_round='ipt '
10167 while test -n "$names_next_round"; do
10168 names_this_round="$names_next_round"
10169 names_next_round=
10170 for name in $names_this_round; do
10171 already_handled=
10172 for n in $names_already_handled; do
10173 if test "$n" = "$name"; then
10174 already_handled=yes
10175 break
10176 fi
10177 done
10178 if test -z "$already_handled"; then
10179 names_already_handled="$names_already_handled $name"
10180 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
10181 eval value=\"\$HAVE_LIB$uppername\"
10182 if test -n "$value"; then
10183 if test "$value" = yes; then
10184 eval value=\"\$LIB$uppername\"
10185 test -z "$value" || LIBIPT="${LIBIPT}${LIBIPT:+ }$value"
10186 eval value=\"\$LTLIB$uppername\"
10187 test -z "$value" || LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$value"
10188 else
10189 :
10190 fi
10191 else
10192 found_dir=
10193 found_la=
10194 found_so=
10195 found_a=
10196 if test $use_additional = yes; then
10197 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
10198 found_dir="$additional_libdir"
10199 found_so="$additional_libdir/lib$name.$shlibext"
10200 if test -f "$additional_libdir/lib$name.la"; then
10201 found_la="$additional_libdir/lib$name.la"
10202 fi
10203 else
10204 if test -f "$additional_libdir/lib$name.$libext"; then
10205 found_dir="$additional_libdir"
10206 found_a="$additional_libdir/lib$name.$libext"
10207 if test -f "$additional_libdir/lib$name.la"; then
10208 found_la="$additional_libdir/lib$name.la"
10209 fi
10210 fi
10211 fi
10212 fi
10213 if test "X$found_dir" = "X"; then
10214 for x in $LDFLAGS $LTLIBIPT; do
10215
10216 acl_save_prefix="$prefix"
10217 prefix="$acl_final_prefix"
10218 acl_save_exec_prefix="$exec_prefix"
10219 exec_prefix="$acl_final_exec_prefix"
10220 eval x=\"$x\"
10221 exec_prefix="$acl_save_exec_prefix"
10222 prefix="$acl_save_prefix"
10223
10224 case "$x" in
10225 -L*)
10226 dir=`echo "X$x" | sed -e 's/^X-L//'`
10227 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
10228 found_dir="$dir"
10229 found_so="$dir/lib$name.$shlibext"
10230 if test -f "$dir/lib$name.la"; then
10231 found_la="$dir/lib$name.la"
10232 fi
10233 else
10234 if test -f "$dir/lib$name.$libext"; then
10235 found_dir="$dir"
10236 found_a="$dir/lib$name.$libext"
10237 if test -f "$dir/lib$name.la"; then
10238 found_la="$dir/lib$name.la"
10239 fi
10240 fi
10241 fi
10242 ;;
10243 esac
10244 if test "X$found_dir" != "X"; then
10245 break
10246 fi
10247 done
10248 fi
10249 if test "X$found_dir" != "X"; then
10250 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$found_dir -l$name"
10251 if test "X$found_so" != "X"; then
10252 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
10253 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
10254 else
10255 haveit=
10256 for x in $ltrpathdirs; do
10257 if test "X$x" = "X$found_dir"; then
10258 haveit=yes
10259 break
10260 fi
10261 done
10262 if test -z "$haveit"; then
10263 ltrpathdirs="$ltrpathdirs $found_dir"
10264 fi
10265 if test "$hardcode_direct" = yes; then
10266 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
10267 else
10268 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
10269 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
10270 haveit=
10271 for x in $rpathdirs; do
10272 if test "X$x" = "X$found_dir"; then
10273 haveit=yes
10274 break
10275 fi
10276 done
10277 if test -z "$haveit"; then
10278 rpathdirs="$rpathdirs $found_dir"
10279 fi
10280 else
10281 haveit=
10282 for x in $LDFLAGS $LIBIPT; do
10283
10284 acl_save_prefix="$prefix"
10285 prefix="$acl_final_prefix"
10286 acl_save_exec_prefix="$exec_prefix"
10287 exec_prefix="$acl_final_exec_prefix"
10288 eval x=\"$x\"
10289 exec_prefix="$acl_save_exec_prefix"
10290 prefix="$acl_save_prefix"
10291
10292 if test "X$x" = "X-L$found_dir"; then
10293 haveit=yes
10294 break
10295 fi
10296 done
10297 if test -z "$haveit"; then
10298 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir"
10299 fi
10300 if test "$hardcode_minus_L" != no; then
10301 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
10302 else
10303 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
10304 fi
10305 fi
10306 fi
10307 fi
10308 else
10309 if test "X$found_a" != "X"; then
10310 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_a"
10311 else
10312 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir -l$name"
10313 fi
10314 fi
10315 additional_includedir=
10316 case "$found_dir" in
10317 */lib | */lib/)
10318 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
10319 additional_includedir="$basedir/include"
10320 ;;
10321 esac
10322 if test "X$additional_includedir" != "X"; then
10323 if test "X$additional_includedir" != "X/usr/include"; then
10324 haveit=
10325 if test "X$additional_includedir" = "X/usr/local/include"; then
10326 if test -n "$GCC"; then
10327 case $host_os in
10328 linux*) haveit=yes;;
10329 esac
10330 fi
10331 fi
10332 if test -z "$haveit"; then
10333 for x in $CPPFLAGS $INCIPT; do
10334
10335 acl_save_prefix="$prefix"
10336 prefix="$acl_final_prefix"
10337 acl_save_exec_prefix="$exec_prefix"
10338 exec_prefix="$acl_final_exec_prefix"
10339 eval x=\"$x\"
10340 exec_prefix="$acl_save_exec_prefix"
10341 prefix="$acl_save_prefix"
10342
10343 if test "X$x" = "X-I$additional_includedir"; then
10344 haveit=yes
10345 break
10346 fi
10347 done
10348 if test -z "$haveit"; then
10349 if test -d "$additional_includedir"; then
10350 INCIPT="${INCIPT}${INCIPT:+ }-I$additional_includedir"
10351 fi
10352 fi
10353 fi
10354 fi
10355 fi
10356 if test -n "$found_la"; then
10357 save_libdir="$libdir"
10358 case "$found_la" in
10359 */* | *\\*) . "$found_la" ;;
10360 *) . "./$found_la" ;;
10361 esac
10362 libdir="$save_libdir"
10363 for dep in $dependency_libs; do
10364 case "$dep" in
10365 -L*)
10366 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10367 if test "X$additional_libdir" != "X/usr/lib"; then
10368 haveit=
10369 if test "X$additional_libdir" = "X/usr/local/lib"; then
10370 if test -n "$GCC"; then
10371 case $host_os in
10372 linux*) haveit=yes;;
10373 esac
10374 fi
10375 fi
10376 if test -z "$haveit"; then
10377 haveit=
10378 for x in $LDFLAGS $LIBIPT; do
10379
10380 acl_save_prefix="$prefix"
10381 prefix="$acl_final_prefix"
10382 acl_save_exec_prefix="$exec_prefix"
10383 exec_prefix="$acl_final_exec_prefix"
10384 eval x=\"$x\"
10385 exec_prefix="$acl_save_exec_prefix"
10386 prefix="$acl_save_prefix"
10387
10388 if test "X$x" = "X-L$additional_libdir"; then
10389 haveit=yes
10390 break
10391 fi
10392 done
10393 if test -z "$haveit"; then
10394 if test -d "$additional_libdir"; then
10395 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$additional_libdir"
10396 fi
10397 fi
10398 haveit=
10399 for x in $LDFLAGS $LTLIBIPT; do
10400
10401 acl_save_prefix="$prefix"
10402 prefix="$acl_final_prefix"
10403 acl_save_exec_prefix="$exec_prefix"
10404 exec_prefix="$acl_final_exec_prefix"
10405 eval x=\"$x\"
10406 exec_prefix="$acl_save_exec_prefix"
10407 prefix="$acl_save_prefix"
10408
10409 if test "X$x" = "X-L$additional_libdir"; then
10410 haveit=yes
10411 break
10412 fi
10413 done
10414 if test -z "$haveit"; then
10415 if test -d "$additional_libdir"; then
10416 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$additional_libdir"
10417 fi
10418 fi
10419 fi
10420 fi
10421 ;;
10422 -R*)
10423 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10424 if test "$enable_rpath" != no; then
10425 haveit=
10426 for x in $rpathdirs; do
10427 if test "X$x" = "X$dir"; then
10428 haveit=yes
10429 break
10430 fi
10431 done
10432 if test -z "$haveit"; then
10433 rpathdirs="$rpathdirs $dir"
10434 fi
10435 haveit=
10436 for x in $ltrpathdirs; do
10437 if test "X$x" = "X$dir"; then
10438 haveit=yes
10439 break
10440 fi
10441 done
10442 if test -z "$haveit"; then
10443 ltrpathdirs="$ltrpathdirs $dir"
10444 fi
10445 fi
10446 ;;
10447 -l*)
10448 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10449 ;;
10450 *.la)
10451 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10452 ;;
10453 *)
10454 LIBIPT="${LIBIPT}${LIBIPT:+ }$dep"
10455 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$dep"
10456 ;;
10457 esac
10458 done
10459 fi
10460 else
10461 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
10462 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l$name"
10463 fi
10464 fi
10465 fi
10466 done
10467 done
10468 if test "X$rpathdirs" != "X"; then
10469 if test -n "$hardcode_libdir_separator"; then
10470 alldirs=
10471 for found_dir in $rpathdirs; do
10472 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10473 done
10474 acl_save_libdir="$libdir"
10475 libdir="$alldirs"
10476 eval flag=\"$hardcode_libdir_flag_spec\"
10477 libdir="$acl_save_libdir"
10478 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
10479 else
10480 for found_dir in $rpathdirs; do
10481 acl_save_libdir="$libdir"
10482 libdir="$found_dir"
10483 eval flag=\"$hardcode_libdir_flag_spec\"
10484 libdir="$acl_save_libdir"
10485 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
10486 done
10487 fi
10488 fi
10489 if test "X$ltrpathdirs" != "X"; then
10490 for found_dir in $ltrpathdirs; do
10491 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-R$found_dir"
10492 done
10493 fi
10494
10495
10496 ac_save_CPPFLAGS="$CPPFLAGS"
10497
10498 for element in $INCIPT; do
10499 haveit=
10500 for x in $CPPFLAGS; do
10501
10502 acl_save_prefix="$prefix"
10503 prefix="$acl_final_prefix"
10504 acl_save_exec_prefix="$exec_prefix"
10505 exec_prefix="$acl_final_exec_prefix"
10506 eval x=\"$x\"
10507 exec_prefix="$acl_save_exec_prefix"
10508 prefix="$acl_save_prefix"
10509
10510 if test "X$x" = "X$element"; then
10511 haveit=yes
10512 break
10513 fi
10514 done
10515 if test -z "$haveit"; then
10516 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10517 fi
10518 done
10519
10520
10521 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libipt" >&5
10522$as_echo_n "checking for libipt... " >&6; }
10523if test "${ac_cv_libipt+set}" = set; then :
10524 $as_echo_n "(cached) " >&6
10525else
10526
10527 ac_save_LIBS="$LIBS"
10528 LIBS="$LIBS $LIBIPT"
10529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10530/* end confdefs.h. */
10531#include "intel-pt.h"
10532int
10533main ()
10534{
10535pt_insn_alloc_decoder (0);
10536 ;
10537 return 0;
10538}
10539_ACEOF
10540if ac_fn_c_try_link "$LINENO"; then :
10541 ac_cv_libipt=yes
10542else
10543 ac_cv_libipt=no
10544fi
10545rm -f core conftest.err conftest.$ac_objext \
10546 conftest$ac_exeext conftest.$ac_ext
10547 LIBS="$ac_save_LIBS"
10548
10549fi
10550{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libipt" >&5
10551$as_echo "$ac_cv_libipt" >&6; }
10552 if test "$ac_cv_libipt" = yes; then
10553 HAVE_LIBIPT=yes
10554
10555$as_echo "#define HAVE_LIBIPT 1" >>confdefs.h
10556
10557 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libipt" >&5
10558$as_echo_n "checking how to link with libipt... " >&6; }
10559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBIPT" >&5
10560$as_echo "$LIBIPT" >&6; }
10561 else
10562 HAVE_LIBIPT=no
10563 CPPFLAGS="$ac_save_CPPFLAGS"
10564 LIBIPT=
10565 LTLIBIPT=
10566 fi
10567
10568
10569
10570
10571
10572
10573 if test "$HAVE_LIBIPT" != yes; then
10574 if test "$with_intel_pt" = yes; then
10575 as_fn_error "libipt is missing or unusable" "$LINENO" 5
10576 else
10577 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5
10578$as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be unavailable." >&2;}
10579 fi
10580 fi
10581fi
10582
81ecdfbb
RW
10583# ------------------------- #
10584# Checks for header files. #
10585# ------------------------- #
c890192f 10586
81ecdfbb
RW
10587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
10588$as_echo_n "checking for ANSI C header files... " >&6; }
10589if test "${ac_cv_header_stdc+set}" = set; then :
10590 $as_echo_n "(cached) " >&6
bec39cab 10591else
81ecdfbb 10592 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10593/* end confdefs.h. */
81ecdfbb
RW
10594#include <stdlib.h>
10595#include <stdarg.h>
10596#include <string.h>
10597#include <float.h>
10598
a9322a30
TT
10599int
10600main ()
10601{
a9322a30
TT
10602
10603 ;
10604 return 0;
10605}
bec39cab 10606_ACEOF
81ecdfbb
RW
10607if ac_fn_c_try_compile "$LINENO"; then :
10608 ac_cv_header_stdc=yes
bec39cab 10609else
81ecdfbb 10610 ac_cv_header_stdc=no
a9322a30 10611fi
81ecdfbb 10612rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 10613
81ecdfbb
RW
10614if test $ac_cv_header_stdc = yes; then
10615 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10616 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10617/* end confdefs.h. */
10618#include <string.h>
bec39cab 10619
81ecdfbb
RW
10620_ACEOF
10621if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10622 $EGREP "memchr" >/dev/null 2>&1; then :
bec39cab 10623
bec39cab 10624else
81ecdfbb
RW
10625 ac_cv_header_stdc=no
10626fi
10627rm -f conftest*
10628
10629fi
10630
10631if test $ac_cv_header_stdc = yes; then
10632 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10633 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10634/* end confdefs.h. */
10635#include <stdlib.h>
10636
bec39cab 10637_ACEOF
81ecdfbb
RW
10638if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10639 $EGREP "free" >/dev/null 2>&1; then :
06825bd1 10640
81ecdfbb
RW
10641else
10642 ac_cv_header_stdc=no
10643fi
10644rm -f conftest*
bec39cab 10645
bec39cab 10646fi
81ecdfbb
RW
10647
10648if test $ac_cv_header_stdc = yes; then
10649 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10650 if test "$cross_compiling" = yes; then :
10651 :
bec39cab 10652else
81ecdfbb 10653 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10654/* end confdefs.h. */
81ecdfbb
RW
10655#include <ctype.h>
10656#include <stdlib.h>
10657#if ((' ' & 0x0FF) == 0x020)
10658# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10659# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10660#else
10661# define ISLOWER(c) \
10662 (('a' <= (c) && (c) <= 'i') \
10663 || ('j' <= (c) && (c) <= 'r') \
10664 || ('s' <= (c) && (c) <= 'z'))
10665# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10666#endif
10667
10668#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
a9322a30
TT
10669int
10670main ()
10671{
81ecdfbb
RW
10672 int i;
10673 for (i = 0; i < 256; i++)
10674 if (XOR (islower (i), ISLOWER (i))
10675 || toupper (i) != TOUPPER (i))
10676 return 2;
a9322a30
TT
10677 return 0;
10678}
bec39cab 10679_ACEOF
81ecdfbb
RW
10680if ac_fn_c_try_run "$LINENO"; then :
10681
bec39cab 10682else
81ecdfbb
RW
10683 ac_cv_header_stdc=no
10684fi
10685rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10686 conftest.$ac_objext conftest.beam conftest.$ac_ext
10687fi
bec39cab 10688
bec39cab 10689fi
a9322a30 10690fi
81ecdfbb
RW
10691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
10692$as_echo "$ac_cv_header_stdc" >&6; }
10693if test $ac_cv_header_stdc = yes; then
bec39cab 10694
81ecdfbb 10695$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5ee754fc 10696
81ecdfbb 10697fi
bec39cab 10698
81ecdfbb 10699# elf_hp.h is for HP/UX 64-bit shared library support.
9467110b 10700for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
161d1bec 10701 thread_db.h \
0080a2f6 10702 sys/fault.h \
81ecdfbb
RW
10703 sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
10704 sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
10705 sys/reg.h sys/debugreg.h sys/select.h sys/syscall.h \
9467110b 10706 termios.h termio.h \
3447c057 10707 sgtty.h elf_hp.h \
9467110b 10708 dlfcn.h
81ecdfbb
RW
10709do :
10710 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10711ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
10712eval as_val=\$$as_ac_Header
10713 if test "x$as_val" = x""yes; then :
bec39cab 10714 cat >>confdefs.h <<_ACEOF
81ecdfbb 10715#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 10716_ACEOF
c906108c 10717
bec39cab 10718fi
81ecdfbb
RW
10719
10720done
10721
81ecdfbb
RW
10722for ac_header in sys/proc.h
10723do :
10724 ac_fn_c_check_header_compile "$LINENO" "sys/proc.h" "ac_cv_header_sys_proc_h" "#if HAVE_SYS_PARAM_H
10725# include <sys/param.h>
10726#endif
c906108c 10727
81ecdfbb
RW
10728"
10729if test "x$ac_cv_header_sys_proc_h" = x""yes; then :
bec39cab 10730 cat >>confdefs.h <<_ACEOF
81ecdfbb 10731#define HAVE_SYS_PROC_H 1
bec39cab 10732_ACEOF
5ee754fc 10733
bec39cab 10734fi
81ecdfbb
RW
10735
10736done
10737
10738for ac_header in sys/user.h
10739do :
10740 ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
10741# include <sys/param.h>
a9322a30
TT
10742#endif
10743
81ecdfbb
RW
10744"
10745if test "x$ac_cv_header_sys_user_h" = x""yes; then :
10746 cat >>confdefs.h <<_ACEOF
10747#define HAVE_SYS_USER_H 1
bec39cab 10748_ACEOF
bec39cab 10749
a9322a30 10750fi
bec39cab 10751
81ecdfbb 10752done
5ee754fc 10753
5ee754fc 10754
81ecdfbb
RW
10755# On Solaris 2.[789], we need to define _MSE_INT_H to avoid a clash
10756# between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
10757# think that we don't have <curses.h> if we're using GCC.
10758case $host_os in
10759 solaris2.[789])
10760 if test "$GCC" = yes; then
10761
10762$as_echo "#define _MSE_INT_H 1" >>confdefs.h
10763
10764 fi ;;
10765esac
10766for ac_header in curses.h cursesX.h ncurses.h ncurses/ncurses.h ncurses/term.h
10767do :
10768 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10769ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
10770eval as_val=\$$as_ac_Header
10771 if test "x$as_val" = x""yes; then :
bec39cab 10772 cat >>confdefs.h <<_ACEOF
81ecdfbb 10773#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 10774_ACEOF
5ee754fc
MK
10775
10776fi
10777
81ecdfbb 10778done
bec39cab 10779
81ecdfbb
RW
10780for ac_header in term.h
10781do :
10782 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
10783# include <curses.h>
10784#endif
bec39cab 10785
81ecdfbb
RW
10786"
10787if test "x$ac_cv_header_term_h" = x""yes; then :
10788 cat >>confdefs.h <<_ACEOF
10789#define HAVE_TERM_H 1
a8111142 10790_ACEOF
a8111142 10791
a8111142 10792fi
a8111142 10793
81ecdfbb 10794done
a8111142
TT
10795
10796
81ecdfbb
RW
10797# ------------------------- #
10798# Checks for declarations. #
10799# ------------------------- #
a9322a30 10800
07697489
PA
10801
10802 # Check for presence and size of long long.
10803 ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
10804if test "x$ac_cv_type_long_long" = x""yes; then :
10805
10806cat >>confdefs.h <<_ACEOF
10807#define HAVE_LONG_LONG 1
10808_ACEOF
10809
10810# The cast to long int works around a bug in the HP C Compiler
10811# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10812# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10813# This bug is HP SR number 8606223364.
10814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
10815$as_echo_n "checking size of long long... " >&6; }
10816if test "${ac_cv_sizeof_long_long+set}" = set; then :
10817 $as_echo_n "(cached) " >&6
10818else
10819 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
10820
10821else
10822 if test "$ac_cv_type_long_long" = yes; then
10823 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10824$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10825{ as_fn_set_status 77
10826as_fn_error "cannot compute sizeof (long long)
10827See \`config.log' for more details." "$LINENO" 5; }; }
10828 else
10829 ac_cv_sizeof_long_long=0
10830 fi
10831fi
10832
10833fi
10834{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
10835$as_echo "$ac_cv_sizeof_long_long" >&6; }
10836
10837
10838
10839cat >>confdefs.h <<_ACEOF
10840#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
10841_ACEOF
10842
10843
10844fi
10845
10846
10847 ac_fn_c_check_decl "$LINENO" "basename(char *)" "ac_cv_have_decl_basename_char_p_" "$ac_includes_default"
10848if test "x$ac_cv_have_decl_basename_char_p_" = x""yes; then :
10849 ac_have_decl=1
10850else
10851 ac_have_decl=0
10852fi
10853
10854cat >>confdefs.h <<_ACEOF
10855#define HAVE_DECL_BASENAME $ac_have_decl
10856_ACEOF
10857ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default"
10858if test "x$ac_cv_have_decl_ffs" = x""yes; then :
10859 ac_have_decl=1
10860else
10861 ac_have_decl=0
10862fi
10863
10864cat >>confdefs.h <<_ACEOF
10865#define HAVE_DECL_FFS $ac_have_decl
10866_ACEOF
10867ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default"
10868if test "x$ac_cv_have_decl_asprintf" = x""yes; then :
10869 ac_have_decl=1
10870else
10871 ac_have_decl=0
10872fi
10873
10874cat >>confdefs.h <<_ACEOF
10875#define HAVE_DECL_ASPRINTF $ac_have_decl
10876_ACEOF
10877ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
10878if test "x$ac_cv_have_decl_vasprintf" = x""yes; then :
10879 ac_have_decl=1
10880else
10881 ac_have_decl=0
10882fi
10883
10884cat >>confdefs.h <<_ACEOF
10885#define HAVE_DECL_VASPRINTF $ac_have_decl
10886_ACEOF
10887ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
10888if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
10889 ac_have_decl=1
10890else
10891 ac_have_decl=0
10892fi
10893
10894cat >>confdefs.h <<_ACEOF
10895#define HAVE_DECL_SNPRINTF $ac_have_decl
10896_ACEOF
10897ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
10898if test "x$ac_cv_have_decl_vsnprintf" = x""yes; then :
10899 ac_have_decl=1
10900else
10901 ac_have_decl=0
10902fi
10903
10904cat >>confdefs.h <<_ACEOF
10905#define HAVE_DECL_VSNPRINTF $ac_have_decl
10906_ACEOF
10907
10908 ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default"
10909if test "x$ac_cv_have_decl_strtol" = x""yes; then :
10910 ac_have_decl=1
10911else
10912 ac_have_decl=0
10913fi
10914
10915cat >>confdefs.h <<_ACEOF
10916#define HAVE_DECL_STRTOL $ac_have_decl
10917_ACEOF
10918ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default"
10919if test "x$ac_cv_have_decl_strtoul" = x""yes; then :
10920 ac_have_decl=1
10921else
10922 ac_have_decl=0
10923fi
10924
10925cat >>confdefs.h <<_ACEOF
10926#define HAVE_DECL_STRTOUL $ac_have_decl
10927_ACEOF
10928ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
10929if test "x$ac_cv_have_decl_strtoll" = x""yes; then :
10930 ac_have_decl=1
10931else
10932 ac_have_decl=0
10933fi
10934
10935cat >>confdefs.h <<_ACEOF
10936#define HAVE_DECL_STRTOLL $ac_have_decl
10937_ACEOF
10938ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
10939if test "x$ac_cv_have_decl_strtoull" = x""yes; then :
10940 ac_have_decl=1
10941else
10942 ac_have_decl=0
10943fi
10944
10945cat >>confdefs.h <<_ACEOF
10946#define HAVE_DECL_STRTOULL $ac_have_decl
10947_ACEOF
10948
10949 ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default"
10950if test "x$ac_cv_have_decl_strverscmp" = x""yes; then :
10951 ac_have_decl=1
10952else
10953 ac_have_decl=0
10954fi
10955
10956cat >>confdefs.h <<_ACEOF
10957#define HAVE_DECL_STRVERSCMP $ac_have_decl
10958_ACEOF
10959
10960
10961
81ecdfbb
RW
10962ac_fn_c_check_decl "$LINENO" "free" "ac_cv_have_decl_free" "$ac_includes_default"
10963if test "x$ac_cv_have_decl_free" = x""yes; then :
10964 ac_have_decl=1
bec39cab 10965else
81ecdfbb
RW
10966 ac_have_decl=0
10967fi
10968
10969cat >>confdefs.h <<_ACEOF
10970#define HAVE_DECL_FREE $ac_have_decl
bec39cab 10971_ACEOF
81ecdfbb
RW
10972ac_fn_c_check_decl "$LINENO" "malloc" "ac_cv_have_decl_malloc" "$ac_includes_default"
10973if test "x$ac_cv_have_decl_malloc" = x""yes; then :
10974 ac_have_decl=1
10975else
10976 ac_have_decl=0
10977fi
10978
10979cat >>confdefs.h <<_ACEOF
10980#define HAVE_DECL_MALLOC $ac_have_decl
bec39cab 10981_ACEOF
81ecdfbb
RW
10982ac_fn_c_check_decl "$LINENO" "realloc" "ac_cv_have_decl_realloc" "$ac_includes_default"
10983if test "x$ac_cv_have_decl_realloc" = x""yes; then :
10984 ac_have_decl=1
bec39cab 10985else
81ecdfbb
RW
10986 ac_have_decl=0
10987fi
bec39cab 10988
81ecdfbb
RW
10989cat >>confdefs.h <<_ACEOF
10990#define HAVE_DECL_REALLOC $ac_have_decl
bec39cab 10991_ACEOF
81ecdfbb
RW
10992ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
10993if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
10994 ac_have_decl=1
10995else
10996 ac_have_decl=0
5ee754fc 10997fi
81ecdfbb
RW
10998
10999cat >>confdefs.h <<_ACEOF
11000#define HAVE_DECL_SNPRINTF $ac_have_decl
a9322a30 11001_ACEOF
5ee754fc 11002
5ee754fc 11003
81ecdfbb
RW
11004 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
11005$as_echo_n "checking for LC_MESSAGES... " >&6; }
11006if test "${am_cv_val_LC_MESSAGES+set}" = set; then :
11007 $as_echo_n "(cached) " >&6
bec39cab 11008else
81ecdfbb 11009 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11010/* end confdefs.h. */
81ecdfbb 11011#include <locale.h>
a9322a30
TT
11012int
11013main ()
11014{
81ecdfbb 11015return LC_MESSAGES
a9322a30
TT
11016 ;
11017 return 0;
11018}
bec39cab 11019_ACEOF
81ecdfbb
RW
11020if ac_fn_c_try_link "$LINENO"; then :
11021 am_cv_val_LC_MESSAGES=yes
bec39cab 11022else
81ecdfbb
RW
11023 am_cv_val_LC_MESSAGES=no
11024fi
11025rm -f core conftest.err conftest.$ac_objext \
11026 conftest$ac_exeext conftest.$ac_ext
11027fi
11028{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
11029$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
11030 if test $am_cv_val_LC_MESSAGES = yes; then
bec39cab 11031
81ecdfbb
RW
11032$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
11033
11034 fi
11035
11036
11037# ----------------------- #
11038# Checks for structures. #
11039# ----------------------- #
11040
11041ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
11042if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
11043
11044cat >>confdefs.h <<_ACEOF
11045#define HAVE_STRUCT_STAT_ST_BLOCKS 1
7eb368b3 11046_ACEOF
7eb368b3 11047
81ecdfbb 11048
7eb368b3 11049fi
81ecdfbb
RW
11050ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
11051if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
7eb368b3 11052
a9322a30
TT
11053cat >>confdefs.h <<_ACEOF
11054#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
7eb368b3
NR
11055_ACEOF
11056
a9322a30 11057
7eb368b3
NR
11058fi
11059
7eb368b3 11060
a9322a30
TT
11061# ------------------ #
11062# Checks for types. #
11063# ------------------ #
7eb368b3 11064
81ecdfbb 11065ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
a9322a30
TT
11066#include <sys/socket.h>
11067
81ecdfbb
RW
11068"
11069if test "x$ac_cv_type_socklen_t" = x""yes; then :
bec39cab 11070
a9322a30
TT
11071cat >>confdefs.h <<_ACEOF
11072#define HAVE_SOCKLEN_T 1
11073_ACEOF
11074
11075
11076fi
11077
11078
11079# ------------------------------------- #
11080# Checks for compiler characteristics. #
11081# ------------------------------------- #
11082
81ecdfbb
RW
11083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11084$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
11085if test "${ac_cv_c_const+set}" = set; then :
11086 $as_echo_n "(cached) " >&6
a9322a30 11087else
81ecdfbb 11088 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11089/* end confdefs.h. */
a9322a30
TT
11090
11091int
11092main ()
11093{
11094/* FIXME: Include the comments suggested by Paul. */
11095#ifndef __cplusplus
11096 /* Ultrix mips cc rejects this. */
11097 typedef int charset[2];
81ecdfbb 11098 const charset cs;
a9322a30 11099 /* SunOS 4.1.1 cc rejects this. */
81ecdfbb
RW
11100 char const *const *pcpcc;
11101 char **ppc;
a9322a30
TT
11102 /* NEC SVR4.0.2 mips cc rejects this. */
11103 struct point {int x, y;};
11104 static struct point const zero = {0,0};
11105 /* AIX XL C 1.02.0.0 rejects this.
11106 It does not let you subtract one const X* pointer from another in
11107 an arm of an if-expression whose if-part is not a constant
11108 expression */
11109 const char *g = "string";
81ecdfbb 11110 pcpcc = &g + (g ? g-g : 0);
a9322a30 11111 /* HPUX 7.0 cc rejects these. */
81ecdfbb
RW
11112 ++pcpcc;
11113 ppc = (char**) pcpcc;
11114 pcpcc = (char const *const *) ppc;
a9322a30
TT
11115 { /* SCO 3.2v4 cc rejects this. */
11116 char *t;
11117 char const *s = 0 ? (char *) 0 : (char const *) 0;
11118
11119 *t++ = 0;
81ecdfbb 11120 if (s) return 0;
a9322a30
TT
11121 }
11122 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11123 int x[] = {25, 17};
11124 const int *foo = &x[0];
11125 ++foo;
11126 }
11127 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11128 typedef const int *iptr;
11129 iptr p = 0;
11130 ++p;
11131 }
11132 { /* AIX XL C 1.02.0.0 rejects this saying
11133 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11134 struct s { int j; const int *ap[3]; };
11135 struct s *b; b->j = 5;
11136 }
11137 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11138 const int foo = 10;
81ecdfbb 11139 if (!foo) return 0;
a9322a30 11140 }
81ecdfbb 11141 return !cs[0] && !zero.x;
a9322a30
TT
11142#endif
11143
11144 ;
11145 return 0;
11146}
bec39cab 11147_ACEOF
81ecdfbb 11148if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 11149 ac_cv_c_const=yes
5ee754fc 11150else
81ecdfbb 11151 ac_cv_c_const=no
5ee754fc 11152fi
81ecdfbb 11153rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 11154fi
81ecdfbb
RW
11155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11156$as_echo "$ac_cv_c_const" >&6; }
a9322a30 11157if test $ac_cv_c_const = no; then
bec39cab 11158
81ecdfbb 11159$as_echo "#define const /**/" >>confdefs.h
bec39cab 11160
5ee754fc 11161fi
bec39cab 11162
81ecdfbb
RW
11163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
11164$as_echo_n "checking for inline... " >&6; }
11165if test "${ac_cv_c_inline+set}" = set; then :
11166 $as_echo_n "(cached) " >&6
bec39cab 11167else
a9322a30
TT
11168 ac_cv_c_inline=no
11169for ac_kw in inline __inline__ __inline; do
81ecdfbb 11170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11171/* end confdefs.h. */
a9322a30
TT
11172#ifndef __cplusplus
11173typedef int foo_t;
11174static $ac_kw foo_t static_foo () {return 0; }
11175$ac_kw foo_t foo () {return 0; }
11176#endif
11177
bec39cab 11178_ACEOF
81ecdfbb
RW
11179if ac_fn_c_try_compile "$LINENO"; then :
11180 ac_cv_c_inline=$ac_kw
bec39cab 11181fi
81ecdfbb
RW
11182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11183 test "$ac_cv_c_inline" != no && break
a9322a30 11184done
bec39cab 11185
5ee754fc 11186fi
81ecdfbb
RW
11187{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
11188$as_echo "$ac_cv_c_inline" >&6; }
5ee754fc 11189
a9322a30
TT
11190case $ac_cv_c_inline in
11191 inline | yes) ;;
11192 *)
11193 case $ac_cv_c_inline in
11194 no) ac_val=;;
11195 *) ac_val=$ac_cv_c_inline;;
11196 esac
11197 cat >>confdefs.h <<_ACEOF
11198#ifndef __cplusplus
11199#define inline $ac_val
11200#endif
11201_ACEOF
bec39cab
AC
11202 ;;
11203esac
bec39cab 11204
81ecdfbb
RW
11205 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
11206$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
11207if test "${ac_cv_c_bigendian+set}" = set; then :
11208 $as_echo_n "(cached) " >&6
bec39cab 11209else
81ecdfbb
RW
11210 ac_cv_c_bigendian=unknown
11211 # See if we're dealing with a universal compiler.
11212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11213/* end confdefs.h. */
11214#ifndef __APPLE_CC__
11215 not a universal capable compiler
11216 #endif
11217 typedef int dummy;
11218
11219_ACEOF
11220if ac_fn_c_try_compile "$LINENO"; then :
11221
11222 # Check for potential -arch flags. It is not universal unless
11223 # there are at least two -arch flags with different values.
11224 ac_arch=
11225 ac_prev=
11226 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
11227 if test -n "$ac_prev"; then
11228 case $ac_word in
11229 i?86 | x86_64 | ppc | ppc64)
11230 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
11231 ac_arch=$ac_word
11232 else
11233 ac_cv_c_bigendian=universal
11234 break
11235 fi
11236 ;;
11237 esac
11238 ac_prev=
11239 elif test "x$ac_word" = "x-arch"; then
11240 ac_prev=arch
11241 fi
11242 done
11243fi
11244rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11245 if test $ac_cv_c_bigendian = unknown; then
11246 # See if sys/param.h defines the BYTE_ORDER macro.
11247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11248/* end confdefs.h. */
a9322a30 11249#include <sys/types.h>
81ecdfbb 11250 #include <sys/param.h>
a9322a30
TT
11251
11252int
11253main ()
11254{
81ecdfbb
RW
11255#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
11256 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
11257 && LITTLE_ENDIAN)
11258 bogus endian macros
11259 #endif
a9322a30
TT
11260
11261 ;
11262 return 0;
11263}
bec39cab 11264_ACEOF
81ecdfbb 11265if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 11266 # It does; now see whether it defined to BIG_ENDIAN or not.
81ecdfbb 11267 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11268/* end confdefs.h. */
a9322a30 11269#include <sys/types.h>
81ecdfbb 11270 #include <sys/param.h>
a9322a30
TT
11271
11272int
11273main ()
11274{
11275#if BYTE_ORDER != BIG_ENDIAN
81ecdfbb
RW
11276 not big endian
11277 #endif
a9322a30
TT
11278
11279 ;
11280 return 0;
11281}
bec39cab 11282_ACEOF
81ecdfbb 11283if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 11284 ac_cv_c_bigendian=yes
5ee754fc 11285else
81ecdfbb 11286 ac_cv_c_bigendian=no
5ee754fc 11287fi
81ecdfbb
RW
11288rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11289fi
11290rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11291 fi
11292 if test $ac_cv_c_bigendian = unknown; then
11293 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
11294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11295/* end confdefs.h. */
11296#include <limits.h>
bec39cab 11297
81ecdfbb
RW
11298int
11299main ()
11300{
11301#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
11302 bogus endian macros
11303 #endif
11304
11305 ;
11306 return 0;
11307}
7eb368b3 11308_ACEOF
81ecdfbb
RW
11309if ac_fn_c_try_compile "$LINENO"; then :
11310 # It does; now see whether it defined to _BIG_ENDIAN or not.
11311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7eb368b3 11312/* end confdefs.h. */
81ecdfbb
RW
11313#include <limits.h>
11314
7eb368b3
NR
11315int
11316main ()
11317{
81ecdfbb
RW
11318#ifndef _BIG_ENDIAN
11319 not big endian
11320 #endif
11321
7eb368b3
NR
11322 ;
11323 return 0;
11324}
11325_ACEOF
81ecdfbb 11326if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 11327 ac_cv_c_bigendian=yes
81ecdfbb
RW
11328else
11329 ac_cv_c_bigendian=no
a9322a30 11330fi
81ecdfbb 11331rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30 11332fi
81ecdfbb
RW
11333rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11334 fi
11335 if test $ac_cv_c_bigendian = unknown; then
11336 # Compile a test program.
11337 if test "$cross_compiling" = yes; then :
11338 # Try to guess by grepping values from an object file.
11339 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11340/* end confdefs.h. */
11341short int ascii_mm[] =
11342 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
11343 short int ascii_ii[] =
11344 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
11345 int use_ascii (int i) {
11346 return ascii_mm[i] + ascii_ii[i];
11347 }
11348 short int ebcdic_ii[] =
11349 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
11350 short int ebcdic_mm[] =
11351 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
11352 int use_ebcdic (int i) {
11353 return ebcdic_mm[i] + ebcdic_ii[i];
11354 }
11355 extern int foo;
7eb368b3 11356
81ecdfbb
RW
11357int
11358main ()
11359{
11360return use_ascii (foo) == use_ebcdic (foo);
11361 ;
11362 return 0;
11363}
11364_ACEOF
11365if ac_fn_c_try_compile "$LINENO"; then :
11366 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
11367 ac_cv_c_bigendian=yes
11368 fi
11369 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
11370 if test "$ac_cv_c_bigendian" = unknown; then
11371 ac_cv_c_bigendian=no
11372 else
11373 # finding both strings is unlikely to happen, but who knows?
11374 ac_cv_c_bigendian=unknown
11375 fi
11376 fi
7eb368b3 11377fi
81ecdfbb 11378rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 11379else
81ecdfbb 11380 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11381/* end confdefs.h. */
81ecdfbb 11382$ac_includes_default
d3ea6809
MM
11383int
11384main ()
11385{
81ecdfbb
RW
11386
11387 /* Are we little or big endian? From Harbison&Steele. */
11388 union
11389 {
11390 long int l;
11391 char c[sizeof (long int)];
11392 } u;
11393 u.l = 1;
11394 return u.c[sizeof (long int) - 1] == 1;
11395
11396 ;
11397 return 0;
d3ea6809
MM
11398}
11399_ACEOF
81ecdfbb 11400if ac_fn_c_try_run "$LINENO"; then :
a9322a30 11401 ac_cv_c_bigendian=no
d3ea6809 11402else
81ecdfbb 11403 ac_cv_c_bigendian=yes
d3ea6809 11404fi
81ecdfbb
RW
11405rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11406 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 11407fi
a9322a30 11408
81ecdfbb
RW
11409 fi
11410fi
11411{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
11412$as_echo "$ac_cv_c_bigendian" >&6; }
11413 case $ac_cv_c_bigendian in #(
11414 yes)
11415 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
11416;; #(
11417 no)
11418 ;; #(
11419 universal)
11420
11421$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
11422
11423 ;; #(
11424 *)
11425 as_fn_error "unknown endianness
11426 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
11427 esac
d3ea6809
MM
11428
11429
a9322a30
TT
11430# ------------------------------ #
11431# Checks for library functions. #
11432# ------------------------------ #
d3ea6809 11433
a9322a30 11434for ac_header in stdlib.h unistd.h
81ecdfbb
RW
11435do :
11436 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11437ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
11438eval as_val=\$$as_ac_Header
11439 if test "x$as_val" = x""yes; then :
bec39cab 11440 cat >>confdefs.h <<_ACEOF
81ecdfbb 11441#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 11442_ACEOF
b757528f 11443
b757528f 11444fi
bec39cab 11445
a9322a30 11446done
a3828db0 11447
a9322a30 11448for ac_func in getpagesize
81ecdfbb
RW
11449do :
11450 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
11451if test "x$ac_cv_func_getpagesize" = x""yes; then :
bec39cab 11452 cat >>confdefs.h <<_ACEOF
81ecdfbb 11453#define HAVE_GETPAGESIZE 1
bec39cab 11454_ACEOF
bcb3dc3d 11455
bcb3dc3d
MK
11456fi
11457done
11458
81ecdfbb
RW
11459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
11460$as_echo_n "checking for working mmap... " >&6; }
11461if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then :
11462 $as_echo_n "(cached) " >&6
a9322a30 11463else
81ecdfbb 11464 if test "$cross_compiling" = yes; then :
a9322a30 11465 ac_cv_func_mmap_fixed_mapped=no
bec39cab 11466else
81ecdfbb 11467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11468/* end confdefs.h. */
a9322a30
TT
11469$ac_includes_default
11470/* malloc might have been renamed as rpl_malloc. */
11471#undef malloc
bec39cab 11472
a9322a30
TT
11473/* Thanks to Mike Haertel and Jim Avera for this test.
11474 Here is a matrix of mmap possibilities:
11475 mmap private not fixed
11476 mmap private fixed at somewhere currently unmapped
11477 mmap private fixed at somewhere already mapped
11478 mmap shared not fixed
11479 mmap shared fixed at somewhere currently unmapped
11480 mmap shared fixed at somewhere already mapped
11481 For private mappings, we should verify that changes cannot be read()
11482 back from the file, nor mmap's back from the file at a different
11483 address. (There have been systems where private was not correctly
11484 implemented like the infamous i386 svr4.0, and systems where the
11485 VM page cache was not coherent with the file system buffer cache
11486 like early versions of FreeBSD and possibly contemporary NetBSD.)
11487 For shared mappings, we should conversely verify that changes get
11488 propagated back to all the places they're supposed to be.
bec39cab 11489
a9322a30
TT
11490 Grep wants private fixed already mapped.
11491 The main things grep needs to know about mmap are:
11492 * does it exist and is it safe to write into the mmap'd area
11493 * how to use it (BSD variants) */
8b9cf735 11494
a9322a30
TT
11495#include <fcntl.h>
11496#include <sys/mman.h>
8b9cf735 11497
81ecdfbb 11498#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
a9322a30 11499char *malloc ();
a3828db0
MK
11500#endif
11501
a9322a30 11502/* This mess was copied from the GNU getpagesize.h. */
81ecdfbb 11503#ifndef HAVE_GETPAGESIZE
a9322a30 11504/* Assume that all systems that can run configure have sys/param.h. */
81ecdfbb 11505# ifndef HAVE_SYS_PARAM_H
a9322a30
TT
11506# define HAVE_SYS_PARAM_H 1
11507# endif
11508
11509# ifdef _SC_PAGESIZE
11510# define getpagesize() sysconf(_SC_PAGESIZE)
11511# else /* no _SC_PAGESIZE */
81ecdfbb 11512# ifdef HAVE_SYS_PARAM_H
a9322a30
TT
11513# include <sys/param.h>
11514# ifdef EXEC_PAGESIZE
11515# define getpagesize() EXEC_PAGESIZE
11516# else /* no EXEC_PAGESIZE */
11517# ifdef NBPG
11518# define getpagesize() NBPG * CLSIZE
11519# ifndef CLSIZE
11520# define CLSIZE 1
11521# endif /* no CLSIZE */
11522# else /* no NBPG */
11523# ifdef NBPC
11524# define getpagesize() NBPC
11525# else /* no NBPC */
11526# ifdef PAGESIZE
11527# define getpagesize() PAGESIZE
11528# endif /* PAGESIZE */
11529# endif /* no NBPC */
11530# endif /* no NBPG */
11531# endif /* no EXEC_PAGESIZE */
11532# else /* no HAVE_SYS_PARAM_H */
11533# define getpagesize() 8192 /* punt totally */
11534# endif /* no HAVE_SYS_PARAM_H */
11535# endif /* no _SC_PAGESIZE */
11536
11537#endif /* no HAVE_GETPAGESIZE */
11538
bec39cab
AC
11539int
11540main ()
11541{
a9322a30
TT
11542 char *data, *data2, *data3;
11543 int i, pagesize;
11544 int fd;
11545
11546 pagesize = getpagesize ();
11547
11548 /* First, make a file with some known garbage in it. */
11549 data = (char *) malloc (pagesize);
11550 if (!data)
81ecdfbb 11551 return 1;
a9322a30
TT
11552 for (i = 0; i < pagesize; ++i)
11553 *(data + i) = rand ();
11554 umask (0);
11555 fd = creat ("conftest.mmap", 0600);
11556 if (fd < 0)
81ecdfbb 11557 return 1;
a9322a30 11558 if (write (fd, data, pagesize) != pagesize)
81ecdfbb 11559 return 1;
a9322a30
TT
11560 close (fd);
11561
11562 /* Next, try to mmap the file at a fixed address which already has
11563 something else allocated at it. If we can, also make sure that
11564 we see the same garbage. */
11565 fd = open ("conftest.mmap", O_RDWR);
11566 if (fd < 0)
81ecdfbb 11567 return 1;
a9322a30
TT
11568 data2 = (char *) malloc (2 * pagesize);
11569 if (!data2)
81ecdfbb
RW
11570 return 1;
11571 data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
a9322a30
TT
11572 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
11573 MAP_PRIVATE | MAP_FIXED, fd, 0L))
81ecdfbb 11574 return 1;
a9322a30
TT
11575 for (i = 0; i < pagesize; ++i)
11576 if (*(data + i) != *(data2 + i))
81ecdfbb 11577 return 1;
a9322a30
TT
11578
11579 /* Finally, make sure that changes to the mapped area do not
11580 percolate back to the file as seen by read(). (This is a bug on
11581 some variants of i386 svr4.0.) */
11582 for (i = 0; i < pagesize; ++i)
11583 *(data2 + i) = *(data2 + i) + 1;
11584 data3 = (char *) malloc (pagesize);
11585 if (!data3)
81ecdfbb 11586 return 1;
a9322a30 11587 if (read (fd, data3, pagesize) != pagesize)
81ecdfbb 11588 return 1;
a9322a30
TT
11589 for (i = 0; i < pagesize; ++i)
11590 if (*(data + i) != *(data3 + i))
81ecdfbb 11591 return 1;
a9322a30 11592 close (fd);
81ecdfbb 11593 return 0;
bec39cab
AC
11594}
11595_ACEOF
81ecdfbb 11596if ac_fn_c_try_run "$LINENO"; then :
a9322a30 11597 ac_cv_func_mmap_fixed_mapped=yes
086ec9eb 11598else
81ecdfbb 11599 ac_cv_func_mmap_fixed_mapped=no
a3828db0 11600fi
81ecdfbb
RW
11601rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11602 conftest.$ac_objext conftest.beam conftest.$ac_ext
a3828db0 11603fi
81ecdfbb 11604
a9322a30 11605fi
81ecdfbb
RW
11606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
11607$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
a9322a30
TT
11608if test $ac_cv_func_mmap_fixed_mapped = yes; then
11609
81ecdfbb 11610$as_echo "#define HAVE_MMAP 1" >>confdefs.h
a3828db0 11611
086ec9eb 11612fi
a9322a30 11613rm -f conftest.mmap
a3828db0 11614
81ecdfbb
RW
11615ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
11616if test "x$ac_cv_type_pid_t" = x""yes; then :
bec39cab 11617
a9322a30
TT
11618else
11619
11620cat >>confdefs.h <<_ACEOF
11621#define pid_t int
bec39cab 11622_ACEOF
086ec9eb
MK
11623
11624fi
11625
81ecdfbb
RW
11626for ac_header in vfork.h
11627do :
11628 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
11629if test "x$ac_cv_header_vfork_h" = x""yes; then :
a3828db0 11630 cat >>confdefs.h <<_ACEOF
81ecdfbb 11631#define HAVE_VFORK_H 1
bec39cab 11632_ACEOF
c906108c
SS
11633
11634fi
a9322a30 11635
a3828db0 11636done
c906108c 11637
a9322a30 11638for ac_func in fork vfork
81ecdfbb
RW
11639do :
11640 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11641ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11642eval as_val=\$$as_ac_var
11643 if test "x$as_val" = x""yes; then :
a3828db0 11644 cat >>confdefs.h <<_ACEOF
81ecdfbb 11645#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 11646_ACEOF
b83266a0 11647
97bf5e38 11648fi
a3828db0 11649done
b83266a0 11650
a9322a30 11651if test "x$ac_cv_func_fork" = xyes; then
81ecdfbb
RW
11652 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
11653$as_echo_n "checking for working fork... " >&6; }
11654if test "${ac_cv_func_fork_works+set}" = set; then :
11655 $as_echo_n "(cached) " >&6
a9322a30 11656else
81ecdfbb 11657 if test "$cross_compiling" = yes; then :
a9322a30
TT
11658 ac_cv_func_fork_works=cross
11659else
81ecdfbb
RW
11660 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11661/* end confdefs.h. */
11662$ac_includes_default
11663int
11664main ()
11665{
11666
11667 /* By Ruediger Kuhlmann. */
11668 return fork () < 0;
11669
11670 ;
11671 return 0;
11672}
a9322a30 11673_ACEOF
81ecdfbb 11674if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
11675 ac_cv_func_fork_works=yes
11676else
81ecdfbb 11677 ac_cv_func_fork_works=no
a9322a30 11678fi
81ecdfbb
RW
11679rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11680 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 11681fi
81ecdfbb 11682
a9322a30 11683fi
81ecdfbb
RW
11684{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
11685$as_echo "$ac_cv_func_fork_works" >&6; }
a9322a30
TT
11686
11687else
11688 ac_cv_func_fork_works=$ac_cv_func_fork
11689fi
11690if test "x$ac_cv_func_fork_works" = xcross; then
11691 case $host in
11692 *-*-amigaos* | *-*-msdosdjgpp*)
11693 # Override, as these systems have only a dummy fork() stub
11694 ac_cv_func_fork_works=no
11695 ;;
11696 *)
11697 ac_cv_func_fork_works=yes
11698 ;;
11699 esac
81ecdfbb
RW
11700 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
11701$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
a9322a30
TT
11702fi
11703ac_cv_func_vfork_works=$ac_cv_func_vfork
11704if test "x$ac_cv_func_vfork" = xyes; then
81ecdfbb
RW
11705 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
11706$as_echo_n "checking for working vfork... " >&6; }
11707if test "${ac_cv_func_vfork_works+set}" = set; then :
11708 $as_echo_n "(cached) " >&6
a9322a30 11709else
81ecdfbb 11710 if test "$cross_compiling" = yes; then :
a9322a30
TT
11711 ac_cv_func_vfork_works=cross
11712else
81ecdfbb 11713 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30
TT
11714/* end confdefs.h. */
11715/* Thanks to Paul Eggert for this test. */
81ecdfbb 11716$ac_includes_default
a9322a30 11717#include <sys/wait.h>
81ecdfbb 11718#ifdef HAVE_VFORK_H
a9322a30
TT
11719# include <vfork.h>
11720#endif
11721/* On some sparc systems, changes by the child to local and incoming
11722 argument registers are propagated back to the parent. The compiler
11723 is told about this with #include <vfork.h>, but some compilers
11724 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
11725 static variable whose address is put into a register that is
11726 clobbered by the vfork. */
11727static void
11728#ifdef __cplusplus
11729sparc_address_test (int arg)
11730# else
11731sparc_address_test (arg) int arg;
11732#endif
11733{
11734 static pid_t child;
11735 if (!child) {
11736 child = vfork ();
11737 if (child < 0) {
11738 perror ("vfork");
11739 _exit(2);
11740 }
11741 if (!child) {
11742 arg = getpid();
11743 write(-1, "", 0);
11744 _exit (arg);
11745 }
11746 }
11747}
11748
11749int
11750main ()
11751{
11752 pid_t parent = getpid ();
11753 pid_t child;
11754
11755 sparc_address_test (0);
11756
11757 child = vfork ();
11758
11759 if (child == 0) {
11760 /* Here is another test for sparc vfork register problems. This
11761 test uses lots of local variables, at least as many local
11762 variables as main has allocated so far including compiler
11763 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
11764 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
11765 reuse the register of parent for one of the local variables,
11766 since it will think that parent can't possibly be used any more
11767 in this routine. Assigning to the local variable will thus
11768 munge parent in the parent process. */
11769 pid_t
11770 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
11771 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
11772 /* Convince the compiler that p..p7 are live; otherwise, it might
11773 use the same hardware register for all 8 local variables. */
11774 if (p != p1 || p != p2 || p != p3 || p != p4
11775 || p != p5 || p != p6 || p != p7)
11776 _exit(1);
11777
11778 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
11779 from child file descriptors. If the child closes a descriptor
11780 before it execs or exits, this munges the parent's descriptor
11781 as well. Test for this by closing stdout in the child. */
11782 _exit(close(fileno(stdout)) != 0);
11783 } else {
11784 int status;
11785 struct stat st;
11786
11787 while (wait(&status) != child)
11788 ;
81ecdfbb 11789 return (
a9322a30
TT
11790 /* Was there some problem with vforking? */
11791 child < 0
11792
11793 /* Did the child fail? (This shouldn't happen.) */
11794 || status
11795
11796 /* Did the vfork/compiler bug occur? */
11797 || parent != getpid()
11798
11799 /* Did the file descriptor bug occur? */
11800 || fstat(fileno(stdout), &st) != 0
11801 );
11802 }
11803}
11804_ACEOF
81ecdfbb 11805if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
11806 ac_cv_func_vfork_works=yes
11807else
81ecdfbb 11808 ac_cv_func_vfork_works=no
a9322a30 11809fi
81ecdfbb
RW
11810rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11811 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 11812fi
81ecdfbb 11813
a9322a30 11814fi
81ecdfbb
RW
11815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
11816$as_echo "$ac_cv_func_vfork_works" >&6; }
a9322a30
TT
11817
11818fi;
11819if test "x$ac_cv_func_fork_works" = xcross; then
11820 ac_cv_func_vfork_works=$ac_cv_func_vfork
81ecdfbb
RW
11821 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
11822$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
a9322a30
TT
11823fi
11824
11825if test "x$ac_cv_func_vfork_works" = xyes; then
11826
81ecdfbb 11827$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
a9322a30
TT
11828
11829else
11830
81ecdfbb 11831$as_echo "#define vfork fork" >>confdefs.h
a9322a30
TT
11832
11833fi
11834if test "x$ac_cv_func_fork_works" = xyes; then
11835
81ecdfbb 11836$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
a9322a30
TT
11837
11838fi
11839
cdf43629 11840for ac_func in getauxval getrusage getuid getgid \
bdca27a2 11841 pipe poll pread pread64 pwrite resize_term \
7313baad 11842 sbrk setpgid setpgrp setsid \
9467110b 11843 sigaction sigprocmask sigsetmask socketpair \
110ed339 11844 ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
3332aaf2 11845 setrlimit getrlimit posix_madvise waitpid \
4b8b5e72 11846 ptrace64 sigaltstack mkdtemp setns
81ecdfbb
RW
11847do :
11848 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11849ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11850eval as_val=\$$as_ac_var
11851 if test "x$as_val" = x""yes; then :
6c7a06a3 11852 cat >>confdefs.h <<_ACEOF
81ecdfbb 11853#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6c7a06a3
TT
11854_ACEOF
11855
11856fi
11857done
11858
11859
81ecdfbb
RW
11860 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
11861$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
11862if test "${am_cv_langinfo_codeset+set}" = set; then :
11863 $as_echo_n "(cached) " >&6
6c7a06a3 11864else
81ecdfbb 11865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
11866/* end confdefs.h. */
11867#include <langinfo.h>
11868int
11869main ()
11870{
11871char* cs = nl_langinfo(CODESET);
bec39cab
AC
11872 ;
11873 return 0;
11874}
11875_ACEOF
81ecdfbb 11876if ac_fn_c_try_link "$LINENO"; then :
6c7a06a3 11877 am_cv_langinfo_codeset=yes
a4db0f07 11878else
81ecdfbb 11879 am_cv_langinfo_codeset=no
a4db0f07 11880fi
81ecdfbb
RW
11881rm -f core conftest.err conftest.$ac_objext \
11882 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 11883
a4db0f07 11884fi
81ecdfbb
RW
11885{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
11886$as_echo "$am_cv_langinfo_codeset" >&6; }
6c7a06a3
TT
11887 if test $am_cv_langinfo_codeset = yes; then
11888
81ecdfbb 11889$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
a4db0f07 11890
6c7a06a3 11891 fi
c906108c 11892
06825bd1 11893
3266f10b
TT
11894 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
11895$as_echo_n "checking for ANSI C header files... " >&6; }
11896if test "${ac_cv_header_stdc+set}" = set; then :
11897 $as_echo_n "(cached) " >&6
11898else
11899 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11900/* end confdefs.h. */
11901#include <stdlib.h>
11902#include <stdarg.h>
11903#include <string.h>
11904#include <float.h>
11905
11906int
11907main ()
11908{
11909
11910 ;
11911 return 0;
11912}
11913_ACEOF
11914if ac_fn_c_try_compile "$LINENO"; then :
11915 ac_cv_header_stdc=yes
11916else
11917 ac_cv_header_stdc=no
11918fi
11919rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11920
11921if test $ac_cv_header_stdc = yes; then
11922 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11924/* end confdefs.h. */
11925#include <string.h>
11926
11927_ACEOF
11928if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11929 $EGREP "memchr" >/dev/null 2>&1; then :
11930
11931else
11932 ac_cv_header_stdc=no
11933fi
11934rm -f conftest*
11935
11936fi
11937
11938if test $ac_cv_header_stdc = yes; then
11939 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11941/* end confdefs.h. */
11942#include <stdlib.h>
11943
11944_ACEOF
11945if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11946 $EGREP "free" >/dev/null 2>&1; then :
11947
11948else
11949 ac_cv_header_stdc=no
11950fi
11951rm -f conftest*
11952
11953fi
11954
11955if test $ac_cv_header_stdc = yes; then
11956 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11957 if test "$cross_compiling" = yes; then :
11958 :
11959else
11960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11961/* end confdefs.h. */
11962#include <ctype.h>
11963#include <stdlib.h>
11964#if ((' ' & 0x0FF) == 0x020)
11965# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11966# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11967#else
11968# define ISLOWER(c) \
11969 (('a' <= (c) && (c) <= 'i') \
11970 || ('j' <= (c) && (c) <= 'r') \
11971 || ('s' <= (c) && (c) <= 'z'))
11972# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11973#endif
11974
11975#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11976int
11977main ()
11978{
11979 int i;
11980 for (i = 0; i < 256; i++)
11981 if (XOR (islower (i), ISLOWER (i))
11982 || toupper (i) != TOUPPER (i))
11983 return 2;
11984 return 0;
11985}
11986_ACEOF
11987if ac_fn_c_try_run "$LINENO"; then :
11988
11989else
11990 ac_cv_header_stdc=no
11991fi
11992rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11993 conftest.$ac_objext conftest.beam conftest.$ac_ext
11994fi
11995
11996fi
11997fi
11998{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
11999$as_echo "$ac_cv_header_stdc" >&6; }
12000if test $ac_cv_header_stdc = yes; then
12001
12002$as_echo "#define STDC_HEADERS 1" >>confdefs.h
12003
3266f10b
TT
12004fi
12005
12006 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
12007# for constant arguments. Useless!
12008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
12009$as_echo_n "checking for working alloca.h... " >&6; }
12010if test "${ac_cv_working_alloca_h+set}" = set; then :
12011 $as_echo_n "(cached) " >&6
12012else
12013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12014/* end confdefs.h. */
12015#include <alloca.h>
12016int
12017main ()
12018{
12019char *p = (char *) alloca (2 * sizeof (int));
12020 if (p) return 0;
12021 ;
12022 return 0;
12023}
12024_ACEOF
12025if ac_fn_c_try_link "$LINENO"; then :
12026 ac_cv_working_alloca_h=yes
12027else
12028 ac_cv_working_alloca_h=no
12029fi
12030rm -f core conftest.err conftest.$ac_objext \
12031 conftest$ac_exeext conftest.$ac_ext
12032fi
12033{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
12034$as_echo "$ac_cv_working_alloca_h" >&6; }
12035if test $ac_cv_working_alloca_h = yes; then
12036
12037$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
12038
12039fi
12040
12041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
12042$as_echo_n "checking for alloca... " >&6; }
12043if test "${ac_cv_func_alloca_works+set}" = set; then :
12044 $as_echo_n "(cached) " >&6
12045else
12046 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12047/* end confdefs.h. */
12048#ifdef __GNUC__
12049# define alloca __builtin_alloca
12050#else
12051# ifdef _MSC_VER
12052# include <malloc.h>
12053# define alloca _alloca
12054# else
12055# ifdef HAVE_ALLOCA_H
12056# include <alloca.h>
12057# else
12058# ifdef _AIX
12059 #pragma alloca
12060# else
12061# ifndef alloca /* predefined by HP cc +Olibcalls */
12062char *alloca ();
12063# endif
12064# endif
12065# endif
12066# endif
12067#endif
12068
12069int
12070main ()
12071{
12072char *p = (char *) alloca (1);
12073 if (p) return 0;
12074 ;
12075 return 0;
12076}
12077_ACEOF
12078if ac_fn_c_try_link "$LINENO"; then :
12079 ac_cv_func_alloca_works=yes
12080else
12081 ac_cv_func_alloca_works=no
12082fi
12083rm -f core conftest.err conftest.$ac_objext \
12084 conftest$ac_exeext conftest.$ac_ext
12085fi
12086{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
12087$as_echo "$ac_cv_func_alloca_works" >&6; }
12088
12089if test $ac_cv_func_alloca_works = yes; then
12090
12091$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
12092
12093else
12094 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
12095# that cause trouble. Some versions do not even contain alloca or
12096# contain a buggy version. If you still want to use their alloca,
12097# use ar to extract alloca.o from them instead of compiling alloca.c.
12098
12099ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
12100
12101$as_echo "#define C_ALLOCA 1" >>confdefs.h
12102
12103
12104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
12105$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
12106if test "${ac_cv_os_cray+set}" = set; then :
12107 $as_echo_n "(cached) " >&6
12108else
12109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12110/* end confdefs.h. */
12111#if defined CRAY && ! defined CRAY2
12112webecray
12113#else
12114wenotbecray
12115#endif
12116
12117_ACEOF
12118if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12119 $EGREP "webecray" >/dev/null 2>&1; then :
12120 ac_cv_os_cray=yes
12121else
12122 ac_cv_os_cray=no
12123fi
12124rm -f conftest*
12125
12126fi
12127{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
12128$as_echo "$ac_cv_os_cray" >&6; }
12129if test $ac_cv_os_cray = yes; then
12130 for ac_func in _getb67 GETB67 getb67; do
12131 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12132ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12133eval as_val=\$$as_ac_var
12134 if test "x$as_val" = x""yes; then :
12135
12136cat >>confdefs.h <<_ACEOF
12137#define CRAY_STACKSEG_END $ac_func
12138_ACEOF
12139
12140 break
12141fi
12142
12143 done
12144fi
12145
12146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
12147$as_echo_n "checking stack direction for C alloca... " >&6; }
12148if test "${ac_cv_c_stack_direction+set}" = set; then :
12149 $as_echo_n "(cached) " >&6
12150else
12151 if test "$cross_compiling" = yes; then :
12152 ac_cv_c_stack_direction=0
12153else
12154 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12155/* end confdefs.h. */
12156$ac_includes_default
12157int
12158find_stack_direction ()
12159{
12160 static char *addr = 0;
12161 auto char dummy;
12162 if (addr == 0)
12163 {
12164 addr = &dummy;
12165 return find_stack_direction ();
12166 }
12167 else
12168 return (&dummy > addr) ? 1 : -1;
12169}
12170
12171int
12172main ()
12173{
12174 return find_stack_direction () < 0;
12175}
12176_ACEOF
12177if ac_fn_c_try_run "$LINENO"; then :
12178 ac_cv_c_stack_direction=1
12179else
12180 ac_cv_c_stack_direction=-1
12181fi
12182rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12183 conftest.$ac_objext conftest.beam conftest.$ac_ext
12184fi
12185
12186fi
12187{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
12188$as_echo "$ac_cv_c_stack_direction" >&6; }
12189cat >>confdefs.h <<_ACEOF
12190#define STACK_DIRECTION $ac_cv_c_stack_direction
12191_ACEOF
12192
12193
12194fi
12195
12196
12197
12198 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
12199$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
12200if test "${am_cv_langinfo_codeset+set}" = set; then :
12201 $as_echo_n "(cached) " >&6
12202else
12203 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12204/* end confdefs.h. */
12205#include <langinfo.h>
12206int
12207main ()
12208{
12209char* cs = nl_langinfo(CODESET);
12210 ;
12211 return 0;
12212}
12213_ACEOF
12214if ac_fn_c_try_link "$LINENO"; then :
12215 am_cv_langinfo_codeset=yes
12216else
12217 am_cv_langinfo_codeset=no
12218fi
12219rm -f core conftest.err conftest.$ac_objext \
12220 conftest$ac_exeext conftest.$ac_ext
12221
12222fi
12223{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
12224$as_echo "$am_cv_langinfo_codeset" >&6; }
12225 if test $am_cv_langinfo_codeset = yes; then
12226
12227$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
12228
12229 fi
12230
12231
a3d08894 12232 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
12233do :
12234 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12235ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12236eval as_val=\$$as_ac_Header
12237 if test "x$as_val" = x""yes; then :
12238 cat >>confdefs.h <<_ACEOF
12239#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12240_ACEOF
12241
12242fi
12243
12244done
12245
12246
f348d89a 12247 for ac_func in fdwalk getrlimit pipe pipe2 socketpair sigaction
3266f10b
TT
12248do :
12249 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12250ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12251eval as_val=\$$as_ac_var
12252 if test "x$as_val" = x""yes; then :
12253 cat >>confdefs.h <<_ACEOF
12254#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12255_ACEOF
12256
12257fi
12258done
12259
12260
12261 ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default"
12262if test "x$ac_cv_have_decl_strerror" = x""yes; then :
12263 ac_have_decl=1
12264else
12265 ac_have_decl=0
12266fi
12267
12268cat >>confdefs.h <<_ACEOF
12269#define HAVE_DECL_STRERROR $ac_have_decl
12270_ACEOF
12271ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
12272if test "x$ac_cv_have_decl_strstr" = x""yes; then :
12273 ac_have_decl=1
12274else
12275 ac_have_decl=0
12276fi
12277
12278cat >>confdefs.h <<_ACEOF
12279#define HAVE_DECL_STRSTR $ac_have_decl
12280_ACEOF
12281
12282
e9bcb658
GB
12283 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
12284$as_echo_n "checking for sigsetjmp... " >&6; }
12285if test "${gdb_cv_func_sigsetjmp+set}" = set; then :
12286 $as_echo_n "(cached) " >&6
12287else
12288 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12289/* end confdefs.h. */
12290
12291#include <setjmp.h>
12292
12293int
12294main ()
12295{
12296sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
12297 ;
12298 return 0;
12299}
12300_ACEOF
12301if ac_fn_c_try_compile "$LINENO"; then :
12302 gdb_cv_func_sigsetjmp=yes
12303else
12304 gdb_cv_func_sigsetjmp=no
12305fi
12306rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12307fi
12308{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
12309$as_echo "$gdb_cv_func_sigsetjmp" >&6; }
12310if test $gdb_cv_func_sigsetjmp = yes; then
12311
12312$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
12313
12314fi
12315
3266f10b 12316
54019719
PA
12317# Check the return and argument types of ptrace.
12318
12319
54019719
PA
12320for ac_header in sys/ptrace.h ptrace.h
12321do :
12322 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12323ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12324eval as_val=\$$as_ac_Header
12325 if test "x$as_val" = x""yes; then :
12326 cat >>confdefs.h <<_ACEOF
12327#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12328_ACEOF
12329
12330fi
12331
12332done
12333
12334
a3828db0 12335gdb_ptrace_headers='
4ff70b84 12336#include <sys/types.h>
a3828db0
MK
12337#if HAVE_SYS_PTRACE_H
12338# include <sys/ptrace.h>
12339#endif
12340#if HAVE_UNISTD_H
12341# include <unistd.h>
12342#endif
12343'
12344# There is no point in checking if we don't have a prototype.
9b30624b 12345ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers
81ecdfbb
RW
12346"
12347if test "x$ac_cv_have_decl_ptrace" = x""yes; then :
12348 ac_have_decl=1
06825bd1 12349else
81ecdfbb 12350 ac_have_decl=0
06825bd1 12351fi
06825bd1 12352
a3828db0 12353cat >>confdefs.h <<_ACEOF
81ecdfbb 12354#define HAVE_DECL_PTRACE $ac_have_decl
a3828db0 12355_ACEOF
81ecdfbb 12356if test $ac_have_decl = 1; then :
bec39cab 12357
a3828db0 12358else
a3828db0
MK
12359
12360 : ${gdb_cv_func_ptrace_ret='int'}
12361 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
12362
06825bd1
MK
12363fi
12364
064ef605
DJ
12365# Check return type. Varargs (used on GNU/Linux) conflict with the
12366# empty argument list, so check for that explicitly.
81ecdfbb
RW
12367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
12368$as_echo_n "checking return type of ptrace... " >&6; }
12369if test "${gdb_cv_func_ptrace_ret+set}" = set; then :
12370 $as_echo_n "(cached) " >&6
bec39cab 12371else
81ecdfbb 12372 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12373/* end confdefs.h. */
a3828db0 12374$gdb_ptrace_headers
bec39cab
AC
12375int
12376main ()
12377{
064ef605
DJ
12378extern long ptrace (enum __ptrace_request, ...);
12379 ;
12380 return 0;
12381}
12382_ACEOF
9b30624b 12383if ac_fn_c_try_compile "$LINENO"; then :
064ef605
DJ
12384 gdb_cv_func_ptrace_ret='long'
12385else
81ecdfbb 12386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
12387/* end confdefs.h. */
12388$gdb_ptrace_headers
12389int
12390main ()
12391{
a3828db0 12392extern int ptrace ();
bec39cab
AC
12393 ;
12394 return 0;
12395}
12396_ACEOF
9b30624b 12397if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12398 gdb_cv_func_ptrace_ret='int'
70f9f479 12399else
81ecdfbb 12400 gdb_cv_func_ptrace_ret='long'
70f9f479 12401fi
81ecdfbb 12402rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
70f9f479 12403fi
81ecdfbb 12404rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
064ef605 12405fi
81ecdfbb
RW
12406{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
12407$as_echo "$gdb_cv_func_ptrace_ret" >&6; }
bec39cab 12408
a3828db0
MK
12409cat >>confdefs.h <<_ACEOF
12410#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
bec39cab 12411_ACEOF
70f9f479 12412
a3828db0 12413# Check argument types.
81ecdfbb
RW
12414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
12415$as_echo_n "checking types of arguments for ptrace... " >&6; }
12416if test "${gdb_cv_func_ptrace_args+set}" = set; then :
12417 $as_echo_n "(cached) " >&6
bec39cab 12418else
a3828db0 12419
81ecdfbb 12420 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
12421/* end confdefs.h. */
12422$gdb_ptrace_headers
12423int
12424main ()
12425{
12426extern long ptrace (enum __ptrace_request, ...);
12427 ;
12428 return 0;
12429}
12430_ACEOF
9b30624b 12431if ac_fn_c_try_compile "$LINENO"; then :
54019719 12432 gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long'
064ef605 12433else
064ef605 12434
a3828db0
MK
12435for gdb_arg1 in 'int' 'long'; do
12436 for gdb_arg2 in 'pid_t' 'int' 'long'; do
5ed10e6e 12437 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
96d7229d 12438 for gdb_arg4 in 'int' 'long' 'void *'; do
81ecdfbb 12439 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12440/* end confdefs.h. */
a3828db0 12441$gdb_ptrace_headers
bec39cab
AC
12442int
12443main ()
12444{
a3828db0
MK
12445
12446extern $gdb_cv_func_ptrace_ret
12447 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
12448
bec39cab
AC
12449 ;
12450 return 0;
12451}
12452_ACEOF
9b30624b 12453if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
12454 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
12455 break 4;
5c7f2947 12456fi
81ecdfbb 12457rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0 12458 for gdb_arg5 in 'int *' 'int' 'long'; do
81ecdfbb 12459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12460/* end confdefs.h. */
a3828db0 12461$gdb_ptrace_headers
bec39cab
AC
12462int
12463main ()
12464{
a3828db0
MK
12465
12466extern $gdb_cv_func_ptrace_ret
12467 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
12468
bec39cab
AC
12469 ;
12470 return 0;
12471}
12472_ACEOF
9b30624b 12473if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
12474
12475gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
12476 break 5;
78434e59 12477fi
81ecdfbb 12478rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0
MK
12479 done
12480 done
12481 done
12482 done
12483done
12484# Provide a safe default value.
12485: ${gdb_cv_func_ptrace_args='int,int,long,long'}
12486
064ef605 12487fi
81ecdfbb 12488rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
78434e59 12489fi
81ecdfbb
RW
12490{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
12491$as_echo "$gdb_cv_func_ptrace_args" >&6; }
a3828db0
MK
12492ac_save_IFS=$IFS; IFS=','
12493set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
12494IFS=$ac_save_IFS
12495shift
bec39cab 12496
54019719
PA
12497cat >>confdefs.h <<_ACEOF
12498#define PTRACE_TYPE_ARG1 $1
12499_ACEOF
12500
12501
a3828db0
MK
12502cat >>confdefs.h <<_ACEOF
12503#define PTRACE_TYPE_ARG3 $3
12504_ACEOF
12505
96d7229d
LM
12506
12507cat >>confdefs.h <<_ACEOF
12508#define PTRACE_TYPE_ARG4 $4
12509_ACEOF
12510
a3828db0
MK
12511if test -n "$5"; then
12512
12513cat >>confdefs.h <<_ACEOF
12514#define PTRACE_TYPE_ARG5 $5
bec39cab 12515_ACEOF
78434e59
MK
12516
12517fi
12518
54019719 12519
a3828db0 12520if test "$cross_compiling" = no; then
81ecdfbb
RW
12521 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
12522$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
12523if test "${ac_cv_func_setpgrp_void+set}" = set; then :
12524 $as_echo_n "(cached) " >&6
a3828db0 12525else
81ecdfbb
RW
12526 if test "$cross_compiling" = yes; then :
12527 as_fn_error "cannot check setpgrp when cross compiling" "$LINENO" 5
bec39cab 12528else
81ecdfbb 12529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12530/* end confdefs.h. */
81ecdfbb 12531$ac_includes_default
bec39cab
AC
12532int
12533main ()
12534{
a3828db0
MK
12535/* If this system has a BSD-style setpgrp which takes arguments,
12536 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
12537 exit successfully. */
81ecdfbb 12538 return setpgrp (1,1) != -1;
bec39cab
AC
12539 ;
12540 return 0;
12541}
12542_ACEOF
81ecdfbb 12543if ac_fn_c_try_run "$LINENO"; then :
a3828db0 12544 ac_cv_func_setpgrp_void=no
c906108c 12545else
81ecdfbb 12546 ac_cv_func_setpgrp_void=yes
c906108c 12547fi
81ecdfbb
RW
12548rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12549 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 12550fi
81ecdfbb 12551
a3828db0 12552fi
81ecdfbb
RW
12553{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
12554$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0
MK
12555if test $ac_cv_func_setpgrp_void = yes; then
12556
81ecdfbb 12557$as_echo "#define SETPGRP_VOID 1" >>confdefs.h
97bf5e38
MK
12558
12559fi
a3828db0
MK
12560
12561else
81ecdfbb
RW
12562 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
12563$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
12564if test "${ac_cv_func_setpgrp_void+set}" = set; then :
12565 $as_echo_n "(cached) " >&6
97bf5e38 12566else
81ecdfbb 12567 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12568/* end confdefs.h. */
a3828db0
MK
12569
12570#include <unistd.h>
12571
bec39cab
AC
12572int
12573main ()
12574{
a3828db0
MK
12575
12576 if (setpgrp(1,1) == -1)
12577 exit (0);
12578 else
12579 exit (1);
12580
bec39cab
AC
12581 ;
12582 return 0;
12583}
12584_ACEOF
81ecdfbb 12585if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12586 ac_cv_func_setpgrp_void=no
c906108c 12587else
81ecdfbb 12588 ac_cv_func_setpgrp_void=yes
c906108c 12589fi
81ecdfbb 12590rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 12591fi
81ecdfbb
RW
12592{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
12593$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0 12594if test $ac_cv_func_setpgrp_void = yes; then
81ecdfbb 12595 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
c3f6f71d 12596
a3828db0 12597fi
c906108c
SS
12598fi
12599
db1ff28b
JK
12600# Assume we'll default to using the included libiberty regex.
12601gdb_use_included_regex=yes
12602
12603# However, if the system regex is GNU regex, then default to *not*
12604# using the included regex.
12605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5
12606$as_echo_n "checking for GNU regex... " >&6; }
12607if test "${gdb_cv_have_gnu_regex+set}" = set; then :
12608 $as_echo_n "(cached) " >&6
12609else
12610 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12611/* end confdefs.h. */
12612#include <gnu-versions.h>
12613int
12614main ()
12615{
12616#define REGEX_INTERFACE_VERSION 1
12617#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
12618# error "Version mismatch"
12619#endif
12620 ;
12621 return 0;
12622}
12623_ACEOF
12624if ac_fn_c_try_compile "$LINENO"; then :
12625 gdb_cv_have_gnu_regex=yes
12626else
12627 gdb_cv_have_gnu_regex=no
12628fi
12629rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12630fi
12631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
12632$as_echo "$gdb_cv_have_gnu_regex" >&6; }
12633if test $gdb_cv_have_gnu_regex = yes; then
12634 gdb_use_included_regex=no
12635fi
12636
12637
12638# Check whether --with-included-regex was given.
12639if test "${with_included_regex+set}" = set; then :
12640 withval=$with_included_regex; gdb_with_regex=$withval
12641else
12642 gdb_with_regex=$gdb_use_included_regex
12643fi
12644
12645if test "$gdb_with_regex" = yes; then
12646
12647$as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h
12648
12649fi
12650
81ecdfbb
RW
12651# Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
12652ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
12653#include <sys/proc.h>
12654
12655"
12656if test "x$ac_cv_member_struct_thread_td_pcb" = x""yes; then :
c906108c 12657
5c45e068 12658cat >>confdefs.h <<_ACEOF
a3828db0 12659#define HAVE_STRUCT_THREAD_TD_PCB 1
bec39cab 12660_ACEOF
c906108c 12661
5c45e068 12662
97bf5e38 12663fi
c906108c 12664
5c45e068 12665
a3828db0 12666# See if <sys/lwp.h> defines `struct lwp`.
81ecdfbb
RW
12667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
12668$as_echo_n "checking for struct lwp... " >&6; }
12669if test "${gdb_cv_struct_lwp+set}" = set; then :
12670 $as_echo_n "(cached) " >&6
bec39cab 12671else
81ecdfbb 12672 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12673/* end confdefs.h. */
a3828db0
MK
12674#include <sys/param.h>
12675#include <sys/lwp.h>
bec39cab
AC
12676int
12677main ()
12678{
a3828db0 12679struct lwp l;
bec39cab
AC
12680 ;
12681 return 0;
12682}
12683_ACEOF
81ecdfbb 12684if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12685 gdb_cv_struct_lwp=yes
c906108c 12686else
81ecdfbb 12687 gdb_cv_struct_lwp=no
c906108c 12688fi
81ecdfbb 12689rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 12690fi
81ecdfbb
RW
12691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
12692$as_echo "$gdb_cv_struct_lwp" >&6; }
a3828db0 12693if test $gdb_cv_struct_lwp = yes; then
c906108c 12694
81ecdfbb 12695$as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
c906108c 12696
97bf5e38 12697fi
c906108c 12698
a3828db0 12699# See if <machine/reg.h> degines `struct reg'.
81ecdfbb
RW
12700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
12701$as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
12702if test "${gdb_cv_struct_reg+set}" = set; then :
12703 $as_echo_n "(cached) " >&6
bec39cab 12704else
81ecdfbb 12705 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12706/* end confdefs.h. */
a3828db0
MK
12707#include <sys/types.h>
12708#include <machine/reg.h>
bec39cab
AC
12709int
12710main ()
12711{
a3828db0 12712struct reg r;
bec39cab
AC
12713 ;
12714 return 0;
12715}
12716_ACEOF
81ecdfbb 12717if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12718 gdb_cv_struct_reg=yes
27ca5dad 12719else
81ecdfbb 12720 gdb_cv_struct_reg=no
27ca5dad 12721fi
81ecdfbb 12722rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27ca5dad 12723fi
81ecdfbb
RW
12724{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
12725$as_echo "$gdb_cv_struct_reg" >&6; }
a3828db0 12726if test $gdb_cv_struct_reg = yes; then
bec39cab 12727
81ecdfbb 12728$as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
27ca5dad
MC
12729
12730fi
97bf5e38 12731
a3828db0
MK
12732# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
12733# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
a6e69c1f
JB
12734ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <sys/types.h>
12735#include <machine/reg.h>
81ecdfbb
RW
12736"
12737if test "x$ac_cv_member_struct_reg_r_fs" = x""yes; then :
5c45e068
MK
12738
12739cat >>confdefs.h <<_ACEOF
a3828db0 12740#define HAVE_STRUCT_REG_R_FS 1
bec39cab 12741_ACEOF
3862412b 12742
5c45e068 12743
97bf5e38 12744fi
a6e69c1f
JB
12745ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <sys/types.h>
12746#include <machine/reg.h>
81ecdfbb
RW
12747"
12748if test "x$ac_cv_member_struct_reg_r_gs" = x""yes; then :
5c45e068
MK
12749
12750cat >>confdefs.h <<_ACEOF
a3828db0 12751#define HAVE_STRUCT_REG_R_GS 1
bec39cab 12752_ACEOF
3862412b 12753
5c45e068 12754
97bf5e38 12755fi
3862412b 12756
5c45e068 12757
6fea9e18
L
12758# See if <sys/user.h> supports the %fs_base and %gs_bas amd64 segment registers.
12759# Older amd64 Linux's don't have the fs_base and gs_base members of
12760# `struct user_regs_struct'.
12761ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "fs_base" "ac_cv_member_struct_user_regs_struct_fs_base" "#include <sys/user.h>
12762"
12763if test "x$ac_cv_member_struct_user_regs_struct_fs_base" = x""yes; then :
12764
12765cat >>confdefs.h <<_ACEOF
12766#define HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE 1
12767_ACEOF
12768
12769
12770fi
12771ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "gs_base" "ac_cv_member_struct_user_regs_struct_gs_base" "#include <sys/user.h>
12772"
12773if test "x$ac_cv_member_struct_user_regs_struct_gs_base" = x""yes; then :
12774
12775cat >>confdefs.h <<_ACEOF
12776#define HAVE_STRUCT_USER_REGS_STRUCT_GS_BASE 1
12777_ACEOF
12778
12779
12780fi
12781
12782
a3828db0 12783# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
81ecdfbb
RW
12784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
12785$as_echo_n "checking for PTRACE_GETREGS... " >&6; }
12786if test "${gdb_cv_have_ptrace_getregs+set}" = set; then :
12787 $as_echo_n "(cached) " >&6
451928c5 12788else
81ecdfbb 12789 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12790/* end confdefs.h. */
a3828db0 12791#include <sys/ptrace.h>
bec39cab
AC
12792int
12793main ()
12794{
a3828db0 12795PTRACE_GETREGS;
bec39cab
AC
12796 ;
12797 return 0;
12798}
12799_ACEOF
81ecdfbb 12800if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12801 gdb_cv_have_ptrace_getregs=yes
451928c5 12802else
81ecdfbb 12803 gdb_cv_have_ptrace_getregs=no
451928c5 12804fi
81ecdfbb 12805rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
12806fi
12807
81ecdfbb
RW
12808{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
12809$as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
a3828db0 12810if test $gdb_cv_have_ptrace_getregs = yes; then
60ca704f 12811
81ecdfbb 12812$as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
451928c5 12813
97bf5e38 12814fi
451928c5 12815
a3828db0 12816# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
81ecdfbb
RW
12817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
12818$as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
12819if test "${gdb_cv_have_ptrace_getfpxregs+set}" = set; then :
12820 $as_echo_n "(cached) " >&6
451928c5 12821else
81ecdfbb 12822 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12823/* end confdefs.h. */
a3828db0 12824#include <sys/ptrace.h>
bec39cab
AC
12825int
12826main ()
12827{
a3828db0 12828PTRACE_GETFPXREGS;
bec39cab
AC
12829 ;
12830 return 0;
12831}
12832_ACEOF
81ecdfbb 12833if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12834 gdb_cv_have_ptrace_getfpxregs=yes
451928c5 12835else
81ecdfbb 12836 gdb_cv_have_ptrace_getfpxregs=no
451928c5 12837fi
81ecdfbb 12838rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
12839fi
12840
81ecdfbb
RW
12841{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
12842$as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
a3828db0 12843if test $gdb_cv_have_ptrace_getfpxregs = yes; then
60ca704f 12844
81ecdfbb 12845$as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
451928c5 12846
97bf5e38 12847fi
451928c5 12848
a3828db0 12849# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
81ecdfbb
RW
12850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
12851$as_echo_n "checking for PT_GETDBREGS... " >&6; }
12852if test "${gdb_cv_have_pt_getdbregs+set}" = set; then :
12853 $as_echo_n "(cached) " >&6
3862412b 12854else
81ecdfbb 12855 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12856/* end confdefs.h. */
a3828db0
MK
12857#include <sys/types.h>
12858#include <sys/ptrace.h>
bec39cab
AC
12859int
12860main ()
12861{
a3828db0 12862PT_GETDBREGS;
bec39cab
AC
12863 ;
12864 return 0;
12865}
12866_ACEOF
81ecdfbb 12867if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12868 gdb_cv_have_pt_getdbregs=yes
3862412b 12869else
81ecdfbb 12870 gdb_cv_have_pt_getdbregs=no
3862412b 12871fi
81ecdfbb 12872rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
12873fi
12874
81ecdfbb
RW
12875{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
12876$as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
a3828db0 12877if test $gdb_cv_have_pt_getdbregs = yes; then
60ca704f 12878
81ecdfbb 12879$as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
3862412b 12880
97bf5e38 12881fi
3862412b 12882
a3828db0 12883# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
81ecdfbb
RW
12884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
12885$as_echo_n "checking for PT_GETXMMREGS... " >&6; }
12886if test "${gdb_cv_have_pt_getxmmregs+set}" = set; then :
12887 $as_echo_n "(cached) " >&6
3862412b 12888else
81ecdfbb 12889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12890/* end confdefs.h. */
a3828db0
MK
12891#include <sys/types.h>
12892#include <sys/ptrace.h>
bec39cab
AC
12893int
12894main ()
12895{
a3828db0 12896PT_GETXMMREGS;
bec39cab
AC
12897 ;
12898 return 0;
12899}
12900_ACEOF
81ecdfbb 12901if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12902 gdb_cv_have_pt_getxmmregs=yes
3862412b 12903else
81ecdfbb 12904 gdb_cv_have_pt_getxmmregs=no
3862412b 12905fi
81ecdfbb 12906rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
12907fi
12908
81ecdfbb
RW
12909{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
12910$as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
a3828db0 12911if test $gdb_cv_have_pt_getxmmregs = yes; then
60ca704f 12912
81ecdfbb 12913$as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
3862412b 12914
97bf5e38 12915fi
3862412b 12916
6e9567fe
JB
12917# See if <sys/ptrace.h> supports LWP names on FreeBSD
12918# Older FreeBSD versions don't have the pl_tdname member of
12919# `struct ptrace_lwpinfo'.
12920ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_tdname" "ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" "#include <sys/ptrace.h>
12921"
12922if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" = x""yes; then :
12923
12924cat >>confdefs.h <<_ACEOF
12925#define HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME 1
12926_ACEOF
12927
12928
12929fi
12930
12931
e6cdd38e
JB
12932# See if <sys/ptrace.h> supports syscall fields on FreeBSD. The
12933# pl_syscall_code member of `struct ptrace_lwpinfo' was added in
12934# FreeBSD 10.3.
12935ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_syscall_code" "ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" "#include <sys/ptrace.h>
12936"
12937if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" = x""yes; then :
12938
12939cat >>confdefs.h <<_ACEOF
12940#define HAVE_STRUCT_PTRACE_LWPINFO_PL_SYSCALL_CODE 1
12941_ACEOF
12942
12943
12944fi
12945
6e9567fe 12946
05b4bd79 12947# Detect which type of /proc is in use, such as for Solaris.
97bf5e38
MK
12948
12949if test "${target}" = "${host}"; then
12950 case "${host}" in
7b00db47 12951 *-*-sysv4.2* | *-*-sysv5* )
60ca704f 12952
81ecdfbb 12953$as_echo "#define NEW_PROC_API 1" >>confdefs.h
97bf5e38
MK
12954
12955 ;;
c162e8c9 12956 *-*-solaris2.[6789] | *-*-solaris2.1[0-9]*)
60ca704f 12957
81ecdfbb 12958$as_echo "#define NEW_PROC_API 1" >>confdefs.h
c960c18f
AC
12959
12960 ;;
12961 mips-sgi-irix5*)
12962 # Work around <sys/proc.h> needing _KMEMUSER problem on IRIX 5.
60ca704f 12963
81ecdfbb 12964$as_echo "#define _KMEMUSER 1" >>confdefs.h
97bf5e38
MK
12965
12966 ;;
12967 esac
12968fi
12969
12970if test "$ac_cv_header_sys_procfs_h" = yes; then
81ecdfbb
RW
12971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
12972$as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
12973 if test "${bfd_cv_have_sys_procfs_type_gregset_t+set}" = set; then :
12974 $as_echo_n "(cached) " >&6
596c9d4b 12975else
81ecdfbb 12976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12977/* end confdefs.h. */
596c9d4b
KB
12978
12979#define _SYSCALL32
d30c5336
JK
12980/* Needed for new procfs interface on sparc-solaris. */
12981#define _STRUCTURED_PROC 1
596c9d4b 12982#include <sys/procfs.h>
bec39cab
AC
12983int
12984main ()
12985{
97bf5e38 12986gregset_t avar
bec39cab
AC
12987 ;
12988 return 0;
12989}
12990_ACEOF
81ecdfbb 12991if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 12992 bfd_cv_have_sys_procfs_type_gregset_t=yes
596c9d4b 12993else
81ecdfbb 12994 bfd_cv_have_sys_procfs_type_gregset_t=no
bec39cab 12995
596c9d4b 12996fi
81ecdfbb 12997rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
12998fi
12999
97bf5e38 13000 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
bec39cab 13001
81ecdfbb 13002$as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
596c9d4b
KB
13003
13004 fi
81ecdfbb
RW
13005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
13006$as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
451928c5 13007
81ecdfbb
RW
13008 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
13009$as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
13010 if test "${bfd_cv_have_sys_procfs_type_fpregset_t+set}" = set; then :
13011 $as_echo_n "(cached) " >&6
d84dd0c5 13012else
81ecdfbb 13013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13014/* end confdefs.h. */
97bf5e38
MK
13015
13016#define _SYSCALL32
d30c5336
JK
13017/* Needed for new procfs interface on sparc-solaris. */
13018#define _STRUCTURED_PROC 1
d84dd0c5 13019#include <sys/procfs.h>
bec39cab
AC
13020int
13021main ()
13022{
97bf5e38 13023fpregset_t avar
bec39cab
AC
13024 ;
13025 return 0;
13026}
13027_ACEOF
81ecdfbb 13028if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13029 bfd_cv_have_sys_procfs_type_fpregset_t=yes
d84dd0c5 13030else
81ecdfbb 13031 bfd_cv_have_sys_procfs_type_fpregset_t=no
bec39cab 13032
d84dd0c5 13033fi
81ecdfbb 13034rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d84dd0c5
MK
13035fi
13036
97bf5e38 13037 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
bec39cab 13038
81ecdfbb 13039$as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
d84dd0c5 13040
97bf5e38 13041 fi
81ecdfbb
RW
13042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
13043$as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
d84dd0c5 13044
81ecdfbb
RW
13045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
13046$as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
13047 if test "${bfd_cv_have_sys_procfs_type_prgregset_t+set}" = set; then :
13048 $as_echo_n "(cached) " >&6
c906108c 13049else
81ecdfbb 13050 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13051/* end confdefs.h. */
c906108c 13052
97bf5e38 13053#define _SYSCALL32
d30c5336
JK
13054/* Needed for new procfs interface on sparc-solaris. */
13055#define _STRUCTURED_PROC 1
97bf5e38 13056#include <sys/procfs.h>
bec39cab
AC
13057int
13058main ()
13059{
97bf5e38 13060prgregset_t avar
bec39cab
AC
13061 ;
13062 return 0;
13063}
13064_ACEOF
81ecdfbb 13065if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13066 bfd_cv_have_sys_procfs_type_prgregset_t=yes
c906108c 13067else
81ecdfbb 13068 bfd_cv_have_sys_procfs_type_prgregset_t=no
bec39cab 13069
c906108c 13070fi
81ecdfbb 13071rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13072fi
13073
97bf5e38 13074 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
bec39cab 13075
81ecdfbb 13076$as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
c906108c 13077
97bf5e38 13078 fi
81ecdfbb
RW
13079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
13080$as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
c906108c 13081
81ecdfbb
RW
13082 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
13083$as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
13084 if test "${bfd_cv_have_sys_procfs_type_prfpregset_t+set}" = set; then :
13085 $as_echo_n "(cached) " >&6
d45fe813 13086else
81ecdfbb 13087 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13088/* end confdefs.h. */
97bf5e38
MK
13089
13090#define _SYSCALL32
d30c5336
JK
13091/* Needed for new procfs interface on sparc-solaris. */
13092#define _STRUCTURED_PROC 1
97bf5e38 13093#include <sys/procfs.h>
bec39cab
AC
13094int
13095main ()
13096{
97bf5e38 13097prfpregset_t avar
bec39cab
AC
13098 ;
13099 return 0;
13100}
13101_ACEOF
81ecdfbb 13102if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13103 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
d45fe813 13104else
81ecdfbb 13105 bfd_cv_have_sys_procfs_type_prfpregset_t=no
bec39cab 13106
d45fe813 13107fi
81ecdfbb 13108rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
13109fi
13110
97bf5e38 13111 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
bec39cab 13112
81ecdfbb 13113$as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
d45fe813 13114
97bf5e38 13115 fi
81ecdfbb
RW
13116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
13117$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
d45fe813 13118
81ecdfbb
RW
13119 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
13120$as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
13121 if test "${bfd_cv_have_sys_procfs_type_prgregset32_t+set}" = set; then :
13122 $as_echo_n "(cached) " >&6
d45fe813 13123else
81ecdfbb 13124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13125/* end confdefs.h. */
97bf5e38
MK
13126
13127#define _SYSCALL32
d30c5336
JK
13128/* Needed for new procfs interface on sparc-solaris. */
13129#define _STRUCTURED_PROC 1
97bf5e38 13130#include <sys/procfs.h>
bec39cab
AC
13131int
13132main ()
13133{
97bf5e38 13134prgregset32_t avar
bec39cab
AC
13135 ;
13136 return 0;
13137}
13138_ACEOF
81ecdfbb 13139if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13140 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
d45fe813 13141else
81ecdfbb 13142 bfd_cv_have_sys_procfs_type_prgregset32_t=no
bec39cab 13143
d45fe813 13144fi
81ecdfbb 13145rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
13146fi
13147
97bf5e38 13148 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
bec39cab 13149
81ecdfbb 13150$as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
d45fe813 13151
97bf5e38 13152 fi
81ecdfbb
RW
13153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
13154$as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
d45fe813 13155
81ecdfbb
RW
13156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
13157$as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
13158 if test "${bfd_cv_have_sys_procfs_type_lwpid_t+set}" = set; then :
13159 $as_echo_n "(cached) " >&6
d45fe813 13160else
81ecdfbb 13161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13162/* end confdefs.h. */
97bf5e38 13163
d45fe813 13164#define _SYSCALL32
d30c5336
JK
13165/* Needed for new procfs interface on sparc-solaris. */
13166#define _STRUCTURED_PROC 1
97bf5e38 13167#include <sys/procfs.h>
bec39cab
AC
13168int
13169main ()
13170{
97bf5e38 13171lwpid_t avar
bec39cab
AC
13172 ;
13173 return 0;
13174}
13175_ACEOF
81ecdfbb 13176if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13177 bfd_cv_have_sys_procfs_type_lwpid_t=yes
d45fe813 13178else
81ecdfbb 13179 bfd_cv_have_sys_procfs_type_lwpid_t=no
bec39cab 13180
d45fe813 13181fi
81ecdfbb 13182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
13183fi
13184
97bf5e38 13185 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
bec39cab 13186
81ecdfbb 13187$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
d45fe813 13188
97bf5e38 13189 fi
81ecdfbb
RW
13190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
13191$as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
c906108c 13192
81ecdfbb
RW
13193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
13194$as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
13195 if test "${bfd_cv_have_sys_procfs_type_psaddr_t+set}" = set; then :
13196 $as_echo_n "(cached) " >&6
c906108c 13197else
81ecdfbb 13198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13199/* end confdefs.h. */
c906108c 13200
97bf5e38 13201#define _SYSCALL32
d30c5336
JK
13202/* Needed for new procfs interface on sparc-solaris. */
13203#define _STRUCTURED_PROC 1
97bf5e38 13204#include <sys/procfs.h>
bec39cab
AC
13205int
13206main ()
13207{
97bf5e38 13208psaddr_t avar
bec39cab
AC
13209 ;
13210 return 0;
13211}
13212_ACEOF
81ecdfbb 13213if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13214 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c 13215else
81ecdfbb 13216 bfd_cv_have_sys_procfs_type_psaddr_t=no
bec39cab 13217
c906108c 13218fi
81ecdfbb 13219rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13220fi
13221
97bf5e38 13222 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
bec39cab 13223
81ecdfbb 13224$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
c906108c 13225
97bf5e38 13226 fi
81ecdfbb
RW
13227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
13228$as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
c906108c 13229
81ecdfbb
RW
13230 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prsysent_t in sys/procfs.h" >&5
13231$as_echo_n "checking for prsysent_t in sys/procfs.h... " >&6; }
13232 if test "${bfd_cv_have_sys_procfs_type_prsysent_t+set}" = set; then :
13233 $as_echo_n "(cached) " >&6
c906108c 13234else
81ecdfbb 13235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13236/* end confdefs.h. */
c906108c 13237
97bf5e38 13238#define _SYSCALL32
d30c5336
JK
13239/* Needed for new procfs interface on sparc-solaris. */
13240#define _STRUCTURED_PROC 1
97bf5e38 13241#include <sys/procfs.h>
bec39cab
AC
13242int
13243main ()
13244{
97bf5e38 13245prsysent_t avar
bec39cab
AC
13246 ;
13247 return 0;
13248}
13249_ACEOF
81ecdfbb 13250if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13251 bfd_cv_have_sys_procfs_type_prsysent_t=yes
c906108c 13252else
81ecdfbb 13253 bfd_cv_have_sys_procfs_type_prsysent_t=no
bec39cab 13254
c906108c 13255fi
81ecdfbb 13256rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13257fi
13258
97bf5e38 13259 if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
bec39cab 13260
81ecdfbb 13261$as_echo "#define HAVE_PRSYSENT_T 1" >>confdefs.h
c906108c 13262
97bf5e38 13263 fi
81ecdfbb
RW
13264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prsysent_t" >&5
13265$as_echo "$bfd_cv_have_sys_procfs_type_prsysent_t" >&6; }
c906108c 13266
81ecdfbb
RW
13267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigset_t in sys/procfs.h" >&5
13268$as_echo_n "checking for pr_sigset_t in sys/procfs.h... " >&6; }
13269 if test "${bfd_cv_have_sys_procfs_type_pr_sigset_t+set}" = set; then :
13270 $as_echo_n "(cached) " >&6
c906108c 13271else
81ecdfbb 13272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13273/* end confdefs.h. */
c906108c 13274
97bf5e38 13275#define _SYSCALL32
d30c5336
JK
13276/* Needed for new procfs interface on sparc-solaris. */
13277#define _STRUCTURED_PROC 1
97bf5e38 13278#include <sys/procfs.h>
bec39cab
AC
13279int
13280main ()
13281{
97bf5e38 13282pr_sigset_t avar
bec39cab
AC
13283 ;
13284 return 0;
13285}
13286_ACEOF
81ecdfbb 13287if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13288 bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
c906108c 13289else
81ecdfbb 13290 bfd_cv_have_sys_procfs_type_pr_sigset_t=no
bec39cab 13291
c906108c 13292fi
81ecdfbb 13293rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13294fi
13295
97bf5e38 13296 if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
bec39cab 13297
81ecdfbb 13298$as_echo "#define HAVE_PR_SIGSET_T 1" >>confdefs.h
c906108c 13299
97bf5e38 13300 fi
81ecdfbb
RW
13301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigset_t" >&5
13302$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigset_t" >&6; }
c906108c 13303
81ecdfbb
RW
13304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigaction64_t in sys/procfs.h" >&5
13305$as_echo_n "checking for pr_sigaction64_t in sys/procfs.h... " >&6; }
13306 if test "${bfd_cv_have_sys_procfs_type_pr_sigaction64_t+set}" = set; then :
13307 $as_echo_n "(cached) " >&6
c906108c 13308else
81ecdfbb 13309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13310/* end confdefs.h. */
c906108c 13311
97bf5e38 13312#define _SYSCALL32
d30c5336
JK
13313/* Needed for new procfs interface on sparc-solaris. */
13314#define _STRUCTURED_PROC 1
97bf5e38 13315#include <sys/procfs.h>
bec39cab
AC
13316int
13317main ()
13318{
97bf5e38 13319pr_sigaction64_t avar
bec39cab
AC
13320 ;
13321 return 0;
13322}
13323_ACEOF
81ecdfbb 13324if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13325 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
c906108c 13326else
81ecdfbb 13327 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
bec39cab 13328
c906108c 13329fi
81ecdfbb 13330rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13331fi
13332
97bf5e38 13333 if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
bec39cab 13334
81ecdfbb 13335$as_echo "#define HAVE_PR_SIGACTION64_T 1" >>confdefs.h
c906108c 13336
97bf5e38 13337 fi
81ecdfbb
RW
13338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&5
13339$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&6; }
97bf5e38 13340
81ecdfbb
RW
13341 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_siginfo64_t in sys/procfs.h" >&5
13342$as_echo_n "checking for pr_siginfo64_t in sys/procfs.h... " >&6; }
13343 if test "${bfd_cv_have_sys_procfs_type_pr_siginfo64_t+set}" = set; then :
13344 $as_echo_n "(cached) " >&6
97bf5e38 13345else
81ecdfbb 13346 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13347/* end confdefs.h. */
97bf5e38
MK
13348
13349#define _SYSCALL32
d30c5336
JK
13350/* Needed for new procfs interface on sparc-solaris. */
13351#define _STRUCTURED_PROC 1
97bf5e38 13352#include <sys/procfs.h>
bec39cab
AC
13353int
13354main ()
13355{
97bf5e38 13356pr_siginfo64_t avar
bec39cab
AC
13357 ;
13358 return 0;
13359}
13360_ACEOF
81ecdfbb 13361if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
13362 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
13363else
81ecdfbb 13364 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
bec39cab 13365
97bf5e38 13366fi
81ecdfbb 13367rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 13368fi
c906108c 13369
97bf5e38 13370 if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
bec39cab 13371
81ecdfbb 13372$as_echo "#define HAVE_PR_SIGINFO64_T 1" >>confdefs.h
c906108c 13373
97bf5e38 13374 fi
81ecdfbb
RW
13375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&5
13376$as_echo "$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&6; }
bec39cab
AC
13377
13378
97bf5e38
MK
13379
13380
13381
97bf5e38 13382 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
81ecdfbb
RW
13383 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether prfpregset_t type is broken" >&5
13384$as_echo_n "checking whether prfpregset_t type is broken... " >&6; }
13385 if test "${gdb_cv_prfpregset_t_broken+set}" = set; then :
13386 $as_echo_n "(cached) " >&6
c906108c 13387else
81ecdfbb 13388 if test "$cross_compiling" = yes; then :
97bf5e38 13389 gdb_cv_prfpregset_t_broken=yes
c906108c 13390else
81ecdfbb 13391 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13392/* end confdefs.h. */
97bf5e38
MK
13393#include <sys/procfs.h>
13394 int main ()
13395 {
13396 if (sizeof (prfpregset_t) == sizeof (void *))
13397 return 1;
13398 return 0;
13399 }
bec39cab 13400_ACEOF
81ecdfbb 13401if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 13402 gdb_cv_prfpregset_t_broken=no
81ecdfbb
RW
13403else
13404 gdb_cv_prfpregset_t_broken=yes
c906108c 13405fi
81ecdfbb
RW
13406rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13407 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 13408fi
81ecdfbb 13409
c906108c
SS
13410fi
13411
81ecdfbb
RW
13412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_prfpregset_t_broken" >&5
13413$as_echo "$gdb_cv_prfpregset_t_broken" >&6; }
97bf5e38 13414 if test $gdb_cv_prfpregset_t_broken = yes; then
60ca704f 13415
81ecdfbb 13416$as_echo "#define PRFPREGSET_T_BROKEN 1" >>confdefs.h
c906108c 13417
97bf5e38
MK
13418 fi
13419 fi
c906108c 13420fi
c906108c 13421
bc8bcb4b 13422# Check if the compiler supports the `long long' type.
c906108c 13423
81ecdfbb
RW
13424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
13425$as_echo_n "checking for long long support in compiler... " >&6; }
13426if test "${gdb_cv_c_long_long+set}" = set; then :
13427 $as_echo_n "(cached) " >&6
97bf5e38 13428else
81ecdfbb 13429 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13430/* end confdefs.h. */
bc8bcb4b 13431extern long long foo;
bec39cab
AC
13432int
13433main ()
13434{
bc8bcb4b 13435switch (foo & 2) { case 0: return 1; }
bec39cab
AC
13436 ;
13437 return 0;
13438}
13439_ACEOF
81ecdfbb 13440if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
13441 gdb_cv_c_long_long=yes
13442else
81ecdfbb 13443 gdb_cv_c_long_long=no
97bf5e38 13444fi
81ecdfbb 13445rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 13446fi
81ecdfbb
RW
13447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
13448$as_echo "$gdb_cv_c_long_long" >&6; }
74a0d9f6
JK
13449if test $gdb_cv_c_long_long != yes; then
13450 # libdecnumber requires long long.
13451 as_fn_error "Compiler must support long long for GDB." "$LINENO" 5
97bf5e38
MK
13452fi
13453
bc8bcb4b 13454# Check if the compiler and runtime support printing long longs.
97bf5e38 13455
81ecdfbb
RW
13456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
13457$as_echo_n "checking for long long support in printf... " >&6; }
13458if test "${gdb_cv_printf_has_long_long+set}" = set; then :
13459 $as_echo_n "(cached) " >&6
97bf5e38 13460else
81ecdfbb 13461 if test "$cross_compiling" = yes; then :
97bf5e38
MK
13462 gdb_cv_printf_has_long_long=no
13463else
81ecdfbb 13464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13465/* end confdefs.h. */
bc8bcb4b
MK
13466$ac_includes_default
13467int
13468main ()
13469{
13470char buf[32];
97bf5e38
MK
13471 long long l = 0;
13472 l = (l << 16) + 0x0123;
13473 l = (l << 16) + 0x4567;
13474 l = (l << 16) + 0x89ab;
13475 l = (l << 16) + 0xcdef;
13476 sprintf (buf, "0x%016llx", l);
13477 return (strcmp ("0x0123456789abcdef", buf));
bc8bcb4b
MK
13478 ;
13479 return 0;
c906108c 13480}
bec39cab 13481_ACEOF
81ecdfbb 13482if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
13483 gdb_cv_printf_has_long_long=yes
13484else
81ecdfbb 13485 gdb_cv_printf_has_long_long=no
97bf5e38 13486fi
81ecdfbb
RW
13487rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13488 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 13489fi
81ecdfbb 13490
97bf5e38 13491fi
81ecdfbb
RW
13492{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
13493$as_echo "$gdb_cv_printf_has_long_long" >&6; }
97bf5e38 13494if test $gdb_cv_printf_has_long_long = yes; then
bc8bcb4b 13495
81ecdfbb 13496$as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
97bf5e38
MK
13497
13498fi
97bf5e38 13499
1a619819
LM
13500# Check if the compiler and runtime support printing decfloats.
13501
81ecdfbb
RW
13502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
13503$as_echo_n "checking for decfloat support in printf... " >&6; }
13504if test "${gdb_cv_printf_has_decfloat+set}" = set; then :
13505 $as_echo_n "(cached) " >&6
1a619819 13506else
81ecdfbb 13507 if test "$cross_compiling" = yes; then :
1a619819
LM
13508 gdb_cv_printf_has_decfloat=no
13509else
81ecdfbb 13510 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1a619819
LM
13511/* end confdefs.h. */
13512$ac_includes_default
13513int
13514main ()
13515{
13516char buf[64];
13517 _Decimal32 d32 = 1.2345df;
13518 _Decimal64 d64 = 1.2345dd;
13519 _Decimal128 d128 = 1.2345dl;
13520 sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
13521 return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
13522 ;
13523 return 0;
13524}
13525_ACEOF
81ecdfbb 13526if ac_fn_c_try_run "$LINENO"; then :
1a619819
LM
13527 gdb_cv_printf_has_decfloat=yes
13528else
81ecdfbb 13529 gdb_cv_printf_has_decfloat=no
1a619819 13530fi
81ecdfbb
RW
13531rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13532 conftest.$ac_objext conftest.beam conftest.$ac_ext
1a619819 13533fi
81ecdfbb 13534
1a619819 13535fi
81ecdfbb
RW
13536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
13537$as_echo "$gdb_cv_printf_has_decfloat" >&6; }
1a619819
LM
13538if test $gdb_cv_printf_has_decfloat = yes; then
13539
81ecdfbb 13540$as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
1a619819
LM
13541
13542fi
13543
bc8bcb4b
MK
13544# Check if the compiler supports the `long double' type. We can't use
13545# AC_C_LONG_DOUBLE because that one does additional checks on the
13546# constants defined in <float.h> that fail on some systems,
13547# e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
97bf5e38 13548
81ecdfbb
RW
13549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
13550$as_echo_n "checking for long double support in compiler... " >&6; }
13551if test "${gdb_cv_c_long_double+set}" = set; then :
13552 $as_echo_n "(cached) " >&6
97bf5e38 13553else
81ecdfbb 13554 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13555/* end confdefs.h. */
97bf5e38 13556long double foo;
bec39cab 13557_ACEOF
81ecdfbb 13558if ac_fn_c_try_compile "$LINENO"; then :
bc8bcb4b 13559 gdb_cv_c_long_double=yes
97bf5e38 13560else
81ecdfbb 13561 gdb_cv_c_long_double=no
97bf5e38 13562fi
81ecdfbb 13563rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 13564fi
81ecdfbb
RW
13565{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
13566$as_echo "$gdb_cv_c_long_double" >&6; }
bc8bcb4b 13567if test $gdb_cv_c_long_double = yes; then
c906108c 13568
81ecdfbb 13569$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
13570
13571fi
13572
bc8bcb4b 13573# Check if the compiler and runtime support printing long doubles.
97bf5e38 13574
81ecdfbb
RW
13575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
13576$as_echo_n "checking for long double support in printf... " >&6; }
13577if test "${gdb_cv_printf_has_long_double+set}" = set; then :
13578 $as_echo_n "(cached) " >&6
97bf5e38 13579else
81ecdfbb 13580 if test "$cross_compiling" = yes; then :
97bf5e38
MK
13581 gdb_cv_printf_has_long_double=no
13582else
81ecdfbb 13583 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13584/* end confdefs.h. */
bc8bcb4b
MK
13585$ac_includes_default
13586int
13587main ()
13588{
13589char buf[16];
97bf5e38
MK
13590 long double f = 3.141592653;
13591 sprintf (buf, "%Lg", f);
13592 return (strncmp ("3.14159", buf, 7));
bc8bcb4b
MK
13593 ;
13594 return 0;
97bf5e38 13595}
bec39cab 13596_ACEOF
81ecdfbb 13597if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 13598 gdb_cv_printf_has_long_double=yes
c906108c 13599else
81ecdfbb 13600 gdb_cv_printf_has_long_double=no
c906108c 13601fi
81ecdfbb
RW
13602rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13603 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 13604fi
81ecdfbb 13605
c906108c 13606fi
81ecdfbb
RW
13607{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
13608$as_echo "$gdb_cv_printf_has_long_double" >&6; }
97bf5e38 13609if test $gdb_cv_printf_has_long_double = yes; then
bc8bcb4b 13610
81ecdfbb 13611$as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
13612
13613fi
97bf5e38 13614
bc8bcb4b 13615# Check if the compiler and runtime support scanning long doubles.
97bf5e38 13616
81ecdfbb
RW
13617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
13618$as_echo_n "checking for long double support in scanf... " >&6; }
13619if test "${gdb_cv_scanf_has_long_double+set}" = set; then :
13620 $as_echo_n "(cached) " >&6
97bf5e38 13621else
81ecdfbb 13622 if test "$cross_compiling" = yes; then :
97bf5e38
MK
13623 gdb_cv_scanf_has_long_double=no
13624else
81ecdfbb 13625 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13626/* end confdefs.h. */
bc8bcb4b
MK
13627#include <stdio.h>
13628int
13629main ()
13630{
13631char *buf = "3.141592653";
97bf5e38
MK
13632 long double f = 0;
13633 sscanf (buf, "%Lg", &f);
13634 return !(f > 3.14159 && f < 3.14160);
bc8bcb4b
MK
13635 ;
13636 return 0;
97bf5e38 13637}
bec39cab 13638_ACEOF
81ecdfbb 13639if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
13640 gdb_cv_scanf_has_long_double=yes
13641else
81ecdfbb 13642 gdb_cv_scanf_has_long_double=no
97bf5e38 13643fi
81ecdfbb
RW
13644rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13645 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 13646fi
81ecdfbb 13647
c906108c 13648fi
81ecdfbb
RW
13649{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
13650$as_echo "$gdb_cv_scanf_has_long_double" >&6; }
97bf5e38 13651if test $gdb_cv_scanf_has_long_double = yes; then
bc8bcb4b 13652
81ecdfbb 13653$as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
13654
13655fi
c906108c 13656
438013df
AO
13657case ${host_os} in
13658aix*)
81ecdfbb
RW
13659 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
13660$as_echo_n "checking for -bbigtoc option... " >&6; }
13661if test "${gdb_cv_bigtoc+set}" = set; then :
13662 $as_echo_n "(cached) " >&6
438013df 13663else
bec39cab 13664
438013df
AO
13665 SAVE_LDFLAGS=$LDFLAGS
13666
13667 case $GCC in
13668 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
13669 *) gdb_cv_bigtoc=-bbigtoc ;;
13670 esac
13671
13672 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
81ecdfbb 13673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13674/* end confdefs.h. */
438013df 13675
bec39cab
AC
13676int
13677main ()
13678{
438013df 13679int i;
bec39cab
AC
13680 ;
13681 return 0;
13682}
13683_ACEOF
81ecdfbb 13684if ac_fn_c_try_link "$LINENO"; then :
bec39cab 13685
81ecdfbb
RW
13686else
13687 gdb_cv_bigtoc=
438013df 13688fi
81ecdfbb
RW
13689rm -f core conftest.err conftest.$ac_objext \
13690 conftest$ac_exeext conftest.$ac_ext
ec76baa5 13691 LDFLAGS="${SAVE_LDFLAGS}"
438013df 13692
bec39cab 13693fi
81ecdfbb
RW
13694{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
13695$as_echo "$gdb_cv_bigtoc" >&6; }
438013df
AO
13696 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
13697 ;;
13698esac
13699
38f6b338 13700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
f6528abd 13701$as_echo_n "checking for the dynamic export flag... " >&6; }
38f6b338
JK
13702dynamic_list=false
13703if test "${gdb_native}" = yes; then
13704 # The dynamically loaded libthread_db needs access to symbols in the gdb
13705 # executable. Older GNU ld supports --export-dynamic but --dynamic-list
13706 # may not be supported there.
13707 old_LDFLAGS="$LDFLAGS"
13708 # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
13709 RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
13710 LDFLAGS="$LDFLAGS $RDYNAMIC"
13711 if test "${have_libpython}" = no; then
13712 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f6528abd
JK
13713/* end confdefs.h. */
13714
13715int
13716main ()
13717{
13718
13719 ;
13720 return 0;
13721}
13722_ACEOF
13723if ac_fn_c_try_link "$LINENO"; then :
3bebe2f2
JK
13724 dynamic_list=true
13725fi
13726rm -f core conftest.err conftest.$ac_objext \
13727 conftest$ac_exeext conftest.$ac_ext
38f6b338
JK
13728 else
13729 # Workaround http://bugs.python.org/issue4434 where static
13730 # libpythonX.Y.a would get its symbols required for
13731 # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
13732 # Problem does not happen for the recommended libpythonX.Y.so linkage.
a4a1c157
PA
13733
13734 # Note the workaround for Python
13735 # http://bugs.python.org/issue10112 earlier has removed
13736 # -export-dynamic from PYTHON_LIBS. That's exactly what we want
13737 # here too, as otherwise it'd make this -Wl,--dynamic-list test
13738 # always pass.
38f6b338
JK
13739 old_CFLAGS="$CFLAGS"
13740 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
8c1fb155
JK
13741 old_LIBS="$LIBS"
13742 LIBS="$LIBS $PYTHON_LIBS"
1b4f615e
PA
13743 old_CPPFLAGS="$CPPFLAGS"
13744 CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
38f6b338 13745 if test "$cross_compiling" = yes; then :
3bebe2f2 13746 true
f6528abd 13747else
3bebe2f2
JK
13748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13749/* end confdefs.h. */
1b4f615e 13750#include "Python.h"
3bebe2f2
JK
13751int
13752main ()
13753{
13754int err;
38f6b338
JK
13755 Py_Initialize ();
13756 err = PyRun_SimpleString ("import itertools\n");
13757 Py_Finalize ();
13758 return err == 0 ? 0 : 1;
3bebe2f2
JK
13759 ;
13760 return 0;
13761}
13762_ACEOF
13763if ac_fn_c_try_run "$LINENO"; then :
13764 dynamic_list=true
13765fi
13766rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13767 conftest.$ac_objext conftest.beam conftest.$ac_ext
13768fi
13769
8c1fb155 13770 LIBS="$old_LIBS"
38f6b338 13771 CFLAGS="$old_CFLAGS"
1b4f615e 13772 CPPFLAGS="$old_CPPFLAGS"
38f6b338
JK
13773 fi
13774 LDFLAGS="$old_LDFLAGS"
13775fi
13776if $dynamic_list; then
13777 found="-Wl,--dynamic-list"
13778 RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
f6528abd 13779else
38f6b338
JK
13780 found="-rdynamic"
13781 RDYNAMIC="-rdynamic"
f6528abd 13782fi
f6528abd 13783
38f6b338 13784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
f6528abd 13785$as_echo "$found" >&6; }
0407b3f1 13786
f6528abd 13787
0407b3f1 13788if test ${build} = ${host} -a ${host} = ${target} ; then
c906108c 13789 case ${host_os} in
c906108c 13790 solaris*)
d92419e5
JB
13791 # See if thread_db library is around for Solaris thread debugging.
13792 # Note that we must explicitly test for version 1 of the library
13793 # because version 0 (present on Solaris 2.4 or earlier) doesn't have
13794 # the same API.
81ecdfbb
RW
13795 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris thread debugging library" >&5
13796$as_echo_n "checking for Solaris thread debugging library... " >&6; }
c906108c 13797 if test -f /usr/lib/libthread_db.so.1 ; then
81ecdfbb
RW
13798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13799$as_echo "yes" >&6; }
60ca704f 13800
81ecdfbb 13801$as_echo "#define HAVE_THREAD_DB_LIB 1" >>confdefs.h
c906108c 13802
3483b318 13803 CONFIG_OBS="${CONFIG_OBS} sol-thread.o"
c906108c 13804 CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
81ecdfbb
RW
13805 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
13806$as_echo_n "checking for dlopen in -ldl... " >&6; }
13807if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
13808 $as_echo_n "(cached) " >&6
c906108c 13809else
bec39cab 13810 ac_check_lib_save_LIBS=$LIBS
c906108c 13811LIBS="-ldl $LIBS"
81ecdfbb 13812cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
13813/* end confdefs.h. */
13814
81ecdfbb
RW
13815/* Override any GCC internal prototype to avoid an error.
13816 Use char because int might match the return type of a GCC
13817 builtin and then its argument prototype would still apply. */
bec39cab
AC
13818#ifdef __cplusplus
13819extern "C"
13820#endif
bec39cab
AC
13821char dlopen ();
13822int
13823main ()
13824{
81ecdfbb 13825return dlopen ();
bec39cab
AC
13826 ;
13827 return 0;
13828}
13829_ACEOF
81ecdfbb 13830if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
13831 ac_cv_lib_dl_dlopen=yes
13832else
81ecdfbb 13833 ac_cv_lib_dl_dlopen=no
bec39cab 13834fi
81ecdfbb
RW
13835rm -f core conftest.err conftest.$ac_objext \
13836 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
13837LIBS=$ac_check_lib_save_LIBS
13838fi
81ecdfbb
RW
13839{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
13840$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
13841if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
bec39cab
AC
13842 cat >>confdefs.h <<_ACEOF
13843#define HAVE_LIBDL 1
13844_ACEOF
c906108c
SS
13845
13846 LIBS="-ldl $LIBS"
13847
c906108c
SS
13848fi
13849
f6528abd 13850 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} $RDYNAMIC"
c906108c
SS
13851 # Sun randomly tweaked the prototypes in <proc_service.h>
13852 # at one point.
81ecdfbb
RW
13853 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if <proc_service.h> is old" >&5
13854$as_echo_n "checking if <proc_service.h> is old... " >&6; }
13855 if test "${gdb_cv_proc_service_is_old+set}" = set; then :
13856 $as_echo_n "(cached) " >&6
c906108c 13857else
bec39cab 13858
81ecdfbb 13859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13860/* end confdefs.h. */
c906108c
SS
13861
13862 #include <proc_service.h>
13863 ps_err_e ps_pdwrite
13864 (struct ps_prochandle*, psaddr_t, const void*, size_t);
c906108c 13865
bec39cab
AC
13866int
13867main ()
13868{
13869
13870 ;
13871 return 0;
13872}
13873_ACEOF
81ecdfbb 13874if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
13875 gdb_cv_proc_service_is_old=no
13876else
81ecdfbb 13877 gdb_cv_proc_service_is_old=yes
c906108c 13878fi
81ecdfbb 13879rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 13880
c906108c
SS
13881fi
13882
81ecdfbb
RW
13883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_proc_service_is_old" >&5
13884$as_echo "$gdb_cv_proc_service_is_old" >&6; }
c906108c 13885 if test $gdb_cv_proc_service_is_old = yes; then
60ca704f 13886
81ecdfbb 13887$as_echo "#define PROC_SERVICE_IS_OLD 1" >>confdefs.h
c906108c
SS
13888
13889 fi
13890 else
81ecdfbb
RW
13891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13892$as_echo "no" >&6; }
c906108c
SS
13893 fi
13894 ;;
d92419e5 13895 aix*)
81ecdfbb
RW
13896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
13897$as_echo_n "checking for AiX thread debugging library... " >&6; }
13898 if test "${gdb_cv_have_aix_thread_debug+set}" = set; then :
13899 $as_echo_n "(cached) " >&6
bec39cab 13900else
81ecdfbb 13901 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13902/* end confdefs.h. */
d92419e5 13903#include <sys/pthdebug.h>
bec39cab
AC
13904int
13905main ()
13906{
d92419e5
JB
13907#ifndef PTHDB_VERSION_3
13908 #error
13909 #endif
bec39cab
AC
13910 ;
13911 return 0;
13912}
13913_ACEOF
81ecdfbb 13914if ac_fn_c_try_compile "$LINENO"; then :
d92419e5
JB
13915 gdb_cv_have_aix_thread_debug=yes
13916else
81ecdfbb 13917 gdb_cv_have_aix_thread_debug=no
d92419e5 13918fi
81ecdfbb 13919rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d92419e5
JB
13920fi
13921
81ecdfbb
RW
13922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
13923$as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
d92419e5
JB
13924 if test $gdb_cv_have_aix_thread_debug = yes; then
13925 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
3483b318 13926 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
7f533142 13927 LIBS="$LIBS -lpthdebug"
d645e32e
JB
13928
13929 # Older versions of AIX do not provide the declaration for
13930 # the getthrds function (it appears that it was introduced
13931 # with AIX 6.x).
13932 ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h>
13933"
13934if test "x$ac_cv_have_decl_getthrds" = x""yes; then :
13935 ac_have_decl=1
13936else
13937 ac_have_decl=0
13938fi
13939
13940cat >>confdefs.h <<_ACEOF
13941#define HAVE_DECL_GETTHRDS $ac_have_decl
13942_ACEOF
13943
d92419e5
JB
13944 fi
13945 ;;
c906108c 13946 esac
bec39cab 13947
c906108c
SS
13948fi
13949
3f47be5c 13950if test "x$ac_cv_header_thread_db_h" = "xyes"; then
81ecdfbb
RW
13951 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
13952$as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
13953if test "${gdb_cv_thread_db_h_has_td_notalloc+set}" = set; then :
13954 $as_echo_n "(cached) " >&6
bec39cab 13955else
81ecdfbb 13956 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13957/* end confdefs.h. */
3f47be5c 13958#include <thread_db.h>
bec39cab
AC
13959int
13960main ()
13961{
3f47be5c 13962int i = TD_NOTALLOC;
bec39cab
AC
13963 ;
13964 return 0;
13965}
13966_ACEOF
81ecdfbb 13967if ac_fn_c_try_compile "$LINENO"; then :
3f47be5c
EZ
13968 gdb_cv_thread_db_h_has_td_notalloc=yes
13969else
81ecdfbb 13970 gdb_cv_thread_db_h_has_td_notalloc=no
bec39cab 13971
3f47be5c 13972fi
81ecdfbb 13973rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3f47be5c 13974
bec39cab 13975fi
81ecdfbb
RW
13976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
13977$as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
13978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
13979$as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
13980if test "${gdb_cv_thread_db_h_has_td_version+set}" = set; then :
13981 $as_echo_n "(cached) " >&6
59f80f10 13982else
81ecdfbb 13983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
13984/* end confdefs.h. */
13985#include <thread_db.h>
13986int
13987main ()
13988{
13989int i = TD_VERSION;
13990 ;
13991 return 0;
13992}
13993_ACEOF
81ecdfbb 13994if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
13995 gdb_cv_thread_db_h_has_td_version=yes
13996else
81ecdfbb 13997 gdb_cv_thread_db_h_has_td_version=no
59f80f10
DJ
13998
13999fi
81ecdfbb 14000rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
14001
14002fi
81ecdfbb
RW
14003{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
14004$as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
14005 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
14006$as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
14007if test "${gdb_cv_thread_db_h_has_td_notls+set}" = set; then :
14008 $as_echo_n "(cached) " >&6
59f80f10 14009else
81ecdfbb 14010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
14011/* end confdefs.h. */
14012#include <thread_db.h>
14013int
14014main ()
14015{
14016int i = TD_NOTLS;
14017 ;
14018 return 0;
14019}
14020_ACEOF
81ecdfbb 14021if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
14022 gdb_cv_thread_db_h_has_td_notls=yes
14023else
81ecdfbb 14024 gdb_cv_thread_db_h_has_td_notls=no
59f80f10
DJ
14025
14026fi
81ecdfbb 14027rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
14028
14029fi
81ecdfbb
RW
14030{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
14031$as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
3f47be5c
EZ
14032fi
14033if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
bec39cab 14034
81ecdfbb 14035$as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
3f47be5c 14036
59f80f10
DJ
14037fi
14038if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
14039
81ecdfbb 14040$as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
59f80f10
DJ
14041
14042fi
14043if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
14044
81ecdfbb 14045$as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
59f80f10 14046
3f47be5c
EZ
14047fi
14048
81ecdfbb
RW
14049ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
14050"
14051if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = x""yes; then :
14052 ac_have_decl=1
10568435 14053else
81ecdfbb 14054 ac_have_decl=0
10568435 14055fi
10568435
JK
14056
14057cat >>confdefs.h <<_ACEOF
81ecdfbb 14058#define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
10568435
JK
14059_ACEOF
14060
14061
81ecdfbb
RW
14062if test "$cross_compiling" = yes; then :
14063 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
14064/* end confdefs.h. */
14065#include <sys/personality.h>
14066int
14067main ()
14068{
14069
14070# if !HAVE_DECL_ADDR_NO_RANDOMIZE
14071# define ADDR_NO_RANDOMIZE 0x0040000
14072# endif
14073 /* Test the flag could be set and stays set. */
14074 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
14075 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
14076 return 1
14077 ;
14078 return 0;
14079}
14080_ACEOF
81ecdfbb 14081if ac_fn_c_try_link "$LINENO"; then :
10568435
JK
14082 have_personality=true
14083else
81ecdfbb 14084 have_personality=false
10568435 14085fi
81ecdfbb
RW
14086rm -f core conftest.err conftest.$ac_objext \
14087 conftest$ac_exeext conftest.$ac_ext
10568435 14088else
81ecdfbb 14089 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
14090/* end confdefs.h. */
14091#include <sys/personality.h>
14092int
14093main ()
14094{
14095
14096# if !HAVE_DECL_ADDR_NO_RANDOMIZE
14097# define ADDR_NO_RANDOMIZE 0x0040000
14098# endif
14099 /* Test the flag could be set and stays set. */
14100 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
14101 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
14102 return 1
14103 ;
14104 return 0;
14105}
14106_ACEOF
81ecdfbb 14107if ac_fn_c_try_run "$LINENO"; then :
10568435
JK
14108 have_personality=true
14109else
81ecdfbb 14110 have_personality=false
10568435 14111fi
81ecdfbb
RW
14112rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14113 conftest.$ac_objext conftest.beam conftest.$ac_ext
10568435 14114fi
81ecdfbb 14115
10568435
JK
14116if $have_personality
14117then
14118
81ecdfbb 14119$as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
10568435
JK
14120
14121fi
14122
e655c1a2
PA
14123case $host_os in
14124 go32* | *djgpp*)
14125 gdbinit=gdb.ini
14126 ;;
14127 *)
14128 gdbinit=.gdbinit
14129 ;;
14130esac
14131
14132cat >>confdefs.h <<_ACEOF
14133#define GDBINIT "$gdbinit"
14134_ACEOF
14135
14136
fb40c209 14137
f83d8a90
DE
14138# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
14139# except that the argument to --with-sysroot is optional.
14140# --with-sysroot (or --with-sysroot=yes) sets the default sysroot path.
14141if test "x$with_sysroot" = xyes; then
14142 with_sysroot="${exec_prefix}/${target_alias}/sys-root"
14143fi
bec39cab 14144
81ecdfbb
RW
14145# Check whether --with-sysroot was given.
14146if test "${with_sysroot+set}" = set; then :
f83d8a90
DE
14147 withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval
14148else
14149 TARGET_SYSTEM_ROOT=
14150fi
030292b7 14151
030292b7 14152
f83d8a90
DE
14153 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
14154 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14155 ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT`
14156 ac_define_dir=`eval echo $ac_define_dir`
030292b7 14157
f83d8a90
DE
14158cat >>confdefs.h <<_ACEOF
14159#define TARGET_SYSTEM_ROOT "$ac_define_dir"
14160_ACEOF
bec39cab 14161
030292b7 14162
b14b1491 14163
f83d8a90
DE
14164
14165 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
14166 if test "x$prefix" = xNONE; then
14167 test_prefix=/usr/local
14168 else
14169 test_prefix=$prefix
14170 fi
14171 else
14172 test_prefix=$exec_prefix
14173 fi
14174 value=0
14175 case ${ac_define_dir} in
14176 "${test_prefix}"|"${test_prefix}/"*|\
14177 '${exec_prefix}'|'${exec_prefix}/'*)
14178 value=1
14179 ;;
14180 esac
14181
14182cat >>confdefs.h <<_ACEOF
14183#define TARGET_SYSTEM_ROOT_RELOCATABLE $value
14184_ACEOF
030292b7
DJ
14185
14186
14187
16e7150e 14188
16e7150e 14189
81ecdfbb
RW
14190# Check whether --with-system-gdbinit was given.
14191if test "${with_system_gdbinit+set}" = set; then :
14192 withval=$with_system_gdbinit;
b14b1491
TT
14193 SYSTEM_GDBINIT=$withval
14194else
14195 SYSTEM_GDBINIT=
81ecdfbb
RW
14196fi
14197
16e7150e
JG
14198
14199 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
14200 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 14201 ac_define_dir=`eval echo $SYSTEM_GDBINIT`
16e7150e
JG
14202 ac_define_dir=`eval echo $ac_define_dir`
14203
14204cat >>confdefs.h <<_ACEOF
14205#define SYSTEM_GDBINIT "$ac_define_dir"
14206_ACEOF
14207
14208
14209
0c4a4063 14210
b14b1491
TT
14211 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
14212 if test "x$prefix" = xNONE; then
14213 test_prefix=/usr/local
14214 else
14215 test_prefix=$prefix
14216 fi
14217 else
14218 test_prefix=$exec_prefix
14219 fi
14220 value=0
14221 case ${ac_define_dir} in
14222 "${test_prefix}"|"${test_prefix}/"*|\
14223 '${exec_prefix}'|'${exec_prefix}/'*)
14224 value=1
14225 ;;
14226 esac
16e7150e 14227
b14b1491
TT
14228cat >>confdefs.h <<_ACEOF
14229#define SYSTEM_GDBINIT_RELOCATABLE $value
16e7150e
JG
14230_ACEOF
14231
b14b1491 14232
16e7150e 14233
0c4a4063 14234
b835bb52 14235
9b30624b 14236
81ecdfbb
RW
14237# Check whether --enable-werror was given.
14238if test "${enable_werror+set}" = set; then :
14239 enableval=$enable_werror; case "${enableval}" in
094a342e
MK
14240 yes | y) ERROR_ON_WARNING="yes" ;;
14241 no | n) ERROR_ON_WARNING="no" ;;
81ecdfbb 14242 *) as_fn_error "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
094a342e 14243 esac
81ecdfbb
RW
14244fi
14245
094a342e 14246
9a084706
PA
14247# Enable -Werror by default when using gcc. Turn it off for releases.
14248if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
094a342e
MK
14249 ERROR_ON_WARNING=yes
14250fi
14251
14252WERROR_CFLAGS=""
14253if test "${ERROR_ON_WARNING}" = yes ; then
14254 WERROR_CFLAGS="-Werror"
14255fi
14256
3bc3d82a 14257# These options work in either C or C++ modes.
aac331e4 14258build_warnings="-Wall -Wpointer-arith \
1cb5e2a4 14259-Wno-unused -Wunused-value -Wunused-function \
aac331e4 14260-Wno-switch -Wno-char-subscripts \
305450ed 14261-Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable"
a3b362c4 14262
3bc3d82a
PA
14263# Now add in C and C++ specific options, depending on mode.
14264if test "$enable_build_with_cxx" = "yes"; then
14265 build_warnings="$build_warnings -Wno-sign-compare -Wno-write-strings \
14266-Wno-narrowing"
14267else
aac331e4
PA
14268 build_warnings="$build_warnings -Wpointer-sign -Wmissing-prototypes \
14269-Wdeclaration-after-statement -Wmissing-parameter-type \
14270-Wold-style-declaration -Wold-style-definition"
3bc3d82a
PA
14271fi
14272
3526781e
DJ
14273# Enable -Wno-format by default when using gcc on mingw since many
14274# GCC versions complain about %I64.
14275case "${host}" in
14276 *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;;
d3685d60 14277 *) build_warnings="$build_warnings -Wformat-nonliteral" ;;
3526781e
DJ
14278esac
14279
81ecdfbb
RW
14280# Check whether --enable-build-warnings was given.
14281if test "${enable_build_warnings+set}" = set; then :
14282 enableval=$enable_build_warnings; case "${enableval}" in
c906108c
SS
14283 yes) ;;
14284 no) build_warnings="-w";;
14285 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
14286 build_warnings="${build_warnings} ${t}";;
14287 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
14288 build_warnings="${t} ${build_warnings}";;
14289 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
14290esac
d4f3574e 14291if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 14292 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 14293fi
81ecdfbb
RW
14294fi
14295# Check whether --enable-gdb-build-warnings was given.
14296if test "${enable_gdb_build_warnings+set}" = set; then :
14297 enableval=$enable_gdb_build_warnings; case "${enableval}" in
3b851bce
AC
14298 yes) ;;
14299 no) build_warnings="-w";;
14300 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
14301 build_warnings="${build_warnings} ${t}";;
14302 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
14303 build_warnings="${t} ${build_warnings}";;
14304 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
14305esac
14306if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
14307 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
14308fi
81ecdfbb 14309fi
3bc3d82a
PA
14310
14311# The set of warnings supported by a C++ compiler is not the same as
14312# of the C compiler.
14313if test "$enable_build_with_cxx" = "yes"; then
14314 ac_ext=cpp
14315ac_cpp='$CXXCPP $CPPFLAGS'
14316ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14317ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14318ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14319
14320fi
14321
81ecdfbb 14322WARN_CFLAGS=""
c906108c
SS
14323if test "x${build_warnings}" != x -a "x$GCC" = xyes
14324then
81ecdfbb
RW
14325 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
14326$as_echo_n "checking compiler warning flags... " >&6; }
746a987d
AC
14327 # Separate out the -Werror flag as some files just cannot be
14328 # compiled with it enabled.
14329 for w in ${build_warnings}; do
7544db95
PA
14330 # GCC does not complain about -Wno-unknown-warning. Invert
14331 # and test -Wunknown-warning instead.
14332 case $w in
14333 -Wno-*)
14334 wtest=`echo $w | sed 's/-Wno-/-W/g'` ;;
14335 *)
14336 wtest=$w ;;
14337 esac
14338
746a987d
AC
14339 case $w in
14340 -Werr*) WERROR_CFLAGS=-Werror ;;
3bc3d82a
PA
14341 *)
14342 # Check whether GCC accepts it.
4536bbc6 14343 saved_CFLAGS="$CFLAGS"
7544db95 14344 CFLAGS="$CFLAGS $wtest"
3bc3d82a 14345 saved_CXXFLAGS="$CXXFLAGS"
7544db95 14346 CXXFLAGS="$CXXFLAGS $wtest"
54019719 14347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14348/* end confdefs.h. */
4536bbc6 14349
bec39cab
AC
14350int
14351main ()
14352{
4536bbc6 14353
bec39cab
AC
14354 ;
14355 return 0;
14356}
14357_ACEOF
3bc3d82a 14358if ac_fn_cxx_try_compile "$LINENO"; then :
4536bbc6 14359 WARN_CFLAGS="${WARN_CFLAGS} $w"
4536bbc6 14360fi
81ecdfbb 14361rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4536bbc6 14362 CFLAGS="$saved_CFLAGS"
3bc3d82a 14363 CXXFLAGS="$saved_CXXFLAGS"
746a987d
AC
14364 esac
14365 done
81ecdfbb
RW
14366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
14367$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
c906108c
SS
14368fi
14369
14370
104c1213 14371
3bc3d82a
PA
14372if test "$enable_build_with_cxx" = "yes"; then
14373 ac_ext=c
14374ac_cpp='$CPP $CPPFLAGS'
14375ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14376ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14377ac_compiler_gnu=$ac_cv_c_compiler_gnu
14378
14379fi
14380
b835bb52 14381
7a292a7a 14382# In the Cygwin environment, we need some additional flags.
81ecdfbb
RW
14383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
14384$as_echo_n "checking for cygwin... " >&6; }
14385if test "${gdb_cv_os_cygwin+set}" = set; then :
14386 $as_echo_n "(cached) " >&6
bec39cab 14387else
81ecdfbb 14388 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14389/* end confdefs.h. */
7a292a7a
SS
14390
14391#if defined (__CYGWIN__) || defined (__CYGWIN32__)
14392lose
14393#endif
bec39cab 14394_ACEOF
7a292a7a 14395if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
92a021de 14396 $EGREP "^lose$" >/dev/null 2>&1; then :
7a292a7a
SS
14397 gdb_cv_os_cygwin=yes
14398else
7a292a7a
SS
14399 gdb_cv_os_cygwin=no
14400fi
14401rm -f conftest*
14402
14403fi
81ecdfbb
RW
14404{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
14405$as_echo "$gdb_cv_os_cygwin" >&6; }
7a292a7a 14406
aff38e61 14407
3eb25fda 14408SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
aff38e61 14409case ${host} in
95cbc983
AC
14410 *go32* ) SER_HARDWIRE=ser-go32.o ;;
14411 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
0ea3f30e 14412 *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
aff38e61
AC
14413esac
14414
14415
cd0fc7c3
SS
14416# libreadline needs libuser32.a in a cygwin environment
14417WIN32LIBS=
14418if test x$gdb_cv_os_cygwin = xyes; then
c5394b80
JM
14419 WIN32LIBS="-luser32"
14420 case "${target}" in
14421 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
14422 ;;
14423 esac
cd0fc7c3 14424fi
c906108c 14425
b4505029
MM
14426# The ser-tcp.c module requires sockets.
14427case ${host} in
14428 *mingw32*)
14429
81ecdfbb 14430$as_echo "#define USE_WIN32API 1" >>confdefs.h
b4505029
MM
14431
14432 WIN32LIBS="$WIN32LIBS -lws2_32"
14433 ;;
14434esac
14435
7a292a7a 14436
31d99776 14437# Add ELF support to GDB, but only if BFD includes ELF support.
def63ff0
TT
14438
14439 OLD_CFLAGS=$CFLAGS
14440 OLD_LDFLAGS=$LDFLAGS
14441 OLD_LIBS=$LIBS
14442 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
14443 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
14444 # always want our bfd.
14445 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
5a2d4533
L
14446 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
14447 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
def63ff0 14448 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
711a72d3 14449 LIBS="-lbfd -liberty -lz $intl $LIBS"
def63ff0 14450 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
81ecdfbb
RW
14451$as_echo_n "checking for ELF support in BFD... " >&6; }
14452if test "${gdb_cv_var_elf+set}" = set; then :
14453 $as_echo_n "(cached) " >&6
31d99776 14454else
81ecdfbb 14455 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31d99776
DJ
14456/* end confdefs.h. */
14457#include <stdlib.h>
def63ff0
TT
14458 #include "bfd.h"
14459 #include "elf-bfd.h"
31d99776
DJ
14460
14461int
14462main ()
14463{
def63ff0 14464return bfd_get_elf_phdr_upper_bound (NULL);
31d99776
DJ
14465 ;
14466 return 0;
14467}
14468_ACEOF
81ecdfbb 14469if ac_fn_c_try_link "$LINENO"; then :
31d99776
DJ
14470 gdb_cv_var_elf=yes
14471else
81ecdfbb 14472 gdb_cv_var_elf=no
31d99776 14473fi
81ecdfbb
RW
14474rm -f core conftest.err conftest.$ac_objext \
14475 conftest$ac_exeext conftest.$ac_ext
31d99776 14476fi
81ecdfbb
RW
14477{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
14478$as_echo "$gdb_cv_var_elf" >&6; }
def63ff0
TT
14479 CFLAGS=$OLD_CFLAGS
14480 LDFLAGS=$OLD_LDFLAGS
14481 LIBS=$OLD_LIBS
31d99776 14482if test $gdb_cv_var_elf = yes; then
d4777acb 14483 CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o dtrace-probe.o"
31d99776 14484
81ecdfbb 14485$as_echo "#define HAVE_ELF 1" >>confdefs.h
31d99776 14486
075ff26d
JK
14487 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
14488 if test "$plugins" = "yes"; then
a48b32c0
L
14489 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
14490$as_echo_n "checking for library containing dlopen... " >&6; }
14491if test "${ac_cv_search_dlopen+set}" = set; then :
14492 $as_echo_n "(cached) " >&6
14493else
14494 ac_func_search_save_LIBS=$LIBS
14495cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14496/* end confdefs.h. */
14497
14498/* Override any GCC internal prototype to avoid an error.
14499 Use char because int might match the return type of a GCC
14500 builtin and then its argument prototype would still apply. */
14501#ifdef __cplusplus
14502extern "C"
14503#endif
14504char dlopen ();
14505int
14506main ()
14507{
14508return dlopen ();
14509 ;
14510 return 0;
14511}
14512_ACEOF
14513for ac_lib in '' dl; do
14514 if test -z "$ac_lib"; then
14515 ac_res="none required"
14516 else
14517 ac_res=-l$ac_lib
14518 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
14519 fi
14520 if ac_fn_c_try_link "$LINENO"; then :
14521 ac_cv_search_dlopen=$ac_res
14522fi
14523rm -f core conftest.err conftest.$ac_objext \
14524 conftest$ac_exeext
14525 if test "${ac_cv_search_dlopen+set}" = set; then :
14526 break
14527fi
14528done
14529if test "${ac_cv_search_dlopen+set}" = set; then :
14530
14531else
14532 ac_cv_search_dlopen=no
14533fi
14534rm conftest.$ac_ext
14535LIBS=$ac_func_search_save_LIBS
14536fi
14537{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
14538$as_echo "$ac_cv_search_dlopen" >&6; }
14539ac_res=$ac_cv_search_dlopen
14540if test "$ac_res" != no; then :
14541 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14542
14543fi
14544
075ff26d 14545 fi
31d99776 14546fi
31d99776 14547
4f05add4
TT
14548# Add macho support to GDB, but only if BFD includes it.
14549
14550 OLD_CFLAGS=$CFLAGS
14551 OLD_LDFLAGS=$LDFLAGS
14552 OLD_LIBS=$LIBS
14553 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
14554 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
14555 # always want our bfd.
14556 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
5a2d4533
L
14557 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
14558 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
4f05add4 14559 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
711a72d3 14560 LIBS="-lbfd -liberty -lz $intl $LIBS"
4f05add4
TT
14561 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5
14562$as_echo_n "checking for Mach-O support in BFD... " >&6; }
14563if test "${gdb_cv_var_macho+set}" = set; then :
14564 $as_echo_n "(cached) " >&6
14565else
14566 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14567/* end confdefs.h. */
14568#include <stdlib.h>
14569 #include "bfd.h"
14570 #include "mach-o.h"
14571
14572int
14573main ()
14574{
14575return bfd_mach_o_lookup_command (NULL, 0, NULL);
14576 ;
14577 return 0;
14578}
14579_ACEOF
14580if ac_fn_c_try_link "$LINENO"; then :
14581 gdb_cv_var_macho=yes
14582else
14583 gdb_cv_var_macho=no
14584fi
14585rm -f core conftest.err conftest.$ac_objext \
14586 conftest$ac_exeext conftest.$ac_ext
14587fi
14588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5
14589$as_echo "$gdb_cv_var_macho" >&6; }
14590 CFLAGS=$OLD_CFLAGS
14591 LDFLAGS=$OLD_LDFLAGS
14592 LIBS=$OLD_LIBS
14593if test $gdb_cv_var_macho = yes; then
14594 CONFIG_OBS="$CONFIG_OBS machoread.o"
14595fi
14596
121ce6e5
DJ
14597# Add any host-specific objects to GDB.
14598CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
14599
608e2dbb
TT
14600# If building on ELF, look for lzma support for embedded compressed debug info.
14601if test $gdb_cv_var_elf = yes; then
14602
14603# Check whether --with-lzma was given.
14604if test "${with_lzma+set}" = set; then :
14605 withval=$with_lzma;
14606else
14607 with_lzma=auto
14608fi
14609
14610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5
14611$as_echo_n "checking whether to use lzma... " >&6; }
14612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5
14613$as_echo "$with_lzma" >&6; }
14614
14615 if test "${with_lzma}" != no; then
14616
14617
14618
14619
14620
14621
14622
14623
14624 use_additional=yes
14625
14626 acl_save_prefix="$prefix"
14627 prefix="$acl_final_prefix"
14628 acl_save_exec_prefix="$exec_prefix"
14629 exec_prefix="$acl_final_exec_prefix"
14630
14631 eval additional_includedir=\"$includedir\"
14632 eval additional_libdir=\"$libdir\"
14633
14634 exec_prefix="$acl_save_exec_prefix"
14635 prefix="$acl_save_prefix"
14636
14637
14638# Check whether --with-liblzma-prefix was given.
14639if test "${with_liblzma_prefix+set}" = set; then :
14640 withval=$with_liblzma_prefix;
14641 if test "X$withval" = "Xno"; then
14642 use_additional=no
14643 else
14644 if test "X$withval" = "X"; then
14645
14646 acl_save_prefix="$prefix"
14647 prefix="$acl_final_prefix"
14648 acl_save_exec_prefix="$exec_prefix"
14649 exec_prefix="$acl_final_exec_prefix"
14650
14651 eval additional_includedir=\"$includedir\"
14652 eval additional_libdir=\"$libdir\"
14653
14654 exec_prefix="$acl_save_exec_prefix"
14655 prefix="$acl_save_prefix"
14656
14657 else
14658 additional_includedir="$withval/include"
14659 additional_libdir="$withval/lib"
14660 fi
14661 fi
14662
14663fi
14664
14665 LIBLZMA=
14666 LTLIBLZMA=
14667 INCLZMA=
14668 rpathdirs=
14669 ltrpathdirs=
14670 names_already_handled=
14671 names_next_round='lzma '
14672 while test -n "$names_next_round"; do
14673 names_this_round="$names_next_round"
14674 names_next_round=
14675 for name in $names_this_round; do
14676 already_handled=
14677 for n in $names_already_handled; do
14678 if test "$n" = "$name"; then
14679 already_handled=yes
14680 break
14681 fi
14682 done
14683 if test -z "$already_handled"; then
14684 names_already_handled="$names_already_handled $name"
14685 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
14686 eval value=\"\$HAVE_LIB$uppername\"
14687 if test -n "$value"; then
14688 if test "$value" = yes; then
14689 eval value=\"\$LIB$uppername\"
14690 test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value"
14691 eval value=\"\$LTLIB$uppername\"
14692 test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value"
14693 else
14694 :
14695 fi
14696 else
14697 found_dir=
14698 found_la=
14699 found_so=
14700 found_a=
14701 if test $use_additional = yes; then
14702 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
14703 found_dir="$additional_libdir"
14704 found_so="$additional_libdir/lib$name.$shlibext"
14705 if test -f "$additional_libdir/lib$name.la"; then
14706 found_la="$additional_libdir/lib$name.la"
14707 fi
14708 else
14709 if test -f "$additional_libdir/lib$name.$libext"; then
14710 found_dir="$additional_libdir"
14711 found_a="$additional_libdir/lib$name.$libext"
14712 if test -f "$additional_libdir/lib$name.la"; then
14713 found_la="$additional_libdir/lib$name.la"
14714 fi
14715 fi
14716 fi
14717 fi
14718 if test "X$found_dir" = "X"; then
14719 for x in $LDFLAGS $LTLIBLZMA; do
14720
14721 acl_save_prefix="$prefix"
14722 prefix="$acl_final_prefix"
14723 acl_save_exec_prefix="$exec_prefix"
14724 exec_prefix="$acl_final_exec_prefix"
14725 eval x=\"$x\"
14726 exec_prefix="$acl_save_exec_prefix"
14727 prefix="$acl_save_prefix"
14728
14729 case "$x" in
14730 -L*)
14731 dir=`echo "X$x" | sed -e 's/^X-L//'`
14732 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
14733 found_dir="$dir"
14734 found_so="$dir/lib$name.$shlibext"
14735 if test -f "$dir/lib$name.la"; then
14736 found_la="$dir/lib$name.la"
14737 fi
14738 else
14739 if test -f "$dir/lib$name.$libext"; then
14740 found_dir="$dir"
14741 found_a="$dir/lib$name.$libext"
14742 if test -f "$dir/lib$name.la"; then
14743 found_la="$dir/lib$name.la"
14744 fi
14745 fi
14746 fi
14747 ;;
14748 esac
14749 if test "X$found_dir" != "X"; then
14750 break
14751 fi
14752 done
14753 fi
14754 if test "X$found_dir" != "X"; then
14755 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name"
14756 if test "X$found_so" != "X"; then
14757 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
14758 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
14759 else
14760 haveit=
14761 for x in $ltrpathdirs; do
14762 if test "X$x" = "X$found_dir"; then
14763 haveit=yes
14764 break
14765 fi
14766 done
14767 if test -z "$haveit"; then
14768 ltrpathdirs="$ltrpathdirs $found_dir"
14769 fi
14770 if test "$hardcode_direct" = yes; then
14771 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
14772 else
14773 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
14774 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
14775 haveit=
14776 for x in $rpathdirs; do
14777 if test "X$x" = "X$found_dir"; then
14778 haveit=yes
14779 break
14780 fi
14781 done
14782 if test -z "$haveit"; then
14783 rpathdirs="$rpathdirs $found_dir"
14784 fi
14785 else
14786 haveit=
14787 for x in $LDFLAGS $LIBLZMA; do
14788
14789 acl_save_prefix="$prefix"
14790 prefix="$acl_final_prefix"
14791 acl_save_exec_prefix="$exec_prefix"
14792 exec_prefix="$acl_final_exec_prefix"
14793 eval x=\"$x\"
14794 exec_prefix="$acl_save_exec_prefix"
14795 prefix="$acl_save_prefix"
14796
14797 if test "X$x" = "X-L$found_dir"; then
14798 haveit=yes
14799 break
14800 fi
14801 done
14802 if test -z "$haveit"; then
14803 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir"
14804 fi
14805 if test "$hardcode_minus_L" != no; then
14806 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
14807 else
14808 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
14809 fi
14810 fi
14811 fi
14812 fi
14813 else
14814 if test "X$found_a" != "X"; then
14815 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a"
14816 else
14817 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name"
14818 fi
14819 fi
14820 additional_includedir=
14821 case "$found_dir" in
14822 */lib | */lib/)
14823 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
14824 additional_includedir="$basedir/include"
14825 ;;
14826 esac
14827 if test "X$additional_includedir" != "X"; then
14828 if test "X$additional_includedir" != "X/usr/include"; then
14829 haveit=
14830 if test "X$additional_includedir" = "X/usr/local/include"; then
14831 if test -n "$GCC"; then
14832 case $host_os in
14833 linux*) haveit=yes;;
14834 esac
14835 fi
14836 fi
14837 if test -z "$haveit"; then
14838 for x in $CPPFLAGS $INCLZMA; do
14839
14840 acl_save_prefix="$prefix"
14841 prefix="$acl_final_prefix"
14842 acl_save_exec_prefix="$exec_prefix"
14843 exec_prefix="$acl_final_exec_prefix"
14844 eval x=\"$x\"
14845 exec_prefix="$acl_save_exec_prefix"
14846 prefix="$acl_save_prefix"
14847
14848 if test "X$x" = "X-I$additional_includedir"; then
14849 haveit=yes
14850 break
14851 fi
14852 done
14853 if test -z "$haveit"; then
14854 if test -d "$additional_includedir"; then
14855 INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir"
14856 fi
14857 fi
14858 fi
14859 fi
14860 fi
14861 if test -n "$found_la"; then
14862 save_libdir="$libdir"
14863 case "$found_la" in
14864 */* | *\\*) . "$found_la" ;;
14865 *) . "./$found_la" ;;
14866 esac
14867 libdir="$save_libdir"
14868 for dep in $dependency_libs; do
14869 case "$dep" in
14870 -L*)
14871 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
14872 if test "X$additional_libdir" != "X/usr/lib"; then
14873 haveit=
14874 if test "X$additional_libdir" = "X/usr/local/lib"; then
14875 if test -n "$GCC"; then
14876 case $host_os in
14877 linux*) haveit=yes;;
14878 esac
14879 fi
14880 fi
14881 if test -z "$haveit"; then
14882 haveit=
14883 for x in $LDFLAGS $LIBLZMA; do
14884
14885 acl_save_prefix="$prefix"
14886 prefix="$acl_final_prefix"
14887 acl_save_exec_prefix="$exec_prefix"
14888 exec_prefix="$acl_final_exec_prefix"
14889 eval x=\"$x\"
14890 exec_prefix="$acl_save_exec_prefix"
14891 prefix="$acl_save_prefix"
14892
14893 if test "X$x" = "X-L$additional_libdir"; then
14894 haveit=yes
14895 break
14896 fi
14897 done
14898 if test -z "$haveit"; then
14899 if test -d "$additional_libdir"; then
14900 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir"
14901 fi
14902 fi
14903 haveit=
14904 for x in $LDFLAGS $LTLIBLZMA; do
14905
14906 acl_save_prefix="$prefix"
14907 prefix="$acl_final_prefix"
14908 acl_save_exec_prefix="$exec_prefix"
14909 exec_prefix="$acl_final_exec_prefix"
14910 eval x=\"$x\"
14911 exec_prefix="$acl_save_exec_prefix"
14912 prefix="$acl_save_prefix"
14913
14914 if test "X$x" = "X-L$additional_libdir"; then
14915 haveit=yes
14916 break
14917 fi
14918 done
14919 if test -z "$haveit"; then
14920 if test -d "$additional_libdir"; then
14921 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir"
14922 fi
14923 fi
14924 fi
14925 fi
14926 ;;
14927 -R*)
14928 dir=`echo "X$dep" | sed -e 's/^X-R//'`
14929 if test "$enable_rpath" != no; then
14930 haveit=
14931 for x in $rpathdirs; do
14932 if test "X$x" = "X$dir"; then
14933 haveit=yes
14934 break
14935 fi
14936 done
14937 if test -z "$haveit"; then
14938 rpathdirs="$rpathdirs $dir"
14939 fi
14940 haveit=
14941 for x in $ltrpathdirs; do
14942 if test "X$x" = "X$dir"; then
14943 haveit=yes
14944 break
14945 fi
14946 done
14947 if test -z "$haveit"; then
14948 ltrpathdirs="$ltrpathdirs $dir"
14949 fi
14950 fi
14951 ;;
14952 -l*)
14953 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
14954 ;;
14955 *.la)
14956 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
14957 ;;
14958 *)
14959 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep"
14960 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep"
14961 ;;
14962 esac
14963 done
14964 fi
14965 else
14966 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
14967 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name"
14968 fi
14969 fi
14970 fi
14971 done
14972 done
14973 if test "X$rpathdirs" != "X"; then
14974 if test -n "$hardcode_libdir_separator"; then
14975 alldirs=
14976 for found_dir in $rpathdirs; do
14977 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
14978 done
14979 acl_save_libdir="$libdir"
14980 libdir="$alldirs"
14981 eval flag=\"$hardcode_libdir_flag_spec\"
14982 libdir="$acl_save_libdir"
14983 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
14984 else
14985 for found_dir in $rpathdirs; do
14986 acl_save_libdir="$libdir"
14987 libdir="$found_dir"
14988 eval flag=\"$hardcode_libdir_flag_spec\"
14989 libdir="$acl_save_libdir"
14990 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
14991 done
14992 fi
14993 fi
14994 if test "X$ltrpathdirs" != "X"; then
14995 for found_dir in $ltrpathdirs; do
14996 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir"
14997 done
14998 fi
14999
15000
15001 ac_save_CPPFLAGS="$CPPFLAGS"
15002
15003 for element in $INCLZMA; do
15004 haveit=
15005 for x in $CPPFLAGS; do
15006
15007 acl_save_prefix="$prefix"
15008 prefix="$acl_final_prefix"
15009 acl_save_exec_prefix="$exec_prefix"
15010 exec_prefix="$acl_final_exec_prefix"
15011 eval x=\"$x\"
15012 exec_prefix="$acl_save_exec_prefix"
15013 prefix="$acl_save_prefix"
15014
15015 if test "X$x" = "X$element"; then
15016 haveit=yes
15017 break
15018 fi
15019 done
15020 if test -z "$haveit"; then
15021 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
15022 fi
15023 done
15024
15025
15026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5
15027$as_echo_n "checking for liblzma... " >&6; }
15028if test "${ac_cv_liblzma+set}" = set; then :
15029 $as_echo_n "(cached) " >&6
15030else
15031
15032 ac_save_LIBS="$LIBS"
15033 LIBS="$LIBS $LIBLZMA"
15034 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15035/* end confdefs.h. */
15036#include "lzma.h"
15037int
15038main ()
15039{
15040lzma_index_iter iter;
15041 lzma_index_iter_init (&iter, 0);
15042 lzma_mf_is_supported (LZMA_MF_HC3);
15043 ;
15044 return 0;
15045}
15046_ACEOF
15047if ac_fn_c_try_link "$LINENO"; then :
15048 ac_cv_liblzma=yes
15049else
15050 ac_cv_liblzma=no
15051fi
15052rm -f core conftest.err conftest.$ac_objext \
15053 conftest$ac_exeext conftest.$ac_ext
15054 LIBS="$ac_save_LIBS"
15055
15056fi
15057{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5
15058$as_echo "$ac_cv_liblzma" >&6; }
15059 if test "$ac_cv_liblzma" = yes; then
15060 HAVE_LIBLZMA=yes
15061
15062$as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h
15063
15064 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5
15065$as_echo_n "checking how to link with liblzma... " >&6; }
15066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5
15067$as_echo "$LIBLZMA" >&6; }
15068 else
15069 HAVE_LIBLZMA=no
15070 CPPFLAGS="$ac_save_CPPFLAGS"
15071 LIBLZMA=
15072 LTLIBLZMA=
15073 fi
15074
15075
15076
15077
15078
15079
15080 if test "$HAVE_LIBLZMA" != yes; then
15081 if test "$with_lzma" = yes; then
15082 as_fn_error "missing liblzma for --with-lzma" "$LINENO" 5
15083 fi
15084 fi
15085 fi
15086fi
15087
3fc11d3e
JM
15088LIBGUI="../libgui/src/libgui.a"
15089GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
15090
15091
7a292a7a 15092
3fc11d3e
JM
15093WIN32LDAPP=
15094
15095
15096
d91670b9 15097case "${host}" in
686a5eed 15098*-*-cygwin* | *-*-mingw* )
d91670b9
CV
15099 configdir="win"
15100 ;;
15101*)
15102 configdir="unix"
15103 ;;
15104esac
3fc11d3e
JM
15105
15106GDBTKLIBS=
15107if test "${enable_gdbtk}" = "yes"; then
15108
d1c3b63a
KS
15109 # Gdbtk must have an absolute path to srcdir in order to run
15110 # properly when not installed.
15111 here=`pwd`
15112 cd ${srcdir}
15113 GDBTK_SRC_DIR=`pwd`
15114 cd $here
15115
bec39cab 15116
5062cc19
KS
15117 #
15118 # Ok, lets find the tcl configuration
15119 # First, look for one uninstalled.
15120 # the alternative search directory is invoked by --with-tcl
15121 #
3fc11d3e 15122
5062cc19
KS
15123 if test x"${no_tcl}" = x ; then
15124 # we reset no_tcl in case something fails here
15125 no_tcl=true
bec39cab 15126
81ecdfbb
RW
15127# Check whether --with-tcl was given.
15128if test "${with_tcl+set}" = set; then :
15129 withval=$with_tcl; with_tclconfig=${withval}
15130fi
15131
15132 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
15133$as_echo_n "checking for Tcl configuration... " >&6; }
15134 if test "${ac_cv_c_tclconfig+set}" = set; then :
15135 $as_echo_n "(cached) " >&6
3fc11d3e 15136else
bec39cab 15137
3fc11d3e 15138
5062cc19
KS
15139 # First check to see if --with-tcl was specified.
15140 case "${host}" in
15141 *-*-cygwin*) platDir="win" ;;
15142 *) platDir="unix" ;;
15143 esac
15144 if test x"${with_tclconfig}" != x ; then
15145 if test -f "${with_tclconfig}/tclConfig.sh" ; then
15146 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
15147 else
81ecdfbb 15148 as_fn_error "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
5062cc19
KS
15149 fi
15150 fi
15151
15152 # then check for a private Tcl installation
15153 if test x"${ac_cv_c_tclconfig}" = x ; then
15154 for i in \
15155 ../tcl \
15156 `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
15157 `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
15158 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
15159 ../../tcl \
15160 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
15161 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
15162 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
15163 ../../../tcl \
15164 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
15165 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
15166 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
15167 if test -f "$i/$platDir/tclConfig.sh" ; then
15168 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
15169 break
15170 fi
15171 done
15172 fi
15173
15174 # on Darwin, check in Framework installation locations
15175 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
15176 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
15177 `ls -d /Library/Frameworks 2>/dev/null` \
15178 `ls -d /Network/Library/Frameworks 2>/dev/null` \
15179 `ls -d /System/Library/Frameworks 2>/dev/null` \
15180 ; do
15181 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
15182 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
15183 break
15184 fi
15185 done
15186 fi
15187
15188 # check in a few common install locations
15189 if test x"${ac_cv_c_tclconfig}" = x ; then
15190 for i in `ls -d ${libdir} 2>/dev/null` \
15191 `ls -d ${exec_prefix}/lib 2>/dev/null` \
15192 `ls -d ${prefix}/lib 2>/dev/null` \
15193 `ls -d /usr/local/lib 2>/dev/null` \
15194 `ls -d /usr/contrib/lib 2>/dev/null` \
15195 `ls -d /usr/lib 2>/dev/null` \
15196 ; do
15197 if test -f "$i/tclConfig.sh" ; then
15198 ac_cv_c_tclconfig=`(cd $i; pwd)`
15199 break
15200 fi
15201 done
15202 fi
3fc11d3e 15203
5062cc19
KS
15204 # check in a few other private locations
15205 if test x"${ac_cv_c_tclconfig}" = x ; then
15206 for i in \
15207 ${srcdir}/../tcl \
15208 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
15209 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
15210 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
15211 if test -f "$i/$platDir/tclConfig.sh" ; then
15212 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
15213 break
15214 fi
15215 done
15216 fi
bec39cab 15217
3fc11d3e
JM
15218fi
15219
5062cc19
KS
15220
15221 if test x"${ac_cv_c_tclconfig}" = x ; then
15222 TCL_BIN_DIR="# no Tcl configs found"
81ecdfbb
RW
15223 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
15224$as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
5062cc19
KS
15225 else
15226 no_tcl=
15227 TCL_BIN_DIR=${ac_cv_c_tclconfig}
81ecdfbb
RW
15228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
15229$as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
5062cc19
KS
15230 fi
15231 fi
3fc11d3e 15232
bec39cab 15233
85541719
DE
15234 # If $no_tk is nonempty, then we can't do Tk, and there is no
15235 # point to doing Tcl.
bec39cab 15236
5062cc19
KS
15237 #
15238 # Ok, lets find the tk configuration
15239 # First, look for one uninstalled.
15240 # the alternative search directory is invoked by --with-tk
15241 #
3fc11d3e 15242
5062cc19
KS
15243 if test x"${no_tk}" = x ; then
15244 # we reset no_tk in case something fails here
15245 no_tk=true
bec39cab 15246
81ecdfbb
RW
15247# Check whether --with-tk was given.
15248if test "${with_tk+set}" = set; then :
15249 withval=$with_tk; with_tkconfig=${withval}
15250fi
15251
15252 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
15253$as_echo_n "checking for Tk configuration... " >&6; }
15254 if test "${ac_cv_c_tkconfig+set}" = set; then :
15255 $as_echo_n "(cached) " >&6
bec39cab 15256else
3fc11d3e
JM
15257
15258
5062cc19
KS
15259 # First check to see if --with-tkconfig was specified.
15260 if test x"${with_tkconfig}" != x ; then
15261 if test -f "${with_tkconfig}/tkConfig.sh" ; then
15262 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
15263 else
81ecdfbb 15264 as_fn_error "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
5062cc19
KS
15265 fi
15266 fi
3fc11d3e 15267
5062cc19
KS
15268 # then check for a private Tk library
15269 case "${host}" in
15270 *-*-cygwin*) platDir="win" ;;
15271 *) platDir="unix" ;;
15272 esac
15273 if test x"${ac_cv_c_tkconfig}" = x ; then
15274 for i in \
15275 ../tk \
15276 `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
15277 `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
15278 `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
15279 ../../tk \
15280 `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
15281 `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
15282 `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
15283 ../../../tk \
15284 `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
15285 `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
15286 `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
15287 if test -f "$i/$platDir/tkConfig.sh" ; then
15288 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
15289 break
15290 fi
15291 done
15292 fi
15293
15294 # on Darwin, check in Framework installation locations
15295 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
15296 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
15297 `ls -d /Library/Frameworks 2>/dev/null` \
15298 `ls -d /Network/Library/Frameworks 2>/dev/null` \
15299 `ls -d /System/Library/Frameworks 2>/dev/null` \
15300 ; do
15301 if test -f "$i/Tk.framework/tkConfig.sh" ; then
15302 ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
15303 break
15304 fi
15305 done
15306 fi
15307
15308 # check in a few common install locations
15309 if test x"${ac_cv_c_tkconfig}" = x ; then
15310 for i in `ls -d ${libdir} 2>/dev/null` \
15311 `ls -d ${exec_prefix}/lib 2>/dev/null` \
15312 `ls -d ${prefix}/lib 2>/dev/null` \
15313 `ls -d /usr/local/lib 2>/dev/null` \
15314 `ls -d /usr/contrib/lib 2>/dev/null` \
15315 `ls -d /usr/lib 2>/dev/null` \
15316 ; do
15317 if test -f "$i/tkConfig.sh" ; then
15318 ac_cv_c_tkconfig=`(cd $i; pwd)`
15319 break
15320 fi
15321 done
15322 fi
15323 # check in a few other private locations
15324 if test x"${ac_cv_c_tkconfig}" = x ; then
15325 for i in \
15326 ${srcdir}/../tk \
15327 `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
15328 `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
15329 `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
15330 if test -f "$i/$platDir/tkConfig.sh" ; then
15331 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
15332 break
15333 fi
15334 done
15335 fi
3fc11d3e 15336
3fc11d3e
JM
15337fi
15338
15339
5062cc19
KS
15340 if test x"${ac_cv_c_tkconfig}" = x ; then
15341 TK_BIN_DIR="# no Tk configs found"
81ecdfbb
RW
15342 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
15343$as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
5062cc19
KS
15344 else
15345 no_tk=
15346 TK_BIN_DIR=${ac_cv_c_tkconfig}
81ecdfbb
RW
15347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
15348$as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
5062cc19 15349 fi
3fc11d3e 15350 fi
dd2504ab 15351
dd2504ab 15352
85541719
DE
15353 if test -z "${no_tcl}" -a -z "${no_tk}"; then
15354
81ecdfbb
RW
15355 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
15356$as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
85541719
DE
15357
15358 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
81ecdfbb
RW
15359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
15360$as_echo "loading" >&6; }
85541719
DE
15361 . ${TCL_BIN_DIR}/tclConfig.sh
15362 else
81ecdfbb
RW
15363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
15364$as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
85541719
DE
15365 fi
15366
15367 # eval is required to do the TCL_DBGX substitution
15368 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
15369 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
15370
15371 # If the TCL_BIN_DIR is the build directory (not the install directory),
15372 # then set the common variable name to the value of the build variables.
15373 # For example, the variable TCL_LIB_SPEC will be set to the value
15374 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
15375 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
15376 # installed and uninstalled version of Tcl.
15377 if test -f "${TCL_BIN_DIR}/Makefile" ; then
15378 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
15379 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
15380 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
15381 elif test "`uname -s`" = "Darwin"; then
15382 # If Tcl was built as a framework, attempt to use the libraries
15383 # from the framework at the given location so that linking works
a68ffae9 15384 # against Tcl.framework installed in an arbitrary location.
85541719
DE
15385 case ${TCL_DEFS} in
15386 *TCL_FRAMEWORK*)
15387 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
15388 for i in "`cd ${TCL_BIN_DIR}; pwd`" \
15389 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
15390 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
15391 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
15392 break
15393 fi
15394 done
15395 fi
15396 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
15397 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
15398 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
15399 fi
15400 ;;
15401 esac
15402 fi
15403
15404 # eval is required to do the TCL_DBGX substitution
15405 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
15406 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
15407 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
15408 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
15409
15410
15411
15412
15413
15414
15415
15416
15417
15418
15419
15420
15421
15422
15423
15424 # Check for in-tree tcl
15425 here=`pwd`
15426 cd ${srcdir}/..
15427 topdir=`pwd`
15428 cd ${here}
15429
15430 intree="no"
15431 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
15432 intree="yes"
15433 fi
15434
15435 # Find Tcl private headers
15436 if test x"${intree}" = xno; then
15437
81ecdfbb
RW
15438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
15439$as_echo_n "checking for Tcl private headers... " >&6; }
85541719
DE
15440 private_dir=""
15441 dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
15442 if test -f ${dir}/tclInt.h ; then
15443 private_dir=${dir}
15444 fi
15445
15446 if test x"${private_dir}" = x; then
81ecdfbb 15447 as_fn_error "could not find private Tcl headers" "$LINENO" 5
85541719
DE
15448 else
15449 TCL_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
15450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
15451$as_echo "${private_dir}" >&6; }
85541719
DE
15452 fi
15453
15454 TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
15455 TCL_LIBRARY="${TCL_LIB_SPEC}"
15456 TCL_DEPS=""
15457 else
15458 # If building tcl in the same src tree, private headers
15459 # are not needed, but we need to be sure to use the right
15460 # headers library
15461 TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
15462 TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
15463 TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
15464 fi
15465
15466
15467
15468
15469
81ecdfbb
RW
15470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
15471$as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
dd2504ab 15472
5062cc19 15473 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
81ecdfbb
RW
15474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
15475$as_echo "loading" >&6; }
5062cc19 15476 . ${TK_BIN_DIR}/tkConfig.sh
3fc11d3e 15477 else
81ecdfbb
RW
15478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
15479$as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
3fc11d3e 15480 fi
bec39cab 15481
5062cc19
KS
15482 # eval is required to do the TK_DBGX substitution
15483 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
15484 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
15485
15486 # If the TK_BIN_DIR is the build directory (not the install directory),
15487 # then set the common variable name to the value of the build variables.
15488 # For example, the variable TK_LIB_SPEC will be set to the value
15489 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
15490 # instead of TK_BUILD_LIB_SPEC since it will work with both an
15491 # installed and uninstalled version of Tcl.
85541719 15492 if test -f "${TK_BIN_DIR}/Makefile" ; then
5062cc19
KS
15493 TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
15494 TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
15495 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
15496 elif test "`uname -s`" = "Darwin"; then
15497 # If Tk was built as a framework, attempt to use the libraries
15498 # from the framework at the given location so that linking works
a68ffae9 15499 # against Tk.framework installed in an arbitrary location.
5062cc19
KS
15500 case ${TK_DEFS} in
15501 *TK_FRAMEWORK*)
85541719 15502 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
5062cc19
KS
15503 for i in "`cd ${TK_BIN_DIR}; pwd`" \
15504 "`cd ${TK_BIN_DIR}/../..; pwd`"; do
15505 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
15506 TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
15507 break
15508 fi
15509 done
15510 fi
85541719 15511 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
5062cc19
KS
15512 TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
15513 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
15514 fi
15515 ;;
15516 esac
3fc11d3e
JM
15517 fi
15518
5062cc19
KS
15519 # eval is required to do the TK_DBGX substitution
15520 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
15521 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
15522 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
15523 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
3fc11d3e 15524
3fc11d3e
JM
15525
15526
bec39cab
AC
15527
15528
15529
15530
15531
15532
15533
3fc11d3e 15534
3fc11d3e 15535
bec39cab 15536
bec39cab 15537
85541719
DE
15538 # Check for in-tree Tk
15539 intree="no"
15540 if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
15541 intree="yes"
15542 fi
3fc11d3e 15543
85541719
DE
15544 # Find Tk private headers
15545 if test x"${intree}" = xno; then
3fc11d3e 15546
81ecdfbb
RW
15547 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
15548$as_echo_n "checking for Tk private headers... " >&6; }
5062cc19
KS
15549 private_dir=""
15550 dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
15551 if test -f ${dir}/tkInt.h; then
15552 private_dir=${dir}
3fc11d3e 15553 fi
bec39cab 15554
5062cc19 15555 if test x"${private_dir}" = x; then
81ecdfbb 15556 as_fn_error "could not find Tk private headers" "$LINENO" 5
3fc11d3e 15557 else
5062cc19 15558 TK_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
15559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
15560$as_echo "${private_dir}" >&6; }
3fc11d3e 15561 fi
3fc11d3e 15562
85541719
DE
15563 TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
15564 TK_LIBRARY=${TK_LIB_SPEC}
15565 TK_DEPS=""
15566 else
15567 TK_INCLUDE="-I${TK_SRC_DIR}/generic"
15568 TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
15569 TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
15570 fi
3fc11d3e
JM
15571
15572
3fc11d3e
JM
15573
15574
3fc11d3e 15575
85541719 15576 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e 15577
85541719
DE
15578 # Include some libraries that Tcl and Tk want.
15579 TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
15580 # Yes, the ordering seems wrong here. But it isn't.
15581 # TK_LIBS is the list of libraries that need to be linked
15582 # after Tcl/Tk. Note that this isn't put into LIBS. If it
15583 # were in LIBS then any link tests after this point would
15584 # try to include things like `$(LIBGUI)', which wouldn't work.
15585 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5 15586
85541719
DE
15587 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
15588 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
15589 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
15590 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
15591 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
15592 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
15593 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
3fc11d3e 15594
85541719
DE
15595 if test x$gdb_cv_os_cygwin = xyes; then
15596 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
15597 WIN32LDAPP="-Wl,--subsystem,console"
15598 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
3fc11d3e 15599 fi
ffc6a242 15600
81ecdfbb 15601 subdirs="$subdirs gdbtk"
3ace7edb 15602
85541719 15603 fi
3fc11d3e
JM
15604fi
15605
15606
15607
15608
15609
15610
15611
15612
81ecdfbb
RW
15613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
15614$as_echo_n "checking for X... " >&6; }
bec39cab 15615
c906108c 15616
81ecdfbb
RW
15617# Check whether --with-x was given.
15618if test "${with_x+set}" = set; then :
15619 withval=$with_x;
15620fi
c906108c
SS
15621
15622# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
15623if test "x$with_x" = xno; then
15624 # The user explicitly disabled X.
15625 have_x=disabled
15626else
81ecdfbb
RW
15627 case $x_includes,$x_libraries in #(
15628 *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
15629 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
15630 $as_echo_n "(cached) " >&6
c906108c
SS
15631else
15632 # One or both of the vars are not set, and there is no cached value.
bec39cab 15633ac_x_includes=no ac_x_libraries=no
81ecdfbb 15634rm -f -r conftest.dir
bec39cab
AC
15635if mkdir conftest.dir; then
15636 cd conftest.dir
bec39cab 15637 cat >Imakefile <<'_ACEOF'
81ecdfbb
RW
15638incroot:
15639 @echo incroot='${INCROOT}'
15640usrlibdir:
15641 @echo usrlibdir='${USRLIBDIR}'
15642libdir:
15643 @echo libdir='${LIBDIR}'
15644_ACEOF
15645 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
c906108c 15646 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
81ecdfbb
RW
15647 for ac_var in incroot usrlibdir libdir; do
15648 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
15649 done
c906108c 15650 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
81ecdfbb
RW
15651 for ac_extension in a so sl dylib la dll; do
15652 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
15653 test -f "$ac_im_libdir/libX11.$ac_extension"; then
bec39cab 15654 ac_im_usrlibdir=$ac_im_libdir; break
c906108c
SS
15655 fi
15656 done
15657 # Screen out bogus values from the imake configuration. They are
15658 # bogus both because they are the default anyway, and because
15659 # using them would break gcc on systems where it needs fixed includes.
bec39cab 15660 case $ac_im_incroot in
81ecdfbb 15661 /usr/include) ac_x_includes= ;;
bec39cab 15662 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
c906108c 15663 esac
bec39cab 15664 case $ac_im_usrlibdir in
81ecdfbb 15665 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
bec39cab 15666 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
c906108c
SS
15667 esac
15668 fi
15669 cd ..
81ecdfbb 15670 rm -f -r conftest.dir
c906108c
SS
15671fi
15672
bec39cab
AC
15673# Standard set of common directories for X headers.
15674# Check X11 before X11Rn because it is often a symlink to the current release.
15675ac_x_header_dirs='
15676/usr/X11/include
81ecdfbb 15677/usr/X11R7/include
bec39cab
AC
15678/usr/X11R6/include
15679/usr/X11R5/include
15680/usr/X11R4/include
15681
15682/usr/include/X11
81ecdfbb 15683/usr/include/X11R7
bec39cab
AC
15684/usr/include/X11R6
15685/usr/include/X11R5
15686/usr/include/X11R4
15687
15688/usr/local/X11/include
81ecdfbb 15689/usr/local/X11R7/include
bec39cab
AC
15690/usr/local/X11R6/include
15691/usr/local/X11R5/include
15692/usr/local/X11R4/include
15693
15694/usr/local/include/X11
81ecdfbb 15695/usr/local/include/X11R7
bec39cab
AC
15696/usr/local/include/X11R6
15697/usr/local/include/X11R5
15698/usr/local/include/X11R4
15699
15700/usr/X386/include
15701/usr/x386/include
15702/usr/XFree86/include/X11
15703
15704/usr/include
15705/usr/local/include
15706/usr/unsupported/include
15707/usr/athena/include
15708/usr/local/x11r5/include
15709/usr/lpp/Xamples/include
15710
15711/usr/openwin/include
15712/usr/openwin/share/include'
15713
15714if test "$ac_x_includes" = no; then
81ecdfbb 15715 # Guess where to find include files, by looking for Xlib.h.
c906108c 15716 # First, try using that file with no special directory specified.
81ecdfbb 15717 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15718/* end confdefs.h. */
81ecdfbb 15719#include <X11/Xlib.h>
bec39cab 15720_ACEOF
81ecdfbb 15721if ac_fn_c_try_cpp "$LINENO"; then :
c906108c
SS
15722 # We can compile using X headers with no special include directory.
15723ac_x_includes=
15724else
bec39cab 15725 for ac_dir in $ac_x_header_dirs; do
81ecdfbb 15726 if test -r "$ac_dir/X11/Xlib.h"; then
bec39cab
AC
15727 ac_x_includes=$ac_dir
15728 break
15729 fi
15730done
c906108c 15731fi
bec39cab
AC
15732rm -f conftest.err conftest.$ac_ext
15733fi # $ac_x_includes = no
c906108c 15734
bec39cab 15735if test "$ac_x_libraries" = no; then
c906108c 15736 # Check for the libraries.
c906108c
SS
15737 # See if we find them without any special options.
15738 # Don't add to $LIBS permanently.
bec39cab 15739 ac_save_LIBS=$LIBS
81ecdfbb
RW
15740 LIBS="-lX11 $LIBS"
15741 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15742/* end confdefs.h. */
81ecdfbb 15743#include <X11/Xlib.h>
bec39cab
AC
15744int
15745main ()
15746{
81ecdfbb 15747XrmInitialize ()
bec39cab
AC
15748 ;
15749 return 0;
15750}
15751_ACEOF
81ecdfbb 15752if ac_fn_c_try_link "$LINENO"; then :
bec39cab 15753 LIBS=$ac_save_LIBS
c906108c
SS
15754# We can link X programs with no special library path.
15755ac_x_libraries=
15756else
81ecdfbb
RW
15757 LIBS=$ac_save_LIBS
15758for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
c906108c 15759do
bec39cab 15760 # Don't even attempt the hair of trying to link an X program!
81ecdfbb
RW
15761 for ac_extension in a so sl dylib la dll; do
15762 if test -r "$ac_dir/libX11.$ac_extension"; then
c906108c
SS
15763 ac_x_libraries=$ac_dir
15764 break 2
15765 fi
15766 done
15767done
15768fi
81ecdfbb
RW
15769rm -f core conftest.err conftest.$ac_objext \
15770 conftest$ac_exeext conftest.$ac_ext
bec39cab 15771fi # $ac_x_libraries = no
c906108c 15772
81ecdfbb
RW
15773case $ac_x_includes,$ac_x_libraries in #(
15774 no,* | *,no | *\'*)
15775 # Didn't find X, or a directory has "'" in its name.
15776 ac_cv_have_x="have_x=no";; #(
15777 *)
15778 # Record where we found X for the cache.
15779 ac_cv_have_x="have_x=yes\
15780 ac_x_includes='$ac_x_includes'\
15781 ac_x_libraries='$ac_x_libraries'"
15782esac
c906108c 15783fi
81ecdfbb
RW
15784;; #(
15785 *) have_x=yes;;
15786 esac
c906108c
SS
15787 eval "$ac_cv_have_x"
15788fi # $with_x != no
15789
15790if test "$have_x" != yes; then
81ecdfbb
RW
15791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
15792$as_echo "$have_x" >&6; }
c906108c
SS
15793 no_x=yes
15794else
15795 # If each of the values was on the command line, it overrides each guess.
15796 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
15797 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
15798 # Update the cache value to reflect the command line values.
81ecdfbb
RW
15799 ac_cv_have_x="have_x=yes\
15800 ac_x_includes='$x_includes'\
15801 ac_x_libraries='$x_libraries'"
15802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
15803$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
c906108c
SS
15804fi
15805
15806
bec39cab 15807# Unlike the sim directory, whether a simulator is linked is controlled by
9b624dbe 15808# presence of a gdb_sim definition in the target configure.tgt entry.
7a292a7a
SS
15809# This code just checks for a few cases where we'd like to ignore those
15810# definitions, even when they're present in the '.mt' file. These cases
15811# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 15812# not part of the source tree.
7a292a7a 15813#
81ecdfbb
RW
15814# Check whether --enable-sim was given.
15815if test "${enable_sim+set}" = set; then :
15816 enableval=$enable_sim; echo "enable_sim = $enable_sim";
7a292a7a
SS
15817 echo "enableval = ${enableval}";
15818 case "${enableval}" in
15819 yes) ignore_sim=false ;;
15820 no) ignore_sim=true ;;
15821 *) ignore_sim=false ;;
15822 esac
15823else
15824 ignore_sim=false
81ecdfbb
RW
15825fi
15826
7a292a7a
SS
15827
15828if test ! -d "${srcdir}/../sim"; then
15829 ignore_sim=true
15830fi
15831
9b624dbe
UW
15832SIM=
15833SIM_OBS=
15834if test "${ignore_sim}" = "false"; then
15835 if test x"${gdb_sim}" != x ; then
15836 SIM="${gdb_sim}"
15837 SIM_OBS="remote-sim.o"
60ca704f 15838
81ecdfbb 15839$as_echo "#define WITH_SIM 1" >>confdefs.h
7a292a7a 15840
976102cd
PA
15841
15842 # Some tdep code should only be compiled in when the ppc sim is
15843 # built. PR sim/13418.
15844 case $target in
15845 powerpc*-*-*)
15846
15847$as_echo "#define WITH_PPC_SIM 1" >>confdefs.h
15848
15849 ;;
15850 esac
9b624dbe 15851 fi
7a292a7a
SS
15852fi
15853
15854
15855
c906108c
SS
15856
15857
15858
15859
15860
15861
dfcd3bfb 15862
e56ac5c3
AC
15863
15864
b3a90332
AC
15865
15866
c35f4ffc 15867# List of host floatformats.
bec39cab
AC
15868
15869cat >>confdefs.h <<_ACEOF
c35f4ffc 15870#define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
bec39cab 15871_ACEOF
c35f4ffc 15872
bec39cab
AC
15873
15874cat >>confdefs.h <<_ACEOF
c35f4ffc 15875#define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
bec39cab
AC
15876_ACEOF
15877
c35f4ffc 15878
bec39cab 15879cat >>confdefs.h <<_ACEOF
c35f4ffc 15880#define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
bec39cab 15881_ACEOF
c35f4ffc
AC
15882
15883
c906108c
SS
15884# target_subdir is used by the testsuite to find the target libraries.
15885target_subdir=
15886if test "${host}" != "${target}"; then
15887 target_subdir="${target_alias}/"
15888fi
15889
15890
15891frags=
771b4502 15892if test "${gdb_native}" = "yes"; then
0dad8a66
MK
15893 host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
15894 if test ! -f ${host_makefile_frag}; then
81ecdfbb 15895 as_fn_error "\"*** Gdb does not support native target ${host}\"" "$LINENO" 5
0dad8a66
MK
15896 fi
15897 frags="$frags $host_makefile_frag"
15898else
15899 host_makefile_frag=/dev/null
c906108c 15900fi
c906108c 15901
c906108c
SS
15902
15903
15904
771b4502 15905if test "${gdb_native}" = "yes"; then
a85f51e7
DJ
15906# We pick this up from the host configuration file (.mh) because we
15907# do not have a native configuration Makefile fragment.
c906108c
SS
15908nativefile=`sed -n '
15909s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
15910' ${host_makefile_frag}`
c906108c
SS
15911fi
15912
15913
b00a8037 15914if test x"${gdb_osabi}" != x ; then
bec39cab
AC
15915
15916cat >>confdefs.h <<_ACEOF
b00a8037 15917#define GDB_OSABI_DEFAULT $gdb_osabi
bec39cab 15918_ACEOF
b00a8037
DJ
15919
15920fi
15921
8dcde887 15922# Enable multi-ice-gdb-server.
81ecdfbb
RW
15923# Check whether --enable-multi-ice was given.
15924if test "${enable_multi_ice+set}" = set; then :
15925 enableval=$enable_multi_ice; case $enableval in
8dcde887
MK
15926 yes | no)
15927 ;;
81ecdfbb 15928 *) as_fn_error "bad value $enableval for --enable-multi-ice" "$LINENO" 5 ;;
8dcde887 15929 esac
81ecdfbb 15930fi
b4e70030 15931
81ecdfbb
RW
15932if test "x$enable_multi_ice" = xyes; then
15933 subdirs="$subdirs multi-ice"
3ace7edb 15934
a85f51e7
DJ
15935fi
15936
496c0e1b
JB
15937# Check whether --enable-gdbserver was given.
15938if test "${enable_gdbserver+set}" = set; then :
15939 enableval=$enable_gdbserver; case "${enableval}" in
15940 yes| no|auto) ;;
15941 *) as_fn_error "bad value ${enableval} for --enable-gdbserver option" "$LINENO" 5 ;;
15942esac
15943else
15944 enable_gdbserver=auto
15945fi
15946
15947
15948# We only build gdbserver automatically in a native configuration, and
15949# only if the user did not explicitly disable its build.
15950if test "$gdb_native" = "yes" -a "$enable_gdbserver" != "no"; then
81ecdfbb
RW
15951 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5
15952$as_echo_n "checking whether gdbserver is supported on this host... " >&6; }
8dcde887 15953 if test "x$build_gdbserver" = xyes; then
81ecdfbb
RW
15954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15955$as_echo "yes" >&6; }
15956 subdirs="$subdirs gdbserver"
3ace7edb 15957
496c0e1b 15958 gdbserver_build_enabled=yes
8dcde887 15959 else
81ecdfbb
RW
15960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15961$as_echo "no" >&6; }
8dcde887
MK
15962 fi
15963fi
15964
496c0e1b
JB
15965# If the user explicitly request the gdbserver to be built, verify that
15966# we were in fact able to enable it.
15967if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then
15968 as_fn_error "Automatic gdbserver build is not supported for this configuration" "$LINENO" 5
15969fi
15970
393fd4c3
YQ
15971# Check for babeltrace and babeltrace-ctf
15972
15973# Check whether --with-babeltrace was given.
15974if test "${with_babeltrace+set}" = set; then :
15975 withval=$with_babeltrace;
15976else
15977 with_babeltrace=auto
15978fi
15979
15980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltrace" >&5
15981$as_echo_n "checking whether to use babeltrace... " >&6; }
15982{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5
15983$as_echo "$with_babeltrace" >&6; }
15984
15985if test "x$with_babeltrace" = "xno"; then
15986 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&5
15987$as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&2;}
15988else
15989 # Append -Werror to CFLAGS so that configure can catch the warning
15990 # "assignment from incompatible pointer type", which is related to
15991 # the babeltrace change from 1.0.3 to 1.1.0. Babeltrace 1.1.0 works
15992 # in GDB, while babeltrace 1.0.3 is broken.
15993 # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be
15994 # safe to save and restore CFLAGS here.
15995 saved_CFLAGS=$CFLAGS
15996 CFLAGS="$CFLAGS -Werror"
15997
15998
15999
16000
16001
16002
16003
16004
16005 use_additional=yes
16006
16007 acl_save_prefix="$prefix"
16008 prefix="$acl_final_prefix"
16009 acl_save_exec_prefix="$exec_prefix"
16010 exec_prefix="$acl_final_exec_prefix"
16011
16012 eval additional_includedir=\"$includedir\"
16013 eval additional_libdir=\"$libdir\"
16014
16015 exec_prefix="$acl_save_exec_prefix"
16016 prefix="$acl_save_prefix"
16017
16018
16019# Check whether --with-libbabeltrace-prefix was given.
16020if test "${with_libbabeltrace_prefix+set}" = set; then :
16021 withval=$with_libbabeltrace_prefix;
16022 if test "X$withval" = "Xno"; then
16023 use_additional=no
16024 else
16025 if test "X$withval" = "X"; then
16026
16027 acl_save_prefix="$prefix"
16028 prefix="$acl_final_prefix"
16029 acl_save_exec_prefix="$exec_prefix"
16030 exec_prefix="$acl_final_exec_prefix"
16031
16032 eval additional_includedir=\"$includedir\"
16033 eval additional_libdir=\"$libdir\"
16034
16035 exec_prefix="$acl_save_exec_prefix"
16036 prefix="$acl_save_prefix"
16037
16038 else
16039 additional_includedir="$withval/include"
16040 additional_libdir="$withval/lib"
16041 fi
16042 fi
16043
16044fi
16045
16046 LIBBABELTRACE=
16047 LTLIBBABELTRACE=
16048 INCBABELTRACE=
16049 rpathdirs=
16050 ltrpathdirs=
16051 names_already_handled=
16052 names_next_round='babeltrace babeltrace-ctf'
16053 while test -n "$names_next_round"; do
16054 names_this_round="$names_next_round"
16055 names_next_round=
16056 for name in $names_this_round; do
16057 already_handled=
16058 for n in $names_already_handled; do
16059 if test "$n" = "$name"; then
16060 already_handled=yes
16061 break
16062 fi
16063 done
16064 if test -z "$already_handled"; then
16065 names_already_handled="$names_already_handled $name"
16066 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
16067 eval value=\"\$HAVE_LIB$uppername\"
16068 if test -n "$value"; then
16069 if test "$value" = yes; then
16070 eval value=\"\$LIB$uppername\"
16071 test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value"
16072 eval value=\"\$LTLIB$uppername\"
16073 test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value"
16074 else
16075 :
16076 fi
16077 else
16078 found_dir=
16079 found_la=
16080 found_so=
16081 found_a=
16082 if test $use_additional = yes; then
16083 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
16084 found_dir="$additional_libdir"
16085 found_so="$additional_libdir/lib$name.$shlibext"
16086 if test -f "$additional_libdir/lib$name.la"; then
16087 found_la="$additional_libdir/lib$name.la"
16088 fi
16089 else
16090 if test -f "$additional_libdir/lib$name.$libext"; then
16091 found_dir="$additional_libdir"
16092 found_a="$additional_libdir/lib$name.$libext"
16093 if test -f "$additional_libdir/lib$name.la"; then
16094 found_la="$additional_libdir/lib$name.la"
16095 fi
16096 fi
16097 fi
16098 fi
16099 if test "X$found_dir" = "X"; then
16100 for x in $LDFLAGS $LTLIBBABELTRACE; do
16101
16102 acl_save_prefix="$prefix"
16103 prefix="$acl_final_prefix"
16104 acl_save_exec_prefix="$exec_prefix"
16105 exec_prefix="$acl_final_exec_prefix"
16106 eval x=\"$x\"
16107 exec_prefix="$acl_save_exec_prefix"
16108 prefix="$acl_save_prefix"
16109
16110 case "$x" in
16111 -L*)
16112 dir=`echo "X$x" | sed -e 's/^X-L//'`
16113 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
16114 found_dir="$dir"
16115 found_so="$dir/lib$name.$shlibext"
16116 if test -f "$dir/lib$name.la"; then
16117 found_la="$dir/lib$name.la"
16118 fi
16119 else
16120 if test -f "$dir/lib$name.$libext"; then
16121 found_dir="$dir"
16122 found_a="$dir/lib$name.$libext"
16123 if test -f "$dir/lib$name.la"; then
16124 found_la="$dir/lib$name.la"
16125 fi
16126 fi
16127 fi
16128 ;;
16129 esac
16130 if test "X$found_dir" != "X"; then
16131 break
16132 fi
16133 done
16134 fi
16135 if test "X$found_dir" != "X"; then
16136 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name"
16137 if test "X$found_so" != "X"; then
16138 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
16139 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
16140 else
16141 haveit=
16142 for x in $ltrpathdirs; do
16143 if test "X$x" = "X$found_dir"; then
16144 haveit=yes
16145 break
16146 fi
16147 done
16148 if test -z "$haveit"; then
16149 ltrpathdirs="$ltrpathdirs $found_dir"
16150 fi
16151 if test "$hardcode_direct" = yes; then
16152 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
16153 else
16154 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
16155 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
16156 haveit=
16157 for x in $rpathdirs; do
16158 if test "X$x" = "X$found_dir"; then
16159 haveit=yes
16160 break
16161 fi
16162 done
16163 if test -z "$haveit"; then
16164 rpathdirs="$rpathdirs $found_dir"
16165 fi
16166 else
16167 haveit=
16168 for x in $LDFLAGS $LIBBABELTRACE; do
16169
16170 acl_save_prefix="$prefix"
16171 prefix="$acl_final_prefix"
16172 acl_save_exec_prefix="$exec_prefix"
16173 exec_prefix="$acl_final_exec_prefix"
16174 eval x=\"$x\"
16175 exec_prefix="$acl_save_exec_prefix"
16176 prefix="$acl_save_prefix"
16177
16178 if test "X$x" = "X-L$found_dir"; then
16179 haveit=yes
16180 break
16181 fi
16182 done
16183 if test -z "$haveit"; then
16184 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir"
16185 fi
16186 if test "$hardcode_minus_L" != no; then
16187 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
16188 else
16189 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
16190 fi
16191 fi
16192 fi
16193 fi
16194 else
16195 if test "X$found_a" != "X"; then
16196 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a"
16197 else
16198 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name"
16199 fi
16200 fi
16201 additional_includedir=
16202 case "$found_dir" in
16203 */lib | */lib/)
16204 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
16205 additional_includedir="$basedir/include"
16206 ;;
16207 esac
16208 if test "X$additional_includedir" != "X"; then
16209 if test "X$additional_includedir" != "X/usr/include"; then
16210 haveit=
16211 if test "X$additional_includedir" = "X/usr/local/include"; then
16212 if test -n "$GCC"; then
16213 case $host_os in
16214 linux*) haveit=yes;;
16215 esac
16216 fi
16217 fi
16218 if test -z "$haveit"; then
16219 for x in $CPPFLAGS $INCBABELTRACE; do
16220
16221 acl_save_prefix="$prefix"
16222 prefix="$acl_final_prefix"
16223 acl_save_exec_prefix="$exec_prefix"
16224 exec_prefix="$acl_final_exec_prefix"
16225 eval x=\"$x\"
16226 exec_prefix="$acl_save_exec_prefix"
16227 prefix="$acl_save_prefix"
16228
16229 if test "X$x" = "X-I$additional_includedir"; then
16230 haveit=yes
16231 break
16232 fi
16233 done
16234 if test -z "$haveit"; then
16235 if test -d "$additional_includedir"; then
16236 INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir"
16237 fi
16238 fi
16239 fi
16240 fi
16241 fi
16242 if test -n "$found_la"; then
16243 save_libdir="$libdir"
16244 case "$found_la" in
16245 */* | *\\*) . "$found_la" ;;
16246 *) . "./$found_la" ;;
16247 esac
16248 libdir="$save_libdir"
16249 for dep in $dependency_libs; do
16250 case "$dep" in
16251 -L*)
16252 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
16253 if test "X$additional_libdir" != "X/usr/lib"; then
16254 haveit=
16255 if test "X$additional_libdir" = "X/usr/local/lib"; then
16256 if test -n "$GCC"; then
16257 case $host_os in
16258 linux*) haveit=yes;;
16259 esac
16260 fi
16261 fi
16262 if test -z "$haveit"; then
16263 haveit=
16264 for x in $LDFLAGS $LIBBABELTRACE; do
16265
16266 acl_save_prefix="$prefix"
16267 prefix="$acl_final_prefix"
16268 acl_save_exec_prefix="$exec_prefix"
16269 exec_prefix="$acl_final_exec_prefix"
16270 eval x=\"$x\"
16271 exec_prefix="$acl_save_exec_prefix"
16272 prefix="$acl_save_prefix"
16273
16274 if test "X$x" = "X-L$additional_libdir"; then
16275 haveit=yes
16276 break
16277 fi
16278 done
16279 if test -z "$haveit"; then
16280 if test -d "$additional_libdir"; then
16281 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir"
16282 fi
16283 fi
16284 haveit=
16285 for x in $LDFLAGS $LTLIBBABELTRACE; do
16286
16287 acl_save_prefix="$prefix"
16288 prefix="$acl_final_prefix"
16289 acl_save_exec_prefix="$exec_prefix"
16290 exec_prefix="$acl_final_exec_prefix"
16291 eval x=\"$x\"
16292 exec_prefix="$acl_save_exec_prefix"
16293 prefix="$acl_save_prefix"
16294
16295 if test "X$x" = "X-L$additional_libdir"; then
16296 haveit=yes
16297 break
16298 fi
16299 done
16300 if test -z "$haveit"; then
16301 if test -d "$additional_libdir"; then
16302 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir"
16303 fi
16304 fi
16305 fi
16306 fi
16307 ;;
16308 -R*)
16309 dir=`echo "X$dep" | sed -e 's/^X-R//'`
16310 if test "$enable_rpath" != no; then
16311 haveit=
16312 for x in $rpathdirs; do
16313 if test "X$x" = "X$dir"; then
16314 haveit=yes
16315 break
16316 fi
16317 done
16318 if test -z "$haveit"; then
16319 rpathdirs="$rpathdirs $dir"
16320 fi
16321 haveit=
16322 for x in $ltrpathdirs; do
16323 if test "X$x" = "X$dir"; then
16324 haveit=yes
16325 break
16326 fi
16327 done
16328 if test -z "$haveit"; then
16329 ltrpathdirs="$ltrpathdirs $dir"
16330 fi
16331 fi
16332 ;;
16333 -l*)
16334 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
16335 ;;
16336 *.la)
16337 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
16338 ;;
16339 *)
16340 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$dep"
16341 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$dep"
16342 ;;
16343 esac
16344 done
16345 fi
16346 else
16347 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
16348 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name"
16349 fi
16350 fi
16351 fi
16352 done
16353 done
16354 if test "X$rpathdirs" != "X"; then
16355 if test -n "$hardcode_libdir_separator"; then
16356 alldirs=
16357 for found_dir in $rpathdirs; do
16358 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
16359 done
16360 acl_save_libdir="$libdir"
16361 libdir="$alldirs"
16362 eval flag=\"$hardcode_libdir_flag_spec\"
16363 libdir="$acl_save_libdir"
16364 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
16365 else
16366 for found_dir in $rpathdirs; do
16367 acl_save_libdir="$libdir"
16368 libdir="$found_dir"
16369 eval flag=\"$hardcode_libdir_flag_spec\"
16370 libdir="$acl_save_libdir"
16371 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
16372 done
16373 fi
16374 fi
16375 if test "X$ltrpathdirs" != "X"; then
16376 for found_dir in $ltrpathdirs; do
16377 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir"
16378 done
16379 fi
16380
16381
16382 ac_save_CPPFLAGS="$CPPFLAGS"
16383
16384 for element in $INCBABELTRACE; do
16385 haveit=
16386 for x in $CPPFLAGS; do
16387
16388 acl_save_prefix="$prefix"
16389 prefix="$acl_final_prefix"
16390 acl_save_exec_prefix="$exec_prefix"
16391 exec_prefix="$acl_final_exec_prefix"
16392 eval x=\"$x\"
16393 exec_prefix="$acl_save_exec_prefix"
16394 prefix="$acl_save_prefix"
16395
16396 if test "X$x" = "X$element"; then
16397 haveit=yes
16398 break
16399 fi
16400 done
16401 if test -z "$haveit"; then
16402 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
16403 fi
16404 done
16405
16406
16407 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5
16408$as_echo_n "checking for libbabeltrace... " >&6; }
16409if test "${ac_cv_libbabeltrace+set}" = set; then :
16410 $as_echo_n "(cached) " >&6
16411else
16412
16413 ac_save_LIBS="$LIBS"
16414 LIBS="$LIBS $LIBBABELTRACE"
16415 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16416/* end confdefs.h. */
16417#include <babeltrace/babeltrace.h>
16418 #include <babeltrace/ctf/events.h>
16419 #include <babeltrace/ctf/iterator.h>
16420int
16421main ()
16422{
16423struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL));
16424 struct bt_ctf_event *event = NULL;
16425 const struct bt_definition *scope;
16426
13cdc2af 16427 pos->type = BT_SEEK_BEGIN;
65c749e7 16428 bt_iter_set_pos (bt_ctf_get_iter (NULL), pos);
393fd4c3
YQ
16429 scope = bt_ctf_get_top_level_scope (event,
16430 BT_STREAM_EVENT_HEADER);
16431 bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id"));
16432
16433 ;
16434 return 0;
16435}
16436_ACEOF
16437if ac_fn_c_try_link "$LINENO"; then :
16438 ac_cv_libbabeltrace=yes
16439else
16440 ac_cv_libbabeltrace=no
16441fi
16442rm -f core conftest.err conftest.$ac_objext \
16443 conftest$ac_exeext conftest.$ac_ext
16444 LIBS="$ac_save_LIBS"
16445
16446fi
16447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5
16448$as_echo "$ac_cv_libbabeltrace" >&6; }
16449 if test "$ac_cv_libbabeltrace" = yes; then
16450 HAVE_LIBBABELTRACE=yes
16451
16452$as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h
16453
16454 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libbabeltrace" >&5
16455$as_echo_n "checking how to link with libbabeltrace... " >&6; }
16456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5
16457$as_echo "$LIBBABELTRACE" >&6; }
16458 else
16459 HAVE_LIBBABELTRACE=no
16460 CPPFLAGS="$ac_save_CPPFLAGS"
16461 LIBBABELTRACE=
16462 LTLIBBABELTRACE=
16463 fi
16464
16465
16466
16467
16468
16469
16470 CFLAGS=$saved_CFLAGS
16471
16472 if test "$HAVE_LIBBABELTRACE" != yes; then
16473 if test "$with_babeltrace" = yes; then
16474 as_fn_error "babeltrace is missing or unusable" "$LINENO" 5
16475 else
16476 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&5
16477$as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&2;}
16478 fi
16479 fi
16480fi
16481
db985757 16482# If nativefile (NAT_FILE) is not set in config/*/*.m[ht] files, we link
2c0fc042 16483# to an empty version.
c906108c
SS
16484
16485files=
16486links=
5a2402b8 16487
c906108c
SS
16488rm -f nm.h
16489if test "${nativefile}" != ""; then
0f475e27
AC
16490 case "${nativefile}" in
16491 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
16492 * ) GDB_NM_FILE="${nativefile}"
16493 esac
5a2402b8
AC
16494 files="${files} ${GDB_NM_FILE}"
16495 links="${links} nm.h"
60ca704f
SE
16496
16497cat >>confdefs.h <<_ACEOF
b78960be 16498#define GDB_NM_FILE "${GDB_NM_FILE}"
bec39cab 16499_ACEOF
5a2402b8 16500
c906108c 16501fi
5a2402b8
AC
16502
16503
e3487908
GKB
16504for ac_prog in xsltproc
16505do
16506 # Extract the first word of "$ac_prog", so it can be a program name with args.
16507set dummy $ac_prog; ac_word=$2
16508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16509$as_echo_n "checking for $ac_word... " >&6; }
16510if test "${ac_cv_path_XSLTPROC+set}" = set; then :
16511 $as_echo_n "(cached) " >&6
16512else
16513 case $XSLTPROC in
16514 [\\/]* | ?:[\\/]*)
16515 ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
16516 ;;
16517 *)
16518 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16519for as_dir in $PATH
16520do
16521 IFS=$as_save_IFS
16522 test -z "$as_dir" && as_dir=.
16523 for ac_exec_ext in '' $ac_executable_extensions; do
16524 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16525 ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
16526 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16527 break 2
16528 fi
16529done
16530 done
16531IFS=$as_save_IFS
16532
16533 ;;
16534esac
16535fi
16536XSLTPROC=$ac_cv_path_XSLTPROC
16537if test -n "$XSLTPROC"; then
16538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
16539$as_echo "$XSLTPROC" >&6; }
16540else
16541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16542$as_echo "no" >&6; }
16543fi
16544
16545
16546 test -n "$XSLTPROC" && break
16547done
16548test -n "$XSLTPROC" || XSLTPROC="missing"
16549
16550if test "x$USE_MAINTAINER_MODE" = xyes; then
16551 if test "${XSLTPROC}" = missing; then
16552 as_fn_error "unable to find xsltproc. maintainer-mode requires xsltproc." "$LINENO" 5
16553 fi
16554fi
16555
16556
bec39cab
AC
16557ac_sources="$files"
16558ac_dests="$links"
16559while test -n "$ac_sources"; do
16560 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
16561 set $ac_sources; ac_source=$1; shift; ac_sources=$*
16562 ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source"
16563done
81ecdfbb 16564ac_config_links="$ac_config_links $ac_config_links_1"
c906108c
SS
16565
16566
c906108c
SS
16567
16568
c906108c 16569
81ecdfbb 16570$as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
bec39cab 16571
bec39cab 16572
dcd1f979
TT
16573if $development; then
16574
16575$as_echo "#define GDB_SELF_TEST 1" >>confdefs.h
16576
16577fi
16578
b292c783 16579
f6a88844
JM
16580 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
16581 GDB_TRANSFORM_NAME=`echo gdb | sed -e "$gdb_ac_transform"`
16582 if test "x$GDB_TRANSFORM_NAME" = x; then
16583 GDB_TRANSFORM_NAME=gdb
16584 fi
16585
16586
16587
16588 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
16589 GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$gdb_ac_transform"`
16590 if test "x$GCORE_TRANSFORM_NAME" = x; then
16591 GCORE_TRANSFORM_NAME=gcore
16592 fi
16593
b292c783
JK
16594
16595ac_config_files="$ac_config_files gcore"
16596
c971b7fa 16597ac_config_files="$ac_config_files Makefile gdb-gdb.gdb doc/Makefile data-directory/Makefile"
81ecdfbb 16598
89a34d1b 16599
bec39cab
AC
16600cat >confcache <<\_ACEOF
16601# This file is a shell script that caches the results of configure
16602# tests run on this system so they can be shared between configure
16603# scripts and configure runs, see configure's option --config-cache.
16604# It is not useful on other systems. If it contains results you don't
16605# want to keep, you may remove or edit it.
16606#
16607# config.status only pays attention to the cache file if you give it
16608# the --recheck option to rerun configure.
16609#
16610# `ac_cv_env_foo' variables (set or unset) will be overridden when
16611# loading this file, other *unset* `ac_cv_foo' will be assigned the
16612# following values.
16613
16614_ACEOF
16615
16616# The following way of writing the cache mishandles newlines in values,
16617# but we know of no workaround that is simple, portable, and efficient.
81ecdfbb 16618# So, we kill variables containing newlines.
bec39cab
AC
16619# Ultrix sh set writes to stderr and can't be redirected directly,
16620# and sets the high bit in the cache file unless we assign to the vars.
81ecdfbb
RW
16621(
16622 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16623 eval ac_val=\$$ac_var
16624 case $ac_val in #(
16625 *${as_nl}*)
16626 case $ac_var in #(
16627 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16628$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
16629 esac
16630 case $ac_var in #(
16631 _ | IFS | as_nl) ;; #(
16632 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16633 *) { eval $ac_var=; unset $ac_var;} ;;
16634 esac ;;
16635 esac
16636 done
16637
bec39cab 16638 (set) 2>&1 |
81ecdfbb
RW
16639 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16640 *${as_nl}ac_space=\ *)
16641 # `set' does not quote correctly, so add quotes: double-quote
16642 # substitution turns \\\\ into \\, and sed turns \\ into \.
bec39cab
AC
16643 sed -n \
16644 "s/'/'\\\\''/g;
16645 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
81ecdfbb 16646 ;; #(
bec39cab
AC
16647 *)
16648 # `set' quotes correctly as required by POSIX, so do not add quotes.
81ecdfbb 16649 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
bec39cab 16650 ;;
81ecdfbb
RW
16651 esac |
16652 sort
16653) |
bec39cab 16654 sed '
81ecdfbb 16655 /^ac_cv_env_/b end
bec39cab 16656 t clear
81ecdfbb 16657 :clear
bec39cab
AC
16658 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16659 t end
81ecdfbb
RW
16660 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16661 :end' >>confcache
16662if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16663 if test -w "$cache_file"; then
16664 test "x$cache_file" != "x/dev/null" &&
16665 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16666$as_echo "$as_me: updating cache $cache_file" >&6;}
bec39cab
AC
16667 cat confcache >$cache_file
16668 else
81ecdfbb
RW
16669 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16670$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
bec39cab
AC
16671 fi
16672fi
16673rm -f confcache
16674
16675test "x$prefix" = xNONE && prefix=$ac_default_prefix
16676# Let make expand exec_prefix.
16677test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16678
bec39cab
AC
16679DEFS=-DHAVE_CONFIG_H
16680
16681ac_libobjs=
16682ac_ltlibobjs=
16683for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16684 # 1. Remove the extension, and $U if already installed.
81ecdfbb
RW
16685 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
16686 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
16687 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16688 # will be set to the directory where LIBOBJS objects are built.
16689 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16690 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
bec39cab
AC
16691done
16692LIBOBJS=$ac_libobjs
16693
16694LTLIBOBJS=$ac_ltlibobjs
16695
16696
85981d60 16697if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
81ecdfbb
RW
16698 as_fn_error "conditional \"MAINTAINER_MODE\" was never defined.
16699Usually this means the macro was only invoked conditionally." "$LINENO" 5
85981d60 16700fi
a417dc56 16701if test -z "${GMAKE_TRUE}" && test -z "${GMAKE_FALSE}"; then
81ecdfbb
RW
16702 as_fn_error "conditional \"GMAKE\" was never defined.
16703Usually this means the macro was only invoked conditionally." "$LINENO" 5
a417dc56 16704fi
4df42755
DE
16705if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then
16706 as_fn_error "conditional \"HAVE_PYTHON\" was never defined.
16707Usually this means the macro was only invoked conditionally." "$LINENO" 5
16708fi
16709if test -z "${HAVE_GUILE_TRUE}" && test -z "${HAVE_GUILE_FALSE}"; then
16710 as_fn_error "conditional \"HAVE_GUILE\" was never defined.
16711Usually this means the macro was only invoked conditionally." "$LINENO" 5
16712fi
81ecdfbb
RW
16713
16714
bec39cab 16715: ${CONFIG_STATUS=./config.status}
81ecdfbb 16716ac_write_fail=0
bec39cab
AC
16717ac_clean_files_save=$ac_clean_files
16718ac_clean_files="$ac_clean_files $CONFIG_STATUS"
81ecdfbb
RW
16719{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16720$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16721as_write_fail=0
16722cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
bec39cab
AC
16723#! $SHELL
16724# Generated by $as_me.
16725# Run this file to recreate the current configuration.
16726# Compiler output produced by configure, useful for debugging
16727# configure, is in config.log if it exists.
16728
16729debug=false
16730ac_cs_recheck=false
16731ac_cs_silent=false
bec39cab 16732
81ecdfbb
RW
16733SHELL=\${CONFIG_SHELL-$SHELL}
16734export SHELL
16735_ASEOF
16736cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16737## -------------------- ##
16738## M4sh Initialization. ##
16739## -------------------- ##
16740
16741# Be more Bourne compatible
16742DUALCASE=1; export DUALCASE # for MKS sh
16743if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
16744 emulate sh
16745 NULLCMD=:
81ecdfbb 16746 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
16747 # is contrary to our usage. Disable this feature.
16748 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
16749 setopt NO_GLOB_SUBST
16750else
16751 case `(set -o) 2>/dev/null` in #(
16752 *posix*) :
16753 set -o posix ;; #(
16754 *) :
16755 ;;
16756esac
bec39cab 16757fi
bec39cab 16758
81ecdfbb
RW
16759
16760as_nl='
16761'
16762export as_nl
16763# Printing a long string crashes Solaris 7 /usr/bin/printf.
16764as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16765as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16766as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16767# Prefer a ksh shell builtin over an external printf program on Solaris,
16768# but without wasting forks for bash or zsh.
16769if test -z "$BASH_VERSION$ZSH_VERSION" \
16770 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16771 as_echo='print -r --'
16772 as_echo_n='print -rn --'
16773elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16774 as_echo='printf %s\n'
16775 as_echo_n='printf %s'
16776else
16777 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16778 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16779 as_echo_n='/usr/ucb/echo -n'
16780 else
16781 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16782 as_echo_n_body='eval
16783 arg=$1;
16784 case $arg in #(
16785 *"$as_nl"*)
16786 expr "X$arg" : "X\\(.*\\)$as_nl";
16787 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16788 esac;
16789 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16790 '
16791 export as_echo_n_body
16792 as_echo_n='sh -c $as_echo_n_body as_echo'
16793 fi
16794 export as_echo_body
16795 as_echo='sh -c $as_echo_body as_echo'
16796fi
16797
16798# The user is always right.
16799if test "${PATH_SEPARATOR+set}" != set; then
16800 PATH_SEPARATOR=:
16801 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16802 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16803 PATH_SEPARATOR=';'
16804 }
bec39cab
AC
16805fi
16806
16807
81ecdfbb
RW
16808# IFS
16809# We need space, tab and new line, in precisely that order. Quoting is
16810# there to prevent editors from complaining about space-tab.
16811# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16812# splitting by setting IFS to empty value.)
16813IFS=" "" $as_nl"
16814
16815# Find who we are. Look in the path if we contain no directory separator.
16816case $0 in #((
16817 *[\\/]* ) as_myself=$0 ;;
16818 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16819for as_dir in $PATH
16820do
16821 IFS=$as_save_IFS
16822 test -z "$as_dir" && as_dir=.
16823 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16824 done
16825IFS=$as_save_IFS
16826
16827 ;;
16828esac
16829# We did not find ourselves, most probably we were run as `sh COMMAND'
16830# in which case we are not to be found in the path.
16831if test "x$as_myself" = x; then
16832 as_myself=$0
16833fi
16834if test ! -f "$as_myself"; then
16835 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16836 exit 1
16837fi
16838
16839# Unset variables that we do not need and which cause bugs (e.g. in
16840# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16841# suppresses any "Segmentation fault" message there. '((' could
16842# trigger a bug in pdksh 5.2.14.
16843for as_var in BASH_ENV ENV MAIL MAILPATH
16844do eval test x\${$as_var+set} = xset \
16845 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
16846done
bec39cab
AC
16847PS1='$ '
16848PS2='> '
16849PS4='+ '
16850
16851# NLS nuisances.
81ecdfbb
RW
16852LC_ALL=C
16853export LC_ALL
16854LANGUAGE=C
16855export LANGUAGE
16856
16857# CDPATH.
16858(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16859
16860
16861# as_fn_error ERROR [LINENO LOG_FD]
16862# ---------------------------------
16863# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16864# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
16865# script with status $?, using 1 if that was 0.
16866as_fn_error ()
16867{
16868 as_status=$?; test $as_status -eq 0 && as_status=1
16869 if test "$3"; then
16870 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16871 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
16872 fi
16873 $as_echo "$as_me: error: $1" >&2
16874 as_fn_exit $as_status
16875} # as_fn_error
16876
16877
16878# as_fn_set_status STATUS
16879# -----------------------
16880# Set $? to STATUS, without forking.
16881as_fn_set_status ()
16882{
16883 return $1
16884} # as_fn_set_status
16885
16886# as_fn_exit STATUS
16887# -----------------
16888# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16889as_fn_exit ()
16890{
16891 set +e
16892 as_fn_set_status $1
16893 exit $1
16894} # as_fn_exit
16895
16896# as_fn_unset VAR
16897# ---------------
16898# Portably unset VAR.
16899as_fn_unset ()
16900{
16901 { eval $1=; unset $1;}
16902}
16903as_unset=as_fn_unset
16904# as_fn_append VAR VALUE
16905# ----------------------
16906# Append the text in VALUE to the end of the definition contained in VAR. Take
16907# advantage of any shell optimizations that allow amortized linear growth over
16908# repeated appends, instead of the typical quadratic growth present in naive
16909# implementations.
16910if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16911 eval 'as_fn_append ()
16912 {
16913 eval $1+=\$2
16914 }'
16915else
16916 as_fn_append ()
16917 {
16918 eval $1=\$$1\$2
16919 }
16920fi # as_fn_append
16921
16922# as_fn_arith ARG...
16923# ------------------
16924# Perform arithmetic evaluation on the ARGs, and store the result in the
16925# global $as_val. Take advantage of shells that can avoid forks. The arguments
16926# must be portable across $(()) and expr.
16927if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16928 eval 'as_fn_arith ()
16929 {
16930 as_val=$(( $* ))
16931 }'
16932else
16933 as_fn_arith ()
16934 {
16935 as_val=`expr "$@" || test $? -eq 1`
16936 }
16937fi # as_fn_arith
bec39cab 16938
81ecdfbb
RW
16939
16940if expr a : '\(a\)' >/dev/null 2>&1 &&
16941 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
16942 as_expr=expr
16943else
16944 as_expr=false
16945fi
16946
81ecdfbb 16947if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
16948 as_basename=basename
16949else
16950 as_basename=false
16951fi
16952
81ecdfbb
RW
16953if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16954 as_dirname=dirname
16955else
16956 as_dirname=false
16957fi
bec39cab 16958
81ecdfbb 16959as_me=`$as_basename -- "$0" ||
bec39cab
AC
16960$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16961 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
16962 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
16963$as_echo X/"$0" |
16964 sed '/^.*\/\([^/][^/]*\)\/*$/{
16965 s//\1/
16966 q
16967 }
16968 /^X\/\(\/\/\)$/{
16969 s//\1/
16970 q
16971 }
16972 /^X\/\(\/\).*/{
16973 s//\1/
16974 q
16975 }
16976 s/.*/./; q'`
b4e70030 16977
b4e70030
JB
16978# Avoid depending upon Character Ranges.
16979as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16980as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16981as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16982as_cr_digits='0123456789'
16983as_cr_alnum=$as_cr_Letters$as_cr_digits
16984
81ecdfbb
RW
16985ECHO_C= ECHO_N= ECHO_T=
16986case `echo -n x` in #(((((
16987-n*)
16988 case `echo 'xy\c'` in
16989 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
16990 xy) ECHO_C='\c';;
16991 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16992 ECHO_T=' ';;
16993 esac;;
16994*)
16995 ECHO_N='-n';;
bec39cab
AC
16996esac
16997
81ecdfbb
RW
16998rm -f conf$$ conf$$.exe conf$$.file
16999if test -d conf$$.dir; then
17000 rm -f conf$$.dir/conf$$.file
bec39cab 17001else
81ecdfbb
RW
17002 rm -f conf$$.dir
17003 mkdir conf$$.dir 2>/dev/null
bec39cab 17004fi
81ecdfbb
RW
17005if (echo >conf$$.file) 2>/dev/null; then
17006 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 17007 as_ln_s='ln -s'
81ecdfbb
RW
17008 # ... but there are two gotchas:
17009 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17010 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
17011 # In both cases, we have to default to `cp -p'.
17012 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
17013 as_ln_s='cp -p'
17014 elif ln conf$$.file conf$$ 2>/dev/null; then
17015 as_ln_s=ln
17016 else
17017 as_ln_s='cp -p'
b4e70030 17018 fi
bec39cab
AC
17019else
17020 as_ln_s='cp -p'
17021fi
81ecdfbb
RW
17022rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17023rmdir conf$$.dir 2>/dev/null
17024
17025
17026# as_fn_mkdir_p
17027# -------------
17028# Create "$as_dir" as a directory, including parents if necessary.
17029as_fn_mkdir_p ()
17030{
17031
17032 case $as_dir in #(
17033 -*) as_dir=./$as_dir;;
17034 esac
17035 test -d "$as_dir" || eval $as_mkdir_p || {
17036 as_dirs=
17037 while :; do
17038 case $as_dir in #(
17039 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17040 *) as_qdir=$as_dir;;
17041 esac
17042 as_dirs="'$as_qdir' $as_dirs"
17043 as_dir=`$as_dirname -- "$as_dir" ||
17044$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17045 X"$as_dir" : 'X\(//\)[^/]' \| \
17046 X"$as_dir" : 'X\(//\)$' \| \
17047 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17048$as_echo X"$as_dir" |
17049 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17050 s//\1/
17051 q
17052 }
17053 /^X\(\/\/\)[^/].*/{
17054 s//\1/
17055 q
17056 }
17057 /^X\(\/\/\)$/{
17058 s//\1/
17059 q
17060 }
17061 /^X\(\/\).*/{
17062 s//\1/
17063 q
17064 }
17065 s/.*/./; q'`
17066 test -d "$as_dir" && break
17067 done
17068 test -z "$as_dirs" || eval "mkdir $as_dirs"
17069 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
17070
bec39cab 17071
81ecdfbb 17072} # as_fn_mkdir_p
bec39cab 17073if mkdir -p . 2>/dev/null; then
81ecdfbb 17074 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
17075else
17076 test -d ./-p && rmdir ./-p
17077 as_mkdir_p=false
17078fi
17079
81ecdfbb
RW
17080if test -x / >/dev/null 2>&1; then
17081 as_test_x='test -x'
17082else
17083 if ls -dL / >/dev/null 2>&1; then
17084 as_ls_L_option=L
17085 else
17086 as_ls_L_option=
17087 fi
17088 as_test_x='
17089 eval sh -c '\''
17090 if test -d "$1"; then
17091 test -d "$1/.";
17092 else
17093 case $1 in #(
17094 -*)set "./$1";;
17095 esac;
17096 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
17097 ???[sx]*):;;*)false;;esac;fi
17098 '\'' sh
17099 '
17100fi
17101as_executable_p=$as_test_x
bec39cab
AC
17102
17103# Sed expression to map a string onto a valid CPP name.
17104as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
17105
17106# Sed expression to map a string onto a valid variable name.
17107as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
17108
17109
bec39cab 17110exec 6>&1
81ecdfbb
RW
17111## ----------------------------------- ##
17112## Main body of $CONFIG_STATUS script. ##
17113## ----------------------------------- ##
17114_ASEOF
17115test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
17116
17117cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17118# Save the log message, to keep $0 and so on meaningful, and to
bec39cab 17119# report actual input values of CONFIG_FILES etc. instead of their
81ecdfbb
RW
17120# values after options handling.
17121ac_log="
bec39cab 17122This file was extended by $as_me, which was
81ecdfbb 17123generated by GNU Autoconf 2.64. Invocation command line was
bec39cab
AC
17124
17125 CONFIG_FILES = $CONFIG_FILES
17126 CONFIG_HEADERS = $CONFIG_HEADERS
17127 CONFIG_LINKS = $CONFIG_LINKS
17128 CONFIG_COMMANDS = $CONFIG_COMMANDS
17129 $ $0 $@
17130
81ecdfbb
RW
17131on `(hostname || uname -n) 2>/dev/null | sed 1q`
17132"
17133
bec39cab
AC
17134_ACEOF
17135
81ecdfbb
RW
17136case $ac_config_files in *"
17137"*) set x $ac_config_files; shift; ac_config_files=$*;;
17138esac
234b45d4 17139
81ecdfbb
RW
17140case $ac_config_headers in *"
17141"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17142esac
b4e70030 17143
b4e70030 17144
81ecdfbb
RW
17145cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17146# Files that config.status was made for.
17147config_files="$ac_config_files"
17148config_headers="$ac_config_headers"
17149config_links="$ac_config_links"
17150config_commands="$ac_config_commands"
234b45d4 17151
81ecdfbb 17152_ACEOF
b4e70030 17153
81ecdfbb 17154cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab 17155ac_cs_usage="\
81ecdfbb
RW
17156\`$as_me' instantiates files and other configuration actions
17157from templates according to the current configuration. Unless the files
17158and actions are specified as TAGs, all are instantiated by default.
234b45d4 17159
81ecdfbb 17160Usage: $0 [OPTION]... [TAG]...
234b45d4 17161
bec39cab 17162 -h, --help print this help, then exit
81ecdfbb
RW
17163 -V, --version print version number and configuration settings, then exit
17164 -q, --quiet, --silent
17165 do not print progress messages
bec39cab
AC
17166 -d, --debug don't remove temporary files
17167 --recheck update $as_me by reconfiguring in the same conditions
81ecdfbb
RW
17168 --file=FILE[:TEMPLATE]
17169 instantiate the configuration file FILE
17170 --header=FILE[:TEMPLATE]
17171 instantiate the configuration header FILE
234b45d4 17172
bec39cab
AC
17173Configuration files:
17174$config_files
234b45d4 17175
bec39cab
AC
17176Configuration headers:
17177$config_headers
234b45d4 17178
bec39cab
AC
17179Configuration links:
17180$config_links
234b45d4 17181
bec39cab
AC
17182Configuration commands:
17183$config_commands
17184
81ecdfbb 17185Report bugs to the package provider."
b4e70030 17186
81ecdfbb
RW
17187_ACEOF
17188cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab
AC
17189ac_cs_version="\\
17190config.status
81ecdfbb
RW
17191configured by $0, generated by GNU Autoconf 2.64,
17192 with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
bec39cab 17193
81ecdfbb 17194Copyright (C) 2009 Free Software Foundation, Inc.
bec39cab
AC
17195This config.status script is free software; the Free Software Foundation
17196gives unlimited permission to copy, distribute and modify it."
81ecdfbb
RW
17197
17198ac_pwd='$ac_pwd'
17199srcdir='$srcdir'
17200INSTALL='$INSTALL'
81ecdfbb
RW
17201AWK='$AWK'
17202test -n "\$AWK" || AWK=awk
bec39cab
AC
17203_ACEOF
17204
81ecdfbb
RW
17205cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17206# The default lists apply if the user does not specify any file.
bec39cab
AC
17207ac_need_defaults=:
17208while test $# != 0
17209do
17210 case $1 in
17211 --*=*)
81ecdfbb
RW
17212 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17213 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
bec39cab 17214 ac_shift=:
c906108c 17215 ;;
81ecdfbb 17216 *)
bec39cab
AC
17217 ac_option=$1
17218 ac_optarg=$2
17219 ac_shift=shift
c906108c 17220 ;;
bec39cab 17221 esac
c906108c 17222
bec39cab
AC
17223 case $ac_option in
17224 # Handling of the options.
bec39cab
AC
17225 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17226 ac_cs_recheck=: ;;
81ecdfbb
RW
17227 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
17228 $as_echo "$ac_cs_version"; exit ;;
17229 --debug | --debu | --deb | --de | --d | -d )
bec39cab
AC
17230 debug=: ;;
17231 --file | --fil | --fi | --f )
17232 $ac_shift
81ecdfbb
RW
17233 case $ac_optarg in
17234 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17235 esac
17236 as_fn_append CONFIG_FILES " '$ac_optarg'"
bec39cab
AC
17237 ac_need_defaults=false;;
17238 --header | --heade | --head | --hea )
17239 $ac_shift
81ecdfbb
RW
17240 case $ac_optarg in
17241 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17242 esac
17243 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
bec39cab 17244 ac_need_defaults=false;;
81ecdfbb
RW
17245 --he | --h)
17246 # Conflict between --help and --header
17247 as_fn_error "ambiguous option: \`$1'
17248Try \`$0 --help' for more information.";;
17249 --help | --hel | -h )
17250 $as_echo "$ac_cs_usage"; exit ;;
bec39cab
AC
17251 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17252 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17253 ac_cs_silent=: ;;
c906108c 17254
bec39cab 17255 # This is an error.
81ecdfbb
RW
17256 -*) as_fn_error "unrecognized option: \`$1'
17257Try \`$0 --help' for more information." ;;
c906108c 17258
81ecdfbb
RW
17259 *) as_fn_append ac_config_targets " $1"
17260 ac_need_defaults=false ;;
c906108c 17261
bec39cab
AC
17262 esac
17263 shift
17264done
c906108c 17265
bec39cab 17266ac_configure_extra_args=
c906108c 17267
bec39cab
AC
17268if $ac_cs_silent; then
17269 exec 6>/dev/null
17270 ac_configure_extra_args="$ac_configure_extra_args --silent"
17271fi
c906108c 17272
bec39cab 17273_ACEOF
81ecdfbb 17274cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab 17275if \$ac_cs_recheck; then
81ecdfbb
RW
17276 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
17277 shift
17278 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17279 CONFIG_SHELL='$SHELL'
17280 export CONFIG_SHELL
17281 exec "\$@"
bec39cab
AC
17282fi
17283
17284_ACEOF
81ecdfbb
RW
17285cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17286exec 5>>config.log
17287{
17288 echo
17289 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17290## Running $as_me. ##
17291_ASBOX
17292 $as_echo "$ac_log"
17293} >&5
bec39cab 17294
81ecdfbb
RW
17295_ACEOF
17296cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
c906108c 17297#
81ecdfbb 17298# INIT-COMMANDS
c906108c 17299#
a417dc56 17300ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
b4e70030 17301
bec39cab
AC
17302_ACEOF
17303
81ecdfbb 17304cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
4e8d927d 17305
81ecdfbb 17306# Handling of arguments.
bec39cab 17307for ac_config_target in $ac_config_targets
c906108c 17308do
81ecdfbb
RW
17309 case $ac_config_target in
17310 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
17311 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
f997c383 17312 "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
81ecdfbb 17313 "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;;
b292c783 17314 "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;;
81ecdfbb 17315 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
e2207b9a 17316 "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;;
5ae98d25 17317 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
aa2e2d8d 17318 "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
81ecdfbb
RW
17319
17320 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
c906108c
SS
17321 esac
17322done
17323
81ecdfbb 17324
bec39cab
AC
17325# If the user did not use the arguments to specify the items to instantiate,
17326# then the envvar interface is used. Set only those that are not.
17327# We use the long form for the default assignment because of an extremely
17328# bizarre bug on SunOS 4.1.3.
17329if $ac_need_defaults; then
17330 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17331 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17332 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
17333 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
17334fi
17335
b4e70030 17336# Have a temporary directory for convenience. Make it in the build tree
81ecdfbb 17337# simply because there is no reason against having it here, and in addition,
b4e70030 17338# creating and moving files from /tmp can sometimes cause problems.
81ecdfbb
RW
17339# Hook for its removal unless debugging.
17340# Note that there is a small window in which the directory will not be cleaned:
17341# after its creation but before its name has been assigned to `$tmp'.
b4e70030
JB
17342$debug ||
17343{
81ecdfbb
RW
17344 tmp=
17345 trap 'exit_status=$?
17346 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
17347' 0
17348 trap 'as_fn_exit 1' 1 2 13 15
17349}
17350# Create a (secure) tmp directory for tmp files.
17351
17352{
17353 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
17354 test -n "$tmp" && test -d "$tmp"
17355} ||
17356{
17357 tmp=./conf$$-$RANDOM
17358 (umask 077 && mkdir "$tmp")
17359} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
17360
17361# Set up the scripts for CONFIG_FILES section.
17362# No need to generate them if there are no CONFIG_FILES.
17363# This happens for instance with `./config.status config.h'.
17364if test -n "$CONFIG_FILES"; then
17365
17366if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
17367 ac_cs_awk_getline=:
17368 ac_cs_awk_pipe_init=
17369 ac_cs_awk_read_file='
17370 while ((getline aline < (F[key])) > 0)
17371 print(aline)
17372 close(F[key])'
17373 ac_cs_awk_pipe_fini=
17374else
17375 ac_cs_awk_getline=false
17376 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
17377 ac_cs_awk_read_file='
17378 print "|#_!!_#|"
17379 print "cat " F[key] " &&"
17380 '$ac_cs_awk_pipe_init
17381 # The final `:' finishes the AND list.
17382 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
17383fi
17384ac_cr=`echo X | tr X '\015'`
17385# On cygwin, bash can eat \r inside `` if the user requested igncr.
17386# But we know of no other shell where ac_cr would be empty at this
17387# point, so we can use a bashism as a fallback.
17388if test "x$ac_cr" = x; then
17389 eval ac_cr=\$\'\\r\'
17390fi
17391ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17392if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
17393 ac_cs_awk_cr='\r'
17394else
17395 ac_cs_awk_cr=$ac_cr
17396fi
17397
17398echo 'BEGIN {' >"$tmp/subs1.awk" &&
17399_ACEOF
17400
17401# Create commands to substitute file output variables.
17402{
17403 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
17404 echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' &&
17405 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
17406 echo "_ACAWK" &&
17407 echo "_ACEOF"
17408} >conf$$files.sh &&
17409. ./conf$$files.sh ||
17410 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
17411rm -f conf$$files.sh
17412
17413{
17414 echo "cat >conf$$subs.awk <<_ACEOF" &&
17415 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17416 echo "_ACEOF"
17417} >conf$$subs.sh ||
17418 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
17419ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
17420ac_delim='%!_!# '
17421for ac_last_try in false false false false false :; do
17422 . ./conf$$subs.sh ||
17423 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
17424
17425 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17426 if test $ac_delim_n = $ac_delim_num; then
17427 break
17428 elif $ac_last_try; then
17429 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
17430 else
17431 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17432 fi
17433done
17434rm -f conf$$subs.sh
17435
17436cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17437cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
17438_ACEOF
17439sed -n '
17440h
17441s/^/S["/; s/!.*/"]=/
17442p
17443g
17444s/^[^!]*!//
17445:repl
17446t repl
17447s/'"$ac_delim"'$//
17448t delim
17449:nl
17450h
17451s/\(.\{148\}\).*/\1/
17452t more1
17453s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17454p
17455n
17456b repl
17457:more1
17458s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17459p
17460g
17461s/.\{148\}//
17462t nl
17463:delim
17464h
17465s/\(.\{148\}\).*/\1/
17466t more2
17467s/["\\]/\\&/g; s/^/"/; s/$/"/
17468p
17469b
17470:more2
17471s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17472p
17473g
17474s/.\{148\}//
17475t delim
17476' <conf$$subs.awk | sed '
17477/^[^""]/{
17478 N
17479 s/\n//
17480}
17481' >>$CONFIG_STATUS || ac_write_fail=1
17482rm -f conf$$subs.awk
17483cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17484_ACAWK
17485cat >>"\$tmp/subs1.awk" <<_ACAWK &&
17486 for (key in S) S_is_set[key] = 1
17487 FS = "\a"
17488 \$ac_cs_awk_pipe_init
17489}
17490{
17491 line = $ 0
17492 nfields = split(line, field, "@")
17493 substed = 0
17494 len = length(field[1])
17495 for (i = 2; i < nfields; i++) {
17496 key = field[i]
17497 keylen = length(key)
17498 if (S_is_set[key]) {
17499 value = S[key]
17500 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17501 len += length(value) + length(field[++i])
17502 substed = 1
17503 } else
17504 len += 1 + keylen
17505 }
17506 if (nfields == 3 && !substed) {
17507 key = field[2]
17508 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
17509 \$ac_cs_awk_read_file
17510 next
17511 }
17512 }
17513 print line
b4e70030 17514}
81ecdfbb
RW
17515\$ac_cs_awk_pipe_fini
17516_ACAWK
17517_ACEOF
17518cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17519if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17520 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17521else
17522 cat
17523fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
17524 || as_fn_error "could not setup config files machinery" "$LINENO" 5
17525_ACEOF
17526
17527# VPATH may cause trouble with some makes, so we remove $(srcdir),
17528# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
17529# trailing colons and then remove the whole line if VPATH becomes empty
17530# (actually we leave an empty line to preserve line numbers).
17531if test "x$srcdir" = x.; then
17532 ac_vpsub='/^[ ]*VPATH[ ]*=/{
17533s/:*\$(srcdir):*/:/
17534s/:*\${srcdir}:*/:/
17535s/:*@srcdir@:*/:/
17536s/^\([^=]*=[ ]*\):*/\1/
17537s/:*$//
17538s/^[^=]*=[ ]*$//
17539}'
17540fi
17541
17542cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17543fi # test -n "$CONFIG_FILES"
17544
17545# Set up the scripts for CONFIG_HEADERS section.
17546# No need to generate them if there are no CONFIG_HEADERS.
17547# This happens for instance with `./config.status Makefile'.
17548if test -n "$CONFIG_HEADERS"; then
17549cat >"$tmp/defines.awk" <<\_ACAWK ||
17550BEGIN {
17551_ACEOF
17552
17553# Transform confdefs.h into an awk script `defines.awk', embedded as
17554# here-document in config.status, that substitutes the proper values into
17555# config.h.in to produce config.h.
4e8d927d 17556
81ecdfbb
RW
17557# Create a delimiter string that does not exist in confdefs.h, to ease
17558# handling of long lines.
17559ac_delim='%!_!# '
17560for ac_last_try in false false :; do
17561 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
17562 if test -z "$ac_t"; then
17563 break
17564 elif $ac_last_try; then
17565 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
17566 else
17567 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17568 fi
17569done
4e8d927d 17570
81ecdfbb
RW
17571# For the awk script, D is an array of macro values keyed by name,
17572# likewise P contains macro parameters if any. Preserve backslash
17573# newline sequences.
17574
17575ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17576sed -n '
17577s/.\{148\}/&'"$ac_delim"'/g
17578t rset
17579:rset
17580s/^[ ]*#[ ]*define[ ][ ]*/ /
17581t def
17582d
17583:def
17584s/\\$//
17585t bsnl
17586s/["\\]/\\&/g
17587s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17588D["\1"]=" \3"/p
17589s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17590d
17591:bsnl
17592s/["\\]/\\&/g
17593s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17594D["\1"]=" \3\\\\\\n"\\/p
17595t cont
17596s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17597t cont
17598d
17599:cont
17600n
17601s/.\{148\}/&'"$ac_delim"'/g
17602t clear
17603:clear
17604s/\\$//
17605t bsnlc
17606s/["\\]/\\&/g; s/^/"/; s/$/"/p
17607d
17608:bsnlc
17609s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17610b cont
17611' <confdefs.h | sed '
17612s/'"$ac_delim"'/"\\\
17613"/g' >>$CONFIG_STATUS || ac_write_fail=1
17614
17615cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17616 for (key in D) D_is_set[key] = 1
17617 FS = "\a"
17618}
17619/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17620 line = \$ 0
17621 split(line, arg, " ")
17622 if (arg[1] == "#") {
17623 defundef = arg[2]
17624 mac1 = arg[3]
17625 } else {
17626 defundef = substr(arg[1], 2)
17627 mac1 = arg[2]
17628 }
17629 split(mac1, mac2, "(") #)
17630 macro = mac2[1]
17631 prefix = substr(line, 1, index(line, defundef) - 1)
17632 if (D_is_set[macro]) {
17633 # Preserve the white space surrounding the "#".
17634 print prefix "define", macro P[macro] D[macro]
17635 next
17636 } else {
17637 # Replace #undef with comments. This is necessary, for example,
17638 # in the case of _POSIX_SOURCE, which is predefined and required
17639 # on some systems where configure will not decide to define it.
17640 if (defundef == "undef") {
17641 print "/*", prefix defundef, macro, "*/"
17642 next
17643 }
17644 }
b4e70030 17645}
81ecdfbb
RW
17646{ print }
17647_ACAWK
b4e70030 17648_ACEOF
81ecdfbb
RW
17649cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17650 as_fn_error "could not setup config headers machinery" "$LINENO" 5
17651fi # test -n "$CONFIG_HEADERS"
4e8d927d 17652
4e8d927d 17653
81ecdfbb
RW
17654eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
17655shift
17656for ac_tag
17657do
17658 case $ac_tag in
17659 :[FHLC]) ac_mode=$ac_tag; continue;;
17660 esac
17661 case $ac_mode$ac_tag in
17662 :[FHL]*:*);;
17663 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
17664 :[FH]-) ac_tag=-:-;;
17665 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17666 esac
17667 ac_save_IFS=$IFS
17668 IFS=:
17669 set x $ac_tag
17670 IFS=$ac_save_IFS
17671 shift
17672 ac_file=$1
17673 shift
4e8d927d 17674
81ecdfbb
RW
17675 case $ac_mode in
17676 :L) ac_source=$1;;
17677 :[FH])
17678 ac_file_inputs=
17679 for ac_f
17680 do
17681 case $ac_f in
17682 -) ac_f="$tmp/stdin";;
17683 *) # Look for the file first in the build tree, then in the source tree
17684 # (if the path is not absolute). The absolute path cannot be DOS-style,
17685 # because $ac_f cannot contain `:'.
17686 test -f "$ac_f" ||
17687 case $ac_f in
17688 [\\/$]*) false;;
17689 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17690 esac ||
17691 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
17692 esac
17693 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17694 as_fn_append ac_file_inputs " '$ac_f'"
17695 done
17696
17697 # Let's still pretend it is `configure' which instantiates (i.e., don't
17698 # use $as_me), people would be surprised to read:
17699 # /* config.h. Generated by config.status. */
17700 configure_input='Generated from '`
17701 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17702 `' by configure.'
17703 if test x"$ac_file" != x-; then
17704 configure_input="$ac_file. $configure_input"
17705 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17706$as_echo "$as_me: creating $ac_file" >&6;}
b4e70030 17707 fi
81ecdfbb
RW
17708 # Neutralize special characters interpreted by sed in replacement strings.
17709 case $configure_input in #(
17710 *\&* | *\|* | *\\* )
17711 ac_sed_conf_input=`$as_echo "$configure_input" |
17712 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17713 *) ac_sed_conf_input=$configure_input;;
17714 esac
4e8d927d 17715
81ecdfbb
RW
17716 case $ac_tag in
17717 *:-:* | *:-) cat >"$tmp/stdin" \
17718 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
17719 esac
17720 ;;
c906108c
SS
17721 esac
17722
81ecdfbb 17723 ac_dir=`$as_dirname -- "$ac_file" ||
bec39cab
AC
17724$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17725 X"$ac_file" : 'X\(//\)[^/]' \| \
17726 X"$ac_file" : 'X\(//\)$' \| \
81ecdfbb
RW
17727 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
17728$as_echo X"$ac_file" |
17729 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17730 s//\1/
17731 q
17732 }
17733 /^X\(\/\/\)[^/].*/{
17734 s//\1/
17735 q
17736 }
17737 /^X\(\/\/\)$/{
17738 s//\1/
17739 q
17740 }
17741 /^X\(\/\).*/{
17742 s//\1/
17743 q
17744 }
17745 s/.*/./; q'`
17746 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
17747 ac_builddir=.
17748
81ecdfbb
RW
17749case "$ac_dir" in
17750.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17751*)
17752 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
17753 # A ".." for each directory in $ac_dir_suffix.
17754 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
17755 case $ac_top_builddir_sub in
17756 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17757 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17758 esac ;;
17759esac
17760ac_abs_top_builddir=$ac_pwd
17761ac_abs_builddir=$ac_pwd$ac_dir_suffix
17762# for backward compatibility:
17763ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
17764
17765case $srcdir in
81ecdfbb 17766 .) # We are building in place.
bec39cab 17767 ac_srcdir=.
81ecdfbb
RW
17768 ac_top_srcdir=$ac_top_builddir_sub
17769 ac_abs_top_srcdir=$ac_pwd ;;
17770 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 17771 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
17772 ac_top_srcdir=$srcdir
17773 ac_abs_top_srcdir=$srcdir ;;
17774 *) # Relative name.
17775 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17776 ac_top_srcdir=$ac_top_build_prefix$srcdir
17777 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 17778esac
81ecdfbb 17779ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 17780
c906108c 17781
81ecdfbb
RW
17782 case $ac_mode in
17783 :F)
17784 #
17785 # CONFIG_FILE
17786 #
c906108c 17787
bec39cab
AC
17788 case $INSTALL in
17789 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
81ecdfbb 17790 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
c906108c 17791 esac
81ecdfbb 17792_ACEOF
121ce6e5 17793
81ecdfbb
RW
17794cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17795# If the template does not know about datarootdir, expand it.
17796# FIXME: This hack should be removed a few years after 2.60.
17797ac_datarootdir_hack=; ac_datarootdir_seen=
17798ac_sed_dataroot='
17799/datarootdir/ {
17800 p
17801 q
17802}
17803/@datadir@/p
17804/@docdir@/p
17805/@infodir@/p
17806/@localedir@/p
17807/@mandir@/p'
17808case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
17809*datarootdir*) ac_datarootdir_seen=yes;;
17810*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
17811 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17812$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
17813_ACEOF
17814cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17815 ac_datarootdir_hack='
17816 s&@datadir@&$datadir&g
17817 s&@docdir@&$docdir&g
17818 s&@infodir@&$infodir&g
17819 s&@localedir@&$localedir&g
17820 s&@mandir@&$mandir&g
17821 s&\\\${datarootdir}&$datarootdir&g' ;;
17822esac
4e8d927d 17823_ACEOF
81ecdfbb
RW
17824
17825# Neutralize VPATH when `$srcdir' = `.'.
17826# Shell code in configure.ac might set extrasub.
17827# FIXME: do we really want to maintain this feature?
17828cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17829ac_sed_extra="$ac_vpsub
bec39cab
AC
17830$extrasub
17831_ACEOF
81ecdfbb 17832cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab
AC
17833:t
17834/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
81ecdfbb
RW
17835s|@configure_input@|$ac_sed_conf_input|;t t
17836s&@top_builddir@&$ac_top_builddir_sub&;t t
17837s&@top_build_prefix@&$ac_top_build_prefix&;t t
17838s&@srcdir@&$ac_srcdir&;t t
17839s&@abs_srcdir@&$ac_abs_srcdir&;t t
17840s&@top_srcdir@&$ac_top_srcdir&;t t
17841s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17842s&@builddir@&$ac_builddir&;t t
17843s&@abs_builddir@&$ac_abs_builddir&;t t
17844s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17845s&@INSTALL@&$ac_INSTALL&;t t
81ecdfbb
RW
17846$ac_datarootdir_hack
17847"
17848eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
17849if $ac_cs_awk_getline; then
17850 $AWK -f "$tmp/subs.awk"
17851else
17852 $AWK -f "$tmp/subs.awk" | $SHELL
17853fi >$tmp/out \
17854 || as_fn_error "could not create $ac_file" "$LINENO" 5
17855
17856test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
17857 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
17858 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
17859 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
17860which seems to be undefined. Please make sure it is defined." >&5
17861$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
17862which seems to be undefined. Please make sure it is defined." >&2;}
17863
17864 rm -f "$tmp/stdin"
bec39cab 17865 case $ac_file in
81ecdfbb
RW
17866 -) cat "$tmp/out" && rm -f "$tmp/out";;
17867 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
17868 esac \
17869 || as_fn_error "could not create $ac_file" "$LINENO" 5
17870 ;;
17871 :H)
17872 #
17873 # CONFIG_HEADER
17874 #
bec39cab 17875 if test x"$ac_file" != x-; then
81ecdfbb
RW
17876 {
17877 $as_echo "/* $configure_input */" \
17878 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
17879 } >"$tmp/config.h" \
17880 || as_fn_error "could not create $ac_file" "$LINENO" 5
17881 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
17882 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17883$as_echo "$as_me: $ac_file is unchanged" >&6;}
bec39cab 17884 else
81ecdfbb
RW
17885 rm -f "$ac_file"
17886 mv "$tmp/config.h" "$ac_file" \
17887 || as_fn_error "could not create $ac_file" "$LINENO" 5
bec39cab
AC
17888 fi
17889 else
81ecdfbb
RW
17890 $as_echo "/* $configure_input */" \
17891 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
17892 || as_fn_error "could not create -" "$LINENO" 5
bec39cab 17893 fi
81ecdfbb
RW
17894 ;;
17895 :L)
17896 #
17897 # CONFIG_LINK
17898 #
c906108c 17899
81ecdfbb
RW
17900 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
17901 :
b4e70030 17902 else
81ecdfbb
RW
17903 # Prefer the file from the source tree if names are identical.
17904 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
17905 ac_source=$srcdir/$ac_source
17906 fi
b4e70030 17907
81ecdfbb
RW
17908 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
17909$as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
b4e70030 17910
81ecdfbb
RW
17911 if test ! -r "$ac_source"; then
17912 as_fn_error "$ac_source: file not found" "$LINENO" 5
17913 fi
17914 rm -f "$ac_file"
bec39cab 17915
81ecdfbb
RW
17916 # Try a relative symlink, then a hard link, then a copy.
17917 case $srcdir in
17918 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
17919 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
17920 esac
17921 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
17922 ln "$ac_source" "$ac_file" 2>/dev/null ||
17923 cp -p "$ac_source" "$ac_file" ||
17924 as_fn_error "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
17925 fi
17926 ;;
17927 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
17928$as_echo "$as_me: executing $ac_file commands" >&6;}
17929 ;;
c906108c 17930 esac
b4e70030 17931
bec39cab 17932
81ecdfbb
RW
17933 case $ac_file$ac_mode in
17934 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
b292c783 17935 "gcore":F) chmod +x gcore ;;
1e94266c
SM
17936 "Makefile":F)
17937case x$CONFIG_HEADERS in
17938xconfig.h:config.in)
17939echo > stamp-h ;;
17940esac
17941 ;;
17942 "gdb-gdb.gdb":F)
17943case x$CONFIG_HEADERS in
17944xconfig.h:config.in)
17945echo > stamp-h ;;
17946esac
17947 ;;
17948 "doc/Makefile":F)
17949case x$CONFIG_HEADERS in
17950xconfig.h:config.in)
17951echo > stamp-h ;;
17952esac
17953 ;;
17954 "data-directory/Makefile":F)
c906108c
SS
17955case x$CONFIG_HEADERS in
17956xconfig.h:config.in)
17957echo > stamp-h ;;
17958esac
bec39cab 17959 ;;
81ecdfbb 17960
bec39cab 17961 esac
81ecdfbb 17962done # for ac_tag
c906108c 17963
bec39cab 17964
81ecdfbb 17965as_fn_exit 0
bec39cab 17966_ACEOF
bec39cab
AC
17967ac_clean_files=$ac_clean_files_save
17968
81ecdfbb
RW
17969test $ac_write_fail = 0 ||
17970 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
17971
bec39cab
AC
17972
17973# configure is writing to config.log, and then calls config.status.
17974# config.status does its own redirection, appending to config.log.
17975# Unfortunately, on DOS this fails, as config.log is still kept open
17976# by configure, so config.status won't be able to write to it; its
17977# output is simply discarded. So we exec the FD to /dev/null,
17978# effectively closing config.log, so it can be properly (re)opened and
17979# appended to by config.status. When coming back to configure, we
17980# need to make the FD available again.
17981if test "$no_create" != yes; then
17982 ac_cs_success=:
17983 ac_config_status_args=
17984 test "$silent" = yes &&
17985 ac_config_status_args="$ac_config_status_args --quiet"
17986 exec 5>/dev/null
17987 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
17988 exec 5>>config.log
17989 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17990 # would make configure fail if this is the last instruction.
81ecdfbb 17991 $ac_cs_success || as_fn_exit $?
bec39cab 17992fi
c906108c 17993
bec39cab 17994#
81ecdfbb 17995# CONFIG_SUBDIRS section.
bec39cab 17996#
c906108c
SS
17997if test "$no_recursion" != yes; then
17998
81ecdfbb
RW
17999 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
18000 # so they do not pile up.
c906108c
SS
18001 ac_sub_configure_args=
18002 ac_prev=
fdc59709
PB
18003 eval "set x $ac_configure_args"
18004 shift
18005 for ac_arg
18006 do
c906108c
SS
18007 if test -n "$ac_prev"; then
18008 ac_prev=
18009 continue
18010 fi
bec39cab 18011 case $ac_arg in
c906108c
SS
18012 -cache-file | --cache-file | --cache-fil | --cache-fi \
18013 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
18014 ac_prev=cache_file ;;
18015 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
bec39cab
AC
18016 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
18017 | --c=*)
18018 ;;
18019 --config-cache | -C)
c906108c
SS
18020 ;;
18021 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
18022 ac_prev=srcdir ;;
18023 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
18024 ;;
bec39cab
AC
18025 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
18026 ac_prev=prefix ;;
18027 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
18028 ;;
81ecdfbb
RW
18029 --disable-option-checking)
18030 ;;
fdc59709
PB
18031 *)
18032 case $ac_arg in
81ecdfbb 18033 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 18034 esac
81ecdfbb 18035 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
c906108c
SS
18036 esac
18037 done
18038
bec39cab
AC
18039 # Always prepend --prefix to ensure using the same prefix
18040 # in subdir configurations.
fdc59709
PB
18041 ac_arg="--prefix=$prefix"
18042 case $ac_arg in
81ecdfbb 18043 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 18044 esac
81ecdfbb
RW
18045 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
18046
18047 # Pass --silent
18048 if test "$silent" = yes; then
18049 ac_sub_configure_args="--silent $ac_sub_configure_args"
18050 fi
18051
18052 # Always prepend --disable-option-checking to silence warnings, since
18053 # different subdirs can have different --enable and --with options.
18054 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
bec39cab 18055
b4e70030 18056 ac_popdir=`pwd`
bec39cab 18057 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
c906108c
SS
18058
18059 # Do not complain, so a configure script can configure whichever
18060 # parts of a large source tree are present.
fdc59709 18061 test -d "$srcdir/$ac_dir" || continue
c906108c 18062
81ecdfbb
RW
18063 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
18064 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
18065 $as_echo "$ac_msg" >&6
18066 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
18067 ac_builddir=.
18068
81ecdfbb
RW
18069case "$ac_dir" in
18070.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18071*)
18072 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
18073 # A ".." for each directory in $ac_dir_suffix.
18074 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
18075 case $ac_top_builddir_sub in
18076 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18077 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18078 esac ;;
18079esac
18080ac_abs_top_builddir=$ac_pwd
18081ac_abs_builddir=$ac_pwd$ac_dir_suffix
18082# for backward compatibility:
18083ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
18084
18085case $srcdir in
81ecdfbb 18086 .) # We are building in place.
bec39cab 18087 ac_srcdir=.
81ecdfbb
RW
18088 ac_top_srcdir=$ac_top_builddir_sub
18089 ac_abs_top_srcdir=$ac_pwd ;;
18090 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 18091 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
18092 ac_top_srcdir=$srcdir
18093 ac_abs_top_srcdir=$srcdir ;;
18094 *) # Relative name.
18095 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18096 ac_top_srcdir=$ac_top_build_prefix$srcdir
18097 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 18098esac
81ecdfbb 18099ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
c906108c 18100
c906108c 18101
fdc59709 18102 cd "$ac_dir"
c906108c
SS
18103
18104 # Check for guested configure; otherwise get Cygnus style configure.
fdc59709
PB
18105 if test -f "$ac_srcdir/configure.gnu"; then
18106 ac_sub_configure=$ac_srcdir/configure.gnu
18107 elif test -f "$ac_srcdir/configure"; then
18108 ac_sub_configure=$ac_srcdir/configure
18109 elif test -f "$ac_srcdir/configure.in"; then
18110 # This should be Cygnus configure.
18111 ac_sub_configure=$ac_aux_dir/configure
c906108c 18112 else
81ecdfbb
RW
18113 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
18114$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
c906108c
SS
18115 ac_sub_configure=
18116 fi
18117
18118 # The recursion is here.
18119 if test -n "$ac_sub_configure"; then
c906108c 18120 # Make the cache file name correct relative to the subdirectory.
bec39cab
AC
18121 case $cache_file in
18122 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
81ecdfbb
RW
18123 *) # Relative name.
18124 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
c906108c 18125 esac
c906108c 18126
81ecdfbb
RW
18127 { $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
18128$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
c906108c 18129 # The eval makes quoting arguments work.
fdc59709
PB
18130 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
18131 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
81ecdfbb 18132 as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
c906108c
SS
18133 fi
18134
fdc59709 18135 cd "$ac_popdir"
c906108c
SS
18136 done
18137fi
81ecdfbb
RW
18138if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
18139 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
18140$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
18141fi
c906108c 18142
This page took 3.689944 seconds and 4 git commands to generate.