Implement catch syscall group
[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
3bc3d82a 1506 --enable-build-with-cxx build with C++ compiler instead of C compiler
a1220294
TT
1507 --enable-targets=TARGETS
1508 alternative target configurations
c0993dbe 1509 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
bec39cab
AC
1510 --disable-gdbcli disable command-line interface (CLI)
1511 --disable-gdbmi disable machine-interface (MI)
1512 --enable-tui enable full-screen terminal user interface (TUI)
1513 --enable-gdbtk enable gdbtk graphical user interface (GUI)
1514 --enable-profiling enable profiling of GDB
3841debe 1515 --disable-rpath do not hardcode runtime library paths
17ef446e 1516 --enable-libmcheck Try linking with -lmcheck if available
a1220294 1517 --enable-werror treat compile warnings as errors
32c1c914 1518 --enable-build-warnings enable build-time compiler warnings if gcc is used
a1220294 1519 --enable-gdb-build-warnings
32c1c914 1520 enable GDB specific build-time compiler warnings if
a1220294 1521 gcc is used
32c1c914 1522 --enable-sim link gdb with simulator
bec39cab 1523 --enable-multi-ice build the multi-ice-gdb-server
496c0e1b
JB
1524 --enable-gdbserver automatically build gdbserver (yes/no/auto, default
1525 is auto)
bec39cab
AC
1526
1527Optional Packages:
1528 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1529 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
a1220294 1530 --with-separate-debug-dir=PATH
32c1c914 1531 look for global separate debug info in this path
62e4f60c 1532 [LIBDIR/debug]
b14b1491
TT
1533 --with-gdb-datadir=PATH look for global separate data files in this path
1534 [DATADIR/gdb]
29b0e8a2 1535 --with-relocated-sources=PATH
32c1c914 1536 automatically relocate this path for source files
7349ff92 1537 --with-auto-load-dir=PATH
aff139ff 1538 directories from which to load auto-loaded scripts
1564a261 1539 [$debugdir:$datadir/auto-load]
bccbefd2 1540 --with-auto-load-safe-path=PATH
aff139ff 1541 directories safe to hold auto-loaded files
7349ff92 1542 [--with-auto-load-dir]
bccbefd2
JK
1543 --without-auto-load-safe-path
1544 do not restrict auto-loaded files locations
05e7c244 1545 --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets
cb01cfba
JB
1546 --with-curses use the curses library instead of the termcap
1547 library
c16158bc
JM
1548 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
1549 --with-bugurl=URL Direct users to URL to report a bug
711a72d3 1550 --with-system-zlib use installed libz
016a3251
DD
1551 --with-gnu-ld assume the C compiler uses GNU ld default=no
1552 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
1553 --without-libiconv-prefix don't search for libiconv in includedir and libdir
478aac75 1554 --with-iconv-bin=PATH specify where to find the iconv program
6a30b0a5 1555 --with-system-readline use installed readline library
b8e0a31c
SD
1556 --with-jit-reader-dir=PATH
1557 directory to load the JIT readers from
5c39566f 1558 --with-expat include expat support (auto/yes/no)
3841debe
DJ
1559 --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib
1560 --without-libexpat-prefix don't search for libexpat in includedir and libdir
0c4a4063
DE
1561 --with-python[=PYTHON] include python support
1562 (auto/yes/no/<python-program>)
ed3ef339
DE
1563 --with-guile[=GUILE] include guile support
1564 (auto/yes/no/<guile-version>/<pkg-config-program>)
bc504a31 1565 --with-intel-pt include Intel Processor Trace support (auto/yes/no)
58bfce93
MM
1566 --with-libipt-prefix[=DIR] search for libipt in DIR/include and DIR/lib
1567 --without-libipt-prefix don't search for libipt in includedir and libdir
a1220294
TT
1568 --without-included-regex
1569 don't use included regex; this is the default on
1570 systems with version 2 of the GNU C library (use
1571 with caution on other system)
81ecdfbb 1572 --with-sysroot[=DIR] search for usr/lib et al within DIR
b14b1491 1573 --with-system-gdbinit=PATH
32c1c914 1574 automatically load a system-wide gdbinit file
608e2dbb
TT
1575 --with-lzma support lzma compression (auto/yes/no)
1576 --with-liblzma-prefix[=DIR] search for liblzma in DIR/include and DIR/lib
1577 --without-liblzma-prefix don't search for liblzma in includedir and libdir
5062cc19
KS
1578 --with-tcl directory containing tcl configuration (tclConfig.sh)
1579 --with-tk directory containing tk configuration (tkConfig.sh)
bec39cab 1580 --with-x use the X Window System
393fd4c3
YQ
1581 --with-babeltrace include babeltrace support (auto/yes/no)
1582 --with-libbabeltrace-prefix[=DIR] search for libbabeltrace in DIR/include and DIR/lib
1583 --without-libbabeltrace-prefix don't search for libbabeltrace in includedir and libdir
bec39cab
AC
1584
1585Some influential environment variables:
1586 CC C compiler command
1587 CFLAGS C compiler flags
1588 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1589 nonstandard directory <lib dir>
81ecdfbb
RW
1590 LIBS libraries to pass to the linker, e.g. -l<library>
1591 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1592 you have headers in a nonstandard directory <include dir>
3bc3d82a
PA
1593 CXX C++ compiler command
1594 CXXFLAGS C++ compiler flags
bec39cab 1595 CPP C preprocessor
f06e05e0
JK
1596 MAKEINFO Parent configure detects if it is of sufficient version.
1597 MAKEINFOFLAGS
1598 Parameters for MAKEINFO.
81ecdfbb
RW
1599 YACC The `Yet Another C Compiler' implementation to use. Defaults to
1600 the first program found out of: `bison -y', `byacc', `yacc'.
1601 YFLAGS The list of arguments that will be passed by default to $YACC.
1602 This script will default YFLAGS to the empty string to avoid a
1603 default value of `-d' given by some make applications.
1604 XMKMF Path to xmkmf, Makefile generator for X Window System
bec39cab
AC
1605
1606Use these variables to override the choices made by `configure' or to help
1607it to find libraries and programs with nonstandard names/locations.
1608
81ecdfbb 1609Report bugs to the package provider.
bec39cab 1610_ACEOF
81ecdfbb 1611ac_status=$?
bec39cab
AC
1612fi
1613
1614if test "$ac_init_help" = "recursive"; then
1615 # If there are subdirs, report their specific --help.
bec39cab 1616 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
81ecdfbb
RW
1617 test -d "$ac_dir" ||
1618 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1619 continue
bec39cab
AC
1620 ac_builddir=.
1621
81ecdfbb
RW
1622case "$ac_dir" in
1623.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1624*)
1625 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1626 # A ".." for each directory in $ac_dir_suffix.
1627 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1628 case $ac_top_builddir_sub in
1629 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1630 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1631 esac ;;
1632esac
1633ac_abs_top_builddir=$ac_pwd
1634ac_abs_builddir=$ac_pwd$ac_dir_suffix
1635# for backward compatibility:
1636ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
1637
1638case $srcdir in
81ecdfbb 1639 .) # We are building in place.
bec39cab 1640 ac_srcdir=.
81ecdfbb
RW
1641 ac_top_srcdir=$ac_top_builddir_sub
1642 ac_abs_top_srcdir=$ac_pwd ;;
1643 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 1644 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
1645 ac_top_srcdir=$srcdir
1646 ac_abs_top_srcdir=$srcdir ;;
1647 *) # Relative name.
1648 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1649 ac_top_srcdir=$ac_top_build_prefix$srcdir
1650 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 1651esac
81ecdfbb 1652ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 1653
81ecdfbb
RW
1654 cd "$ac_dir" || { ac_status=$?; continue; }
1655 # Check for guested configure.
1656 if test -f "$ac_srcdir/configure.gnu"; then
1657 echo &&
1658 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1659 elif test -f "$ac_srcdir/configure"; then
1660 echo &&
1661 $SHELL "$ac_srcdir/configure" --help=recursive
3ace7edb 1662 else
81ecdfbb
RW
1663 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1664 fi || ac_status=$?
1665 cd "$ac_pwd" || { ac_status=$?; break; }
bec39cab
AC
1666 done
1667fi
1668
81ecdfbb 1669test -n "$ac_init_help" && exit $ac_status
bec39cab
AC
1670if $ac_init_version; then
1671 cat <<\_ACEOF
81ecdfbb
RW
1672configure
1673generated by GNU Autoconf 2.64
bec39cab 1674
81ecdfbb 1675Copyright (C) 2009 Free Software Foundation, Inc.
bec39cab
AC
1676This configure script is free software; the Free Software Foundation
1677gives unlimited permission to copy, distribute and modify it.
1678_ACEOF
81ecdfbb 1679 exit
bec39cab 1680fi
bec39cab 1681
81ecdfbb
RW
1682## ------------------------ ##
1683## Autoconf initialization. ##
1684## ------------------------ ##
bec39cab 1685
81ecdfbb
RW
1686# ac_fn_c_try_compile LINENO
1687# --------------------------
1688# Try to compile conftest.$ac_ext, and return whether this succeeded.
1689ac_fn_c_try_compile ()
1690{
1691 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1692 rm -f conftest.$ac_objext
1693 if { { ac_try="$ac_compile"
1694case "(($ac_try" in
1695 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1696 *) ac_try_echo=$ac_try;;
1697esac
1698eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1699$as_echo "$ac_try_echo"; } >&5
1700 (eval "$ac_compile") 2>conftest.err
1701 ac_status=$?
1702 if test -s conftest.err; then
1703 grep -v '^ *+' conftest.err >conftest.er1
1704 cat conftest.er1 >&5
1705 mv -f conftest.er1 conftest.err
1706 fi
1707 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1708 test $ac_status = 0; } && {
1709 test -z "$ac_c_werror_flag" ||
1710 test ! -s conftest.err
1711 } && test -s conftest.$ac_objext; then :
1712 ac_retval=0
1713else
1714 $as_echo "$as_me: failed program was:" >&5
1715sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1716
81ecdfbb
RW
1717 ac_retval=1
1718fi
1719 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1720 return $ac_retval
1721
1722} # ac_fn_c_try_compile
1723
3bc3d82a
PA
1724# ac_fn_cxx_try_compile LINENO
1725# ----------------------------
1726# Try to compile conftest.$ac_ext, and return whether this succeeded.
1727ac_fn_cxx_try_compile ()
1728{
1729 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1730 rm -f conftest.$ac_objext
1731 if { { ac_try="$ac_compile"
1732case "(($ac_try" in
1733 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1734 *) ac_try_echo=$ac_try;;
1735esac
1736eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1737$as_echo "$ac_try_echo"; } >&5
1738 (eval "$ac_compile") 2>conftest.err
1739 ac_status=$?
1740 if test -s conftest.err; then
1741 grep -v '^ *+' conftest.err >conftest.er1
1742 cat conftest.er1 >&5
1743 mv -f conftest.er1 conftest.err
1744 fi
1745 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1746 test $ac_status = 0; } && {
1747 test -z "$ac_cxx_werror_flag" ||
1748 test ! -s conftest.err
1749 } && test -s conftest.$ac_objext; then :
1750 ac_retval=0
1751else
1752 $as_echo "$as_me: failed program was:" >&5
1753sed 's/^/| /' conftest.$ac_ext >&5
1754
1755 ac_retval=1
1756fi
1757 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1758 return $ac_retval
1759
1760} # ac_fn_cxx_try_compile
1761
81ecdfbb
RW
1762# ac_fn_c_try_cpp LINENO
1763# ----------------------
1764# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1765ac_fn_c_try_cpp ()
bec39cab 1766{
81ecdfbb
RW
1767 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1768 if { { ac_try="$ac_cpp conftest.$ac_ext"
1769case "(($ac_try" in
1770 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1771 *) ac_try_echo=$ac_try;;
1772esac
1773eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1774$as_echo "$ac_try_echo"; } >&5
1775 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1776 ac_status=$?
1777 if test -s conftest.err; then
1778 grep -v '^ *+' conftest.err >conftest.er1
1779 cat conftest.er1 >&5
1780 mv -f conftest.er1 conftest.err
1781 fi
1782 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1783 test $ac_status = 0; } >/dev/null && {
1784 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1785 test ! -s conftest.err
1786 }; then :
1787 ac_retval=0
1788else
1789 $as_echo "$as_me: failed program was:" >&5
1790sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1791
81ecdfbb
RW
1792 ac_retval=1
1793fi
1794 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1795 return $ac_retval
bec39cab 1796
81ecdfbb 1797} # ac_fn_c_try_cpp
bec39cab 1798
81ecdfbb
RW
1799# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1800# -------------------------------------------------------
1801# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1802# the include files in INCLUDES and setting the cache variable VAR
1803# accordingly.
1804ac_fn_c_check_header_mongrel ()
1805{
1806 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1807 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1809$as_echo_n "checking for $2... " >&6; }
1810if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1811 $as_echo_n "(cached) " >&6
1812fi
1813eval ac_res=\$$3
1814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1815$as_echo "$ac_res" >&6; }
1816else
1817 # Is the header compilable?
1818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1819$as_echo_n "checking $2 usability... " >&6; }
1820cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1821/* end confdefs.h. */
1822$4
1823#include <$2>
1824_ACEOF
1825if ac_fn_c_try_compile "$LINENO"; then :
1826 ac_header_compiler=yes
1827else
1828 ac_header_compiler=no
1829fi
1830rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1832$as_echo "$ac_header_compiler" >&6; }
bec39cab 1833
81ecdfbb
RW
1834# Is the header present?
1835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1836$as_echo_n "checking $2 presence... " >&6; }
1837cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1838/* end confdefs.h. */
1839#include <$2>
1840_ACEOF
1841if ac_fn_c_try_cpp "$LINENO"; then :
1842 ac_header_preproc=yes
1843else
1844 ac_header_preproc=no
1845fi
1846rm -f conftest.err conftest.$ac_ext
1847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1848$as_echo "$ac_header_preproc" >&6; }
bec39cab 1849
81ecdfbb
RW
1850# So? What about this header?
1851case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1852 yes:no: )
1853 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1854$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1855 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1856$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1857 ;;
1858 no:yes:* )
1859 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1860$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1861 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1862$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1863 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1864$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1865 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1866$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1867 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1868$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1869 ;;
1870esac
1871 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1872$as_echo_n "checking for $2... " >&6; }
1873if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1874 $as_echo_n "(cached) " >&6
1875else
1876 eval "$3=\$ac_header_compiler"
1877fi
1878eval ac_res=\$$3
1879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1880$as_echo "$ac_res" >&6; }
1881fi
1882 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 1883
81ecdfbb 1884} # ac_fn_c_check_header_mongrel
bec39cab 1885
81ecdfbb
RW
1886# ac_fn_c_try_run LINENO
1887# ----------------------
1888# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1889# that executables *can* be run.
1890ac_fn_c_try_run ()
1891{
1892 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1893 if { { ac_try="$ac_link"
1894case "(($ac_try" in
1895 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1896 *) ac_try_echo=$ac_try;;
1897esac
1898eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1899$as_echo "$ac_try_echo"; } >&5
1900 (eval "$ac_link") 2>&5
1901 ac_status=$?
1902 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1903 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1904 { { case "(($ac_try" in
1905 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1906 *) ac_try_echo=$ac_try;;
1907esac
1908eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1909$as_echo "$ac_try_echo"; } >&5
1910 (eval "$ac_try") 2>&5
1911 ac_status=$?
1912 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1913 test $ac_status = 0; }; }; then :
1914 ac_retval=0
1915else
1916 $as_echo "$as_me: program exited with status $ac_status" >&5
1917 $as_echo "$as_me: failed program was:" >&5
1918sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1919
81ecdfbb
RW
1920 ac_retval=$ac_status
1921fi
1922 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1923 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1924 return $ac_retval
bec39cab 1925
81ecdfbb 1926} # ac_fn_c_try_run
bec39cab 1927
81ecdfbb
RW
1928# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1929# -------------------------------------------------------
1930# Tests whether HEADER exists and can be compiled using the include files in
1931# INCLUDES, setting the cache variable VAR accordingly.
1932ac_fn_c_check_header_compile ()
1933{
1934 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1936$as_echo_n "checking for $2... " >&6; }
1937if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1938 $as_echo_n "(cached) " >&6
1939else
1940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1941/* end confdefs.h. */
1942$4
1943#include <$2>
bec39cab 1944_ACEOF
81ecdfbb
RW
1945if ac_fn_c_try_compile "$LINENO"; then :
1946 eval "$3=yes"
1947else
1948 eval "$3=no"
1949fi
1950rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1951fi
1952eval ac_res=\$$3
1953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1954$as_echo "$ac_res" >&6; }
1955 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 1956
81ecdfbb 1957} # ac_fn_c_check_header_compile
bec39cab 1958
2974be62
AM
1959# ac_fn_c_try_link LINENO
1960# -----------------------
1961# Try to link conftest.$ac_ext, and return whether this succeeded.
1962ac_fn_c_try_link ()
1963{
1964 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1965 rm -f conftest.$ac_objext conftest$ac_exeext
1966 if { { ac_try="$ac_link"
1967case "(($ac_try" in
1968 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1969 *) ac_try_echo=$ac_try;;
1970esac
1971eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1972$as_echo "$ac_try_echo"; } >&5
1973 (eval "$ac_link") 2>conftest.err
1974 ac_status=$?
1975 if test -s conftest.err; then
1976 grep -v '^ *+' conftest.err >conftest.er1
1977 cat conftest.er1 >&5
1978 mv -f conftest.er1 conftest.err
1979 fi
1980 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1981 test $ac_status = 0; } && {
1982 test -z "$ac_c_werror_flag" ||
1983 test ! -s conftest.err
1984 } && test -s conftest$ac_exeext && {
1985 test "$cross_compiling" = yes ||
1986 $as_test_x conftest$ac_exeext
1987 }; then :
1988 ac_retval=0
1989else
1990 $as_echo "$as_me: failed program was:" >&5
1991sed 's/^/| /' conftest.$ac_ext >&5
1992
1993 ac_retval=1
1994fi
1995 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1996 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1997 # interfere with the next link command; also delete a directory that is
1998 # left behind by Apple's compiler. We do this before executing the actions.
1999 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2000 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2001 return $ac_retval
2002
2003} # ac_fn_c_try_link
2004
81ecdfbb
RW
2005# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2006# --------------------------------------------
2007# Tries to find the compile-time value of EXPR in a program that includes
2008# INCLUDES, setting VAR accordingly. Returns whether the value could be
2009# computed
2010ac_fn_c_compute_int ()
2011{
2012 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2013 if test "$cross_compiling" = yes; then
2014 # Depending upon the size, compute the lo and hi bounds.
2015cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2016/* end confdefs.h. */
2017$4
2018int
2019main ()
2020{
2021static int test_array [1 - 2 * !(($2) >= 0)];
2022test_array [0] = 0
bec39cab 2023
81ecdfbb
RW
2024 ;
2025 return 0;
2026}
2027_ACEOF
2028if ac_fn_c_try_compile "$LINENO"; then :
2029 ac_lo=0 ac_mid=0
2030 while :; do
2031 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2032/* end confdefs.h. */
2033$4
2034int
2035main ()
2036{
2037static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2038test_array [0] = 0
bec39cab 2039
81ecdfbb
RW
2040 ;
2041 return 0;
2042}
2043_ACEOF
2044if ac_fn_c_try_compile "$LINENO"; then :
2045 ac_hi=$ac_mid; break
2046else
2047 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2048 if test $ac_lo -le $ac_mid; then
2049 ac_lo= ac_hi=
2050 break
2051 fi
2052 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
c906108c 2053fi
81ecdfbb
RW
2054rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2055 done
c906108c 2056else
81ecdfbb
RW
2057 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2058/* end confdefs.h. */
2059$4
2060int
2061main ()
2062{
2063static int test_array [1 - 2 * !(($2) < 0)];
2064test_array [0] = 0
bec39cab 2065
81ecdfbb
RW
2066 ;
2067 return 0;
2068}
2069_ACEOF
2070if ac_fn_c_try_compile "$LINENO"; then :
2071 ac_hi=-1 ac_mid=-1
2072 while :; do
2073 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2074/* end confdefs.h. */
2075$4
2076int
2077main ()
2078{
2079static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2080test_array [0] = 0
bec39cab 2081
81ecdfbb
RW
2082 ;
2083 return 0;
2084}
2085_ACEOF
2086if ac_fn_c_try_compile "$LINENO"; then :
2087 ac_lo=$ac_mid; break
2088else
2089 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2090 if test $ac_mid -le $ac_hi; then
2091 ac_lo= ac_hi=
2092 break
2093 fi
2094 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2095fi
2096rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2097 done
2098else
2099 ac_lo= ac_hi=
2100fi
2101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2102fi
2103rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2104# Binary search between lo and hi bounds.
2105while test "x$ac_lo" != "x$ac_hi"; do
2106 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2108/* end confdefs.h. */
2109$4
2110int
2111main ()
2112{
2113static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2114test_array [0] = 0
bec39cab 2115
81ecdfbb
RW
2116 ;
2117 return 0;
2118}
2119_ACEOF
2120if ac_fn_c_try_compile "$LINENO"; then :
2121 ac_hi=$ac_mid
2122else
2123 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2124fi
2125rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2126done
2127case $ac_lo in #((
2128?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2129'') ac_retval=1 ;;
2130esac
2131 else
2132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2133/* end confdefs.h. */
2134$4
2135static long int longval () { return $2; }
2136static unsigned long int ulongval () { return $2; }
2137#include <stdio.h>
2138#include <stdlib.h>
2139int
2140main ()
2141{
bec39cab 2142
81ecdfbb
RW
2143 FILE *f = fopen ("conftest.val", "w");
2144 if (! f)
2145 return 1;
2146 if (($2) < 0)
2147 {
2148 long int i = longval ();
2149 if (i != ($2))
2150 return 1;
2151 fprintf (f, "%ld", i);
2152 }
2153 else
2154 {
2155 unsigned long int i = ulongval ();
2156 if (i != ($2))
2157 return 1;
2158 fprintf (f, "%lu", i);
2159 }
2160 /* Do not output a trailing newline, as this causes \r\n confusion
2161 on some platforms. */
2162 return ferror (f) || fclose (f) != 0;
bec39cab 2163
81ecdfbb
RW
2164 ;
2165 return 0;
2166}
2167_ACEOF
2168if ac_fn_c_try_run "$LINENO"; then :
2169 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2170else
2171 ac_retval=1
2172fi
2173rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2174 conftest.$ac_objext conftest.beam conftest.$ac_ext
2175rm -f conftest.val
bec39cab 2176
81ecdfbb
RW
2177 fi
2178 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2179 return $ac_retval
bec39cab 2180
81ecdfbb 2181} # ac_fn_c_compute_int
bec39cab 2182
55a8c076
YQ
2183# ac_fn_c_check_func LINENO FUNC VAR
2184# ----------------------------------
2185# Tests whether FUNC exists, setting the cache variable VAR accordingly
2186ac_fn_c_check_func ()
81ecdfbb
RW
2187{
2188 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2190$as_echo_n "checking for $2... " >&6; }
2191if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2192 $as_echo_n "(cached) " >&6
2193else
81ecdfbb
RW
2194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2195/* end confdefs.h. */
55a8c076
YQ
2196/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2197 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2198#define $2 innocuous_$2
2199
2200/* System header to define __stub macros and hopefully few prototypes,
2201 which can conflict with char $2 (); below.
2202 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2203 <limits.h> exists even on freestanding compilers. */
2204
2205#ifdef __STDC__
2206# include <limits.h>
2207#else
2208# include <assert.h>
2209#endif
2210
2211#undef $2
2212
2213/* Override any GCC internal prototype to avoid an error.
2214 Use char because int might match the return type of a GCC
2215 builtin and then its argument prototype would still apply. */
2216#ifdef __cplusplus
2217extern "C"
2218#endif
2219char $2 ();
2220/* The GNU C library defines this for functions which it implements
2221 to always fail with ENOSYS. Some functions are actually named
2222 something starting with __ and the normal name is an alias. */
2223#if defined __stub_$2 || defined __stub___$2
2224choke me
2225#endif
2226
2227int
2228main ()
2229{
2230return $2 ();
2231 ;
2232 return 0;
2233}
2234_ACEOF
2235if ac_fn_c_try_link "$LINENO"; then :
2236 eval "$3=yes"
2237else
2238 eval "$3=no"
2239fi
2240rm -f core conftest.err conftest.$ac_objext \
2241 conftest$ac_exeext conftest.$ac_ext
2242fi
2243eval ac_res=\$$3
2244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2245$as_echo "$ac_res" >&6; }
2246 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2247
2248} # ac_fn_c_check_func
2249
07697489
PA
2250# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2251# -------------------------------------------
2252# Tests whether TYPE exists after having included INCLUDES, setting cache
2253# variable VAR accordingly.
2254ac_fn_c_check_type ()
2255{
2256 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2257 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2258$as_echo_n "checking for $2... " >&6; }
2259if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2260 $as_echo_n "(cached) " >&6
2261else
2262 eval "$3=no"
2263 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2264/* end confdefs.h. */
2265$4
2266int
2267main ()
2268{
2269if (sizeof ($2))
2270 return 0;
2271 ;
2272 return 0;
2273}
2274_ACEOF
2275if ac_fn_c_try_compile "$LINENO"; then :
2276 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2277/* end confdefs.h. */
2278$4
2279int
2280main ()
2281{
2282if (sizeof (($2)))
2283 return 0;
2284 ;
2285 return 0;
2286}
2287_ACEOF
2288if ac_fn_c_try_compile "$LINENO"; then :
2289
2290else
2291 eval "$3=yes"
2292fi
2293rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2294fi
2295rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2296fi
2297eval ac_res=\$$3
2298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2299$as_echo "$ac_res" >&6; }
2300 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2301
2302} # ac_fn_c_check_type
2303
770d76d7
PA
2304# ac_fn_c_check_decl LINENO SYMBOL VAR
2305# ------------------------------------
2306# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2307ac_fn_c_check_decl ()
2308{
2309 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2310 as_decl_name=`echo $2|sed 's/ *(.*//'`
2311 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2312 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2313$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2314if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2315 $as_echo_n "(cached) " >&6
2316else
2317 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2318/* end confdefs.h. */
2319$4
2320int
2321main ()
2322{
2323#ifndef $as_decl_name
2324#ifdef __cplusplus
2325 (void) $as_decl_use;
2326#else
2327 (void) $as_decl_name;
2328#endif
2329#endif
2330
2331 ;
2332 return 0;
2333}
2334_ACEOF
2335if ac_fn_c_try_compile "$LINENO"; then :
2336 eval "$3=yes"
2337else
2338 eval "$3=no"
2339fi
2340rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2341fi
2342eval ac_res=\$$3
2343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2344$as_echo "$ac_res" >&6; }
2345 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2346
2347} # ac_fn_c_check_decl
2348
55a8c076
YQ
2349# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2350# ----------------------------------------------------
2351# Tries to find if the field MEMBER exists in type AGGR, after including
2352# INCLUDES, setting cache variable VAR accordingly.
2353ac_fn_c_check_member ()
2354{
2355 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2356 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2357$as_echo_n "checking for $2.$3... " >&6; }
2358if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
2359 $as_echo_n "(cached) " >&6
2360else
2361 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2362/* end confdefs.h. */
2363$5
2364int
2365main ()
2366{
2367static $2 ac_aggr;
2368if (ac_aggr.$3)
2369return 0;
2370 ;
2371 return 0;
2372}
2373_ACEOF
2374if ac_fn_c_try_compile "$LINENO"; then :
2375 eval "$4=yes"
2376else
2377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2378/* end confdefs.h. */
2379$5
2380int
2381main ()
2382{
2383static $2 ac_aggr;
2384if (sizeof ac_aggr.$3)
2385return 0;
2386 ;
2387 return 0;
2388}
2389_ACEOF
2390if ac_fn_c_try_compile "$LINENO"; then :
2391 eval "$4=yes"
2392else
2393 eval "$4=no"
2394fi
2395rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2396fi
2397rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2398fi
2399eval ac_res=\$$4
2400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2401$as_echo "$ac_res" >&6; }
2402 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2403
2404} # ac_fn_c_check_member
81ecdfbb
RW
2405cat >config.log <<_ACEOF
2406This file contains any messages produced by compilers while
2407running configure, to aid debugging if configure makes a mistake.
d5af19ba 2408
81ecdfbb
RW
2409It was created by $as_me, which was
2410generated by GNU Autoconf 2.64. Invocation command line was
b4e70030 2411
81ecdfbb 2412 $ $0 $@
413ccac7 2413
81ecdfbb
RW
2414_ACEOF
2415exec 5>>config.log
2416{
2417cat <<_ASUNAME
2418## --------- ##
2419## Platform. ##
2420## --------- ##
413ccac7 2421
81ecdfbb
RW
2422hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2423uname -m = `(uname -m) 2>/dev/null || echo unknown`
2424uname -r = `(uname -r) 2>/dev/null || echo unknown`
2425uname -s = `(uname -s) 2>/dev/null || echo unknown`
2426uname -v = `(uname -v) 2>/dev/null || echo unknown`
85981d60 2427
81ecdfbb
RW
2428/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2429/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
413ccac7 2430
81ecdfbb
RW
2431/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2432/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2433/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2434/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2435/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2436/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2437/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
c906108c 2438
81ecdfbb 2439_ASUNAME
bec39cab 2440
bec39cab
AC
2441as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2442for as_dir in $PATH
2443do
2444 IFS=$as_save_IFS
2445 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2446 $as_echo "PATH: $as_dir"
2447 done
2448IFS=$as_save_IFS
bec39cab 2449
81ecdfbb 2450} >&5
bec39cab 2451
81ecdfbb 2452cat >&5 <<_ACEOF
bec39cab 2453
bec39cab 2454
81ecdfbb
RW
2455## ----------- ##
2456## Core tests. ##
2457## ----------- ##
2458
2459_ACEOF
2460
2461
2462# Keep a trace of the command line.
2463# Strip out --no-create and --no-recursion so they do not pile up.
2464# Strip out --silent because we don't want to record it for future runs.
2465# Also quote any args containing shell meta-characters.
2466# Make two passes to allow for proper duplicate-argument suppression.
2467ac_configure_args=
2468ac_configure_args0=
2469ac_configure_args1=
2470ac_must_keep_next=false
2471for ac_pass in 1 2
2472do
2473 for ac_arg
2474 do
2475 case $ac_arg in
2476 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2477 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2478 | -silent | --silent | --silen | --sile | --sil)
2479 continue ;;
2480 *\'*)
2481 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2482 esac
2483 case $ac_pass in
2484 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2485 2)
2486 as_fn_append ac_configure_args1 " '$ac_arg'"
2487 if test $ac_must_keep_next = true; then
2488 ac_must_keep_next=false # Got value, back to normal.
2489 else
2490 case $ac_arg in
2491 *=* | --config-cache | -C | -disable-* | --disable-* \
2492 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2493 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2494 | -with-* | --with-* | -without-* | --without-* | --x)
2495 case "$ac_configure_args0 " in
2496 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2497 esac
2498 ;;
2499 -* ) ac_must_keep_next=true ;;
2500 esac
2501 fi
2502 as_fn_append ac_configure_args " '$ac_arg'"
2503 ;;
2504 esac
2505 done
2506done
2507{ ac_configure_args0=; unset ac_configure_args0;}
2508{ ac_configure_args1=; unset ac_configure_args1;}
2509
2510# When interrupted or exit'd, cleanup temporary files, and complete
2511# config.log. We remove comments because anyway the quotes in there
2512# would cause problems or look ugly.
2513# WARNING: Use '\'' to represent an apostrophe within the trap.
2514# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2515trap 'exit_status=$?
2516 # Save into config.log some information that might help in debugging.
2517 {
2518 echo
2519
2520 cat <<\_ASBOX
2521## ---------------- ##
2522## Cache variables. ##
2523## ---------------- ##
2524_ASBOX
2525 echo
2526 # The following way of writing the cache mishandles newlines in values,
2527(
2528 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2529 eval ac_val=\$$ac_var
2530 case $ac_val in #(
2531 *${as_nl}*)
2532 case $ac_var in #(
2533 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2534$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2535 esac
2536 case $ac_var in #(
2537 _ | IFS | as_nl) ;; #(
2538 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2539 *) { eval $ac_var=; unset $ac_var;} ;;
2540 esac ;;
2541 esac
2542 done
2543 (set) 2>&1 |
2544 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2545 *${as_nl}ac_space=\ *)
2546 sed -n \
2547 "s/'\''/'\''\\\\'\'''\''/g;
2548 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2549 ;; #(
2550 *)
2551 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2552 ;;
2553 esac |
2554 sort
2555)
2556 echo
2557
2558 cat <<\_ASBOX
2559## ----------------- ##
2560## Output variables. ##
2561## ----------------- ##
2562_ASBOX
2563 echo
2564 for ac_var in $ac_subst_vars
2565 do
2566 eval ac_val=\$$ac_var
2567 case $ac_val in
2568 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2569 esac
2570 $as_echo "$ac_var='\''$ac_val'\''"
2571 done | sort
2572 echo
2573
2574 if test -n "$ac_subst_files"; then
2575 cat <<\_ASBOX
2576## ------------------- ##
2577## File substitutions. ##
2578## ------------------- ##
2579_ASBOX
2580 echo
2581 for ac_var in $ac_subst_files
2582 do
2583 eval ac_val=\$$ac_var
2584 case $ac_val in
2585 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2586 esac
2587 $as_echo "$ac_var='\''$ac_val'\''"
2588 done | sort
2589 echo
2590 fi
2591
2592 if test -s confdefs.h; then
2593 cat <<\_ASBOX
2594## ----------- ##
2595## confdefs.h. ##
2596## ----------- ##
2597_ASBOX
2598 echo
2599 cat confdefs.h
2600 echo
2601 fi
2602 test "$ac_signal" != 0 &&
2603 $as_echo "$as_me: caught signal $ac_signal"
2604 $as_echo "$as_me: exit $exit_status"
2605 } >&5
2606 rm -f core *.core core.conftest.* &&
2607 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2608 exit $exit_status
2609' 0
2610for ac_signal in 1 2 13 15; do
2611 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2612done
2613ac_signal=0
2614
2615# confdefs.h avoids OS command line length limits that DEFS can exceed.
2616rm -f -r conftest* confdefs.h
2617
2618$as_echo "/* confdefs.h */" > confdefs.h
2619
2620# Predefined preprocessor variables.
2621
2622cat >>confdefs.h <<_ACEOF
2623#define PACKAGE_NAME "$PACKAGE_NAME"
2624_ACEOF
2625
2626cat >>confdefs.h <<_ACEOF
2627#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2628_ACEOF
2629
2630cat >>confdefs.h <<_ACEOF
2631#define PACKAGE_VERSION "$PACKAGE_VERSION"
2632_ACEOF
2633
2634cat >>confdefs.h <<_ACEOF
2635#define PACKAGE_STRING "$PACKAGE_STRING"
2636_ACEOF
2637
2638cat >>confdefs.h <<_ACEOF
2639#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2640_ACEOF
2641
2642cat >>confdefs.h <<_ACEOF
2643#define PACKAGE_URL "$PACKAGE_URL"
2644_ACEOF
2645
2646
2647# Let the site file select an alternate cache file if it wants to.
2648# Prefer an explicitly selected file to automatically selected ones.
2649ac_site_file1=NONE
2650ac_site_file2=NONE
2651if test -n "$CONFIG_SITE"; then
2652 ac_site_file1=$CONFIG_SITE
2653elif test "x$prefix" != xNONE; then
2654 ac_site_file1=$prefix/share/config.site
2655 ac_site_file2=$prefix/etc/config.site
2656else
2657 ac_site_file1=$ac_default_prefix/share/config.site
2658 ac_site_file2=$ac_default_prefix/etc/config.site
2659fi
2660for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2661do
2662 test "x$ac_site_file" = xNONE && continue
2663 if test -r "$ac_site_file"; then
2664 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2665$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2666 sed 's/^/| /' "$ac_site_file" >&5
2667 . "$ac_site_file"
2668 fi
2669done
2670
2671if test -r "$cache_file"; then
2672 # Some versions of bash will fail to source /dev/null (special
2673 # files actually), so we avoid doing that.
2674 if test -f "$cache_file"; then
2675 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2676$as_echo "$as_me: loading cache $cache_file" >&6;}
2677 case $cache_file in
2678 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2679 *) . "./$cache_file";;
2680 esac
2681 fi
2682else
2683 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2684$as_echo "$as_me: creating cache $cache_file" >&6;}
2685 >$cache_file
bec39cab
AC
2686fi
2687
81ecdfbb
RW
2688# Check that the precious variables saved in the cache have kept the same
2689# value.
2690ac_cache_corrupted=false
2691for ac_var in $ac_precious_vars; do
2692 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2693 eval ac_new_set=\$ac_env_${ac_var}_set
2694 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2695 eval ac_new_val=\$ac_env_${ac_var}_value
2696 case $ac_old_set,$ac_new_set in
2697 set,)
2698 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2699$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2700 ac_cache_corrupted=: ;;
2701 ,set)
2702 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2703$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2704 ac_cache_corrupted=: ;;
2705 ,);;
2706 *)
2707 if test "x$ac_old_val" != "x$ac_new_val"; then
2708 # differences in whitespace do not lead to failure.
2709 ac_old_val_w=`echo x $ac_old_val`
2710 ac_new_val_w=`echo x $ac_new_val`
2711 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2712 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2713$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2714 ac_cache_corrupted=:
2715 else
2716 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2717$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2718 eval $ac_var=\$ac_old_val
2719 fi
2720 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2721$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2722 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2723$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2724 fi;;
2725 esac
2726 # Pass precious variables to config.status.
2727 if test "$ac_new_set" = set; then
2728 case $ac_new_val in
2729 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2730 *) ac_arg=$ac_var=$ac_new_val ;;
2731 esac
2732 case " $ac_configure_args " in
2733 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2734 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2735 esac
2736 fi
2737done
2738if $ac_cache_corrupted; then
2739 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2740$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2741 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2742$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2743 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2744fi
2745## -------------------- ##
2746## Main body of script. ##
2747## -------------------- ##
2748
2749ac_ext=c
2750ac_cpp='$CPP $CPPFLAGS'
2751ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2752ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2753ac_compiler_gnu=$ac_cv_c_compiler_gnu
2754
2755
2756
2757
2758
2759ac_config_headers="$ac_config_headers config.h:config.in"
2760
2761
2762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2763$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2764 # Check whether --enable-maintainer-mode was given.
2765if test "${enable_maintainer_mode+set}" = set; then :
2766 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2767else
2768 USE_MAINTAINER_MODE=no
2769fi
2770
2771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
2772$as_echo "$USE_MAINTAINER_MODE" >&6; }
2773 if test $USE_MAINTAINER_MODE = yes; then
2774 MAINTAINER_MODE_TRUE=
2775 MAINTAINER_MODE_FALSE='#'
2776else
2777 MAINTAINER_MODE_TRUE='#'
2778 MAINTAINER_MODE_FALSE=
2779fi
2780
2781 MAINT=$MAINTAINER_MODE_TRUE
2782
2783
2784
17ef446e 2785# Set the 'development' global.
270c9937 2786. $srcdir/../bfd/development.sh
f5f1cdb6 2787
81ecdfbb
RW
2788ac_ext=c
2789ac_cpp='$CPP $CPPFLAGS'
2790ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2791ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2792ac_compiler_gnu=$ac_cv_c_compiler_gnu
2793if test -n "$ac_tool_prefix"; then
2794 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2795set dummy ${ac_tool_prefix}gcc; ac_word=$2
2796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2797$as_echo_n "checking for $ac_word... " >&6; }
2798if test "${ac_cv_prog_CC+set}" = set; then :
2799 $as_echo_n "(cached) " >&6
c906108c
SS
2800else
2801 if test -n "$CC"; then
2802 ac_cv_prog_CC="$CC" # Let the user override the test.
2803else
bec39cab
AC
2804as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2805for as_dir in $PATH
2806do
2807 IFS=$as_save_IFS
2808 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2809 for ac_exec_ext in '' $ac_executable_extensions; do
2810 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2811 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2812 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2813 break 2
2814 fi
2815done
81ecdfbb
RW
2816 done
2817IFS=$as_save_IFS
bec39cab 2818
c906108c
SS
2819fi
2820fi
bec39cab 2821CC=$ac_cv_prog_CC
c906108c 2822if test -n "$CC"; then
81ecdfbb
RW
2823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2824$as_echo "$CC" >&6; }
c906108c 2825else
81ecdfbb
RW
2826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2827$as_echo "no" >&6; }
c906108c
SS
2828fi
2829
81ecdfbb 2830
b4e70030
JB
2831fi
2832if test -z "$ac_cv_prog_CC"; then
2833 ac_ct_CC=$CC
81ecdfbb
RW
2834 # Extract the first word of "gcc", so it can be a program name with args.
2835set dummy gcc; ac_word=$2
2836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2837$as_echo_n "checking for $ac_word... " >&6; }
2838if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
2839 $as_echo_n "(cached) " >&6
b4e70030
JB
2840else
2841 if test -n "$ac_ct_CC"; then
2842 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2843else
2844as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2845for as_dir in $PATH
2846do
2847 IFS=$as_save_IFS
2848 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2849 for ac_exec_ext in '' $ac_executable_extensions; do
2850 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2851 ac_cv_prog_ac_ct_CC="gcc"
2852 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b4e70030 2853 break 2
4e8d927d 2854 fi
b4e70030 2855done
81ecdfbb
RW
2856 done
2857IFS=$as_save_IFS
b4e70030
JB
2858
2859fi
2860fi
2861ac_ct_CC=$ac_cv_prog_ac_ct_CC
2862if test -n "$ac_ct_CC"; then
81ecdfbb
RW
2863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2864$as_echo "$ac_ct_CC" >&6; }
b4e70030 2865else
81ecdfbb
RW
2866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2867$as_echo "no" >&6; }
b4e70030
JB
2868fi
2869
81ecdfbb
RW
2870 if test "x$ac_ct_CC" = x; then
2871 CC=""
2872 else
2873 case $cross_compiling:$ac_tool_warned in
2874yes:)
2875{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2876$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2877ac_tool_warned=yes ;;
2878esac
2879 CC=$ac_ct_CC
2880 fi
b4e70030
JB
2881else
2882 CC="$ac_cv_prog_CC"
2883fi
2884
c906108c 2885if test -z "$CC"; then
81ecdfbb
RW
2886 if test -n "$ac_tool_prefix"; then
2887 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2888set dummy ${ac_tool_prefix}cc; ac_word=$2
2889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2890$as_echo_n "checking for $ac_word... " >&6; }
2891if test "${ac_cv_prog_CC+set}" = set; then :
2892 $as_echo_n "(cached) " >&6
c906108c
SS
2893else
2894 if test -n "$CC"; then
2895 ac_cv_prog_CC="$CC" # Let the user override the test.
2896else
bec39cab
AC
2897as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2898for as_dir in $PATH
2899do
2900 IFS=$as_save_IFS
2901 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2902 for ac_exec_ext in '' $ac_executable_extensions; do
2903 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2904 ac_cv_prog_CC="${ac_tool_prefix}cc"
2905 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2906 break 2
2907 fi
2908done
81ecdfbb
RW
2909 done
2910IFS=$as_save_IFS
2911
2912fi
2913fi
2914CC=$ac_cv_prog_CC
2915if test -n "$CC"; then
2916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2917$as_echo "$CC" >&6; }
2918else
2919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2920$as_echo "no" >&6; }
2921fi
2922
2923
2924 fi
2925fi
2926if test -z "$CC"; then
2927 # Extract the first word of "cc", so it can be a program name with args.
2928set dummy cc; ac_word=$2
2929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2930$as_echo_n "checking for $ac_word... " >&6; }
2931if test "${ac_cv_prog_CC+set}" = set; then :
2932 $as_echo_n "(cached) " >&6
2933else
2934 if test -n "$CC"; then
2935 ac_cv_prog_CC="$CC" # Let the user override the test.
2936else
2937 ac_prog_rejected=no
2938as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2939for as_dir in $PATH
2940do
2941 IFS=$as_save_IFS
2942 test -z "$as_dir" && as_dir=.
2943 for ac_exec_ext in '' $ac_executable_extensions; do
2944 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2945 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2946 ac_prog_rejected=yes
2947 continue
2948 fi
2949 ac_cv_prog_CC="cc"
2950 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2951 break 2
2952 fi
2953done
2954 done
2955IFS=$as_save_IFS
bec39cab 2956
c906108c
SS
2957if test $ac_prog_rejected = yes; then
2958 # We found a bogon in the path, so make sure we never use it.
2959 set dummy $ac_cv_prog_CC
2960 shift
bec39cab 2961 if test $# != 0; then
c906108c
SS
2962 # We chose a different compiler from the bogus one.
2963 # However, it has the same basename, so the bogon will be chosen
2964 # first if we set CC to just the basename; use the full file name.
2965 shift
bec39cab 2966 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
c906108c
SS
2967 fi
2968fi
2969fi
2970fi
bec39cab 2971CC=$ac_cv_prog_CC
c906108c 2972if test -n "$CC"; then
81ecdfbb
RW
2973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2974$as_echo "$CC" >&6; }
c906108c 2975else
81ecdfbb
RW
2976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2977$as_echo "no" >&6; }
c906108c
SS
2978fi
2979
81ecdfbb 2980
bec39cab
AC
2981fi
2982if test -z "$CC"; then
2983 if test -n "$ac_tool_prefix"; then
81ecdfbb 2984 for ac_prog in cl.exe
bec39cab
AC
2985 do
2986 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2987set dummy $ac_tool_prefix$ac_prog; ac_word=$2
81ecdfbb
RW
2988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2989$as_echo_n "checking for $ac_word... " >&6; }
2990if test "${ac_cv_prog_CC+set}" = set; then :
2991 $as_echo_n "(cached) " >&6
c906108c
SS
2992else
2993 if test -n "$CC"; then
2994 ac_cv_prog_CC="$CC" # Let the user override the test.
2995else
bec39cab
AC
2996as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2997for as_dir in $PATH
2998do
2999 IFS=$as_save_IFS
3000 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
3001 for ac_exec_ext in '' $ac_executable_extensions; do
3002 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 3003 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
81ecdfbb 3004 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
3005 break 2
3006 fi
3007done
81ecdfbb
RW
3008 done
3009IFS=$as_save_IFS
bec39cab 3010
c906108c
SS
3011fi
3012fi
bec39cab 3013CC=$ac_cv_prog_CC
c906108c 3014if test -n "$CC"; then
81ecdfbb
RW
3015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3016$as_echo "$CC" >&6; }
c906108c 3017else
81ecdfbb
RW
3018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3019$as_echo "no" >&6; }
c906108c 3020fi
bec39cab 3021
81ecdfbb 3022
bec39cab
AC
3023 test -n "$CC" && break
3024 done
3025fi
3026if test -z "$CC"; then
3027 ac_ct_CC=$CC
81ecdfbb 3028 for ac_prog in cl.exe
bec39cab
AC
3029do
3030 # Extract the first word of "$ac_prog", so it can be a program name with args.
3031set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
3032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3033$as_echo_n "checking for $ac_word... " >&6; }
3034if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3035 $as_echo_n "(cached) " >&6
bec39cab
AC
3036else
3037 if test -n "$ac_ct_CC"; then
3038 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3039else
3040as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3041for as_dir in $PATH
3042do
3043 IFS=$as_save_IFS
3044 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
3045 for ac_exec_ext in '' $ac_executable_extensions; do
3046 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 3047 ac_cv_prog_ac_ct_CC="$ac_prog"
81ecdfbb 3048 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab 3049 break 2
c906108c 3050 fi
bec39cab 3051done
81ecdfbb
RW
3052 done
3053IFS=$as_save_IFS
bec39cab
AC
3054
3055fi
3056fi
3057ac_ct_CC=$ac_cv_prog_ac_ct_CC
3058if test -n "$ac_ct_CC"; then
81ecdfbb
RW
3059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3060$as_echo "$ac_ct_CC" >&6; }
bec39cab 3061else
81ecdfbb
RW
3062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3063$as_echo "no" >&6; }
c906108c
SS
3064fi
3065
81ecdfbb 3066
bec39cab
AC
3067 test -n "$ac_ct_CC" && break
3068done
c906108c 3069
81ecdfbb
RW
3070 if test "x$ac_ct_CC" = x; then
3071 CC=""
3072 else
3073 case $cross_compiling:$ac_tool_warned in
3074yes:)
3075{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3076$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3077ac_tool_warned=yes ;;
3078esac
3079 CC=$ac_ct_CC
3080 fi
bec39cab
AC
3081fi
3082
3083fi
3084
3085
81ecdfbb
RW
3086test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3087$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3088as_fn_error "no acceptable C compiler found in \$PATH
3089See \`config.log' for more details." "$LINENO" 5; }
bec39cab
AC
3090
3091# Provide some information about the compiler.
81ecdfbb
RW
3092$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3093set X $ac_compile
3094ac_compiler=$2
3095for ac_option in --version -v -V -qversion; do
3096 { { ac_try="$ac_compiler $ac_option >&5"
3097case "(($ac_try" in
3098 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3099 *) ac_try_echo=$ac_try;;
3100esac
3101eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3102$as_echo "$ac_try_echo"; } >&5
3103 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
bec39cab 3104 ac_status=$?
81ecdfbb
RW
3105 if test -s conftest.err; then
3106 sed '10a\
3107... rest of stderr output deleted ...
3108 10q' conftest.err >conftest.er1
3109 cat conftest.er1 >&5
3110 rm -f conftest.er1 conftest.err
3111 fi
3112 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3113 test $ac_status = 0; }
3114done
bec39cab 3115
81ecdfbb 3116cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3117/* end confdefs.h. */
3118
3119int
3120main ()
3121{
3122
3123 ;
3124 return 0;
3125}
3126_ACEOF
3127ac_clean_files_save=$ac_clean_files
81ecdfbb 3128ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out"
bec39cab
AC
3129# Try to create an executable without -o first, disregard a.out.
3130# It will help us diagnose broken compilers, and finding out an intuition
3131# of exeext.
81ecdfbb
RW
3132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3133$as_echo_n "checking for C compiler default output file name... " >&6; }
3134ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3135
3136# The possible output files:
3137ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3138
3139ac_rmfiles=
3140for ac_file in $ac_files
3141do
3142 case $ac_file in
3143 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3144 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3145 esac
3146done
3147rm -f $ac_rmfiles
3148
3149if { { ac_try="$ac_link_default"
3150case "(($ac_try" in
3151 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3152 *) ac_try_echo=$ac_try;;
3153esac
3154eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3155$as_echo "$ac_try_echo"; } >&5
3156 (eval "$ac_link_default") 2>&5
3157 ac_status=$?
3158 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3159 test $ac_status = 0; }; then :
3160 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3161# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3162# in a Makefile. We should not override ac_cv_exeext if it was cached,
3163# so that the user can short-circuit this test for compilers unknown to
3164# Autoconf.
3165for ac_file in $ac_files ''
bec39cab
AC
3166do
3167 test -f "$ac_file" || continue
3168 case $ac_file in
81ecdfbb 3169 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
b4e70030
JB
3170 ;;
3171 [ab].out )
3172 # We found the default executable, but exeext='' is most
3173 # certainly right.
3174 break;;
3175 *.* )
81ecdfbb
RW
3176 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3177 then :; else
3178 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3179 fi
3180 # We set ac_cv_exeext here because the later test for it is not
3181 # safe: cross compilers may not add the suffix if given an `-o'
3182 # argument, so we may need to know it at that point already.
3183 # Even if this section looks crufty: it has the advantage of
3184 # actually working.
b4e70030
JB
3185 break;;
3186 * )
3187 break;;
bec39cab
AC
3188 esac
3189done
81ecdfbb
RW
3190test "$ac_cv_exeext" = no && ac_cv_exeext=
3191
bec39cab 3192else
81ecdfbb
RW
3193 ac_file=''
3194fi
3195{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3196$as_echo "$ac_file" >&6; }
3197if test -z "$ac_file"; then :
3198 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3199sed 's/^/| /' conftest.$ac_ext >&5
3200
81ecdfbb
RW
3201{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3202$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3203{ as_fn_set_status 77
3204as_fn_error "C compiler cannot create executables
3205See \`config.log' for more details." "$LINENO" 5; }; }
bec39cab 3206fi
b4e70030 3207ac_exeext=$ac_cv_exeext
b4e70030 3208
81ecdfbb 3209# Check that the compiler produces executables we can run. If not, either
bec39cab 3210# the compiler is broken, or we cross compile.
81ecdfbb
RW
3211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3212$as_echo_n "checking whether the C compiler works... " >&6; }
bec39cab
AC
3213# If not cross compiling, check that we can run a simple program.
3214if test "$cross_compiling" != yes; then
3215 if { ac_try='./$ac_file'
81ecdfbb
RW
3216 { { case "(($ac_try" in
3217 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3218 *) ac_try_echo=$ac_try;;
3219esac
3220eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3221$as_echo "$ac_try_echo"; } >&5
3222 (eval "$ac_try") 2>&5
bec39cab 3223 ac_status=$?
81ecdfbb
RW
3224 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3225 test $ac_status = 0; }; }; then
bec39cab 3226 cross_compiling=no
c906108c 3227 else
bec39cab
AC
3228 if test "$cross_compiling" = maybe; then
3229 cross_compiling=yes
3230 else
81ecdfbb
RW
3231 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3232$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3233as_fn_error "cannot run C compiled programs.
bec39cab 3234If you meant to cross compile, use \`--host'.
81ecdfbb 3235See \`config.log' for more details." "$LINENO" 5; }
bec39cab 3236 fi
c906108c 3237 fi
bec39cab 3238fi
81ecdfbb
RW
3239{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3240$as_echo "yes" >&6; }
bec39cab 3241
81ecdfbb 3242rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out
b4e70030 3243ac_clean_files=$ac_clean_files_save
81ecdfbb 3244# Check that the compiler produces executables we can run. If not, either
b4e70030 3245# the compiler is broken, or we cross compile.
81ecdfbb
RW
3246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3247$as_echo_n "checking whether we are cross compiling... " >&6; }
3248{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3249$as_echo "$cross_compiling" >&6; }
3250
3251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3252$as_echo_n "checking for suffix of executables... " >&6; }
3253if { { ac_try="$ac_link"
3254case "(($ac_try" in
3255 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3256 *) ac_try_echo=$ac_try;;
3257esac
3258eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3259$as_echo "$ac_try_echo"; } >&5
3260 (eval "$ac_link") 2>&5
bec39cab 3261 ac_status=$?
81ecdfbb
RW
3262 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3263 test $ac_status = 0; }; then :
b4e70030
JB
3264 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3265# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3266# work properly (i.e., refer to `conftest.exe'), while it won't with
3267# `rm'.
3268for ac_file in conftest.exe conftest conftest.*; do
3269 test -f "$ac_file" || continue
3270 case $ac_file in
81ecdfbb 3271 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
b4e70030 3272 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
b4e70030
JB
3273 break;;
3274 * ) break;;
3275 esac
3276done
c906108c 3277else
81ecdfbb
RW
3278 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3279$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3280as_fn_error "cannot compute suffix of executables: cannot compile and link
3281See \`config.log' for more details." "$LINENO" 5; }
c906108c 3282fi
b4e70030 3283rm -f conftest$ac_cv_exeext
81ecdfbb
RW
3284{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3285$as_echo "$ac_cv_exeext" >&6; }
c906108c 3286
b4e70030 3287rm -f conftest.$ac_ext
bec39cab
AC
3288EXEEXT=$ac_cv_exeext
3289ac_exeext=$EXEEXT
81ecdfbb
RW
3290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3291$as_echo_n "checking for suffix of object files... " >&6; }
3292if test "${ac_cv_objext+set}" = set; then :
3293 $as_echo_n "(cached) " >&6
bec39cab 3294else
81ecdfbb 3295 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
3296/* end confdefs.h. */
3297
3298int
3299main ()
3300{
3301
3302 ;
3303 return 0;
3304}
3305_ACEOF
3306rm -f conftest.o conftest.obj
81ecdfbb
RW
3307if { { ac_try="$ac_compile"
3308case "(($ac_try" in
3309 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3310 *) ac_try_echo=$ac_try;;
3311esac
3312eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3313$as_echo "$ac_try_echo"; } >&5
3314 (eval "$ac_compile") 2>&5
3315 ac_status=$?
3316 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3317 test $ac_status = 0; }; then :
3318 for ac_file in conftest.o conftest.obj conftest.*; do
3319 test -f "$ac_file" || continue;
bec39cab 3320 case $ac_file in
81ecdfbb 3321 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
bec39cab
AC
3322 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3323 break;;
3324 esac
3325done
c906108c 3326else
81ecdfbb 3327 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3328sed 's/^/| /' conftest.$ac_ext >&5
3329
81ecdfbb
RW
3330{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3331$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3332as_fn_error "cannot compute suffix of object files: cannot compile
3333See \`config.log' for more details." "$LINENO" 5; }
c906108c 3334fi
b4e70030 3335rm -f conftest.$ac_cv_objext conftest.$ac_ext
bec39cab 3336fi
81ecdfbb
RW
3337{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3338$as_echo "$ac_cv_objext" >&6; }
bec39cab
AC
3339OBJEXT=$ac_cv_objext
3340ac_objext=$OBJEXT
81ecdfbb
RW
3341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3342$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3343if test "${ac_cv_c_compiler_gnu+set}" = set; then :
3344 $as_echo_n "(cached) " >&6
c906108c 3345else
81ecdfbb 3346 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3347/* end confdefs.h. */
3348
3349int
3350main ()
3351{
3352#ifndef __GNUC__
3353 choke me
3354#endif
3355
3356 ;
3357 return 0;
3358}
3359_ACEOF
81ecdfbb 3360if ac_fn_c_try_compile "$LINENO"; then :
bec39cab
AC
3361 ac_compiler_gnu=yes
3362else
81ecdfbb 3363 ac_compiler_gnu=no
bec39cab 3364fi
81ecdfbb 3365rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab
AC
3366ac_cv_c_compiler_gnu=$ac_compiler_gnu
3367
3368fi
81ecdfbb
RW
3369{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3370$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3371if test $ac_compiler_gnu = yes; then
3372 GCC=yes
3373else
3374 GCC=
3375fi
bec39cab
AC
3376ac_test_CFLAGS=${CFLAGS+set}
3377ac_save_CFLAGS=$CFLAGS
81ecdfbb
RW
3378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3379$as_echo_n "checking whether $CC accepts -g... " >&6; }
3380if test "${ac_cv_prog_cc_g+set}" = set; then :
3381 $as_echo_n "(cached) " >&6
bec39cab 3382else
81ecdfbb
RW
3383 ac_save_c_werror_flag=$ac_c_werror_flag
3384 ac_c_werror_flag=yes
3385 ac_cv_prog_cc_g=no
3386 CFLAGS="-g"
3387 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3388/* end confdefs.h. */
3389
3390int
3391main ()
3392{
3393
3394 ;
3395 return 0;
3396}
3397_ACEOF
81ecdfbb 3398if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
3399 ac_cv_prog_cc_g=yes
3400else
81ecdfbb
RW
3401 CFLAGS=""
3402 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3403/* end confdefs.h. */
3404
3405int
3406main ()
3407{
3408
3409 ;
3410 return 0;
3411}
3412_ACEOF
3413if ac_fn_c_try_compile "$LINENO"; then :
3414
3415else
3416 ac_c_werror_flag=$ac_save_c_werror_flag
3417 CFLAGS="-g"
3418 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3419/* end confdefs.h. */
3420
3421int
3422main ()
3423{
c906108c 3424
81ecdfbb
RW
3425 ;
3426 return 0;
3427}
3428_ACEOF
3429if ac_fn_c_try_compile "$LINENO"; then :
3430 ac_cv_prog_cc_g=yes
3431fi
3432rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3433fi
3434rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4e8d927d 3435fi
81ecdfbb
RW
3436rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3437 ac_c_werror_flag=$ac_save_c_werror_flag
bec39cab 3438fi
81ecdfbb
RW
3439{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3440$as_echo "$ac_cv_prog_cc_g" >&6; }
c906108c 3441if test "$ac_test_CFLAGS" = set; then
bec39cab 3442 CFLAGS=$ac_save_CFLAGS
c906108c
SS
3443elif test $ac_cv_prog_cc_g = yes; then
3444 if test "$GCC" = yes; then
3445 CFLAGS="-g -O2"
3446 else
3447 CFLAGS="-g"
3448 fi
3449else
3450 if test "$GCC" = yes; then
3451 CFLAGS="-O2"
3452 else
3453 CFLAGS=
3454 fi
3455fi
81ecdfbb
RW
3456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3457$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3458if test "${ac_cv_prog_cc_c89+set}" = set; then :
3459 $as_echo_n "(cached) " >&6
bec39cab 3460else
81ecdfbb 3461 ac_cv_prog_cc_c89=no
bec39cab 3462ac_save_CC=$CC
81ecdfbb 3463cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3464/* end confdefs.h. */
c906108c
SS
3465#include <stdarg.h>
3466#include <stdio.h>
3467#include <sys/types.h>
3468#include <sys/stat.h>
3469/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3470struct buf { int x; };
3471FILE * (*rcsopen) (struct buf *, struct stat *, int);
3472static char *e (p, i)
3473 char **p;
3474 int i;
3475{
3476 return p[i];
3477}
3478static char *f (char * (*g) (char **, int), char **p, ...)
3479{
3480 char *s;
3481 va_list v;
3482 va_start (v,p);
3483 s = g (p, va_arg (v,int));
3484 va_end (v);
3485 return s;
3486}
bec39cab
AC
3487
3488/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3489 function prototypes and stuff, but not '\xHH' hex character constants.
3490 These don't provoke an error unfortunately, instead are silently treated
81ecdfbb 3491 as 'x'. The following induces an error, until -std is added to get
bec39cab
AC
3492 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3493 array size at least. It's necessary to write '\x00'==0 to get something
81ecdfbb 3494 that's true only with -std. */
bec39cab
AC
3495int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3496
81ecdfbb
RW
3497/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3498 inside strings and character constants. */
3499#define FOO(x) 'x'
3500int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3501
c906108c
SS
3502int test (int i, double x);
3503struct s1 {int (*f) (int a);};
3504struct s2 {int (*f) (double a);};
3505int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3506int argc;
3507char **argv;
bec39cab
AC
3508int
3509main ()
3510{
c906108c 3511return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
bec39cab
AC
3512 ;
3513 return 0;
3514}
3515_ACEOF
81ecdfbb
RW
3516for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3517 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
bec39cab
AC
3518do
3519 CC="$ac_save_CC $ac_arg"
81ecdfbb
RW
3520 if ac_fn_c_try_compile "$LINENO"; then :
3521 ac_cv_prog_cc_c89=$ac_arg
c906108c 3522fi
81ecdfbb
RW
3523rm -f core conftest.err conftest.$ac_objext
3524 test "x$ac_cv_prog_cc_c89" != "xno" && break
c906108c 3525done
81ecdfbb 3526rm -f conftest.$ac_ext
bec39cab 3527CC=$ac_save_CC
c906108c
SS
3528
3529fi
81ecdfbb
RW
3530# AC_CACHE_VAL
3531case "x$ac_cv_prog_cc_c89" in
3532 x)
3533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3534$as_echo "none needed" >&6; } ;;
3535 xno)
3536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3537$as_echo "unsupported" >&6; } ;;
bec39cab 3538 *)
81ecdfbb
RW
3539 CC="$CC $ac_cv_prog_cc_c89"
3540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3541$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
c906108c 3542esac
81ecdfbb 3543if test "x$ac_cv_prog_cc_c89" != xno; then :
c906108c 3544
b4e70030
JB
3545fi
3546
bec39cab
AC
3547ac_ext=c
3548ac_cpp='$CPP $CPPFLAGS'
3549ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3550ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3551ac_compiler_gnu=$ac_cv_c_compiler_gnu
c906108c 3552
3bc3d82a
PA
3553ac_ext=cpp
3554ac_cpp='$CXXCPP $CPPFLAGS'
3555ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3556ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3557ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3558if test -z "$CXX"; then
3559 if test -n "$CCC"; then
3560 CXX=$CCC
3561 else
3562 if test -n "$ac_tool_prefix"; then
3563 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3564 do
3565 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3566set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3568$as_echo_n "checking for $ac_word... " >&6; }
3569if test "${ac_cv_prog_CXX+set}" = set; then :
3570 $as_echo_n "(cached) " >&6
3571else
3572 if test -n "$CXX"; then
3573 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3574else
3575as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3576for as_dir in $PATH
3577do
3578 IFS=$as_save_IFS
3579 test -z "$as_dir" && as_dir=.
3580 for ac_exec_ext in '' $ac_executable_extensions; do
3581 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3582 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3583 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3584 break 2
3585 fi
3586done
3587 done
3588IFS=$as_save_IFS
3589
3590fi
3591fi
3592CXX=$ac_cv_prog_CXX
3593if test -n "$CXX"; then
3594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
3595$as_echo "$CXX" >&6; }
3596else
3597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3598$as_echo "no" >&6; }
3599fi
3600
3601
3602 test -n "$CXX" && break
3603 done
3604fi
3605if test -z "$CXX"; then
3606 ac_ct_CXX=$CXX
3607 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3608do
3609 # Extract the first word of "$ac_prog", so it can be a program name with args.
3610set dummy $ac_prog; ac_word=$2
3611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3612$as_echo_n "checking for $ac_word... " >&6; }
3613if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
3614 $as_echo_n "(cached) " >&6
3615else
3616 if test -n "$ac_ct_CXX"; then
3617 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3618else
3619as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3620for as_dir in $PATH
3621do
3622 IFS=$as_save_IFS
3623 test -z "$as_dir" && as_dir=.
3624 for ac_exec_ext in '' $ac_executable_extensions; do
3625 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3626 ac_cv_prog_ac_ct_CXX="$ac_prog"
3627 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3628 break 2
3629 fi
3630done
3631 done
3632IFS=$as_save_IFS
3633
3634fi
3635fi
3636ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3637if test -n "$ac_ct_CXX"; then
3638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
3639$as_echo "$ac_ct_CXX" >&6; }
3640else
3641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3642$as_echo "no" >&6; }
3643fi
3644
3645
3646 test -n "$ac_ct_CXX" && break
3647done
3648
3649 if test "x$ac_ct_CXX" = x; then
3650 CXX="g++"
3651 else
3652 case $cross_compiling:$ac_tool_warned in
3653yes:)
3654{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3655$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3656ac_tool_warned=yes ;;
3657esac
3658 CXX=$ac_ct_CXX
3659 fi
3660fi
3661
3662 fi
3663fi
3664# Provide some information about the compiler.
3665$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
3666set X $ac_compile
3667ac_compiler=$2
3668for ac_option in --version -v -V -qversion; do
3669 { { ac_try="$ac_compiler $ac_option >&5"
3670case "(($ac_try" in
3671 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3672 *) ac_try_echo=$ac_try;;
3673esac
3674eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3675$as_echo "$ac_try_echo"; } >&5
3676 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3677 ac_status=$?
3678 if test -s conftest.err; then
3679 sed '10a\
3680... rest of stderr output deleted ...
3681 10q' conftest.err >conftest.er1
3682 cat conftest.er1 >&5
3683 rm -f conftest.er1 conftest.err
3684 fi
3685 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3686 test $ac_status = 0; }
3687done
3688
3689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
3690$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
3691if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
3692 $as_echo_n "(cached) " >&6
3693else
3694 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3695/* end confdefs.h. */
3696
3697int
3698main ()
3699{
3700#ifndef __GNUC__
3701 choke me
3702#endif
3703
3704 ;
3705 return 0;
3706}
3707_ACEOF
3708if ac_fn_cxx_try_compile "$LINENO"; then :
3709 ac_compiler_gnu=yes
3710else
3711 ac_compiler_gnu=no
3712fi
3713rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3714ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3715
3716fi
3717{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
3718$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
3719if test $ac_compiler_gnu = yes; then
3720 GXX=yes
3721else
3722 GXX=
3723fi
3724ac_test_CXXFLAGS=${CXXFLAGS+set}
3725ac_save_CXXFLAGS=$CXXFLAGS
3726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
3727$as_echo_n "checking whether $CXX accepts -g... " >&6; }
3728if test "${ac_cv_prog_cxx_g+set}" = set; then :
3729 $as_echo_n "(cached) " >&6
3730else
3731 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
3732 ac_cxx_werror_flag=yes
3733 ac_cv_prog_cxx_g=no
3734 CXXFLAGS="-g"
3735 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3736/* end confdefs.h. */
3737
3738int
3739main ()
3740{
3741
3742 ;
3743 return 0;
3744}
3745_ACEOF
3746if ac_fn_cxx_try_compile "$LINENO"; then :
3747 ac_cv_prog_cxx_g=yes
3748else
3749 CXXFLAGS=""
3750 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3751/* end confdefs.h. */
3752
3753int
3754main ()
3755{
3756
3757 ;
3758 return 0;
3759}
3760_ACEOF
3761if ac_fn_cxx_try_compile "$LINENO"; then :
3762
3763else
3764 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3765 CXXFLAGS="-g"
3766 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3767/* end confdefs.h. */
3768
3769int
3770main ()
3771{
3772
3773 ;
3774 return 0;
3775}
3776_ACEOF
3777if ac_fn_cxx_try_compile "$LINENO"; then :
3778 ac_cv_prog_cxx_g=yes
3779fi
3780rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3781fi
3782rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3783fi
3784rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3785 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3786fi
3787{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
3788$as_echo "$ac_cv_prog_cxx_g" >&6; }
3789if test "$ac_test_CXXFLAGS" = set; then
3790 CXXFLAGS=$ac_save_CXXFLAGS
3791elif test $ac_cv_prog_cxx_g = yes; then
3792 if test "$GXX" = yes; then
3793 CXXFLAGS="-g -O2"
3794 else
3795 CXXFLAGS="-g"
3796 fi
3797else
3798 if test "$GXX" = yes; then
3799 CXXFLAGS="-O2"
3800 else
3801 CXXFLAGS=
3802 fi
3803fi
3804ac_ext=c
3805ac_cpp='$CPP $CPPFLAGS'
3806ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3807ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3808ac_compiler_gnu=$ac_cv_c_compiler_gnu
3809
3810
60ca704f 3811
bec39cab
AC
3812ac_ext=c
3813ac_cpp='$CPP $CPPFLAGS'
3814ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3815ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3816ac_compiler_gnu=$ac_cv_c_compiler_gnu
81ecdfbb
RW
3817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3818$as_echo_n "checking how to run the C preprocessor... " >&6; }
bec39cab
AC
3819# On Suns, sometimes $CPP names a directory.
3820if test -n "$CPP" && test -d "$CPP"; then
3821 CPP=
8bb2c122 3822fi
bec39cab 3823if test -z "$CPP"; then
81ecdfbb
RW
3824 if test "${ac_cv_prog_CPP+set}" = set; then :
3825 $as_echo_n "(cached) " >&6
bec39cab
AC
3826else
3827 # Double quotes because CPP needs to be expanded
3828 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3829 do
3830 ac_preproc_ok=false
3831for ac_c_preproc_warn_flag in '' yes
3832do
3833 # Use a header file that comes with gcc, so configuring glibc
3834 # with a fresh cross-compiler works.
3835 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3836 # <limits.h> exists even on freestanding compilers.
3837 # On the NeXT, cc -E runs the code through the compiler's parser,
3838 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3839 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3840/* end confdefs.h. */
3841#ifdef __STDC__
3842# include <limits.h>
3843#else
3844# include <assert.h>
3845#endif
3846 Syntax error
3847_ACEOF
81ecdfbb 3848if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3849
81ecdfbb 3850else
bec39cab
AC
3851 # Broken: fails on valid input.
3852continue
3853fi
3854rm -f conftest.err conftest.$ac_ext
3855
81ecdfbb 3856 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3857 # can be detected and how.
81ecdfbb 3858 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3859/* end confdefs.h. */
3860#include <ac_nonexistent.h>
3861_ACEOF
81ecdfbb 3862if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3863 # Broken: success on invalid input.
3864continue
8bb2c122 3865else
bec39cab
AC
3866 # Passes both tests.
3867ac_preproc_ok=:
3868break
8bb2c122 3869fi
bec39cab 3870rm -f conftest.err conftest.$ac_ext
8bb2c122 3871
bec39cab
AC
3872done
3873# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3874rm -f conftest.err conftest.$ac_ext
81ecdfbb 3875if $ac_preproc_ok; then :
bec39cab
AC
3876 break
3877fi
8bb2c122 3878
bec39cab
AC
3879 done
3880 ac_cv_prog_CPP=$CPP
ddc9cd0f 3881
c906108c 3882fi
bec39cab
AC
3883 CPP=$ac_cv_prog_CPP
3884else
3885 ac_cv_prog_CPP=$CPP
c906108c 3886fi
81ecdfbb
RW
3887{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3888$as_echo "$CPP" >&6; }
bec39cab
AC
3889ac_preproc_ok=false
3890for ac_c_preproc_warn_flag in '' yes
3891do
3892 # Use a header file that comes with gcc, so configuring glibc
3893 # with a fresh cross-compiler works.
3894 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3895 # <limits.h> exists even on freestanding compilers.
3896 # On the NeXT, cc -E runs the code through the compiler's parser,
3897 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3898 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3899/* end confdefs.h. */
3900#ifdef __STDC__
3901# include <limits.h>
3902#else
3903# include <assert.h>
3904#endif
3905 Syntax error
3906_ACEOF
81ecdfbb 3907if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3908
81ecdfbb 3909else
bec39cab
AC
3910 # Broken: fails on valid input.
3911continue
3912fi
3913rm -f conftest.err conftest.$ac_ext
3914
81ecdfbb 3915 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3916 # can be detected and how.
81ecdfbb 3917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3918/* end confdefs.h. */
3919#include <ac_nonexistent.h>
3920_ACEOF
81ecdfbb 3921if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3922 # Broken: success on invalid input.
3923continue
c906108c 3924else
bec39cab
AC
3925 # Passes both tests.
3926ac_preproc_ok=:
3927break
c906108c 3928fi
bec39cab 3929rm -f conftest.err conftest.$ac_ext
c906108c 3930
bec39cab
AC
3931done
3932# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3933rm -f conftest.err conftest.$ac_ext
81ecdfbb
RW
3934if $ac_preproc_ok; then :
3935
c906108c 3936else
81ecdfbb
RW
3937 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3938$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3939as_fn_error "C preprocessor \"$CPP\" fails sanity check
3940See \`config.log' for more details." "$LINENO" 5; }
c906108c 3941fi
c906108c 3942
bec39cab
AC
3943ac_ext=c
3944ac_cpp='$CPP $CPPFLAGS'
3945ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3946ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3947ac_compiler_gnu=$ac_cv_c_compiler_gnu
3948
3949
81ecdfbb
RW
3950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3951$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3952if test "${ac_cv_path_GREP+set}" = set; then :
3953 $as_echo_n "(cached) " >&6
4e8d927d 3954else
81ecdfbb
RW
3955 if test -z "$GREP"; then
3956 ac_path_GREP_found=false
3957 # Loop through the user's path and test for each of PROGNAME-LIST
3958 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3959for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3960do
3961 IFS=$as_save_IFS
3962 test -z "$as_dir" && as_dir=.
3963 for ac_prog in grep ggrep; do
3964 for ac_exec_ext in '' $ac_executable_extensions; do
3965 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3966 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3967# Check for GNU ac_path_GREP and select it if it is found.
3968 # Check for GNU $ac_path_GREP
3969case `"$ac_path_GREP" --version 2>&1` in
3970*GNU*)
3971 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3972*)
3973 ac_count=0
3974 $as_echo_n 0123456789 >"conftest.in"
3975 while :
3976 do
3977 cat "conftest.in" "conftest.in" >"conftest.tmp"
3978 mv "conftest.tmp" "conftest.in"
3979 cp "conftest.in" "conftest.nl"
3980 $as_echo 'GREP' >> "conftest.nl"
3981 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3982 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3983 as_fn_arith $ac_count + 1 && ac_count=$as_val
3984 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3985 # Best one so far, save it but keep looking for a better one
3986 ac_cv_path_GREP="$ac_path_GREP"
3987 ac_path_GREP_max=$ac_count
bec39cab 3988 fi
81ecdfbb
RW
3989 # 10*(2^10) chars as input seems more than enough
3990 test $ac_count -gt 10 && break
3991 done
3992 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3993esac
bec39cab 3994
81ecdfbb
RW
3995 $ac_path_GREP_found && break 3
3996 done
3997 done
3998 done
3999IFS=$as_save_IFS
4000 if test -z "$ac_cv_path_GREP"; then
4001 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4002 fi
c906108c 4003else
81ecdfbb 4004 ac_cv_path_GREP=$GREP
c906108c 4005fi
c906108c 4006
81ecdfbb
RW
4007fi
4008{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4009$as_echo "$ac_cv_path_GREP" >&6; }
4010 GREP="$ac_cv_path_GREP"
c906108c 4011
c906108c 4012
81ecdfbb
RW
4013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4014$as_echo_n "checking for egrep... " >&6; }
4015if test "${ac_cv_path_EGREP+set}" = set; then :
4016 $as_echo_n "(cached) " >&6
783e057b 4017else
81ecdfbb
RW
4018 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4019 then ac_cv_path_EGREP="$GREP -E"
4020 else
4021 if test -z "$EGREP"; then
4022 ac_path_EGREP_found=false
4023 # Loop through the user's path and test for each of PROGNAME-LIST
4024 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4025for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
783e057b
DJ
4026do
4027 IFS=$as_save_IFS
4028 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
4029 for ac_prog in egrep; do
4030 for ac_exec_ext in '' $ac_executable_extensions; do
4031 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4032 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4033# Check for GNU ac_path_EGREP and select it if it is found.
4034 # Check for GNU $ac_path_EGREP
4035case `"$ac_path_EGREP" --version 2>&1` in
4036*GNU*)
4037 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4038*)
4039 ac_count=0
4040 $as_echo_n 0123456789 >"conftest.in"
4041 while :
4042 do
4043 cat "conftest.in" "conftest.in" >"conftest.tmp"
4044 mv "conftest.tmp" "conftest.in"
4045 cp "conftest.in" "conftest.nl"
4046 $as_echo 'EGREP' >> "conftest.nl"
4047 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4048 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4049 as_fn_arith $ac_count + 1 && ac_count=$as_val
4050 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4051 # Best one so far, save it but keep looking for a better one
4052 ac_cv_path_EGREP="$ac_path_EGREP"
4053 ac_path_EGREP_max=$ac_count
4054 fi
4055 # 10*(2^10) chars as input seems more than enough
4056 test $ac_count -gt 10 && break
4057 done
4058 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4059esac
bec39cab 4060
81ecdfbb
RW
4061 $ac_path_EGREP_found && break 3
4062 done
4063 done
4064 done
4065IFS=$as_save_IFS
4066 if test -z "$ac_cv_path_EGREP"; then
4067 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
783e057b 4068 fi
783e057b 4069else
81ecdfbb 4070 ac_cv_path_EGREP=$EGREP
783e057b
DJ
4071fi
4072
81ecdfbb 4073 fi
783e057b 4074fi
81ecdfbb
RW
4075{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4076$as_echo "$ac_cv_path_EGREP" >&6; }
4077 EGREP="$ac_cv_path_EGREP"
4078
783e057b 4079
81ecdfbb
RW
4080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4081$as_echo_n "checking for ANSI C header files... " >&6; }
4082if test "${ac_cv_header_stdc+set}" = set; then :
4083 $as_echo_n "(cached) " >&6
783e057b 4084else
81ecdfbb 4085 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 4086/* end confdefs.h. */
783e057b 4087#include <stdlib.h>
bec39cab 4088#include <stdarg.h>
783e057b
DJ
4089#include <string.h>
4090#include <float.h>
c906108c 4091
bec39cab
AC
4092int
4093main ()
4094{
c906108c 4095
bec39cab
AC
4096 ;
4097 return 0;
4098}
4099_ACEOF
81ecdfbb 4100if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4101 ac_cv_header_stdc=yes
c906108c 4102else
81ecdfbb 4103 ac_cv_header_stdc=no
c906108c 4104fi
81ecdfbb 4105rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 4106
783e057b
DJ
4107if test $ac_cv_header_stdc = yes; then
4108 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
81ecdfbb 4109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4110/* end confdefs.h. */
4111#include <string.h>
c906108c 4112
783e057b
DJ
4113_ACEOF
4114if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4115 $EGREP "memchr" >/dev/null 2>&1; then :
4116
c906108c 4117else
783e057b 4118 ac_cv_header_stdc=no
c906108c 4119fi
783e057b 4120rm -f conftest*
c906108c
SS
4121
4122fi
4123
783e057b
DJ
4124if test $ac_cv_header_stdc = yes; then
4125 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
81ecdfbb 4126 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4127/* end confdefs.h. */
4128#include <stdlib.h>
bec39cab 4129
783e057b
DJ
4130_ACEOF
4131if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4132 $EGREP "free" >/dev/null 2>&1; then :
4133
bec39cab 4134else
783e057b 4135 ac_cv_header_stdc=no
bec39cab 4136fi
783e057b 4137rm -f conftest*
bec39cab
AC
4138
4139fi
bec39cab 4140
783e057b
DJ
4141if test $ac_cv_header_stdc = yes; then
4142 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
81ecdfbb 4143 if test "$cross_compiling" = yes; then :
783e057b 4144 :
bec39cab 4145else
81ecdfbb 4146 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4147/* end confdefs.h. */
4148#include <ctype.h>
81ecdfbb 4149#include <stdlib.h>
783e057b
DJ
4150#if ((' ' & 0x0FF) == 0x020)
4151# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4152# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4153#else
4154# define ISLOWER(c) \
4155 (('a' <= (c) && (c) <= 'i') \
4156 || ('j' <= (c) && (c) <= 'r') \
4157 || ('s' <= (c) && (c) <= 'z'))
4158# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4159#endif
4160
4161#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4162int
4163main ()
4164{
4165 int i;
4166 for (i = 0; i < 256; i++)
4167 if (XOR (islower (i), ISLOWER (i))
4168 || toupper (i) != TOUPPER (i))
81ecdfbb
RW
4169 return 2;
4170 return 0;
783e057b
DJ
4171}
4172_ACEOF
81ecdfbb 4173if ac_fn_c_try_run "$LINENO"; then :
783e057b 4174
81ecdfbb
RW
4175else
4176 ac_cv_header_stdc=no
783e057b 4177fi
81ecdfbb
RW
4178rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4179 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 4180fi
81ecdfbb 4181
783e057b
DJ
4182fi
4183fi
81ecdfbb
RW
4184{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4185$as_echo "$ac_cv_header_stdc" >&6; }
783e057b
DJ
4186if test $ac_cv_header_stdc = yes; then
4187
81ecdfbb 4188$as_echo "#define STDC_HEADERS 1" >>confdefs.h
783e057b
DJ
4189
4190fi
4191
4192# On IRIX 5.3, sys/types and inttypes.h are conflicting.
783e057b
DJ
4193for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4194 inttypes.h stdint.h unistd.h
81ecdfbb
RW
4195do :
4196 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4197ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4198"
4199eval as_val=\$$as_ac_Header
4200 if test "x$as_val" = x""yes; then :
783e057b 4201 cat >>confdefs.h <<_ACEOF
81ecdfbb 4202#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
783e057b
DJ
4203_ACEOF
4204
4205fi
4206
4207done
4208
4209
4210
81ecdfbb
RW
4211 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4212if test "x$ac_cv_header_minix_config_h" = x""yes; then :
783e057b
DJ
4213 MINIX=yes
4214else
4215 MINIX=
4216fi
4217
4218
4219 if test "$MINIX" = yes; then
4220
81ecdfbb 4221$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
783e057b
DJ
4222
4223
81ecdfbb 4224$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
783e057b
DJ
4225
4226
81ecdfbb 4227$as_echo "#define _MINIX 1" >>confdefs.h
783e057b
DJ
4228
4229 fi
4230
4231
81ecdfbb
RW
4232 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4233$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4234if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
4235 $as_echo_n "(cached) " >&6
783e057b 4236else
81ecdfbb 4237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4238/* end confdefs.h. */
4239
c971b7fa
PA
4240# define __EXTENSIONS__ 1
4241 $ac_includes_default
783e057b
DJ
4242int
4243main ()
4244{
4245
4246 ;
4247 return 0;
4248}
4249_ACEOF
81ecdfbb 4250if ac_fn_c_try_compile "$LINENO"; then :
783e057b
DJ
4251 ac_cv_safe_to_define___extensions__=yes
4252else
81ecdfbb 4253 ac_cv_safe_to_define___extensions__=no
783e057b 4254fi
81ecdfbb 4255rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b 4256fi
81ecdfbb
RW
4257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4258$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
783e057b 4259 test $ac_cv_safe_to_define___extensions__ = yes &&
81ecdfbb 4260 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
783e057b 4261
81ecdfbb 4262 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
783e057b 4263
81ecdfbb 4264 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
783e057b 4265
81ecdfbb 4266 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
783e057b 4267
81ecdfbb 4268 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
783e057b
DJ
4269
4270
c971b7fa
PA
4271ac_aux_dir=
4272for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4273 for ac_t in install-sh install.sh shtool; do
4274 if test -f "$ac_dir/$ac_t"; then
4275 ac_aux_dir=$ac_dir
4276 ac_install_sh="$ac_aux_dir/$ac_t -c"
4277 break 2
4278 fi
4279 done
4280done
4281if test -z "$ac_aux_dir"; then
4282 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
4283fi
770d76d7 4284
c971b7fa
PA
4285# These three variables are undocumented and unsupported,
4286# and are intended to be withdrawn in a future Autoconf release.
4287# They can cause serious problems if a builder's source tree is in a directory
4288# whose full name contains unusual characters.
4289ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4290ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4291ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
770d76d7 4292
770d76d7 4293
c971b7fa
PA
4294# Make sure we can run config.sub.
4295$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
4296 as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
770d76d7 4297
c971b7fa
PA
4298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4299$as_echo_n "checking build system type... " >&6; }
4300if test "${ac_cv_build+set}" = set; then :
4301 $as_echo_n "(cached) " >&6
770d76d7 4302else
c971b7fa
PA
4303 ac_build_alias=$build_alias
4304test "x$ac_build_alias" = x &&
4305 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4306test "x$ac_build_alias" = x &&
4307 as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
4308ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
4309 as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
4310
770d76d7 4311fi
c971b7fa
PA
4312{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4313$as_echo "$ac_cv_build" >&6; }
4314case $ac_cv_build in
4315*-*-*) ;;
4316*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
770d76d7 4317esac
c971b7fa
PA
4318build=$ac_cv_build
4319ac_save_IFS=$IFS; IFS='-'
4320set x $ac_cv_build
4321shift
4322build_cpu=$1
4323build_vendor=$2
4324shift; shift
4325# Remember, the first character of IFS is used to create $*,
4326# except with old shells:
4327build_os=$*
4328IFS=$ac_save_IFS
4329case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
770d76d7
PA
4330
4331
c971b7fa
PA
4332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4333$as_echo_n "checking host system type... " >&6; }
4334if test "${ac_cv_host+set}" = set; then :
81ecdfbb
RW
4335 $as_echo_n "(cached) " >&6
4336else
c971b7fa
PA
4337 if test "x$host_alias" = x; then
4338 ac_cv_host=$ac_cv_build
81ecdfbb 4339else
c971b7fa
PA
4340 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
4341 as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
81ecdfbb 4342fi
81ecdfbb
RW
4343
4344fi
c971b7fa
PA
4345{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4346$as_echo "$ac_cv_host" >&6; }
4347case $ac_cv_host in
4348*-*-*) ;;
4349*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
81ecdfbb 4350esac
c971b7fa
PA
4351host=$ac_cv_host
4352ac_save_IFS=$IFS; IFS='-'
4353set x $ac_cv_host
4354shift
4355host_cpu=$1
4356host_vendor=$2
4357shift; shift
4358# Remember, the first character of IFS is used to create $*,
4359# except with old shells:
4360host_os=$*
4361IFS=$ac_save_IFS
4362case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3388710e
JM
4363
4364
4365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4366$as_echo_n "checking target system type... " >&6; }
4367if test "${ac_cv_target+set}" = set; then :
4368 $as_echo_n "(cached) " >&6
4369else
4370 if test "x$target_alias" = x; then
4371 ac_cv_target=$ac_cv_host
4372else
4373 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
4374 as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
4375fi
4376
4377fi
4378{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4379$as_echo "$ac_cv_target" >&6; }
4380case $ac_cv_target in
4381*-*-*) ;;
4382*) as_fn_error "invalid value of canonical target" "$LINENO" 5;;
4383esac
4384target=$ac_cv_target
4385ac_save_IFS=$IFS; IFS='-'
4386set x $ac_cv_target
4387shift
4388target_cpu=$1
4389target_vendor=$2
4390shift; shift
4391# Remember, the first character of IFS is used to create $*,
4392# except with old shells:
4393target_os=$*
4394IFS=$ac_save_IFS
4395case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4396
4397
4398# The aliases save the names the user supplied, while $host etc.
4399# will get canonicalized.
4400test -n "$target_alias" &&
4401 test "$program_prefix$program_suffix$program_transform_name" = \
4402 NONENONEs,x,x, &&
4403 program_prefix=${target_alias}-
4404
4405# The tests for host and target for $enable_largefile require
4406# canonical names.
4407
4408
81ecdfbb 4409
da2f07f1
JK
4410# As the $enable_largefile decision depends on --enable-plugins we must set it
4411# even in directories otherwise not depending on the $plugins option.
4412
4413
2974be62
AM
4414 maybe_plugins=no
4415 for ac_header in dlfcn.h
4416do :
4417 ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
4418"
4419if test "x$ac_cv_header_dlfcn_h" = x""yes; then :
4420 cat >>confdefs.h <<_ACEOF
4421#define HAVE_DLFCN_H 1
4422_ACEOF
4423 maybe_plugins=yes
4424fi
4425
4426done
4427
4428 for ac_header in windows.h
4429do :
4430 ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
4431"
4432if test "x$ac_cv_header_windows_h" = x""yes; then :
4433 cat >>confdefs.h <<_ACEOF
4434#define HAVE_WINDOWS_H 1
4435_ACEOF
4436 maybe_plugins=yes
4437fi
4438
4439done
4440
4441
4442 # Check whether --enable-plugins was given.
da2f07f1
JK
4443if test "${enable_plugins+set}" = set; then :
4444 enableval=$enable_plugins; case "${enableval}" in
2974be62
AM
4445 no) plugins=no ;;
4446 *) plugins=yes
4447 if test "$maybe_plugins" != "yes" ; then
4448 as_fn_error "Building with plugin support requires a host that supports dlopen." "$LINENO" 5
4449 fi ;;
4450 esac
da2f07f1 4451else
2974be62
AM
4452 plugins=$maybe_plugins
4453
da2f07f1
JK
4454fi
4455
2974be62
AM
4456 if test "$plugins" = "yes"; then
4457 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
4458$as_echo_n "checking for library containing dlopen... " >&6; }
4459if test "${ac_cv_search_dlopen+set}" = set; then :
4460 $as_echo_n "(cached) " >&6
4461else
4462 ac_func_search_save_LIBS=$LIBS
4463cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4464/* end confdefs.h. */
4465
4466/* Override any GCC internal prototype to avoid an error.
4467 Use char because int might match the return type of a GCC
4468 builtin and then its argument prototype would still apply. */
4469#ifdef __cplusplus
4470extern "C"
4471#endif
4472char dlopen ();
4473int
4474main ()
4475{
4476return dlopen ();
4477 ;
4478 return 0;
4479}
4480_ACEOF
4481for ac_lib in '' dl; do
4482 if test -z "$ac_lib"; then
4483 ac_res="none required"
4484 else
4485 ac_res=-l$ac_lib
4486 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4487 fi
4488 if ac_fn_c_try_link "$LINENO"; then :
4489 ac_cv_search_dlopen=$ac_res
4490fi
4491rm -f core conftest.err conftest.$ac_objext \
4492 conftest$ac_exeext
4493 if test "${ac_cv_search_dlopen+set}" = set; then :
4494 break
4495fi
4496done
4497if test "${ac_cv_search_dlopen+set}" = set; then :
4498
4499else
4500 ac_cv_search_dlopen=no
4501fi
4502rm conftest.$ac_ext
4503LIBS=$ac_func_search_save_LIBS
4504fi
4505{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
4506$as_echo "$ac_cv_search_dlopen" >&6; }
4507ac_res=$ac_cv_search_dlopen
4508if test "$ac_res" != no; then :
4509 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4510
4511fi
4512
4513 fi
da2f07f1
JK
4514
4515
4516case "${host}" in
4517 sparc-*-solaris*|i[3-7]86-*-solaris*)
4518 # On native 32bit sparc and ia32 solaris, large-file and procfs support
4519 # are mutually exclusive; and without procfs support, the bfd/ elf module
4520 # cannot provide certain routines such as elfcore_write_prpsinfo
4521 # or elfcore_write_prstatus. So unless the user explicitly requested
4522 # large-file support through the --enable-largefile switch, disable
4523 # large-file support in favor of procfs support.
4524 test "${target}" = "${host}" -a "x$plugins" = xno \
4525 && : ${enable_largefile="no"}
4526 ;;
4527esac
4528
4529# Check whether --enable-largefile was given.
4530if test "${enable_largefile+set}" = set; then :
4531 enableval=$enable_largefile;
4532fi
4533
4534if test "$enable_largefile" != no; then
4535
4536 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4537$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
4538if test "${ac_cv_sys_largefile_CC+set}" = set; then :
4539 $as_echo_n "(cached) " >&6
4540else
4541 ac_cv_sys_largefile_CC=no
4542 if test "$GCC" != yes; then
4543 ac_save_CC=$CC
4544 while :; do
4545 # IRIX 6.2 and later do not support large files by default,
4546 # so use the C compiler's -n32 option if that helps.
4547 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4548/* end confdefs.h. */
4549#include <sys/types.h>
4550 /* Check that off_t can represent 2**63 - 1 correctly.
4551 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4552 since some C++ compilers masquerading as C compilers
4553 incorrectly reject 9223372036854775807. */
4554#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4555 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4556 && LARGE_OFF_T % 2147483647 == 1)
4557 ? 1 : -1];
4558int
4559main ()
4560{
4561
4562 ;
4563 return 0;
4564}
4565_ACEOF
4566 if ac_fn_c_try_compile "$LINENO"; then :
4567 break
4568fi
4569rm -f core conftest.err conftest.$ac_objext
4570 CC="$CC -n32"
4571 if ac_fn_c_try_compile "$LINENO"; then :
4572 ac_cv_sys_largefile_CC=' -n32'; break
4573fi
4574rm -f core conftest.err conftest.$ac_objext
4575 break
4576 done
4577 CC=$ac_save_CC
4578 rm -f conftest.$ac_ext
4579 fi
4580fi
4581{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4582$as_echo "$ac_cv_sys_largefile_CC" >&6; }
4583 if test "$ac_cv_sys_largefile_CC" != no; then
4584 CC=$CC$ac_cv_sys_largefile_CC
4585 fi
4586
4587 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4588$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
4589if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
4590 $as_echo_n "(cached) " >&6
4591else
4592 while :; do
4593 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4594/* end confdefs.h. */
4595#include <sys/types.h>
4596 /* Check that off_t can represent 2**63 - 1 correctly.
4597 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4598 since some C++ compilers masquerading as C compilers
4599 incorrectly reject 9223372036854775807. */
4600#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4601 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4602 && LARGE_OFF_T % 2147483647 == 1)
4603 ? 1 : -1];
4604int
4605main ()
4606{
4607
4608 ;
4609 return 0;
4610}
4611_ACEOF
4612if ac_fn_c_try_compile "$LINENO"; then :
4613 ac_cv_sys_file_offset_bits=no; break
4614fi
4615rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4616 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4617/* end confdefs.h. */
4618#define _FILE_OFFSET_BITS 64
4619#include <sys/types.h>
4620 /* Check that off_t can represent 2**63 - 1 correctly.
4621 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4622 since some C++ compilers masquerading as C compilers
4623 incorrectly reject 9223372036854775807. */
4624#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4625 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4626 && LARGE_OFF_T % 2147483647 == 1)
4627 ? 1 : -1];
4628int
4629main ()
4630{
4631
4632 ;
4633 return 0;
4634}
4635_ACEOF
4636if ac_fn_c_try_compile "$LINENO"; then :
4637 ac_cv_sys_file_offset_bits=64; break
4638fi
4639rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4640 ac_cv_sys_file_offset_bits=unknown
4641 break
4642done
4643fi
4644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4645$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4646case $ac_cv_sys_file_offset_bits in #(
4647 no | unknown) ;;
4648 *)
4649cat >>confdefs.h <<_ACEOF
4650#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4651_ACEOF
4652;;
4653esac
4654rm -rf conftest*
4655 if test $ac_cv_sys_file_offset_bits = unknown; then
4656 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4657$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
4658if test "${ac_cv_sys_large_files+set}" = set; then :
4659 $as_echo_n "(cached) " >&6
4660else
4661 while :; do
4662 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4663/* end confdefs.h. */
4664#include <sys/types.h>
4665 /* Check that off_t can represent 2**63 - 1 correctly.
4666 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4667 since some C++ compilers masquerading as C compilers
4668 incorrectly reject 9223372036854775807. */
4669#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4670 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4671 && LARGE_OFF_T % 2147483647 == 1)
4672 ? 1 : -1];
4673int
4674main ()
4675{
4676
4677 ;
4678 return 0;
4679}
4680_ACEOF
4681if ac_fn_c_try_compile "$LINENO"; then :
4682 ac_cv_sys_large_files=no; break
4683fi
4684rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4685 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4686/* end confdefs.h. */
4687#define _LARGE_FILES 1
4688#include <sys/types.h>
4689 /* Check that off_t can represent 2**63 - 1 correctly.
4690 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4691 since some C++ compilers masquerading as C compilers
4692 incorrectly reject 9223372036854775807. */
4693#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4694 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4695 && LARGE_OFF_T % 2147483647 == 1)
4696 ? 1 : -1];
4697int
4698main ()
4699{
4700
4701 ;
4702 return 0;
4703}
4704_ACEOF
4705if ac_fn_c_try_compile "$LINENO"; then :
4706 ac_cv_sys_large_files=1; break
4707fi
4708rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4709 ac_cv_sys_large_files=unknown
4710 break
4711done
4712fi
4713{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4714$as_echo "$ac_cv_sys_large_files" >&6; }
4715case $ac_cv_sys_large_files in #(
4716 no | unknown) ;;
4717 *)
4718cat >>confdefs.h <<_ACEOF
4719#define _LARGE_FILES $ac_cv_sys_large_files
4720_ACEOF
4721;;
4722esac
4723rm -rf conftest*
4724 fi
4725fi
4726
4727
4728
81ecdfbb
RW
4729
4730
4731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5
4732$as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; }
4733if test "${am_cv_prog_cc_stdc+set}" = set; then :
4734 $as_echo_n "(cached) " >&6
4735else
4736 am_cv_prog_cc_stdc=no
4737ac_save_CC="$CC"
4738# Don't try gcc -ansi; that turns off useful extensions and
4739# breaks some systems' header files.
4740# AIX -qlanglvl=ansi
4741# Ultrix and OSF/1 -std1
4742# HP-UX 10.20 and later -Ae
4743# HP-UX older versions -Aa -D_HPUX_SOURCE
4744# SVR4 -Xc -D__EXTENSIONS__
4745for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4746do
783e057b 4747 CC="$ac_save_CC $ac_arg"
81ecdfbb 4748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4749/* end confdefs.h. */
4750#include <stdarg.h>
4751#include <stdio.h>
4752#include <sys/types.h>
4753#include <sys/stat.h>
4754/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4755struct buf { int x; };
4756FILE * (*rcsopen) (struct buf *, struct stat *, int);
4757static char *e (p, i)
4758 char **p;
4759 int i;
4760{
4761 return p[i];
4762}
4763static char *f (char * (*g) (char **, int), char **p, ...)
4764{
4765 char *s;
4766 va_list v;
4767 va_start (v,p);
4768 s = g (p, va_arg (v,int));
4769 va_end (v);
4770 return s;
4771}
4772int test (int i, double x);
4773struct s1 {int (*f) (int a);};
4774struct s2 {int (*f) (double a);};
4775int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4776int argc;
4777char **argv;
4778
4779int
4780main ()
4781{
4782
4783return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4784
4785 ;
4786 return 0;
4787}
4788_ACEOF
81ecdfbb 4789if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4790 am_cv_prog_cc_stdc="$ac_arg"; break
783e057b 4791fi
81ecdfbb 4792rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
4793done
4794CC="$ac_save_CC"
4795
4796fi
4797
4798if test -z "$am_cv_prog_cc_stdc"; then
81ecdfbb
RW
4799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4800$as_echo "none needed" >&6; }
783e057b 4801else
81ecdfbb
RW
4802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5
4803$as_echo "$am_cv_prog_cc_stdc" >&6; }
783e057b
DJ
4804fi
4805case "x$am_cv_prog_cc_stdc" in
4806 x|xno) ;;
4807 *) CC="$CC $am_cv_prog_cc_stdc" ;;
4808esac
4809
4869db5e
RM
4810# expand $ac_aux_dir to an absolute path
4811am_aux_dir=`cd $ac_aux_dir && pwd`
4812
4813if test x"${install_sh}" != xset; then
4814 case $am_aux_dir in
4815 *\ * | *\ *)
4816 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
4817 *)
4818 install_sh="\${SHELL} $am_aux_dir/install-sh"
4819 esac
4820fi
4821
4822# Installed binaries are usually stripped using `strip' when the user
4823# run `make install-strip'. However `strip' might not be the right
4824# tool to use in cross-compilation environments, therefore Automake
4825# will honor the `STRIP' environment variable to overrule this program.
4826if test "$cross_compiling" != no; then
4827 if test -n "$ac_tool_prefix"; then
4828 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4829set dummy ${ac_tool_prefix}strip; ac_word=$2
4830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4831$as_echo_n "checking for $ac_word... " >&6; }
4832if test "${ac_cv_prog_STRIP+set}" = set; then :
4833 $as_echo_n "(cached) " >&6
4834else
4835 if test -n "$STRIP"; then
4836 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4837else
4838as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4839for as_dir in $PATH
4840do
4841 IFS=$as_save_IFS
4842 test -z "$as_dir" && as_dir=.
4843 for ac_exec_ext in '' $ac_executable_extensions; do
4844 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4845 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4846 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4847 break 2
4848 fi
4849done
4850 done
4851IFS=$as_save_IFS
4852
4853fi
4854fi
4855STRIP=$ac_cv_prog_STRIP
4856if test -n "$STRIP"; then
4857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
4858$as_echo "$STRIP" >&6; }
4859else
4860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4861$as_echo "no" >&6; }
4862fi
4863
4864
4865fi
4866if test -z "$ac_cv_prog_STRIP"; then
4867 ac_ct_STRIP=$STRIP
4868 # Extract the first word of "strip", so it can be a program name with args.
4869set dummy strip; ac_word=$2
4870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4871$as_echo_n "checking for $ac_word... " >&6; }
4872if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
4873 $as_echo_n "(cached) " >&6
4874else
4875 if test -n "$ac_ct_STRIP"; then
4876 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
4877else
4878as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4879for as_dir in $PATH
4880do
4881 IFS=$as_save_IFS
4882 test -z "$as_dir" && as_dir=.
4883 for ac_exec_ext in '' $ac_executable_extensions; do
4884 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4885 ac_cv_prog_ac_ct_STRIP="strip"
4886 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4887 break 2
4888 fi
4889done
4890 done
4891IFS=$as_save_IFS
4892
4893fi
4894fi
4895ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
4896if test -n "$ac_ct_STRIP"; then
4897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
4898$as_echo "$ac_ct_STRIP" >&6; }
4899else
4900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4901$as_echo "no" >&6; }
4902fi
4903
4904 if test "x$ac_ct_STRIP" = x; then
4905 STRIP=":"
4906 else
4907 case $cross_compiling:$ac_tool_warned in
4908yes:)
4909{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4910$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4911ac_tool_warned=yes ;;
4912esac
4913 STRIP=$ac_ct_STRIP
4914 fi
4915else
4916 STRIP="$ac_cv_prog_STRIP"
4917fi
4918
4919fi
4920INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
4921
783e057b
DJ
4922
4923ac_aux_dir=
81ecdfbb
RW
4924for ac_dir in .. "$srcdir"/..; do
4925 for ac_t in install-sh install.sh shtool; do
4926 if test -f "$ac_dir/$ac_t"; then
4927 ac_aux_dir=$ac_dir
4928 ac_install_sh="$ac_aux_dir/$ac_t -c"
4929 break 2
4930 fi
4931 done
783e057b
DJ
4932done
4933if test -z "$ac_aux_dir"; then
81ecdfbb 4934 as_fn_error "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
783e057b 4935fi
81ecdfbb
RW
4936
4937# These three variables are undocumented and unsupported,
4938# and are intended to be withdrawn in a future Autoconf release.
4939# They can cause serious problems if a builder's source tree is in a directory
4940# whose full name contains unusual characters.
4941ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4942ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4943ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4944
783e057b 4945
783e057b 4946
9009e1ae
MR
4947test "$program_prefix" != NONE &&
4948 program_transform_name="s&^&$program_prefix&;$program_transform_name"
4949# Use a double $ so make ignores it.
4950test "$program_suffix" != NONE &&
4951 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
4952# Double any \ or $.
4953# By default was `s,x,x', remove it if useless.
4954ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
4955program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
4956
81ecdfbb 4957
3bc3d82a
PA
4958# See if we are building with C++, and substitute COMPILER.
4959
4960 # Check whether --enable-build-with-cxx was given.
4961if test "${enable_build_with_cxx+set}" = set; then :
4962 enableval=$enable_build_with_cxx; case $enableval in
4963 yes | no)
4964 ;;
4965 *)
4966 as_fn_error "bad value $enableval for --enable-build-with-cxx" "$LINENO" 5 ;;
4967 esac
4968else
a2358508 4969 enable_build_with_cxx=yes
3bc3d82a
PA
4970fi
4971
4972
4973 if test "$enable_build_with_cxx" = "yes"; then
dad44a1f 4974 COMPILER='$(CXX)'
a994041d 4975 COMPILER_CFLAGS='$(CXXFLAGS)'
3bc3d82a
PA
4976 else
4977 COMPILER='$(CC)'
a994041d 4978 COMPILER_CFLAGS='$(CFLAGS)'
3bc3d82a
PA
4979 fi
4980
4981
4982
a994041d 4983
a417dc56
RW
4984# Dependency checking.
4985rm -rf .tst 2>/dev/null
4986mkdir .tst 2>/dev/null
4987if test -d .tst; then
4988 am__leading_dot=.
4989else
4990 am__leading_dot=_
4991fi
4992rmdir .tst 2>/dev/null
4993
4994DEPDIR="${am__leading_dot}deps"
4995
81ecdfbb 4996ac_config_commands="$ac_config_commands depdir"
a417dc56
RW
4997
4998
4999depcc="$CC" am_compiler_list=
5000
5001am_depcomp=$ac_aux_dir/depcomp
81ecdfbb
RW
5002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
5003$as_echo_n "checking dependency style of $depcc... " >&6; }
5004if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
5005 $as_echo_n "(cached) " >&6
a417dc56
RW
5006else
5007 if test -f "$am_depcomp"; then
5008 # We make a subdir and do the tests there. Otherwise we can end up
5009 # making bogus files that we don't know about and never remove. For
5010 # instance it was reported that on HP-UX the gcc test will end up
5011 # making a dummy file named `D' -- because `-MD' means `put the output
5012 # in D'.
5013 mkdir conftest.dir
5014 # Copy depcomp to subdir because otherwise we won't find it if we're
5015 # using a relative directory.
5016 cp "$am_depcomp" conftest.dir
5017 cd conftest.dir
5018 # We will build objects and dependencies in a subdirectory because
5019 # it helps to detect inapplicable dependency modes. For instance
5020 # both Tru64's cc and ICC support -MD to output dependencies as a
5021 # side effect of compilation, but ICC will put the dependencies in
5022 # the current directory while Tru64 will put them in the object
5023 # directory.
5024 mkdir sub
5025
5026 am_cv_CC_dependencies_compiler_type=none
5027 if test "$am_compiler_list" = ""; then
5028 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
5029 fi
5030 for depmode in $am_compiler_list; do
5031 if test $depmode = none; then break; fi
5032
81ecdfbb 5033 $as_echo "$as_me:$LINENO: trying $depmode" >&5
a417dc56
RW
5034 # Setup a source with many dependencies, because some compilers
5035 # like to wrap large dependency lists on column 80 (with \), and
5036 # we should not choose a depcomp mode which is confused by this.
5037 #
5038 # We need to recreate these files for each test, as the compiler may
5039 # overwrite some of them when testing with obscure command lines.
5040 # This happens at least with the AIX C compiler.
5041 : > sub/conftest.c
5042 for i in 1 2 3 4 5 6; do
5043 echo '#include "conftst'$i'.h"' >> sub/conftest.c
5044 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
5045 # Solaris 8's {/usr,}/bin/sh.
5046 touch sub/conftst$i.h
5047 done
5048 echo "include sub/conftest.Po" > confmf
5049
5050 # We check with `-c' and `-o' for the sake of the "dashmstdout"
5051 # mode. It turns out that the SunPro C++ compiler does not properly
5052 # handle `-M -o', and we need to detect this.
5053 depcmd="depmode=$depmode \
5054 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
5055 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
5056 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
5057 echo "| $depcmd" | sed -e 's/ */ /g' >&5
5058 if env $depcmd > conftest.err 2>&1 &&
5059 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
5060 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
5061 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
5062 # icc doesn't choke on unknown options, it will just issue warnings
5063 # or remarks (even with -Werror). So we grep stderr for any message
5064 # that says an option was ignored or not supported.
5065 # When given -MP, icc 7.0 and 7.1 complain thusly:
5066 # icc: Command line warning: ignoring option '-M'; no argument required
5067 # The diagnosis changed in icc 8.0:
5068 # icc: Command line remark: option '-MP' not supported
5069 if (grep 'ignoring option' conftest.err ||
5070 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
5071 am_cv_CC_dependencies_compiler_type=$depmode
81ecdfbb 5072 $as_echo "$as_me:$LINENO: success" >&5
a417dc56
RW
5073 break
5074 fi
5075 fi
81ecdfbb 5076 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
a417dc56
RW
5077 sed -e 's/^/| /' < conftest.err >&5
5078 done
5079
5080 cd ..
5081 rm -rf conftest.dir
5082else
5083 am_cv_CC_dependencies_compiler_type=none
5084fi
5085
5086fi
81ecdfbb
RW
5087{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
5088$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
a417dc56 5089if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
81ecdfbb 5090then as_fn_error "no usable dependency style found" "$LINENO" 5
a417dc56
RW
5091else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
5092
5093fi
5094
5095
5096# Check for the 'make' the user wants to use.
5097for ac_prog in make
5098do
5099 # Extract the first word of "$ac_prog", so it can be a program name with args.
5100set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
5101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5102$as_echo_n "checking for $ac_word... " >&6; }
5103if test "${ac_cv_prog_MAKE+set}" = set; then :
5104 $as_echo_n "(cached) " >&6
a417dc56
RW
5105else
5106 if test -n "$MAKE"; then
5107 ac_cv_prog_MAKE="$MAKE" # Let the user override the test.
5108else
5109as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5110for as_dir in $PATH
5111do
5112 IFS=$as_save_IFS
5113 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5114 for ac_exec_ext in '' $ac_executable_extensions; do
5115 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
a417dc56 5116 ac_cv_prog_MAKE="$ac_prog"
81ecdfbb 5117 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
a417dc56
RW
5118 break 2
5119 fi
5120done
81ecdfbb
RW
5121 done
5122IFS=$as_save_IFS
a417dc56
RW
5123
5124fi
5125fi
5126MAKE=$ac_cv_prog_MAKE
5127if test -n "$MAKE"; then
81ecdfbb
RW
5128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
5129$as_echo "$MAKE" >&6; }
a417dc56 5130else
81ecdfbb
RW
5131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5132$as_echo "no" >&6; }
a417dc56
RW
5133fi
5134
81ecdfbb 5135
a417dc56
RW
5136 test -n "$MAKE" && break
5137done
5138
5139MAKE_IS_GNU=
5140case "`$MAKE --version 2>&1 | sed 1q`" in
5141 *GNU*)
5142 MAKE_IS_GNU=yes
5143 ;;
5144esac
81ecdfbb 5145 if test "$MAKE_IS_GNU" = yes; then
a417dc56
RW
5146 GMAKE_TRUE=
5147 GMAKE_FALSE='#'
5148else
5149 GMAKE_TRUE='#'
5150 GMAKE_FALSE=
5151fi
5152
81ecdfbb
RW
5153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
5154$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
5155set x ${MAKE-make}
5156ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
5157if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
5158 $as_echo_n "(cached) " >&6
a417dc56
RW
5159else
5160 cat >conftest.make <<\_ACEOF
81ecdfbb 5161SHELL = /bin/sh
a417dc56 5162all:
81ecdfbb 5163 @echo '@@@%%%=$(MAKE)=@@@%%%'
a417dc56
RW
5164_ACEOF
5165# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
81ecdfbb
RW
5166case `${MAKE-make} -f conftest.make 2>/dev/null` in
5167 *@@@%%%=?*=@@@%%%*)
5168 eval ac_cv_prog_make_${ac_make}_set=yes;;
5169 *)
5170 eval ac_cv_prog_make_${ac_make}_set=no;;
5171esac
a417dc56
RW
5172rm -f conftest.make
5173fi
81ecdfbb
RW
5174if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
5175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5176$as_echo "yes" >&6; }
a417dc56
RW
5177 SET_MAKE=
5178else
81ecdfbb
RW
5179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5180$as_echo "no" >&6; }
a417dc56
RW
5181 SET_MAKE="MAKE=${MAKE-make}"
5182fi
5183
5184
648d586d
JB
5185gnulib_extra_configure_args=
5186# If large-file support is disabled, make sure gnulib does the same.
5187if test "$enable_largefile" = no; then
5188gnulib_extra_configure_args="$gnulib_extra_configure_args --disable-largefile"
5189fi
5190
c971b7fa
PA
5191# Configure gnulib. We need to build gnulib under some other
5192# directory not "gnulib", to avoid the problem of both GDB and
5193# GDBserver wanting to build it in the same directory, when building
5194# in the source dir.
783e057b 5195
c971b7fa
PA
5196 in_src="gnulib"
5197 in_build="build-gnulib"
648d586d 5198 in_extra_args="$gnulib_extra_configure_args"
c971b7fa
PA
5199
5200 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
5201 # so they do not pile up.
5202 ac_sub_configure_args=
5203 ac_prev=
5204 eval "set x $ac_configure_args"
5205 shift
5206 for ac_arg
5207 do
5208 if test -n "$ac_prev"; then
5209 ac_prev=
5210 continue
5211 fi
5212 case $ac_arg in
5213 -cache-file | --cache-file | --cache-fil | --cache-fi \
5214 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
5215 ac_prev=cache_file ;;
5216 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
5217 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
5218 | --c=*)
5219 ;;
5220 --config-cache | -C)
5221 ;;
5222 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
5223 ac_prev=srcdir ;;
5224 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
5225 ;;
5226 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
5227 ac_prev=prefix ;;
5228 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
5229 ;;
5230 --disable-option-checking)
5231 ;;
5232 *)
5233 case $ac_arg in
5234 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
5235 esac
5236 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
5237 esac
5238 done
5239
5240 # Always prepend --prefix to ensure using the same prefix
5241 # in subdir configurations.
5242 ac_arg="--prefix=$prefix"
5243 case $ac_arg in
5244 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
5245 esac
5246 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
5247
5248 # Pass --silent
5249 if test "$silent" = yes; then
5250 ac_sub_configure_args="--silent $ac_sub_configure_args"
5251 fi
5252
5253 # Always prepend --disable-option-checking to silence warnings, since
5254 # different subdirs can have different --enable and --with options.
5255 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
5256
5257 ac_popdir=`pwd`
5258 ac_dir=$in_build
5259
5260 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
5261 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
5262 $as_echo "$ac_msg" >&6
5263 as_dir="$ac_dir"; as_fn_mkdir_p
5264
38ea300a
PA
5265 case $srcdir in
5266 [\\/]* | ?:[\\/]* )
5267 ac_srcdir=$srcdir/$in_src ;;
5268 *) # Relative name.
5269 ac_srcdir=../$srcdir/$in_src ;;
5270 esac
c971b7fa
PA
5271
5272 cd "$ac_dir"
5273
5274 ac_sub_configure=$ac_srcdir/configure
5275
5276 # Make the cache file name correct relative to the subdirectory.
5277 case $cache_file in
5278 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
5279 *) # Relative name.
5280 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
5281 esac
5282
648d586d
JB
5283 if test -n "$in_extra_args"; then
5284 # Add the extra args at the end.
5285 ac_sub_configure_args="$ac_sub_configure_args $in_extra_args"
5286 fi
5287
c971b7fa
PA
5288 { $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
5289$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
5290 # The eval makes quoting arguments work.
5291 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
5292 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
5293 as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
5294
5295 cd "$ac_popdir"
783e057b 5296
c971b7fa
PA
5297
5298
5299CONFIG_OBS=
5300CONFIG_DEPS=
5301CONFIG_SRCS=
5302ENABLE_CFLAGS=
5303
5304CONFIG_ALL=
5305CONFIG_CLEAN=
5306CONFIG_INSTALL=
5307CONFIG_UNINSTALL=
5308
5309# If we haven't got the data from the intl directory,
5310# assume NLS is disabled.
5311USE_NLS=no
5312LIBINTL=
5313LIBINTL_DEP=
5314INCINTL=
5315XGETTEXT=
5316GMSGFMT=
5317POSUB=
783e057b
DJ
5318
5319if test -f ../intl/config.intl; then
5320 . ../intl/config.intl
5321fi
81ecdfbb
RW
5322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
5323$as_echo_n "checking whether NLS is requested... " >&6; }
783e057b 5324if test x"$USE_NLS" != xyes; then
81ecdfbb
RW
5325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5326$as_echo "no" >&6; }
783e057b 5327else
81ecdfbb
RW
5328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5329$as_echo "yes" >&6; }
783e057b 5330
81ecdfbb 5331$as_echo "#define ENABLE_NLS 1" >>confdefs.h
783e057b
DJ
5332
5333
81ecdfbb
RW
5334 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
5335$as_echo_n "checking for catalogs to be installed... " >&6; }
783e057b
DJ
5336 # Look for .po and .gmo files in the source directory.
5337 CATALOGS=
5338 XLINGUAS=
5339 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
5340 # If there aren't any .gmo files the shell will give us the
5341 # literal string "../path/to/srcdir/po/*.gmo" which has to be
5342 # weeded out.
5343 case "$cat" in *\**)
5344 continue;;
5345 esac
5346 # The quadruple backslash is collapsed to a double backslash
5347 # by the backticks, then collapsed again by the double quotes,
5348 # leaving us with one backslash in the sed expression (right
5349 # before the dot that mustn't act as a wildcard).
c971b7fa
PA
5350 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
5351 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
5352 # The user is allowed to set LINGUAS to a list of languages to
5353 # install catalogs for. If it's empty that means "all of them."
5354 if test "x$LINGUAS" = x; then
5355 CATALOGS="$CATALOGS $cat"
5356 XLINGUAS="$XLINGUAS $lang"
5357 else
5358 case "$LINGUAS" in *$lang*)
5359 CATALOGS="$CATALOGS $cat"
5360 XLINGUAS="$XLINGUAS $lang"
5361 ;;
5362 esac
e28b3332
DJ
5363 fi
5364 done
c971b7fa
PA
5365 LINGUAS="$XLINGUAS"
5366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
5367$as_echo "$LINGUAS" >&6; }
5368
5369
5370 DATADIRNAME=share
5371
5372 INSTOBJEXT=.mo
5373
5374 GENCAT=gencat
5375
5376 CATOBJEXT=.gmo
e28b3332 5377
e28b3332
DJ
5378fi
5379
c971b7fa
PA
5380localedir='${datadir}/locale'
5381
5382
5383if test x"$USE_NLS" = xyes; then
5384 CONFIG_ALL="$CONFIG_ALL all-po"
5385 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
5386 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
5387 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
e28b3332 5388fi
e28b3332 5389
c971b7fa
PA
5390GNULIB=build-gnulib/import
5391
5392# For Makefile dependencies.
5393GNULIB_STDINT_H=
5394if test x"$STDINT_H" != x; then
5395 GNULIB_STDINT_H=$GNULIB/$STDINT_H
e28b3332
DJ
5396fi
5397
5398
c971b7fa
PA
5399PACKAGE=gdb
5400
5401cat >>confdefs.h <<_ACEOF
5402#define PACKAGE "$PACKAGE"
5403_ACEOF
5404
5405
5406
5407# We never need to detect it in this sub-configure.
5408# But preserve it for config.status --recheck.
5409
5410
5411
5412MAKEINFO_EXTRA_FLAGS=""
5413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5
5414$as_echo_n "checking whether $MAKEINFO supports @click... " >&6; }
5415if test "${gdb_cv_have_makeinfo_click+set}" = set; then :
5416 $as_echo_n "(cached) " >&6
5417else
5418 echo '@clicksequence{a @click{} b}' >conftest.texinfo
5419 if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then
5420 gdb_cv_have_makeinfo_click=yes
5421 else
5422 gdb_cv_have_makeinfo_click=no
5423 fi
5424fi
5425{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5
5426$as_echo "$gdb_cv_have_makeinfo_click" >&6; }
5427if test x"$gdb_cv_have_makeinfo_click" = xyes; then
5428 MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK"
5429fi
e28b3332
DJ
5430
5431
bec39cab
AC
5432
5433
81ecdfbb
RW
5434# Check whether --with-separate-debug-dir was given.
5435if test "${with_separate_debug_dir+set}" = set; then :
5436 withval=$with_separate_debug_dir;
b14b1491
TT
5437 DEBUGDIR=$withval
5438else
5439 DEBUGDIR=${libdir}/debug
81ecdfbb
RW
5440fi
5441
20e95c23 5442
783e057b
DJ
5443 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5444 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 5445 ac_define_dir=`eval echo $DEBUGDIR`
783e057b 5446 ac_define_dir=`eval echo $ac_define_dir`
20e95c23 5447
783e057b
DJ
5448cat >>confdefs.h <<_ACEOF
5449#define DEBUGDIR "$ac_define_dir"
20e95c23 5450_ACEOF
20e95c23 5451
20e95c23 5452
20e95c23 5453
0c4a4063 5454
b14b1491
TT
5455 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
5456 if test "x$prefix" = xNONE; then
5457 test_prefix=/usr/local
5458 else
5459 test_prefix=$prefix
5460 fi
783e057b 5461 else
b14b1491 5462 test_prefix=$exec_prefix
783e057b 5463 fi
b14b1491
TT
5464 value=0
5465 case ${ac_define_dir} in
5466 "${test_prefix}"|"${test_prefix}/"*|\
5467 '${exec_prefix}'|'${exec_prefix}/'*)
5468 value=1
5469 ;;
5470 esac
5471
5472cat >>confdefs.h <<_ACEOF
5473#define DEBUGDIR_RELOCATABLE $value
5474_ACEOF
5475
5476
5477
0c4a4063 5478
f83d8a90
DE
5479# We can't pass paths as command line arguments.
5480# Mingw32 tries to be clever and will convert the paths for us.
5481# For example -DBINDIR="/usr/local/bin" passed on the command line may get
5482# converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin".
5483# This breaks GDB's relocatable path conversions since paths passed in
5484# config.h would not get so translated, the path prefixes no longer match.
5485
5486 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5487 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5488 ac_define_dir=`eval echo $bindir`
5489 ac_define_dir=`eval echo $ac_define_dir`
5490
5491cat >>confdefs.h <<_ACEOF
5492#define BINDIR "$ac_define_dir"
5493_ACEOF
5494
5495
5496
b14b1491
TT
5497# GDB's datadir relocation
5498
5499
5500
81ecdfbb
RW
5501# Check whether --with-gdb-datadir was given.
5502if test "${with_gdb_datadir+set}" = set; then :
5503 withval=$with_gdb_datadir;
b14b1491 5504 GDB_DATADIR=$withval
20e95c23 5505else
b14b1491 5506 GDB_DATADIR=${datadir}/gdb
81ecdfbb
RW
5507fi
5508
20e95c23 5509
b14b1491
TT
5510 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5511 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5512 ac_define_dir=`eval echo $GDB_DATADIR`
5513 ac_define_dir=`eval echo $ac_define_dir`
5514
5515cat >>confdefs.h <<_ACEOF
5516#define GDB_DATADIR "$ac_define_dir"
20e95c23
DJ
5517_ACEOF
5518
b14b1491
TT
5519
5520
0c4a4063 5521
b14b1491
TT
5522 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
5523 if test "x$prefix" = xNONE; then
5524 test_prefix=/usr/local
5525 else
5526 test_prefix=$prefix
5527 fi
5528 else
5529 test_prefix=$exec_prefix
5530 fi
5531 value=0
5532 case ${ac_define_dir} in
5533 "${test_prefix}"|"${test_prefix}/"*|\
5534 '${exec_prefix}'|'${exec_prefix}/'*)
5535 value=1
5536 ;;
5537 esac
5538
5539cat >>confdefs.h <<_ACEOF
5540#define GDB_DATADIR_RELOCATABLE $value
5541_ACEOF
5542
5543
783e057b 5544
20e95c23 5545
0c4a4063 5546
81ecdfbb
RW
5547# Check whether --with-relocated-sources was given.
5548if test "${with_relocated_sources+set}" = set; then :
5549 withval=$with_relocated_sources; reloc_srcdir="${withval}"
29b0e8a2
JM
5550
5551 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5552 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5553 ac_define_dir=`eval echo $reloc_srcdir`
5554 ac_define_dir=`eval echo $ac_define_dir`
5555
5556cat >>confdefs.h <<_ACEOF
5557#define RELOC_SRCDIR "$ac_define_dir"
5558_ACEOF
5559
5560
5561
81ecdfbb
RW
5562fi
5563
29b0e8a2 5564
7349ff92
JK
5565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5
5566$as_echo_n "checking for default auto-load directory... " >&6; }
5567
5568# Check whether --with-auto-load-dir was given.
5569if test "${with_auto_load_dir+set}" = set; then :
5570 withval=$with_auto_load_dir;
5571else
1564a261 5572 with_auto_load_dir='$debugdir:$datadir/auto-load'
7349ff92
JK
5573fi
5574
1564a261 5575escape_dir=`echo $with_auto_load_dir | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'`
7349ff92
JK
5576
5577 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5578 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5579 ac_define_dir=`eval echo $escape_dir`
5580 ac_define_dir=`eval echo $ac_define_dir`
5581
5582cat >>confdefs.h <<_ACEOF
5583#define AUTO_LOAD_DIR "$ac_define_dir"
5584_ACEOF
5585
5586
5587{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5
5588$as_echo "$with_auto_load_dir" >&6; }
5589
bccbefd2
JK
5590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5
5591$as_echo_n "checking for default auto-load safe-path... " >&6; }
5592
5593# Check whether --with-auto-load-safe-path was given.
5594if test "${with_auto_load_safe_path+set}" = set; then :
5595 withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then
6dea1fbd
JK
5596 with_auto_load_safe_path="/"
5597 fi
bccbefd2 5598else
7349ff92 5599 with_auto_load_safe_path="$with_auto_load_dir"
bccbefd2
JK
5600fi
5601
1564a261 5602escape_dir=`echo $with_auto_load_safe_path | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'`
bccbefd2
JK
5603
5604 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5605 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6dea1fbd 5606 ac_define_dir=`eval echo $escape_dir`
bccbefd2
JK
5607 ac_define_dir=`eval echo $ac_define_dir`
5608
5609cat >>confdefs.h <<_ACEOF
6dea1fbd 5610#define AUTO_LOAD_SAFE_PATH "$ac_define_dir"
bccbefd2
JK
5611_ACEOF
5612
5613
5614{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
5615$as_echo "$with_auto_load_safe_path" >&6; }
5616
29b0e8a2 5617
20e95c23 5618
5ae98d25 5619subdirs="$subdirs testsuite"
20e95c23
DJ
5620
5621
783e057b 5622# Check whether to support alternative target configurations
81ecdfbb
RW
5623# Check whether --enable-targets was given.
5624if test "${enable_targets+set}" = set; then :
5625 enableval=$enable_targets; case "${enableval}" in
5626 yes | "") as_fn_error "enable-targets option must specify target names or 'all'" "$LINENO" 5
783e057b
DJ
5627 ;;
5628 no) enable_targets= ;;
5629 *) enable_targets=$enableval ;;
5630esac
81ecdfbb
RW
5631fi
5632
20e95c23 5633
783e057b 5634# Check whether to enable 64-bit support on 32-bit hosts
81ecdfbb
RW
5635# Check whether --enable-64-bit-bfd was given.
5636if test "${enable_64_bit_bfd+set}" = set; then :
5637 enableval=$enable_64_bit_bfd; case "${enableval}" in
783e057b
DJ
5638 yes) want64=true ;;
5639 no) want64=false ;;
81ecdfbb 5640 *) as_fn_error "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
783e057b
DJ
5641esac
5642else
5643 want64=false
81ecdfbb
RW
5644fi
5645
783e057b
DJ
5646# Provide defaults for some variables set by the per-host and per-target
5647# configuration.
5648gdb_host_obs=posix-hdep.o
20e95c23 5649
783e057b
DJ
5650if test "${target}" = "${host}"; then
5651 gdb_native=yes
5652else
5653 gdb_native=no
5654fi
20e95c23 5655
783e057b 5656. $srcdir/configure.host
20e95c23 5657
fb23d554
SDJ
5658# Add in the common host objects.
5659. $srcdir/common/common.host
5660gdb_host_obs="$gdb_host_obs $common_host_obs"
5661
783e057b 5662# Accumulate some settings from configure.tgt over all enabled targets
20e95c23 5663
783e057b
DJ
5664TARGET_OBS=
5665all_targets=
b292c783 5666HAVE_NATIVE_GCORE_TARGET=
20e95c23 5667
783e057b 5668for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
20e95c23 5669do
783e057b
DJ
5670 if test "$targ_alias" = "all"; then
5671 all_targets=true
5672 else
5673 # Canonicalize the secondary target names.
5674 result=`$ac_config_sub $targ_alias 2>/dev/null`
5675 if test -n "$result"; then
5676 targ=$result
5677 else
5678 targ=$targ_alias
5679 fi
20e95c23 5680
783e057b 5681 . ${srcdir}/configure.tgt
20e95c23 5682
bf307134
JB
5683 if test -z "${gdb_target_obs}"; then :
5684 as_fn_error "configuration ${targ} is unsupported." "$LINENO" 5
5685fi
5686
783e057b
DJ
5687 # Target-specific object files
5688 for i in ${gdb_target_obs}; do
5689 case " $TARGET_OBS " in
5690 *" ${i} "*) ;;
5691 *)
5692 TARGET_OBS="$TARGET_OBS ${i}"
5693 ;;
5694 esac
5695 done
20e95c23 5696
783e057b
DJ
5697 # Check whether this target needs 64-bit CORE_ADDR
5698 if test x${want64} = xfalse; then
5699 . ${srcdir}/../bfd/config.bfd
5700 fi
b292c783
JK
5701
5702 # Check whether this target is native and supports gcore.
5703 if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \
5704 && $gdb_have_gcore; then
5705 HAVE_NATIVE_GCORE_TARGET=1
5706 fi
783e057b 5707 fi
20e95c23
DJ
5708done
5709
783e057b
DJ
5710if test x${all_targets} = xtrue; then
5711
5712 # We want all 64-bit targets if we either:
5713 # - run on a 64-bit host or
5714 # - already require 64-bit support for some other target or
5715 # - the --enable-64-bit-bfd option was supplied
5716 # Otherwise we only support all 32-bit targets.
5717 #
5718 # NOTE: This test must be in sync with the corresponding
5719 # tests in BFD!
20e95c23 5720
783e057b 5721 if test x${want64} = xfalse; then
81ecdfbb
RW
5722 # The cast to long int works around a bug in the HP C Compiler
5723# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5724# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5725# This bug is HP SR number 8606223364.
5726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
5727$as_echo_n "checking size of long... " >&6; }
5728if test "${ac_cv_sizeof_long+set}" = set; then :
5729 $as_echo_n "(cached) " >&6
c0993dbe 5730else
81ecdfbb 5731 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
c0993dbe 5732
81ecdfbb
RW
5733else
5734 if test "$ac_cv_type_long" = yes; then
5735 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5736$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5737{ as_fn_set_status 77
5738as_fn_error "cannot compute sizeof (long)
5739See \`config.log' for more details." "$LINENO" 5; }; }
5740 else
5741 ac_cv_sizeof_long=0
5742 fi
c0993dbe 5743fi
81ecdfbb 5744
c0993dbe 5745fi
81ecdfbb
RW
5746{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
5747$as_echo "$ac_cv_sizeof_long" >&6; }
c0993dbe 5748
c0993dbe 5749
c0993dbe 5750
c0993dbe
UW
5751cat >>confdefs.h <<_ACEOF
5752#define SIZEOF_LONG $ac_cv_sizeof_long
5753_ACEOF
5754
5755
5756 if test "x${ac_cv_sizeof_long}" = "x8"; then
5757 want64=true
5758 fi
5759 fi
5760 if test x${want64} = xtrue; then
5761 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
5762 else
5763 TARGET_OBS='$(ALL_TARGET_OBS)'
5764 fi
5765fi
5766
5767
5768
b292c783 5769
c0993dbe
UW
5770# For other settings, only the main target counts.
5771gdb_sim=
5772gdb_osabi=
5773build_gdbserver=
5774targ=$target; . ${srcdir}/configure.tgt
5775
5776# Fetch the default architecture and default target vector from BFD.
5777targ=$target; . $srcdir/../bfd/config.bfd
5778
5779# We only want the first architecture, so strip off the others if
5780# there is more than one.
5781targ_archs=`echo $targ_archs | sed 's/ .*//'`
5782
5783if test "x$targ_archs" != x; then
5784
5785cat >>confdefs.h <<_ACEOF
5786#define DEFAULT_BFD_ARCH $targ_archs
5787_ACEOF
5788
5789fi
5790if test "x$targ_defvec" != x; then
5791
5792cat >>confdefs.h <<_ACEOF
5793#define DEFAULT_BFD_VEC $targ_defvec
5794_ACEOF
5795
5796fi
5797
c0993dbe
UW
5798# The CLI cannot be disabled yet, but may be in the future.
5799
5800# Enable CLI.
81ecdfbb
RW
5801# Check whether --enable-gdbcli was given.
5802if test "${enable_gdbcli+set}" = set; then :
5803 enableval=$enable_gdbcli; case $enableval in
c0993dbe
UW
5804 yes)
5805 ;;
5806 no)
81ecdfbb 5807 as_fn_error "the command-line interface cannot be disabled yet" "$LINENO" 5 ;;
c0993dbe 5808 *)
81ecdfbb 5809 as_fn_error "bad value $enableval for --enable-gdbcli" "$LINENO" 5 ;;
c0993dbe
UW
5810 esac
5811else
5812 enable_gdbcli=yes
81ecdfbb
RW
5813fi
5814
c0993dbe
UW
5815if test x"$enable_gdbcli" = xyes; then
5816 if test -d $srcdir/cli; then
5817 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
5818 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
5819 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
5820 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
5821 fi
5822fi
5823
5824# Enable MI.
81ecdfbb
RW
5825# Check whether --enable-gdbmi was given.
5826if test "${enable_gdbmi+set}" = set; then :
5827 enableval=$enable_gdbmi; case $enableval in
c0993dbe
UW
5828 yes | no)
5829 ;;
5830 *)
81ecdfbb 5831 as_fn_error "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
c0993dbe
UW
5832 esac
5833else
5834 enable_gdbmi=yes
81ecdfbb
RW
5835fi
5836
c0993dbe
UW
5837if test x"$enable_gdbmi" = xyes; then
5838 if test -d $srcdir/mi; then
5839 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
5840 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
5841 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
5842 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
5843 fi
5844fi
5845
5846# Enable TUI.
81ecdfbb
RW
5847# Check whether --enable-tui was given.
5848if test "${enable_tui+set}" = set; then :
5849 enableval=$enable_tui; case $enableval in
3ca64bd3 5850 yes | no | auto)
c0993dbe
UW
5851 ;;
5852 *)
81ecdfbb 5853 as_fn_error "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
c0993dbe
UW
5854 esac
5855else
3ca64bd3 5856 enable_tui=auto
81ecdfbb
RW
5857fi
5858
c0993dbe
UW
5859
5860# Enable gdbtk.
81ecdfbb
RW
5861# Check whether --enable-gdbtk was given.
5862if test "${enable_gdbtk+set}" = set; then :
5863 enableval=$enable_gdbtk; case $enableval in
c0993dbe
UW
5864 yes | no)
5865 ;;
5866 *)
81ecdfbb 5867 as_fn_error "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
c0993dbe
UW
5868 esac
5869else
5062cc19 5870 if test -d $srcdir/gdbtk; then
c0993dbe
UW
5871 enable_gdbtk=yes
5872 else
5873 enable_gdbtk=no
5874 fi
81ecdfbb
RW
5875fi
5876
c0993dbe
UW
5877# We unconditionally disable gdbtk tests on selected platforms.
5878case $host_os in
5879 go32* | windows*)
81ecdfbb
RW
5880 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
5881$as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
c0993dbe
UW
5882 enable_gdbtk=no ;;
5883esac
5884
05e7c244 5885# Libunwind support for ia64.
bec39cab 5886
05e7c244
JK
5887
5888# Check whether --with-libunwind-ia64 was given.
5889if test "${with_libunwind_ia64+set}" = set; then :
5890 withval=$with_libunwind_ia64;
bec39cab 5891else
05e7c244
JK
5892 with_libunwind_ia64=auto
5893fi
bec39cab 5894
05e7c244
JK
5895
5896# Backward compatibility option.
5897if test "${with_libunwind+set}" = set; then
5898 if test x"$with_libunwind_ia64" != xauto; then
5899 as_fn_error "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5
5900 fi
5901 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5
5902$as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;}
5903 with_libunwind_ia64="$with_libunwind"
5904fi
5905
5906case "$with_libunwind_ia64" in
5907 yes | no)
5908 ;;
5909 auto)
5910 for ac_header in libunwind-ia64.h
81ecdfbb 5911do :
b54a8fd7
PA
5912 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
5913if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
bec39cab 5914 cat >>confdefs.h <<_ACEOF
b54a8fd7 5915#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
5916_ACEOF
5917
5918fi
5919
5920done
5921
05e7c244
JK
5922 with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h
5923 ;;
5924 *)
5925 as_fn_error "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5
5926 ;;
5927esac
bec39cab 5928
05e7c244 5929if test x"$with_libunwind_ia64" = xyes; then
b54a8fd7 5930 for ac_header in libunwind-ia64.h
81ecdfbb 5931do :
b54a8fd7
PA
5932 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
5933if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
bec39cab 5934 cat >>confdefs.h <<_ACEOF
b54a8fd7 5935#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
5936_ACEOF
5937
5938fi
5939
5940done
5941
05e7c244
JK
5942 if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then
5943 as_fn_error "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5
5944 fi
5945 CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o"
5946 CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o"
5947 CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c"
a9322a30
TT
5948fi
5949
cb01cfba
JB
5950opt_curses=no
5951
81ecdfbb
RW
5952# Check whether --with-curses was given.
5953if test "${with_curses+set}" = set; then :
5954 withval=$with_curses; opt_curses=$withval
5955fi
5956
cb01cfba 5957
76a39ba7 5958prefer_curses=no
cb01cfba 5959if test "$opt_curses" = "yes"; then
76a39ba7 5960 prefer_curses=yes
cb01cfba
JB
5961fi
5962
a9322a30 5963# Profiling support.
81ecdfbb
RW
5964# Check whether --enable-profiling was given.
5965if test "${enable_profiling+set}" = set; then :
5966 enableval=$enable_profiling; case $enableval in
a9322a30
TT
5967 yes | no)
5968 ;;
5969 *)
81ecdfbb 5970 as_fn_error "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
a9322a30
TT
5971 esac
5972else
5973 enable_profiling=no
81ecdfbb 5974fi
bec39cab 5975
a9322a30
TT
5976
5977for ac_func in monstartup _mcleanup
81ecdfbb
RW
5978do :
5979 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
5980ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
5981eval as_val=\$$as_ac_var
5982 if test "x$as_val" = x""yes; then :
5983 cat >>confdefs.h <<_ACEOF
5984#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 5985_ACEOF
a9322a30 5986
81ecdfbb
RW
5987fi
5988done
a9322a30 5989
81ecdfbb
RW
5990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
5991$as_echo_n "checking for _etext... " >&6; }
5992if test "${ac_cv_var__etext+set}" = set; then :
5993 $as_echo_n "(cached) " >&6
5994else
5995 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5996/* end confdefs.h. */
5997#include <stdlib.h>
5998extern char _etext;
a9322a30
TT
5999
6000int
6001main ()
6002{
6003free (&_etext);
6004 ;
6005 return 0;
6006}
bec39cab 6007_ACEOF
81ecdfbb 6008if ac_fn_c_try_link "$LINENO"; then :
a9322a30 6009 ac_cv_var__etext=yes
bec39cab 6010else
81ecdfbb 6011 ac_cv_var__etext=no
bec39cab 6012fi
81ecdfbb
RW
6013rm -f core conftest.err conftest.$ac_objext \
6014 conftest$ac_exeext conftest.$ac_ext
bec39cab 6015fi
81ecdfbb
RW
6016{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
6017$as_echo "$ac_cv_var__etext" >&6; }
a9322a30 6018if test $ac_cv_var__etext = yes; then
60ca704f 6019
81ecdfbb 6020$as_echo "#define HAVE__ETEXT 1" >>confdefs.h
bec39cab 6021
bec39cab 6022fi
81ecdfbb
RW
6023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
6024$as_echo_n "checking for etext... " >&6; }
6025if test "${ac_cv_var_etext+set}" = set; then :
6026 $as_echo_n "(cached) " >&6
bec39cab 6027else
81ecdfbb 6028 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6029/* end confdefs.h. */
a9322a30
TT
6030#include <stdlib.h>
6031extern char etext;
bec39cab
AC
6032
6033int
6034main ()
6035{
a9322a30 6036free (&etext);
bec39cab
AC
6037 ;
6038 return 0;
6039}
6040_ACEOF
81ecdfbb 6041if ac_fn_c_try_link "$LINENO"; then :
a9322a30 6042 ac_cv_var_etext=yes
bec39cab 6043else
81ecdfbb 6044 ac_cv_var_etext=no
bec39cab 6045fi
81ecdfbb
RW
6046rm -f core conftest.err conftest.$ac_objext \
6047 conftest$ac_exeext conftest.$ac_ext
bec39cab 6048fi
81ecdfbb
RW
6049{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
6050$as_echo "$ac_cv_var_etext" >&6; }
a9322a30
TT
6051if test $ac_cv_var_etext = yes; then
6052
81ecdfbb 6053$as_echo "#define HAVE_ETEXT 1" >>confdefs.h
bec39cab
AC
6054
6055fi
a9322a30
TT
6056if test "$enable_profiling" = yes ; then
6057 if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
81ecdfbb 6058 as_fn_error "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
a9322a30
TT
6059 fi
6060 PROFILE_CFLAGS=-pg
6061 OLD_CFLAGS="$CFLAGS"
6062 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
bec39cab 6063
81ecdfbb
RW
6064 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
6065$as_echo_n "checking whether $CC supports -pg... " >&6; }
6066if test "${ac_cv_cc_supports_pg+set}" = set; then :
6067 $as_echo_n "(cached) " >&6
bec39cab 6068else
81ecdfbb 6069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6070/* end confdefs.h. */
bec39cab
AC
6071
6072int
6073main ()
6074{
a9322a30 6075int x;
bec39cab
AC
6076 ;
6077 return 0;
6078}
6079_ACEOF
81ecdfbb 6080if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 6081 ac_cv_cc_supports_pg=yes
bec39cab 6082else
81ecdfbb 6083 ac_cv_cc_supports_pg=no
bec39cab 6084fi
81ecdfbb 6085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 6086fi
81ecdfbb
RW
6087{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
6088$as_echo "$ac_cv_cc_supports_pg" >&6; }
bec39cab 6089
a9322a30 6090 if test $ac_cv_cc_supports_pg = no; then
81ecdfbb 6091 as_fn_error "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
a9322a30 6092 fi
bec39cab 6093
a9322a30 6094 CFLAGS="$OLD_CFLAGS"
bec39cab
AC
6095fi
6096
c16158bc
JM
6097
6098
81ecdfbb
RW
6099# Check whether --with-pkgversion was given.
6100if test "${with_pkgversion+set}" = set; then :
6101 withval=$with_pkgversion; case "$withval" in
6102 yes) as_fn_error "package version not specified" "$LINENO" 5 ;;
c16158bc
JM
6103 no) PKGVERSION= ;;
6104 *) PKGVERSION="($withval) " ;;
6105 esac
6106else
6107 PKGVERSION="(GDB) "
6108
81ecdfbb 6109fi
c16158bc
JM
6110
6111
6112
6113
81ecdfbb
RW
6114
6115# Check whether --with-bugurl was given.
6116if test "${with_bugurl+set}" = set; then :
6117 withval=$with_bugurl; case "$withval" in
6118 yes) as_fn_error "bug URL not specified" "$LINENO" 5 ;;
c16158bc
JM
6119 no) BUGURL=
6120 ;;
6121 *) BUGURL="$withval"
6122 ;;
6123 esac
6124else
6125 BUGURL="http://www.gnu.org/software/gdb/bugs/"
6126
81ecdfbb
RW
6127fi
6128
c16158bc
JM
6129 case ${BUGURL} in
6130 "")
6131 REPORT_BUGS_TO=
6132 REPORT_BUGS_TEXI=
6133 ;;
6134 *)
6135 REPORT_BUGS_TO="<$BUGURL>"
6136 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
6137 ;;
6138 esac;
6139
6140
6141
6142
6143cat >>confdefs.h <<_ACEOF
6144#define PKGVERSION "$PKGVERSION"
6145_ACEOF
6146
6147
6148cat >>confdefs.h <<_ACEOF
6149#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
6150_ACEOF
6151
6152
bec39cab
AC
6153# --------------------- #
6154# Checks for programs. #
6155# --------------------- #
6156
6157for ac_prog in gawk mawk nawk awk
6158do
6159 # Extract the first word of "$ac_prog", so it can be a program name with args.
6160set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
6161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6162$as_echo_n "checking for $ac_word... " >&6; }
6163if test "${ac_cv_prog_AWK+set}" = set; then :
6164 $as_echo_n "(cached) " >&6
bec39cab
AC
6165else
6166 if test -n "$AWK"; then
6167 ac_cv_prog_AWK="$AWK" # Let the user override the test.
6168else
6169as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6170for as_dir in $PATH
6171do
6172 IFS=$as_save_IFS
6173 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6174 for ac_exec_ext in '' $ac_executable_extensions; do
6175 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6176 ac_cv_prog_AWK="$ac_prog"
81ecdfbb 6177 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6178 break 2
6179 fi
6180done
81ecdfbb
RW
6181 done
6182IFS=$as_save_IFS
bec39cab
AC
6183
6184fi
6185fi
6186AWK=$ac_cv_prog_AWK
6187if test -n "$AWK"; then
81ecdfbb
RW
6188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
6189$as_echo "$AWK" >&6; }
bec39cab 6190else
81ecdfbb
RW
6191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6192$as_echo "no" >&6; }
bec39cab
AC
6193fi
6194
bec39cab 6195
81ecdfbb 6196 test -n "$AWK" && break
bec39cab
AC
6197done
6198
c971b7fa
PA
6199# Find a good install program. We prefer a C program (faster),
6200# so one script is as good as another. But avoid the broken or
6201# incompatible versions:
6202# SysV /etc/install, /usr/sbin/install
6203# SunOS /usr/etc/install
6204# IRIX /sbin/install
6205# AIX /bin/install
6206# AmigaOS /C/install, which installs bootblocks on floppy discs
6207# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6208# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6209# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6210# OS/2's system install, which has a completely different semantic
6211# ./install, which can be erroneously created by make from ./install.sh.
6212# Reject install programs that cannot install multiple files.
6213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6214$as_echo_n "checking for a BSD-compatible install... " >&6; }
6215if test -z "$INSTALL"; then
6216if test "${ac_cv_path_install+set}" = set; then :
6217 $as_echo_n "(cached) " >&6
6218else
6219 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6220for as_dir in $PATH
6221do
6222 IFS=$as_save_IFS
6223 test -z "$as_dir" && as_dir=.
6224 # Account for people who put trailing slashes in PATH elements.
6225case $as_dir/ in #((
6226 ./ | .// | /[cC]/* | \
6227 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
6228 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
6229 /usr/ucb/* ) ;;
6230 *)
6231 # OSF1 and SCO ODT 3.0 have their own names for install.
6232 # Don't use installbsd from OSF since it installs stuff as root
6233 # by default.
6234 for ac_prog in ginstall scoinst install; do
6235 for ac_exec_ext in '' $ac_executable_extensions; do
6236 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
6237 if test $ac_prog = install &&
6238 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6239 # AIX install. It has an incompatible calling convention.
6240 :
6241 elif test $ac_prog = install &&
6242 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6243 # program-specific install script used by HP pwplus--don't use.
6244 :
6245 else
6246 rm -rf conftest.one conftest.two conftest.dir
6247 echo one > conftest.one
6248 echo two > conftest.two
6249 mkdir conftest.dir
6250 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6251 test -s conftest.one && test -s conftest.two &&
6252 test -s conftest.dir/conftest.one &&
6253 test -s conftest.dir/conftest.two
6254 then
6255 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6256 break 3
6257 fi
6258 fi
6259 fi
6260 done
6261 done
6262 ;;
6263esac
6264
6265 done
6266IFS=$as_save_IFS
6267
6268rm -rf conftest.one conftest.two conftest.dir
6269
6270fi
6271 if test "${ac_cv_path_install+set}" = set; then
6272 INSTALL=$ac_cv_path_install
6273 else
6274 # As a last resort, use the slow shell script. Don't cache a
6275 # value for INSTALL within a source directory, because that will
6276 # break other packages using the cache if that directory is
6277 # removed, or if the value is a relative name.
6278 INSTALL=$ac_install_sh
6279 fi
6280fi
6281{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6282$as_echo "$INSTALL" >&6; }
6283
6284# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6285# It thinks the first close brace ends the variable substitution.
6286test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6287
6288test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6289
6290test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
bec39cab 6291
81ecdfbb
RW
6292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
6293$as_echo_n "checking whether ln -s works... " >&6; }
bec39cab
AC
6294LN_S=$as_ln_s
6295if test "$LN_S" = "ln -s"; then
81ecdfbb
RW
6296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6297$as_echo "yes" >&6; }
bec39cab 6298else
81ecdfbb
RW
6299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
6300$as_echo "no, using $LN_S" >&6; }
bec39cab
AC
6301fi
6302
6303if test -n "$ac_tool_prefix"; then
6304 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6305set dummy ${ac_tool_prefix}ranlib; ac_word=$2
81ecdfbb
RW
6306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6307$as_echo_n "checking for $ac_word... " >&6; }
6308if test "${ac_cv_prog_RANLIB+set}" = set; then :
6309 $as_echo_n "(cached) " >&6
bec39cab
AC
6310else
6311 if test -n "$RANLIB"; then
6312 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6313else
6314as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6315for as_dir in $PATH
6316do
6317 IFS=$as_save_IFS
6318 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6319 for ac_exec_ext in '' $ac_executable_extensions; do
6320 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6321 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
81ecdfbb 6322 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6323 break 2
6324 fi
6325done
81ecdfbb
RW
6326 done
6327IFS=$as_save_IFS
bec39cab
AC
6328
6329fi
6330fi
6331RANLIB=$ac_cv_prog_RANLIB
6332if test -n "$RANLIB"; then
81ecdfbb
RW
6333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6334$as_echo "$RANLIB" >&6; }
bec39cab 6335else
81ecdfbb
RW
6336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6337$as_echo "no" >&6; }
bec39cab
AC
6338fi
6339
81ecdfbb 6340
bec39cab
AC
6341fi
6342if test -z "$ac_cv_prog_RANLIB"; then
6343 ac_ct_RANLIB=$RANLIB
6344 # Extract the first word of "ranlib", so it can be a program name with args.
6345set dummy ranlib; ac_word=$2
81ecdfbb
RW
6346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6347$as_echo_n "checking for $ac_word... " >&6; }
6348if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
6349 $as_echo_n "(cached) " >&6
bec39cab
AC
6350else
6351 if test -n "$ac_ct_RANLIB"; then
6352 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6353else
6354as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6355for as_dir in $PATH
6356do
6357 IFS=$as_save_IFS
6358 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6359 for ac_exec_ext in '' $ac_executable_extensions; do
6360 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6361 ac_cv_prog_ac_ct_RANLIB="ranlib"
81ecdfbb 6362 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6363 break 2
6364 fi
6365done
81ecdfbb
RW
6366 done
6367IFS=$as_save_IFS
bec39cab 6368
bec39cab
AC
6369fi
6370fi
6371ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6372if test -n "$ac_ct_RANLIB"; then
81ecdfbb
RW
6373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6374$as_echo "$ac_ct_RANLIB" >&6; }
bec39cab 6375else
81ecdfbb
RW
6376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6377$as_echo "no" >&6; }
bec39cab
AC
6378fi
6379
81ecdfbb
RW
6380 if test "x$ac_ct_RANLIB" = x; then
6381 RANLIB=":"
6382 else
6383 case $cross_compiling:$ac_tool_warned in
6384yes:)
6385{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6386$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6387ac_tool_warned=yes ;;
6388esac
6389 RANLIB=$ac_ct_RANLIB
6390 fi
bec39cab
AC
6391else
6392 RANLIB="$ac_cv_prog_RANLIB"
6393fi
6394
6395for ac_prog in 'bison -y' byacc
6396do
6397 # Extract the first word of "$ac_prog", so it can be a program name with args.
6398set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
6399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6400$as_echo_n "checking for $ac_word... " >&6; }
6401if test "${ac_cv_prog_YACC+set}" = set; then :
6402 $as_echo_n "(cached) " >&6
bec39cab
AC
6403else
6404 if test -n "$YACC"; then
6405 ac_cv_prog_YACC="$YACC" # Let the user override the test.
6406else
6407as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6408for as_dir in $PATH
6409do
6410 IFS=$as_save_IFS
6411 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6412 for ac_exec_ext in '' $ac_executable_extensions; do
6413 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6414 ac_cv_prog_YACC="$ac_prog"
81ecdfbb 6415 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6416 break 2
6417 fi
6418done
81ecdfbb
RW
6419 done
6420IFS=$as_save_IFS
bec39cab
AC
6421
6422fi
6423fi
6424YACC=$ac_cv_prog_YACC
6425if test -n "$YACC"; then
81ecdfbb
RW
6426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
6427$as_echo "$YACC" >&6; }
bec39cab 6428else
81ecdfbb
RW
6429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6430$as_echo "no" >&6; }
bec39cab
AC
6431fi
6432
81ecdfbb 6433
bec39cab
AC
6434 test -n "$YACC" && break
6435done
6436test -n "$YACC" || YACC="yacc"
6437
6438
6439if test -n "$ac_tool_prefix"; then
6440 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6441set dummy ${ac_tool_prefix}ar; ac_word=$2
81ecdfbb
RW
6442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6443$as_echo_n "checking for $ac_word... " >&6; }
6444if test "${ac_cv_prog_AR+set}" = set; then :
6445 $as_echo_n "(cached) " >&6
bec39cab
AC
6446else
6447 if test -n "$AR"; then
6448 ac_cv_prog_AR="$AR" # Let the user override the test.
6449else
6450as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6451for as_dir in $PATH
6452do
6453 IFS=$as_save_IFS
6454 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6455 for ac_exec_ext in '' $ac_executable_extensions; do
6456 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6457 ac_cv_prog_AR="${ac_tool_prefix}ar"
81ecdfbb 6458 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6459 break 2
6460 fi
6461done
81ecdfbb
RW
6462 done
6463IFS=$as_save_IFS
bec39cab
AC
6464
6465fi
6466fi
6467AR=$ac_cv_prog_AR
6468if test -n "$AR"; then
81ecdfbb
RW
6469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6470$as_echo "$AR" >&6; }
bec39cab 6471else
81ecdfbb
RW
6472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6473$as_echo "no" >&6; }
bec39cab
AC
6474fi
6475
81ecdfbb 6476
bec39cab
AC
6477fi
6478if test -z "$ac_cv_prog_AR"; then
6479 ac_ct_AR=$AR
6480 # Extract the first word of "ar", so it can be a program name with args.
6481set dummy ar; ac_word=$2
81ecdfbb
RW
6482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6483$as_echo_n "checking for $ac_word... " >&6; }
6484if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
6485 $as_echo_n "(cached) " >&6
bec39cab
AC
6486else
6487 if test -n "$ac_ct_AR"; then
6488 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6489else
6490as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6491for as_dir in $PATH
6492do
6493 IFS=$as_save_IFS
6494 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6495 for ac_exec_ext in '' $ac_executable_extensions; do
6496 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6497 ac_cv_prog_ac_ct_AR="ar"
81ecdfbb 6498 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6499 break 2
6500 fi
6501done
81ecdfbb
RW
6502 done
6503IFS=$as_save_IFS
bec39cab
AC
6504
6505fi
6506fi
6507ac_ct_AR=$ac_cv_prog_ac_ct_AR
6508if test -n "$ac_ct_AR"; then
81ecdfbb
RW
6509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6510$as_echo "$ac_ct_AR" >&6; }
bec39cab 6511else
81ecdfbb
RW
6512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6513$as_echo "no" >&6; }
bec39cab
AC
6514fi
6515
81ecdfbb
RW
6516 if test "x$ac_ct_AR" = x; then
6517 AR=""
6518 else
6519 case $cross_compiling:$ac_tool_warned in
6520yes:)
6521{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6522$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6523ac_tool_warned=yes ;;
6524esac
6525 AR=$ac_ct_AR
6526 fi
bec39cab
AC
6527else
6528 AR="$ac_cv_prog_AR"
6529fi
6530
6531if test -n "$ac_tool_prefix"; then
6532 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
6533set dummy ${ac_tool_prefix}dlltool; ac_word=$2
81ecdfbb
RW
6534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6535$as_echo_n "checking for $ac_word... " >&6; }
6536if test "${ac_cv_prog_DLLTOOL+set}" = set; then :
6537 $as_echo_n "(cached) " >&6
bec39cab
AC
6538else
6539 if test -n "$DLLTOOL"; then
6540 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
6541else
6542as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6543for as_dir in $PATH
6544do
6545 IFS=$as_save_IFS
6546 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6547 for ac_exec_ext in '' $ac_executable_extensions; do
6548 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6549 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
81ecdfbb 6550 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6551 break 2
6552 fi
6553done
81ecdfbb
RW
6554 done
6555IFS=$as_save_IFS
bec39cab
AC
6556
6557fi
6558fi
6559DLLTOOL=$ac_cv_prog_DLLTOOL
6560if test -n "$DLLTOOL"; then
81ecdfbb
RW
6561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
6562$as_echo "$DLLTOOL" >&6; }
bec39cab 6563else
81ecdfbb
RW
6564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6565$as_echo "no" >&6; }
bec39cab
AC
6566fi
6567
81ecdfbb 6568
bec39cab
AC
6569fi
6570if test -z "$ac_cv_prog_DLLTOOL"; then
6571 ac_ct_DLLTOOL=$DLLTOOL
6572 # Extract the first word of "dlltool", so it can be a program name with args.
6573set dummy dlltool; ac_word=$2
81ecdfbb
RW
6574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6575$as_echo_n "checking for $ac_word... " >&6; }
6576if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then :
6577 $as_echo_n "(cached) " >&6
bec39cab
AC
6578else
6579 if test -n "$ac_ct_DLLTOOL"; then
6580 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
6581else
6582as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6583for as_dir in $PATH
6584do
6585 IFS=$as_save_IFS
6586 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6587 for ac_exec_ext in '' $ac_executable_extensions; do
6588 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6589 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
81ecdfbb 6590 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6591 break 2
6592 fi
6593done
81ecdfbb
RW
6594 done
6595IFS=$as_save_IFS
bec39cab
AC
6596
6597fi
6598fi
6599ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
6600if test -n "$ac_ct_DLLTOOL"; then
81ecdfbb
RW
6601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
6602$as_echo "$ac_ct_DLLTOOL" >&6; }
bec39cab 6603else
81ecdfbb
RW
6604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6605$as_echo "no" >&6; }
bec39cab
AC
6606fi
6607
81ecdfbb
RW
6608 if test "x$ac_ct_DLLTOOL" = x; then
6609 DLLTOOL=""
6610 else
6611 case $cross_compiling:$ac_tool_warned in
6612yes:)
6613{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6614$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6615ac_tool_warned=yes ;;
6616esac
6617 DLLTOOL=$ac_ct_DLLTOOL
6618 fi
bec39cab
AC
6619else
6620 DLLTOOL="$ac_cv_prog_DLLTOOL"
6621fi
6622
6623if test -n "$ac_tool_prefix"; then
6624 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
6625set dummy ${ac_tool_prefix}windres; ac_word=$2
81ecdfbb
RW
6626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6627$as_echo_n "checking for $ac_word... " >&6; }
6628if test "${ac_cv_prog_WINDRES+set}" = set; then :
6629 $as_echo_n "(cached) " >&6
bec39cab
AC
6630else
6631 if test -n "$WINDRES"; then
6632 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
6633else
6634as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6635for as_dir in $PATH
6636do
6637 IFS=$as_save_IFS
6638 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6639 for ac_exec_ext in '' $ac_executable_extensions; do
6640 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6641 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
81ecdfbb 6642 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6643 break 2
6644 fi
6645done
81ecdfbb
RW
6646 done
6647IFS=$as_save_IFS
bec39cab
AC
6648
6649fi
6650fi
6651WINDRES=$ac_cv_prog_WINDRES
6652if test -n "$WINDRES"; then
81ecdfbb
RW
6653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
6654$as_echo "$WINDRES" >&6; }
bec39cab 6655else
81ecdfbb
RW
6656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6657$as_echo "no" >&6; }
bec39cab
AC
6658fi
6659
81ecdfbb 6660
bec39cab
AC
6661fi
6662if test -z "$ac_cv_prog_WINDRES"; then
6663 ac_ct_WINDRES=$WINDRES
6664 # Extract the first word of "windres", so it can be a program name with args.
6665set dummy windres; ac_word=$2
81ecdfbb
RW
6666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6667$as_echo_n "checking for $ac_word... " >&6; }
6668if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then :
6669 $as_echo_n "(cached) " >&6
bec39cab
AC
6670else
6671 if test -n "$ac_ct_WINDRES"; then
6672 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
6673else
6674as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6675for as_dir in $PATH
6676do
6677 IFS=$as_save_IFS
6678 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6679 for ac_exec_ext in '' $ac_executable_extensions; do
6680 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6681 ac_cv_prog_ac_ct_WINDRES="windres"
81ecdfbb 6682 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6683 break 2
6684 fi
6685done
81ecdfbb
RW
6686 done
6687IFS=$as_save_IFS
bec39cab
AC
6688
6689fi
6690fi
6691ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
6692if test -n "$ac_ct_WINDRES"; then
81ecdfbb
RW
6693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
6694$as_echo "$ac_ct_WINDRES" >&6; }
bec39cab 6695else
81ecdfbb
RW
6696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6697$as_echo "no" >&6; }
c906108c 6698fi
bec39cab 6699
81ecdfbb
RW
6700 if test "x$ac_ct_WINDRES" = x; then
6701 WINDRES=""
6702 else
6703 case $cross_compiling:$ac_tool_warned in
6704yes:)
6705{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6706$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6707ac_tool_warned=yes ;;
6708esac
6709 WINDRES=$ac_ct_WINDRES
6710 fi
c906108c 6711else
bec39cab 6712 WINDRES="$ac_cv_prog_WINDRES"
c906108c
SS
6713fi
6714
bec39cab 6715
036c3acb
TS
6716case $host_os in
6717 gnu*)
6718 # Needed for GNU Hurd hosts.
6719 if test -n "$ac_tool_prefix"; then
bec39cab
AC
6720 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
6721set dummy ${ac_tool_prefix}mig; ac_word=$2
81ecdfbb
RW
6722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6723$as_echo_n "checking for $ac_word... " >&6; }
6724if test "${ac_cv_prog_MIG+set}" = set; then :
6725 $as_echo_n "(cached) " >&6
c906108c 6726else
bec39cab
AC
6727 if test -n "$MIG"; then
6728 ac_cv_prog_MIG="$MIG" # Let the user override the test.
6729else
6730as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6731for as_dir in $PATH
6732do
6733 IFS=$as_save_IFS
6734 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6735 for ac_exec_ext in '' $ac_executable_extensions; do
6736 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6737 ac_cv_prog_MIG="${ac_tool_prefix}mig"
81ecdfbb 6738 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6739 break 2
6740 fi
6741done
81ecdfbb
RW
6742 done
6743IFS=$as_save_IFS
bec39cab 6744
c906108c 6745fi
bec39cab
AC
6746fi
6747MIG=$ac_cv_prog_MIG
6748if test -n "$MIG"; then
81ecdfbb
RW
6749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
6750$as_echo "$MIG" >&6; }
c906108c 6751else
81ecdfbb
RW
6752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6753$as_echo "no" >&6; }
c906108c
SS
6754fi
6755
81ecdfbb 6756
bec39cab
AC
6757fi
6758if test -z "$ac_cv_prog_MIG"; then
6759 ac_ct_MIG=$MIG
6760 # Extract the first word of "mig", so it can be a program name with args.
6761set dummy mig; ac_word=$2
81ecdfbb
RW
6762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6763$as_echo_n "checking for $ac_word... " >&6; }
6764if test "${ac_cv_prog_ac_ct_MIG+set}" = set; then :
6765 $as_echo_n "(cached) " >&6
bec39cab
AC
6766else
6767 if test -n "$ac_ct_MIG"; then
6768 ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
6769else
6770as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6771for as_dir in $PATH
6772do
6773 IFS=$as_save_IFS
6774 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6775 for ac_exec_ext in '' $ac_executable_extensions; do
6776 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6777 ac_cv_prog_ac_ct_MIG="mig"
81ecdfbb 6778 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6779 break 2
6780 fi
6781done
81ecdfbb
RW
6782 done
6783IFS=$as_save_IFS
c906108c 6784
bec39cab
AC
6785fi
6786fi
6787ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
6788if test -n "$ac_ct_MIG"; then
81ecdfbb
RW
6789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
6790$as_echo "$ac_ct_MIG" >&6; }
bec39cab 6791else
81ecdfbb
RW
6792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6793$as_echo "no" >&6; }
bec39cab 6794fi
c906108c 6795
81ecdfbb
RW
6796 if test "x$ac_ct_MIG" = x; then
6797 MIG=""
6798 else
6799 case $cross_compiling:$ac_tool_warned in
6800yes:)
6801{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6802$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6803ac_tool_warned=yes ;;
6804esac
6805 MIG=$ac_ct_MIG
6806 fi
bec39cab
AC
6807else
6808 MIG="$ac_cv_prog_MIG"
6809fi
c906108c 6810
036c3acb
TS
6811 if test x"$MIG" = x; then
6812 as_fn_error "MIG not found but required for $host hosts" "$LINENO" 5
6813 fi
6814 ;;
6815esac
c906108c 6816
bec39cab
AC
6817# ---------------------- #
6818# Checks for libraries. #
6819# ---------------------- #
c906108c 6820
bec39cab 6821# We might need to link with -lm; most simulators need it.
81ecdfbb
RW
6822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
6823$as_echo_n "checking for main in -lm... " >&6; }
6824if test "${ac_cv_lib_m_main+set}" = set; then :
6825 $as_echo_n "(cached) " >&6
bec39cab
AC
6826else
6827 ac_check_lib_save_LIBS=$LIBS
6828LIBS="-lm $LIBS"
81ecdfbb 6829cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6830/* end confdefs.h. */
c906108c 6831
c906108c 6832
bec39cab
AC
6833int
6834main ()
6835{
81ecdfbb 6836return main ();
bec39cab
AC
6837 ;
6838 return 0;
6839}
6840_ACEOF
81ecdfbb 6841if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
6842 ac_cv_lib_m_main=yes
6843else
81ecdfbb 6844 ac_cv_lib_m_main=no
bec39cab 6845fi
81ecdfbb
RW
6846rm -f core conftest.err conftest.$ac_objext \
6847 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
6848LIBS=$ac_check_lib_save_LIBS
6849fi
81ecdfbb
RW
6850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
6851$as_echo "$ac_cv_lib_m_main" >&6; }
6852if test "x$ac_cv_lib_m_main" = x""yes; then :
bec39cab
AC
6853 cat >>confdefs.h <<_ACEOF
6854#define HAVE_LIBM 1
6855_ACEOF
6856
6857 LIBS="-lm $LIBS"
c906108c 6858
c906108c 6859fi
bec39cab
AC
6860
6861
6862# We need to link with -lw to get `wctype' on Solaris before Solaris
6863# 2.6. Solaris 2.6 and beyond have this function in libc, and have a
6864# libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
6865# is known to have this problem). Therefore we avoid libw if we can.
81ecdfbb
RW
6866ac_fn_c_check_func "$LINENO" "wctype" "ac_cv_func_wctype"
6867if test "x$ac_cv_func_wctype" = x""yes; then :
bec39cab 6868
c906108c 6869else
81ecdfbb
RW
6870 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype in -lw" >&5
6871$as_echo_n "checking for wctype in -lw... " >&6; }
6872if test "${ac_cv_lib_w_wctype+set}" = set; then :
6873 $as_echo_n "(cached) " >&6
bec39cab
AC
6874else
6875 ac_check_lib_save_LIBS=$LIBS
6876LIBS="-lw $LIBS"
81ecdfbb 6877cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6878/* end confdefs.h. */
c906108c 6879
81ecdfbb
RW
6880/* Override any GCC internal prototype to avoid an error.
6881 Use char because int might match the return type of a GCC
6882 builtin and then its argument prototype would still apply. */
bec39cab
AC
6883#ifdef __cplusplus
6884extern "C"
6885#endif
bec39cab
AC
6886char wctype ();
6887int
6888main ()
6889{
81ecdfbb 6890return wctype ();
bec39cab
AC
6891 ;
6892 return 0;
6893}
6894_ACEOF
81ecdfbb 6895if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
6896 ac_cv_lib_w_wctype=yes
6897else
81ecdfbb 6898 ac_cv_lib_w_wctype=no
bec39cab 6899fi
81ecdfbb
RW
6900rm -f core conftest.err conftest.$ac_objext \
6901 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
6902LIBS=$ac_check_lib_save_LIBS
6903fi
81ecdfbb
RW
6904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_w_wctype" >&5
6905$as_echo "$ac_cv_lib_w_wctype" >&6; }
6906if test "x$ac_cv_lib_w_wctype" = x""yes; then :
bec39cab
AC
6907 cat >>confdefs.h <<_ACEOF
6908#define HAVE_LIBW 1
6909_ACEOF
c906108c 6910
bec39cab 6911 LIBS="-lw $LIBS"
c906108c 6912
bec39cab 6913fi
c906108c 6914
bec39cab 6915fi
c906108c 6916
ddc9cd0f 6917
bec39cab 6918# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
81ecdfbb
RW
6919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
6920$as_echo_n "checking for library containing gethostbyname... " >&6; }
6921if test "${ac_cv_search_gethostbyname+set}" = set; then :
6922 $as_echo_n "(cached) " >&6
bec39cab
AC
6923else
6924 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6925cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6926/* end confdefs.h. */
ddc9cd0f 6927
81ecdfbb
RW
6928/* Override any GCC internal prototype to avoid an error.
6929 Use char because int might match the return type of a GCC
6930 builtin and then its argument prototype would still apply. */
bec39cab
AC
6931#ifdef __cplusplus
6932extern "C"
6933#endif
bec39cab
AC
6934char gethostbyname ();
6935int
6936main ()
6937{
81ecdfbb 6938return gethostbyname ();
bec39cab
AC
6939 ;
6940 return 0;
6941}
6942_ACEOF
81ecdfbb
RW
6943for ac_lib in '' nsl; do
6944 if test -z "$ac_lib"; then
6945 ac_res="none required"
6946 else
6947 ac_res=-l$ac_lib
b4e70030 6948 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
6949 fi
6950 if ac_fn_c_try_link "$LINENO"; then :
6951 ac_cv_search_gethostbyname=$ac_res
6952fi
6953rm -f core conftest.err conftest.$ac_objext \
6954 conftest$ac_exeext
6955 if test "${ac_cv_search_gethostbyname+set}" = set; then :
6956 break
6957fi
6958done
6959if test "${ac_cv_search_gethostbyname+set}" = set; then :
ddc9cd0f 6960
bec39cab 6961else
81ecdfbb 6962 ac_cv_search_gethostbyname=no
bec39cab 6963fi
81ecdfbb 6964rm conftest.$ac_ext
bec39cab
AC
6965LIBS=$ac_func_search_save_LIBS
6966fi
81ecdfbb
RW
6967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
6968$as_echo "$ac_cv_search_gethostbyname" >&6; }
6969ac_res=$ac_cv_search_gethostbyname
6970if test "$ac_res" != no; then :
6971 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
96baa820 6972
bec39cab 6973fi
96baa820 6974
c906108c 6975
b4e70030 6976# Some systems (e.g. Solaris) have `socketpair' in libsocket.
81ecdfbb
RW
6977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
6978$as_echo_n "checking for library containing socketpair... " >&6; }
6979if test "${ac_cv_search_socketpair+set}" = set; then :
6980 $as_echo_n "(cached) " >&6
b4e70030
JB
6981else
6982 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6983cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
6984/* end confdefs.h. */
6985
81ecdfbb
RW
6986/* Override any GCC internal prototype to avoid an error.
6987 Use char because int might match the return type of a GCC
6988 builtin and then its argument prototype would still apply. */
b4e70030
JB
6989#ifdef __cplusplus
6990extern "C"
6991#endif
b4e70030
JB
6992char socketpair ();
6993int
6994main ()
6995{
81ecdfbb 6996return socketpair ();
b4e70030
JB
6997 ;
6998 return 0;
6999}
7000_ACEOF
81ecdfbb
RW
7001for ac_lib in '' socket; do
7002 if test -z "$ac_lib"; then
7003 ac_res="none required"
7004 else
7005 ac_res=-l$ac_lib
b4e70030 7006 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
7007 fi
7008 if ac_fn_c_try_link "$LINENO"; then :
7009 ac_cv_search_socketpair=$ac_res
7010fi
7011rm -f core conftest.err conftest.$ac_objext \
7012 conftest$ac_exeext
7013 if test "${ac_cv_search_socketpair+set}" = set; then :
7014 break
7015fi
7016done
7017if test "${ac_cv_search_socketpair+set}" = set; then :
b4e70030 7018
b4e70030 7019else
81ecdfbb 7020 ac_cv_search_socketpair=no
b4e70030 7021fi
81ecdfbb 7022rm conftest.$ac_ext
b4e70030
JB
7023LIBS=$ac_func_search_save_LIBS
7024fi
81ecdfbb
RW
7025{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
7026$as_echo "$ac_cv_search_socketpair" >&6; }
7027ac_res=$ac_cv_search_socketpair
7028if test "$ac_res" != no; then :
7029 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
b4e70030
JB
7030
7031fi
7032
7033
233a11ab 7034# Link in zlib if we can. This allows us to read compressed debug sections.
b040ad30 7035
711a72d3 7036 # Use the system's zlib library.
39f3de7c
L
7037 zlibdir="-L\$(top_builddir)/../zlib"
7038 zlibinc="-I\$(top_srcdir)/../zlib"
b040ad30 7039
711a72d3
L
7040# Check whether --with-system-zlib was given.
7041if test "${with_system_zlib+set}" = set; then :
afa59b79
L
7042 withval=$with_system_zlib; if test x$with_system_zlib = xyes ; then
7043 zlibdir=
7044 zlibinc=
7045 fi
b040ad30 7046
233a11ab 7047fi
233a11ab 7048
233a11ab 7049
233a11ab 7050
b040ad30 7051
233a11ab 7052
25268153 7053# On FreeBSD we may need libutil for kinfo_getvmmap (used by fbsd-nat.c).
37773e78 7054# On GNU/kFreeBSD systems, FreeBSD libutil is renamed to libutil-freebsd.
25268153
JB
7055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getvmmap" >&5
7056$as_echo_n "checking for library containing kinfo_getvmmap... " >&6; }
7057if test "${ac_cv_search_kinfo_getvmmap+set}" = set; then :
7058 $as_echo_n "(cached) " >&6
7059else
7060 ac_func_search_save_LIBS=$LIBS
7061cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7062/* end confdefs.h. */
7063
7064/* Override any GCC internal prototype to avoid an error.
7065 Use char because int might match the return type of a GCC
7066 builtin and then its argument prototype would still apply. */
7067#ifdef __cplusplus
7068extern "C"
7069#endif
7070char kinfo_getvmmap ();
7071int
7072main ()
7073{
7074return kinfo_getvmmap ();
7075 ;
7076 return 0;
7077}
7078_ACEOF
37773e78 7079for ac_lib in '' util util-freebsd; do
25268153
JB
7080 if test -z "$ac_lib"; then
7081 ac_res="none required"
7082 else
7083 ac_res=-l$ac_lib
7084 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7085 fi
7086 if ac_fn_c_try_link "$LINENO"; then :
7087 ac_cv_search_kinfo_getvmmap=$ac_res
7088fi
7089rm -f core conftest.err conftest.$ac_objext \
7090 conftest$ac_exeext
7091 if test "${ac_cv_search_kinfo_getvmmap+set}" = set; then :
7092 break
7093fi
7094done
7095if test "${ac_cv_search_kinfo_getvmmap+set}" = set; then :
7096
7097else
7098 ac_cv_search_kinfo_getvmmap=no
7099fi
7100rm conftest.$ac_ext
7101LIBS=$ac_func_search_save_LIBS
7102fi
7103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getvmmap" >&5
7104$as_echo "$ac_cv_search_kinfo_getvmmap" >&6; }
7105ac_res=$ac_cv_search_kinfo_getvmmap
7106if test "$ac_res" != no; then :
7107 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7108
7109$as_echo "#define HAVE_KINFO_GETVMMAP 1" >>confdefs.h
7110
7111fi
7112
7113
77f120bf 7114
016a3251
DD
7115 if test "X$prefix" = "XNONE"; then
7116 acl_final_prefix="$ac_default_prefix"
7117 else
7118 acl_final_prefix="$prefix"
7119 fi
7120 if test "X$exec_prefix" = "XNONE"; then
7121 acl_final_exec_prefix='${prefix}'
7122 else
7123 acl_final_exec_prefix="$exec_prefix"
7124 fi
7125 acl_save_prefix="$prefix"
7126 prefix="$acl_final_prefix"
7127 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
7128 prefix="$acl_save_prefix"
7129
7130
7131# Check whether --with-gnu-ld was given.
7132if test "${with_gnu_ld+set}" = set; then :
7133 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
7134else
7135 with_gnu_ld=no
7136fi
7137
7138# Prepare PATH_SEPARATOR.
7139# The user is always right.
7140if test "${PATH_SEPARATOR+set}" != set; then
7141 echo "#! /bin/sh" >conf$$.sh
7142 echo "exit 0" >>conf$$.sh
7143 chmod +x conf$$.sh
7144 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
7145 PATH_SEPARATOR=';'
7146 else
7147 PATH_SEPARATOR=:
7148 fi
7149 rm -f conf$$.sh
7150fi
7151ac_prog=ld
7152if test "$GCC" = yes; then
7153 # Check if gcc -print-prog-name=ld gives a path.
7154 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
7155$as_echo_n "checking for ld used by GCC... " >&6; }
7156 case $host in
7157 *-*-mingw*)
7158 # gcc leaves a trailing carriage return which upsets mingw
7159 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
7160 *)
7161 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
7162 esac
7163 case $ac_prog in
7164 # Accept absolute paths.
7165 [\\/]* | [A-Za-z]:[\\/]*)
7166 re_direlt='/[^/][^/]*/\.\./'
7167 # Canonicalize the path of ld
7168 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
7169 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
7170 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
7171 done
7172 test -z "$LD" && LD="$ac_prog"
7173 ;;
7174 "")
7175 # If it fails, then pretend we aren't using GCC.
7176 ac_prog=ld
7177 ;;
7178 *)
7179 # If it is relative, then search for the first ld in PATH.
7180 with_gnu_ld=unknown
7181 ;;
7182 esac
7183elif test "$with_gnu_ld" = yes; then
7184 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
7185$as_echo_n "checking for GNU ld... " >&6; }
7186else
7187 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
7188$as_echo_n "checking for non-GNU ld... " >&6; }
7189fi
7190if test "${acl_cv_path_LD+set}" = set; then :
7191 $as_echo_n "(cached) " >&6
7192else
7193 if test -z "$LD"; then
7194 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
7195 for ac_dir in $PATH; do
7196 test -z "$ac_dir" && ac_dir=.
7197 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
7198 acl_cv_path_LD="$ac_dir/$ac_prog"
7199 # Check to see if the program is GNU ld. I'd rather use --version,
7200 # but apparently some GNU ld's only accept -v.
7201 # Break only if it was the GNU/non-GNU ld that we prefer.
7202 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
7203 test "$with_gnu_ld" != no && break
7204 else
7205 test "$with_gnu_ld" != yes && break
7206 fi
7207 fi
7208 done
7209 IFS="$ac_save_ifs"
7210else
7211 acl_cv_path_LD="$LD" # Let the user override the test with a path.
7212fi
7213fi
7214
7215LD="$acl_cv_path_LD"
7216if test -n "$LD"; then
7217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
7218$as_echo "$LD" >&6; }
7219else
7220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7221$as_echo "no" >&6; }
7222fi
7223test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
7224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
7225$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
7226if test "${acl_cv_prog_gnu_ld+set}" = set; then :
7227 $as_echo_n "(cached) " >&6
7228else
7229 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
7230if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
7231 acl_cv_prog_gnu_ld=yes
7232else
7233 acl_cv_prog_gnu_ld=no
7234fi
7235fi
7236{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
7237$as_echo "$acl_cv_prog_gnu_ld" >&6; }
7238with_gnu_ld=$acl_cv_prog_gnu_ld
7239
7240
7241
7242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
7243$as_echo_n "checking for shared library run path origin... " >&6; }
7244if test "${acl_cv_rpath+set}" = set; then :
7245 $as_echo_n "(cached) " >&6
7246else
7247
7248 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
7249 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
7250 . ./conftest.sh
7251 rm -f ./conftest.sh
7252 acl_cv_rpath=done
7253
7254fi
7255{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
7256$as_echo "$acl_cv_rpath" >&6; }
7257 wl="$acl_cv_wl"
7258 libext="$acl_cv_libext"
7259 shlibext="$acl_cv_shlibext"
7260 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
7261 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
7262 hardcode_direct="$acl_cv_hardcode_direct"
7263 hardcode_minus_L="$acl_cv_hardcode_minus_L"
7264 # Check whether --enable-rpath was given.
7265if test "${enable_rpath+set}" = set; then :
7266 enableval=$enable_rpath; :
7267else
7268 enable_rpath=yes
7269fi
7270
7271
7272
7273
7274
7275
7276
7277
7278 use_additional=yes
7279
7280 acl_save_prefix="$prefix"
7281 prefix="$acl_final_prefix"
7282 acl_save_exec_prefix="$exec_prefix"
7283 exec_prefix="$acl_final_exec_prefix"
7284
7285 eval additional_includedir=\"$includedir\"
7286 eval additional_libdir=\"$libdir\"
7287
7288 exec_prefix="$acl_save_exec_prefix"
7289 prefix="$acl_save_prefix"
77f120bf 7290
6c7a06a3 7291
81ecdfbb
RW
7292# Check whether --with-libiconv-prefix was given.
7293if test "${with_libiconv_prefix+set}" = set; then :
7294 withval=$with_libiconv_prefix;
016a3251
DD
7295 if test "X$withval" = "Xno"; then
7296 use_additional=no
7297 else
7298 if test "X$withval" = "X"; then
7299
7300 acl_save_prefix="$prefix"
7301 prefix="$acl_final_prefix"
7302 acl_save_exec_prefix="$exec_prefix"
7303 exec_prefix="$acl_final_exec_prefix"
7304
7305 eval additional_includedir=\"$includedir\"
7306 eval additional_libdir=\"$libdir\"
7307
7308 exec_prefix="$acl_save_exec_prefix"
7309 prefix="$acl_save_prefix"
7310
7311 else
7312 additional_includedir="$withval/include"
7313 additional_libdir="$withval/lib"
7314 fi
7315 fi
6c7a06a3 7316
81ecdfbb
RW
7317fi
7318
016a3251
DD
7319 LIBICONV=
7320 LTLIBICONV=
7321 INCICONV=
7322 rpathdirs=
7323 ltrpathdirs=
7324 names_already_handled=
7325 names_next_round='iconv '
7326 while test -n "$names_next_round"; do
7327 names_this_round="$names_next_round"
7328 names_next_round=
7329 for name in $names_this_round; do
7330 already_handled=
7331 for n in $names_already_handled; do
7332 if test "$n" = "$name"; then
7333 already_handled=yes
7334 break
7335 fi
7336 done
7337 if test -z "$already_handled"; then
7338 names_already_handled="$names_already_handled $name"
7339 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
7340 eval value=\"\$HAVE_LIB$uppername\"
7341 if test -n "$value"; then
7342 if test "$value" = yes; then
7343 eval value=\"\$LIB$uppername\"
7344 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
7345 eval value=\"\$LTLIB$uppername\"
7346 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
7347 else
7348 :
7349 fi
7350 else
7351 found_dir=
7352 found_la=
7353 found_so=
7354 found_a=
7355 if test $use_additional = yes; then
7356 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
7357 found_dir="$additional_libdir"
7358 found_so="$additional_libdir/lib$name.$shlibext"
7359 if test -f "$additional_libdir/lib$name.la"; then
7360 found_la="$additional_libdir/lib$name.la"
7361 fi
7362 else
7363 if test -f "$additional_libdir/lib$name.$libext"; then
7364 found_dir="$additional_libdir"
7365 found_a="$additional_libdir/lib$name.$libext"
7366 if test -f "$additional_libdir/lib$name.la"; then
7367 found_la="$additional_libdir/lib$name.la"
7368 fi
7369 fi
7370 fi
7371 fi
7372 if test "X$found_dir" = "X"; then
7373 for x in $LDFLAGS $LTLIBICONV; do
7374
7375 acl_save_prefix="$prefix"
7376 prefix="$acl_final_prefix"
7377 acl_save_exec_prefix="$exec_prefix"
7378 exec_prefix="$acl_final_exec_prefix"
7379 eval x=\"$x\"
7380 exec_prefix="$acl_save_exec_prefix"
7381 prefix="$acl_save_prefix"
7382
7383 case "$x" in
7384 -L*)
7385 dir=`echo "X$x" | sed -e 's/^X-L//'`
7386 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
7387 found_dir="$dir"
7388 found_so="$dir/lib$name.$shlibext"
7389 if test -f "$dir/lib$name.la"; then
7390 found_la="$dir/lib$name.la"
7391 fi
7392 else
7393 if test -f "$dir/lib$name.$libext"; then
7394 found_dir="$dir"
7395 found_a="$dir/lib$name.$libext"
7396 if test -f "$dir/lib$name.la"; then
7397 found_la="$dir/lib$name.la"
7398 fi
7399 fi
7400 fi
7401 ;;
7402 esac
7403 if test "X$found_dir" != "X"; then
7404 break
7405 fi
7406 done
7407 fi
7408 if test "X$found_dir" != "X"; then
7409 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
7410 if test "X$found_so" != "X"; then
7411 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
7412 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
7413 else
7414 haveit=
7415 for x in $ltrpathdirs; do
7416 if test "X$x" = "X$found_dir"; then
7417 haveit=yes
7418 break
7419 fi
7420 done
7421 if test -z "$haveit"; then
7422 ltrpathdirs="$ltrpathdirs $found_dir"
7423 fi
7424 if test "$hardcode_direct" = yes; then
7425 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
7426 else
7427 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
7428 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
7429 haveit=
7430 for x in $rpathdirs; do
7431 if test "X$x" = "X$found_dir"; then
7432 haveit=yes
7433 break
7434 fi
7435 done
7436 if test -z "$haveit"; then
7437 rpathdirs="$rpathdirs $found_dir"
7438 fi
7439 else
7440 haveit=
7441 for x in $LDFLAGS $LIBICONV; do
7442
7443 acl_save_prefix="$prefix"
7444 prefix="$acl_final_prefix"
7445 acl_save_exec_prefix="$exec_prefix"
7446 exec_prefix="$acl_final_exec_prefix"
7447 eval x=\"$x\"
7448 exec_prefix="$acl_save_exec_prefix"
7449 prefix="$acl_save_prefix"
7450
7451 if test "X$x" = "X-L$found_dir"; then
7452 haveit=yes
7453 break
7454 fi
7455 done
7456 if test -z "$haveit"; then
7457 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
7458 fi
7459 if test "$hardcode_minus_L" != no; then
7460 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
7461 else
7462 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
7463 fi
7464 fi
7465 fi
7466 fi
7467 else
7468 if test "X$found_a" != "X"; then
7469 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
7470 else
7471 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
7472 fi
7473 fi
7474 additional_includedir=
7475 case "$found_dir" in
7476 */lib | */lib/)
7477 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
7478 additional_includedir="$basedir/include"
7479 ;;
7480 esac
7481 if test "X$additional_includedir" != "X"; then
7482 if test "X$additional_includedir" != "X/usr/include"; then
7483 haveit=
7484 if test "X$additional_includedir" = "X/usr/local/include"; then
7485 if test -n "$GCC"; then
7486 case $host_os in
7487 linux*) haveit=yes;;
7488 esac
7489 fi
7490 fi
7491 if test -z "$haveit"; then
7492 for x in $CPPFLAGS $INCICONV; do
7493
7494 acl_save_prefix="$prefix"
7495 prefix="$acl_final_prefix"
7496 acl_save_exec_prefix="$exec_prefix"
7497 exec_prefix="$acl_final_exec_prefix"
7498 eval x=\"$x\"
7499 exec_prefix="$acl_save_exec_prefix"
7500 prefix="$acl_save_prefix"
7501
7502 if test "X$x" = "X-I$additional_includedir"; then
7503 haveit=yes
7504 break
7505 fi
7506 done
7507 if test -z "$haveit"; then
7508 if test -d "$additional_includedir"; then
7509 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
7510 fi
7511 fi
7512 fi
7513 fi
7514 fi
7515 if test -n "$found_la"; then
7516 save_libdir="$libdir"
7517 case "$found_la" in
7518 */* | *\\*) . "$found_la" ;;
7519 *) . "./$found_la" ;;
7520 esac
7521 libdir="$save_libdir"
7522 for dep in $dependency_libs; do
7523 case "$dep" in
7524 -L*)
7525 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
7526 if test "X$additional_libdir" != "X/usr/lib"; then
7527 haveit=
7528 if test "X$additional_libdir" = "X/usr/local/lib"; then
7529 if test -n "$GCC"; then
7530 case $host_os in
7531 linux*) haveit=yes;;
7532 esac
7533 fi
7534 fi
7535 if test -z "$haveit"; then
7536 haveit=
7537 for x in $LDFLAGS $LIBICONV; do
7538
7539 acl_save_prefix="$prefix"
7540 prefix="$acl_final_prefix"
7541 acl_save_exec_prefix="$exec_prefix"
7542 exec_prefix="$acl_final_exec_prefix"
7543 eval x=\"$x\"
7544 exec_prefix="$acl_save_exec_prefix"
7545 prefix="$acl_save_prefix"
7546
7547 if test "X$x" = "X-L$additional_libdir"; then
7548 haveit=yes
7549 break
7550 fi
7551 done
7552 if test -z "$haveit"; then
7553 if test -d "$additional_libdir"; then
7554 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
7555 fi
7556 fi
7557 haveit=
7558 for x in $LDFLAGS $LTLIBICONV; do
7559
7560 acl_save_prefix="$prefix"
7561 prefix="$acl_final_prefix"
7562 acl_save_exec_prefix="$exec_prefix"
7563 exec_prefix="$acl_final_exec_prefix"
7564 eval x=\"$x\"
7565 exec_prefix="$acl_save_exec_prefix"
7566 prefix="$acl_save_prefix"
7567
7568 if test "X$x" = "X-L$additional_libdir"; then
7569 haveit=yes
7570 break
7571 fi
7572 done
7573 if test -z "$haveit"; then
7574 if test -d "$additional_libdir"; then
7575 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
7576 fi
7577 fi
7578 fi
7579 fi
7580 ;;
7581 -R*)
7582 dir=`echo "X$dep" | sed -e 's/^X-R//'`
7583 if test "$enable_rpath" != no; then
7584 haveit=
7585 for x in $rpathdirs; do
7586 if test "X$x" = "X$dir"; then
7587 haveit=yes
7588 break
7589 fi
7590 done
7591 if test -z "$haveit"; then
7592 rpathdirs="$rpathdirs $dir"
7593 fi
7594 haveit=
7595 for x in $ltrpathdirs; do
7596 if test "X$x" = "X$dir"; then
7597 haveit=yes
7598 break
7599 fi
7600 done
7601 if test -z "$haveit"; then
7602 ltrpathdirs="$ltrpathdirs $dir"
7603 fi
7604 fi
7605 ;;
7606 -l*)
7607 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
7608 ;;
7609 *.la)
7610 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
7611 ;;
7612 *)
7613 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
7614 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
7615 ;;
7616 esac
7617 done
7618 fi
7619 else
7620 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
7621 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
7622 fi
7623 fi
7624 fi
7625 done
7626 done
7627 if test "X$rpathdirs" != "X"; then
7628 if test -n "$hardcode_libdir_separator"; then
7629 alldirs=
7630 for found_dir in $rpathdirs; do
7631 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
7632 done
7633 acl_save_libdir="$libdir"
7634 libdir="$alldirs"
7635 eval flag=\"$hardcode_libdir_flag_spec\"
7636 libdir="$acl_save_libdir"
7637 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
7638 else
7639 for found_dir in $rpathdirs; do
7640 acl_save_libdir="$libdir"
7641 libdir="$found_dir"
7642 eval flag=\"$hardcode_libdir_flag_spec\"
7643 libdir="$acl_save_libdir"
7644 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
7645 done
7646 fi
7647 fi
7648 if test "X$ltrpathdirs" != "X"; then
7649 for found_dir in $ltrpathdirs; do
7650 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
7651 done
7652 fi
7653
7654
7655
7656
7657
6c7a06a3 7658
6c7a06a3 7659
81ecdfbb
RW
7660 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
7661$as_echo_n "checking for iconv... " >&6; }
7662if test "${am_cv_func_iconv+set}" = set; then :
7663 $as_echo_n "(cached) " >&6
d542061a 7664else
6c7a06a3
TT
7665
7666 am_cv_func_iconv="no, consider installing GNU libiconv"
7667 am_cv_lib_iconv=no
016a3251
DD
7668 am_save_CPPFLAGS="$CPPFLAGS"
7669 CPPFLAGS="$CPPFLAGS $INCICONV"
7670 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 7671/* end confdefs.h. */
6c7a06a3
TT
7672#include <stdlib.h>
7673#include <iconv.h>
d542061a
UW
7674int
7675main ()
7676{
6c7a06a3 7677iconv_t cd = iconv_open("","");
016a3251
DD
7678 iconv(cd,NULL,NULL,NULL,NULL);
7679 iconv_close(cd);
d542061a
UW
7680 ;
7681 return 0;
7682}
7683_ACEOF
81ecdfbb 7684if ac_fn_c_try_link "$LINENO"; then :
016a3251 7685 am_cv_func_iconv=yes
d542061a 7686fi
81ecdfbb
RW
7687rm -f core conftest.err conftest.$ac_objext \
7688 conftest$ac_exeext conftest.$ac_ext
016a3251 7689 CPPFLAGS="$am_save_CPPFLAGS"
94ae1714 7690
016a3251
DD
7691 if test "$am_cv_func_iconv" != yes && test -d ../libiconv; then
7692 for _libs in .libs _libs; do
7693 am_save_CPPFLAGS="$CPPFLAGS"
7694 am_save_LIBS="$LIBS"
7695 CPPFLAGS="$CPPFLAGS -I../libiconv/include"
7696 LIBS="$LIBS ../libiconv/lib/$_libs/libiconv.a"
7697 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 7698/* end confdefs.h. */
6c7a06a3
TT
7699#include <stdlib.h>
7700#include <iconv.h>
d542061a
UW
7701int
7702main ()
7703{
6c7a06a3 7704iconv_t cd = iconv_open("","");
016a3251
DD
7705 iconv(cd,NULL,NULL,NULL,NULL);
7706 iconv_close(cd);
d542061a
UW
7707 ;
7708 return 0;
7709}
7710_ACEOF
81ecdfbb 7711if ac_fn_c_try_link "$LINENO"; then :
016a3251
DD
7712 INCICONV="-I../libiconv/include"
7713 LIBICONV='${top_builddir}'/../libiconv/lib/$_libs/libiconv.a
7714 LTLIBICONV='${top_builddir}'/../libiconv/lib/libiconv.la
7715 am_cv_lib_iconv=yes
7716 am_cv_func_iconv=yes
d542061a 7717fi
81ecdfbb
RW
7718rm -f core conftest.err conftest.$ac_objext \
7719 conftest$ac_exeext conftest.$ac_ext
016a3251
DD
7720 CPPFLAGS="$am_save_CPPFLAGS"
7721 LIBS="$am_save_LIBS"
7722 if test "$am_cv_func_iconv" = "yes"; then
7723 break
7724 fi
7725 done
77f120bf 7726 fi
94ae1714 7727
4edb1e84 7728 if test "$am_cv_func_iconv" != yes; then
6c7a06a3 7729 am_save_CPPFLAGS="$CPPFLAGS"
4edb1e84 7730 am_save_LIBS="$LIBS"
016a3251
DD
7731 CPPFLAGS="$LIBS $INCICONV"
7732 LIBS="$LIBS $LIBICONV"
81ecdfbb 7733 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7734/* end confdefs.h. */
6c7a06a3
TT
7735#include <stdlib.h>
7736#include <iconv.h>
bec39cab
AC
7737int
7738main ()
7739{
6c7a06a3
TT
7740iconv_t cd = iconv_open("","");
7741 iconv(cd,NULL,NULL,NULL,NULL);
7742 iconv_close(cd);
bec39cab
AC
7743 ;
7744 return 0;
7745}
7746_ACEOF
81ecdfbb 7747if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 7748 am_cv_lib_iconv=yes
6c7a06a3 7749 am_cv_func_iconv=yes
627af7ea 7750fi
81ecdfbb
RW
7751rm -f core conftest.err conftest.$ac_objext \
7752 conftest$ac_exeext conftest.$ac_ext
fc3b640d 7753 CPPFLAGS="$am_save_CPPFLAGS"
016a3251 7754 LIBS="$am_save_LIBS"
6c7a06a3
TT
7755 fi
7756
7757fi
81ecdfbb
RW
7758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
7759$as_echo "$am_cv_func_iconv" >&6; }
016a3251
DD
7760 if test "$am_cv_func_iconv" = yes; then
7761
7762$as_echo "#define HAVE_ICONV 1" >>confdefs.h
94ae1714 7763
016a3251 7764 fi
fc3b640d 7765 if test "$am_cv_lib_iconv" = yes; then
016a3251
DD
7766
7767 for element in $INCICONV; do
7768 haveit=
7769 for x in $CPPFLAGS; do
7770
7771 acl_save_prefix="$prefix"
7772 prefix="$acl_final_prefix"
7773 acl_save_exec_prefix="$exec_prefix"
7774 exec_prefix="$acl_final_exec_prefix"
7775 eval x=\"$x\"
7776 exec_prefix="$acl_save_exec_prefix"
7777 prefix="$acl_save_prefix"
7778
7779 if test "X$x" = "X$element"; then
7780 haveit=yes
7781 break
7782 fi
7783 done
7784 if test -z "$haveit"; then
7785 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
7786 fi
7787 done
7788
7789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
7790$as_echo_n "checking how to link with libiconv... " >&6; }
7791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
7792$as_echo "$LIBICONV" >&6; }
94ae1714 7793 else
016a3251
DD
7794 LIBICONV=
7795 LTLIBICONV=
fc3b640d 7796 fi
94ae1714 7797
6c7a06a3 7798
6c7a06a3 7799
016a3251 7800 if test "$am_cv_func_iconv" = yes; then
81ecdfbb
RW
7801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
7802$as_echo_n "checking for iconv declaration... " >&6; }
7803 if test "${am_cv_proto_iconv+set}" = set; then :
7804 $as_echo_n "(cached) " >&6
6c7a06a3
TT
7805else
7806
81ecdfbb 7807 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
7808/* end confdefs.h. */
7809
6c7a06a3
TT
7810#include <stdlib.h>
7811#include <iconv.h>
7812extern
b4e70030 7813#ifdef __cplusplus
6c7a06a3 7814"C"
b4e70030 7815#endif
6c7a06a3
TT
7816#if defined(__STDC__) || defined(__cplusplus)
7817size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
7818#else
7819size_t iconv();
7820#endif
7821
b4e70030
JB
7822int
7823main ()
7824{
6c7a06a3 7825
b4e70030
JB
7826 ;
7827 return 0;
7828}
7829_ACEOF
81ecdfbb 7830if ac_fn_c_try_compile "$LINENO"; then :
6c7a06a3 7831 am_cv_proto_iconv_arg1=""
4e8d927d 7832else
81ecdfbb 7833 am_cv_proto_iconv_arg1="const"
b4e70030 7834fi
81ecdfbb 7835rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6c7a06a3
TT
7836 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);"
7837fi
7838
7839 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
81ecdfbb 7840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
6c7a06a3 7841 }$am_cv_proto_iconv" >&5
81ecdfbb
RW
7842$as_echo "${ac_t:-
7843 }$am_cv_proto_iconv" >&6; }
6c7a06a3
TT
7844
7845cat >>confdefs.h <<_ACEOF
7846#define ICONV_CONST $am_cv_proto_iconv_arg1
7847_ACEOF
7848
7849 fi
6c7a06a3
TT
7850
7851
478aac75
DE
7852# GDB may fork/exec the iconv program to get the list of supported character
7853# sets. Allow the user to specify where to find it.
7854# There are several factors affecting the choice of option name:
7855# - There is already --with-libiconv-prefix but we can't use it, it specifies
7856# the build-time location of libiconv files.
7857# - The program we need to find is iconv, which comes with glibc. The user
7858# doesn't necessarily have libiconv installed. Therefore naming this
7859# --with-libiconv-foo feels wrong.
7860# - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is
7861# defined to work on directories not files (though it really doesn't know
7862# the difference).
7863# - Calling this --with-iconv-prefix is perceived to cause too much confusion
7864# with --with-libiconv-prefix.
7865# Putting these together is why the option name is --with-iconv-bin.
7866
7867
7868# Check whether --with-iconv-bin was given.
7869if test "${with_iconv_bin+set}" = set; then :
7870 withval=$with_iconv_bin; iconv_bin="${withval}"
7871
7872cat >>confdefs.h <<_ACEOF
7873#define ICONV_BIN "${iconv_bin}"
7874_ACEOF
7875
7876
7877 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
7878 if test "x$prefix" = xNONE; then
7879 test_prefix=/usr/local
7880 else
7881 test_prefix=$prefix
7882 fi
7883 else
7884 test_prefix=$exec_prefix
7885 fi
7886 value=0
7887 case ${iconv_bin} in
7888 "${test_prefix}"|"${test_prefix}/"*|\
7889 '${exec_prefix}'|'${exec_prefix}/'*)
7890 value=1
7891 ;;
7892 esac
7893
7894cat >>confdefs.h <<_ACEOF
7895#define ICONV_BIN_RELOCATABLE $value
7896_ACEOF
7897
7898
7899
7900fi
7901
7902
cb01cfba 7903# For the TUI, we need enhanced curses functionality.
bd8a8e1b 7904if test x"$enable_tui" != xno; then
cb01cfba
JB
7905 prefer_curses=yes
7906fi
7907
7908curses_found=no
7909if test x"$prefer_curses" = xyes; then
7910 # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
7911 # curses library because the latter might not provide all the
7912 # functionality we need. However, this leads to problems on systems
7913 # where the linker searches /usr/local/lib, but the compiler doesn't
7914 # search /usr/local/include, if ncurses is installed in /usr/local. A
7915 # default installation of ncurses on alpha*-dec-osf* will lead to such
7916 # a situation.
81ecdfbb
RW
7917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
7918$as_echo_n "checking for library containing waddstr... " >&6; }
7919if test "${ac_cv_search_waddstr+set}" = set; then :
7920 $as_echo_n "(cached) " >&6
6c7a06a3
TT
7921else
7922 ac_func_search_save_LIBS=$LIBS
81ecdfbb 7923cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
7924/* end confdefs.h. */
7925
81ecdfbb
RW
7926/* Override any GCC internal prototype to avoid an error.
7927 Use char because int might match the return type of a GCC
7928 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
7929#ifdef __cplusplus
7930extern "C"
7931#endif
6c7a06a3
TT
7932char waddstr ();
7933int
7934main ()
7935{
81ecdfbb 7936return waddstr ();
6c7a06a3
TT
7937 ;
7938 return 0;
7939}
7940_ACEOF
81ecdfbb
RW
7941for ac_lib in '' ncurses cursesX curses; do
7942 if test -z "$ac_lib"; then
7943 ac_res="none required"
7944 else
7945 ac_res=-l$ac_lib
7946 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7947 fi
7948 if ac_fn_c_try_link "$LINENO"; then :
7949 ac_cv_search_waddstr=$ac_res
7950fi
7951rm -f core conftest.err conftest.$ac_objext \
7952 conftest$ac_exeext
7953 if test "${ac_cv_search_waddstr+set}" = set; then :
7954 break
7955fi
7956done
7957if test "${ac_cv_search_waddstr+set}" = set; then :
7958
6c7a06a3 7959else
81ecdfbb
RW
7960 ac_cv_search_waddstr=no
7961fi
7962rm conftest.$ac_ext
7963LIBS=$ac_func_search_save_LIBS
7964fi
7965{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
7966$as_echo "$ac_cv_search_waddstr" >&6; }
7967ac_res=$ac_cv_search_waddstr
7968if test "$ac_res" != no; then :
7969 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3
TT
7970
7971fi
7972
7973
cb01cfba
JB
7974 if test "$ac_cv_search_waddstr" != no; then
7975 curses_found=yes
7976 fi
7977fi
7978
7979# Check whether we should enable the TUI, but only do so if we really
7980# can.
7981if test x"$enable_tui" != xno; then
7982 if test -d $srcdir/tui; then
7983 if test "$curses_found" != no; then
6c7a06a3
TT
7984 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
7985 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
7986 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
7987 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
6c7a06a3
TT
7988 else
7989 if test x"$enable_tui" = xyes; then
81ecdfbb 7990 as_fn_error "no enhanced curses library found; disable TUI" "$LINENO" 5
6c7a06a3 7991 else
81ecdfbb
RW
7992 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
7993$as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
6c7a06a3
TT
7994 fi
7995 fi
7996 fi
7997fi
7998
7999# Since GDB uses Readline, we need termcap functionality. In many
8000# cases this will be provided by the curses library, but some systems
8001# have a seperate termcap library, or no curses library at all.
8002
8003case $host_os in
8004 cygwin*)
8005 if test -d $srcdir/libtermcap; then
8006 LIBS="../libtermcap/libtermcap.a $LIBS"
8007 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
8008 fi ;;
8009 go32* | *djgpp*)
8010 ac_cv_search_tgetent="none required"
8011 ;;
6c7a06a3
TT
8012esac
8013
8014# These are the libraries checked by Readline.
81ecdfbb
RW
8015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
8016$as_echo_n "checking for library containing tgetent... " >&6; }
8017if test "${ac_cv_search_tgetent+set}" = set; then :
8018 $as_echo_n "(cached) " >&6
6c7a06a3
TT
8019else
8020 ac_func_search_save_LIBS=$LIBS
81ecdfbb 8021cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
8022/* end confdefs.h. */
8023
81ecdfbb
RW
8024/* Override any GCC internal prototype to avoid an error.
8025 Use char because int might match the return type of a GCC
8026 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
8027#ifdef __cplusplus
8028extern "C"
8029#endif
6c7a06a3
TT
8030char tgetent ();
8031int
8032main ()
8033{
81ecdfbb 8034return tgetent ();
6c7a06a3
TT
8035 ;
8036 return 0;
8037}
8038_ACEOF
81ecdfbb
RW
8039for ac_lib in '' termcap tinfo curses ncurses; do
8040 if test -z "$ac_lib"; then
8041 ac_res="none required"
8042 else
8043 ac_res=-l$ac_lib
6c7a06a3 8044 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
8045 fi
8046 if ac_fn_c_try_link "$LINENO"; then :
8047 ac_cv_search_tgetent=$ac_res
8048fi
8049rm -f core conftest.err conftest.$ac_objext \
8050 conftest$ac_exeext
8051 if test "${ac_cv_search_tgetent+set}" = set; then :
8052 break
8053fi
8054done
8055if test "${ac_cv_search_tgetent+set}" = set; then :
6c7a06a3 8056
6c7a06a3 8057else
81ecdfbb 8058 ac_cv_search_tgetent=no
6c7a06a3 8059fi
81ecdfbb 8060rm conftest.$ac_ext
6c7a06a3
TT
8061LIBS=$ac_func_search_save_LIBS
8062fi
81ecdfbb
RW
8063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
8064$as_echo "$ac_cv_search_tgetent" >&6; }
8065ac_res=$ac_cv_search_tgetent
8066if test "$ac_res" != no; then :
8067 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3 8068
06825bd1
MK
8069fi
8070
06825bd1 8071
bec39cab 8072if test "$ac_cv_search_tgetent" = no; then
7a85168d 8073 CONFIG_OBS="$CONFIG_OBS stub-termcap.o"
8ee53726
MK
8074fi
8075
3841debe 8076
81ecdfbb
RW
8077# Check whether --with-system-readline was given.
8078if test "${with_system_readline+set}" = set; then :
8079 withval=$with_system_readline;
8080fi
6a30b0a5 8081
6a30b0a5
AS
8082
8083if test "$with_system_readline" = yes; then
8084 READLINE=-lreadline
8085 READLINE_DEPS=
8086 READLINE_CFLAGS=
39037522 8087 READLINE_TEXI_INCFLAG=
6a30b0a5
AS
8088else
8089 READLINE='$(READLINE_DIR)/libreadline.a'
8090 READLINE_DEPS='$(READLINE)'
8091 READLINE_CFLAGS='-I$(READLINE_SRC)/..'
39037522 8092 READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
6a30b0a5
AS
8093fi
8094
8095
8096
8097
8098
f997c383
SD
8099# Generate jit-reader.h
8100
8101# This is typedeffed to GDB_CORE_ADDR in jit-reader.h
8102TARGET_PTR=
8103
8104# The cast to long int works around a bug in the HP C Compiler
8105# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8106# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8107# This bug is HP SR number 8606223364.
8108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5
8109$as_echo_n "checking size of unsigned long long... " >&6; }
8110if test "${ac_cv_sizeof_unsigned_long_long+set}" = set; then :
8111 $as_echo_n "(cached) " >&6
8112else
8113 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then :
8114
8115else
8116 if test "$ac_cv_type_unsigned_long_long" = yes; then
8117 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8118$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8119{ as_fn_set_status 77
8120as_fn_error "cannot compute sizeof (unsigned long long)
8121See \`config.log' for more details." "$LINENO" 5; }; }
8122 else
8123 ac_cv_sizeof_unsigned_long_long=0
8124 fi
8125fi
8126
8127fi
8128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5
8129$as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; }
8130
8131
8132
8133cat >>confdefs.h <<_ACEOF
8134#define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
8135_ACEOF
8136
8137
8138# The cast to long int works around a bug in the HP C Compiler
8139# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8140# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8141# This bug is HP SR number 8606223364.
8142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
8143$as_echo_n "checking size of unsigned long... " >&6; }
8144if test "${ac_cv_sizeof_unsigned_long+set}" = set; then :
8145 $as_echo_n "(cached) " >&6
8146else
8147 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then :
8148
8149else
8150 if test "$ac_cv_type_unsigned_long" = yes; then
8151 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8152$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8153{ as_fn_set_status 77
8154as_fn_error "cannot compute sizeof (unsigned long)
8155See \`config.log' for more details." "$LINENO" 5; }; }
8156 else
8157 ac_cv_sizeof_unsigned_long=0
8158 fi
8159fi
8160
8161fi
8162{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
8163$as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
8164
8165
8166
8167cat >>confdefs.h <<_ACEOF
8168#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
8169_ACEOF
8170
8171
8172# The cast to long int works around a bug in the HP C Compiler
8173# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8174# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8175# This bug is HP SR number 8606223364.
8176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5
8177$as_echo_n "checking size of unsigned __int128... " >&6; }
8178if test "${ac_cv_sizeof_unsigned___int128+set}" = set; then :
8179 $as_echo_n "(cached) " >&6
8180else
8181 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then :
8182
8183else
8184 if test "$ac_cv_type_unsigned___int128" = yes; then
8185 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8186$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8187{ as_fn_set_status 77
8188as_fn_error "cannot compute sizeof (unsigned __int128)
8189See \`config.log' for more details." "$LINENO" 5; }; }
8190 else
8191 ac_cv_sizeof_unsigned___int128=0
8192 fi
8193fi
8194
8195fi
8196{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5
8197$as_echo "$ac_cv_sizeof_unsigned___int128" >&6; }
8198
8199
8200
8201cat >>confdefs.h <<_ACEOF
8202#define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128
8203_ACEOF
8204
8205
8206
8207if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
8208 TARGET_PTR="unsigned long"
8209elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
8210 TARGET_PTR="unsigned long long"
8211elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
8212 TARGET_PTR="unsigned __int128"
8213else
8214 TARGET_PTR="unsigned long"
8215fi
8216
8217
8218ac_config_files="$ac_config_files jit-reader.h:jit-reader.in"
8219
8220
a2d08b9e
SD
8221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
8222$as_echo_n "checking for library containing dlopen... " >&6; }
8223if test "${ac_cv_search_dlopen+set}" = set; then :
8224 $as_echo_n "(cached) " >&6
8225else
8226 ac_func_search_save_LIBS=$LIBS
8227cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8228/* end confdefs.h. */
8229
8230/* Override any GCC internal prototype to avoid an error.
8231 Use char because int might match the return type of a GCC
8232 builtin and then its argument prototype would still apply. */
8233#ifdef __cplusplus
8234extern "C"
8235#endif
8236char dlopen ();
8237int
8238main ()
8239{
8240return dlopen ();
8241 ;
8242 return 0;
8243}
8244_ACEOF
8245for ac_lib in '' dl; do
8246 if test -z "$ac_lib"; then
8247 ac_res="none required"
8248 else
8249 ac_res=-l$ac_lib
8250 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8251 fi
8252 if ac_fn_c_try_link "$LINENO"; then :
8253 ac_cv_search_dlopen=$ac_res
8254fi
8255rm -f core conftest.err conftest.$ac_objext \
8256 conftest$ac_exeext
8257 if test "${ac_cv_search_dlopen+set}" = set; then :
8258 break
8259fi
8260done
8261if test "${ac_cv_search_dlopen+set}" = set; then :
8262
8263else
8264 ac_cv_search_dlopen=no
8265fi
8266rm conftest.$ac_ext
8267LIBS=$ac_func_search_save_LIBS
8268fi
8269{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
8270$as_echo "$ac_cv_search_dlopen" >&6; }
8271ac_res=$ac_cv_search_dlopen
8272if test "$ac_res" != no; then :
8273 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8274
8275fi
8276
8277
39037522 8278
b8e0a31c
SD
8279
8280# Check whether --with-jit-reader-dir was given.
8281if test "${with_jit_reader_dir+set}" = set; then :
8282 withval=$with_jit_reader_dir;
8283 JIT_READER_DIR=$withval
8284else
8285 JIT_READER_DIR=${libdir}/gdb
8286fi
8287
8288
8289 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
8290 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
8291 ac_define_dir=`eval echo $JIT_READER_DIR`
8292 ac_define_dir=`eval echo $ac_define_dir`
8293
8294cat >>confdefs.h <<_ACEOF
8295#define JIT_READER_DIR "$ac_define_dir"
8296_ACEOF
8297
8298
8299
8300
8301 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
8302 if test "x$prefix" = xNONE; then
8303 test_prefix=/usr/local
8304 else
8305 test_prefix=$prefix
8306 fi
8307 else
8308 test_prefix=$exec_prefix
8309 fi
8310 value=0
8311 case ${ac_define_dir} in
8312 "${test_prefix}"|"${test_prefix}/"*|\
8313 '${exec_prefix}'|'${exec_prefix}/'*)
8314 value=1
8315 ;;
8316 esac
8317
8318cat >>confdefs.h <<_ACEOF
8319#define JIT_READER_DIR_RELOCATABLE $value
8320_ACEOF
8321
8322
8323
8324
8325
81ecdfbb
RW
8326# Check whether --with-expat was given.
8327if test "${with_expat+set}" = set; then :
8328 withval=$with_expat;
5c39566f
DJ
8329else
8330 with_expat=auto
81ecdfbb
RW
8331fi
8332
8333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
8334$as_echo_n "checking whether to use expat... " >&6; }
8335{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
8336$as_echo "$with_expat" >&6; }
5c39566f
DJ
8337
8338if test "${with_expat}" = no; then
81ecdfbb
RW
8339 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
8340$as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
5c39566f
DJ
8341 HAVE_LIBEXPAT=no
8342else
8343
3841debe
DJ
8344
8345
8346
8347
8348
8349
8350
8351 use_additional=yes
8352
8353 acl_save_prefix="$prefix"
8354 prefix="$acl_final_prefix"
8355 acl_save_exec_prefix="$exec_prefix"
8356 exec_prefix="$acl_final_exec_prefix"
8357
8358 eval additional_includedir=\"$includedir\"
8359 eval additional_libdir=\"$libdir\"
8360
8361 exec_prefix="$acl_save_exec_prefix"
8362 prefix="$acl_save_prefix"
8363
8364
81ecdfbb
RW
8365# Check whether --with-libexpat-prefix was given.
8366if test "${with_libexpat_prefix+set}" = set; then :
8367 withval=$with_libexpat_prefix;
3841debe
DJ
8368 if test "X$withval" = "Xno"; then
8369 use_additional=no
8370 else
8371 if test "X$withval" = "X"; then
8372
8373 acl_save_prefix="$prefix"
8374 prefix="$acl_final_prefix"
8375 acl_save_exec_prefix="$exec_prefix"
8376 exec_prefix="$acl_final_exec_prefix"
8377
8378 eval additional_includedir=\"$includedir\"
8379 eval additional_libdir=\"$libdir\"
8380
8381 exec_prefix="$acl_save_exec_prefix"
8382 prefix="$acl_save_prefix"
8383
8384 else
8385 additional_includedir="$withval/include"
8386 additional_libdir="$withval/lib"
8387 fi
8388 fi
8389
81ecdfbb
RW
8390fi
8391
3841debe
DJ
8392 LIBEXPAT=
8393 LTLIBEXPAT=
8394 INCEXPAT=
8395 rpathdirs=
8396 ltrpathdirs=
8397 names_already_handled=
8398 names_next_round='expat '
8399 while test -n "$names_next_round"; do
8400 names_this_round="$names_next_round"
8401 names_next_round=
8402 for name in $names_this_round; do
8403 already_handled=
8404 for n in $names_already_handled; do
8405 if test "$n" = "$name"; then
8406 already_handled=yes
8407 break
8408 fi
8409 done
8410 if test -z "$already_handled"; then
8411 names_already_handled="$names_already_handled $name"
8412 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
8413 eval value=\"\$HAVE_LIB$uppername\"
8414 if test -n "$value"; then
8415 if test "$value" = yes; then
8416 eval value=\"\$LIB$uppername\"
8417 test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
8418 eval value=\"\$LTLIB$uppername\"
8419 test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
8420 else
8421 :
8422 fi
8423 else
8424 found_dir=
8425 found_la=
8426 found_so=
8427 found_a=
8428 if test $use_additional = yes; then
8429 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
8430 found_dir="$additional_libdir"
8431 found_so="$additional_libdir/lib$name.$shlibext"
8432 if test -f "$additional_libdir/lib$name.la"; then
8433 found_la="$additional_libdir/lib$name.la"
8434 fi
8435 else
8436 if test -f "$additional_libdir/lib$name.$libext"; then
8437 found_dir="$additional_libdir"
8438 found_a="$additional_libdir/lib$name.$libext"
8439 if test -f "$additional_libdir/lib$name.la"; then
8440 found_la="$additional_libdir/lib$name.la"
8441 fi
8442 fi
8443 fi
8444 fi
8445 if test "X$found_dir" = "X"; then
8446 for x in $LDFLAGS $LTLIBEXPAT; do
8447
8448 acl_save_prefix="$prefix"
8449 prefix="$acl_final_prefix"
8450 acl_save_exec_prefix="$exec_prefix"
8451 exec_prefix="$acl_final_exec_prefix"
8452 eval x=\"$x\"
8453 exec_prefix="$acl_save_exec_prefix"
8454 prefix="$acl_save_prefix"
8455
8456 case "$x" in
8457 -L*)
8458 dir=`echo "X$x" | sed -e 's/^X-L//'`
8459 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
8460 found_dir="$dir"
8461 found_so="$dir/lib$name.$shlibext"
8462 if test -f "$dir/lib$name.la"; then
8463 found_la="$dir/lib$name.la"
8464 fi
8465 else
8466 if test -f "$dir/lib$name.$libext"; then
8467 found_dir="$dir"
8468 found_a="$dir/lib$name.$libext"
8469 if test -f "$dir/lib$name.la"; then
8470 found_la="$dir/lib$name.la"
8471 fi
8472 fi
8473 fi
8474 ;;
8475 esac
8476 if test "X$found_dir" != "X"; then
8477 break
8478 fi
8479 done
8480 fi
8481 if test "X$found_dir" != "X"; then
8482 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
8483 if test "X$found_so" != "X"; then
8484 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
8485 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
8486 else
8487 haveit=
8488 for x in $ltrpathdirs; do
8489 if test "X$x" = "X$found_dir"; then
8490 haveit=yes
8491 break
8492 fi
8493 done
8494 if test -z "$haveit"; then
8495 ltrpathdirs="$ltrpathdirs $found_dir"
8496 fi
8497 if test "$hardcode_direct" = yes; then
8498 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
8499 else
8500 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
8501 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
8502 haveit=
8503 for x in $rpathdirs; do
8504 if test "X$x" = "X$found_dir"; then
8505 haveit=yes
8506 break
8507 fi
8508 done
8509 if test -z "$haveit"; then
8510 rpathdirs="$rpathdirs $found_dir"
8511 fi
8512 else
8513 haveit=
8514 for x in $LDFLAGS $LIBEXPAT; do
8515
8516 acl_save_prefix="$prefix"
8517 prefix="$acl_final_prefix"
8518 acl_save_exec_prefix="$exec_prefix"
8519 exec_prefix="$acl_final_exec_prefix"
8520 eval x=\"$x\"
8521 exec_prefix="$acl_save_exec_prefix"
8522 prefix="$acl_save_prefix"
8523
8524 if test "X$x" = "X-L$found_dir"; then
8525 haveit=yes
8526 break
8527 fi
8528 done
8529 if test -z "$haveit"; then
8530 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
8531 fi
8532 if test "$hardcode_minus_L" != no; then
8533 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
8534 else
8535 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
8536 fi
8537 fi
8538 fi
8539 fi
8540 else
8541 if test "X$found_a" != "X"; then
8542 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
8543 else
8544 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
8545 fi
8546 fi
8547 additional_includedir=
8548 case "$found_dir" in
8549 */lib | */lib/)
8550 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
8551 additional_includedir="$basedir/include"
8552 ;;
8553 esac
8554 if test "X$additional_includedir" != "X"; then
8555 if test "X$additional_includedir" != "X/usr/include"; then
8556 haveit=
8557 if test "X$additional_includedir" = "X/usr/local/include"; then
8558 if test -n "$GCC"; then
8559 case $host_os in
8560 linux*) haveit=yes;;
8561 esac
8562 fi
8563 fi
8564 if test -z "$haveit"; then
8565 for x in $CPPFLAGS $INCEXPAT; do
8566
8567 acl_save_prefix="$prefix"
8568 prefix="$acl_final_prefix"
8569 acl_save_exec_prefix="$exec_prefix"
8570 exec_prefix="$acl_final_exec_prefix"
8571 eval x=\"$x\"
8572 exec_prefix="$acl_save_exec_prefix"
8573 prefix="$acl_save_prefix"
8574
8575 if test "X$x" = "X-I$additional_includedir"; then
8576 haveit=yes
8577 break
8578 fi
8579 done
8580 if test -z "$haveit"; then
8581 if test -d "$additional_includedir"; then
8582 INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
8583 fi
8584 fi
8585 fi
8586 fi
8587 fi
8588 if test -n "$found_la"; then
8589 save_libdir="$libdir"
8590 case "$found_la" in
8591 */* | *\\*) . "$found_la" ;;
8592 *) . "./$found_la" ;;
8593 esac
8594 libdir="$save_libdir"
8595 for dep in $dependency_libs; do
8596 case "$dep" in
8597 -L*)
8598 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
8599 if test "X$additional_libdir" != "X/usr/lib"; then
8600 haveit=
8601 if test "X$additional_libdir" = "X/usr/local/lib"; then
8602 if test -n "$GCC"; then
8603 case $host_os in
8604 linux*) haveit=yes;;
8605 esac
8606 fi
8607 fi
8608 if test -z "$haveit"; then
8609 haveit=
8610 for x in $LDFLAGS $LIBEXPAT; do
8611
8612 acl_save_prefix="$prefix"
8613 prefix="$acl_final_prefix"
8614 acl_save_exec_prefix="$exec_prefix"
8615 exec_prefix="$acl_final_exec_prefix"
8616 eval x=\"$x\"
8617 exec_prefix="$acl_save_exec_prefix"
8618 prefix="$acl_save_prefix"
8619
8620 if test "X$x" = "X-L$additional_libdir"; then
8621 haveit=yes
8622 break
8623 fi
8624 done
8625 if test -z "$haveit"; then
8626 if test -d "$additional_libdir"; then
8627 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
8628 fi
8629 fi
8630 haveit=
8631 for x in $LDFLAGS $LTLIBEXPAT; do
8632
8633 acl_save_prefix="$prefix"
8634 prefix="$acl_final_prefix"
8635 acl_save_exec_prefix="$exec_prefix"
8636 exec_prefix="$acl_final_exec_prefix"
8637 eval x=\"$x\"
8638 exec_prefix="$acl_save_exec_prefix"
8639 prefix="$acl_save_prefix"
8640
8641 if test "X$x" = "X-L$additional_libdir"; then
8642 haveit=yes
8643 break
8644 fi
8645 done
8646 if test -z "$haveit"; then
8647 if test -d "$additional_libdir"; then
8648 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
8649 fi
8650 fi
8651 fi
8652 fi
8653 ;;
8654 -R*)
8655 dir=`echo "X$dep" | sed -e 's/^X-R//'`
8656 if test "$enable_rpath" != no; then
8657 haveit=
8658 for x in $rpathdirs; do
8659 if test "X$x" = "X$dir"; then
8660 haveit=yes
8661 break
8662 fi
8663 done
8664 if test -z "$haveit"; then
8665 rpathdirs="$rpathdirs $dir"
8666 fi
8667 haveit=
8668 for x in $ltrpathdirs; do
8669 if test "X$x" = "X$dir"; then
8670 haveit=yes
8671 break
8672 fi
8673 done
8674 if test -z "$haveit"; then
8675 ltrpathdirs="$ltrpathdirs $dir"
8676 fi
8677 fi
8678 ;;
8679 -l*)
8680 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
8681 ;;
8682 *.la)
8683 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
8684 ;;
8685 *)
8686 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
8687 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
8688 ;;
81ecdfbb
RW
8689 esac
8690 done
8691 fi
8692 else
8693 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
8694 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
8695 fi
8696 fi
8697 fi
8698 done
8699 done
8700 if test "X$rpathdirs" != "X"; then
8701 if test -n "$hardcode_libdir_separator"; then
8702 alldirs=
8703 for found_dir in $rpathdirs; do
8704 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
8705 done
8706 acl_save_libdir="$libdir"
8707 libdir="$alldirs"
8708 eval flag=\"$hardcode_libdir_flag_spec\"
8709 libdir="$acl_save_libdir"
8710 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
8711 else
8712 for found_dir in $rpathdirs; do
8713 acl_save_libdir="$libdir"
8714 libdir="$found_dir"
8715 eval flag=\"$hardcode_libdir_flag_spec\"
8716 libdir="$acl_save_libdir"
8717 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
8718 done
8719 fi
8720 fi
8721 if test "X$ltrpathdirs" != "X"; then
8722 for found_dir in $ltrpathdirs; do
8723 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
8724 done
8725 fi
a9322a30
TT
8726
8727
81ecdfbb 8728 ac_save_CPPFLAGS="$CPPFLAGS"
a9322a30 8729
81ecdfbb
RW
8730 for element in $INCEXPAT; do
8731 haveit=
8732 for x in $CPPFLAGS; do
a9322a30 8733
81ecdfbb
RW
8734 acl_save_prefix="$prefix"
8735 prefix="$acl_final_prefix"
8736 acl_save_exec_prefix="$exec_prefix"
8737 exec_prefix="$acl_final_exec_prefix"
8738 eval x=\"$x\"
8739 exec_prefix="$acl_save_exec_prefix"
8740 prefix="$acl_save_prefix"
a8111142 8741
81ecdfbb
RW
8742 if test "X$x" = "X$element"; then
8743 haveit=yes
8744 break
8745 fi
8746 done
8747 if test -z "$haveit"; then
8748 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
8749 fi
8750 done
a9322a30
TT
8751
8752
81ecdfbb
RW
8753 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
8754$as_echo_n "checking for libexpat... " >&6; }
8755if test "${ac_cv_libexpat+set}" = set; then :
8756 $as_echo_n "(cached) " >&6
bec39cab 8757else
bec39cab 8758
81ecdfbb
RW
8759 ac_save_LIBS="$LIBS"
8760 LIBS="$LIBS $LIBEXPAT"
8761 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8762/* end confdefs.h. */
81ecdfbb
RW
8763#include "expat.h"
8764int
8765main ()
8766{
8767XML_Parser p = XML_ParserCreate (0);
8768 ;
8769 return 0;
8770}
bec39cab 8771_ACEOF
81ecdfbb
RW
8772if ac_fn_c_try_link "$LINENO"; then :
8773 ac_cv_libexpat=yes
c906108c 8774else
81ecdfbb 8775 ac_cv_libexpat=no
bec39cab 8776fi
81ecdfbb
RW
8777rm -f core conftest.err conftest.$ac_objext \
8778 conftest$ac_exeext conftest.$ac_ext
8779 LIBS="$ac_save_LIBS"
c906108c 8780
95ca63c4 8781fi
81ecdfbb
RW
8782{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
8783$as_echo "$ac_cv_libexpat" >&6; }
8784 if test "$ac_cv_libexpat" = yes; then
8785 HAVE_LIBEXPAT=yes
bec39cab 8786
81ecdfbb 8787$as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
bec39cab 8788
81ecdfbb
RW
8789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
8790$as_echo_n "checking how to link with libexpat... " >&6; }
8791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
8792$as_echo "$LIBEXPAT" >&6; }
8793 else
8794 HAVE_LIBEXPAT=no
8795 CPPFLAGS="$ac_save_CPPFLAGS"
8796 LIBEXPAT=
8797 LTLIBEXPAT=
8798 fi
95ca63c4
CF
8799
8800
8801
7cb9022a
MK
8802
8803
bec39cab 8804
81ecdfbb
RW
8805 if test "$HAVE_LIBEXPAT" != yes; then
8806 if test "$with_expat" = yes; then
8807 as_fn_error "expat is missing or unusable" "$LINENO" 5
8808 else
8809 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
8810$as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
8811 fi
8812 else
8813 save_LIBS=$LIBS
8814 LIBS="$LIBS $LIBEXPAT"
8815 for ac_func in XML_StopParser
8816do :
8817 ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
8818if test "x$ac_cv_func_XML_StopParser" = x""yes; then :
bec39cab 8819 cat >>confdefs.h <<_ACEOF
81ecdfbb 8820#define HAVE_XML_STOPPARSER 1
bec39cab 8821_ACEOF
95ca63c4 8822
bec39cab 8823fi
bec39cab 8824done
95ca63c4 8825
81ecdfbb
RW
8826 LIBS=$save_LIBS
8827 fi
a9322a30
TT
8828fi
8829
d344e670
DE
8830# --------------------- #
8831# Check for libpython. #
8832# --------------------- #
8833
a9322a30 8834
a9322a30
TT
8835
8836
ec685c5e 8837
0c4a4063 8838
81ecdfbb
RW
8839# Check whether --with-python was given.
8840if test "${with_python+set}" = set; then :
8841 withval=$with_python;
bec39cab 8842else
81ecdfbb 8843 with_python=auto
bec39cab 8844fi
bec39cab 8845
81ecdfbb
RW
8846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
8847$as_echo_n "checking whether to use python... " >&6; }
8848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
8849$as_echo "$with_python" >&6; }
9a156167 8850
81ecdfbb
RW
8851if test "${with_python}" = no; then
8852 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
8853$as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
8854 have_libpython=no
bec39cab 8855else
81ecdfbb 8856 case "${with_python}" in
8c85a4e2 8857 [\\/]* | ?:[\\/]*)
ec685c5e
DE
8858 if test -d ${with_python}; then
8859 # Assume the python binary is ${with_python}/bin/python.
ec685c5e 8860 python_prog="${with_python}/bin/python"
0c4a4063 8861 python_prefix=
9c4ea6c5
JB
8862 # If python does not exit ${with_python}/bin, then try in
8863 # ${with_python}. On Windows/MinGW, this is where the Python
8864 # executable is.
8865 if test ! -x "${python_prog}"; then
8866 python_prog="${with_python}/python"
8867 python_prefix=
8868 fi
e7a30f46 8869 if test ! -x "${python_prog}"; then
ec685c5e
DE
8870 # Fall back to gdb 7.0/7.1 behaviour.
8871 python_prog=missing
0c4a4063 8872 python_prefix=${with_python}
ec685c5e 8873 fi
e7a30f46 8874 elif test -x "${with_python}"; then
ec685c5e
DE
8875 # While we can't run python compiled for $host (unless host == build),
8876 # the user could write a script that provides the needed information,
8877 # so we support that.
ec685c5e 8878 python_prog=${with_python}
0c4a4063 8879 python_prefix=
ec685c5e
DE
8880 else
8881 as_fn_error "invalid value for --with-python" "$LINENO" 5
8882 fi
81ecdfbb 8883 ;;
ec685c5e
DE
8884 */*)
8885 # Disallow --with-python=foo/bar.
81ecdfbb
RW
8886 as_fn_error "invalid value for --with-python" "$LINENO" 5
8887 ;;
ec685c5e
DE
8888 *)
8889 # The user has either specified auto, yes, or the name of the python
8890 # program assumed to be in $PATH.
8891 python_prefix=
8892 case "${with_python}" in
8893 yes | auto)
8894 if test ${build} = ${host}; then
8895 # Extract the first word of "python", so it can be a program name with args.
8896set dummy python; ac_word=$2
8897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8898$as_echo_n "checking for $ac_word... " >&6; }
8899if test "${ac_cv_path_python_prog_path+set}" = set; then :
8900 $as_echo_n "(cached) " >&6
8901else
8902 case $python_prog_path in
8903 [\\/]* | ?:[\\/]*)
8904 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
8905 ;;
8906 *)
8907 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8908for as_dir in $PATH
8909do
8910 IFS=$as_save_IFS
8911 test -z "$as_dir" && as_dir=.
8912 for ac_exec_ext in '' $ac_executable_extensions; do
8913 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8914 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
8915 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8916 break 2
8917 fi
8918done
8919 done
8920IFS=$as_save_IFS
8921
8922 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
8923 ;;
8924esac
8925fi
8926python_prog_path=$ac_cv_path_python_prog_path
8927if test -n "$python_prog_path"; then
8928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
8929$as_echo "$python_prog_path" >&6; }
8930else
8931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8932$as_echo "no" >&6; }
8933fi
8934
8935
8936 if test "${python_prog_path}" = missing; then
8937 python_prog=missing
8938 else
8939 python_prog=${python_prog_path}
8940 fi
8941 else
8942 # Not much we can do except assume the cross-compiler will find the
8943 # right files.
8944 python_prog=missing
8945 fi
8946 ;;
8947 *)
8948 # While we can't run python compiled for $host (unless host == build),
8949 # the user could write a script that provides the needed information,
8950 # so we support that.
8951 python_prog="${with_python}"
8952 # Extract the first word of "${python_prog}", so it can be a program name with args.
8953set dummy ${python_prog}; ac_word=$2
8954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8955$as_echo_n "checking for $ac_word... " >&6; }
8956if test "${ac_cv_path_python_prog_path+set}" = set; then :
8957 $as_echo_n "(cached) " >&6
8958else
8959 case $python_prog_path in
8960 [\\/]* | ?:[\\/]*)
8961 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
8962 ;;
8963 *)
8964 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8965for as_dir in $PATH
8966do
8967 IFS=$as_save_IFS
8968 test -z "$as_dir" && as_dir=.
8969 for ac_exec_ext in '' $ac_executable_extensions; do
8970 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8971 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
8972 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8973 break 2
8974 fi
8975done
8976 done
8977IFS=$as_save_IFS
8978
8979 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
8980 ;;
8981esac
8982fi
8983python_prog_path=$ac_cv_path_python_prog_path
8984if test -n "$python_prog_path"; then
8985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
8986$as_echo "$python_prog_path" >&6; }
8987else
8988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8989$as_echo "no" >&6; }
8990fi
8991
8992
8993 if test "${python_prog_path}" = missing; then
8994 as_fn_error "unable to find python program ${python_prog}" "$LINENO" 5
8995 fi
8996 ;;
8997 esac
81ecdfbb
RW
8998 esac
8999
ec685c5e 9000 if test "${python_prog}" != missing; then
e7a30f46
DE
9001 # We have a python program to use, but it may be too old.
9002 # Don't flag an error for --with-python=auto (the default).
9003 have_python_config=yes
ec685c5e
DE
9004 python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
9005 if test $? != 0; then
e7a30f46
DE
9006 have_python_config=failed
9007 if test "${with_python}" != auto; then
9008 as_fn_error "failure running python-config --includes" "$LINENO" 5
9009 fi
ec685c5e
DE
9010 fi
9011 python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
9012 if test $? != 0; then
e7a30f46
DE
9013 have_python_config=failed
9014 if test "${with_python}" != auto; then
9015 as_fn_error "failure running python-config --ldflags" "$LINENO" 5
9016 fi
ec685c5e 9017 fi
0c4a4063
DE
9018 python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
9019 if test $? != 0; then
e7a30f46
DE
9020 have_python_config=failed
9021 if test "${with_python}" != auto; then
9022 as_fn_error "failure running python-config --exec-prefix" "$LINENO" 5
9023 fi
0c4a4063 9024 fi
ec685c5e 9025 else
ac534cba
JB
9026 # We do not have a python executable we can use to determine where
9027 # to find the Python headers and libs. We cannot guess the include
9028 # path from the python_prefix either, because that include path
9029 # depends on the Python version. So, there is nothing much we can
9030 # do except assume that the compiler will be able to find those files.
9031 python_includes=
9032 python_libs=
0c4a4063 9033 have_python_config=no
ec685c5e 9034 fi
bec39cab 9035
ec685c5e
DE
9036 # If we have python-config, only try the configuration it provides.
9037 # Otherwise fallback on the old way of trying different versions of
9038 # python in turn.
81ecdfbb 9039
ec685c5e
DE
9040 have_libpython=no
9041 if test "${have_python_config}" = yes; then
c1039e3c
JB
9042 # Determine the Python version by extracting "-lpython<version>"
9043 # part of the python_libs. <version> is usually X.Y with X and Y
9044 # being decimal numbers, but can also be XY (seen on Windows).
9045 #
9046 # The extraction is performed using sed with a regular expression.
9047 # Initially, the regexp used was using the '?' quantifier to make
9048 # the dot in the version number optional. Unfortunately, this
9049 # does not work with non-GNU versions of sed because, because of
9050 # what looks like a limitation (the '?' quantifier does not work
9051 # with back-references). We work around this limitation by using
9052 # the '*' quantifier instead. It means that, in theory, we might
9053 # match unexpected version strings such as "-lpython2..7", but
9054 # this seems unlikely in practice. And even if that happens,
9055 # an error will be triggered later on, when checking that version
9056 # number.
ec685c5e 9057 python_version=`echo " ${python_libs} " \
c1039e3c 9058 | sed -e 's,^.* -l\(python[0-9]*[.]*[0-9]*\).*$,\1,'`
0c4a4063
DE
9059 case "${python_version}" in
9060 python*)
ec685c5e
DE
9061
9062 version=${python_version}
9063
9064 new_CPPFLAGS=${python_includes}
9065 new_LIBS=${python_libs}
81ecdfbb
RW
9066 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
9067$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 9068 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 9069 save_LIBS=$LIBS
ec685c5e
DE
9070 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9071 LIBS="$LIBS $new_LIBS"
9072 found_usable_python=no
81ecdfbb 9073 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9074/* end confdefs.h. */
ac534cba 9075#include "Python.h"
81ecdfbb
RW
9076int
9077main ()
9078{
9079Py_Initialize ();
9080 ;
9081 return 0;
9082}
bec39cab 9083_ACEOF
81ecdfbb 9084if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
9085 have_libpython=${version}
9086 found_usable_python=yes
ac534cba
JB
9087 PYTHON_CPPFLAGS=$new_CPPFLAGS
9088 PYTHON_LIBS=$new_LIBS
9a156167 9089fi
81ecdfbb
RW
9090rm -f core conftest.err conftest.$ac_objext \
9091 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
9092 CPPFLAGS=$save_CPPFLAGS
9093 LIBS=$save_LIBS
ec685c5e
DE
9094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
9095$as_echo "${found_usable_python}" >&6; }
9a156167 9096
0c4a4063
DE
9097 ;;
9098 *)
ec685c5e 9099 as_fn_error "unable to determine python version from ${python_libs}" "$LINENO" 5
0c4a4063
DE
9100 ;;
9101 esac
e7a30f46 9102 elif test "${have_python_config}" != failed; then
ec685c5e 9103 if test "${have_libpython}" = no; then
9a156167 9104
420697bb
TT
9105 version=python2.7
9106
9107 new_CPPFLAGS=${python_includes}
9108 new_LIBS="${python_libs} -lpython2.7"
9109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
9110$as_echo_n "checking for ${version}... " >&6; }
9111 save_CPPFLAGS=$CPPFLAGS
9112 save_LIBS=$LIBS
9113 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9114 LIBS="$LIBS $new_LIBS"
9115 found_usable_python=no
9116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9117/* end confdefs.h. */
ac534cba 9118#include "Python.h"
420697bb
TT
9119int
9120main ()
9121{
9122Py_Initialize ();
9123 ;
9124 return 0;
9125}
9126_ACEOF
9127if ac_fn_c_try_link "$LINENO"; then :
9128 have_libpython=${version}
9129 found_usable_python=yes
ac534cba
JB
9130 PYTHON_CPPFLAGS=$new_CPPFLAGS
9131 PYTHON_LIBS=$new_LIBS
420697bb
TT
9132fi
9133rm -f core conftest.err conftest.$ac_objext \
9134 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
9135 CPPFLAGS=$save_CPPFLAGS
9136 LIBS=$save_LIBS
420697bb
TT
9137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
9138$as_echo "${found_usable_python}" >&6; }
9139
9140 fi
9141 if test "${have_libpython}" = no; then
9142
ec685c5e
DE
9143 version=python2.6
9144
9145 new_CPPFLAGS=${python_includes}
9146 new_LIBS="${python_libs} -lpython2.6"
9147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
9148$as_echo_n "checking for ${version}... " >&6; }
9149 save_CPPFLAGS=$CPPFLAGS
9150 save_LIBS=$LIBS
9151 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9152 LIBS="$LIBS $new_LIBS"
9153 found_usable_python=no
9154 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9155/* end confdefs.h. */
ac534cba 9156#include "Python.h"
ec685c5e
DE
9157int
9158main ()
9159{
9160Py_Initialize ();
9161 ;
9162 return 0;
9163}
9164_ACEOF
9165if ac_fn_c_try_link "$LINENO"; then :
9166 have_libpython=${version}
9167 found_usable_python=yes
ac534cba
JB
9168 PYTHON_CPPFLAGS=$new_CPPFLAGS
9169 PYTHON_LIBS=$new_LIBS
ec685c5e
DE
9170fi
9171rm -f core conftest.err conftest.$ac_objext \
9172 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
9173 CPPFLAGS=$save_CPPFLAGS
9174 LIBS=$save_LIBS
ec685c5e
DE
9175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
9176$as_echo "${found_usable_python}" >&6; }
9a156167 9177
81ecdfbb 9178 fi
ec685c5e 9179 if test ${have_libpython} = no; then
9a156167 9180
81ecdfbb 9181 version=python2.5
9a156167 9182
ec685c5e
DE
9183 new_CPPFLAGS=${python_includes}
9184 new_LIBS="${python_libs} -lpython2.5"
81ecdfbb
RW
9185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
9186$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 9187 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 9188 save_LIBS=$LIBS
ec685c5e
DE
9189 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9190 LIBS="$LIBS $new_LIBS"
9191 found_usable_python=no
81ecdfbb 9192 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 9193/* end confdefs.h. */
ac534cba 9194#include "Python.h"
81ecdfbb
RW
9195int
9196main ()
9197{
9198Py_Initialize ();
9199 ;
9200 return 0;
9201}
436868fb 9202_ACEOF
81ecdfbb 9203if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
9204 have_libpython=${version}
9205 found_usable_python=yes
ac534cba
JB
9206 PYTHON_CPPFLAGS=$new_CPPFLAGS
9207 PYTHON_LIBS=$new_LIBS
436868fb 9208fi
81ecdfbb
RW
9209rm -f core conftest.err conftest.$ac_objext \
9210 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
9211 CPPFLAGS=$save_CPPFLAGS
9212 LIBS=$save_LIBS
ec685c5e
DE
9213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
9214$as_echo "${found_usable_python}" >&6; }
a9322a30 9215
81ecdfbb 9216 fi
ec685c5e 9217 if test ${have_libpython} = no; then
a9322a30 9218
81ecdfbb 9219 version=python2.4
a9322a30 9220
ec685c5e
DE
9221 new_CPPFLAGS=${python_includes}
9222 new_LIBS="${python_libs} -lpython2.4"
81ecdfbb
RW
9223 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
9224$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 9225 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 9226 save_LIBS=$LIBS
ec685c5e
DE
9227 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9228 LIBS="$LIBS $new_LIBS"
9229 found_usable_python=no
81ecdfbb 9230 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 9231/* end confdefs.h. */
ac534cba 9232#include "Python.h"
a9322a30
TT
9233int
9234main ()
9235{
81ecdfbb 9236Py_Initialize ();
a9322a30
TT
9237 ;
9238 return 0;
9239}
436868fb 9240_ACEOF
81ecdfbb 9241if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
9242 have_libpython=${version}
9243 found_usable_python=yes
ac534cba
JB
9244 PYTHON_CPPFLAGS=$new_CPPFLAGS
9245 PYTHON_LIBS=$new_LIBS
436868fb 9246fi
81ecdfbb
RW
9247rm -f core conftest.err conftest.$ac_objext \
9248 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
9249 CPPFLAGS=$save_CPPFLAGS
9250 LIBS=$save_LIBS
ec685c5e
DE
9251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
9252$as_echo "${found_usable_python}" >&6; }
81ecdfbb 9253
ec685c5e
DE
9254 fi
9255 fi
9c4ea6c5 9256 if test "${have_libpython}" = python2.7 -o "${have_libpython}" = python27; then
11763c18
TT
9257
9258$as_echo "#define HAVE_LIBPYTHON2_7 1" >>confdefs.h
9259
9c4ea6c5 9260 elif test "${have_libpython}" = python2.6 -o "${have_libpython}" = python26; then
ec685c5e
DE
9261
9262$as_echo "#define HAVE_LIBPYTHON2_6 1" >>confdefs.h
9263
9c4ea6c5 9264 elif test "${have_libpython}" = python2.5 -o "${have_libpython}" = python25; then
ec685c5e
DE
9265
9266$as_echo "#define HAVE_LIBPYTHON2_5 1" >>confdefs.h
9267
9c4ea6c5 9268 elif test "${have_libpython}" = python2.4 -o "${have_libpython}" = python24; then
81ecdfbb
RW
9269
9270$as_echo "#define HAVE_LIBPYTHON2_4 1" >>confdefs.h
9271
81ecdfbb 9272 fi
ec685c5e
DE
9273
9274 if test "${have_libpython}" = no; then
81ecdfbb
RW
9275 case "${with_python}" in
9276 yes)
9277 as_fn_error "python is missing or unusable" "$LINENO" 5
9278 ;;
9279 auto)
9280 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
9281$as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
9282 ;;
9283 *)
9284 as_fn_error "no usable python found at ${with_python}" "$LINENO" 5
9285 ;;
9286 esac
0c4a4063
DE
9287 else
9288 if test -n "${python_prefix}"; then
9289
9290cat >>confdefs.h <<_ACEOF
9291#define WITH_PYTHON_PATH "${python_prefix}"
9292_ACEOF
9293
9294
9295 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
9296 if test "x$prefix" = xNONE; then
9297 test_prefix=/usr/local
9298 else
9299 test_prefix=$prefix
9300 fi
9301 else
9302 test_prefix=$exec_prefix
9303 fi
9304 value=0
9305 case ${python_prefix} in
9306 "${test_prefix}"|"${test_prefix}/"*|\
9307 '${exec_prefix}'|'${exec_prefix}/'*)
9308 value=1
9309 ;;
9310 esac
9311
9312cat >>confdefs.h <<_ACEOF
9313#define PYTHON_PATH_RELOCATABLE $value
9314_ACEOF
9315
9316
9317 fi
81ecdfbb 9318 fi
436868fb 9319fi
436868fb 9320
ec685c5e 9321if test "${have_libpython}" != no; then
436868fb 9322
81ecdfbb 9323$as_echo "#define HAVE_PYTHON 1" >>confdefs.h
436868fb 9324
81ecdfbb
RW
9325 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
9326 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
9327 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
94f7449c 9328 CONFIG_INSTALL="$CONFIG_INSTALL install-python"
81ecdfbb 9329 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
436868fb 9330
81ecdfbb
RW
9331 # Flags needed to compile Python code (taken from python-config --cflags).
9332 # We cannot call python-config directly because it will output whatever was
9333 # used when compiling the Python interpreter itself, including flags which
9334 # would make the python-related objects be compiled differently from the
9335 # rest of GDB (e.g., -O2 and -fPIC).
9336 if test "${GCC}" = yes; then
9337 tentative_python_cflags="-fno-strict-aliasing -DNDEBUG -fwrapv"
9338 fi
436868fb 9339
81ecdfbb
RW
9340 if test "x${tentative_python_cflags}" != x; then
9341 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
9342$as_echo_n "checking compiler flags for python code... " >&6; }
9343 for flag in ${tentative_python_cflags}; do
9344 # Check that the compiler accepts it
9345 saved_CFLAGS="$CFLAGS"
9346 CFLAGS="$CFLAGS $flag"
9347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9348/* end confdefs.h. */
81ecdfbb 9349
a9322a30
TT
9350int
9351main ()
9352{
a9322a30
TT
9353
9354 ;
9355 return 0;
9356}
bec39cab 9357_ACEOF
81ecdfbb
RW
9358if ac_fn_c_try_compile "$LINENO"; then :
9359 PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
bec39cab 9360fi
81ecdfbb
RW
9361rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9362 CFLAGS="$saved_CFLAGS"
9363 done
9364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
9365$as_echo "${PYTHON_CFLAGS}" >&6; }
9366 fi
043b6510 9367
c83393b9
JB
9368 # On x64 Windows, Python's include headers, and pyconfig.h in
9369 # particular, rely on MS_WIN64 macro to detect that it's a 64bit
9370 # version of Windows. Unfortunately, MS_WIN64 is only defined if
9371 # _MSC_VER, a Microsoft-specific macro, is defined. So, when
9372 # building on x64 Windows with GCC, we define MS_WIN64 ourselves.
9373 # The issue was reported to the Python community, but still isn't
9374 # solved as of 2012-10-02 (http://bugs.python.org/issue4709).
9375
043b6510 9376 case "$gdb_host" in
c83393b9
JB
9377 mingw64)
9378 if test "${GCC}" = yes; then
9379 CPPFLAGS="$CPPFLAGS -DMS_WIN64"
9380 fi
9381 ;;
043b6510 9382 esac
a8db4212
YPK
9383
9384 # Note that "python -m threading" cannot be used to check for
9385 # threading support due to a bug in Python 2.7.3
9386 # (http://bugs.python.org/issue15567).
9387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether python supports threads" >&5
9388$as_echo_n "checking whether python supports threads... " >&6; }
9389 saved_CPPFLAGS="${CPPFLAGS}"
9390 CPPFLAGS="${PYTHON_CPPFLAGS}"
9391 # Note that the test is reversed so that python_has_threads=yes on
9392 # unexpected failures.
9393 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9394/* end confdefs.h. */
9395
9396#include <Python.h>
9397#ifdef WITH_THREAD
9398# error
9399#endif
9400
9401_ACEOF
9402if ac_fn_c_try_cpp "$LINENO"; then :
9403 python_has_threads=no
9404else
9405 python_has_threads=yes
9406fi
9407rm -f conftest.err conftest.$ac_ext
9408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_has_threads}" >&5
9409$as_echo "${python_has_threads}" >&6; }
9410 CPPFLAGS="${saved_CPPFLAGS}"
81ecdfbb 9411else
6dddc817
DE
9412 # Even if Python support is not compiled in, we need to have this file
9413 # included so that the "python" command, et.al., still exists.
9414 CONFIG_OBS="$CONFIG_OBS python.o"
9415 CONFIG_SRCS="$CONFIG_SRCS python/python.c"
a9322a30 9416fi
9a156167 9417
a4a1c157
PA
9418# Work around Python http://bugs.python.org/issue10112. See also
9419# http://bugs.python.org/issue11410, otherwise -Wl,--dynamic-list has
9420# no effect. Note that the only test after this that uses Python is
9421# the -rdynamic/-Wl,--dynamic-list test, and we do want that one to be
9422# run without -export-dynamic too.
9423PYTHON_LIBS=`echo $PYTHON_LIBS | sed -e 's/-Xlinker -export-dynamic//'`
9424
9425
ed3ef339
DE
9426
9427
4df42755
DE
9428 if test "${have_libpython}" != no; then
9429 HAVE_PYTHON_TRUE=
9430 HAVE_PYTHON_FALSE='#'
9431else
9432 HAVE_PYTHON_TRUE='#'
9433 HAVE_PYTHON_FALSE=
9434fi
9435
ed3ef339
DE
9436
9437# -------------------- #
9438# Check for libguile. #
9439# -------------------- #
9440
9441
e1402065
DE
9442
9443
9444
9445
9446# Check whether --with-guile was given.
9447if test "${with_guile+set}" = set; then :
9448 withval=$with_guile;
9449else
9450 with_guile=auto
9451fi
9452
9453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use guile" >&5
9454$as_echo_n "checking whether to use guile... " >&6; }
9455{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_guile" >&5
9456$as_echo "$with_guile" >&6; }
9457
ed3ef339
DE
9458# Extract the first word of "pkg-config", so it can be a program name with args.
9459set dummy pkg-config; ac_word=$2
9460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9461$as_echo_n "checking for $ac_word... " >&6; }
9462if test "${ac_cv_path_pkg_config_prog_path+set}" = set; then :
9463 $as_echo_n "(cached) " >&6
9464else
9465 case $pkg_config_prog_path in
9466 [\\/]* | ?:[\\/]*)
9467 ac_cv_path_pkg_config_prog_path="$pkg_config_prog_path" # Let the user override the test with a path.
9468 ;;
9469 *)
9470 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9471for as_dir in $PATH
9472do
9473 IFS=$as_save_IFS
9474 test -z "$as_dir" && as_dir=.
9475 for ac_exec_ext in '' $ac_executable_extensions; do
9476 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9477 ac_cv_path_pkg_config_prog_path="$as_dir/$ac_word$ac_exec_ext"
9478 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9479 break 2
9480 fi
9481done
9482 done
9483IFS=$as_save_IFS
9484
9485 test -z "$ac_cv_path_pkg_config_prog_path" && ac_cv_path_pkg_config_prog_path="missing"
9486 ;;
9487esac
9488fi
9489pkg_config_prog_path=$ac_cv_path_pkg_config_prog_path
9490if test -n "$pkg_config_prog_path"; then
9491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config_prog_path" >&5
9492$as_echo "$pkg_config_prog_path" >&6; }
9493else
9494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9495$as_echo "no" >&6; }
9496fi
9497
9498
9499
214ab2da 9500try_guile_versions="guile-2.2 guile-2.0"
ed3ef339
DE
9501have_libguile=no
9502case "${with_guile}" in
9503no)
9504 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: guile support disabled; some features will be unavailable." >&5
9505$as_echo "$as_me: WARNING: guile support disabled; some features will be unavailable." >&2;}
9506 ;;
9507auto)
e1402065
DE
9508 if test "${pkg_config_prog_path}" = "missing"; then
9509 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found, guile support disabled" >&5
9510$as_echo "$as_me: WARNING: pkg-config not found, guile support disabled" >&2;}
9511 else
ed3ef339
DE
9512
9513 pkg_config=${pkg_config_prog_path}
9514 guile_version_list=${try_guile_versions}
9515 flag_errors=no
9516
ed3ef339
DE
9517 found_usable_guile=checking
9518 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
9519$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
9520 for guile_version in ${guile_version_list}; do
9521 ${pkg_config} --exists ${guile_version} 2>/dev/null
9522 if test $? != 0; then
9523 continue
9524 fi
9525 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
9526 if test $? != 0; then
9527 as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
9528 fi
9529 new_LIBS=`${pkg_config} --libs ${guile_version}`
9530 if test $? != 0; then
9531 as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
9532 fi
9533 found_usable_guile=${guile_version}
9534 break
9535 done
9536 if test "${found_usable_guile}" = "checking"; then
9537 if test "${flag_errors}" = "yes"; then
9538 as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
9539 else
9540 found_usable_guile=no
9541 fi
9542 fi
9543 if test "${found_usable_guile}" != no; then
9544 save_CPPFLAGS=$CPPFLAGS
9545 save_LIBS=$LIBS
9546 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9547 LIBS="$LIBS $new_LIBS"
9548 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9549/* end confdefs.h. */
9550#include "libguile.h"
9551int
9552main ()
9553{
9554scm_init_guile ();
9555 ;
9556 return 0;
9557}
9558_ACEOF
9559if ac_fn_c_try_link "$LINENO"; then :
9560 have_libguile=yes
9561 GUILE_CPPFLAGS=$new_CPPFLAGS
9562 GUILE_LIBS=$new_LIBS
9563else
9564 found_usable_guile=no
9565fi
9566rm -f core conftest.err conftest.$ac_objext \
9567 conftest$ac_exeext conftest.$ac_ext
92fab5a6
AW
9568 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
9569if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then :
9570
9571$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
9572
9573
9574fi
9575
ed3ef339
DE
9576 CPPFLAGS=$save_CPPFLAGS
9577 LIBS=$save_LIBS
9578 if test "${found_usable_guile}" = no; then
9579 if test "${flag_errors}" = yes; then
9580 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9581$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9582as_fn_error "linking guile version ${guile_version} test program failed
9583See \`config.log' for more details." "$LINENO" 5; }
9584 fi
9585 fi
9586 fi
9587 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
9588$as_echo "${found_usable_guile}" >&6; }
9589
e1402065 9590 fi
ed3ef339
DE
9591 ;;
9592yes)
e1402065
DE
9593 if test "${pkg_config_prog_path}" = "missing"; then
9594 as_fn_error "pkg-config not found" "$LINENO" 5
9595 fi
ed3ef339
DE
9596
9597 pkg_config=${pkg_config_prog_path}
9598 guile_version_list=${try_guile_versions}
9599 flag_errors=yes
9600
ed3ef339
DE
9601 found_usable_guile=checking
9602 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
9603$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
9604 for guile_version in ${guile_version_list}; do
9605 ${pkg_config} --exists ${guile_version} 2>/dev/null
9606 if test $? != 0; then
9607 continue
9608 fi
9609 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
9610 if test $? != 0; then
9611 as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
9612 fi
9613 new_LIBS=`${pkg_config} --libs ${guile_version}`
9614 if test $? != 0; then
9615 as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
9616 fi
9617 found_usable_guile=${guile_version}
9618 break
9619 done
9620 if test "${found_usable_guile}" = "checking"; then
9621 if test "${flag_errors}" = "yes"; then
9622 as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
9623 else
9624 found_usable_guile=no
9625 fi
9626 fi
9627 if test "${found_usable_guile}" != no; then
9628 save_CPPFLAGS=$CPPFLAGS
9629 save_LIBS=$LIBS
9630 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9631 LIBS="$LIBS $new_LIBS"
9632 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9633/* end confdefs.h. */
9634#include "libguile.h"
9635int
9636main ()
9637{
9638scm_init_guile ();
9639 ;
9640 return 0;
9641}
9642_ACEOF
9643if ac_fn_c_try_link "$LINENO"; then :
9644 have_libguile=yes
9645 GUILE_CPPFLAGS=$new_CPPFLAGS
9646 GUILE_LIBS=$new_LIBS
9647else
9648 found_usable_guile=no
9649fi
9650rm -f core conftest.err conftest.$ac_objext \
9651 conftest$ac_exeext conftest.$ac_ext
92fab5a6
AW
9652 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
9653if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then :
9654
9655$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
9656
9657
9658fi
9659
ed3ef339
DE
9660 CPPFLAGS=$save_CPPFLAGS
9661 LIBS=$save_LIBS
9662 if test "${found_usable_guile}" = no; then
9663 if test "${flag_errors}" = yes; then
9664 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9665$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9666as_fn_error "linking guile version ${guile_version} test program failed
9667See \`config.log' for more details." "$LINENO" 5; }
9668 fi
9669 fi
9670 fi
9671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
9672$as_echo "${found_usable_guile}" >&6; }
9673
9674 ;;
9675[\\/]* | ?:[\\/]*)
e1402065 9676 if test -x "${with_guile}"; then
ed3ef339
DE
9677
9678 pkg_config=${with_guile}
9679 guile_version_list=${try_guile_versions}
9680 flag_errors=yes
9681
ed3ef339
DE
9682 found_usable_guile=checking
9683 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
9684$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
9685 for guile_version in ${guile_version_list}; do
9686 ${pkg_config} --exists ${guile_version} 2>/dev/null
9687 if test $? != 0; then
9688 continue
9689 fi
9690 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
9691 if test $? != 0; then
9692 as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
9693 fi
9694 new_LIBS=`${pkg_config} --libs ${guile_version}`
9695 if test $? != 0; then
9696 as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
9697 fi
9698 found_usable_guile=${guile_version}
9699 break
9700 done
9701 if test "${found_usable_guile}" = "checking"; then
9702 if test "${flag_errors}" = "yes"; then
9703 as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
9704 else
9705 found_usable_guile=no
9706 fi
9707 fi
9708 if test "${found_usable_guile}" != no; then
9709 save_CPPFLAGS=$CPPFLAGS
9710 save_LIBS=$LIBS
9711 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9712 LIBS="$LIBS $new_LIBS"
9713 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9714/* end confdefs.h. */
9715#include "libguile.h"
9716int
9717main ()
9718{
9719scm_init_guile ();
9720 ;
9721 return 0;
9722}
9723_ACEOF
9724if ac_fn_c_try_link "$LINENO"; then :
9725 have_libguile=yes
9726 GUILE_CPPFLAGS=$new_CPPFLAGS
9727 GUILE_LIBS=$new_LIBS
9728else
9729 found_usable_guile=no
9730fi
9731rm -f core conftest.err conftest.$ac_objext \
9732 conftest$ac_exeext conftest.$ac_ext
92fab5a6
AW
9733 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
9734if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then :
9735
9736$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
9737
9738
9739fi
9740
ed3ef339
DE
9741 CPPFLAGS=$save_CPPFLAGS
9742 LIBS=$save_LIBS
9743 if test "${found_usable_guile}" = no; then
9744 if test "${flag_errors}" = yes; then
9745 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9746$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9747as_fn_error "linking guile version ${guile_version} test program failed
9748See \`config.log' for more details." "$LINENO" 5; }
9749 fi
9750 fi
9751 fi
9752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
9753$as_echo "${found_usable_guile}" >&6; }
9754
e1402065
DE
9755 else
9756 as_fn_error "Guile config program not executable: ${with_guile}" "$LINENO" 5
9757 fi
ed3ef339
DE
9758 ;;
9759"" | */*)
9760 # Disallow --with=guile="" and --with-guile=foo/bar.
9761 as_fn_error "invalid value for --with-guile" "$LINENO" 5
9762 ;;
9763*)
9764 # A space separate list of guile versions to try, in order.
e1402065
DE
9765 if test "${pkg_config_prog_path}" = "missing"; then
9766 as_fn_error "pkg-config not found" "$LINENO" 5
9767 fi
ed3ef339
DE
9768
9769 pkg_config=${pkg_config_prog_path}
9770 guile_version_list=${with_guile}
9771 flag_errors=yes
9772
ed3ef339
DE
9773 found_usable_guile=checking
9774 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
9775$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
9776 for guile_version in ${guile_version_list}; do
9777 ${pkg_config} --exists ${guile_version} 2>/dev/null
9778 if test $? != 0; then
9779 continue
9780 fi
9781 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
9782 if test $? != 0; then
9783 as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
9784 fi
9785 new_LIBS=`${pkg_config} --libs ${guile_version}`
9786 if test $? != 0; then
9787 as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
9788 fi
9789 found_usable_guile=${guile_version}
9790 break
9791 done
9792 if test "${found_usable_guile}" = "checking"; then
9793 if test "${flag_errors}" = "yes"; then
9794 as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
9795 else
9796 found_usable_guile=no
9797 fi
9798 fi
9799 if test "${found_usable_guile}" != no; then
9800 save_CPPFLAGS=$CPPFLAGS
9801 save_LIBS=$LIBS
9802 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9803 LIBS="$LIBS $new_LIBS"
9804 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9805/* end confdefs.h. */
9806#include "libguile.h"
9807int
9808main ()
9809{
9810scm_init_guile ();
9811 ;
9812 return 0;
9813}
9814_ACEOF
9815if ac_fn_c_try_link "$LINENO"; then :
9816 have_libguile=yes
9817 GUILE_CPPFLAGS=$new_CPPFLAGS
9818 GUILE_LIBS=$new_LIBS
9819else
9820 found_usable_guile=no
9821fi
9822rm -f core conftest.err conftest.$ac_objext \
9823 conftest$ac_exeext conftest.$ac_ext
92fab5a6
AW
9824 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
9825if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then :
9826
9827$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
9828
9829
9830fi
9831
ed3ef339
DE
9832 CPPFLAGS=$save_CPPFLAGS
9833 LIBS=$save_LIBS
9834 if test "${found_usable_guile}" = no; then
9835 if test "${flag_errors}" = yes; then
9836 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9837$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9838as_fn_error "linking guile version ${guile_version} test program failed
9839See \`config.log' for more details." "$LINENO" 5; }
9840 fi
9841 fi
9842 fi
9843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
9844$as_echo "${found_usable_guile}" >&6; }
9845
9846 ;;
9847esac
9848
e76c5d17 9849if test "${have_libguile}" != no; then
d342a0da
DE
9850 case "${with_guile}" in
9851 [\\/]* | ?:[\\/]*)
e76c5d17
DE
9852
9853 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
9854$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
9855if test "${ac_cv_guild_program_name+set}" = set; then :
9856 $as_echo_n "(cached) " >&6
9857else
d342a0da 9858 ac_cv_guild_program_name="`"${with_guile}" --variable guild "${guile_version}"`"
e76c5d17
DE
9859
9860 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
9861 # the 'guild' and 'bindir' variables. In that case, try to guess
9862 # what the program name is, at the risk of getting it wrong if
9863 # Guile was configured with '--program-suffix' or similar.
9864 if test "x$ac_cv_guild_program_name" = "x"; then
d342a0da 9865 guile_exec_prefix="`"${with_guile}" --variable exec_prefix "${guile_version}"`"
e76c5d17
DE
9866 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
9867 fi
9868
9869fi
9870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
9871$as_echo "$ac_cv_guild_program_name" >&6; }
9872
9873 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
9874 as_fn_error "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
9875 fi
9876
9877 GUILD="$ac_cv_guild_program_name"
9878
9879
d342a0da
DE
9880 ;;
9881 *)
9882
9883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
9884$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
9885if test "${ac_cv_guild_program_name+set}" = set; then :
9886 $as_echo_n "(cached) " >&6
9887else
9888 ac_cv_guild_program_name="`"${pkg_config_prog_path}" --variable guild "${guile_version}"`"
9889
9890 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
9891 # the 'guild' and 'bindir' variables. In that case, try to guess
9892 # what the program name is, at the risk of getting it wrong if
9893 # Guile was configured with '--program-suffix' or similar.
9894 if test "x$ac_cv_guild_program_name" = "x"; then
9895 guile_exec_prefix="`"${pkg_config_prog_path}" --variable exec_prefix "${guile_version}"`"
9896 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
9897 fi
9898
9899fi
9900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
9901$as_echo "$ac_cv_guild_program_name" >&6; }
9902
9903 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
9904 as_fn_error "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
9905 fi
9906
9907 GUILD="$ac_cv_guild_program_name"
9908
9909
9910 ;;
9911 esac
e76c5d17
DE
9912
9913
9914 if test "$cross_compiling" = no; then
9915 GUILD_TARGET_FLAG=
9916 else
9917 GUILD_TARGET_FLAG="--target=$host"
9918 fi
9919
9920
9921
9922
9923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether guild supports this host" >&5
9924$as_echo_n "checking whether guild supports this host... " >&6; }
9925if test "${ac_cv_guild_ok+set}" = set; then :
9926 $as_echo_n "(cached) " >&6
9927else
9928 echo "$ac_cv_guild_program_name compile $GUILD_TARGET_FLAG -o conftest.go $srcdir/guile/lib/gdb/support.scm" >&5
9929 if "$ac_cv_guild_program_name" compile $GUILD_TARGET_FLAG -o conftest.go "$srcdir/guile/lib/gdb/support.scm" >&5 2>&5; then
9930 ac_cv_guild_ok=yes
9931 else
9932 ac_cv_guild_ok=no
9933 fi
9934fi
9935{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_ok" >&5
9936$as_echo "$ac_cv_guild_ok" >&6; }
9937
9938 if test "$ac_cv_guild_ok" = no; then
9939 have_libguile=no
9940 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling guile support" >&5
9941$as_echo "$as_me: WARNING: disabling guile support" >&2;}
9942 fi
9943fi
9944
ed3ef339
DE
9945if test "${have_libguile}" != no; then
9946
9947$as_echo "#define HAVE_GUILE 1" >>confdefs.h
9948
9949 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_GUILE_OBS)"
9950 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_GUILE_DEPS)"
9951 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_GUILE_SRCS)"
9952 CONFIG_INSTALL="$CONFIG_INSTALL install-guile"
9953 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_GUILE_CFLAGS)"
16954d5d
LC
9954
9955 save_LIBS="$LIBS"
9956 save_CPPFLAGS="$CPPFLAGS"
9957 LIBS="$GUILE_LIBS"
9958 CPPFLAGS="$GUILE_CPPFLAGS"
9959 for ac_func in scm_new_smob
9960do :
9961 ac_fn_c_check_func "$LINENO" "scm_new_smob" "ac_cv_func_scm_new_smob"
9962if test "x$ac_cv_func_scm_new_smob" = x""yes; then :
9963 cat >>confdefs.h <<_ACEOF
9964#define HAVE_SCM_NEW_SMOB 1
9965_ACEOF
9966
9967fi
9968done
9969
9970 LIBS="$save_LIBS"
9971 CPPFLAGS="$save_CPPFLAGS"
ed3ef339
DE
9972else
9973 # Even if Guile support is not compiled in, we need to have these files
9974 # included.
9975 CONFIG_OBS="$CONFIG_OBS guile.o"
9976 CONFIG_SRCS="$CONFIG_SRCS guile/guile.c"
9977fi
9a156167 9978
ac534cba 9979
4df42755
DE
9980 if test "${have_libguile}" != no; then
9981 HAVE_GUILE_TRUE=
9982 HAVE_GUILE_FALSE='#'
9983else
9984 HAVE_GUILE_TRUE='#'
9985 HAVE_GUILE_FALSE=
9986fi
9987
ac534cba 9988
d344e670
DE
9989# --------------------- #
9990# Check for libmcheck. #
9991# --------------------- #
9992
a8db4212
YPK
9993# Enable -lmcheck by default (it provides cheap-enough memory mangling),
9994# but turn it off if Python is enabled with threads, since -lmcheck is
9995# not thread safe (http://sourceware.org/bugzilla/show_bug.cgi?id=9939),
9996# and for releases.
17ef446e
PA
9997if test \( "${have_libpython}" = "no" -o "${python_has_threads}" = "no" \) \
9998 && $development; then
9999 libmcheck_default=yes
10000else
10001 libmcheck_default=no
a8db4212
YPK
10002fi
10003
17ef446e
PA
10004 # Check whether --enable-libmcheck was given.
10005if test "${enable_libmcheck+set}" = set; then :
10006 enableval=$enable_libmcheck; case "${enableval}" in
10007 yes | y) ENABLE_LIBMCHECK="yes" ;;
10008 no | n) ENABLE_LIBMCHECK="no" ;;
10009 *) as_fn_error "bad value ${enableval} for --enable-libmcheck" "$LINENO" 5 ;;
10010 esac
10011fi
10012
10013
10014 if test -z "${ENABLE_LIBMCHECK}"; then
10015 ENABLE_LIBMCHECK=${libmcheck_default}
a8db4212 10016 fi
17ef446e
PA
10017
10018 if test "$ENABLE_LIBMCHECK" = "yes" ; then
10019 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lmcheck" >&5
a8db4212
YPK
10020$as_echo_n "checking for main in -lmcheck... " >&6; }
10021if test "${ac_cv_lib_mcheck_main+set}" = set; then :
10022 $as_echo_n "(cached) " >&6
10023else
10024 ac_check_lib_save_LIBS=$LIBS
10025LIBS="-lmcheck $LIBS"
10026cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10027/* end confdefs.h. */
10028
10029
10030int
10031main ()
10032{
10033return main ();
10034 ;
10035 return 0;
10036}
10037_ACEOF
10038if ac_fn_c_try_link "$LINENO"; then :
10039 ac_cv_lib_mcheck_main=yes
10040else
10041 ac_cv_lib_mcheck_main=no
10042fi
10043rm -f core conftest.err conftest.$ac_objext \
10044 conftest$ac_exeext conftest.$ac_ext
10045LIBS=$ac_check_lib_save_LIBS
10046fi
10047{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mcheck_main" >&5
10048$as_echo "$ac_cv_lib_mcheck_main" >&6; }
10049if test "x$ac_cv_lib_mcheck_main" = x""yes; then :
10050 cat >>confdefs.h <<_ACEOF
10051#define HAVE_LIBMCHECK 1
10052_ACEOF
10053
10054 LIBS="-lmcheck $LIBS"
10055
10056fi
10057
17ef446e
PA
10058 fi
10059
10060
10061if test "$ENABLE_LIBMCHECK" = "yes" \
10062 -a "${have_libpython}" != "no" \
10063 -a "${python_has_threads}" = "yes" ; then
10064 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&5
10065$as_echo "$as_me: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&2;}
a8db4212
YPK
10066fi
10067
58bfce93
MM
10068
10069# Check whether --with-intel_pt was given.
10070if test "${with_intel_pt+set}" = set; then :
10071 withval=$with_intel_pt;
10072else
10073 with_intel_pt=auto
10074fi
10075
10076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5
10077$as_echo_n "checking whether to use intel pt... " >&6; }
10078{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5
10079$as_echo "$with_intel_pt" >&6; }
10080
10081if test "${with_intel_pt}" = no; then
bc504a31
PA
10082 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&5
10083$as_echo "$as_me: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&2;}
58bfce93
MM
10084 HAVE_LIBIPT=no
10085else
5599c404
MM
10086 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10087/* end confdefs.h. */
10088
10089#include <linux/perf_event.h>
10090#ifndef PERF_ATTR_SIZE_VER5
10091# error
10092#endif
10093
10094_ACEOF
10095if ac_fn_c_try_cpp "$LINENO"; then :
10096 perf_event=yes
10097else
10098 perf_event=no
10099fi
10100rm -f conftest.err conftest.$ac_ext
10101 if test "$perf_event" != yes; then
10102 if test "$with_intel_pt" = yes; then
10103 as_fn_error "linux/perf_event.h missing or too old" "$LINENO" 5
10104 else
10105 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5
10106$as_echo "$as_me: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&2;}
10107 fi
10108 fi
10109
58bfce93
MM
10110
10111
10112
10113
10114
10115
10116
10117
10118 use_additional=yes
10119
10120 acl_save_prefix="$prefix"
10121 prefix="$acl_final_prefix"
10122 acl_save_exec_prefix="$exec_prefix"
10123 exec_prefix="$acl_final_exec_prefix"
10124
10125 eval additional_includedir=\"$includedir\"
10126 eval additional_libdir=\"$libdir\"
10127
10128 exec_prefix="$acl_save_exec_prefix"
10129 prefix="$acl_save_prefix"
10130
10131
10132# Check whether --with-libipt-prefix was given.
10133if test "${with_libipt_prefix+set}" = set; then :
10134 withval=$with_libipt_prefix;
10135 if test "X$withval" = "Xno"; then
10136 use_additional=no
10137 else
10138 if test "X$withval" = "X"; then
10139
10140 acl_save_prefix="$prefix"
10141 prefix="$acl_final_prefix"
10142 acl_save_exec_prefix="$exec_prefix"
10143 exec_prefix="$acl_final_exec_prefix"
10144
10145 eval additional_includedir=\"$includedir\"
10146 eval additional_libdir=\"$libdir\"
10147
10148 exec_prefix="$acl_save_exec_prefix"
10149 prefix="$acl_save_prefix"
10150
10151 else
10152 additional_includedir="$withval/include"
10153 additional_libdir="$withval/lib"
10154 fi
10155 fi
10156
10157fi
10158
10159 LIBIPT=
10160 LTLIBIPT=
10161 INCIPT=
10162 rpathdirs=
10163 ltrpathdirs=
10164 names_already_handled=
10165 names_next_round='ipt '
10166 while test -n "$names_next_round"; do
10167 names_this_round="$names_next_round"
10168 names_next_round=
10169 for name in $names_this_round; do
10170 already_handled=
10171 for n in $names_already_handled; do
10172 if test "$n" = "$name"; then
10173 already_handled=yes
10174 break
10175 fi
10176 done
10177 if test -z "$already_handled"; then
10178 names_already_handled="$names_already_handled $name"
10179 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
10180 eval value=\"\$HAVE_LIB$uppername\"
10181 if test -n "$value"; then
10182 if test "$value" = yes; then
10183 eval value=\"\$LIB$uppername\"
10184 test -z "$value" || LIBIPT="${LIBIPT}${LIBIPT:+ }$value"
10185 eval value=\"\$LTLIB$uppername\"
10186 test -z "$value" || LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$value"
10187 else
10188 :
10189 fi
10190 else
10191 found_dir=
10192 found_la=
10193 found_so=
10194 found_a=
10195 if test $use_additional = yes; then
10196 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
10197 found_dir="$additional_libdir"
10198 found_so="$additional_libdir/lib$name.$shlibext"
10199 if test -f "$additional_libdir/lib$name.la"; then
10200 found_la="$additional_libdir/lib$name.la"
10201 fi
10202 else
10203 if test -f "$additional_libdir/lib$name.$libext"; then
10204 found_dir="$additional_libdir"
10205 found_a="$additional_libdir/lib$name.$libext"
10206 if test -f "$additional_libdir/lib$name.la"; then
10207 found_la="$additional_libdir/lib$name.la"
10208 fi
10209 fi
10210 fi
10211 fi
10212 if test "X$found_dir" = "X"; then
10213 for x in $LDFLAGS $LTLIBIPT; do
10214
10215 acl_save_prefix="$prefix"
10216 prefix="$acl_final_prefix"
10217 acl_save_exec_prefix="$exec_prefix"
10218 exec_prefix="$acl_final_exec_prefix"
10219 eval x=\"$x\"
10220 exec_prefix="$acl_save_exec_prefix"
10221 prefix="$acl_save_prefix"
10222
10223 case "$x" in
10224 -L*)
10225 dir=`echo "X$x" | sed -e 's/^X-L//'`
10226 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
10227 found_dir="$dir"
10228 found_so="$dir/lib$name.$shlibext"
10229 if test -f "$dir/lib$name.la"; then
10230 found_la="$dir/lib$name.la"
10231 fi
10232 else
10233 if test -f "$dir/lib$name.$libext"; then
10234 found_dir="$dir"
10235 found_a="$dir/lib$name.$libext"
10236 if test -f "$dir/lib$name.la"; then
10237 found_la="$dir/lib$name.la"
10238 fi
10239 fi
10240 fi
10241 ;;
10242 esac
10243 if test "X$found_dir" != "X"; then
10244 break
10245 fi
10246 done
10247 fi
10248 if test "X$found_dir" != "X"; then
10249 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$found_dir -l$name"
10250 if test "X$found_so" != "X"; then
10251 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
10252 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
10253 else
10254 haveit=
10255 for x in $ltrpathdirs; do
10256 if test "X$x" = "X$found_dir"; then
10257 haveit=yes
10258 break
10259 fi
10260 done
10261 if test -z "$haveit"; then
10262 ltrpathdirs="$ltrpathdirs $found_dir"
10263 fi
10264 if test "$hardcode_direct" = yes; then
10265 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
10266 else
10267 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
10268 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
10269 haveit=
10270 for x in $rpathdirs; do
10271 if test "X$x" = "X$found_dir"; then
10272 haveit=yes
10273 break
10274 fi
10275 done
10276 if test -z "$haveit"; then
10277 rpathdirs="$rpathdirs $found_dir"
10278 fi
10279 else
10280 haveit=
10281 for x in $LDFLAGS $LIBIPT; do
10282
10283 acl_save_prefix="$prefix"
10284 prefix="$acl_final_prefix"
10285 acl_save_exec_prefix="$exec_prefix"
10286 exec_prefix="$acl_final_exec_prefix"
10287 eval x=\"$x\"
10288 exec_prefix="$acl_save_exec_prefix"
10289 prefix="$acl_save_prefix"
10290
10291 if test "X$x" = "X-L$found_dir"; then
10292 haveit=yes
10293 break
10294 fi
10295 done
10296 if test -z "$haveit"; then
10297 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir"
10298 fi
10299 if test "$hardcode_minus_L" != no; then
10300 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
10301 else
10302 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
10303 fi
10304 fi
10305 fi
10306 fi
10307 else
10308 if test "X$found_a" != "X"; then
10309 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_a"
10310 else
10311 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir -l$name"
10312 fi
10313 fi
10314 additional_includedir=
10315 case "$found_dir" in
10316 */lib | */lib/)
10317 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
10318 additional_includedir="$basedir/include"
10319 ;;
10320 esac
10321 if test "X$additional_includedir" != "X"; then
10322 if test "X$additional_includedir" != "X/usr/include"; then
10323 haveit=
10324 if test "X$additional_includedir" = "X/usr/local/include"; then
10325 if test -n "$GCC"; then
10326 case $host_os in
10327 linux*) haveit=yes;;
10328 esac
10329 fi
10330 fi
10331 if test -z "$haveit"; then
10332 for x in $CPPFLAGS $INCIPT; do
10333
10334 acl_save_prefix="$prefix"
10335 prefix="$acl_final_prefix"
10336 acl_save_exec_prefix="$exec_prefix"
10337 exec_prefix="$acl_final_exec_prefix"
10338 eval x=\"$x\"
10339 exec_prefix="$acl_save_exec_prefix"
10340 prefix="$acl_save_prefix"
10341
10342 if test "X$x" = "X-I$additional_includedir"; then
10343 haveit=yes
10344 break
10345 fi
10346 done
10347 if test -z "$haveit"; then
10348 if test -d "$additional_includedir"; then
10349 INCIPT="${INCIPT}${INCIPT:+ }-I$additional_includedir"
10350 fi
10351 fi
10352 fi
10353 fi
10354 fi
10355 if test -n "$found_la"; then
10356 save_libdir="$libdir"
10357 case "$found_la" in
10358 */* | *\\*) . "$found_la" ;;
10359 *) . "./$found_la" ;;
10360 esac
10361 libdir="$save_libdir"
10362 for dep in $dependency_libs; do
10363 case "$dep" in
10364 -L*)
10365 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10366 if test "X$additional_libdir" != "X/usr/lib"; then
10367 haveit=
10368 if test "X$additional_libdir" = "X/usr/local/lib"; then
10369 if test -n "$GCC"; then
10370 case $host_os in
10371 linux*) haveit=yes;;
10372 esac
10373 fi
10374 fi
10375 if test -z "$haveit"; then
10376 haveit=
10377 for x in $LDFLAGS $LIBIPT; do
10378
10379 acl_save_prefix="$prefix"
10380 prefix="$acl_final_prefix"
10381 acl_save_exec_prefix="$exec_prefix"
10382 exec_prefix="$acl_final_exec_prefix"
10383 eval x=\"$x\"
10384 exec_prefix="$acl_save_exec_prefix"
10385 prefix="$acl_save_prefix"
10386
10387 if test "X$x" = "X-L$additional_libdir"; then
10388 haveit=yes
10389 break
10390 fi
10391 done
10392 if test -z "$haveit"; then
10393 if test -d "$additional_libdir"; then
10394 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$additional_libdir"
10395 fi
10396 fi
10397 haveit=
10398 for x in $LDFLAGS $LTLIBIPT; do
10399
10400 acl_save_prefix="$prefix"
10401 prefix="$acl_final_prefix"
10402 acl_save_exec_prefix="$exec_prefix"
10403 exec_prefix="$acl_final_exec_prefix"
10404 eval x=\"$x\"
10405 exec_prefix="$acl_save_exec_prefix"
10406 prefix="$acl_save_prefix"
10407
10408 if test "X$x" = "X-L$additional_libdir"; then
10409 haveit=yes
10410 break
10411 fi
10412 done
10413 if test -z "$haveit"; then
10414 if test -d "$additional_libdir"; then
10415 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$additional_libdir"
10416 fi
10417 fi
10418 fi
10419 fi
10420 ;;
10421 -R*)
10422 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10423 if test "$enable_rpath" != no; then
10424 haveit=
10425 for x in $rpathdirs; do
10426 if test "X$x" = "X$dir"; then
10427 haveit=yes
10428 break
10429 fi
10430 done
10431 if test -z "$haveit"; then
10432 rpathdirs="$rpathdirs $dir"
10433 fi
10434 haveit=
10435 for x in $ltrpathdirs; do
10436 if test "X$x" = "X$dir"; then
10437 haveit=yes
10438 break
10439 fi
10440 done
10441 if test -z "$haveit"; then
10442 ltrpathdirs="$ltrpathdirs $dir"
10443 fi
10444 fi
10445 ;;
10446 -l*)
10447 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10448 ;;
10449 *.la)
10450 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10451 ;;
10452 *)
10453 LIBIPT="${LIBIPT}${LIBIPT:+ }$dep"
10454 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$dep"
10455 ;;
10456 esac
10457 done
10458 fi
10459 else
10460 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
10461 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l$name"
10462 fi
10463 fi
10464 fi
10465 done
10466 done
10467 if test "X$rpathdirs" != "X"; then
10468 if test -n "$hardcode_libdir_separator"; then
10469 alldirs=
10470 for found_dir in $rpathdirs; do
10471 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10472 done
10473 acl_save_libdir="$libdir"
10474 libdir="$alldirs"
10475 eval flag=\"$hardcode_libdir_flag_spec\"
10476 libdir="$acl_save_libdir"
10477 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
10478 else
10479 for found_dir in $rpathdirs; do
10480 acl_save_libdir="$libdir"
10481 libdir="$found_dir"
10482 eval flag=\"$hardcode_libdir_flag_spec\"
10483 libdir="$acl_save_libdir"
10484 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
10485 done
10486 fi
10487 fi
10488 if test "X$ltrpathdirs" != "X"; then
10489 for found_dir in $ltrpathdirs; do
10490 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-R$found_dir"
10491 done
10492 fi
10493
10494
10495 ac_save_CPPFLAGS="$CPPFLAGS"
10496
10497 for element in $INCIPT; do
10498 haveit=
10499 for x in $CPPFLAGS; do
10500
10501 acl_save_prefix="$prefix"
10502 prefix="$acl_final_prefix"
10503 acl_save_exec_prefix="$exec_prefix"
10504 exec_prefix="$acl_final_exec_prefix"
10505 eval x=\"$x\"
10506 exec_prefix="$acl_save_exec_prefix"
10507 prefix="$acl_save_prefix"
10508
10509 if test "X$x" = "X$element"; then
10510 haveit=yes
10511 break
10512 fi
10513 done
10514 if test -z "$haveit"; then
10515 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10516 fi
10517 done
10518
10519
10520 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libipt" >&5
10521$as_echo_n "checking for libipt... " >&6; }
10522if test "${ac_cv_libipt+set}" = set; then :
10523 $as_echo_n "(cached) " >&6
10524else
10525
10526 ac_save_LIBS="$LIBS"
10527 LIBS="$LIBS $LIBIPT"
10528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10529/* end confdefs.h. */
10530#include "intel-pt.h"
10531int
10532main ()
10533{
10534pt_insn_alloc_decoder (0);
10535 ;
10536 return 0;
10537}
10538_ACEOF
10539if ac_fn_c_try_link "$LINENO"; then :
10540 ac_cv_libipt=yes
10541else
10542 ac_cv_libipt=no
10543fi
10544rm -f core conftest.err conftest.$ac_objext \
10545 conftest$ac_exeext conftest.$ac_ext
10546 LIBS="$ac_save_LIBS"
10547
10548fi
10549{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libipt" >&5
10550$as_echo "$ac_cv_libipt" >&6; }
10551 if test "$ac_cv_libipt" = yes; then
10552 HAVE_LIBIPT=yes
10553
10554$as_echo "#define HAVE_LIBIPT 1" >>confdefs.h
10555
10556 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libipt" >&5
10557$as_echo_n "checking how to link with libipt... " >&6; }
10558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBIPT" >&5
10559$as_echo "$LIBIPT" >&6; }
10560 else
10561 HAVE_LIBIPT=no
10562 CPPFLAGS="$ac_save_CPPFLAGS"
10563 LIBIPT=
10564 LTLIBIPT=
10565 fi
10566
10567
10568
10569
10570
10571
10572 if test "$HAVE_LIBIPT" != yes; then
10573 if test "$with_intel_pt" = yes; then
10574 as_fn_error "libipt is missing or unusable" "$LINENO" 5
10575 else
10576 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5
10577$as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be unavailable." >&2;}
10578 fi
10579 fi
10580fi
10581
81ecdfbb
RW
10582# ------------------------- #
10583# Checks for header files. #
10584# ------------------------- #
c890192f 10585
81ecdfbb
RW
10586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
10587$as_echo_n "checking for ANSI C header files... " >&6; }
10588if test "${ac_cv_header_stdc+set}" = set; then :
10589 $as_echo_n "(cached) " >&6
bec39cab 10590else
81ecdfbb 10591 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10592/* end confdefs.h. */
81ecdfbb
RW
10593#include <stdlib.h>
10594#include <stdarg.h>
10595#include <string.h>
10596#include <float.h>
10597
a9322a30
TT
10598int
10599main ()
10600{
a9322a30
TT
10601
10602 ;
10603 return 0;
10604}
bec39cab 10605_ACEOF
81ecdfbb
RW
10606if ac_fn_c_try_compile "$LINENO"; then :
10607 ac_cv_header_stdc=yes
bec39cab 10608else
81ecdfbb 10609 ac_cv_header_stdc=no
a9322a30 10610fi
81ecdfbb 10611rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 10612
81ecdfbb
RW
10613if test $ac_cv_header_stdc = yes; then
10614 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10615 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10616/* end confdefs.h. */
10617#include <string.h>
bec39cab 10618
81ecdfbb
RW
10619_ACEOF
10620if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10621 $EGREP "memchr" >/dev/null 2>&1; then :
bec39cab 10622
bec39cab 10623else
81ecdfbb
RW
10624 ac_cv_header_stdc=no
10625fi
10626rm -f conftest*
10627
10628fi
10629
10630if test $ac_cv_header_stdc = yes; then
10631 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10632 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10633/* end confdefs.h. */
10634#include <stdlib.h>
10635
bec39cab 10636_ACEOF
81ecdfbb
RW
10637if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10638 $EGREP "free" >/dev/null 2>&1; then :
06825bd1 10639
81ecdfbb
RW
10640else
10641 ac_cv_header_stdc=no
10642fi
10643rm -f conftest*
bec39cab 10644
bec39cab 10645fi
81ecdfbb
RW
10646
10647if test $ac_cv_header_stdc = yes; then
10648 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10649 if test "$cross_compiling" = yes; then :
10650 :
bec39cab 10651else
81ecdfbb 10652 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10653/* end confdefs.h. */
81ecdfbb
RW
10654#include <ctype.h>
10655#include <stdlib.h>
10656#if ((' ' & 0x0FF) == 0x020)
10657# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10658# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10659#else
10660# define ISLOWER(c) \
10661 (('a' <= (c) && (c) <= 'i') \
10662 || ('j' <= (c) && (c) <= 'r') \
10663 || ('s' <= (c) && (c) <= 'z'))
10664# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10665#endif
10666
10667#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
a9322a30
TT
10668int
10669main ()
10670{
81ecdfbb
RW
10671 int i;
10672 for (i = 0; i < 256; i++)
10673 if (XOR (islower (i), ISLOWER (i))
10674 || toupper (i) != TOUPPER (i))
10675 return 2;
a9322a30
TT
10676 return 0;
10677}
bec39cab 10678_ACEOF
81ecdfbb
RW
10679if ac_fn_c_try_run "$LINENO"; then :
10680
bec39cab 10681else
81ecdfbb
RW
10682 ac_cv_header_stdc=no
10683fi
10684rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10685 conftest.$ac_objext conftest.beam conftest.$ac_ext
10686fi
bec39cab 10687
bec39cab 10688fi
a9322a30 10689fi
81ecdfbb
RW
10690{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
10691$as_echo "$ac_cv_header_stdc" >&6; }
10692if test $ac_cv_header_stdc = yes; then
bec39cab 10693
81ecdfbb 10694$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5ee754fc 10695
81ecdfbb 10696fi
bec39cab 10697
81ecdfbb 10698# elf_hp.h is for HP/UX 64-bit shared library support.
9467110b 10699for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
161d1bec 10700 thread_db.h \
0080a2f6 10701 sys/fault.h \
81ecdfbb
RW
10702 sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
10703 sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
10704 sys/reg.h sys/debugreg.h sys/select.h sys/syscall.h \
9467110b 10705 termios.h termio.h \
3447c057 10706 sgtty.h elf_hp.h \
9467110b 10707 dlfcn.h
81ecdfbb
RW
10708do :
10709 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10710ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
10711eval as_val=\$$as_ac_Header
10712 if test "x$as_val" = x""yes; then :
bec39cab 10713 cat >>confdefs.h <<_ACEOF
81ecdfbb 10714#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 10715_ACEOF
c906108c 10716
bec39cab 10717fi
81ecdfbb
RW
10718
10719done
10720
81ecdfbb
RW
10721for ac_header in sys/proc.h
10722do :
10723 ac_fn_c_check_header_compile "$LINENO" "sys/proc.h" "ac_cv_header_sys_proc_h" "#if HAVE_SYS_PARAM_H
10724# include <sys/param.h>
10725#endif
c906108c 10726
81ecdfbb
RW
10727"
10728if test "x$ac_cv_header_sys_proc_h" = x""yes; then :
bec39cab 10729 cat >>confdefs.h <<_ACEOF
81ecdfbb 10730#define HAVE_SYS_PROC_H 1
bec39cab 10731_ACEOF
5ee754fc 10732
bec39cab 10733fi
81ecdfbb
RW
10734
10735done
10736
10737for ac_header in sys/user.h
10738do :
10739 ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
10740# include <sys/param.h>
a9322a30
TT
10741#endif
10742
81ecdfbb
RW
10743"
10744if test "x$ac_cv_header_sys_user_h" = x""yes; then :
10745 cat >>confdefs.h <<_ACEOF
10746#define HAVE_SYS_USER_H 1
bec39cab 10747_ACEOF
bec39cab 10748
a9322a30 10749fi
bec39cab 10750
81ecdfbb 10751done
5ee754fc 10752
5ee754fc 10753
81ecdfbb
RW
10754# On Solaris 2.[789], we need to define _MSE_INT_H to avoid a clash
10755# between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
10756# think that we don't have <curses.h> if we're using GCC.
10757case $host_os in
10758 solaris2.[789])
10759 if test "$GCC" = yes; then
10760
10761$as_echo "#define _MSE_INT_H 1" >>confdefs.h
10762
10763 fi ;;
10764esac
10765for ac_header in curses.h cursesX.h ncurses.h ncurses/ncurses.h ncurses/term.h
10766do :
10767 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10768ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
10769eval as_val=\$$as_ac_Header
10770 if test "x$as_val" = x""yes; then :
bec39cab 10771 cat >>confdefs.h <<_ACEOF
81ecdfbb 10772#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 10773_ACEOF
5ee754fc
MK
10774
10775fi
10776
81ecdfbb 10777done
bec39cab 10778
81ecdfbb
RW
10779for ac_header in term.h
10780do :
10781 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
10782# include <curses.h>
10783#endif
bec39cab 10784
81ecdfbb
RW
10785"
10786if test "x$ac_cv_header_term_h" = x""yes; then :
10787 cat >>confdefs.h <<_ACEOF
10788#define HAVE_TERM_H 1
a8111142 10789_ACEOF
a8111142 10790
a8111142 10791fi
a8111142 10792
81ecdfbb 10793done
a8111142
TT
10794
10795
81ecdfbb
RW
10796# ------------------------- #
10797# Checks for declarations. #
10798# ------------------------- #
a9322a30 10799
07697489
PA
10800
10801 # Check for presence and size of long long.
10802 ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
10803if test "x$ac_cv_type_long_long" = x""yes; then :
10804
10805cat >>confdefs.h <<_ACEOF
10806#define HAVE_LONG_LONG 1
10807_ACEOF
10808
10809# The cast to long int works around a bug in the HP C Compiler
10810# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10811# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10812# This bug is HP SR number 8606223364.
10813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
10814$as_echo_n "checking size of long long... " >&6; }
10815if test "${ac_cv_sizeof_long_long+set}" = set; then :
10816 $as_echo_n "(cached) " >&6
10817else
10818 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
10819
10820else
10821 if test "$ac_cv_type_long_long" = yes; then
10822 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10823$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10824{ as_fn_set_status 77
10825as_fn_error "cannot compute sizeof (long long)
10826See \`config.log' for more details." "$LINENO" 5; }; }
10827 else
10828 ac_cv_sizeof_long_long=0
10829 fi
10830fi
10831
10832fi
10833{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
10834$as_echo "$ac_cv_sizeof_long_long" >&6; }
10835
10836
10837
10838cat >>confdefs.h <<_ACEOF
10839#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
10840_ACEOF
10841
10842
10843fi
10844
10845
10846 ac_fn_c_check_decl "$LINENO" "basename(char *)" "ac_cv_have_decl_basename_char_p_" "$ac_includes_default"
10847if test "x$ac_cv_have_decl_basename_char_p_" = x""yes; then :
10848 ac_have_decl=1
10849else
10850 ac_have_decl=0
10851fi
10852
10853cat >>confdefs.h <<_ACEOF
10854#define HAVE_DECL_BASENAME $ac_have_decl
10855_ACEOF
10856ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default"
10857if test "x$ac_cv_have_decl_ffs" = x""yes; then :
10858 ac_have_decl=1
10859else
10860 ac_have_decl=0
10861fi
10862
10863cat >>confdefs.h <<_ACEOF
10864#define HAVE_DECL_FFS $ac_have_decl
10865_ACEOF
10866ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default"
10867if test "x$ac_cv_have_decl_asprintf" = x""yes; then :
10868 ac_have_decl=1
10869else
10870 ac_have_decl=0
10871fi
10872
10873cat >>confdefs.h <<_ACEOF
10874#define HAVE_DECL_ASPRINTF $ac_have_decl
10875_ACEOF
10876ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
10877if test "x$ac_cv_have_decl_vasprintf" = x""yes; then :
10878 ac_have_decl=1
10879else
10880 ac_have_decl=0
10881fi
10882
10883cat >>confdefs.h <<_ACEOF
10884#define HAVE_DECL_VASPRINTF $ac_have_decl
10885_ACEOF
10886ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
10887if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
10888 ac_have_decl=1
10889else
10890 ac_have_decl=0
10891fi
10892
10893cat >>confdefs.h <<_ACEOF
10894#define HAVE_DECL_SNPRINTF $ac_have_decl
10895_ACEOF
10896ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
10897if test "x$ac_cv_have_decl_vsnprintf" = x""yes; then :
10898 ac_have_decl=1
10899else
10900 ac_have_decl=0
10901fi
10902
10903cat >>confdefs.h <<_ACEOF
10904#define HAVE_DECL_VSNPRINTF $ac_have_decl
10905_ACEOF
10906
10907 ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default"
10908if test "x$ac_cv_have_decl_strtol" = x""yes; then :
10909 ac_have_decl=1
10910else
10911 ac_have_decl=0
10912fi
10913
10914cat >>confdefs.h <<_ACEOF
10915#define HAVE_DECL_STRTOL $ac_have_decl
10916_ACEOF
10917ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default"
10918if test "x$ac_cv_have_decl_strtoul" = x""yes; then :
10919 ac_have_decl=1
10920else
10921 ac_have_decl=0
10922fi
10923
10924cat >>confdefs.h <<_ACEOF
10925#define HAVE_DECL_STRTOUL $ac_have_decl
10926_ACEOF
10927ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
10928if test "x$ac_cv_have_decl_strtoll" = x""yes; then :
10929 ac_have_decl=1
10930else
10931 ac_have_decl=0
10932fi
10933
10934cat >>confdefs.h <<_ACEOF
10935#define HAVE_DECL_STRTOLL $ac_have_decl
10936_ACEOF
10937ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
10938if test "x$ac_cv_have_decl_strtoull" = x""yes; then :
10939 ac_have_decl=1
10940else
10941 ac_have_decl=0
10942fi
10943
10944cat >>confdefs.h <<_ACEOF
10945#define HAVE_DECL_STRTOULL $ac_have_decl
10946_ACEOF
10947
10948 ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default"
10949if test "x$ac_cv_have_decl_strverscmp" = x""yes; then :
10950 ac_have_decl=1
10951else
10952 ac_have_decl=0
10953fi
10954
10955cat >>confdefs.h <<_ACEOF
10956#define HAVE_DECL_STRVERSCMP $ac_have_decl
10957_ACEOF
10958
10959
10960
81ecdfbb
RW
10961ac_fn_c_check_decl "$LINENO" "free" "ac_cv_have_decl_free" "$ac_includes_default"
10962if test "x$ac_cv_have_decl_free" = x""yes; then :
10963 ac_have_decl=1
bec39cab 10964else
81ecdfbb
RW
10965 ac_have_decl=0
10966fi
10967
10968cat >>confdefs.h <<_ACEOF
10969#define HAVE_DECL_FREE $ac_have_decl
bec39cab 10970_ACEOF
81ecdfbb
RW
10971ac_fn_c_check_decl "$LINENO" "malloc" "ac_cv_have_decl_malloc" "$ac_includes_default"
10972if test "x$ac_cv_have_decl_malloc" = x""yes; then :
10973 ac_have_decl=1
10974else
10975 ac_have_decl=0
10976fi
10977
10978cat >>confdefs.h <<_ACEOF
10979#define HAVE_DECL_MALLOC $ac_have_decl
bec39cab 10980_ACEOF
81ecdfbb
RW
10981ac_fn_c_check_decl "$LINENO" "realloc" "ac_cv_have_decl_realloc" "$ac_includes_default"
10982if test "x$ac_cv_have_decl_realloc" = x""yes; then :
10983 ac_have_decl=1
bec39cab 10984else
81ecdfbb
RW
10985 ac_have_decl=0
10986fi
bec39cab 10987
81ecdfbb
RW
10988cat >>confdefs.h <<_ACEOF
10989#define HAVE_DECL_REALLOC $ac_have_decl
bec39cab 10990_ACEOF
81ecdfbb
RW
10991ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
10992if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
10993 ac_have_decl=1
10994else
10995 ac_have_decl=0
5ee754fc 10996fi
81ecdfbb
RW
10997
10998cat >>confdefs.h <<_ACEOF
10999#define HAVE_DECL_SNPRINTF $ac_have_decl
a9322a30 11000_ACEOF
5ee754fc 11001
5ee754fc 11002
81ecdfbb
RW
11003 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
11004$as_echo_n "checking for LC_MESSAGES... " >&6; }
11005if test "${am_cv_val_LC_MESSAGES+set}" = set; then :
11006 $as_echo_n "(cached) " >&6
bec39cab 11007else
81ecdfbb 11008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11009/* end confdefs.h. */
81ecdfbb 11010#include <locale.h>
a9322a30
TT
11011int
11012main ()
11013{
81ecdfbb 11014return LC_MESSAGES
a9322a30
TT
11015 ;
11016 return 0;
11017}
bec39cab 11018_ACEOF
81ecdfbb
RW
11019if ac_fn_c_try_link "$LINENO"; then :
11020 am_cv_val_LC_MESSAGES=yes
bec39cab 11021else
81ecdfbb
RW
11022 am_cv_val_LC_MESSAGES=no
11023fi
11024rm -f core conftest.err conftest.$ac_objext \
11025 conftest$ac_exeext conftest.$ac_ext
11026fi
11027{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
11028$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
11029 if test $am_cv_val_LC_MESSAGES = yes; then
bec39cab 11030
81ecdfbb
RW
11031$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
11032
11033 fi
11034
11035
11036# ----------------------- #
11037# Checks for structures. #
11038# ----------------------- #
11039
11040ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
11041if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
11042
11043cat >>confdefs.h <<_ACEOF
11044#define HAVE_STRUCT_STAT_ST_BLOCKS 1
7eb368b3 11045_ACEOF
7eb368b3 11046
81ecdfbb 11047
7eb368b3 11048fi
81ecdfbb
RW
11049ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
11050if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
7eb368b3 11051
a9322a30
TT
11052cat >>confdefs.h <<_ACEOF
11053#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
7eb368b3
NR
11054_ACEOF
11055
a9322a30 11056
7eb368b3
NR
11057fi
11058
7eb368b3 11059
a9322a30
TT
11060# ------------------ #
11061# Checks for types. #
11062# ------------------ #
7eb368b3 11063
81ecdfbb 11064ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
a9322a30
TT
11065#include <sys/socket.h>
11066
81ecdfbb
RW
11067"
11068if test "x$ac_cv_type_socklen_t" = x""yes; then :
bec39cab 11069
a9322a30
TT
11070cat >>confdefs.h <<_ACEOF
11071#define HAVE_SOCKLEN_T 1
11072_ACEOF
11073
11074
11075fi
11076
11077
11078# ------------------------------------- #
11079# Checks for compiler characteristics. #
11080# ------------------------------------- #
11081
81ecdfbb
RW
11082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11083$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
11084if test "${ac_cv_c_const+set}" = set; then :
11085 $as_echo_n "(cached) " >&6
a9322a30 11086else
81ecdfbb 11087 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11088/* end confdefs.h. */
a9322a30
TT
11089
11090int
11091main ()
11092{
11093/* FIXME: Include the comments suggested by Paul. */
11094#ifndef __cplusplus
11095 /* Ultrix mips cc rejects this. */
11096 typedef int charset[2];
81ecdfbb 11097 const charset cs;
a9322a30 11098 /* SunOS 4.1.1 cc rejects this. */
81ecdfbb
RW
11099 char const *const *pcpcc;
11100 char **ppc;
a9322a30
TT
11101 /* NEC SVR4.0.2 mips cc rejects this. */
11102 struct point {int x, y;};
11103 static struct point const zero = {0,0};
11104 /* AIX XL C 1.02.0.0 rejects this.
11105 It does not let you subtract one const X* pointer from another in
11106 an arm of an if-expression whose if-part is not a constant
11107 expression */
11108 const char *g = "string";
81ecdfbb 11109 pcpcc = &g + (g ? g-g : 0);
a9322a30 11110 /* HPUX 7.0 cc rejects these. */
81ecdfbb
RW
11111 ++pcpcc;
11112 ppc = (char**) pcpcc;
11113 pcpcc = (char const *const *) ppc;
a9322a30
TT
11114 { /* SCO 3.2v4 cc rejects this. */
11115 char *t;
11116 char const *s = 0 ? (char *) 0 : (char const *) 0;
11117
11118 *t++ = 0;
81ecdfbb 11119 if (s) return 0;
a9322a30
TT
11120 }
11121 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11122 int x[] = {25, 17};
11123 const int *foo = &x[0];
11124 ++foo;
11125 }
11126 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11127 typedef const int *iptr;
11128 iptr p = 0;
11129 ++p;
11130 }
11131 { /* AIX XL C 1.02.0.0 rejects this saying
11132 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11133 struct s { int j; const int *ap[3]; };
11134 struct s *b; b->j = 5;
11135 }
11136 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11137 const int foo = 10;
81ecdfbb 11138 if (!foo) return 0;
a9322a30 11139 }
81ecdfbb 11140 return !cs[0] && !zero.x;
a9322a30
TT
11141#endif
11142
11143 ;
11144 return 0;
11145}
bec39cab 11146_ACEOF
81ecdfbb 11147if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 11148 ac_cv_c_const=yes
5ee754fc 11149else
81ecdfbb 11150 ac_cv_c_const=no
5ee754fc 11151fi
81ecdfbb 11152rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 11153fi
81ecdfbb
RW
11154{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11155$as_echo "$ac_cv_c_const" >&6; }
a9322a30 11156if test $ac_cv_c_const = no; then
bec39cab 11157
81ecdfbb 11158$as_echo "#define const /**/" >>confdefs.h
bec39cab 11159
5ee754fc 11160fi
bec39cab 11161
81ecdfbb
RW
11162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
11163$as_echo_n "checking for inline... " >&6; }
11164if test "${ac_cv_c_inline+set}" = set; then :
11165 $as_echo_n "(cached) " >&6
bec39cab 11166else
a9322a30
TT
11167 ac_cv_c_inline=no
11168for ac_kw in inline __inline__ __inline; do
81ecdfbb 11169 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11170/* end confdefs.h. */
a9322a30
TT
11171#ifndef __cplusplus
11172typedef int foo_t;
11173static $ac_kw foo_t static_foo () {return 0; }
11174$ac_kw foo_t foo () {return 0; }
11175#endif
11176
bec39cab 11177_ACEOF
81ecdfbb
RW
11178if ac_fn_c_try_compile "$LINENO"; then :
11179 ac_cv_c_inline=$ac_kw
bec39cab 11180fi
81ecdfbb
RW
11181rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11182 test "$ac_cv_c_inline" != no && break
a9322a30 11183done
bec39cab 11184
5ee754fc 11185fi
81ecdfbb
RW
11186{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
11187$as_echo "$ac_cv_c_inline" >&6; }
5ee754fc 11188
a9322a30
TT
11189case $ac_cv_c_inline in
11190 inline | yes) ;;
11191 *)
11192 case $ac_cv_c_inline in
11193 no) ac_val=;;
11194 *) ac_val=$ac_cv_c_inline;;
11195 esac
11196 cat >>confdefs.h <<_ACEOF
11197#ifndef __cplusplus
11198#define inline $ac_val
11199#endif
11200_ACEOF
bec39cab
AC
11201 ;;
11202esac
bec39cab 11203
81ecdfbb
RW
11204 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
11205$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
11206if test "${ac_cv_c_bigendian+set}" = set; then :
11207 $as_echo_n "(cached) " >&6
bec39cab 11208else
81ecdfbb
RW
11209 ac_cv_c_bigendian=unknown
11210 # See if we're dealing with a universal compiler.
11211 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11212/* end confdefs.h. */
11213#ifndef __APPLE_CC__
11214 not a universal capable compiler
11215 #endif
11216 typedef int dummy;
11217
11218_ACEOF
11219if ac_fn_c_try_compile "$LINENO"; then :
11220
11221 # Check for potential -arch flags. It is not universal unless
11222 # there are at least two -arch flags with different values.
11223 ac_arch=
11224 ac_prev=
11225 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
11226 if test -n "$ac_prev"; then
11227 case $ac_word in
11228 i?86 | x86_64 | ppc | ppc64)
11229 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
11230 ac_arch=$ac_word
11231 else
11232 ac_cv_c_bigendian=universal
11233 break
11234 fi
11235 ;;
11236 esac
11237 ac_prev=
11238 elif test "x$ac_word" = "x-arch"; then
11239 ac_prev=arch
11240 fi
11241 done
11242fi
11243rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11244 if test $ac_cv_c_bigendian = unknown; then
11245 # See if sys/param.h defines the BYTE_ORDER macro.
11246 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11247/* end confdefs.h. */
a9322a30 11248#include <sys/types.h>
81ecdfbb 11249 #include <sys/param.h>
a9322a30
TT
11250
11251int
11252main ()
11253{
81ecdfbb
RW
11254#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
11255 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
11256 && LITTLE_ENDIAN)
11257 bogus endian macros
11258 #endif
a9322a30
TT
11259
11260 ;
11261 return 0;
11262}
bec39cab 11263_ACEOF
81ecdfbb 11264if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 11265 # It does; now see whether it defined to BIG_ENDIAN or not.
81ecdfbb 11266 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11267/* end confdefs.h. */
a9322a30 11268#include <sys/types.h>
81ecdfbb 11269 #include <sys/param.h>
a9322a30
TT
11270
11271int
11272main ()
11273{
11274#if BYTE_ORDER != BIG_ENDIAN
81ecdfbb
RW
11275 not big endian
11276 #endif
a9322a30
TT
11277
11278 ;
11279 return 0;
11280}
bec39cab 11281_ACEOF
81ecdfbb 11282if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 11283 ac_cv_c_bigendian=yes
5ee754fc 11284else
81ecdfbb 11285 ac_cv_c_bigendian=no
5ee754fc 11286fi
81ecdfbb
RW
11287rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11288fi
11289rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11290 fi
11291 if test $ac_cv_c_bigendian = unknown; then
11292 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
11293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11294/* end confdefs.h. */
11295#include <limits.h>
bec39cab 11296
81ecdfbb
RW
11297int
11298main ()
11299{
11300#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
11301 bogus endian macros
11302 #endif
11303
11304 ;
11305 return 0;
11306}
7eb368b3 11307_ACEOF
81ecdfbb
RW
11308if ac_fn_c_try_compile "$LINENO"; then :
11309 # It does; now see whether it defined to _BIG_ENDIAN or not.
11310 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7eb368b3 11311/* end confdefs.h. */
81ecdfbb
RW
11312#include <limits.h>
11313
7eb368b3
NR
11314int
11315main ()
11316{
81ecdfbb
RW
11317#ifndef _BIG_ENDIAN
11318 not big endian
11319 #endif
11320
7eb368b3
NR
11321 ;
11322 return 0;
11323}
11324_ACEOF
81ecdfbb 11325if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 11326 ac_cv_c_bigendian=yes
81ecdfbb
RW
11327else
11328 ac_cv_c_bigendian=no
a9322a30 11329fi
81ecdfbb 11330rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30 11331fi
81ecdfbb
RW
11332rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11333 fi
11334 if test $ac_cv_c_bigendian = unknown; then
11335 # Compile a test program.
11336 if test "$cross_compiling" = yes; then :
11337 # Try to guess by grepping values from an object file.
11338 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11339/* end confdefs.h. */
11340short int ascii_mm[] =
11341 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
11342 short int ascii_ii[] =
11343 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
11344 int use_ascii (int i) {
11345 return ascii_mm[i] + ascii_ii[i];
11346 }
11347 short int ebcdic_ii[] =
11348 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
11349 short int ebcdic_mm[] =
11350 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
11351 int use_ebcdic (int i) {
11352 return ebcdic_mm[i] + ebcdic_ii[i];
11353 }
11354 extern int foo;
7eb368b3 11355
81ecdfbb
RW
11356int
11357main ()
11358{
11359return use_ascii (foo) == use_ebcdic (foo);
11360 ;
11361 return 0;
11362}
11363_ACEOF
11364if ac_fn_c_try_compile "$LINENO"; then :
11365 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
11366 ac_cv_c_bigendian=yes
11367 fi
11368 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
11369 if test "$ac_cv_c_bigendian" = unknown; then
11370 ac_cv_c_bigendian=no
11371 else
11372 # finding both strings is unlikely to happen, but who knows?
11373 ac_cv_c_bigendian=unknown
11374 fi
11375 fi
7eb368b3 11376fi
81ecdfbb 11377rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 11378else
81ecdfbb 11379 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11380/* end confdefs.h. */
81ecdfbb 11381$ac_includes_default
d3ea6809
MM
11382int
11383main ()
11384{
81ecdfbb
RW
11385
11386 /* Are we little or big endian? From Harbison&Steele. */
11387 union
11388 {
11389 long int l;
11390 char c[sizeof (long int)];
11391 } u;
11392 u.l = 1;
11393 return u.c[sizeof (long int) - 1] == 1;
11394
11395 ;
11396 return 0;
d3ea6809
MM
11397}
11398_ACEOF
81ecdfbb 11399if ac_fn_c_try_run "$LINENO"; then :
a9322a30 11400 ac_cv_c_bigendian=no
d3ea6809 11401else
81ecdfbb 11402 ac_cv_c_bigendian=yes
d3ea6809 11403fi
81ecdfbb
RW
11404rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11405 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 11406fi
a9322a30 11407
81ecdfbb
RW
11408 fi
11409fi
11410{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
11411$as_echo "$ac_cv_c_bigendian" >&6; }
11412 case $ac_cv_c_bigendian in #(
11413 yes)
11414 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
11415;; #(
11416 no)
11417 ;; #(
11418 universal)
11419
11420$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
11421
11422 ;; #(
11423 *)
11424 as_fn_error "unknown endianness
11425 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
11426 esac
d3ea6809
MM
11427
11428
a9322a30
TT
11429# ------------------------------ #
11430# Checks for library functions. #
11431# ------------------------------ #
d3ea6809 11432
a9322a30 11433for ac_header in stdlib.h unistd.h
81ecdfbb
RW
11434do :
11435 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11436ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
11437eval as_val=\$$as_ac_Header
11438 if test "x$as_val" = x""yes; then :
bec39cab 11439 cat >>confdefs.h <<_ACEOF
81ecdfbb 11440#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 11441_ACEOF
b757528f 11442
b757528f 11443fi
bec39cab 11444
a9322a30 11445done
a3828db0 11446
a9322a30 11447for ac_func in getpagesize
81ecdfbb
RW
11448do :
11449 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
11450if test "x$ac_cv_func_getpagesize" = x""yes; then :
bec39cab 11451 cat >>confdefs.h <<_ACEOF
81ecdfbb 11452#define HAVE_GETPAGESIZE 1
bec39cab 11453_ACEOF
bcb3dc3d 11454
bcb3dc3d
MK
11455fi
11456done
11457
81ecdfbb
RW
11458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
11459$as_echo_n "checking for working mmap... " >&6; }
11460if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then :
11461 $as_echo_n "(cached) " >&6
a9322a30 11462else
81ecdfbb 11463 if test "$cross_compiling" = yes; then :
a9322a30 11464 ac_cv_func_mmap_fixed_mapped=no
bec39cab 11465else
81ecdfbb 11466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11467/* end confdefs.h. */
a9322a30
TT
11468$ac_includes_default
11469/* malloc might have been renamed as rpl_malloc. */
11470#undef malloc
bec39cab 11471
a9322a30
TT
11472/* Thanks to Mike Haertel and Jim Avera for this test.
11473 Here is a matrix of mmap possibilities:
11474 mmap private not fixed
11475 mmap private fixed at somewhere currently unmapped
11476 mmap private fixed at somewhere already mapped
11477 mmap shared not fixed
11478 mmap shared fixed at somewhere currently unmapped
11479 mmap shared fixed at somewhere already mapped
11480 For private mappings, we should verify that changes cannot be read()
11481 back from the file, nor mmap's back from the file at a different
11482 address. (There have been systems where private was not correctly
11483 implemented like the infamous i386 svr4.0, and systems where the
11484 VM page cache was not coherent with the file system buffer cache
11485 like early versions of FreeBSD and possibly contemporary NetBSD.)
11486 For shared mappings, we should conversely verify that changes get
11487 propagated back to all the places they're supposed to be.
bec39cab 11488
a9322a30
TT
11489 Grep wants private fixed already mapped.
11490 The main things grep needs to know about mmap are:
11491 * does it exist and is it safe to write into the mmap'd area
11492 * how to use it (BSD variants) */
8b9cf735 11493
a9322a30
TT
11494#include <fcntl.h>
11495#include <sys/mman.h>
8b9cf735 11496
81ecdfbb 11497#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
a9322a30 11498char *malloc ();
a3828db0
MK
11499#endif
11500
a9322a30 11501/* This mess was copied from the GNU getpagesize.h. */
81ecdfbb 11502#ifndef HAVE_GETPAGESIZE
a9322a30 11503/* Assume that all systems that can run configure have sys/param.h. */
81ecdfbb 11504# ifndef HAVE_SYS_PARAM_H
a9322a30
TT
11505# define HAVE_SYS_PARAM_H 1
11506# endif
11507
11508# ifdef _SC_PAGESIZE
11509# define getpagesize() sysconf(_SC_PAGESIZE)
11510# else /* no _SC_PAGESIZE */
81ecdfbb 11511# ifdef HAVE_SYS_PARAM_H
a9322a30
TT
11512# include <sys/param.h>
11513# ifdef EXEC_PAGESIZE
11514# define getpagesize() EXEC_PAGESIZE
11515# else /* no EXEC_PAGESIZE */
11516# ifdef NBPG
11517# define getpagesize() NBPG * CLSIZE
11518# ifndef CLSIZE
11519# define CLSIZE 1
11520# endif /* no CLSIZE */
11521# else /* no NBPG */
11522# ifdef NBPC
11523# define getpagesize() NBPC
11524# else /* no NBPC */
11525# ifdef PAGESIZE
11526# define getpagesize() PAGESIZE
11527# endif /* PAGESIZE */
11528# endif /* no NBPC */
11529# endif /* no NBPG */
11530# endif /* no EXEC_PAGESIZE */
11531# else /* no HAVE_SYS_PARAM_H */
11532# define getpagesize() 8192 /* punt totally */
11533# endif /* no HAVE_SYS_PARAM_H */
11534# endif /* no _SC_PAGESIZE */
11535
11536#endif /* no HAVE_GETPAGESIZE */
11537
bec39cab
AC
11538int
11539main ()
11540{
a9322a30
TT
11541 char *data, *data2, *data3;
11542 int i, pagesize;
11543 int fd;
11544
11545 pagesize = getpagesize ();
11546
11547 /* First, make a file with some known garbage in it. */
11548 data = (char *) malloc (pagesize);
11549 if (!data)
81ecdfbb 11550 return 1;
a9322a30
TT
11551 for (i = 0; i < pagesize; ++i)
11552 *(data + i) = rand ();
11553 umask (0);
11554 fd = creat ("conftest.mmap", 0600);
11555 if (fd < 0)
81ecdfbb 11556 return 1;
a9322a30 11557 if (write (fd, data, pagesize) != pagesize)
81ecdfbb 11558 return 1;
a9322a30
TT
11559 close (fd);
11560
11561 /* Next, try to mmap the file at a fixed address which already has
11562 something else allocated at it. If we can, also make sure that
11563 we see the same garbage. */
11564 fd = open ("conftest.mmap", O_RDWR);
11565 if (fd < 0)
81ecdfbb 11566 return 1;
a9322a30
TT
11567 data2 = (char *) malloc (2 * pagesize);
11568 if (!data2)
81ecdfbb
RW
11569 return 1;
11570 data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
a9322a30
TT
11571 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
11572 MAP_PRIVATE | MAP_FIXED, fd, 0L))
81ecdfbb 11573 return 1;
a9322a30
TT
11574 for (i = 0; i < pagesize; ++i)
11575 if (*(data + i) != *(data2 + i))
81ecdfbb 11576 return 1;
a9322a30
TT
11577
11578 /* Finally, make sure that changes to the mapped area do not
11579 percolate back to the file as seen by read(). (This is a bug on
11580 some variants of i386 svr4.0.) */
11581 for (i = 0; i < pagesize; ++i)
11582 *(data2 + i) = *(data2 + i) + 1;
11583 data3 = (char *) malloc (pagesize);
11584 if (!data3)
81ecdfbb 11585 return 1;
a9322a30 11586 if (read (fd, data3, pagesize) != pagesize)
81ecdfbb 11587 return 1;
a9322a30
TT
11588 for (i = 0; i < pagesize; ++i)
11589 if (*(data + i) != *(data3 + i))
81ecdfbb 11590 return 1;
a9322a30 11591 close (fd);
81ecdfbb 11592 return 0;
bec39cab
AC
11593}
11594_ACEOF
81ecdfbb 11595if ac_fn_c_try_run "$LINENO"; then :
a9322a30 11596 ac_cv_func_mmap_fixed_mapped=yes
086ec9eb 11597else
81ecdfbb 11598 ac_cv_func_mmap_fixed_mapped=no
a3828db0 11599fi
81ecdfbb
RW
11600rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11601 conftest.$ac_objext conftest.beam conftest.$ac_ext
a3828db0 11602fi
81ecdfbb 11603
a9322a30 11604fi
81ecdfbb
RW
11605{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
11606$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
a9322a30
TT
11607if test $ac_cv_func_mmap_fixed_mapped = yes; then
11608
81ecdfbb 11609$as_echo "#define HAVE_MMAP 1" >>confdefs.h
a3828db0 11610
086ec9eb 11611fi
a9322a30 11612rm -f conftest.mmap
a3828db0 11613
81ecdfbb
RW
11614ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
11615if test "x$ac_cv_type_pid_t" = x""yes; then :
bec39cab 11616
a9322a30
TT
11617else
11618
11619cat >>confdefs.h <<_ACEOF
11620#define pid_t int
bec39cab 11621_ACEOF
086ec9eb
MK
11622
11623fi
11624
81ecdfbb
RW
11625for ac_header in vfork.h
11626do :
11627 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
11628if test "x$ac_cv_header_vfork_h" = x""yes; then :
a3828db0 11629 cat >>confdefs.h <<_ACEOF
81ecdfbb 11630#define HAVE_VFORK_H 1
bec39cab 11631_ACEOF
c906108c
SS
11632
11633fi
a9322a30 11634
a3828db0 11635done
c906108c 11636
a9322a30 11637for ac_func in fork vfork
81ecdfbb
RW
11638do :
11639 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11640ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11641eval as_val=\$$as_ac_var
11642 if test "x$as_val" = x""yes; then :
a3828db0 11643 cat >>confdefs.h <<_ACEOF
81ecdfbb 11644#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 11645_ACEOF
b83266a0 11646
97bf5e38 11647fi
a3828db0 11648done
b83266a0 11649
a9322a30 11650if test "x$ac_cv_func_fork" = xyes; then
81ecdfbb
RW
11651 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
11652$as_echo_n "checking for working fork... " >&6; }
11653if test "${ac_cv_func_fork_works+set}" = set; then :
11654 $as_echo_n "(cached) " >&6
a9322a30 11655else
81ecdfbb 11656 if test "$cross_compiling" = yes; then :
a9322a30
TT
11657 ac_cv_func_fork_works=cross
11658else
81ecdfbb
RW
11659 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11660/* end confdefs.h. */
11661$ac_includes_default
11662int
11663main ()
11664{
11665
11666 /* By Ruediger Kuhlmann. */
11667 return fork () < 0;
11668
11669 ;
11670 return 0;
11671}
a9322a30 11672_ACEOF
81ecdfbb 11673if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
11674 ac_cv_func_fork_works=yes
11675else
81ecdfbb 11676 ac_cv_func_fork_works=no
a9322a30 11677fi
81ecdfbb
RW
11678rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11679 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 11680fi
81ecdfbb 11681
a9322a30 11682fi
81ecdfbb
RW
11683{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
11684$as_echo "$ac_cv_func_fork_works" >&6; }
a9322a30
TT
11685
11686else
11687 ac_cv_func_fork_works=$ac_cv_func_fork
11688fi
11689if test "x$ac_cv_func_fork_works" = xcross; then
11690 case $host in
11691 *-*-amigaos* | *-*-msdosdjgpp*)
11692 # Override, as these systems have only a dummy fork() stub
11693 ac_cv_func_fork_works=no
11694 ;;
11695 *)
11696 ac_cv_func_fork_works=yes
11697 ;;
11698 esac
81ecdfbb
RW
11699 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
11700$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
a9322a30
TT
11701fi
11702ac_cv_func_vfork_works=$ac_cv_func_vfork
11703if test "x$ac_cv_func_vfork" = xyes; then
81ecdfbb
RW
11704 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
11705$as_echo_n "checking for working vfork... " >&6; }
11706if test "${ac_cv_func_vfork_works+set}" = set; then :
11707 $as_echo_n "(cached) " >&6
a9322a30 11708else
81ecdfbb 11709 if test "$cross_compiling" = yes; then :
a9322a30
TT
11710 ac_cv_func_vfork_works=cross
11711else
81ecdfbb 11712 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30
TT
11713/* end confdefs.h. */
11714/* Thanks to Paul Eggert for this test. */
81ecdfbb 11715$ac_includes_default
a9322a30 11716#include <sys/wait.h>
81ecdfbb 11717#ifdef HAVE_VFORK_H
a9322a30
TT
11718# include <vfork.h>
11719#endif
11720/* On some sparc systems, changes by the child to local and incoming
11721 argument registers are propagated back to the parent. The compiler
11722 is told about this with #include <vfork.h>, but some compilers
11723 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
11724 static variable whose address is put into a register that is
11725 clobbered by the vfork. */
11726static void
11727#ifdef __cplusplus
11728sparc_address_test (int arg)
11729# else
11730sparc_address_test (arg) int arg;
11731#endif
11732{
11733 static pid_t child;
11734 if (!child) {
11735 child = vfork ();
11736 if (child < 0) {
11737 perror ("vfork");
11738 _exit(2);
11739 }
11740 if (!child) {
11741 arg = getpid();
11742 write(-1, "", 0);
11743 _exit (arg);
11744 }
11745 }
11746}
11747
11748int
11749main ()
11750{
11751 pid_t parent = getpid ();
11752 pid_t child;
11753
11754 sparc_address_test (0);
11755
11756 child = vfork ();
11757
11758 if (child == 0) {
11759 /* Here is another test for sparc vfork register problems. This
11760 test uses lots of local variables, at least as many local
11761 variables as main has allocated so far including compiler
11762 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
11763 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
11764 reuse the register of parent for one of the local variables,
11765 since it will think that parent can't possibly be used any more
11766 in this routine. Assigning to the local variable will thus
11767 munge parent in the parent process. */
11768 pid_t
11769 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
11770 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
11771 /* Convince the compiler that p..p7 are live; otherwise, it might
11772 use the same hardware register for all 8 local variables. */
11773 if (p != p1 || p != p2 || p != p3 || p != p4
11774 || p != p5 || p != p6 || p != p7)
11775 _exit(1);
11776
11777 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
11778 from child file descriptors. If the child closes a descriptor
11779 before it execs or exits, this munges the parent's descriptor
11780 as well. Test for this by closing stdout in the child. */
11781 _exit(close(fileno(stdout)) != 0);
11782 } else {
11783 int status;
11784 struct stat st;
11785
11786 while (wait(&status) != child)
11787 ;
81ecdfbb 11788 return (
a9322a30
TT
11789 /* Was there some problem with vforking? */
11790 child < 0
11791
11792 /* Did the child fail? (This shouldn't happen.) */
11793 || status
11794
11795 /* Did the vfork/compiler bug occur? */
11796 || parent != getpid()
11797
11798 /* Did the file descriptor bug occur? */
11799 || fstat(fileno(stdout), &st) != 0
11800 );
11801 }
11802}
11803_ACEOF
81ecdfbb 11804if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
11805 ac_cv_func_vfork_works=yes
11806else
81ecdfbb 11807 ac_cv_func_vfork_works=no
a9322a30 11808fi
81ecdfbb
RW
11809rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11810 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 11811fi
81ecdfbb 11812
a9322a30 11813fi
81ecdfbb
RW
11814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
11815$as_echo "$ac_cv_func_vfork_works" >&6; }
a9322a30
TT
11816
11817fi;
11818if test "x$ac_cv_func_fork_works" = xcross; then
11819 ac_cv_func_vfork_works=$ac_cv_func_vfork
81ecdfbb
RW
11820 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
11821$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
a9322a30
TT
11822fi
11823
11824if test "x$ac_cv_func_vfork_works" = xyes; then
11825
81ecdfbb 11826$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
a9322a30
TT
11827
11828else
11829
81ecdfbb 11830$as_echo "#define vfork fork" >>confdefs.h
a9322a30
TT
11831
11832fi
11833if test "x$ac_cv_func_fork_works" = xyes; then
11834
81ecdfbb 11835$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
a9322a30
TT
11836
11837fi
11838
cdf43629 11839for ac_func in getauxval getrusage getuid getgid \
bdca27a2 11840 pipe poll pread pread64 pwrite resize_term \
7313baad 11841 sbrk setpgid setpgrp setsid \
9467110b 11842 sigaction sigprocmask sigsetmask socketpair \
110ed339 11843 ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
3332aaf2 11844 setrlimit getrlimit posix_madvise waitpid \
4b8b5e72 11845 ptrace64 sigaltstack mkdtemp setns
81ecdfbb
RW
11846do :
11847 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11848ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11849eval as_val=\$$as_ac_var
11850 if test "x$as_val" = x""yes; then :
6c7a06a3 11851 cat >>confdefs.h <<_ACEOF
81ecdfbb 11852#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6c7a06a3
TT
11853_ACEOF
11854
11855fi
11856done
11857
11858
81ecdfbb
RW
11859 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
11860$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
11861if test "${am_cv_langinfo_codeset+set}" = set; then :
11862 $as_echo_n "(cached) " >&6
6c7a06a3 11863else
81ecdfbb 11864 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
11865/* end confdefs.h. */
11866#include <langinfo.h>
11867int
11868main ()
11869{
11870char* cs = nl_langinfo(CODESET);
bec39cab
AC
11871 ;
11872 return 0;
11873}
11874_ACEOF
81ecdfbb 11875if ac_fn_c_try_link "$LINENO"; then :
6c7a06a3 11876 am_cv_langinfo_codeset=yes
a4db0f07 11877else
81ecdfbb 11878 am_cv_langinfo_codeset=no
a4db0f07 11879fi
81ecdfbb
RW
11880rm -f core conftest.err conftest.$ac_objext \
11881 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 11882
a4db0f07 11883fi
81ecdfbb
RW
11884{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
11885$as_echo "$am_cv_langinfo_codeset" >&6; }
6c7a06a3
TT
11886 if test $am_cv_langinfo_codeset = yes; then
11887
81ecdfbb 11888$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
a4db0f07 11889
6c7a06a3 11890 fi
c906108c 11891
06825bd1 11892
3266f10b
TT
11893 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
11894$as_echo_n "checking for ANSI C header files... " >&6; }
11895if test "${ac_cv_header_stdc+set}" = set; then :
11896 $as_echo_n "(cached) " >&6
11897else
11898 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11899/* end confdefs.h. */
11900#include <stdlib.h>
11901#include <stdarg.h>
11902#include <string.h>
11903#include <float.h>
11904
11905int
11906main ()
11907{
11908
11909 ;
11910 return 0;
11911}
11912_ACEOF
11913if ac_fn_c_try_compile "$LINENO"; then :
11914 ac_cv_header_stdc=yes
11915else
11916 ac_cv_header_stdc=no
11917fi
11918rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11919
11920if test $ac_cv_header_stdc = yes; then
11921 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11922 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11923/* end confdefs.h. */
11924#include <string.h>
11925
11926_ACEOF
11927if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11928 $EGREP "memchr" >/dev/null 2>&1; then :
11929
11930else
11931 ac_cv_header_stdc=no
11932fi
11933rm -f conftest*
11934
11935fi
11936
11937if test $ac_cv_header_stdc = yes; then
11938 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11940/* end confdefs.h. */
11941#include <stdlib.h>
11942
11943_ACEOF
11944if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11945 $EGREP "free" >/dev/null 2>&1; then :
11946
11947else
11948 ac_cv_header_stdc=no
11949fi
11950rm -f conftest*
11951
11952fi
11953
11954if test $ac_cv_header_stdc = yes; then
11955 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11956 if test "$cross_compiling" = yes; then :
11957 :
11958else
11959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11960/* end confdefs.h. */
11961#include <ctype.h>
11962#include <stdlib.h>
11963#if ((' ' & 0x0FF) == 0x020)
11964# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11965# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11966#else
11967# define ISLOWER(c) \
11968 (('a' <= (c) && (c) <= 'i') \
11969 || ('j' <= (c) && (c) <= 'r') \
11970 || ('s' <= (c) && (c) <= 'z'))
11971# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11972#endif
11973
11974#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11975int
11976main ()
11977{
11978 int i;
11979 for (i = 0; i < 256; i++)
11980 if (XOR (islower (i), ISLOWER (i))
11981 || toupper (i) != TOUPPER (i))
11982 return 2;
11983 return 0;
11984}
11985_ACEOF
11986if ac_fn_c_try_run "$LINENO"; then :
11987
11988else
11989 ac_cv_header_stdc=no
11990fi
11991rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11992 conftest.$ac_objext conftest.beam conftest.$ac_ext
11993fi
11994
11995fi
11996fi
11997{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
11998$as_echo "$ac_cv_header_stdc" >&6; }
11999if test $ac_cv_header_stdc = yes; then
12000
12001$as_echo "#define STDC_HEADERS 1" >>confdefs.h
12002
3266f10b
TT
12003fi
12004
12005 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
12006# for constant arguments. Useless!
12007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
12008$as_echo_n "checking for working alloca.h... " >&6; }
12009if test "${ac_cv_working_alloca_h+set}" = set; then :
12010 $as_echo_n "(cached) " >&6
12011else
12012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12013/* end confdefs.h. */
12014#include <alloca.h>
12015int
12016main ()
12017{
12018char *p = (char *) alloca (2 * sizeof (int));
12019 if (p) return 0;
12020 ;
12021 return 0;
12022}
12023_ACEOF
12024if ac_fn_c_try_link "$LINENO"; then :
12025 ac_cv_working_alloca_h=yes
12026else
12027 ac_cv_working_alloca_h=no
12028fi
12029rm -f core conftest.err conftest.$ac_objext \
12030 conftest$ac_exeext conftest.$ac_ext
12031fi
12032{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
12033$as_echo "$ac_cv_working_alloca_h" >&6; }
12034if test $ac_cv_working_alloca_h = yes; then
12035
12036$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
12037
12038fi
12039
12040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
12041$as_echo_n "checking for alloca... " >&6; }
12042if test "${ac_cv_func_alloca_works+set}" = set; then :
12043 $as_echo_n "(cached) " >&6
12044else
12045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12046/* end confdefs.h. */
12047#ifdef __GNUC__
12048# define alloca __builtin_alloca
12049#else
12050# ifdef _MSC_VER
12051# include <malloc.h>
12052# define alloca _alloca
12053# else
12054# ifdef HAVE_ALLOCA_H
12055# include <alloca.h>
12056# else
12057# ifdef _AIX
12058 #pragma alloca
12059# else
12060# ifndef alloca /* predefined by HP cc +Olibcalls */
12061char *alloca ();
12062# endif
12063# endif
12064# endif
12065# endif
12066#endif
12067
12068int
12069main ()
12070{
12071char *p = (char *) alloca (1);
12072 if (p) return 0;
12073 ;
12074 return 0;
12075}
12076_ACEOF
12077if ac_fn_c_try_link "$LINENO"; then :
12078 ac_cv_func_alloca_works=yes
12079else
12080 ac_cv_func_alloca_works=no
12081fi
12082rm -f core conftest.err conftest.$ac_objext \
12083 conftest$ac_exeext conftest.$ac_ext
12084fi
12085{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
12086$as_echo "$ac_cv_func_alloca_works" >&6; }
12087
12088if test $ac_cv_func_alloca_works = yes; then
12089
12090$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
12091
12092else
12093 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
12094# that cause trouble. Some versions do not even contain alloca or
12095# contain a buggy version. If you still want to use their alloca,
12096# use ar to extract alloca.o from them instead of compiling alloca.c.
12097
12098ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
12099
12100$as_echo "#define C_ALLOCA 1" >>confdefs.h
12101
12102
12103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
12104$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
12105if test "${ac_cv_os_cray+set}" = set; then :
12106 $as_echo_n "(cached) " >&6
12107else
12108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12109/* end confdefs.h. */
12110#if defined CRAY && ! defined CRAY2
12111webecray
12112#else
12113wenotbecray
12114#endif
12115
12116_ACEOF
12117if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12118 $EGREP "webecray" >/dev/null 2>&1; then :
12119 ac_cv_os_cray=yes
12120else
12121 ac_cv_os_cray=no
12122fi
12123rm -f conftest*
12124
12125fi
12126{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
12127$as_echo "$ac_cv_os_cray" >&6; }
12128if test $ac_cv_os_cray = yes; then
12129 for ac_func in _getb67 GETB67 getb67; do
12130 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12131ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12132eval as_val=\$$as_ac_var
12133 if test "x$as_val" = x""yes; then :
12134
12135cat >>confdefs.h <<_ACEOF
12136#define CRAY_STACKSEG_END $ac_func
12137_ACEOF
12138
12139 break
12140fi
12141
12142 done
12143fi
12144
12145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
12146$as_echo_n "checking stack direction for C alloca... " >&6; }
12147if test "${ac_cv_c_stack_direction+set}" = set; then :
12148 $as_echo_n "(cached) " >&6
12149else
12150 if test "$cross_compiling" = yes; then :
12151 ac_cv_c_stack_direction=0
12152else
12153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12154/* end confdefs.h. */
12155$ac_includes_default
12156int
12157find_stack_direction ()
12158{
12159 static char *addr = 0;
12160 auto char dummy;
12161 if (addr == 0)
12162 {
12163 addr = &dummy;
12164 return find_stack_direction ();
12165 }
12166 else
12167 return (&dummy > addr) ? 1 : -1;
12168}
12169
12170int
12171main ()
12172{
12173 return find_stack_direction () < 0;
12174}
12175_ACEOF
12176if ac_fn_c_try_run "$LINENO"; then :
12177 ac_cv_c_stack_direction=1
12178else
12179 ac_cv_c_stack_direction=-1
12180fi
12181rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12182 conftest.$ac_objext conftest.beam conftest.$ac_ext
12183fi
12184
12185fi
12186{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
12187$as_echo "$ac_cv_c_stack_direction" >&6; }
12188cat >>confdefs.h <<_ACEOF
12189#define STACK_DIRECTION $ac_cv_c_stack_direction
12190_ACEOF
12191
12192
12193fi
12194
12195
12196
12197 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
12198$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
12199if test "${am_cv_langinfo_codeset+set}" = set; then :
12200 $as_echo_n "(cached) " >&6
12201else
12202 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12203/* end confdefs.h. */
12204#include <langinfo.h>
12205int
12206main ()
12207{
12208char* cs = nl_langinfo(CODESET);
12209 ;
12210 return 0;
12211}
12212_ACEOF
12213if ac_fn_c_try_link "$LINENO"; then :
12214 am_cv_langinfo_codeset=yes
12215else
12216 am_cv_langinfo_codeset=no
12217fi
12218rm -f core conftest.err conftest.$ac_objext \
12219 conftest$ac_exeext conftest.$ac_ext
12220
12221fi
12222{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
12223$as_echo "$am_cv_langinfo_codeset" >&6; }
12224 if test $am_cv_langinfo_codeset = yes; then
12225
12226$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
12227
12228 fi
12229
12230
a3d08894 12231 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
12232do :
12233 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12234ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12235eval as_val=\$$as_ac_Header
12236 if test "x$as_val" = x""yes; then :
12237 cat >>confdefs.h <<_ACEOF
12238#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12239_ACEOF
12240
12241fi
12242
12243done
12244
12245
12246 for ac_func in fdwalk getrlimit pipe pipe2 socketpair
12247do :
12248 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12249ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12250eval as_val=\$$as_ac_var
12251 if test "x$as_val" = x""yes; then :
12252 cat >>confdefs.h <<_ACEOF
12253#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12254_ACEOF
12255
12256fi
12257done
12258
12259
12260 ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default"
12261if test "x$ac_cv_have_decl_strerror" = x""yes; then :
12262 ac_have_decl=1
12263else
12264 ac_have_decl=0
12265fi
12266
12267cat >>confdefs.h <<_ACEOF
12268#define HAVE_DECL_STRERROR $ac_have_decl
12269_ACEOF
12270ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
12271if test "x$ac_cv_have_decl_strstr" = x""yes; then :
12272 ac_have_decl=1
12273else
12274 ac_have_decl=0
12275fi
12276
12277cat >>confdefs.h <<_ACEOF
12278#define HAVE_DECL_STRSTR $ac_have_decl
12279_ACEOF
12280
12281
e9bcb658
GB
12282 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
12283$as_echo_n "checking for sigsetjmp... " >&6; }
12284if test "${gdb_cv_func_sigsetjmp+set}" = set; then :
12285 $as_echo_n "(cached) " >&6
12286else
12287 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12288/* end confdefs.h. */
12289
12290#include <setjmp.h>
12291
12292int
12293main ()
12294{
12295sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
12296 ;
12297 return 0;
12298}
12299_ACEOF
12300if ac_fn_c_try_compile "$LINENO"; then :
12301 gdb_cv_func_sigsetjmp=yes
12302else
12303 gdb_cv_func_sigsetjmp=no
12304fi
12305rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12306fi
12307{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
12308$as_echo "$gdb_cv_func_sigsetjmp" >&6; }
12309if test $gdb_cv_func_sigsetjmp = yes; then
12310
12311$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
12312
12313fi
12314
3266f10b 12315
54019719
PA
12316# Check the return and argument types of ptrace.
12317
12318
54019719
PA
12319for ac_header in sys/ptrace.h ptrace.h
12320do :
12321 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12322ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12323eval as_val=\$$as_ac_Header
12324 if test "x$as_val" = x""yes; then :
12325 cat >>confdefs.h <<_ACEOF
12326#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12327_ACEOF
12328
12329fi
12330
12331done
12332
12333
a3828db0 12334gdb_ptrace_headers='
4ff70b84 12335#include <sys/types.h>
a3828db0
MK
12336#if HAVE_SYS_PTRACE_H
12337# include <sys/ptrace.h>
12338#endif
12339#if HAVE_UNISTD_H
12340# include <unistd.h>
12341#endif
12342'
12343# There is no point in checking if we don't have a prototype.
9b30624b 12344ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers
81ecdfbb
RW
12345"
12346if test "x$ac_cv_have_decl_ptrace" = x""yes; then :
12347 ac_have_decl=1
06825bd1 12348else
81ecdfbb 12349 ac_have_decl=0
06825bd1 12350fi
06825bd1 12351
a3828db0 12352cat >>confdefs.h <<_ACEOF
81ecdfbb 12353#define HAVE_DECL_PTRACE $ac_have_decl
a3828db0 12354_ACEOF
81ecdfbb 12355if test $ac_have_decl = 1; then :
bec39cab 12356
a3828db0 12357else
a3828db0
MK
12358
12359 : ${gdb_cv_func_ptrace_ret='int'}
12360 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
12361
06825bd1
MK
12362fi
12363
064ef605
DJ
12364# Check return type. Varargs (used on GNU/Linux) conflict with the
12365# empty argument list, so check for that explicitly.
81ecdfbb
RW
12366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
12367$as_echo_n "checking return type of ptrace... " >&6; }
12368if test "${gdb_cv_func_ptrace_ret+set}" = set; then :
12369 $as_echo_n "(cached) " >&6
bec39cab 12370else
81ecdfbb 12371 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12372/* end confdefs.h. */
a3828db0 12373$gdb_ptrace_headers
bec39cab
AC
12374int
12375main ()
12376{
064ef605
DJ
12377extern long ptrace (enum __ptrace_request, ...);
12378 ;
12379 return 0;
12380}
12381_ACEOF
9b30624b 12382if ac_fn_c_try_compile "$LINENO"; then :
064ef605
DJ
12383 gdb_cv_func_ptrace_ret='long'
12384else
81ecdfbb 12385 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
12386/* end confdefs.h. */
12387$gdb_ptrace_headers
12388int
12389main ()
12390{
a3828db0 12391extern int ptrace ();
bec39cab
AC
12392 ;
12393 return 0;
12394}
12395_ACEOF
9b30624b 12396if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12397 gdb_cv_func_ptrace_ret='int'
70f9f479 12398else
81ecdfbb 12399 gdb_cv_func_ptrace_ret='long'
70f9f479 12400fi
81ecdfbb 12401rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
70f9f479 12402fi
81ecdfbb 12403rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
064ef605 12404fi
81ecdfbb
RW
12405{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
12406$as_echo "$gdb_cv_func_ptrace_ret" >&6; }
bec39cab 12407
a3828db0
MK
12408cat >>confdefs.h <<_ACEOF
12409#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
bec39cab 12410_ACEOF
70f9f479 12411
a3828db0 12412# Check argument types.
81ecdfbb
RW
12413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
12414$as_echo_n "checking types of arguments for ptrace... " >&6; }
12415if test "${gdb_cv_func_ptrace_args+set}" = set; then :
12416 $as_echo_n "(cached) " >&6
bec39cab 12417else
a3828db0 12418
81ecdfbb 12419 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
12420/* end confdefs.h. */
12421$gdb_ptrace_headers
12422int
12423main ()
12424{
12425extern long ptrace (enum __ptrace_request, ...);
12426 ;
12427 return 0;
12428}
12429_ACEOF
9b30624b 12430if ac_fn_c_try_compile "$LINENO"; then :
54019719 12431 gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long'
064ef605 12432else
064ef605 12433
a3828db0
MK
12434for gdb_arg1 in 'int' 'long'; do
12435 for gdb_arg2 in 'pid_t' 'int' 'long'; do
5ed10e6e 12436 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
96d7229d 12437 for gdb_arg4 in 'int' 'long' 'void *'; do
81ecdfbb 12438 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12439/* end confdefs.h. */
a3828db0 12440$gdb_ptrace_headers
bec39cab
AC
12441int
12442main ()
12443{
a3828db0
MK
12444
12445extern $gdb_cv_func_ptrace_ret
12446 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
12447
bec39cab
AC
12448 ;
12449 return 0;
12450}
12451_ACEOF
9b30624b 12452if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
12453 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
12454 break 4;
5c7f2947 12455fi
81ecdfbb 12456rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0 12457 for gdb_arg5 in 'int *' 'int' 'long'; do
81ecdfbb 12458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12459/* end confdefs.h. */
a3828db0 12460$gdb_ptrace_headers
bec39cab
AC
12461int
12462main ()
12463{
a3828db0
MK
12464
12465extern $gdb_cv_func_ptrace_ret
12466 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
12467
bec39cab
AC
12468 ;
12469 return 0;
12470}
12471_ACEOF
9b30624b 12472if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
12473
12474gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
12475 break 5;
78434e59 12476fi
81ecdfbb 12477rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0
MK
12478 done
12479 done
12480 done
12481 done
12482done
12483# Provide a safe default value.
12484: ${gdb_cv_func_ptrace_args='int,int,long,long'}
12485
064ef605 12486fi
81ecdfbb 12487rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
78434e59 12488fi
81ecdfbb
RW
12489{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
12490$as_echo "$gdb_cv_func_ptrace_args" >&6; }
a3828db0
MK
12491ac_save_IFS=$IFS; IFS=','
12492set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
12493IFS=$ac_save_IFS
12494shift
bec39cab 12495
54019719
PA
12496cat >>confdefs.h <<_ACEOF
12497#define PTRACE_TYPE_ARG1 $1
12498_ACEOF
12499
12500
a3828db0
MK
12501cat >>confdefs.h <<_ACEOF
12502#define PTRACE_TYPE_ARG3 $3
12503_ACEOF
12504
96d7229d
LM
12505
12506cat >>confdefs.h <<_ACEOF
12507#define PTRACE_TYPE_ARG4 $4
12508_ACEOF
12509
a3828db0
MK
12510if test -n "$5"; then
12511
12512cat >>confdefs.h <<_ACEOF
12513#define PTRACE_TYPE_ARG5 $5
bec39cab 12514_ACEOF
78434e59
MK
12515
12516fi
12517
54019719 12518
a3828db0 12519if test "$cross_compiling" = no; then
81ecdfbb
RW
12520 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
12521$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
12522if test "${ac_cv_func_setpgrp_void+set}" = set; then :
12523 $as_echo_n "(cached) " >&6
a3828db0 12524else
81ecdfbb
RW
12525 if test "$cross_compiling" = yes; then :
12526 as_fn_error "cannot check setpgrp when cross compiling" "$LINENO" 5
bec39cab 12527else
81ecdfbb 12528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12529/* end confdefs.h. */
81ecdfbb 12530$ac_includes_default
bec39cab
AC
12531int
12532main ()
12533{
a3828db0
MK
12534/* If this system has a BSD-style setpgrp which takes arguments,
12535 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
12536 exit successfully. */
81ecdfbb 12537 return setpgrp (1,1) != -1;
bec39cab
AC
12538 ;
12539 return 0;
12540}
12541_ACEOF
81ecdfbb 12542if ac_fn_c_try_run "$LINENO"; then :
a3828db0 12543 ac_cv_func_setpgrp_void=no
c906108c 12544else
81ecdfbb 12545 ac_cv_func_setpgrp_void=yes
c906108c 12546fi
81ecdfbb
RW
12547rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12548 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 12549fi
81ecdfbb 12550
a3828db0 12551fi
81ecdfbb
RW
12552{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
12553$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0
MK
12554if test $ac_cv_func_setpgrp_void = yes; then
12555
81ecdfbb 12556$as_echo "#define SETPGRP_VOID 1" >>confdefs.h
97bf5e38
MK
12557
12558fi
a3828db0
MK
12559
12560else
81ecdfbb
RW
12561 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
12562$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
12563if test "${ac_cv_func_setpgrp_void+set}" = set; then :
12564 $as_echo_n "(cached) " >&6
97bf5e38 12565else
81ecdfbb 12566 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12567/* end confdefs.h. */
a3828db0
MK
12568
12569#include <unistd.h>
12570
bec39cab
AC
12571int
12572main ()
12573{
a3828db0
MK
12574
12575 if (setpgrp(1,1) == -1)
12576 exit (0);
12577 else
12578 exit (1);
12579
bec39cab
AC
12580 ;
12581 return 0;
12582}
12583_ACEOF
81ecdfbb 12584if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12585 ac_cv_func_setpgrp_void=no
c906108c 12586else
81ecdfbb 12587 ac_cv_func_setpgrp_void=yes
c906108c 12588fi
81ecdfbb 12589rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 12590fi
81ecdfbb
RW
12591{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
12592$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0 12593if test $ac_cv_func_setpgrp_void = yes; then
81ecdfbb 12594 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
c3f6f71d 12595
a3828db0 12596fi
c906108c
SS
12597fi
12598
db1ff28b
JK
12599# Assume we'll default to using the included libiberty regex.
12600gdb_use_included_regex=yes
12601
12602# However, if the system regex is GNU regex, then default to *not*
12603# using the included regex.
12604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5
12605$as_echo_n "checking for GNU regex... " >&6; }
12606if test "${gdb_cv_have_gnu_regex+set}" = set; then :
12607 $as_echo_n "(cached) " >&6
12608else
12609 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12610/* end confdefs.h. */
12611#include <gnu-versions.h>
12612int
12613main ()
12614{
12615#define REGEX_INTERFACE_VERSION 1
12616#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
12617# error "Version mismatch"
12618#endif
12619 ;
12620 return 0;
12621}
12622_ACEOF
12623if ac_fn_c_try_compile "$LINENO"; then :
12624 gdb_cv_have_gnu_regex=yes
12625else
12626 gdb_cv_have_gnu_regex=no
12627fi
12628rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12629fi
12630{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
12631$as_echo "$gdb_cv_have_gnu_regex" >&6; }
12632if test $gdb_cv_have_gnu_regex = yes; then
12633 gdb_use_included_regex=no
12634fi
12635
12636
12637# Check whether --with-included-regex was given.
12638if test "${with_included_regex+set}" = set; then :
12639 withval=$with_included_regex; gdb_with_regex=$withval
12640else
12641 gdb_with_regex=$gdb_use_included_regex
12642fi
12643
12644if test "$gdb_with_regex" = yes; then
12645
12646$as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h
12647
12648fi
12649
81ecdfbb
RW
12650# Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
12651ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
12652#include <sys/proc.h>
12653
12654"
12655if test "x$ac_cv_member_struct_thread_td_pcb" = x""yes; then :
c906108c 12656
5c45e068 12657cat >>confdefs.h <<_ACEOF
a3828db0 12658#define HAVE_STRUCT_THREAD_TD_PCB 1
bec39cab 12659_ACEOF
c906108c 12660
5c45e068 12661
97bf5e38 12662fi
c906108c 12663
5c45e068 12664
a3828db0 12665# See if <sys/lwp.h> defines `struct lwp`.
81ecdfbb
RW
12666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
12667$as_echo_n "checking for struct lwp... " >&6; }
12668if test "${gdb_cv_struct_lwp+set}" = set; then :
12669 $as_echo_n "(cached) " >&6
bec39cab 12670else
81ecdfbb 12671 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12672/* end confdefs.h. */
a3828db0
MK
12673#include <sys/param.h>
12674#include <sys/lwp.h>
bec39cab
AC
12675int
12676main ()
12677{
a3828db0 12678struct lwp l;
bec39cab
AC
12679 ;
12680 return 0;
12681}
12682_ACEOF
81ecdfbb 12683if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12684 gdb_cv_struct_lwp=yes
c906108c 12685else
81ecdfbb 12686 gdb_cv_struct_lwp=no
c906108c 12687fi
81ecdfbb 12688rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 12689fi
81ecdfbb
RW
12690{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
12691$as_echo "$gdb_cv_struct_lwp" >&6; }
a3828db0 12692if test $gdb_cv_struct_lwp = yes; then
c906108c 12693
81ecdfbb 12694$as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
c906108c 12695
97bf5e38 12696fi
c906108c 12697
a3828db0 12698# See if <machine/reg.h> degines `struct reg'.
81ecdfbb
RW
12699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
12700$as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
12701if test "${gdb_cv_struct_reg+set}" = set; then :
12702 $as_echo_n "(cached) " >&6
bec39cab 12703else
81ecdfbb 12704 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12705/* end confdefs.h. */
a3828db0
MK
12706#include <sys/types.h>
12707#include <machine/reg.h>
bec39cab
AC
12708int
12709main ()
12710{
a3828db0 12711struct reg r;
bec39cab
AC
12712 ;
12713 return 0;
12714}
12715_ACEOF
81ecdfbb 12716if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12717 gdb_cv_struct_reg=yes
27ca5dad 12718else
81ecdfbb 12719 gdb_cv_struct_reg=no
27ca5dad 12720fi
81ecdfbb 12721rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27ca5dad 12722fi
81ecdfbb
RW
12723{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
12724$as_echo "$gdb_cv_struct_reg" >&6; }
a3828db0 12725if test $gdb_cv_struct_reg = yes; then
bec39cab 12726
81ecdfbb 12727$as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
27ca5dad
MC
12728
12729fi
97bf5e38 12730
a3828db0
MK
12731# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
12732# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
a6e69c1f
JB
12733ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <sys/types.h>
12734#include <machine/reg.h>
81ecdfbb
RW
12735"
12736if test "x$ac_cv_member_struct_reg_r_fs" = x""yes; then :
5c45e068
MK
12737
12738cat >>confdefs.h <<_ACEOF
a3828db0 12739#define HAVE_STRUCT_REG_R_FS 1
bec39cab 12740_ACEOF
3862412b 12741
5c45e068 12742
97bf5e38 12743fi
a6e69c1f
JB
12744ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <sys/types.h>
12745#include <machine/reg.h>
81ecdfbb
RW
12746"
12747if test "x$ac_cv_member_struct_reg_r_gs" = x""yes; then :
5c45e068
MK
12748
12749cat >>confdefs.h <<_ACEOF
a3828db0 12750#define HAVE_STRUCT_REG_R_GS 1
bec39cab 12751_ACEOF
3862412b 12752
5c45e068 12753
97bf5e38 12754fi
3862412b 12755
5c45e068 12756
6fea9e18
L
12757# See if <sys/user.h> supports the %fs_base and %gs_bas amd64 segment registers.
12758# Older amd64 Linux's don't have the fs_base and gs_base members of
12759# `struct user_regs_struct'.
12760ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "fs_base" "ac_cv_member_struct_user_regs_struct_fs_base" "#include <sys/user.h>
12761"
12762if test "x$ac_cv_member_struct_user_regs_struct_fs_base" = x""yes; then :
12763
12764cat >>confdefs.h <<_ACEOF
12765#define HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE 1
12766_ACEOF
12767
12768
12769fi
12770ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "gs_base" "ac_cv_member_struct_user_regs_struct_gs_base" "#include <sys/user.h>
12771"
12772if test "x$ac_cv_member_struct_user_regs_struct_gs_base" = x""yes; then :
12773
12774cat >>confdefs.h <<_ACEOF
12775#define HAVE_STRUCT_USER_REGS_STRUCT_GS_BASE 1
12776_ACEOF
12777
12778
12779fi
12780
12781
a3828db0 12782# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
81ecdfbb
RW
12783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
12784$as_echo_n "checking for PTRACE_GETREGS... " >&6; }
12785if test "${gdb_cv_have_ptrace_getregs+set}" = set; then :
12786 $as_echo_n "(cached) " >&6
451928c5 12787else
81ecdfbb 12788 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12789/* end confdefs.h. */
a3828db0 12790#include <sys/ptrace.h>
bec39cab
AC
12791int
12792main ()
12793{
a3828db0 12794PTRACE_GETREGS;
bec39cab
AC
12795 ;
12796 return 0;
12797}
12798_ACEOF
81ecdfbb 12799if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12800 gdb_cv_have_ptrace_getregs=yes
451928c5 12801else
81ecdfbb 12802 gdb_cv_have_ptrace_getregs=no
451928c5 12803fi
81ecdfbb 12804rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
12805fi
12806
81ecdfbb
RW
12807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
12808$as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
a3828db0 12809if test $gdb_cv_have_ptrace_getregs = yes; then
60ca704f 12810
81ecdfbb 12811$as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
451928c5 12812
97bf5e38 12813fi
451928c5 12814
a3828db0 12815# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
81ecdfbb
RW
12816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
12817$as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
12818if test "${gdb_cv_have_ptrace_getfpxregs+set}" = set; then :
12819 $as_echo_n "(cached) " >&6
451928c5 12820else
81ecdfbb 12821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12822/* end confdefs.h. */
a3828db0 12823#include <sys/ptrace.h>
bec39cab
AC
12824int
12825main ()
12826{
a3828db0 12827PTRACE_GETFPXREGS;
bec39cab
AC
12828 ;
12829 return 0;
12830}
12831_ACEOF
81ecdfbb 12832if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12833 gdb_cv_have_ptrace_getfpxregs=yes
451928c5 12834else
81ecdfbb 12835 gdb_cv_have_ptrace_getfpxregs=no
451928c5 12836fi
81ecdfbb 12837rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
12838fi
12839
81ecdfbb
RW
12840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
12841$as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
a3828db0 12842if test $gdb_cv_have_ptrace_getfpxregs = yes; then
60ca704f 12843
81ecdfbb 12844$as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
451928c5 12845
97bf5e38 12846fi
451928c5 12847
a3828db0 12848# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
81ecdfbb
RW
12849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
12850$as_echo_n "checking for PT_GETDBREGS... " >&6; }
12851if test "${gdb_cv_have_pt_getdbregs+set}" = set; then :
12852 $as_echo_n "(cached) " >&6
3862412b 12853else
81ecdfbb 12854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12855/* end confdefs.h. */
a3828db0
MK
12856#include <sys/types.h>
12857#include <sys/ptrace.h>
bec39cab
AC
12858int
12859main ()
12860{
a3828db0 12861PT_GETDBREGS;
bec39cab
AC
12862 ;
12863 return 0;
12864}
12865_ACEOF
81ecdfbb 12866if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12867 gdb_cv_have_pt_getdbregs=yes
3862412b 12868else
81ecdfbb 12869 gdb_cv_have_pt_getdbregs=no
3862412b 12870fi
81ecdfbb 12871rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
12872fi
12873
81ecdfbb
RW
12874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
12875$as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
a3828db0 12876if test $gdb_cv_have_pt_getdbregs = yes; then
60ca704f 12877
81ecdfbb 12878$as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
3862412b 12879
97bf5e38 12880fi
3862412b 12881
a3828db0 12882# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
81ecdfbb
RW
12883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
12884$as_echo_n "checking for PT_GETXMMREGS... " >&6; }
12885if test "${gdb_cv_have_pt_getxmmregs+set}" = set; then :
12886 $as_echo_n "(cached) " >&6
3862412b 12887else
81ecdfbb 12888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12889/* end confdefs.h. */
a3828db0
MK
12890#include <sys/types.h>
12891#include <sys/ptrace.h>
bec39cab
AC
12892int
12893main ()
12894{
a3828db0 12895PT_GETXMMREGS;
bec39cab
AC
12896 ;
12897 return 0;
12898}
12899_ACEOF
81ecdfbb 12900if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12901 gdb_cv_have_pt_getxmmregs=yes
3862412b 12902else
81ecdfbb 12903 gdb_cv_have_pt_getxmmregs=no
3862412b 12904fi
81ecdfbb 12905rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
12906fi
12907
81ecdfbb
RW
12908{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
12909$as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
a3828db0 12910if test $gdb_cv_have_pt_getxmmregs = yes; then
60ca704f 12911
81ecdfbb 12912$as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
3862412b 12913
97bf5e38 12914fi
3862412b 12915
6e9567fe
JB
12916# See if <sys/ptrace.h> supports LWP names on FreeBSD
12917# Older FreeBSD versions don't have the pl_tdname member of
12918# `struct ptrace_lwpinfo'.
12919ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_tdname" "ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" "#include <sys/ptrace.h>
12920"
12921if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" = x""yes; then :
12922
12923cat >>confdefs.h <<_ACEOF
12924#define HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME 1
12925_ACEOF
12926
12927
12928fi
12929
12930
e6cdd38e
JB
12931# See if <sys/ptrace.h> supports syscall fields on FreeBSD. The
12932# pl_syscall_code member of `struct ptrace_lwpinfo' was added in
12933# FreeBSD 10.3.
12934ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_syscall_code" "ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" "#include <sys/ptrace.h>
12935"
12936if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" = x""yes; then :
12937
12938cat >>confdefs.h <<_ACEOF
12939#define HAVE_STRUCT_PTRACE_LWPINFO_PL_SYSCALL_CODE 1
12940_ACEOF
12941
12942
12943fi
12944
6e9567fe 12945
05b4bd79 12946# Detect which type of /proc is in use, such as for Solaris.
97bf5e38
MK
12947
12948if test "${target}" = "${host}"; then
12949 case "${host}" in
7b00db47 12950 *-*-sysv4.2* | *-*-sysv5* )
60ca704f 12951
81ecdfbb 12952$as_echo "#define NEW_PROC_API 1" >>confdefs.h
97bf5e38
MK
12953
12954 ;;
c162e8c9 12955 *-*-solaris2.[6789] | *-*-solaris2.1[0-9]*)
60ca704f 12956
81ecdfbb 12957$as_echo "#define NEW_PROC_API 1" >>confdefs.h
c960c18f
AC
12958
12959 ;;
12960 mips-sgi-irix5*)
12961 # Work around <sys/proc.h> needing _KMEMUSER problem on IRIX 5.
60ca704f 12962
81ecdfbb 12963$as_echo "#define _KMEMUSER 1" >>confdefs.h
97bf5e38
MK
12964
12965 ;;
12966 esac
12967fi
12968
12969if test "$ac_cv_header_sys_procfs_h" = yes; then
81ecdfbb
RW
12970 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
12971$as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
12972 if test "${bfd_cv_have_sys_procfs_type_gregset_t+set}" = set; then :
12973 $as_echo_n "(cached) " >&6
596c9d4b 12974else
81ecdfbb 12975 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12976/* end confdefs.h. */
596c9d4b
KB
12977
12978#define _SYSCALL32
d30c5336
JK
12979/* Needed for new procfs interface on sparc-solaris. */
12980#define _STRUCTURED_PROC 1
596c9d4b 12981#include <sys/procfs.h>
bec39cab
AC
12982int
12983main ()
12984{
97bf5e38 12985gregset_t avar
bec39cab
AC
12986 ;
12987 return 0;
12988}
12989_ACEOF
81ecdfbb 12990if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 12991 bfd_cv_have_sys_procfs_type_gregset_t=yes
596c9d4b 12992else
81ecdfbb 12993 bfd_cv_have_sys_procfs_type_gregset_t=no
bec39cab 12994
596c9d4b 12995fi
81ecdfbb 12996rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
12997fi
12998
97bf5e38 12999 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
bec39cab 13000
81ecdfbb 13001$as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
596c9d4b
KB
13002
13003 fi
81ecdfbb
RW
13004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
13005$as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
451928c5 13006
81ecdfbb
RW
13007 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
13008$as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
13009 if test "${bfd_cv_have_sys_procfs_type_fpregset_t+set}" = set; then :
13010 $as_echo_n "(cached) " >&6
d84dd0c5 13011else
81ecdfbb 13012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13013/* end confdefs.h. */
97bf5e38
MK
13014
13015#define _SYSCALL32
d30c5336
JK
13016/* Needed for new procfs interface on sparc-solaris. */
13017#define _STRUCTURED_PROC 1
d84dd0c5 13018#include <sys/procfs.h>
bec39cab
AC
13019int
13020main ()
13021{
97bf5e38 13022fpregset_t avar
bec39cab
AC
13023 ;
13024 return 0;
13025}
13026_ACEOF
81ecdfbb 13027if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13028 bfd_cv_have_sys_procfs_type_fpregset_t=yes
d84dd0c5 13029else
81ecdfbb 13030 bfd_cv_have_sys_procfs_type_fpregset_t=no
bec39cab 13031
d84dd0c5 13032fi
81ecdfbb 13033rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d84dd0c5
MK
13034fi
13035
97bf5e38 13036 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
bec39cab 13037
81ecdfbb 13038$as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
d84dd0c5 13039
97bf5e38 13040 fi
81ecdfbb
RW
13041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
13042$as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
d84dd0c5 13043
81ecdfbb
RW
13044 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
13045$as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
13046 if test "${bfd_cv_have_sys_procfs_type_prgregset_t+set}" = set; then :
13047 $as_echo_n "(cached) " >&6
c906108c 13048else
81ecdfbb 13049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13050/* end confdefs.h. */
c906108c 13051
97bf5e38 13052#define _SYSCALL32
d30c5336
JK
13053/* Needed for new procfs interface on sparc-solaris. */
13054#define _STRUCTURED_PROC 1
97bf5e38 13055#include <sys/procfs.h>
bec39cab
AC
13056int
13057main ()
13058{
97bf5e38 13059prgregset_t avar
bec39cab
AC
13060 ;
13061 return 0;
13062}
13063_ACEOF
81ecdfbb 13064if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13065 bfd_cv_have_sys_procfs_type_prgregset_t=yes
c906108c 13066else
81ecdfbb 13067 bfd_cv_have_sys_procfs_type_prgregset_t=no
bec39cab 13068
c906108c 13069fi
81ecdfbb 13070rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13071fi
13072
97bf5e38 13073 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
bec39cab 13074
81ecdfbb 13075$as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
c906108c 13076
97bf5e38 13077 fi
81ecdfbb
RW
13078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
13079$as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
c906108c 13080
81ecdfbb
RW
13081 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
13082$as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
13083 if test "${bfd_cv_have_sys_procfs_type_prfpregset_t+set}" = set; then :
13084 $as_echo_n "(cached) " >&6
d45fe813 13085else
81ecdfbb 13086 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13087/* end confdefs.h. */
97bf5e38
MK
13088
13089#define _SYSCALL32
d30c5336
JK
13090/* Needed for new procfs interface on sparc-solaris. */
13091#define _STRUCTURED_PROC 1
97bf5e38 13092#include <sys/procfs.h>
bec39cab
AC
13093int
13094main ()
13095{
97bf5e38 13096prfpregset_t avar
bec39cab
AC
13097 ;
13098 return 0;
13099}
13100_ACEOF
81ecdfbb 13101if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13102 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
d45fe813 13103else
81ecdfbb 13104 bfd_cv_have_sys_procfs_type_prfpregset_t=no
bec39cab 13105
d45fe813 13106fi
81ecdfbb 13107rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
13108fi
13109
97bf5e38 13110 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
bec39cab 13111
81ecdfbb 13112$as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
d45fe813 13113
97bf5e38 13114 fi
81ecdfbb
RW
13115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
13116$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
d45fe813 13117
81ecdfbb
RW
13118 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
13119$as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
13120 if test "${bfd_cv_have_sys_procfs_type_prgregset32_t+set}" = set; then :
13121 $as_echo_n "(cached) " >&6
d45fe813 13122else
81ecdfbb 13123 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13124/* end confdefs.h. */
97bf5e38
MK
13125
13126#define _SYSCALL32
d30c5336
JK
13127/* Needed for new procfs interface on sparc-solaris. */
13128#define _STRUCTURED_PROC 1
97bf5e38 13129#include <sys/procfs.h>
bec39cab
AC
13130int
13131main ()
13132{
97bf5e38 13133prgregset32_t avar
bec39cab
AC
13134 ;
13135 return 0;
13136}
13137_ACEOF
81ecdfbb 13138if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13139 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
d45fe813 13140else
81ecdfbb 13141 bfd_cv_have_sys_procfs_type_prgregset32_t=no
bec39cab 13142
d45fe813 13143fi
81ecdfbb 13144rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
13145fi
13146
97bf5e38 13147 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
bec39cab 13148
81ecdfbb 13149$as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
d45fe813 13150
97bf5e38 13151 fi
81ecdfbb
RW
13152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
13153$as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
d45fe813 13154
81ecdfbb
RW
13155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
13156$as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
13157 if test "${bfd_cv_have_sys_procfs_type_lwpid_t+set}" = set; then :
13158 $as_echo_n "(cached) " >&6
d45fe813 13159else
81ecdfbb 13160 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13161/* end confdefs.h. */
97bf5e38 13162
d45fe813 13163#define _SYSCALL32
d30c5336
JK
13164/* Needed for new procfs interface on sparc-solaris. */
13165#define _STRUCTURED_PROC 1
97bf5e38 13166#include <sys/procfs.h>
bec39cab
AC
13167int
13168main ()
13169{
97bf5e38 13170lwpid_t avar
bec39cab
AC
13171 ;
13172 return 0;
13173}
13174_ACEOF
81ecdfbb 13175if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13176 bfd_cv_have_sys_procfs_type_lwpid_t=yes
d45fe813 13177else
81ecdfbb 13178 bfd_cv_have_sys_procfs_type_lwpid_t=no
bec39cab 13179
d45fe813 13180fi
81ecdfbb 13181rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
13182fi
13183
97bf5e38 13184 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
bec39cab 13185
81ecdfbb 13186$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
d45fe813 13187
97bf5e38 13188 fi
81ecdfbb
RW
13189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
13190$as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
c906108c 13191
81ecdfbb
RW
13192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
13193$as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
13194 if test "${bfd_cv_have_sys_procfs_type_psaddr_t+set}" = set; then :
13195 $as_echo_n "(cached) " >&6
c906108c 13196else
81ecdfbb 13197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13198/* end confdefs.h. */
c906108c 13199
97bf5e38 13200#define _SYSCALL32
d30c5336
JK
13201/* Needed for new procfs interface on sparc-solaris. */
13202#define _STRUCTURED_PROC 1
97bf5e38 13203#include <sys/procfs.h>
bec39cab
AC
13204int
13205main ()
13206{
97bf5e38 13207psaddr_t avar
bec39cab
AC
13208 ;
13209 return 0;
13210}
13211_ACEOF
81ecdfbb 13212if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13213 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c 13214else
81ecdfbb 13215 bfd_cv_have_sys_procfs_type_psaddr_t=no
bec39cab 13216
c906108c 13217fi
81ecdfbb 13218rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13219fi
13220
97bf5e38 13221 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
bec39cab 13222
81ecdfbb 13223$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
c906108c 13224
97bf5e38 13225 fi
81ecdfbb
RW
13226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
13227$as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
c906108c 13228
81ecdfbb
RW
13229 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prsysent_t in sys/procfs.h" >&5
13230$as_echo_n "checking for prsysent_t in sys/procfs.h... " >&6; }
13231 if test "${bfd_cv_have_sys_procfs_type_prsysent_t+set}" = set; then :
13232 $as_echo_n "(cached) " >&6
c906108c 13233else
81ecdfbb 13234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13235/* end confdefs.h. */
c906108c 13236
97bf5e38 13237#define _SYSCALL32
d30c5336
JK
13238/* Needed for new procfs interface on sparc-solaris. */
13239#define _STRUCTURED_PROC 1
97bf5e38 13240#include <sys/procfs.h>
bec39cab
AC
13241int
13242main ()
13243{
97bf5e38 13244prsysent_t avar
bec39cab
AC
13245 ;
13246 return 0;
13247}
13248_ACEOF
81ecdfbb 13249if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13250 bfd_cv_have_sys_procfs_type_prsysent_t=yes
c906108c 13251else
81ecdfbb 13252 bfd_cv_have_sys_procfs_type_prsysent_t=no
bec39cab 13253
c906108c 13254fi
81ecdfbb 13255rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13256fi
13257
97bf5e38 13258 if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
bec39cab 13259
81ecdfbb 13260$as_echo "#define HAVE_PRSYSENT_T 1" >>confdefs.h
c906108c 13261
97bf5e38 13262 fi
81ecdfbb
RW
13263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prsysent_t" >&5
13264$as_echo "$bfd_cv_have_sys_procfs_type_prsysent_t" >&6; }
c906108c 13265
81ecdfbb
RW
13266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigset_t in sys/procfs.h" >&5
13267$as_echo_n "checking for pr_sigset_t in sys/procfs.h... " >&6; }
13268 if test "${bfd_cv_have_sys_procfs_type_pr_sigset_t+set}" = set; then :
13269 $as_echo_n "(cached) " >&6
c906108c 13270else
81ecdfbb 13271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13272/* end confdefs.h. */
c906108c 13273
97bf5e38 13274#define _SYSCALL32
d30c5336
JK
13275/* Needed for new procfs interface on sparc-solaris. */
13276#define _STRUCTURED_PROC 1
97bf5e38 13277#include <sys/procfs.h>
bec39cab
AC
13278int
13279main ()
13280{
97bf5e38 13281pr_sigset_t avar
bec39cab
AC
13282 ;
13283 return 0;
13284}
13285_ACEOF
81ecdfbb 13286if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13287 bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
c906108c 13288else
81ecdfbb 13289 bfd_cv_have_sys_procfs_type_pr_sigset_t=no
bec39cab 13290
c906108c 13291fi
81ecdfbb 13292rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13293fi
13294
97bf5e38 13295 if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
bec39cab 13296
81ecdfbb 13297$as_echo "#define HAVE_PR_SIGSET_T 1" >>confdefs.h
c906108c 13298
97bf5e38 13299 fi
81ecdfbb
RW
13300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigset_t" >&5
13301$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigset_t" >&6; }
c906108c 13302
81ecdfbb
RW
13303 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigaction64_t in sys/procfs.h" >&5
13304$as_echo_n "checking for pr_sigaction64_t in sys/procfs.h... " >&6; }
13305 if test "${bfd_cv_have_sys_procfs_type_pr_sigaction64_t+set}" = set; then :
13306 $as_echo_n "(cached) " >&6
c906108c 13307else
81ecdfbb 13308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13309/* end confdefs.h. */
c906108c 13310
97bf5e38 13311#define _SYSCALL32
d30c5336
JK
13312/* Needed for new procfs interface on sparc-solaris. */
13313#define _STRUCTURED_PROC 1
97bf5e38 13314#include <sys/procfs.h>
bec39cab
AC
13315int
13316main ()
13317{
97bf5e38 13318pr_sigaction64_t avar
bec39cab
AC
13319 ;
13320 return 0;
13321}
13322_ACEOF
81ecdfbb 13323if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13324 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
c906108c 13325else
81ecdfbb 13326 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
bec39cab 13327
c906108c 13328fi
81ecdfbb 13329rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13330fi
13331
97bf5e38 13332 if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
bec39cab 13333
81ecdfbb 13334$as_echo "#define HAVE_PR_SIGACTION64_T 1" >>confdefs.h
c906108c 13335
97bf5e38 13336 fi
81ecdfbb
RW
13337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&5
13338$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&6; }
97bf5e38 13339
81ecdfbb
RW
13340 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_siginfo64_t in sys/procfs.h" >&5
13341$as_echo_n "checking for pr_siginfo64_t in sys/procfs.h... " >&6; }
13342 if test "${bfd_cv_have_sys_procfs_type_pr_siginfo64_t+set}" = set; then :
13343 $as_echo_n "(cached) " >&6
97bf5e38 13344else
81ecdfbb 13345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13346/* end confdefs.h. */
97bf5e38
MK
13347
13348#define _SYSCALL32
d30c5336
JK
13349/* Needed for new procfs interface on sparc-solaris. */
13350#define _STRUCTURED_PROC 1
97bf5e38 13351#include <sys/procfs.h>
bec39cab
AC
13352int
13353main ()
13354{
97bf5e38 13355pr_siginfo64_t avar
bec39cab
AC
13356 ;
13357 return 0;
13358}
13359_ACEOF
81ecdfbb 13360if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
13361 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
13362else
81ecdfbb 13363 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
bec39cab 13364
97bf5e38 13365fi
81ecdfbb 13366rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 13367fi
c906108c 13368
97bf5e38 13369 if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
bec39cab 13370
81ecdfbb 13371$as_echo "#define HAVE_PR_SIGINFO64_T 1" >>confdefs.h
c906108c 13372
97bf5e38 13373 fi
81ecdfbb
RW
13374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&5
13375$as_echo "$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&6; }
bec39cab
AC
13376
13377
97bf5e38
MK
13378
13379
13380
97bf5e38 13381 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
81ecdfbb
RW
13382 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether prfpregset_t type is broken" >&5
13383$as_echo_n "checking whether prfpregset_t type is broken... " >&6; }
13384 if test "${gdb_cv_prfpregset_t_broken+set}" = set; then :
13385 $as_echo_n "(cached) " >&6
c906108c 13386else
81ecdfbb 13387 if test "$cross_compiling" = yes; then :
97bf5e38 13388 gdb_cv_prfpregset_t_broken=yes
c906108c 13389else
81ecdfbb 13390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13391/* end confdefs.h. */
97bf5e38
MK
13392#include <sys/procfs.h>
13393 int main ()
13394 {
13395 if (sizeof (prfpregset_t) == sizeof (void *))
13396 return 1;
13397 return 0;
13398 }
bec39cab 13399_ACEOF
81ecdfbb 13400if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 13401 gdb_cv_prfpregset_t_broken=no
81ecdfbb
RW
13402else
13403 gdb_cv_prfpregset_t_broken=yes
c906108c 13404fi
81ecdfbb
RW
13405rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13406 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 13407fi
81ecdfbb 13408
c906108c
SS
13409fi
13410
81ecdfbb
RW
13411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_prfpregset_t_broken" >&5
13412$as_echo "$gdb_cv_prfpregset_t_broken" >&6; }
97bf5e38 13413 if test $gdb_cv_prfpregset_t_broken = yes; then
60ca704f 13414
81ecdfbb 13415$as_echo "#define PRFPREGSET_T_BROKEN 1" >>confdefs.h
c906108c 13416
97bf5e38
MK
13417 fi
13418 fi
c906108c 13419fi
c906108c 13420
bc8bcb4b 13421# Check if the compiler supports the `long long' type.
c906108c 13422
81ecdfbb
RW
13423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
13424$as_echo_n "checking for long long support in compiler... " >&6; }
13425if test "${gdb_cv_c_long_long+set}" = set; then :
13426 $as_echo_n "(cached) " >&6
97bf5e38 13427else
81ecdfbb 13428 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13429/* end confdefs.h. */
bc8bcb4b 13430extern long long foo;
bec39cab
AC
13431int
13432main ()
13433{
bc8bcb4b 13434switch (foo & 2) { case 0: return 1; }
bec39cab
AC
13435 ;
13436 return 0;
13437}
13438_ACEOF
81ecdfbb 13439if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
13440 gdb_cv_c_long_long=yes
13441else
81ecdfbb 13442 gdb_cv_c_long_long=no
97bf5e38 13443fi
81ecdfbb 13444rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 13445fi
81ecdfbb
RW
13446{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
13447$as_echo "$gdb_cv_c_long_long" >&6; }
74a0d9f6
JK
13448if test $gdb_cv_c_long_long != yes; then
13449 # libdecnumber requires long long.
13450 as_fn_error "Compiler must support long long for GDB." "$LINENO" 5
97bf5e38
MK
13451fi
13452
bc8bcb4b 13453# Check if the compiler and runtime support printing long longs.
97bf5e38 13454
81ecdfbb
RW
13455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
13456$as_echo_n "checking for long long support in printf... " >&6; }
13457if test "${gdb_cv_printf_has_long_long+set}" = set; then :
13458 $as_echo_n "(cached) " >&6
97bf5e38 13459else
81ecdfbb 13460 if test "$cross_compiling" = yes; then :
97bf5e38
MK
13461 gdb_cv_printf_has_long_long=no
13462else
81ecdfbb 13463 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13464/* end confdefs.h. */
bc8bcb4b
MK
13465$ac_includes_default
13466int
13467main ()
13468{
13469char buf[32];
97bf5e38
MK
13470 long long l = 0;
13471 l = (l << 16) + 0x0123;
13472 l = (l << 16) + 0x4567;
13473 l = (l << 16) + 0x89ab;
13474 l = (l << 16) + 0xcdef;
13475 sprintf (buf, "0x%016llx", l);
13476 return (strcmp ("0x0123456789abcdef", buf));
bc8bcb4b
MK
13477 ;
13478 return 0;
c906108c 13479}
bec39cab 13480_ACEOF
81ecdfbb 13481if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
13482 gdb_cv_printf_has_long_long=yes
13483else
81ecdfbb 13484 gdb_cv_printf_has_long_long=no
97bf5e38 13485fi
81ecdfbb
RW
13486rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13487 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 13488fi
81ecdfbb 13489
97bf5e38 13490fi
81ecdfbb
RW
13491{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
13492$as_echo "$gdb_cv_printf_has_long_long" >&6; }
97bf5e38 13493if test $gdb_cv_printf_has_long_long = yes; then
bc8bcb4b 13494
81ecdfbb 13495$as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
97bf5e38
MK
13496
13497fi
97bf5e38 13498
1a619819
LM
13499# Check if the compiler and runtime support printing decfloats.
13500
81ecdfbb
RW
13501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
13502$as_echo_n "checking for decfloat support in printf... " >&6; }
13503if test "${gdb_cv_printf_has_decfloat+set}" = set; then :
13504 $as_echo_n "(cached) " >&6
1a619819 13505else
81ecdfbb 13506 if test "$cross_compiling" = yes; then :
1a619819
LM
13507 gdb_cv_printf_has_decfloat=no
13508else
81ecdfbb 13509 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1a619819
LM
13510/* end confdefs.h. */
13511$ac_includes_default
13512int
13513main ()
13514{
13515char buf[64];
13516 _Decimal32 d32 = 1.2345df;
13517 _Decimal64 d64 = 1.2345dd;
13518 _Decimal128 d128 = 1.2345dl;
13519 sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
13520 return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
13521 ;
13522 return 0;
13523}
13524_ACEOF
81ecdfbb 13525if ac_fn_c_try_run "$LINENO"; then :
1a619819
LM
13526 gdb_cv_printf_has_decfloat=yes
13527else
81ecdfbb 13528 gdb_cv_printf_has_decfloat=no
1a619819 13529fi
81ecdfbb
RW
13530rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13531 conftest.$ac_objext conftest.beam conftest.$ac_ext
1a619819 13532fi
81ecdfbb 13533
1a619819 13534fi
81ecdfbb
RW
13535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
13536$as_echo "$gdb_cv_printf_has_decfloat" >&6; }
1a619819
LM
13537if test $gdb_cv_printf_has_decfloat = yes; then
13538
81ecdfbb 13539$as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
1a619819
LM
13540
13541fi
13542
bc8bcb4b
MK
13543# Check if the compiler supports the `long double' type. We can't use
13544# AC_C_LONG_DOUBLE because that one does additional checks on the
13545# constants defined in <float.h> that fail on some systems,
13546# e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
97bf5e38 13547
81ecdfbb
RW
13548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
13549$as_echo_n "checking for long double support in compiler... " >&6; }
13550if test "${gdb_cv_c_long_double+set}" = set; then :
13551 $as_echo_n "(cached) " >&6
97bf5e38 13552else
81ecdfbb 13553 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13554/* end confdefs.h. */
97bf5e38 13555long double foo;
bec39cab 13556_ACEOF
81ecdfbb 13557if ac_fn_c_try_compile "$LINENO"; then :
bc8bcb4b 13558 gdb_cv_c_long_double=yes
97bf5e38 13559else
81ecdfbb 13560 gdb_cv_c_long_double=no
97bf5e38 13561fi
81ecdfbb 13562rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 13563fi
81ecdfbb
RW
13564{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
13565$as_echo "$gdb_cv_c_long_double" >&6; }
bc8bcb4b 13566if test $gdb_cv_c_long_double = yes; then
c906108c 13567
81ecdfbb 13568$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
13569
13570fi
13571
bc8bcb4b 13572# Check if the compiler and runtime support printing long doubles.
97bf5e38 13573
81ecdfbb
RW
13574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
13575$as_echo_n "checking for long double support in printf... " >&6; }
13576if test "${gdb_cv_printf_has_long_double+set}" = set; then :
13577 $as_echo_n "(cached) " >&6
97bf5e38 13578else
81ecdfbb 13579 if test "$cross_compiling" = yes; then :
97bf5e38
MK
13580 gdb_cv_printf_has_long_double=no
13581else
81ecdfbb 13582 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13583/* end confdefs.h. */
bc8bcb4b
MK
13584$ac_includes_default
13585int
13586main ()
13587{
13588char buf[16];
97bf5e38
MK
13589 long double f = 3.141592653;
13590 sprintf (buf, "%Lg", f);
13591 return (strncmp ("3.14159", buf, 7));
bc8bcb4b
MK
13592 ;
13593 return 0;
97bf5e38 13594}
bec39cab 13595_ACEOF
81ecdfbb 13596if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 13597 gdb_cv_printf_has_long_double=yes
c906108c 13598else
81ecdfbb 13599 gdb_cv_printf_has_long_double=no
c906108c 13600fi
81ecdfbb
RW
13601rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13602 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 13603fi
81ecdfbb 13604
c906108c 13605fi
81ecdfbb
RW
13606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
13607$as_echo "$gdb_cv_printf_has_long_double" >&6; }
97bf5e38 13608if test $gdb_cv_printf_has_long_double = yes; then
bc8bcb4b 13609
81ecdfbb 13610$as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
13611
13612fi
97bf5e38 13613
bc8bcb4b 13614# Check if the compiler and runtime support scanning long doubles.
97bf5e38 13615
81ecdfbb
RW
13616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
13617$as_echo_n "checking for long double support in scanf... " >&6; }
13618if test "${gdb_cv_scanf_has_long_double+set}" = set; then :
13619 $as_echo_n "(cached) " >&6
97bf5e38 13620else
81ecdfbb 13621 if test "$cross_compiling" = yes; then :
97bf5e38
MK
13622 gdb_cv_scanf_has_long_double=no
13623else
81ecdfbb 13624 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13625/* end confdefs.h. */
bc8bcb4b
MK
13626#include <stdio.h>
13627int
13628main ()
13629{
13630char *buf = "3.141592653";
97bf5e38
MK
13631 long double f = 0;
13632 sscanf (buf, "%Lg", &f);
13633 return !(f > 3.14159 && f < 3.14160);
bc8bcb4b
MK
13634 ;
13635 return 0;
97bf5e38 13636}
bec39cab 13637_ACEOF
81ecdfbb 13638if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
13639 gdb_cv_scanf_has_long_double=yes
13640else
81ecdfbb 13641 gdb_cv_scanf_has_long_double=no
97bf5e38 13642fi
81ecdfbb
RW
13643rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13644 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 13645fi
81ecdfbb 13646
c906108c 13647fi
81ecdfbb
RW
13648{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
13649$as_echo "$gdb_cv_scanf_has_long_double" >&6; }
97bf5e38 13650if test $gdb_cv_scanf_has_long_double = yes; then
bc8bcb4b 13651
81ecdfbb 13652$as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
13653
13654fi
c906108c 13655
438013df
AO
13656case ${host_os} in
13657aix*)
81ecdfbb
RW
13658 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
13659$as_echo_n "checking for -bbigtoc option... " >&6; }
13660if test "${gdb_cv_bigtoc+set}" = set; then :
13661 $as_echo_n "(cached) " >&6
438013df 13662else
bec39cab 13663
438013df
AO
13664 SAVE_LDFLAGS=$LDFLAGS
13665
13666 case $GCC in
13667 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
13668 *) gdb_cv_bigtoc=-bbigtoc ;;
13669 esac
13670
13671 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
81ecdfbb 13672 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13673/* end confdefs.h. */
438013df 13674
bec39cab
AC
13675int
13676main ()
13677{
438013df 13678int i;
bec39cab
AC
13679 ;
13680 return 0;
13681}
13682_ACEOF
81ecdfbb 13683if ac_fn_c_try_link "$LINENO"; then :
bec39cab 13684
81ecdfbb
RW
13685else
13686 gdb_cv_bigtoc=
438013df 13687fi
81ecdfbb
RW
13688rm -f core conftest.err conftest.$ac_objext \
13689 conftest$ac_exeext conftest.$ac_ext
ec76baa5 13690 LDFLAGS="${SAVE_LDFLAGS}"
438013df 13691
bec39cab 13692fi
81ecdfbb
RW
13693{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
13694$as_echo "$gdb_cv_bigtoc" >&6; }
438013df
AO
13695 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
13696 ;;
13697esac
13698
38f6b338 13699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
f6528abd 13700$as_echo_n "checking for the dynamic export flag... " >&6; }
38f6b338
JK
13701dynamic_list=false
13702if test "${gdb_native}" = yes; then
13703 # The dynamically loaded libthread_db needs access to symbols in the gdb
13704 # executable. Older GNU ld supports --export-dynamic but --dynamic-list
13705 # may not be supported there.
13706 old_LDFLAGS="$LDFLAGS"
13707 # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
13708 RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
13709 LDFLAGS="$LDFLAGS $RDYNAMIC"
13710 if test "${have_libpython}" = no; then
13711 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f6528abd
JK
13712/* end confdefs.h. */
13713
13714int
13715main ()
13716{
13717
13718 ;
13719 return 0;
13720}
13721_ACEOF
13722if ac_fn_c_try_link "$LINENO"; then :
3bebe2f2
JK
13723 dynamic_list=true
13724fi
13725rm -f core conftest.err conftest.$ac_objext \
13726 conftest$ac_exeext conftest.$ac_ext
38f6b338
JK
13727 else
13728 # Workaround http://bugs.python.org/issue4434 where static
13729 # libpythonX.Y.a would get its symbols required for
13730 # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
13731 # Problem does not happen for the recommended libpythonX.Y.so linkage.
a4a1c157
PA
13732
13733 # Note the workaround for Python
13734 # http://bugs.python.org/issue10112 earlier has removed
13735 # -export-dynamic from PYTHON_LIBS. That's exactly what we want
13736 # here too, as otherwise it'd make this -Wl,--dynamic-list test
13737 # always pass.
38f6b338
JK
13738 old_CFLAGS="$CFLAGS"
13739 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
8c1fb155
JK
13740 old_LIBS="$LIBS"
13741 LIBS="$LIBS $PYTHON_LIBS"
1b4f615e
PA
13742 old_CPPFLAGS="$CPPFLAGS"
13743 CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
38f6b338 13744 if test "$cross_compiling" = yes; then :
3bebe2f2 13745 true
f6528abd 13746else
3bebe2f2
JK
13747 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13748/* end confdefs.h. */
1b4f615e 13749#include "Python.h"
3bebe2f2
JK
13750int
13751main ()
13752{
13753int err;
38f6b338
JK
13754 Py_Initialize ();
13755 err = PyRun_SimpleString ("import itertools\n");
13756 Py_Finalize ();
13757 return err == 0 ? 0 : 1;
3bebe2f2
JK
13758 ;
13759 return 0;
13760}
13761_ACEOF
13762if ac_fn_c_try_run "$LINENO"; then :
13763 dynamic_list=true
13764fi
13765rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13766 conftest.$ac_objext conftest.beam conftest.$ac_ext
13767fi
13768
8c1fb155 13769 LIBS="$old_LIBS"
38f6b338 13770 CFLAGS="$old_CFLAGS"
1b4f615e 13771 CPPFLAGS="$old_CPPFLAGS"
38f6b338
JK
13772 fi
13773 LDFLAGS="$old_LDFLAGS"
13774fi
13775if $dynamic_list; then
13776 found="-Wl,--dynamic-list"
13777 RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
f6528abd 13778else
38f6b338
JK
13779 found="-rdynamic"
13780 RDYNAMIC="-rdynamic"
f6528abd 13781fi
f6528abd 13782
38f6b338 13783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
f6528abd 13784$as_echo "$found" >&6; }
0407b3f1 13785
f6528abd 13786
0407b3f1 13787if test ${build} = ${host} -a ${host} = ${target} ; then
c906108c 13788 case ${host_os} in
c906108c 13789 solaris*)
d92419e5
JB
13790 # See if thread_db library is around for Solaris thread debugging.
13791 # Note that we must explicitly test for version 1 of the library
13792 # because version 0 (present on Solaris 2.4 or earlier) doesn't have
13793 # the same API.
81ecdfbb
RW
13794 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris thread debugging library" >&5
13795$as_echo_n "checking for Solaris thread debugging library... " >&6; }
c906108c 13796 if test -f /usr/lib/libthread_db.so.1 ; then
81ecdfbb
RW
13797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13798$as_echo "yes" >&6; }
60ca704f 13799
81ecdfbb 13800$as_echo "#define HAVE_THREAD_DB_LIB 1" >>confdefs.h
c906108c 13801
3483b318 13802 CONFIG_OBS="${CONFIG_OBS} sol-thread.o"
c906108c 13803 CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
81ecdfbb
RW
13804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
13805$as_echo_n "checking for dlopen in -ldl... " >&6; }
13806if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
13807 $as_echo_n "(cached) " >&6
c906108c 13808else
bec39cab 13809 ac_check_lib_save_LIBS=$LIBS
c906108c 13810LIBS="-ldl $LIBS"
81ecdfbb 13811cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
13812/* end confdefs.h. */
13813
81ecdfbb
RW
13814/* Override any GCC internal prototype to avoid an error.
13815 Use char because int might match the return type of a GCC
13816 builtin and then its argument prototype would still apply. */
bec39cab
AC
13817#ifdef __cplusplus
13818extern "C"
13819#endif
bec39cab
AC
13820char dlopen ();
13821int
13822main ()
13823{
81ecdfbb 13824return dlopen ();
bec39cab
AC
13825 ;
13826 return 0;
13827}
13828_ACEOF
81ecdfbb 13829if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
13830 ac_cv_lib_dl_dlopen=yes
13831else
81ecdfbb 13832 ac_cv_lib_dl_dlopen=no
bec39cab 13833fi
81ecdfbb
RW
13834rm -f core conftest.err conftest.$ac_objext \
13835 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
13836LIBS=$ac_check_lib_save_LIBS
13837fi
81ecdfbb
RW
13838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
13839$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
13840if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
bec39cab
AC
13841 cat >>confdefs.h <<_ACEOF
13842#define HAVE_LIBDL 1
13843_ACEOF
c906108c
SS
13844
13845 LIBS="-ldl $LIBS"
13846
c906108c
SS
13847fi
13848
f6528abd 13849 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} $RDYNAMIC"
c906108c
SS
13850 # Sun randomly tweaked the prototypes in <proc_service.h>
13851 # at one point.
81ecdfbb
RW
13852 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if <proc_service.h> is old" >&5
13853$as_echo_n "checking if <proc_service.h> is old... " >&6; }
13854 if test "${gdb_cv_proc_service_is_old+set}" = set; then :
13855 $as_echo_n "(cached) " >&6
c906108c 13856else
bec39cab 13857
81ecdfbb 13858 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13859/* end confdefs.h. */
c906108c
SS
13860
13861 #include <proc_service.h>
13862 ps_err_e ps_pdwrite
13863 (struct ps_prochandle*, psaddr_t, const void*, size_t);
c906108c 13864
bec39cab
AC
13865int
13866main ()
13867{
13868
13869 ;
13870 return 0;
13871}
13872_ACEOF
81ecdfbb 13873if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
13874 gdb_cv_proc_service_is_old=no
13875else
81ecdfbb 13876 gdb_cv_proc_service_is_old=yes
c906108c 13877fi
81ecdfbb 13878rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 13879
c906108c
SS
13880fi
13881
81ecdfbb
RW
13882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_proc_service_is_old" >&5
13883$as_echo "$gdb_cv_proc_service_is_old" >&6; }
c906108c 13884 if test $gdb_cv_proc_service_is_old = yes; then
60ca704f 13885
81ecdfbb 13886$as_echo "#define PROC_SERVICE_IS_OLD 1" >>confdefs.h
c906108c
SS
13887
13888 fi
13889 else
81ecdfbb
RW
13890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13891$as_echo "no" >&6; }
c906108c
SS
13892 fi
13893 ;;
d92419e5 13894 aix*)
81ecdfbb
RW
13895 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
13896$as_echo_n "checking for AiX thread debugging library... " >&6; }
13897 if test "${gdb_cv_have_aix_thread_debug+set}" = set; then :
13898 $as_echo_n "(cached) " >&6
bec39cab 13899else
81ecdfbb 13900 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13901/* end confdefs.h. */
d92419e5 13902#include <sys/pthdebug.h>
bec39cab
AC
13903int
13904main ()
13905{
d92419e5
JB
13906#ifndef PTHDB_VERSION_3
13907 #error
13908 #endif
bec39cab
AC
13909 ;
13910 return 0;
13911}
13912_ACEOF
81ecdfbb 13913if ac_fn_c_try_compile "$LINENO"; then :
d92419e5
JB
13914 gdb_cv_have_aix_thread_debug=yes
13915else
81ecdfbb 13916 gdb_cv_have_aix_thread_debug=no
d92419e5 13917fi
81ecdfbb 13918rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d92419e5
JB
13919fi
13920
81ecdfbb
RW
13921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
13922$as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
d92419e5
JB
13923 if test $gdb_cv_have_aix_thread_debug = yes; then
13924 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
3483b318 13925 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
7f533142 13926 LIBS="$LIBS -lpthdebug"
d645e32e
JB
13927
13928 # Older versions of AIX do not provide the declaration for
13929 # the getthrds function (it appears that it was introduced
13930 # with AIX 6.x).
13931 ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h>
13932"
13933if test "x$ac_cv_have_decl_getthrds" = x""yes; then :
13934 ac_have_decl=1
13935else
13936 ac_have_decl=0
13937fi
13938
13939cat >>confdefs.h <<_ACEOF
13940#define HAVE_DECL_GETTHRDS $ac_have_decl
13941_ACEOF
13942
d92419e5
JB
13943 fi
13944 ;;
c906108c 13945 esac
bec39cab 13946
c906108c
SS
13947fi
13948
3f47be5c 13949if test "x$ac_cv_header_thread_db_h" = "xyes"; then
81ecdfbb
RW
13950 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
13951$as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
13952if test "${gdb_cv_thread_db_h_has_td_notalloc+set}" = set; then :
13953 $as_echo_n "(cached) " >&6
bec39cab 13954else
81ecdfbb 13955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13956/* end confdefs.h. */
3f47be5c 13957#include <thread_db.h>
bec39cab
AC
13958int
13959main ()
13960{
3f47be5c 13961int i = TD_NOTALLOC;
bec39cab
AC
13962 ;
13963 return 0;
13964}
13965_ACEOF
81ecdfbb 13966if ac_fn_c_try_compile "$LINENO"; then :
3f47be5c
EZ
13967 gdb_cv_thread_db_h_has_td_notalloc=yes
13968else
81ecdfbb 13969 gdb_cv_thread_db_h_has_td_notalloc=no
bec39cab 13970
3f47be5c 13971fi
81ecdfbb 13972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3f47be5c 13973
bec39cab 13974fi
81ecdfbb
RW
13975{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
13976$as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
13977 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
13978$as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
13979if test "${gdb_cv_thread_db_h_has_td_version+set}" = set; then :
13980 $as_echo_n "(cached) " >&6
59f80f10 13981else
81ecdfbb 13982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
13983/* end confdefs.h. */
13984#include <thread_db.h>
13985int
13986main ()
13987{
13988int i = TD_VERSION;
13989 ;
13990 return 0;
13991}
13992_ACEOF
81ecdfbb 13993if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
13994 gdb_cv_thread_db_h_has_td_version=yes
13995else
81ecdfbb 13996 gdb_cv_thread_db_h_has_td_version=no
59f80f10
DJ
13997
13998fi
81ecdfbb 13999rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
14000
14001fi
81ecdfbb
RW
14002{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
14003$as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
14004 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
14005$as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
14006if test "${gdb_cv_thread_db_h_has_td_notls+set}" = set; then :
14007 $as_echo_n "(cached) " >&6
59f80f10 14008else
81ecdfbb 14009 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
14010/* end confdefs.h. */
14011#include <thread_db.h>
14012int
14013main ()
14014{
14015int i = TD_NOTLS;
14016 ;
14017 return 0;
14018}
14019_ACEOF
81ecdfbb 14020if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
14021 gdb_cv_thread_db_h_has_td_notls=yes
14022else
81ecdfbb 14023 gdb_cv_thread_db_h_has_td_notls=no
59f80f10
DJ
14024
14025fi
81ecdfbb 14026rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
14027
14028fi
81ecdfbb
RW
14029{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
14030$as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
3f47be5c
EZ
14031fi
14032if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
bec39cab 14033
81ecdfbb 14034$as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
3f47be5c 14035
59f80f10
DJ
14036fi
14037if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
14038
81ecdfbb 14039$as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
59f80f10
DJ
14040
14041fi
14042if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
14043
81ecdfbb 14044$as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
59f80f10 14045
3f47be5c
EZ
14046fi
14047
81ecdfbb
RW
14048ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
14049"
14050if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = x""yes; then :
14051 ac_have_decl=1
10568435 14052else
81ecdfbb 14053 ac_have_decl=0
10568435 14054fi
10568435
JK
14055
14056cat >>confdefs.h <<_ACEOF
81ecdfbb 14057#define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
10568435
JK
14058_ACEOF
14059
14060
81ecdfbb
RW
14061if test "$cross_compiling" = yes; then :
14062 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
14063/* end confdefs.h. */
14064#include <sys/personality.h>
14065int
14066main ()
14067{
14068
14069# if !HAVE_DECL_ADDR_NO_RANDOMIZE
14070# define ADDR_NO_RANDOMIZE 0x0040000
14071# endif
14072 /* Test the flag could be set and stays set. */
14073 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
14074 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
14075 return 1
14076 ;
14077 return 0;
14078}
14079_ACEOF
81ecdfbb 14080if ac_fn_c_try_link "$LINENO"; then :
10568435
JK
14081 have_personality=true
14082else
81ecdfbb 14083 have_personality=false
10568435 14084fi
81ecdfbb
RW
14085rm -f core conftest.err conftest.$ac_objext \
14086 conftest$ac_exeext conftest.$ac_ext
10568435 14087else
81ecdfbb 14088 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
14089/* end confdefs.h. */
14090#include <sys/personality.h>
14091int
14092main ()
14093{
14094
14095# if !HAVE_DECL_ADDR_NO_RANDOMIZE
14096# define ADDR_NO_RANDOMIZE 0x0040000
14097# endif
14098 /* Test the flag could be set and stays set. */
14099 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
14100 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
14101 return 1
14102 ;
14103 return 0;
14104}
14105_ACEOF
81ecdfbb 14106if ac_fn_c_try_run "$LINENO"; then :
10568435
JK
14107 have_personality=true
14108else
81ecdfbb 14109 have_personality=false
10568435 14110fi
81ecdfbb
RW
14111rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14112 conftest.$ac_objext conftest.beam conftest.$ac_ext
10568435 14113fi
81ecdfbb 14114
10568435
JK
14115if $have_personality
14116then
14117
81ecdfbb 14118$as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
10568435
JK
14119
14120fi
14121
e655c1a2
PA
14122case $host_os in
14123 go32* | *djgpp*)
14124 gdbinit=gdb.ini
14125 ;;
14126 *)
14127 gdbinit=.gdbinit
14128 ;;
14129esac
14130
14131cat >>confdefs.h <<_ACEOF
14132#define GDBINIT "$gdbinit"
14133_ACEOF
14134
14135
fb40c209 14136
f83d8a90
DE
14137# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
14138# except that the argument to --with-sysroot is optional.
14139# --with-sysroot (or --with-sysroot=yes) sets the default sysroot path.
14140if test "x$with_sysroot" = xyes; then
14141 with_sysroot="${exec_prefix}/${target_alias}/sys-root"
14142fi
bec39cab 14143
81ecdfbb
RW
14144# Check whether --with-sysroot was given.
14145if test "${with_sysroot+set}" = set; then :
f83d8a90
DE
14146 withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval
14147else
14148 TARGET_SYSTEM_ROOT=
14149fi
030292b7 14150
030292b7 14151
f83d8a90
DE
14152 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
14153 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14154 ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT`
14155 ac_define_dir=`eval echo $ac_define_dir`
030292b7 14156
f83d8a90
DE
14157cat >>confdefs.h <<_ACEOF
14158#define TARGET_SYSTEM_ROOT "$ac_define_dir"
14159_ACEOF
bec39cab 14160
030292b7 14161
b14b1491 14162
f83d8a90
DE
14163
14164 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
14165 if test "x$prefix" = xNONE; then
14166 test_prefix=/usr/local
14167 else
14168 test_prefix=$prefix
14169 fi
14170 else
14171 test_prefix=$exec_prefix
14172 fi
14173 value=0
14174 case ${ac_define_dir} in
14175 "${test_prefix}"|"${test_prefix}/"*|\
14176 '${exec_prefix}'|'${exec_prefix}/'*)
14177 value=1
14178 ;;
14179 esac
14180
14181cat >>confdefs.h <<_ACEOF
14182#define TARGET_SYSTEM_ROOT_RELOCATABLE $value
14183_ACEOF
030292b7
DJ
14184
14185
14186
16e7150e 14187
16e7150e 14188
81ecdfbb
RW
14189# Check whether --with-system-gdbinit was given.
14190if test "${with_system_gdbinit+set}" = set; then :
14191 withval=$with_system_gdbinit;
b14b1491
TT
14192 SYSTEM_GDBINIT=$withval
14193else
14194 SYSTEM_GDBINIT=
81ecdfbb
RW
14195fi
14196
16e7150e
JG
14197
14198 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
14199 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 14200 ac_define_dir=`eval echo $SYSTEM_GDBINIT`
16e7150e
JG
14201 ac_define_dir=`eval echo $ac_define_dir`
14202
14203cat >>confdefs.h <<_ACEOF
14204#define SYSTEM_GDBINIT "$ac_define_dir"
14205_ACEOF
14206
14207
14208
0c4a4063 14209
b14b1491
TT
14210 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
14211 if test "x$prefix" = xNONE; then
14212 test_prefix=/usr/local
14213 else
14214 test_prefix=$prefix
14215 fi
14216 else
14217 test_prefix=$exec_prefix
14218 fi
14219 value=0
14220 case ${ac_define_dir} in
14221 "${test_prefix}"|"${test_prefix}/"*|\
14222 '${exec_prefix}'|'${exec_prefix}/'*)
14223 value=1
14224 ;;
14225 esac
16e7150e 14226
b14b1491
TT
14227cat >>confdefs.h <<_ACEOF
14228#define SYSTEM_GDBINIT_RELOCATABLE $value
16e7150e
JG
14229_ACEOF
14230
b14b1491 14231
16e7150e 14232
0c4a4063 14233
b835bb52 14234
9b30624b 14235
81ecdfbb
RW
14236# Check whether --enable-werror was given.
14237if test "${enable_werror+set}" = set; then :
14238 enableval=$enable_werror; case "${enableval}" in
094a342e
MK
14239 yes | y) ERROR_ON_WARNING="yes" ;;
14240 no | n) ERROR_ON_WARNING="no" ;;
81ecdfbb 14241 *) as_fn_error "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
094a342e 14242 esac
81ecdfbb
RW
14243fi
14244
094a342e 14245
9a084706
PA
14246# Enable -Werror by default when using gcc. Turn it off for releases.
14247if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
094a342e
MK
14248 ERROR_ON_WARNING=yes
14249fi
14250
14251WERROR_CFLAGS=""
14252if test "${ERROR_ON_WARNING}" = yes ; then
14253 WERROR_CFLAGS="-Werror"
14254fi
14255
3bc3d82a 14256# These options work in either C or C++ modes.
aac331e4 14257build_warnings="-Wall -Wpointer-arith \
1cb5e2a4 14258-Wno-unused -Wunused-value -Wunused-function \
aac331e4 14259-Wno-switch -Wno-char-subscripts \
305450ed 14260-Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable"
a3b362c4 14261
3bc3d82a
PA
14262# Now add in C and C++ specific options, depending on mode.
14263if test "$enable_build_with_cxx" = "yes"; then
14264 build_warnings="$build_warnings -Wno-sign-compare -Wno-write-strings \
14265-Wno-narrowing"
14266else
aac331e4
PA
14267 build_warnings="$build_warnings -Wpointer-sign -Wmissing-prototypes \
14268-Wdeclaration-after-statement -Wmissing-parameter-type \
14269-Wold-style-declaration -Wold-style-definition"
3bc3d82a
PA
14270fi
14271
3526781e
DJ
14272# Enable -Wno-format by default when using gcc on mingw since many
14273# GCC versions complain about %I64.
14274case "${host}" in
14275 *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;;
d3685d60 14276 *) build_warnings="$build_warnings -Wformat-nonliteral" ;;
3526781e
DJ
14277esac
14278
81ecdfbb
RW
14279# Check whether --enable-build-warnings was given.
14280if test "${enable_build_warnings+set}" = set; then :
14281 enableval=$enable_build_warnings; case "${enableval}" in
c906108c
SS
14282 yes) ;;
14283 no) build_warnings="-w";;
14284 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
14285 build_warnings="${build_warnings} ${t}";;
14286 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
14287 build_warnings="${t} ${build_warnings}";;
14288 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
14289esac
d4f3574e 14290if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 14291 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 14292fi
81ecdfbb
RW
14293fi
14294# Check whether --enable-gdb-build-warnings was given.
14295if test "${enable_gdb_build_warnings+set}" = set; then :
14296 enableval=$enable_gdb_build_warnings; case "${enableval}" in
3b851bce
AC
14297 yes) ;;
14298 no) build_warnings="-w";;
14299 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
14300 build_warnings="${build_warnings} ${t}";;
14301 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
14302 build_warnings="${t} ${build_warnings}";;
14303 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
14304esac
14305if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
14306 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
14307fi
81ecdfbb 14308fi
3bc3d82a
PA
14309
14310# The set of warnings supported by a C++ compiler is not the same as
14311# of the C compiler.
14312if test "$enable_build_with_cxx" = "yes"; then
14313 ac_ext=cpp
14314ac_cpp='$CXXCPP $CPPFLAGS'
14315ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14316ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14317ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14318
14319fi
14320
81ecdfbb 14321WARN_CFLAGS=""
c906108c
SS
14322if test "x${build_warnings}" != x -a "x$GCC" = xyes
14323then
81ecdfbb
RW
14324 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
14325$as_echo_n "checking compiler warning flags... " >&6; }
746a987d
AC
14326 # Separate out the -Werror flag as some files just cannot be
14327 # compiled with it enabled.
14328 for w in ${build_warnings}; do
7544db95
PA
14329 # GCC does not complain about -Wno-unknown-warning. Invert
14330 # and test -Wunknown-warning instead.
14331 case $w in
14332 -Wno-*)
14333 wtest=`echo $w | sed 's/-Wno-/-W/g'` ;;
14334 *)
14335 wtest=$w ;;
14336 esac
14337
746a987d
AC
14338 case $w in
14339 -Werr*) WERROR_CFLAGS=-Werror ;;
3bc3d82a
PA
14340 *)
14341 # Check whether GCC accepts it.
4536bbc6 14342 saved_CFLAGS="$CFLAGS"
7544db95 14343 CFLAGS="$CFLAGS $wtest"
3bc3d82a 14344 saved_CXXFLAGS="$CXXFLAGS"
7544db95 14345 CXXFLAGS="$CXXFLAGS $wtest"
54019719 14346 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14347/* end confdefs.h. */
4536bbc6 14348
bec39cab
AC
14349int
14350main ()
14351{
4536bbc6 14352
bec39cab
AC
14353 ;
14354 return 0;
14355}
14356_ACEOF
3bc3d82a 14357if ac_fn_cxx_try_compile "$LINENO"; then :
4536bbc6 14358 WARN_CFLAGS="${WARN_CFLAGS} $w"
4536bbc6 14359fi
81ecdfbb 14360rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4536bbc6 14361 CFLAGS="$saved_CFLAGS"
3bc3d82a 14362 CXXFLAGS="$saved_CXXFLAGS"
746a987d
AC
14363 esac
14364 done
81ecdfbb
RW
14365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
14366$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
c906108c
SS
14367fi
14368
14369
104c1213 14370
3bc3d82a
PA
14371if test "$enable_build_with_cxx" = "yes"; then
14372 ac_ext=c
14373ac_cpp='$CPP $CPPFLAGS'
14374ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14375ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14376ac_compiler_gnu=$ac_cv_c_compiler_gnu
14377
14378fi
14379
b835bb52 14380
7a292a7a 14381# In the Cygwin environment, we need some additional flags.
81ecdfbb
RW
14382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
14383$as_echo_n "checking for cygwin... " >&6; }
14384if test "${gdb_cv_os_cygwin+set}" = set; then :
14385 $as_echo_n "(cached) " >&6
bec39cab 14386else
81ecdfbb 14387 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14388/* end confdefs.h. */
7a292a7a
SS
14389
14390#if defined (__CYGWIN__) || defined (__CYGWIN32__)
14391lose
14392#endif
bec39cab 14393_ACEOF
7a292a7a 14394if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
92a021de 14395 $EGREP "^lose$" >/dev/null 2>&1; then :
7a292a7a
SS
14396 gdb_cv_os_cygwin=yes
14397else
7a292a7a
SS
14398 gdb_cv_os_cygwin=no
14399fi
14400rm -f conftest*
14401
14402fi
81ecdfbb
RW
14403{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
14404$as_echo "$gdb_cv_os_cygwin" >&6; }
7a292a7a 14405
aff38e61 14406
3eb25fda 14407SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
aff38e61 14408case ${host} in
95cbc983
AC
14409 *go32* ) SER_HARDWIRE=ser-go32.o ;;
14410 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
0ea3f30e 14411 *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
aff38e61
AC
14412esac
14413
14414
cd0fc7c3
SS
14415# libreadline needs libuser32.a in a cygwin environment
14416WIN32LIBS=
14417if test x$gdb_cv_os_cygwin = xyes; then
c5394b80
JM
14418 WIN32LIBS="-luser32"
14419 case "${target}" in
14420 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
14421 ;;
14422 esac
cd0fc7c3 14423fi
c906108c 14424
b4505029
MM
14425# The ser-tcp.c module requires sockets.
14426case ${host} in
14427 *mingw32*)
14428
81ecdfbb 14429$as_echo "#define USE_WIN32API 1" >>confdefs.h
b4505029
MM
14430
14431 WIN32LIBS="$WIN32LIBS -lws2_32"
14432 ;;
14433esac
14434
7a292a7a 14435
31d99776 14436# Add ELF support to GDB, but only if BFD includes ELF support.
def63ff0
TT
14437
14438 OLD_CFLAGS=$CFLAGS
14439 OLD_LDFLAGS=$LDFLAGS
14440 OLD_LIBS=$LIBS
14441 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
14442 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
14443 # always want our bfd.
14444 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
5a2d4533
L
14445 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
14446 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
def63ff0 14447 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
711a72d3 14448 LIBS="-lbfd -liberty -lz $intl $LIBS"
def63ff0 14449 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
81ecdfbb
RW
14450$as_echo_n "checking for ELF support in BFD... " >&6; }
14451if test "${gdb_cv_var_elf+set}" = set; then :
14452 $as_echo_n "(cached) " >&6
31d99776 14453else
81ecdfbb 14454 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31d99776
DJ
14455/* end confdefs.h. */
14456#include <stdlib.h>
def63ff0
TT
14457 #include "bfd.h"
14458 #include "elf-bfd.h"
31d99776
DJ
14459
14460int
14461main ()
14462{
def63ff0 14463return bfd_get_elf_phdr_upper_bound (NULL);
31d99776
DJ
14464 ;
14465 return 0;
14466}
14467_ACEOF
81ecdfbb 14468if ac_fn_c_try_link "$LINENO"; then :
31d99776
DJ
14469 gdb_cv_var_elf=yes
14470else
81ecdfbb 14471 gdb_cv_var_elf=no
31d99776 14472fi
81ecdfbb
RW
14473rm -f core conftest.err conftest.$ac_objext \
14474 conftest$ac_exeext conftest.$ac_ext
31d99776 14475fi
81ecdfbb
RW
14476{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
14477$as_echo "$gdb_cv_var_elf" >&6; }
def63ff0
TT
14478 CFLAGS=$OLD_CFLAGS
14479 LDFLAGS=$OLD_LDFLAGS
14480 LIBS=$OLD_LIBS
31d99776 14481if test $gdb_cv_var_elf = yes; then
d4777acb 14482 CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o dtrace-probe.o"
31d99776 14483
81ecdfbb 14484$as_echo "#define HAVE_ELF 1" >>confdefs.h
31d99776 14485
075ff26d
JK
14486 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
14487 if test "$plugins" = "yes"; then
a48b32c0
L
14488 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
14489$as_echo_n "checking for library containing dlopen... " >&6; }
14490if test "${ac_cv_search_dlopen+set}" = set; then :
14491 $as_echo_n "(cached) " >&6
14492else
14493 ac_func_search_save_LIBS=$LIBS
14494cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14495/* end confdefs.h. */
14496
14497/* Override any GCC internal prototype to avoid an error.
14498 Use char because int might match the return type of a GCC
14499 builtin and then its argument prototype would still apply. */
14500#ifdef __cplusplus
14501extern "C"
14502#endif
14503char dlopen ();
14504int
14505main ()
14506{
14507return dlopen ();
14508 ;
14509 return 0;
14510}
14511_ACEOF
14512for ac_lib in '' dl; do
14513 if test -z "$ac_lib"; then
14514 ac_res="none required"
14515 else
14516 ac_res=-l$ac_lib
14517 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
14518 fi
14519 if ac_fn_c_try_link "$LINENO"; then :
14520 ac_cv_search_dlopen=$ac_res
14521fi
14522rm -f core conftest.err conftest.$ac_objext \
14523 conftest$ac_exeext
14524 if test "${ac_cv_search_dlopen+set}" = set; then :
14525 break
14526fi
14527done
14528if test "${ac_cv_search_dlopen+set}" = set; then :
14529
14530else
14531 ac_cv_search_dlopen=no
14532fi
14533rm conftest.$ac_ext
14534LIBS=$ac_func_search_save_LIBS
14535fi
14536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
14537$as_echo "$ac_cv_search_dlopen" >&6; }
14538ac_res=$ac_cv_search_dlopen
14539if test "$ac_res" != no; then :
14540 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14541
14542fi
14543
075ff26d 14544 fi
31d99776 14545fi
31d99776 14546
4f05add4
TT
14547# Add macho support to GDB, but only if BFD includes it.
14548
14549 OLD_CFLAGS=$CFLAGS
14550 OLD_LDFLAGS=$LDFLAGS
14551 OLD_LIBS=$LIBS
14552 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
14553 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
14554 # always want our bfd.
14555 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
5a2d4533
L
14556 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
14557 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
4f05add4 14558 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
711a72d3 14559 LIBS="-lbfd -liberty -lz $intl $LIBS"
4f05add4
TT
14560 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5
14561$as_echo_n "checking for Mach-O support in BFD... " >&6; }
14562if test "${gdb_cv_var_macho+set}" = set; then :
14563 $as_echo_n "(cached) " >&6
14564else
14565 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14566/* end confdefs.h. */
14567#include <stdlib.h>
14568 #include "bfd.h"
14569 #include "mach-o.h"
14570
14571int
14572main ()
14573{
14574return bfd_mach_o_lookup_command (NULL, 0, NULL);
14575 ;
14576 return 0;
14577}
14578_ACEOF
14579if ac_fn_c_try_link "$LINENO"; then :
14580 gdb_cv_var_macho=yes
14581else
14582 gdb_cv_var_macho=no
14583fi
14584rm -f core conftest.err conftest.$ac_objext \
14585 conftest$ac_exeext conftest.$ac_ext
14586fi
14587{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5
14588$as_echo "$gdb_cv_var_macho" >&6; }
14589 CFLAGS=$OLD_CFLAGS
14590 LDFLAGS=$OLD_LDFLAGS
14591 LIBS=$OLD_LIBS
14592if test $gdb_cv_var_macho = yes; then
14593 CONFIG_OBS="$CONFIG_OBS machoread.o"
14594fi
14595
121ce6e5
DJ
14596# Add any host-specific objects to GDB.
14597CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
14598
608e2dbb
TT
14599# If building on ELF, look for lzma support for embedded compressed debug info.
14600if test $gdb_cv_var_elf = yes; then
14601
14602# Check whether --with-lzma was given.
14603if test "${with_lzma+set}" = set; then :
14604 withval=$with_lzma;
14605else
14606 with_lzma=auto
14607fi
14608
14609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5
14610$as_echo_n "checking whether to use lzma... " >&6; }
14611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5
14612$as_echo "$with_lzma" >&6; }
14613
14614 if test "${with_lzma}" != no; then
14615
14616
14617
14618
14619
14620
14621
14622
14623 use_additional=yes
14624
14625 acl_save_prefix="$prefix"
14626 prefix="$acl_final_prefix"
14627 acl_save_exec_prefix="$exec_prefix"
14628 exec_prefix="$acl_final_exec_prefix"
14629
14630 eval additional_includedir=\"$includedir\"
14631 eval additional_libdir=\"$libdir\"
14632
14633 exec_prefix="$acl_save_exec_prefix"
14634 prefix="$acl_save_prefix"
14635
14636
14637# Check whether --with-liblzma-prefix was given.
14638if test "${with_liblzma_prefix+set}" = set; then :
14639 withval=$with_liblzma_prefix;
14640 if test "X$withval" = "Xno"; then
14641 use_additional=no
14642 else
14643 if test "X$withval" = "X"; then
14644
14645 acl_save_prefix="$prefix"
14646 prefix="$acl_final_prefix"
14647 acl_save_exec_prefix="$exec_prefix"
14648 exec_prefix="$acl_final_exec_prefix"
14649
14650 eval additional_includedir=\"$includedir\"
14651 eval additional_libdir=\"$libdir\"
14652
14653 exec_prefix="$acl_save_exec_prefix"
14654 prefix="$acl_save_prefix"
14655
14656 else
14657 additional_includedir="$withval/include"
14658 additional_libdir="$withval/lib"
14659 fi
14660 fi
14661
14662fi
14663
14664 LIBLZMA=
14665 LTLIBLZMA=
14666 INCLZMA=
14667 rpathdirs=
14668 ltrpathdirs=
14669 names_already_handled=
14670 names_next_round='lzma '
14671 while test -n "$names_next_round"; do
14672 names_this_round="$names_next_round"
14673 names_next_round=
14674 for name in $names_this_round; do
14675 already_handled=
14676 for n in $names_already_handled; do
14677 if test "$n" = "$name"; then
14678 already_handled=yes
14679 break
14680 fi
14681 done
14682 if test -z "$already_handled"; then
14683 names_already_handled="$names_already_handled $name"
14684 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
14685 eval value=\"\$HAVE_LIB$uppername\"
14686 if test -n "$value"; then
14687 if test "$value" = yes; then
14688 eval value=\"\$LIB$uppername\"
14689 test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value"
14690 eval value=\"\$LTLIB$uppername\"
14691 test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value"
14692 else
14693 :
14694 fi
14695 else
14696 found_dir=
14697 found_la=
14698 found_so=
14699 found_a=
14700 if test $use_additional = yes; then
14701 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
14702 found_dir="$additional_libdir"
14703 found_so="$additional_libdir/lib$name.$shlibext"
14704 if test -f "$additional_libdir/lib$name.la"; then
14705 found_la="$additional_libdir/lib$name.la"
14706 fi
14707 else
14708 if test -f "$additional_libdir/lib$name.$libext"; then
14709 found_dir="$additional_libdir"
14710 found_a="$additional_libdir/lib$name.$libext"
14711 if test -f "$additional_libdir/lib$name.la"; then
14712 found_la="$additional_libdir/lib$name.la"
14713 fi
14714 fi
14715 fi
14716 fi
14717 if test "X$found_dir" = "X"; then
14718 for x in $LDFLAGS $LTLIBLZMA; do
14719
14720 acl_save_prefix="$prefix"
14721 prefix="$acl_final_prefix"
14722 acl_save_exec_prefix="$exec_prefix"
14723 exec_prefix="$acl_final_exec_prefix"
14724 eval x=\"$x\"
14725 exec_prefix="$acl_save_exec_prefix"
14726 prefix="$acl_save_prefix"
14727
14728 case "$x" in
14729 -L*)
14730 dir=`echo "X$x" | sed -e 's/^X-L//'`
14731 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
14732 found_dir="$dir"
14733 found_so="$dir/lib$name.$shlibext"
14734 if test -f "$dir/lib$name.la"; then
14735 found_la="$dir/lib$name.la"
14736 fi
14737 else
14738 if test -f "$dir/lib$name.$libext"; then
14739 found_dir="$dir"
14740 found_a="$dir/lib$name.$libext"
14741 if test -f "$dir/lib$name.la"; then
14742 found_la="$dir/lib$name.la"
14743 fi
14744 fi
14745 fi
14746 ;;
14747 esac
14748 if test "X$found_dir" != "X"; then
14749 break
14750 fi
14751 done
14752 fi
14753 if test "X$found_dir" != "X"; then
14754 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name"
14755 if test "X$found_so" != "X"; then
14756 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
14757 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
14758 else
14759 haveit=
14760 for x in $ltrpathdirs; do
14761 if test "X$x" = "X$found_dir"; then
14762 haveit=yes
14763 break
14764 fi
14765 done
14766 if test -z "$haveit"; then
14767 ltrpathdirs="$ltrpathdirs $found_dir"
14768 fi
14769 if test "$hardcode_direct" = yes; then
14770 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
14771 else
14772 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
14773 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
14774 haveit=
14775 for x in $rpathdirs; do
14776 if test "X$x" = "X$found_dir"; then
14777 haveit=yes
14778 break
14779 fi
14780 done
14781 if test -z "$haveit"; then
14782 rpathdirs="$rpathdirs $found_dir"
14783 fi
14784 else
14785 haveit=
14786 for x in $LDFLAGS $LIBLZMA; do
14787
14788 acl_save_prefix="$prefix"
14789 prefix="$acl_final_prefix"
14790 acl_save_exec_prefix="$exec_prefix"
14791 exec_prefix="$acl_final_exec_prefix"
14792 eval x=\"$x\"
14793 exec_prefix="$acl_save_exec_prefix"
14794 prefix="$acl_save_prefix"
14795
14796 if test "X$x" = "X-L$found_dir"; then
14797 haveit=yes
14798 break
14799 fi
14800 done
14801 if test -z "$haveit"; then
14802 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir"
14803 fi
14804 if test "$hardcode_minus_L" != no; then
14805 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
14806 else
14807 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
14808 fi
14809 fi
14810 fi
14811 fi
14812 else
14813 if test "X$found_a" != "X"; then
14814 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a"
14815 else
14816 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name"
14817 fi
14818 fi
14819 additional_includedir=
14820 case "$found_dir" in
14821 */lib | */lib/)
14822 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
14823 additional_includedir="$basedir/include"
14824 ;;
14825 esac
14826 if test "X$additional_includedir" != "X"; then
14827 if test "X$additional_includedir" != "X/usr/include"; then
14828 haveit=
14829 if test "X$additional_includedir" = "X/usr/local/include"; then
14830 if test -n "$GCC"; then
14831 case $host_os in
14832 linux*) haveit=yes;;
14833 esac
14834 fi
14835 fi
14836 if test -z "$haveit"; then
14837 for x in $CPPFLAGS $INCLZMA; do
14838
14839 acl_save_prefix="$prefix"
14840 prefix="$acl_final_prefix"
14841 acl_save_exec_prefix="$exec_prefix"
14842 exec_prefix="$acl_final_exec_prefix"
14843 eval x=\"$x\"
14844 exec_prefix="$acl_save_exec_prefix"
14845 prefix="$acl_save_prefix"
14846
14847 if test "X$x" = "X-I$additional_includedir"; then
14848 haveit=yes
14849 break
14850 fi
14851 done
14852 if test -z "$haveit"; then
14853 if test -d "$additional_includedir"; then
14854 INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir"
14855 fi
14856 fi
14857 fi
14858 fi
14859 fi
14860 if test -n "$found_la"; then
14861 save_libdir="$libdir"
14862 case "$found_la" in
14863 */* | *\\*) . "$found_la" ;;
14864 *) . "./$found_la" ;;
14865 esac
14866 libdir="$save_libdir"
14867 for dep in $dependency_libs; do
14868 case "$dep" in
14869 -L*)
14870 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
14871 if test "X$additional_libdir" != "X/usr/lib"; then
14872 haveit=
14873 if test "X$additional_libdir" = "X/usr/local/lib"; then
14874 if test -n "$GCC"; then
14875 case $host_os in
14876 linux*) haveit=yes;;
14877 esac
14878 fi
14879 fi
14880 if test -z "$haveit"; then
14881 haveit=
14882 for x in $LDFLAGS $LIBLZMA; do
14883
14884 acl_save_prefix="$prefix"
14885 prefix="$acl_final_prefix"
14886 acl_save_exec_prefix="$exec_prefix"
14887 exec_prefix="$acl_final_exec_prefix"
14888 eval x=\"$x\"
14889 exec_prefix="$acl_save_exec_prefix"
14890 prefix="$acl_save_prefix"
14891
14892 if test "X$x" = "X-L$additional_libdir"; then
14893 haveit=yes
14894 break
14895 fi
14896 done
14897 if test -z "$haveit"; then
14898 if test -d "$additional_libdir"; then
14899 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir"
14900 fi
14901 fi
14902 haveit=
14903 for x in $LDFLAGS $LTLIBLZMA; do
14904
14905 acl_save_prefix="$prefix"
14906 prefix="$acl_final_prefix"
14907 acl_save_exec_prefix="$exec_prefix"
14908 exec_prefix="$acl_final_exec_prefix"
14909 eval x=\"$x\"
14910 exec_prefix="$acl_save_exec_prefix"
14911 prefix="$acl_save_prefix"
14912
14913 if test "X$x" = "X-L$additional_libdir"; then
14914 haveit=yes
14915 break
14916 fi
14917 done
14918 if test -z "$haveit"; then
14919 if test -d "$additional_libdir"; then
14920 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir"
14921 fi
14922 fi
14923 fi
14924 fi
14925 ;;
14926 -R*)
14927 dir=`echo "X$dep" | sed -e 's/^X-R//'`
14928 if test "$enable_rpath" != no; then
14929 haveit=
14930 for x in $rpathdirs; do
14931 if test "X$x" = "X$dir"; then
14932 haveit=yes
14933 break
14934 fi
14935 done
14936 if test -z "$haveit"; then
14937 rpathdirs="$rpathdirs $dir"
14938 fi
14939 haveit=
14940 for x in $ltrpathdirs; do
14941 if test "X$x" = "X$dir"; then
14942 haveit=yes
14943 break
14944 fi
14945 done
14946 if test -z "$haveit"; then
14947 ltrpathdirs="$ltrpathdirs $dir"
14948 fi
14949 fi
14950 ;;
14951 -l*)
14952 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
14953 ;;
14954 *.la)
14955 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
14956 ;;
14957 *)
14958 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep"
14959 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep"
14960 ;;
14961 esac
14962 done
14963 fi
14964 else
14965 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
14966 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name"
14967 fi
14968 fi
14969 fi
14970 done
14971 done
14972 if test "X$rpathdirs" != "X"; then
14973 if test -n "$hardcode_libdir_separator"; then
14974 alldirs=
14975 for found_dir in $rpathdirs; do
14976 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
14977 done
14978 acl_save_libdir="$libdir"
14979 libdir="$alldirs"
14980 eval flag=\"$hardcode_libdir_flag_spec\"
14981 libdir="$acl_save_libdir"
14982 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
14983 else
14984 for found_dir in $rpathdirs; do
14985 acl_save_libdir="$libdir"
14986 libdir="$found_dir"
14987 eval flag=\"$hardcode_libdir_flag_spec\"
14988 libdir="$acl_save_libdir"
14989 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
14990 done
14991 fi
14992 fi
14993 if test "X$ltrpathdirs" != "X"; then
14994 for found_dir in $ltrpathdirs; do
14995 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir"
14996 done
14997 fi
14998
14999
15000 ac_save_CPPFLAGS="$CPPFLAGS"
15001
15002 for element in $INCLZMA; do
15003 haveit=
15004 for x in $CPPFLAGS; do
15005
15006 acl_save_prefix="$prefix"
15007 prefix="$acl_final_prefix"
15008 acl_save_exec_prefix="$exec_prefix"
15009 exec_prefix="$acl_final_exec_prefix"
15010 eval x=\"$x\"
15011 exec_prefix="$acl_save_exec_prefix"
15012 prefix="$acl_save_prefix"
15013
15014 if test "X$x" = "X$element"; then
15015 haveit=yes
15016 break
15017 fi
15018 done
15019 if test -z "$haveit"; then
15020 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
15021 fi
15022 done
15023
15024
15025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5
15026$as_echo_n "checking for liblzma... " >&6; }
15027if test "${ac_cv_liblzma+set}" = set; then :
15028 $as_echo_n "(cached) " >&6
15029else
15030
15031 ac_save_LIBS="$LIBS"
15032 LIBS="$LIBS $LIBLZMA"
15033 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15034/* end confdefs.h. */
15035#include "lzma.h"
15036int
15037main ()
15038{
15039lzma_index_iter iter;
15040 lzma_index_iter_init (&iter, 0);
15041 lzma_mf_is_supported (LZMA_MF_HC3);
15042 ;
15043 return 0;
15044}
15045_ACEOF
15046if ac_fn_c_try_link "$LINENO"; then :
15047 ac_cv_liblzma=yes
15048else
15049 ac_cv_liblzma=no
15050fi
15051rm -f core conftest.err conftest.$ac_objext \
15052 conftest$ac_exeext conftest.$ac_ext
15053 LIBS="$ac_save_LIBS"
15054
15055fi
15056{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5
15057$as_echo "$ac_cv_liblzma" >&6; }
15058 if test "$ac_cv_liblzma" = yes; then
15059 HAVE_LIBLZMA=yes
15060
15061$as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h
15062
15063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5
15064$as_echo_n "checking how to link with liblzma... " >&6; }
15065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5
15066$as_echo "$LIBLZMA" >&6; }
15067 else
15068 HAVE_LIBLZMA=no
15069 CPPFLAGS="$ac_save_CPPFLAGS"
15070 LIBLZMA=
15071 LTLIBLZMA=
15072 fi
15073
15074
15075
15076
15077
15078
15079 if test "$HAVE_LIBLZMA" != yes; then
15080 if test "$with_lzma" = yes; then
15081 as_fn_error "missing liblzma for --with-lzma" "$LINENO" 5
15082 fi
15083 fi
15084 fi
15085fi
15086
3fc11d3e
JM
15087LIBGUI="../libgui/src/libgui.a"
15088GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
15089
15090
7a292a7a 15091
3fc11d3e
JM
15092WIN32LDAPP=
15093
15094
15095
d91670b9 15096case "${host}" in
686a5eed 15097*-*-cygwin* | *-*-mingw* )
d91670b9
CV
15098 configdir="win"
15099 ;;
15100*)
15101 configdir="unix"
15102 ;;
15103esac
3fc11d3e
JM
15104
15105GDBTKLIBS=
15106if test "${enable_gdbtk}" = "yes"; then
15107
d1c3b63a
KS
15108 # Gdbtk must have an absolute path to srcdir in order to run
15109 # properly when not installed.
15110 here=`pwd`
15111 cd ${srcdir}
15112 GDBTK_SRC_DIR=`pwd`
15113 cd $here
15114
bec39cab 15115
5062cc19
KS
15116 #
15117 # Ok, lets find the tcl configuration
15118 # First, look for one uninstalled.
15119 # the alternative search directory is invoked by --with-tcl
15120 #
3fc11d3e 15121
5062cc19
KS
15122 if test x"${no_tcl}" = x ; then
15123 # we reset no_tcl in case something fails here
15124 no_tcl=true
bec39cab 15125
81ecdfbb
RW
15126# Check whether --with-tcl was given.
15127if test "${with_tcl+set}" = set; then :
15128 withval=$with_tcl; with_tclconfig=${withval}
15129fi
15130
15131 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
15132$as_echo_n "checking for Tcl configuration... " >&6; }
15133 if test "${ac_cv_c_tclconfig+set}" = set; then :
15134 $as_echo_n "(cached) " >&6
3fc11d3e 15135else
bec39cab 15136
3fc11d3e 15137
5062cc19
KS
15138 # First check to see if --with-tcl was specified.
15139 case "${host}" in
15140 *-*-cygwin*) platDir="win" ;;
15141 *) platDir="unix" ;;
15142 esac
15143 if test x"${with_tclconfig}" != x ; then
15144 if test -f "${with_tclconfig}/tclConfig.sh" ; then
15145 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
15146 else
81ecdfbb 15147 as_fn_error "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
5062cc19
KS
15148 fi
15149 fi
15150
15151 # then check for a private Tcl installation
15152 if test x"${ac_cv_c_tclconfig}" = x ; then
15153 for i in \
15154 ../tcl \
15155 `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
15156 `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
15157 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
15158 ../../tcl \
15159 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
15160 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
15161 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
15162 ../../../tcl \
15163 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
15164 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
15165 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
15166 if test -f "$i/$platDir/tclConfig.sh" ; then
15167 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
15168 break
15169 fi
15170 done
15171 fi
15172
15173 # on Darwin, check in Framework installation locations
15174 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
15175 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
15176 `ls -d /Library/Frameworks 2>/dev/null` \
15177 `ls -d /Network/Library/Frameworks 2>/dev/null` \
15178 `ls -d /System/Library/Frameworks 2>/dev/null` \
15179 ; do
15180 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
15181 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
15182 break
15183 fi
15184 done
15185 fi
15186
15187 # check in a few common install locations
15188 if test x"${ac_cv_c_tclconfig}" = x ; then
15189 for i in `ls -d ${libdir} 2>/dev/null` \
15190 `ls -d ${exec_prefix}/lib 2>/dev/null` \
15191 `ls -d ${prefix}/lib 2>/dev/null` \
15192 `ls -d /usr/local/lib 2>/dev/null` \
15193 `ls -d /usr/contrib/lib 2>/dev/null` \
15194 `ls -d /usr/lib 2>/dev/null` \
15195 ; do
15196 if test -f "$i/tclConfig.sh" ; then
15197 ac_cv_c_tclconfig=`(cd $i; pwd)`
15198 break
15199 fi
15200 done
15201 fi
3fc11d3e 15202
5062cc19
KS
15203 # check in a few other private locations
15204 if test x"${ac_cv_c_tclconfig}" = x ; then
15205 for i in \
15206 ${srcdir}/../tcl \
15207 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
15208 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
15209 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
15210 if test -f "$i/$platDir/tclConfig.sh" ; then
15211 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
15212 break
15213 fi
15214 done
15215 fi
bec39cab 15216
3fc11d3e
JM
15217fi
15218
5062cc19
KS
15219
15220 if test x"${ac_cv_c_tclconfig}" = x ; then
15221 TCL_BIN_DIR="# no Tcl configs found"
81ecdfbb
RW
15222 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
15223$as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
5062cc19
KS
15224 else
15225 no_tcl=
15226 TCL_BIN_DIR=${ac_cv_c_tclconfig}
81ecdfbb
RW
15227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
15228$as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
5062cc19
KS
15229 fi
15230 fi
3fc11d3e 15231
bec39cab 15232
85541719
DE
15233 # If $no_tk is nonempty, then we can't do Tk, and there is no
15234 # point to doing Tcl.
bec39cab 15235
5062cc19
KS
15236 #
15237 # Ok, lets find the tk configuration
15238 # First, look for one uninstalled.
15239 # the alternative search directory is invoked by --with-tk
15240 #
3fc11d3e 15241
5062cc19
KS
15242 if test x"${no_tk}" = x ; then
15243 # we reset no_tk in case something fails here
15244 no_tk=true
bec39cab 15245
81ecdfbb
RW
15246# Check whether --with-tk was given.
15247if test "${with_tk+set}" = set; then :
15248 withval=$with_tk; with_tkconfig=${withval}
15249fi
15250
15251 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
15252$as_echo_n "checking for Tk configuration... " >&6; }
15253 if test "${ac_cv_c_tkconfig+set}" = set; then :
15254 $as_echo_n "(cached) " >&6
bec39cab 15255else
3fc11d3e
JM
15256
15257
5062cc19
KS
15258 # First check to see if --with-tkconfig was specified.
15259 if test x"${with_tkconfig}" != x ; then
15260 if test -f "${with_tkconfig}/tkConfig.sh" ; then
15261 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
15262 else
81ecdfbb 15263 as_fn_error "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
5062cc19
KS
15264 fi
15265 fi
3fc11d3e 15266
5062cc19
KS
15267 # then check for a private Tk library
15268 case "${host}" in
15269 *-*-cygwin*) platDir="win" ;;
15270 *) platDir="unix" ;;
15271 esac
15272 if test x"${ac_cv_c_tkconfig}" = x ; then
15273 for i in \
15274 ../tk \
15275 `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
15276 `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
15277 `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
15278 ../../tk \
15279 `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
15280 `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
15281 `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
15282 ../../../tk \
15283 `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
15284 `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
15285 `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
15286 if test -f "$i/$platDir/tkConfig.sh" ; then
15287 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
15288 break
15289 fi
15290 done
15291 fi
15292
15293 # on Darwin, check in Framework installation locations
15294 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
15295 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
15296 `ls -d /Library/Frameworks 2>/dev/null` \
15297 `ls -d /Network/Library/Frameworks 2>/dev/null` \
15298 `ls -d /System/Library/Frameworks 2>/dev/null` \
15299 ; do
15300 if test -f "$i/Tk.framework/tkConfig.sh" ; then
15301 ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
15302 break
15303 fi
15304 done
15305 fi
15306
15307 # check in a few common install locations
15308 if test x"${ac_cv_c_tkconfig}" = x ; then
15309 for i in `ls -d ${libdir} 2>/dev/null` \
15310 `ls -d ${exec_prefix}/lib 2>/dev/null` \
15311 `ls -d ${prefix}/lib 2>/dev/null` \
15312 `ls -d /usr/local/lib 2>/dev/null` \
15313 `ls -d /usr/contrib/lib 2>/dev/null` \
15314 `ls -d /usr/lib 2>/dev/null` \
15315 ; do
15316 if test -f "$i/tkConfig.sh" ; then
15317 ac_cv_c_tkconfig=`(cd $i; pwd)`
15318 break
15319 fi
15320 done
15321 fi
15322 # check in a few other private locations
15323 if test x"${ac_cv_c_tkconfig}" = x ; then
15324 for i in \
15325 ${srcdir}/../tk \
15326 `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
15327 `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
15328 `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
15329 if test -f "$i/$platDir/tkConfig.sh" ; then
15330 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
15331 break
15332 fi
15333 done
15334 fi
3fc11d3e 15335
3fc11d3e
JM
15336fi
15337
15338
5062cc19
KS
15339 if test x"${ac_cv_c_tkconfig}" = x ; then
15340 TK_BIN_DIR="# no Tk configs found"
81ecdfbb
RW
15341 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
15342$as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
5062cc19
KS
15343 else
15344 no_tk=
15345 TK_BIN_DIR=${ac_cv_c_tkconfig}
81ecdfbb
RW
15346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
15347$as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
5062cc19 15348 fi
3fc11d3e 15349 fi
dd2504ab 15350
dd2504ab 15351
85541719
DE
15352 if test -z "${no_tcl}" -a -z "${no_tk}"; then
15353
81ecdfbb
RW
15354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
15355$as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
85541719
DE
15356
15357 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
81ecdfbb
RW
15358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
15359$as_echo "loading" >&6; }
85541719
DE
15360 . ${TCL_BIN_DIR}/tclConfig.sh
15361 else
81ecdfbb
RW
15362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
15363$as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
85541719
DE
15364 fi
15365
15366 # eval is required to do the TCL_DBGX substitution
15367 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
15368 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
15369
15370 # If the TCL_BIN_DIR is the build directory (not the install directory),
15371 # then set the common variable name to the value of the build variables.
15372 # For example, the variable TCL_LIB_SPEC will be set to the value
15373 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
15374 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
15375 # installed and uninstalled version of Tcl.
15376 if test -f "${TCL_BIN_DIR}/Makefile" ; then
15377 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
15378 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
15379 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
15380 elif test "`uname -s`" = "Darwin"; then
15381 # If Tcl was built as a framework, attempt to use the libraries
15382 # from the framework at the given location so that linking works
a68ffae9 15383 # against Tcl.framework installed in an arbitrary location.
85541719
DE
15384 case ${TCL_DEFS} in
15385 *TCL_FRAMEWORK*)
15386 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
15387 for i in "`cd ${TCL_BIN_DIR}; pwd`" \
15388 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
15389 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
15390 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
15391 break
15392 fi
15393 done
15394 fi
15395 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
15396 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
15397 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
15398 fi
15399 ;;
15400 esac
15401 fi
15402
15403 # eval is required to do the TCL_DBGX substitution
15404 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
15405 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
15406 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
15407 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
15408
15409
15410
15411
15412
15413
15414
15415
15416
15417
15418
15419
15420
15421
15422
15423 # Check for in-tree tcl
15424 here=`pwd`
15425 cd ${srcdir}/..
15426 topdir=`pwd`
15427 cd ${here}
15428
15429 intree="no"
15430 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
15431 intree="yes"
15432 fi
15433
15434 # Find Tcl private headers
15435 if test x"${intree}" = xno; then
15436
81ecdfbb
RW
15437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
15438$as_echo_n "checking for Tcl private headers... " >&6; }
85541719
DE
15439 private_dir=""
15440 dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
15441 if test -f ${dir}/tclInt.h ; then
15442 private_dir=${dir}
15443 fi
15444
15445 if test x"${private_dir}" = x; then
81ecdfbb 15446 as_fn_error "could not find private Tcl headers" "$LINENO" 5
85541719
DE
15447 else
15448 TCL_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
15449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
15450$as_echo "${private_dir}" >&6; }
85541719
DE
15451 fi
15452
15453 TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
15454 TCL_LIBRARY="${TCL_LIB_SPEC}"
15455 TCL_DEPS=""
15456 else
15457 # If building tcl in the same src tree, private headers
15458 # are not needed, but we need to be sure to use the right
15459 # headers library
15460 TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
15461 TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
15462 TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
15463 fi
15464
15465
15466
15467
15468
81ecdfbb
RW
15469 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
15470$as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
dd2504ab 15471
5062cc19 15472 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
81ecdfbb
RW
15473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
15474$as_echo "loading" >&6; }
5062cc19 15475 . ${TK_BIN_DIR}/tkConfig.sh
3fc11d3e 15476 else
81ecdfbb
RW
15477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
15478$as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
3fc11d3e 15479 fi
bec39cab 15480
5062cc19
KS
15481 # eval is required to do the TK_DBGX substitution
15482 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
15483 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
15484
15485 # If the TK_BIN_DIR is the build directory (not the install directory),
15486 # then set the common variable name to the value of the build variables.
15487 # For example, the variable TK_LIB_SPEC will be set to the value
15488 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
15489 # instead of TK_BUILD_LIB_SPEC since it will work with both an
15490 # installed and uninstalled version of Tcl.
85541719 15491 if test -f "${TK_BIN_DIR}/Makefile" ; then
5062cc19
KS
15492 TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
15493 TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
15494 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
15495 elif test "`uname -s`" = "Darwin"; then
15496 # If Tk was built as a framework, attempt to use the libraries
15497 # from the framework at the given location so that linking works
a68ffae9 15498 # against Tk.framework installed in an arbitrary location.
5062cc19
KS
15499 case ${TK_DEFS} in
15500 *TK_FRAMEWORK*)
85541719 15501 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
5062cc19
KS
15502 for i in "`cd ${TK_BIN_DIR}; pwd`" \
15503 "`cd ${TK_BIN_DIR}/../..; pwd`"; do
15504 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
15505 TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
15506 break
15507 fi
15508 done
15509 fi
85541719 15510 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
5062cc19
KS
15511 TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
15512 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
15513 fi
15514 ;;
15515 esac
3fc11d3e
JM
15516 fi
15517
5062cc19
KS
15518 # eval is required to do the TK_DBGX substitution
15519 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
15520 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
15521 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
15522 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
3fc11d3e 15523
3fc11d3e
JM
15524
15525
bec39cab
AC
15526
15527
15528
15529
15530
15531
15532
3fc11d3e 15533
3fc11d3e 15534
bec39cab 15535
bec39cab 15536
85541719
DE
15537 # Check for in-tree Tk
15538 intree="no"
15539 if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
15540 intree="yes"
15541 fi
3fc11d3e 15542
85541719
DE
15543 # Find Tk private headers
15544 if test x"${intree}" = xno; then
3fc11d3e 15545
81ecdfbb
RW
15546 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
15547$as_echo_n "checking for Tk private headers... " >&6; }
5062cc19
KS
15548 private_dir=""
15549 dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
15550 if test -f ${dir}/tkInt.h; then
15551 private_dir=${dir}
3fc11d3e 15552 fi
bec39cab 15553
5062cc19 15554 if test x"${private_dir}" = x; then
81ecdfbb 15555 as_fn_error "could not find Tk private headers" "$LINENO" 5
3fc11d3e 15556 else
5062cc19 15557 TK_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
15558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
15559$as_echo "${private_dir}" >&6; }
3fc11d3e 15560 fi
3fc11d3e 15561
85541719
DE
15562 TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
15563 TK_LIBRARY=${TK_LIB_SPEC}
15564 TK_DEPS=""
15565 else
15566 TK_INCLUDE="-I${TK_SRC_DIR}/generic"
15567 TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
15568 TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
15569 fi
3fc11d3e
JM
15570
15571
3fc11d3e
JM
15572
15573
3fc11d3e 15574
85541719 15575 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e 15576
85541719
DE
15577 # Include some libraries that Tcl and Tk want.
15578 TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
15579 # Yes, the ordering seems wrong here. But it isn't.
15580 # TK_LIBS is the list of libraries that need to be linked
15581 # after Tcl/Tk. Note that this isn't put into LIBS. If it
15582 # were in LIBS then any link tests after this point would
15583 # try to include things like `$(LIBGUI)', which wouldn't work.
15584 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5 15585
85541719
DE
15586 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
15587 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
15588 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
15589 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
15590 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
15591 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
15592 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
3fc11d3e 15593
85541719
DE
15594 if test x$gdb_cv_os_cygwin = xyes; then
15595 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
15596 WIN32LDAPP="-Wl,--subsystem,console"
15597 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
3fc11d3e 15598 fi
ffc6a242 15599
81ecdfbb 15600 subdirs="$subdirs gdbtk"
3ace7edb 15601
85541719 15602 fi
3fc11d3e
JM
15603fi
15604
15605
15606
15607
15608
15609
15610
15611
81ecdfbb
RW
15612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
15613$as_echo_n "checking for X... " >&6; }
bec39cab 15614
c906108c 15615
81ecdfbb
RW
15616# Check whether --with-x was given.
15617if test "${with_x+set}" = set; then :
15618 withval=$with_x;
15619fi
c906108c
SS
15620
15621# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
15622if test "x$with_x" = xno; then
15623 # The user explicitly disabled X.
15624 have_x=disabled
15625else
81ecdfbb
RW
15626 case $x_includes,$x_libraries in #(
15627 *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
15628 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
15629 $as_echo_n "(cached) " >&6
c906108c
SS
15630else
15631 # One or both of the vars are not set, and there is no cached value.
bec39cab 15632ac_x_includes=no ac_x_libraries=no
81ecdfbb 15633rm -f -r conftest.dir
bec39cab
AC
15634if mkdir conftest.dir; then
15635 cd conftest.dir
bec39cab 15636 cat >Imakefile <<'_ACEOF'
81ecdfbb
RW
15637incroot:
15638 @echo incroot='${INCROOT}'
15639usrlibdir:
15640 @echo usrlibdir='${USRLIBDIR}'
15641libdir:
15642 @echo libdir='${LIBDIR}'
15643_ACEOF
15644 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
c906108c 15645 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
81ecdfbb
RW
15646 for ac_var in incroot usrlibdir libdir; do
15647 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
15648 done
c906108c 15649 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
81ecdfbb
RW
15650 for ac_extension in a so sl dylib la dll; do
15651 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
15652 test -f "$ac_im_libdir/libX11.$ac_extension"; then
bec39cab 15653 ac_im_usrlibdir=$ac_im_libdir; break
c906108c
SS
15654 fi
15655 done
15656 # Screen out bogus values from the imake configuration. They are
15657 # bogus both because they are the default anyway, and because
15658 # using them would break gcc on systems where it needs fixed includes.
bec39cab 15659 case $ac_im_incroot in
81ecdfbb 15660 /usr/include) ac_x_includes= ;;
bec39cab 15661 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
c906108c 15662 esac
bec39cab 15663 case $ac_im_usrlibdir in
81ecdfbb 15664 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
bec39cab 15665 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
c906108c
SS
15666 esac
15667 fi
15668 cd ..
81ecdfbb 15669 rm -f -r conftest.dir
c906108c
SS
15670fi
15671
bec39cab
AC
15672# Standard set of common directories for X headers.
15673# Check X11 before X11Rn because it is often a symlink to the current release.
15674ac_x_header_dirs='
15675/usr/X11/include
81ecdfbb 15676/usr/X11R7/include
bec39cab
AC
15677/usr/X11R6/include
15678/usr/X11R5/include
15679/usr/X11R4/include
15680
15681/usr/include/X11
81ecdfbb 15682/usr/include/X11R7
bec39cab
AC
15683/usr/include/X11R6
15684/usr/include/X11R5
15685/usr/include/X11R4
15686
15687/usr/local/X11/include
81ecdfbb 15688/usr/local/X11R7/include
bec39cab
AC
15689/usr/local/X11R6/include
15690/usr/local/X11R5/include
15691/usr/local/X11R4/include
15692
15693/usr/local/include/X11
81ecdfbb 15694/usr/local/include/X11R7
bec39cab
AC
15695/usr/local/include/X11R6
15696/usr/local/include/X11R5
15697/usr/local/include/X11R4
15698
15699/usr/X386/include
15700/usr/x386/include
15701/usr/XFree86/include/X11
15702
15703/usr/include
15704/usr/local/include
15705/usr/unsupported/include
15706/usr/athena/include
15707/usr/local/x11r5/include
15708/usr/lpp/Xamples/include
15709
15710/usr/openwin/include
15711/usr/openwin/share/include'
15712
15713if test "$ac_x_includes" = no; then
81ecdfbb 15714 # Guess where to find include files, by looking for Xlib.h.
c906108c 15715 # First, try using that file with no special directory specified.
81ecdfbb 15716 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15717/* end confdefs.h. */
81ecdfbb 15718#include <X11/Xlib.h>
bec39cab 15719_ACEOF
81ecdfbb 15720if ac_fn_c_try_cpp "$LINENO"; then :
c906108c
SS
15721 # We can compile using X headers with no special include directory.
15722ac_x_includes=
15723else
bec39cab 15724 for ac_dir in $ac_x_header_dirs; do
81ecdfbb 15725 if test -r "$ac_dir/X11/Xlib.h"; then
bec39cab
AC
15726 ac_x_includes=$ac_dir
15727 break
15728 fi
15729done
c906108c 15730fi
bec39cab
AC
15731rm -f conftest.err conftest.$ac_ext
15732fi # $ac_x_includes = no
c906108c 15733
bec39cab 15734if test "$ac_x_libraries" = no; then
c906108c 15735 # Check for the libraries.
c906108c
SS
15736 # See if we find them without any special options.
15737 # Don't add to $LIBS permanently.
bec39cab 15738 ac_save_LIBS=$LIBS
81ecdfbb
RW
15739 LIBS="-lX11 $LIBS"
15740 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15741/* end confdefs.h. */
81ecdfbb 15742#include <X11/Xlib.h>
bec39cab
AC
15743int
15744main ()
15745{
81ecdfbb 15746XrmInitialize ()
bec39cab
AC
15747 ;
15748 return 0;
15749}
15750_ACEOF
81ecdfbb 15751if ac_fn_c_try_link "$LINENO"; then :
bec39cab 15752 LIBS=$ac_save_LIBS
c906108c
SS
15753# We can link X programs with no special library path.
15754ac_x_libraries=
15755else
81ecdfbb
RW
15756 LIBS=$ac_save_LIBS
15757for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
c906108c 15758do
bec39cab 15759 # Don't even attempt the hair of trying to link an X program!
81ecdfbb
RW
15760 for ac_extension in a so sl dylib la dll; do
15761 if test -r "$ac_dir/libX11.$ac_extension"; then
c906108c
SS
15762 ac_x_libraries=$ac_dir
15763 break 2
15764 fi
15765 done
15766done
15767fi
81ecdfbb
RW
15768rm -f core conftest.err conftest.$ac_objext \
15769 conftest$ac_exeext conftest.$ac_ext
bec39cab 15770fi # $ac_x_libraries = no
c906108c 15771
81ecdfbb
RW
15772case $ac_x_includes,$ac_x_libraries in #(
15773 no,* | *,no | *\'*)
15774 # Didn't find X, or a directory has "'" in its name.
15775 ac_cv_have_x="have_x=no";; #(
15776 *)
15777 # Record where we found X for the cache.
15778 ac_cv_have_x="have_x=yes\
15779 ac_x_includes='$ac_x_includes'\
15780 ac_x_libraries='$ac_x_libraries'"
15781esac
c906108c 15782fi
81ecdfbb
RW
15783;; #(
15784 *) have_x=yes;;
15785 esac
c906108c
SS
15786 eval "$ac_cv_have_x"
15787fi # $with_x != no
15788
15789if test "$have_x" != yes; then
81ecdfbb
RW
15790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
15791$as_echo "$have_x" >&6; }
c906108c
SS
15792 no_x=yes
15793else
15794 # If each of the values was on the command line, it overrides each guess.
15795 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
15796 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
15797 # Update the cache value to reflect the command line values.
81ecdfbb
RW
15798 ac_cv_have_x="have_x=yes\
15799 ac_x_includes='$x_includes'\
15800 ac_x_libraries='$x_libraries'"
15801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
15802$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
c906108c
SS
15803fi
15804
15805
bec39cab 15806# Unlike the sim directory, whether a simulator is linked is controlled by
9b624dbe 15807# presence of a gdb_sim definition in the target configure.tgt entry.
7a292a7a
SS
15808# This code just checks for a few cases where we'd like to ignore those
15809# definitions, even when they're present in the '.mt' file. These cases
15810# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 15811# not part of the source tree.
7a292a7a 15812#
81ecdfbb
RW
15813# Check whether --enable-sim was given.
15814if test "${enable_sim+set}" = set; then :
15815 enableval=$enable_sim; echo "enable_sim = $enable_sim";
7a292a7a
SS
15816 echo "enableval = ${enableval}";
15817 case "${enableval}" in
15818 yes) ignore_sim=false ;;
15819 no) ignore_sim=true ;;
15820 *) ignore_sim=false ;;
15821 esac
15822else
15823 ignore_sim=false
81ecdfbb
RW
15824fi
15825
7a292a7a
SS
15826
15827if test ! -d "${srcdir}/../sim"; then
15828 ignore_sim=true
15829fi
15830
9b624dbe
UW
15831SIM=
15832SIM_OBS=
15833if test "${ignore_sim}" = "false"; then
15834 if test x"${gdb_sim}" != x ; then
15835 SIM="${gdb_sim}"
15836 SIM_OBS="remote-sim.o"
60ca704f 15837
81ecdfbb 15838$as_echo "#define WITH_SIM 1" >>confdefs.h
7a292a7a 15839
976102cd
PA
15840
15841 # Some tdep code should only be compiled in when the ppc sim is
15842 # built. PR sim/13418.
15843 case $target in
15844 powerpc*-*-*)
15845
15846$as_echo "#define WITH_PPC_SIM 1" >>confdefs.h
15847
15848 ;;
15849 esac
9b624dbe 15850 fi
7a292a7a
SS
15851fi
15852
15853
15854
c906108c
SS
15855
15856
15857
15858
15859
15860
dfcd3bfb 15861
e56ac5c3
AC
15862
15863
b3a90332
AC
15864
15865
c35f4ffc 15866# List of host floatformats.
bec39cab
AC
15867
15868cat >>confdefs.h <<_ACEOF
c35f4ffc 15869#define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
bec39cab 15870_ACEOF
c35f4ffc 15871
bec39cab
AC
15872
15873cat >>confdefs.h <<_ACEOF
c35f4ffc 15874#define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
bec39cab
AC
15875_ACEOF
15876
c35f4ffc 15877
bec39cab 15878cat >>confdefs.h <<_ACEOF
c35f4ffc 15879#define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
bec39cab 15880_ACEOF
c35f4ffc
AC
15881
15882
c906108c
SS
15883# target_subdir is used by the testsuite to find the target libraries.
15884target_subdir=
15885if test "${host}" != "${target}"; then
15886 target_subdir="${target_alias}/"
15887fi
15888
15889
15890frags=
771b4502 15891if test "${gdb_native}" = "yes"; then
0dad8a66
MK
15892 host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
15893 if test ! -f ${host_makefile_frag}; then
81ecdfbb 15894 as_fn_error "\"*** Gdb does not support native target ${host}\"" "$LINENO" 5
0dad8a66
MK
15895 fi
15896 frags="$frags $host_makefile_frag"
15897else
15898 host_makefile_frag=/dev/null
c906108c 15899fi
c906108c 15900
c906108c
SS
15901
15902
15903
771b4502 15904if test "${gdb_native}" = "yes"; then
a85f51e7
DJ
15905# We pick this up from the host configuration file (.mh) because we
15906# do not have a native configuration Makefile fragment.
c906108c
SS
15907nativefile=`sed -n '
15908s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
15909' ${host_makefile_frag}`
c906108c
SS
15910fi
15911
15912
b00a8037 15913if test x"${gdb_osabi}" != x ; then
bec39cab
AC
15914
15915cat >>confdefs.h <<_ACEOF
b00a8037 15916#define GDB_OSABI_DEFAULT $gdb_osabi
bec39cab 15917_ACEOF
b00a8037
DJ
15918
15919fi
15920
8dcde887 15921# Enable multi-ice-gdb-server.
81ecdfbb
RW
15922# Check whether --enable-multi-ice was given.
15923if test "${enable_multi_ice+set}" = set; then :
15924 enableval=$enable_multi_ice; case $enableval in
8dcde887
MK
15925 yes | no)
15926 ;;
81ecdfbb 15927 *) as_fn_error "bad value $enableval for --enable-multi-ice" "$LINENO" 5 ;;
8dcde887 15928 esac
81ecdfbb 15929fi
b4e70030 15930
81ecdfbb
RW
15931if test "x$enable_multi_ice" = xyes; then
15932 subdirs="$subdirs multi-ice"
3ace7edb 15933
a85f51e7
DJ
15934fi
15935
496c0e1b
JB
15936# Check whether --enable-gdbserver was given.
15937if test "${enable_gdbserver+set}" = set; then :
15938 enableval=$enable_gdbserver; case "${enableval}" in
15939 yes| no|auto) ;;
15940 *) as_fn_error "bad value ${enableval} for --enable-gdbserver option" "$LINENO" 5 ;;
15941esac
15942else
15943 enable_gdbserver=auto
15944fi
15945
15946
15947# We only build gdbserver automatically in a native configuration, and
15948# only if the user did not explicitly disable its build.
15949if test "$gdb_native" = "yes" -a "$enable_gdbserver" != "no"; then
81ecdfbb
RW
15950 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5
15951$as_echo_n "checking whether gdbserver is supported on this host... " >&6; }
8dcde887 15952 if test "x$build_gdbserver" = xyes; then
81ecdfbb
RW
15953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15954$as_echo "yes" >&6; }
15955 subdirs="$subdirs gdbserver"
3ace7edb 15956
496c0e1b 15957 gdbserver_build_enabled=yes
8dcde887 15958 else
81ecdfbb
RW
15959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15960$as_echo "no" >&6; }
8dcde887
MK
15961 fi
15962fi
15963
496c0e1b
JB
15964# If the user explicitly request the gdbserver to be built, verify that
15965# we were in fact able to enable it.
15966if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then
15967 as_fn_error "Automatic gdbserver build is not supported for this configuration" "$LINENO" 5
15968fi
15969
393fd4c3
YQ
15970# Check for babeltrace and babeltrace-ctf
15971
15972# Check whether --with-babeltrace was given.
15973if test "${with_babeltrace+set}" = set; then :
15974 withval=$with_babeltrace;
15975else
15976 with_babeltrace=auto
15977fi
15978
15979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltrace" >&5
15980$as_echo_n "checking whether to use babeltrace... " >&6; }
15981{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5
15982$as_echo "$with_babeltrace" >&6; }
15983
15984if test "x$with_babeltrace" = "xno"; then
15985 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&5
15986$as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&2;}
15987else
15988 # Append -Werror to CFLAGS so that configure can catch the warning
15989 # "assignment from incompatible pointer type", which is related to
15990 # the babeltrace change from 1.0.3 to 1.1.0. Babeltrace 1.1.0 works
15991 # in GDB, while babeltrace 1.0.3 is broken.
15992 # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be
15993 # safe to save and restore CFLAGS here.
15994 saved_CFLAGS=$CFLAGS
15995 CFLAGS="$CFLAGS -Werror"
15996
15997
15998
15999
16000
16001
16002
16003
16004 use_additional=yes
16005
16006 acl_save_prefix="$prefix"
16007 prefix="$acl_final_prefix"
16008 acl_save_exec_prefix="$exec_prefix"
16009 exec_prefix="$acl_final_exec_prefix"
16010
16011 eval additional_includedir=\"$includedir\"
16012 eval additional_libdir=\"$libdir\"
16013
16014 exec_prefix="$acl_save_exec_prefix"
16015 prefix="$acl_save_prefix"
16016
16017
16018# Check whether --with-libbabeltrace-prefix was given.
16019if test "${with_libbabeltrace_prefix+set}" = set; then :
16020 withval=$with_libbabeltrace_prefix;
16021 if test "X$withval" = "Xno"; then
16022 use_additional=no
16023 else
16024 if test "X$withval" = "X"; then
16025
16026 acl_save_prefix="$prefix"
16027 prefix="$acl_final_prefix"
16028 acl_save_exec_prefix="$exec_prefix"
16029 exec_prefix="$acl_final_exec_prefix"
16030
16031 eval additional_includedir=\"$includedir\"
16032 eval additional_libdir=\"$libdir\"
16033
16034 exec_prefix="$acl_save_exec_prefix"
16035 prefix="$acl_save_prefix"
16036
16037 else
16038 additional_includedir="$withval/include"
16039 additional_libdir="$withval/lib"
16040 fi
16041 fi
16042
16043fi
16044
16045 LIBBABELTRACE=
16046 LTLIBBABELTRACE=
16047 INCBABELTRACE=
16048 rpathdirs=
16049 ltrpathdirs=
16050 names_already_handled=
16051 names_next_round='babeltrace babeltrace-ctf'
16052 while test -n "$names_next_round"; do
16053 names_this_round="$names_next_round"
16054 names_next_round=
16055 for name in $names_this_round; do
16056 already_handled=
16057 for n in $names_already_handled; do
16058 if test "$n" = "$name"; then
16059 already_handled=yes
16060 break
16061 fi
16062 done
16063 if test -z "$already_handled"; then
16064 names_already_handled="$names_already_handled $name"
16065 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
16066 eval value=\"\$HAVE_LIB$uppername\"
16067 if test -n "$value"; then
16068 if test "$value" = yes; then
16069 eval value=\"\$LIB$uppername\"
16070 test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value"
16071 eval value=\"\$LTLIB$uppername\"
16072 test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value"
16073 else
16074 :
16075 fi
16076 else
16077 found_dir=
16078 found_la=
16079 found_so=
16080 found_a=
16081 if test $use_additional = yes; then
16082 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
16083 found_dir="$additional_libdir"
16084 found_so="$additional_libdir/lib$name.$shlibext"
16085 if test -f "$additional_libdir/lib$name.la"; then
16086 found_la="$additional_libdir/lib$name.la"
16087 fi
16088 else
16089 if test -f "$additional_libdir/lib$name.$libext"; then
16090 found_dir="$additional_libdir"
16091 found_a="$additional_libdir/lib$name.$libext"
16092 if test -f "$additional_libdir/lib$name.la"; then
16093 found_la="$additional_libdir/lib$name.la"
16094 fi
16095 fi
16096 fi
16097 fi
16098 if test "X$found_dir" = "X"; then
16099 for x in $LDFLAGS $LTLIBBABELTRACE; do
16100
16101 acl_save_prefix="$prefix"
16102 prefix="$acl_final_prefix"
16103 acl_save_exec_prefix="$exec_prefix"
16104 exec_prefix="$acl_final_exec_prefix"
16105 eval x=\"$x\"
16106 exec_prefix="$acl_save_exec_prefix"
16107 prefix="$acl_save_prefix"
16108
16109 case "$x" in
16110 -L*)
16111 dir=`echo "X$x" | sed -e 's/^X-L//'`
16112 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
16113 found_dir="$dir"
16114 found_so="$dir/lib$name.$shlibext"
16115 if test -f "$dir/lib$name.la"; then
16116 found_la="$dir/lib$name.la"
16117 fi
16118 else
16119 if test -f "$dir/lib$name.$libext"; then
16120 found_dir="$dir"
16121 found_a="$dir/lib$name.$libext"
16122 if test -f "$dir/lib$name.la"; then
16123 found_la="$dir/lib$name.la"
16124 fi
16125 fi
16126 fi
16127 ;;
16128 esac
16129 if test "X$found_dir" != "X"; then
16130 break
16131 fi
16132 done
16133 fi
16134 if test "X$found_dir" != "X"; then
16135 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name"
16136 if test "X$found_so" != "X"; then
16137 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
16138 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
16139 else
16140 haveit=
16141 for x in $ltrpathdirs; do
16142 if test "X$x" = "X$found_dir"; then
16143 haveit=yes
16144 break
16145 fi
16146 done
16147 if test -z "$haveit"; then
16148 ltrpathdirs="$ltrpathdirs $found_dir"
16149 fi
16150 if test "$hardcode_direct" = yes; then
16151 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
16152 else
16153 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
16154 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
16155 haveit=
16156 for x in $rpathdirs; do
16157 if test "X$x" = "X$found_dir"; then
16158 haveit=yes
16159 break
16160 fi
16161 done
16162 if test -z "$haveit"; then
16163 rpathdirs="$rpathdirs $found_dir"
16164 fi
16165 else
16166 haveit=
16167 for x in $LDFLAGS $LIBBABELTRACE; do
16168
16169 acl_save_prefix="$prefix"
16170 prefix="$acl_final_prefix"
16171 acl_save_exec_prefix="$exec_prefix"
16172 exec_prefix="$acl_final_exec_prefix"
16173 eval x=\"$x\"
16174 exec_prefix="$acl_save_exec_prefix"
16175 prefix="$acl_save_prefix"
16176
16177 if test "X$x" = "X-L$found_dir"; then
16178 haveit=yes
16179 break
16180 fi
16181 done
16182 if test -z "$haveit"; then
16183 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir"
16184 fi
16185 if test "$hardcode_minus_L" != no; then
16186 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
16187 else
16188 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
16189 fi
16190 fi
16191 fi
16192 fi
16193 else
16194 if test "X$found_a" != "X"; then
16195 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a"
16196 else
16197 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name"
16198 fi
16199 fi
16200 additional_includedir=
16201 case "$found_dir" in
16202 */lib | */lib/)
16203 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
16204 additional_includedir="$basedir/include"
16205 ;;
16206 esac
16207 if test "X$additional_includedir" != "X"; then
16208 if test "X$additional_includedir" != "X/usr/include"; then
16209 haveit=
16210 if test "X$additional_includedir" = "X/usr/local/include"; then
16211 if test -n "$GCC"; then
16212 case $host_os in
16213 linux*) haveit=yes;;
16214 esac
16215 fi
16216 fi
16217 if test -z "$haveit"; then
16218 for x in $CPPFLAGS $INCBABELTRACE; do
16219
16220 acl_save_prefix="$prefix"
16221 prefix="$acl_final_prefix"
16222 acl_save_exec_prefix="$exec_prefix"
16223 exec_prefix="$acl_final_exec_prefix"
16224 eval x=\"$x\"
16225 exec_prefix="$acl_save_exec_prefix"
16226 prefix="$acl_save_prefix"
16227
16228 if test "X$x" = "X-I$additional_includedir"; then
16229 haveit=yes
16230 break
16231 fi
16232 done
16233 if test -z "$haveit"; then
16234 if test -d "$additional_includedir"; then
16235 INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir"
16236 fi
16237 fi
16238 fi
16239 fi
16240 fi
16241 if test -n "$found_la"; then
16242 save_libdir="$libdir"
16243 case "$found_la" in
16244 */* | *\\*) . "$found_la" ;;
16245 *) . "./$found_la" ;;
16246 esac
16247 libdir="$save_libdir"
16248 for dep in $dependency_libs; do
16249 case "$dep" in
16250 -L*)
16251 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
16252 if test "X$additional_libdir" != "X/usr/lib"; then
16253 haveit=
16254 if test "X$additional_libdir" = "X/usr/local/lib"; then
16255 if test -n "$GCC"; then
16256 case $host_os in
16257 linux*) haveit=yes;;
16258 esac
16259 fi
16260 fi
16261 if test -z "$haveit"; then
16262 haveit=
16263 for x in $LDFLAGS $LIBBABELTRACE; do
16264
16265 acl_save_prefix="$prefix"
16266 prefix="$acl_final_prefix"
16267 acl_save_exec_prefix="$exec_prefix"
16268 exec_prefix="$acl_final_exec_prefix"
16269 eval x=\"$x\"
16270 exec_prefix="$acl_save_exec_prefix"
16271 prefix="$acl_save_prefix"
16272
16273 if test "X$x" = "X-L$additional_libdir"; then
16274 haveit=yes
16275 break
16276 fi
16277 done
16278 if test -z "$haveit"; then
16279 if test -d "$additional_libdir"; then
16280 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir"
16281 fi
16282 fi
16283 haveit=
16284 for x in $LDFLAGS $LTLIBBABELTRACE; do
16285
16286 acl_save_prefix="$prefix"
16287 prefix="$acl_final_prefix"
16288 acl_save_exec_prefix="$exec_prefix"
16289 exec_prefix="$acl_final_exec_prefix"
16290 eval x=\"$x\"
16291 exec_prefix="$acl_save_exec_prefix"
16292 prefix="$acl_save_prefix"
16293
16294 if test "X$x" = "X-L$additional_libdir"; then
16295 haveit=yes
16296 break
16297 fi
16298 done
16299 if test -z "$haveit"; then
16300 if test -d "$additional_libdir"; then
16301 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir"
16302 fi
16303 fi
16304 fi
16305 fi
16306 ;;
16307 -R*)
16308 dir=`echo "X$dep" | sed -e 's/^X-R//'`
16309 if test "$enable_rpath" != no; then
16310 haveit=
16311 for x in $rpathdirs; do
16312 if test "X$x" = "X$dir"; then
16313 haveit=yes
16314 break
16315 fi
16316 done
16317 if test -z "$haveit"; then
16318 rpathdirs="$rpathdirs $dir"
16319 fi
16320 haveit=
16321 for x in $ltrpathdirs; do
16322 if test "X$x" = "X$dir"; then
16323 haveit=yes
16324 break
16325 fi
16326 done
16327 if test -z "$haveit"; then
16328 ltrpathdirs="$ltrpathdirs $dir"
16329 fi
16330 fi
16331 ;;
16332 -l*)
16333 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
16334 ;;
16335 *.la)
16336 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
16337 ;;
16338 *)
16339 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$dep"
16340 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$dep"
16341 ;;
16342 esac
16343 done
16344 fi
16345 else
16346 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
16347 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name"
16348 fi
16349 fi
16350 fi
16351 done
16352 done
16353 if test "X$rpathdirs" != "X"; then
16354 if test -n "$hardcode_libdir_separator"; then
16355 alldirs=
16356 for found_dir in $rpathdirs; do
16357 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
16358 done
16359 acl_save_libdir="$libdir"
16360 libdir="$alldirs"
16361 eval flag=\"$hardcode_libdir_flag_spec\"
16362 libdir="$acl_save_libdir"
16363 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
16364 else
16365 for found_dir in $rpathdirs; do
16366 acl_save_libdir="$libdir"
16367 libdir="$found_dir"
16368 eval flag=\"$hardcode_libdir_flag_spec\"
16369 libdir="$acl_save_libdir"
16370 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
16371 done
16372 fi
16373 fi
16374 if test "X$ltrpathdirs" != "X"; then
16375 for found_dir in $ltrpathdirs; do
16376 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir"
16377 done
16378 fi
16379
16380
16381 ac_save_CPPFLAGS="$CPPFLAGS"
16382
16383 for element in $INCBABELTRACE; do
16384 haveit=
16385 for x in $CPPFLAGS; do
16386
16387 acl_save_prefix="$prefix"
16388 prefix="$acl_final_prefix"
16389 acl_save_exec_prefix="$exec_prefix"
16390 exec_prefix="$acl_final_exec_prefix"
16391 eval x=\"$x\"
16392 exec_prefix="$acl_save_exec_prefix"
16393 prefix="$acl_save_prefix"
16394
16395 if test "X$x" = "X$element"; then
16396 haveit=yes
16397 break
16398 fi
16399 done
16400 if test -z "$haveit"; then
16401 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
16402 fi
16403 done
16404
16405
16406 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5
16407$as_echo_n "checking for libbabeltrace... " >&6; }
16408if test "${ac_cv_libbabeltrace+set}" = set; then :
16409 $as_echo_n "(cached) " >&6
16410else
16411
16412 ac_save_LIBS="$LIBS"
16413 LIBS="$LIBS $LIBBABELTRACE"
16414 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16415/* end confdefs.h. */
16416#include <babeltrace/babeltrace.h>
16417 #include <babeltrace/ctf/events.h>
16418 #include <babeltrace/ctf/iterator.h>
16419int
16420main ()
16421{
16422struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL));
16423 struct bt_ctf_event *event = NULL;
16424 const struct bt_definition *scope;
16425
13cdc2af 16426 pos->type = BT_SEEK_BEGIN;
65c749e7 16427 bt_iter_set_pos (bt_ctf_get_iter (NULL), pos);
393fd4c3
YQ
16428 scope = bt_ctf_get_top_level_scope (event,
16429 BT_STREAM_EVENT_HEADER);
16430 bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id"));
16431
16432 ;
16433 return 0;
16434}
16435_ACEOF
16436if ac_fn_c_try_link "$LINENO"; then :
16437 ac_cv_libbabeltrace=yes
16438else
16439 ac_cv_libbabeltrace=no
16440fi
16441rm -f core conftest.err conftest.$ac_objext \
16442 conftest$ac_exeext conftest.$ac_ext
16443 LIBS="$ac_save_LIBS"
16444
16445fi
16446{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5
16447$as_echo "$ac_cv_libbabeltrace" >&6; }
16448 if test "$ac_cv_libbabeltrace" = yes; then
16449 HAVE_LIBBABELTRACE=yes
16450
16451$as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h
16452
16453 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libbabeltrace" >&5
16454$as_echo_n "checking how to link with libbabeltrace... " >&6; }
16455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5
16456$as_echo "$LIBBABELTRACE" >&6; }
16457 else
16458 HAVE_LIBBABELTRACE=no
16459 CPPFLAGS="$ac_save_CPPFLAGS"
16460 LIBBABELTRACE=
16461 LTLIBBABELTRACE=
16462 fi
16463
16464
16465
16466
16467
16468
16469 CFLAGS=$saved_CFLAGS
16470
16471 if test "$HAVE_LIBBABELTRACE" != yes; then
16472 if test "$with_babeltrace" = yes; then
16473 as_fn_error "babeltrace is missing or unusable" "$LINENO" 5
16474 else
16475 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&5
16476$as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&2;}
16477 fi
16478 fi
16479fi
16480
db985757 16481# If nativefile (NAT_FILE) is not set in config/*/*.m[ht] files, we link
2c0fc042 16482# to an empty version.
c906108c
SS
16483
16484files=
16485links=
5a2402b8 16486
c906108c
SS
16487rm -f nm.h
16488if test "${nativefile}" != ""; then
0f475e27
AC
16489 case "${nativefile}" in
16490 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
16491 * ) GDB_NM_FILE="${nativefile}"
16492 esac
5a2402b8
AC
16493 files="${files} ${GDB_NM_FILE}"
16494 links="${links} nm.h"
60ca704f
SE
16495
16496cat >>confdefs.h <<_ACEOF
b78960be 16497#define GDB_NM_FILE "${GDB_NM_FILE}"
bec39cab 16498_ACEOF
5a2402b8 16499
c906108c 16500fi
5a2402b8
AC
16501
16502
e3487908
GKB
16503for ac_prog in xsltproc
16504do
16505 # Extract the first word of "$ac_prog", so it can be a program name with args.
16506set dummy $ac_prog; ac_word=$2
16507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16508$as_echo_n "checking for $ac_word... " >&6; }
16509if test "${ac_cv_path_XSLTPROC+set}" = set; then :
16510 $as_echo_n "(cached) " >&6
16511else
16512 case $XSLTPROC in
16513 [\\/]* | ?:[\\/]*)
16514 ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
16515 ;;
16516 *)
16517 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16518for as_dir in $PATH
16519do
16520 IFS=$as_save_IFS
16521 test -z "$as_dir" && as_dir=.
16522 for ac_exec_ext in '' $ac_executable_extensions; do
16523 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16524 ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
16525 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16526 break 2
16527 fi
16528done
16529 done
16530IFS=$as_save_IFS
16531
16532 ;;
16533esac
16534fi
16535XSLTPROC=$ac_cv_path_XSLTPROC
16536if test -n "$XSLTPROC"; then
16537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
16538$as_echo "$XSLTPROC" >&6; }
16539else
16540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16541$as_echo "no" >&6; }
16542fi
16543
16544
16545 test -n "$XSLTPROC" && break
16546done
16547test -n "$XSLTPROC" || XSLTPROC="missing"
16548
16549if test "x$USE_MAINTAINER_MODE" = xyes; then
16550 if test "${XSLTPROC}" = missing; then
16551 as_fn_error "unable to find xsltproc. maintainer-mode requires xsltproc." "$LINENO" 5
16552 fi
16553fi
16554
16555
bec39cab
AC
16556ac_sources="$files"
16557ac_dests="$links"
16558while test -n "$ac_sources"; do
16559 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
16560 set $ac_sources; ac_source=$1; shift; ac_sources=$*
16561 ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source"
16562done
81ecdfbb 16563ac_config_links="$ac_config_links $ac_config_links_1"
c906108c
SS
16564
16565
c906108c
SS
16566
16567
c906108c 16568
81ecdfbb 16569$as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
bec39cab 16570
bec39cab 16571
dcd1f979
TT
16572if $development; then
16573
16574$as_echo "#define GDB_SELF_TEST 1" >>confdefs.h
16575
16576fi
16577
b292c783 16578
f6a88844
JM
16579 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
16580 GDB_TRANSFORM_NAME=`echo gdb | sed -e "$gdb_ac_transform"`
16581 if test "x$GDB_TRANSFORM_NAME" = x; then
16582 GDB_TRANSFORM_NAME=gdb
16583 fi
16584
16585
16586
16587 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
16588 GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$gdb_ac_transform"`
16589 if test "x$GCORE_TRANSFORM_NAME" = x; then
16590 GCORE_TRANSFORM_NAME=gcore
16591 fi
16592
b292c783
JK
16593
16594ac_config_files="$ac_config_files gcore"
16595
c971b7fa 16596ac_config_files="$ac_config_files Makefile gdb-gdb.gdb doc/Makefile data-directory/Makefile"
81ecdfbb 16597
89a34d1b 16598
bec39cab
AC
16599cat >confcache <<\_ACEOF
16600# This file is a shell script that caches the results of configure
16601# tests run on this system so they can be shared between configure
16602# scripts and configure runs, see configure's option --config-cache.
16603# It is not useful on other systems. If it contains results you don't
16604# want to keep, you may remove or edit it.
16605#
16606# config.status only pays attention to the cache file if you give it
16607# the --recheck option to rerun configure.
16608#
16609# `ac_cv_env_foo' variables (set or unset) will be overridden when
16610# loading this file, other *unset* `ac_cv_foo' will be assigned the
16611# following values.
16612
16613_ACEOF
16614
16615# The following way of writing the cache mishandles newlines in values,
16616# but we know of no workaround that is simple, portable, and efficient.
81ecdfbb 16617# So, we kill variables containing newlines.
bec39cab
AC
16618# Ultrix sh set writes to stderr and can't be redirected directly,
16619# and sets the high bit in the cache file unless we assign to the vars.
81ecdfbb
RW
16620(
16621 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16622 eval ac_val=\$$ac_var
16623 case $ac_val in #(
16624 *${as_nl}*)
16625 case $ac_var in #(
16626 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16627$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
16628 esac
16629 case $ac_var in #(
16630 _ | IFS | as_nl) ;; #(
16631 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16632 *) { eval $ac_var=; unset $ac_var;} ;;
16633 esac ;;
16634 esac
16635 done
16636
bec39cab 16637 (set) 2>&1 |
81ecdfbb
RW
16638 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16639 *${as_nl}ac_space=\ *)
16640 # `set' does not quote correctly, so add quotes: double-quote
16641 # substitution turns \\\\ into \\, and sed turns \\ into \.
bec39cab
AC
16642 sed -n \
16643 "s/'/'\\\\''/g;
16644 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
81ecdfbb 16645 ;; #(
bec39cab
AC
16646 *)
16647 # `set' quotes correctly as required by POSIX, so do not add quotes.
81ecdfbb 16648 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
bec39cab 16649 ;;
81ecdfbb
RW
16650 esac |
16651 sort
16652) |
bec39cab 16653 sed '
81ecdfbb 16654 /^ac_cv_env_/b end
bec39cab 16655 t clear
81ecdfbb 16656 :clear
bec39cab
AC
16657 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16658 t end
81ecdfbb
RW
16659 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16660 :end' >>confcache
16661if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16662 if test -w "$cache_file"; then
16663 test "x$cache_file" != "x/dev/null" &&
16664 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16665$as_echo "$as_me: updating cache $cache_file" >&6;}
bec39cab
AC
16666 cat confcache >$cache_file
16667 else
81ecdfbb
RW
16668 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16669$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
bec39cab
AC
16670 fi
16671fi
16672rm -f confcache
16673
16674test "x$prefix" = xNONE && prefix=$ac_default_prefix
16675# Let make expand exec_prefix.
16676test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16677
bec39cab
AC
16678DEFS=-DHAVE_CONFIG_H
16679
16680ac_libobjs=
16681ac_ltlibobjs=
16682for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16683 # 1. Remove the extension, and $U if already installed.
81ecdfbb
RW
16684 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
16685 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
16686 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16687 # will be set to the directory where LIBOBJS objects are built.
16688 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16689 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
bec39cab
AC
16690done
16691LIBOBJS=$ac_libobjs
16692
16693LTLIBOBJS=$ac_ltlibobjs
16694
16695
85981d60 16696if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
81ecdfbb
RW
16697 as_fn_error "conditional \"MAINTAINER_MODE\" was never defined.
16698Usually this means the macro was only invoked conditionally." "$LINENO" 5
85981d60 16699fi
a417dc56 16700if test -z "${GMAKE_TRUE}" && test -z "${GMAKE_FALSE}"; then
81ecdfbb
RW
16701 as_fn_error "conditional \"GMAKE\" was never defined.
16702Usually this means the macro was only invoked conditionally." "$LINENO" 5
a417dc56 16703fi
4df42755
DE
16704if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then
16705 as_fn_error "conditional \"HAVE_PYTHON\" was never defined.
16706Usually this means the macro was only invoked conditionally." "$LINENO" 5
16707fi
16708if test -z "${HAVE_GUILE_TRUE}" && test -z "${HAVE_GUILE_FALSE}"; then
16709 as_fn_error "conditional \"HAVE_GUILE\" was never defined.
16710Usually this means the macro was only invoked conditionally." "$LINENO" 5
16711fi
81ecdfbb
RW
16712
16713
bec39cab 16714: ${CONFIG_STATUS=./config.status}
81ecdfbb 16715ac_write_fail=0
bec39cab
AC
16716ac_clean_files_save=$ac_clean_files
16717ac_clean_files="$ac_clean_files $CONFIG_STATUS"
81ecdfbb
RW
16718{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16719$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16720as_write_fail=0
16721cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
bec39cab
AC
16722#! $SHELL
16723# Generated by $as_me.
16724# Run this file to recreate the current configuration.
16725# Compiler output produced by configure, useful for debugging
16726# configure, is in config.log if it exists.
16727
16728debug=false
16729ac_cs_recheck=false
16730ac_cs_silent=false
bec39cab 16731
81ecdfbb
RW
16732SHELL=\${CONFIG_SHELL-$SHELL}
16733export SHELL
16734_ASEOF
16735cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16736## -------------------- ##
16737## M4sh Initialization. ##
16738## -------------------- ##
16739
16740# Be more Bourne compatible
16741DUALCASE=1; export DUALCASE # for MKS sh
16742if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
16743 emulate sh
16744 NULLCMD=:
81ecdfbb 16745 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
16746 # is contrary to our usage. Disable this feature.
16747 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
16748 setopt NO_GLOB_SUBST
16749else
16750 case `(set -o) 2>/dev/null` in #(
16751 *posix*) :
16752 set -o posix ;; #(
16753 *) :
16754 ;;
16755esac
bec39cab 16756fi
bec39cab 16757
81ecdfbb
RW
16758
16759as_nl='
16760'
16761export as_nl
16762# Printing a long string crashes Solaris 7 /usr/bin/printf.
16763as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16764as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16765as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16766# Prefer a ksh shell builtin over an external printf program on Solaris,
16767# but without wasting forks for bash or zsh.
16768if test -z "$BASH_VERSION$ZSH_VERSION" \
16769 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16770 as_echo='print -r --'
16771 as_echo_n='print -rn --'
16772elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16773 as_echo='printf %s\n'
16774 as_echo_n='printf %s'
16775else
16776 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16777 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16778 as_echo_n='/usr/ucb/echo -n'
16779 else
16780 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16781 as_echo_n_body='eval
16782 arg=$1;
16783 case $arg in #(
16784 *"$as_nl"*)
16785 expr "X$arg" : "X\\(.*\\)$as_nl";
16786 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16787 esac;
16788 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16789 '
16790 export as_echo_n_body
16791 as_echo_n='sh -c $as_echo_n_body as_echo'
16792 fi
16793 export as_echo_body
16794 as_echo='sh -c $as_echo_body as_echo'
16795fi
16796
16797# The user is always right.
16798if test "${PATH_SEPARATOR+set}" != set; then
16799 PATH_SEPARATOR=:
16800 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16801 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16802 PATH_SEPARATOR=';'
16803 }
bec39cab
AC
16804fi
16805
16806
81ecdfbb
RW
16807# IFS
16808# We need space, tab and new line, in precisely that order. Quoting is
16809# there to prevent editors from complaining about space-tab.
16810# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16811# splitting by setting IFS to empty value.)
16812IFS=" "" $as_nl"
16813
16814# Find who we are. Look in the path if we contain no directory separator.
16815case $0 in #((
16816 *[\\/]* ) as_myself=$0 ;;
16817 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16818for as_dir in $PATH
16819do
16820 IFS=$as_save_IFS
16821 test -z "$as_dir" && as_dir=.
16822 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16823 done
16824IFS=$as_save_IFS
16825
16826 ;;
16827esac
16828# We did not find ourselves, most probably we were run as `sh COMMAND'
16829# in which case we are not to be found in the path.
16830if test "x$as_myself" = x; then
16831 as_myself=$0
16832fi
16833if test ! -f "$as_myself"; then
16834 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16835 exit 1
16836fi
16837
16838# Unset variables that we do not need and which cause bugs (e.g. in
16839# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16840# suppresses any "Segmentation fault" message there. '((' could
16841# trigger a bug in pdksh 5.2.14.
16842for as_var in BASH_ENV ENV MAIL MAILPATH
16843do eval test x\${$as_var+set} = xset \
16844 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
16845done
bec39cab
AC
16846PS1='$ '
16847PS2='> '
16848PS4='+ '
16849
16850# NLS nuisances.
81ecdfbb
RW
16851LC_ALL=C
16852export LC_ALL
16853LANGUAGE=C
16854export LANGUAGE
16855
16856# CDPATH.
16857(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16858
16859
16860# as_fn_error ERROR [LINENO LOG_FD]
16861# ---------------------------------
16862# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16863# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
16864# script with status $?, using 1 if that was 0.
16865as_fn_error ()
16866{
16867 as_status=$?; test $as_status -eq 0 && as_status=1
16868 if test "$3"; then
16869 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16870 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
16871 fi
16872 $as_echo "$as_me: error: $1" >&2
16873 as_fn_exit $as_status
16874} # as_fn_error
16875
16876
16877# as_fn_set_status STATUS
16878# -----------------------
16879# Set $? to STATUS, without forking.
16880as_fn_set_status ()
16881{
16882 return $1
16883} # as_fn_set_status
16884
16885# as_fn_exit STATUS
16886# -----------------
16887# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16888as_fn_exit ()
16889{
16890 set +e
16891 as_fn_set_status $1
16892 exit $1
16893} # as_fn_exit
16894
16895# as_fn_unset VAR
16896# ---------------
16897# Portably unset VAR.
16898as_fn_unset ()
16899{
16900 { eval $1=; unset $1;}
16901}
16902as_unset=as_fn_unset
16903# as_fn_append VAR VALUE
16904# ----------------------
16905# Append the text in VALUE to the end of the definition contained in VAR. Take
16906# advantage of any shell optimizations that allow amortized linear growth over
16907# repeated appends, instead of the typical quadratic growth present in naive
16908# implementations.
16909if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16910 eval 'as_fn_append ()
16911 {
16912 eval $1+=\$2
16913 }'
16914else
16915 as_fn_append ()
16916 {
16917 eval $1=\$$1\$2
16918 }
16919fi # as_fn_append
16920
16921# as_fn_arith ARG...
16922# ------------------
16923# Perform arithmetic evaluation on the ARGs, and store the result in the
16924# global $as_val. Take advantage of shells that can avoid forks. The arguments
16925# must be portable across $(()) and expr.
16926if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16927 eval 'as_fn_arith ()
16928 {
16929 as_val=$(( $* ))
16930 }'
16931else
16932 as_fn_arith ()
16933 {
16934 as_val=`expr "$@" || test $? -eq 1`
16935 }
16936fi # as_fn_arith
bec39cab 16937
81ecdfbb
RW
16938
16939if expr a : '\(a\)' >/dev/null 2>&1 &&
16940 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
16941 as_expr=expr
16942else
16943 as_expr=false
16944fi
16945
81ecdfbb 16946if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
16947 as_basename=basename
16948else
16949 as_basename=false
16950fi
16951
81ecdfbb
RW
16952if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16953 as_dirname=dirname
16954else
16955 as_dirname=false
16956fi
bec39cab 16957
81ecdfbb 16958as_me=`$as_basename -- "$0" ||
bec39cab
AC
16959$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16960 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
16961 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
16962$as_echo X/"$0" |
16963 sed '/^.*\/\([^/][^/]*\)\/*$/{
16964 s//\1/
16965 q
16966 }
16967 /^X\/\(\/\/\)$/{
16968 s//\1/
16969 q
16970 }
16971 /^X\/\(\/\).*/{
16972 s//\1/
16973 q
16974 }
16975 s/.*/./; q'`
b4e70030 16976
b4e70030
JB
16977# Avoid depending upon Character Ranges.
16978as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16979as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16980as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16981as_cr_digits='0123456789'
16982as_cr_alnum=$as_cr_Letters$as_cr_digits
16983
81ecdfbb
RW
16984ECHO_C= ECHO_N= ECHO_T=
16985case `echo -n x` in #(((((
16986-n*)
16987 case `echo 'xy\c'` in
16988 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
16989 xy) ECHO_C='\c';;
16990 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16991 ECHO_T=' ';;
16992 esac;;
16993*)
16994 ECHO_N='-n';;
bec39cab
AC
16995esac
16996
81ecdfbb
RW
16997rm -f conf$$ conf$$.exe conf$$.file
16998if test -d conf$$.dir; then
16999 rm -f conf$$.dir/conf$$.file
bec39cab 17000else
81ecdfbb
RW
17001 rm -f conf$$.dir
17002 mkdir conf$$.dir 2>/dev/null
bec39cab 17003fi
81ecdfbb
RW
17004if (echo >conf$$.file) 2>/dev/null; then
17005 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 17006 as_ln_s='ln -s'
81ecdfbb
RW
17007 # ... but there are two gotchas:
17008 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17009 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
17010 # In both cases, we have to default to `cp -p'.
17011 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
17012 as_ln_s='cp -p'
17013 elif ln conf$$.file conf$$ 2>/dev/null; then
17014 as_ln_s=ln
17015 else
17016 as_ln_s='cp -p'
b4e70030 17017 fi
bec39cab
AC
17018else
17019 as_ln_s='cp -p'
17020fi
81ecdfbb
RW
17021rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17022rmdir conf$$.dir 2>/dev/null
17023
17024
17025# as_fn_mkdir_p
17026# -------------
17027# Create "$as_dir" as a directory, including parents if necessary.
17028as_fn_mkdir_p ()
17029{
17030
17031 case $as_dir in #(
17032 -*) as_dir=./$as_dir;;
17033 esac
17034 test -d "$as_dir" || eval $as_mkdir_p || {
17035 as_dirs=
17036 while :; do
17037 case $as_dir in #(
17038 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17039 *) as_qdir=$as_dir;;
17040 esac
17041 as_dirs="'$as_qdir' $as_dirs"
17042 as_dir=`$as_dirname -- "$as_dir" ||
17043$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17044 X"$as_dir" : 'X\(//\)[^/]' \| \
17045 X"$as_dir" : 'X\(//\)$' \| \
17046 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17047$as_echo X"$as_dir" |
17048 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17049 s//\1/
17050 q
17051 }
17052 /^X\(\/\/\)[^/].*/{
17053 s//\1/
17054 q
17055 }
17056 /^X\(\/\/\)$/{
17057 s//\1/
17058 q
17059 }
17060 /^X\(\/\).*/{
17061 s//\1/
17062 q
17063 }
17064 s/.*/./; q'`
17065 test -d "$as_dir" && break
17066 done
17067 test -z "$as_dirs" || eval "mkdir $as_dirs"
17068 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
17069
bec39cab 17070
81ecdfbb 17071} # as_fn_mkdir_p
bec39cab 17072if mkdir -p . 2>/dev/null; then
81ecdfbb 17073 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
17074else
17075 test -d ./-p && rmdir ./-p
17076 as_mkdir_p=false
17077fi
17078
81ecdfbb
RW
17079if test -x / >/dev/null 2>&1; then
17080 as_test_x='test -x'
17081else
17082 if ls -dL / >/dev/null 2>&1; then
17083 as_ls_L_option=L
17084 else
17085 as_ls_L_option=
17086 fi
17087 as_test_x='
17088 eval sh -c '\''
17089 if test -d "$1"; then
17090 test -d "$1/.";
17091 else
17092 case $1 in #(
17093 -*)set "./$1";;
17094 esac;
17095 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
17096 ???[sx]*):;;*)false;;esac;fi
17097 '\'' sh
17098 '
17099fi
17100as_executable_p=$as_test_x
bec39cab
AC
17101
17102# Sed expression to map a string onto a valid CPP name.
17103as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
17104
17105# Sed expression to map a string onto a valid variable name.
17106as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
17107
17108
bec39cab 17109exec 6>&1
81ecdfbb
RW
17110## ----------------------------------- ##
17111## Main body of $CONFIG_STATUS script. ##
17112## ----------------------------------- ##
17113_ASEOF
17114test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
17115
17116cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17117# Save the log message, to keep $0 and so on meaningful, and to
bec39cab 17118# report actual input values of CONFIG_FILES etc. instead of their
81ecdfbb
RW
17119# values after options handling.
17120ac_log="
bec39cab 17121This file was extended by $as_me, which was
81ecdfbb 17122generated by GNU Autoconf 2.64. Invocation command line was
bec39cab
AC
17123
17124 CONFIG_FILES = $CONFIG_FILES
17125 CONFIG_HEADERS = $CONFIG_HEADERS
17126 CONFIG_LINKS = $CONFIG_LINKS
17127 CONFIG_COMMANDS = $CONFIG_COMMANDS
17128 $ $0 $@
17129
81ecdfbb
RW
17130on `(hostname || uname -n) 2>/dev/null | sed 1q`
17131"
17132
bec39cab
AC
17133_ACEOF
17134
81ecdfbb
RW
17135case $ac_config_files in *"
17136"*) set x $ac_config_files; shift; ac_config_files=$*;;
17137esac
234b45d4 17138
81ecdfbb
RW
17139case $ac_config_headers in *"
17140"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17141esac
b4e70030 17142
b4e70030 17143
81ecdfbb
RW
17144cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17145# Files that config.status was made for.
17146config_files="$ac_config_files"
17147config_headers="$ac_config_headers"
17148config_links="$ac_config_links"
17149config_commands="$ac_config_commands"
234b45d4 17150
81ecdfbb 17151_ACEOF
b4e70030 17152
81ecdfbb 17153cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab 17154ac_cs_usage="\
81ecdfbb
RW
17155\`$as_me' instantiates files and other configuration actions
17156from templates according to the current configuration. Unless the files
17157and actions are specified as TAGs, all are instantiated by default.
234b45d4 17158
81ecdfbb 17159Usage: $0 [OPTION]... [TAG]...
234b45d4 17160
bec39cab 17161 -h, --help print this help, then exit
81ecdfbb
RW
17162 -V, --version print version number and configuration settings, then exit
17163 -q, --quiet, --silent
17164 do not print progress messages
bec39cab
AC
17165 -d, --debug don't remove temporary files
17166 --recheck update $as_me by reconfiguring in the same conditions
81ecdfbb
RW
17167 --file=FILE[:TEMPLATE]
17168 instantiate the configuration file FILE
17169 --header=FILE[:TEMPLATE]
17170 instantiate the configuration header FILE
234b45d4 17171
bec39cab
AC
17172Configuration files:
17173$config_files
234b45d4 17174
bec39cab
AC
17175Configuration headers:
17176$config_headers
234b45d4 17177
bec39cab
AC
17178Configuration links:
17179$config_links
234b45d4 17180
bec39cab
AC
17181Configuration commands:
17182$config_commands
17183
81ecdfbb 17184Report bugs to the package provider."
b4e70030 17185
81ecdfbb
RW
17186_ACEOF
17187cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab
AC
17188ac_cs_version="\\
17189config.status
81ecdfbb
RW
17190configured by $0, generated by GNU Autoconf 2.64,
17191 with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
bec39cab 17192
81ecdfbb 17193Copyright (C) 2009 Free Software Foundation, Inc.
bec39cab
AC
17194This config.status script is free software; the Free Software Foundation
17195gives unlimited permission to copy, distribute and modify it."
81ecdfbb
RW
17196
17197ac_pwd='$ac_pwd'
17198srcdir='$srcdir'
17199INSTALL='$INSTALL'
81ecdfbb
RW
17200AWK='$AWK'
17201test -n "\$AWK" || AWK=awk
bec39cab
AC
17202_ACEOF
17203
81ecdfbb
RW
17204cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17205# The default lists apply if the user does not specify any file.
bec39cab
AC
17206ac_need_defaults=:
17207while test $# != 0
17208do
17209 case $1 in
17210 --*=*)
81ecdfbb
RW
17211 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17212 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
bec39cab 17213 ac_shift=:
c906108c 17214 ;;
81ecdfbb 17215 *)
bec39cab
AC
17216 ac_option=$1
17217 ac_optarg=$2
17218 ac_shift=shift
c906108c 17219 ;;
bec39cab 17220 esac
c906108c 17221
bec39cab
AC
17222 case $ac_option in
17223 # Handling of the options.
bec39cab
AC
17224 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17225 ac_cs_recheck=: ;;
81ecdfbb
RW
17226 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
17227 $as_echo "$ac_cs_version"; exit ;;
17228 --debug | --debu | --deb | --de | --d | -d )
bec39cab
AC
17229 debug=: ;;
17230 --file | --fil | --fi | --f )
17231 $ac_shift
81ecdfbb
RW
17232 case $ac_optarg in
17233 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17234 esac
17235 as_fn_append CONFIG_FILES " '$ac_optarg'"
bec39cab
AC
17236 ac_need_defaults=false;;
17237 --header | --heade | --head | --hea )
17238 $ac_shift
81ecdfbb
RW
17239 case $ac_optarg in
17240 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17241 esac
17242 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
bec39cab 17243 ac_need_defaults=false;;
81ecdfbb
RW
17244 --he | --h)
17245 # Conflict between --help and --header
17246 as_fn_error "ambiguous option: \`$1'
17247Try \`$0 --help' for more information.";;
17248 --help | --hel | -h )
17249 $as_echo "$ac_cs_usage"; exit ;;
bec39cab
AC
17250 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17251 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17252 ac_cs_silent=: ;;
c906108c 17253
bec39cab 17254 # This is an error.
81ecdfbb
RW
17255 -*) as_fn_error "unrecognized option: \`$1'
17256Try \`$0 --help' for more information." ;;
c906108c 17257
81ecdfbb
RW
17258 *) as_fn_append ac_config_targets " $1"
17259 ac_need_defaults=false ;;
c906108c 17260
bec39cab
AC
17261 esac
17262 shift
17263done
c906108c 17264
bec39cab 17265ac_configure_extra_args=
c906108c 17266
bec39cab
AC
17267if $ac_cs_silent; then
17268 exec 6>/dev/null
17269 ac_configure_extra_args="$ac_configure_extra_args --silent"
17270fi
c906108c 17271
bec39cab 17272_ACEOF
81ecdfbb 17273cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab 17274if \$ac_cs_recheck; then
81ecdfbb
RW
17275 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
17276 shift
17277 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17278 CONFIG_SHELL='$SHELL'
17279 export CONFIG_SHELL
17280 exec "\$@"
bec39cab
AC
17281fi
17282
17283_ACEOF
81ecdfbb
RW
17284cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17285exec 5>>config.log
17286{
17287 echo
17288 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17289## Running $as_me. ##
17290_ASBOX
17291 $as_echo "$ac_log"
17292} >&5
bec39cab 17293
81ecdfbb
RW
17294_ACEOF
17295cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
c906108c 17296#
81ecdfbb 17297# INIT-COMMANDS
c906108c 17298#
a417dc56 17299ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
b4e70030 17300
bec39cab
AC
17301_ACEOF
17302
81ecdfbb 17303cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
4e8d927d 17304
81ecdfbb 17305# Handling of arguments.
bec39cab 17306for ac_config_target in $ac_config_targets
c906108c 17307do
81ecdfbb
RW
17308 case $ac_config_target in
17309 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
17310 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
f997c383 17311 "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
81ecdfbb 17312 "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;;
b292c783 17313 "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;;
81ecdfbb 17314 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
e2207b9a 17315 "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;;
5ae98d25 17316 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
aa2e2d8d 17317 "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
81ecdfbb
RW
17318
17319 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
c906108c
SS
17320 esac
17321done
17322
81ecdfbb 17323
bec39cab
AC
17324# If the user did not use the arguments to specify the items to instantiate,
17325# then the envvar interface is used. Set only those that are not.
17326# We use the long form for the default assignment because of an extremely
17327# bizarre bug on SunOS 4.1.3.
17328if $ac_need_defaults; then
17329 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17330 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17331 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
17332 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
17333fi
17334
b4e70030 17335# Have a temporary directory for convenience. Make it in the build tree
81ecdfbb 17336# simply because there is no reason against having it here, and in addition,
b4e70030 17337# creating and moving files from /tmp can sometimes cause problems.
81ecdfbb
RW
17338# Hook for its removal unless debugging.
17339# Note that there is a small window in which the directory will not be cleaned:
17340# after its creation but before its name has been assigned to `$tmp'.
b4e70030
JB
17341$debug ||
17342{
81ecdfbb
RW
17343 tmp=
17344 trap 'exit_status=$?
17345 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
17346' 0
17347 trap 'as_fn_exit 1' 1 2 13 15
17348}
17349# Create a (secure) tmp directory for tmp files.
17350
17351{
17352 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
17353 test -n "$tmp" && test -d "$tmp"
17354} ||
17355{
17356 tmp=./conf$$-$RANDOM
17357 (umask 077 && mkdir "$tmp")
17358} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
17359
17360# Set up the scripts for CONFIG_FILES section.
17361# No need to generate them if there are no CONFIG_FILES.
17362# This happens for instance with `./config.status config.h'.
17363if test -n "$CONFIG_FILES"; then
17364
17365if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
17366 ac_cs_awk_getline=:
17367 ac_cs_awk_pipe_init=
17368 ac_cs_awk_read_file='
17369 while ((getline aline < (F[key])) > 0)
17370 print(aline)
17371 close(F[key])'
17372 ac_cs_awk_pipe_fini=
17373else
17374 ac_cs_awk_getline=false
17375 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
17376 ac_cs_awk_read_file='
17377 print "|#_!!_#|"
17378 print "cat " F[key] " &&"
17379 '$ac_cs_awk_pipe_init
17380 # The final `:' finishes the AND list.
17381 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
17382fi
17383ac_cr=`echo X | tr X '\015'`
17384# On cygwin, bash can eat \r inside `` if the user requested igncr.
17385# But we know of no other shell where ac_cr would be empty at this
17386# point, so we can use a bashism as a fallback.
17387if test "x$ac_cr" = x; then
17388 eval ac_cr=\$\'\\r\'
17389fi
17390ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17391if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
17392 ac_cs_awk_cr='\r'
17393else
17394 ac_cs_awk_cr=$ac_cr
17395fi
17396
17397echo 'BEGIN {' >"$tmp/subs1.awk" &&
17398_ACEOF
17399
17400# Create commands to substitute file output variables.
17401{
17402 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
17403 echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' &&
17404 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
17405 echo "_ACAWK" &&
17406 echo "_ACEOF"
17407} >conf$$files.sh &&
17408. ./conf$$files.sh ||
17409 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
17410rm -f conf$$files.sh
17411
17412{
17413 echo "cat >conf$$subs.awk <<_ACEOF" &&
17414 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17415 echo "_ACEOF"
17416} >conf$$subs.sh ||
17417 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
17418ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
17419ac_delim='%!_!# '
17420for ac_last_try in false false false false false :; do
17421 . ./conf$$subs.sh ||
17422 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
17423
17424 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17425 if test $ac_delim_n = $ac_delim_num; then
17426 break
17427 elif $ac_last_try; then
17428 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
17429 else
17430 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17431 fi
17432done
17433rm -f conf$$subs.sh
17434
17435cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17436cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
17437_ACEOF
17438sed -n '
17439h
17440s/^/S["/; s/!.*/"]=/
17441p
17442g
17443s/^[^!]*!//
17444:repl
17445t repl
17446s/'"$ac_delim"'$//
17447t delim
17448:nl
17449h
17450s/\(.\{148\}\).*/\1/
17451t more1
17452s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17453p
17454n
17455b repl
17456:more1
17457s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17458p
17459g
17460s/.\{148\}//
17461t nl
17462:delim
17463h
17464s/\(.\{148\}\).*/\1/
17465t more2
17466s/["\\]/\\&/g; s/^/"/; s/$/"/
17467p
17468b
17469:more2
17470s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17471p
17472g
17473s/.\{148\}//
17474t delim
17475' <conf$$subs.awk | sed '
17476/^[^""]/{
17477 N
17478 s/\n//
17479}
17480' >>$CONFIG_STATUS || ac_write_fail=1
17481rm -f conf$$subs.awk
17482cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17483_ACAWK
17484cat >>"\$tmp/subs1.awk" <<_ACAWK &&
17485 for (key in S) S_is_set[key] = 1
17486 FS = "\a"
17487 \$ac_cs_awk_pipe_init
17488}
17489{
17490 line = $ 0
17491 nfields = split(line, field, "@")
17492 substed = 0
17493 len = length(field[1])
17494 for (i = 2; i < nfields; i++) {
17495 key = field[i]
17496 keylen = length(key)
17497 if (S_is_set[key]) {
17498 value = S[key]
17499 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17500 len += length(value) + length(field[++i])
17501 substed = 1
17502 } else
17503 len += 1 + keylen
17504 }
17505 if (nfields == 3 && !substed) {
17506 key = field[2]
17507 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
17508 \$ac_cs_awk_read_file
17509 next
17510 }
17511 }
17512 print line
b4e70030 17513}
81ecdfbb
RW
17514\$ac_cs_awk_pipe_fini
17515_ACAWK
17516_ACEOF
17517cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17518if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17519 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17520else
17521 cat
17522fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
17523 || as_fn_error "could not setup config files machinery" "$LINENO" 5
17524_ACEOF
17525
17526# VPATH may cause trouble with some makes, so we remove $(srcdir),
17527# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
17528# trailing colons and then remove the whole line if VPATH becomes empty
17529# (actually we leave an empty line to preserve line numbers).
17530if test "x$srcdir" = x.; then
17531 ac_vpsub='/^[ ]*VPATH[ ]*=/{
17532s/:*\$(srcdir):*/:/
17533s/:*\${srcdir}:*/:/
17534s/:*@srcdir@:*/:/
17535s/^\([^=]*=[ ]*\):*/\1/
17536s/:*$//
17537s/^[^=]*=[ ]*$//
17538}'
17539fi
17540
17541cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17542fi # test -n "$CONFIG_FILES"
17543
17544# Set up the scripts for CONFIG_HEADERS section.
17545# No need to generate them if there are no CONFIG_HEADERS.
17546# This happens for instance with `./config.status Makefile'.
17547if test -n "$CONFIG_HEADERS"; then
17548cat >"$tmp/defines.awk" <<\_ACAWK ||
17549BEGIN {
17550_ACEOF
17551
17552# Transform confdefs.h into an awk script `defines.awk', embedded as
17553# here-document in config.status, that substitutes the proper values into
17554# config.h.in to produce config.h.
4e8d927d 17555
81ecdfbb
RW
17556# Create a delimiter string that does not exist in confdefs.h, to ease
17557# handling of long lines.
17558ac_delim='%!_!# '
17559for ac_last_try in false false :; do
17560 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
17561 if test -z "$ac_t"; then
17562 break
17563 elif $ac_last_try; then
17564 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
17565 else
17566 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17567 fi
17568done
4e8d927d 17569
81ecdfbb
RW
17570# For the awk script, D is an array of macro values keyed by name,
17571# likewise P contains macro parameters if any. Preserve backslash
17572# newline sequences.
17573
17574ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17575sed -n '
17576s/.\{148\}/&'"$ac_delim"'/g
17577t rset
17578:rset
17579s/^[ ]*#[ ]*define[ ][ ]*/ /
17580t def
17581d
17582:def
17583s/\\$//
17584t bsnl
17585s/["\\]/\\&/g
17586s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17587D["\1"]=" \3"/p
17588s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17589d
17590:bsnl
17591s/["\\]/\\&/g
17592s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17593D["\1"]=" \3\\\\\\n"\\/p
17594t cont
17595s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17596t cont
17597d
17598:cont
17599n
17600s/.\{148\}/&'"$ac_delim"'/g
17601t clear
17602:clear
17603s/\\$//
17604t bsnlc
17605s/["\\]/\\&/g; s/^/"/; s/$/"/p
17606d
17607:bsnlc
17608s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17609b cont
17610' <confdefs.h | sed '
17611s/'"$ac_delim"'/"\\\
17612"/g' >>$CONFIG_STATUS || ac_write_fail=1
17613
17614cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17615 for (key in D) D_is_set[key] = 1
17616 FS = "\a"
17617}
17618/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17619 line = \$ 0
17620 split(line, arg, " ")
17621 if (arg[1] == "#") {
17622 defundef = arg[2]
17623 mac1 = arg[3]
17624 } else {
17625 defundef = substr(arg[1], 2)
17626 mac1 = arg[2]
17627 }
17628 split(mac1, mac2, "(") #)
17629 macro = mac2[1]
17630 prefix = substr(line, 1, index(line, defundef) - 1)
17631 if (D_is_set[macro]) {
17632 # Preserve the white space surrounding the "#".
17633 print prefix "define", macro P[macro] D[macro]
17634 next
17635 } else {
17636 # Replace #undef with comments. This is necessary, for example,
17637 # in the case of _POSIX_SOURCE, which is predefined and required
17638 # on some systems where configure will not decide to define it.
17639 if (defundef == "undef") {
17640 print "/*", prefix defundef, macro, "*/"
17641 next
17642 }
17643 }
b4e70030 17644}
81ecdfbb
RW
17645{ print }
17646_ACAWK
b4e70030 17647_ACEOF
81ecdfbb
RW
17648cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17649 as_fn_error "could not setup config headers machinery" "$LINENO" 5
17650fi # test -n "$CONFIG_HEADERS"
4e8d927d 17651
4e8d927d 17652
81ecdfbb
RW
17653eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
17654shift
17655for ac_tag
17656do
17657 case $ac_tag in
17658 :[FHLC]) ac_mode=$ac_tag; continue;;
17659 esac
17660 case $ac_mode$ac_tag in
17661 :[FHL]*:*);;
17662 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
17663 :[FH]-) ac_tag=-:-;;
17664 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17665 esac
17666 ac_save_IFS=$IFS
17667 IFS=:
17668 set x $ac_tag
17669 IFS=$ac_save_IFS
17670 shift
17671 ac_file=$1
17672 shift
4e8d927d 17673
81ecdfbb
RW
17674 case $ac_mode in
17675 :L) ac_source=$1;;
17676 :[FH])
17677 ac_file_inputs=
17678 for ac_f
17679 do
17680 case $ac_f in
17681 -) ac_f="$tmp/stdin";;
17682 *) # Look for the file first in the build tree, then in the source tree
17683 # (if the path is not absolute). The absolute path cannot be DOS-style,
17684 # because $ac_f cannot contain `:'.
17685 test -f "$ac_f" ||
17686 case $ac_f in
17687 [\\/$]*) false;;
17688 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17689 esac ||
17690 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
17691 esac
17692 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17693 as_fn_append ac_file_inputs " '$ac_f'"
17694 done
17695
17696 # Let's still pretend it is `configure' which instantiates (i.e., don't
17697 # use $as_me), people would be surprised to read:
17698 # /* config.h. Generated by config.status. */
17699 configure_input='Generated from '`
17700 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17701 `' by configure.'
17702 if test x"$ac_file" != x-; then
17703 configure_input="$ac_file. $configure_input"
17704 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17705$as_echo "$as_me: creating $ac_file" >&6;}
b4e70030 17706 fi
81ecdfbb
RW
17707 # Neutralize special characters interpreted by sed in replacement strings.
17708 case $configure_input in #(
17709 *\&* | *\|* | *\\* )
17710 ac_sed_conf_input=`$as_echo "$configure_input" |
17711 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17712 *) ac_sed_conf_input=$configure_input;;
17713 esac
4e8d927d 17714
81ecdfbb
RW
17715 case $ac_tag in
17716 *:-:* | *:-) cat >"$tmp/stdin" \
17717 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
17718 esac
17719 ;;
c906108c
SS
17720 esac
17721
81ecdfbb 17722 ac_dir=`$as_dirname -- "$ac_file" ||
bec39cab
AC
17723$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17724 X"$ac_file" : 'X\(//\)[^/]' \| \
17725 X"$ac_file" : 'X\(//\)$' \| \
81ecdfbb
RW
17726 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
17727$as_echo X"$ac_file" |
17728 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17729 s//\1/
17730 q
17731 }
17732 /^X\(\/\/\)[^/].*/{
17733 s//\1/
17734 q
17735 }
17736 /^X\(\/\/\)$/{
17737 s//\1/
17738 q
17739 }
17740 /^X\(\/\).*/{
17741 s//\1/
17742 q
17743 }
17744 s/.*/./; q'`
17745 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
17746 ac_builddir=.
17747
81ecdfbb
RW
17748case "$ac_dir" in
17749.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17750*)
17751 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
17752 # A ".." for each directory in $ac_dir_suffix.
17753 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
17754 case $ac_top_builddir_sub in
17755 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17756 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17757 esac ;;
17758esac
17759ac_abs_top_builddir=$ac_pwd
17760ac_abs_builddir=$ac_pwd$ac_dir_suffix
17761# for backward compatibility:
17762ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
17763
17764case $srcdir in
81ecdfbb 17765 .) # We are building in place.
bec39cab 17766 ac_srcdir=.
81ecdfbb
RW
17767 ac_top_srcdir=$ac_top_builddir_sub
17768 ac_abs_top_srcdir=$ac_pwd ;;
17769 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 17770 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
17771 ac_top_srcdir=$srcdir
17772 ac_abs_top_srcdir=$srcdir ;;
17773 *) # Relative name.
17774 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17775 ac_top_srcdir=$ac_top_build_prefix$srcdir
17776 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 17777esac
81ecdfbb 17778ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 17779
c906108c 17780
81ecdfbb
RW
17781 case $ac_mode in
17782 :F)
17783 #
17784 # CONFIG_FILE
17785 #
c906108c 17786
bec39cab
AC
17787 case $INSTALL in
17788 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
81ecdfbb 17789 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
c906108c 17790 esac
81ecdfbb 17791_ACEOF
121ce6e5 17792
81ecdfbb
RW
17793cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17794# If the template does not know about datarootdir, expand it.
17795# FIXME: This hack should be removed a few years after 2.60.
17796ac_datarootdir_hack=; ac_datarootdir_seen=
17797ac_sed_dataroot='
17798/datarootdir/ {
17799 p
17800 q
17801}
17802/@datadir@/p
17803/@docdir@/p
17804/@infodir@/p
17805/@localedir@/p
17806/@mandir@/p'
17807case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
17808*datarootdir*) ac_datarootdir_seen=yes;;
17809*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
17810 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17811$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
17812_ACEOF
17813cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17814 ac_datarootdir_hack='
17815 s&@datadir@&$datadir&g
17816 s&@docdir@&$docdir&g
17817 s&@infodir@&$infodir&g
17818 s&@localedir@&$localedir&g
17819 s&@mandir@&$mandir&g
17820 s&\\\${datarootdir}&$datarootdir&g' ;;
17821esac
4e8d927d 17822_ACEOF
81ecdfbb
RW
17823
17824# Neutralize VPATH when `$srcdir' = `.'.
17825# Shell code in configure.ac might set extrasub.
17826# FIXME: do we really want to maintain this feature?
17827cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17828ac_sed_extra="$ac_vpsub
bec39cab
AC
17829$extrasub
17830_ACEOF
81ecdfbb 17831cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab
AC
17832:t
17833/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
81ecdfbb
RW
17834s|@configure_input@|$ac_sed_conf_input|;t t
17835s&@top_builddir@&$ac_top_builddir_sub&;t t
17836s&@top_build_prefix@&$ac_top_build_prefix&;t t
17837s&@srcdir@&$ac_srcdir&;t t
17838s&@abs_srcdir@&$ac_abs_srcdir&;t t
17839s&@top_srcdir@&$ac_top_srcdir&;t t
17840s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17841s&@builddir@&$ac_builddir&;t t
17842s&@abs_builddir@&$ac_abs_builddir&;t t
17843s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17844s&@INSTALL@&$ac_INSTALL&;t t
81ecdfbb
RW
17845$ac_datarootdir_hack
17846"
17847eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
17848if $ac_cs_awk_getline; then
17849 $AWK -f "$tmp/subs.awk"
17850else
17851 $AWK -f "$tmp/subs.awk" | $SHELL
17852fi >$tmp/out \
17853 || as_fn_error "could not create $ac_file" "$LINENO" 5
17854
17855test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
17856 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
17857 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
17858 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
17859which seems to be undefined. Please make sure it is defined." >&5
17860$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
17861which seems to be undefined. Please make sure it is defined." >&2;}
17862
17863 rm -f "$tmp/stdin"
bec39cab 17864 case $ac_file in
81ecdfbb
RW
17865 -) cat "$tmp/out" && rm -f "$tmp/out";;
17866 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
17867 esac \
17868 || as_fn_error "could not create $ac_file" "$LINENO" 5
17869 ;;
17870 :H)
17871 #
17872 # CONFIG_HEADER
17873 #
bec39cab 17874 if test x"$ac_file" != x-; then
81ecdfbb
RW
17875 {
17876 $as_echo "/* $configure_input */" \
17877 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
17878 } >"$tmp/config.h" \
17879 || as_fn_error "could not create $ac_file" "$LINENO" 5
17880 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
17881 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17882$as_echo "$as_me: $ac_file is unchanged" >&6;}
bec39cab 17883 else
81ecdfbb
RW
17884 rm -f "$ac_file"
17885 mv "$tmp/config.h" "$ac_file" \
17886 || as_fn_error "could not create $ac_file" "$LINENO" 5
bec39cab
AC
17887 fi
17888 else
81ecdfbb
RW
17889 $as_echo "/* $configure_input */" \
17890 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
17891 || as_fn_error "could not create -" "$LINENO" 5
bec39cab 17892 fi
81ecdfbb
RW
17893 ;;
17894 :L)
17895 #
17896 # CONFIG_LINK
17897 #
c906108c 17898
81ecdfbb
RW
17899 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
17900 :
b4e70030 17901 else
81ecdfbb
RW
17902 # Prefer the file from the source tree if names are identical.
17903 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
17904 ac_source=$srcdir/$ac_source
17905 fi
b4e70030 17906
81ecdfbb
RW
17907 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
17908$as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
b4e70030 17909
81ecdfbb
RW
17910 if test ! -r "$ac_source"; then
17911 as_fn_error "$ac_source: file not found" "$LINENO" 5
17912 fi
17913 rm -f "$ac_file"
bec39cab 17914
81ecdfbb
RW
17915 # Try a relative symlink, then a hard link, then a copy.
17916 case $srcdir in
17917 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
17918 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
17919 esac
17920 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
17921 ln "$ac_source" "$ac_file" 2>/dev/null ||
17922 cp -p "$ac_source" "$ac_file" ||
17923 as_fn_error "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
17924 fi
17925 ;;
17926 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
17927$as_echo "$as_me: executing $ac_file commands" >&6;}
17928 ;;
c906108c 17929 esac
b4e70030 17930
bec39cab 17931
81ecdfbb
RW
17932 case $ac_file$ac_mode in
17933 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
b292c783 17934 "gcore":F) chmod +x gcore ;;
1e94266c
SM
17935 "Makefile":F)
17936case x$CONFIG_HEADERS in
17937xconfig.h:config.in)
17938echo > stamp-h ;;
17939esac
17940 ;;
17941 "gdb-gdb.gdb":F)
17942case x$CONFIG_HEADERS in
17943xconfig.h:config.in)
17944echo > stamp-h ;;
17945esac
17946 ;;
17947 "doc/Makefile":F)
17948case x$CONFIG_HEADERS in
17949xconfig.h:config.in)
17950echo > stamp-h ;;
17951esac
17952 ;;
17953 "data-directory/Makefile":F)
c906108c
SS
17954case x$CONFIG_HEADERS in
17955xconfig.h:config.in)
17956echo > stamp-h ;;
17957esac
bec39cab 17958 ;;
81ecdfbb 17959
bec39cab 17960 esac
81ecdfbb 17961done # for ac_tag
c906108c 17962
bec39cab 17963
81ecdfbb 17964as_fn_exit 0
bec39cab 17965_ACEOF
bec39cab
AC
17966ac_clean_files=$ac_clean_files_save
17967
81ecdfbb
RW
17968test $ac_write_fail = 0 ||
17969 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
17970
bec39cab
AC
17971
17972# configure is writing to config.log, and then calls config.status.
17973# config.status does its own redirection, appending to config.log.
17974# Unfortunately, on DOS this fails, as config.log is still kept open
17975# by configure, so config.status won't be able to write to it; its
17976# output is simply discarded. So we exec the FD to /dev/null,
17977# effectively closing config.log, so it can be properly (re)opened and
17978# appended to by config.status. When coming back to configure, we
17979# need to make the FD available again.
17980if test "$no_create" != yes; then
17981 ac_cs_success=:
17982 ac_config_status_args=
17983 test "$silent" = yes &&
17984 ac_config_status_args="$ac_config_status_args --quiet"
17985 exec 5>/dev/null
17986 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
17987 exec 5>>config.log
17988 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17989 # would make configure fail if this is the last instruction.
81ecdfbb 17990 $ac_cs_success || as_fn_exit $?
bec39cab 17991fi
c906108c 17992
bec39cab 17993#
81ecdfbb 17994# CONFIG_SUBDIRS section.
bec39cab 17995#
c906108c
SS
17996if test "$no_recursion" != yes; then
17997
81ecdfbb
RW
17998 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
17999 # so they do not pile up.
c906108c
SS
18000 ac_sub_configure_args=
18001 ac_prev=
fdc59709
PB
18002 eval "set x $ac_configure_args"
18003 shift
18004 for ac_arg
18005 do
c906108c
SS
18006 if test -n "$ac_prev"; then
18007 ac_prev=
18008 continue
18009 fi
bec39cab 18010 case $ac_arg in
c906108c
SS
18011 -cache-file | --cache-file | --cache-fil | --cache-fi \
18012 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
18013 ac_prev=cache_file ;;
18014 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
bec39cab
AC
18015 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
18016 | --c=*)
18017 ;;
18018 --config-cache | -C)
c906108c
SS
18019 ;;
18020 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
18021 ac_prev=srcdir ;;
18022 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
18023 ;;
bec39cab
AC
18024 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
18025 ac_prev=prefix ;;
18026 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
18027 ;;
81ecdfbb
RW
18028 --disable-option-checking)
18029 ;;
fdc59709
PB
18030 *)
18031 case $ac_arg in
81ecdfbb 18032 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 18033 esac
81ecdfbb 18034 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
c906108c
SS
18035 esac
18036 done
18037
bec39cab
AC
18038 # Always prepend --prefix to ensure using the same prefix
18039 # in subdir configurations.
fdc59709
PB
18040 ac_arg="--prefix=$prefix"
18041 case $ac_arg in
81ecdfbb 18042 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 18043 esac
81ecdfbb
RW
18044 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
18045
18046 # Pass --silent
18047 if test "$silent" = yes; then
18048 ac_sub_configure_args="--silent $ac_sub_configure_args"
18049 fi
18050
18051 # Always prepend --disable-option-checking to silence warnings, since
18052 # different subdirs can have different --enable and --with options.
18053 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
bec39cab 18054
b4e70030 18055 ac_popdir=`pwd`
bec39cab 18056 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
c906108c
SS
18057
18058 # Do not complain, so a configure script can configure whichever
18059 # parts of a large source tree are present.
fdc59709 18060 test -d "$srcdir/$ac_dir" || continue
c906108c 18061
81ecdfbb
RW
18062 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
18063 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
18064 $as_echo "$ac_msg" >&6
18065 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
18066 ac_builddir=.
18067
81ecdfbb
RW
18068case "$ac_dir" in
18069.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18070*)
18071 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
18072 # A ".." for each directory in $ac_dir_suffix.
18073 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
18074 case $ac_top_builddir_sub in
18075 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18076 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18077 esac ;;
18078esac
18079ac_abs_top_builddir=$ac_pwd
18080ac_abs_builddir=$ac_pwd$ac_dir_suffix
18081# for backward compatibility:
18082ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
18083
18084case $srcdir in
81ecdfbb 18085 .) # We are building in place.
bec39cab 18086 ac_srcdir=.
81ecdfbb
RW
18087 ac_top_srcdir=$ac_top_builddir_sub
18088 ac_abs_top_srcdir=$ac_pwd ;;
18089 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 18090 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
18091 ac_top_srcdir=$srcdir
18092 ac_abs_top_srcdir=$srcdir ;;
18093 *) # Relative name.
18094 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18095 ac_top_srcdir=$ac_top_build_prefix$srcdir
18096 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 18097esac
81ecdfbb 18098ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
c906108c 18099
c906108c 18100
fdc59709 18101 cd "$ac_dir"
c906108c
SS
18102
18103 # Check for guested configure; otherwise get Cygnus style configure.
fdc59709
PB
18104 if test -f "$ac_srcdir/configure.gnu"; then
18105 ac_sub_configure=$ac_srcdir/configure.gnu
18106 elif test -f "$ac_srcdir/configure"; then
18107 ac_sub_configure=$ac_srcdir/configure
18108 elif test -f "$ac_srcdir/configure.in"; then
18109 # This should be Cygnus configure.
18110 ac_sub_configure=$ac_aux_dir/configure
c906108c 18111 else
81ecdfbb
RW
18112 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
18113$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
c906108c
SS
18114 ac_sub_configure=
18115 fi
18116
18117 # The recursion is here.
18118 if test -n "$ac_sub_configure"; then
c906108c 18119 # Make the cache file name correct relative to the subdirectory.
bec39cab
AC
18120 case $cache_file in
18121 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
81ecdfbb
RW
18122 *) # Relative name.
18123 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
c906108c 18124 esac
c906108c 18125
81ecdfbb
RW
18126 { $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
18127$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
c906108c 18128 # The eval makes quoting arguments work.
fdc59709
PB
18129 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
18130 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
81ecdfbb 18131 as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
c906108c
SS
18132 fi
18133
fdc59709 18134 cd "$ac_popdir"
c906108c
SS
18135 done
18136fi
81ecdfbb
RW
18137if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
18138 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
18139$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
18140fi
c906108c 18141
This page took 2.894177 seconds and 4 git commands to generate.