bfd_set_input_error
[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
21ea5acd
SDJ
601HAVE_NATIVE_GCORE_HOST
602NAT_GENERATED_FILES
603XM_CLIBS
604MH_CFLAGS
605LOADLIBES
606NAT_CDEPS
607NATDEPFILES
608NAT_FILE
81ecdfbb
RW
609target_subdir
610CONFIG_UNINSTALL
611CONFIG_INSTALL
612CONFIG_CLEAN
613CONFIG_ALL
614CONFIG_SRCS
615CONFIG_DEPS
616CONFIG_OBS
617PROFILE_CFLAGS
618ENABLE_CFLAGS
619SIM_OBS
620SIM
621XMKMF
622GDBTK_SRC_DIR
623GDBTK_CFLAGS
624GDBTKLIBS
625X_LIBS
626X_LDFLAGS
627X_CFLAGS
628TK_XINCLUDES
629TK_DEPS
630TK_LIBRARY
631TK_INCLUDE
632TK_STUB_LIB_SPEC
633TK_STUB_LIB_FLAG
634TK_STUB_LIB_FILE
635TK_LIB_SPEC
636TK_LIB_FLAG
637TK_LIB_FILE
638TK_SRC_DIR
639TK_BIN_DIR
640TK_VERSION
641TCL_DEPS
642TCL_LIBRARY
643TCL_INCLUDE
644TCL_STUB_LIB_SPEC
645TCL_STUB_LIB_FLAG
646TCL_STUB_LIB_FILE
647TCL_LIB_SPEC
648TCL_LIB_FLAG
649TCL_LIB_FILE
650TCL_SRC_DIR
651TCL_BIN_DIR
652TCL_PATCH_LEVEL
653TCL_VERSION
654WIN32LDAPP
655GUI_CFLAGS_X
656LIBGUI
608e2dbb
TT
657LTLIBLZMA
658LIBLZMA
659HAVE_LIBLZMA
81ecdfbb
RW
660WIN32LIBS
661SER_HARDWIRE
662WERROR_CFLAGS
663WARN_CFLAGS
664SYSTEM_GDBINIT
81ecdfbb
RW
665TARGET_SYSTEM_ROOT
666CONFIG_LDFLAGS
f6528abd 667RDYNAMIC
81ecdfbb 668ALLOCA
58bfce93
MM
669LTLIBIPT
670LIBIPT
671HAVE_LIBIPT
4df42755
DE
672HAVE_GUILE_FALSE
673HAVE_GUILE_TRUE
ed3ef339
DE
674GUILE_LIBS
675GUILE_CPPFLAGS
e76c5d17
DE
676GUILD_TARGET_FLAG
677GUILD
ed3ef339 678pkg_config_prog_path
4df42755
DE
679HAVE_PYTHON_FALSE
680HAVE_PYTHON_TRUE
ac534cba
JB
681PYTHON_LIBS
682PYTHON_CPPFLAGS
81ecdfbb 683PYTHON_CFLAGS
ec685c5e 684python_prog_path
81ecdfbb
RW
685LTLIBEXPAT
686LIBEXPAT
687HAVE_LIBEXPAT
b8e0a31c 688JIT_READER_DIR
f997c383 689TARGET_PTR
39037522 690READLINE_TEXI_INCFLAG
81ecdfbb
RW
691READLINE_CFLAGS
692READLINE_DEPS
693READLINE
016a3251
DD
694LTLIBICONV
695LIBICONV
711a72d3
L
696zlibinc
697zlibdir
81ecdfbb
RW
698MIG
699WINDRES
700DLLTOOL
c971b7fa 701AR
81ecdfbb
RW
702YFLAGS
703YACC
c971b7fa 704RANLIB
81ecdfbb 705LN_S
c971b7fa
PA
706INSTALL_DATA
707INSTALL_SCRIPT
708INSTALL_PROGRAM
709AWK
81ecdfbb
RW
710REPORT_BUGS_TEXI
711REPORT_BUGS_TO
712PKGVERSION
b292c783 713HAVE_NATIVE_GCORE_TARGET
81ecdfbb
RW
714TARGET_OBS
715subdirs
716GDB_DATADIR
717DEBUGDIR
5048e516
JK
718MAKEINFO_EXTRA_FLAGS
719MAKEINFOFLAGS
720MAKEINFO
81ecdfbb
RW
721PACKAGE
722GNULIB_STDINT_H
81ecdfbb
RW
723CATOBJEXT
724GENCAT
725INSTOBJEXT
726DATADIRNAME
727CATALOGS
728POSUB
729GMSGFMT
730XGETTEXT
731INCINTL
732LIBINTL_DEP
733LIBINTL
734USE_NLS
81ecdfbb
RW
735CCDEPMODE
736DEPDIR
737am__leading_dot
0bcda685
PA
738CXX_DIALECT
739HAVE_CXX11
4869db5e
RM
740INSTALL_STRIP_PROGRAM
741STRIP
742install_sh
81ecdfbb
RW
743target_os
744target_vendor
745target_cpu
746target
747host_os
748host_vendor
749host_cpu
750host
751build_os
752build_vendor
753build_cpu
754build
c971b7fa
PA
755EGREP
756GREP
757CPP
3bc3d82a
PA
758ac_ct_CXX
759CXXFLAGS
760CXX
81ecdfbb
RW
761OBJEXT
762EXEEXT
763ac_ct_CC
764CPPFLAGS
765LDFLAGS
766CFLAGS
767CC
768MAINT
769MAINTAINER_MODE_FALSE
770MAINTAINER_MODE_TRUE
771target_alias
772host_alias
773build_alias
774LIBS
775ECHO_T
776ECHO_N
777ECHO_C
778DEFS
779mandir
780localedir
781libdir
782psdir
783pdfdir
784dvidir
785htmldir
786infodir
787docdir
788oldincludedir
789includedir
790localstatedir
791sharedstatedir
792sysconfdir
793datadir
794datarootdir
795libexecdir
796sbindir
797bindir
798program_transform_name
799prefix
800exec_prefix
801PACKAGE_URL
802PACKAGE_BUGREPORT
803PACKAGE_STRING
804PACKAGE_VERSION
805PACKAGE_TARNAME
806PACKAGE_NAME
807PATH_SEPARATOR
808SHELL'
2b351b19 809ac_subst_files='nat_makefile_frag'
81ecdfbb
RW
810ac_user_opts='
811enable_option_checking
812enable_maintainer_mode
da2f07f1
JK
813enable_plugins
814enable_largefile
81ecdfbb
RW
815with_separate_debug_dir
816with_gdb_datadir
817with_relocated_sources
7349ff92 818with_auto_load_dir
bccbefd2 819with_auto_load_safe_path
81ecdfbb
RW
820enable_targets
821enable_64_bit_bfd
822enable_gdbcli
823enable_gdbmi
824enable_tui
825enable_gdbtk
05e7c244 826with_libunwind_ia64
81ecdfbb
RW
827with_curses
828enable_profiling
829with_pkgversion
830with_bugurl
711a72d3 831with_system_zlib
016a3251
DD
832with_gnu_ld
833enable_rpath
81ecdfbb 834with_libiconv_prefix
478aac75 835with_iconv_bin
81ecdfbb 836with_system_readline
b8e0a31c 837with_jit_reader_dir
81ecdfbb 838with_expat
81ecdfbb
RW
839with_libexpat_prefix
840with_python
ed3ef339 841with_guile
a8db4212 842enable_libmcheck
58bfce93
MM
843with_intel_pt
844with_libipt_prefix
81ecdfbb
RW
845with_included_regex
846with_sysroot
847with_system_gdbinit
848enable_werror
849enable_build_warnings
850enable_gdb_build_warnings
608e2dbb
TT
851with_lzma
852with_liblzma_prefix
81ecdfbb
RW
853with_tcl
854with_tk
855with_x
856enable_sim
857enable_multi_ice
496c0e1b 858enable_gdbserver
393fd4c3
YQ
859with_babeltrace
860with_libbabeltrace_prefix
81ecdfbb
RW
861'
862 ac_precious_vars='build_alias
863host_alias
864target_alias
865CC
866CFLAGS
867LDFLAGS
868LIBS
869CPPFLAGS
3bc3d82a
PA
870CXX
871CXXFLAGS
872CCC
81ecdfbb 873CPP
f06e05e0
JK
874MAKEINFO
875MAKEINFOFLAGS
81ecdfbb
RW
876YACC
877YFLAGS
878XMKMF'
5ae98d25 879ac_subdirs_all='testsuite
81ecdfbb
RW
880gdbtk
881multi-ice
882gdbserver'
c906108c
SS
883
884# Initialize some variables set by options.
bec39cab
AC
885ac_init_help=
886ac_init_version=false
81ecdfbb
RW
887ac_unrecognized_opts=
888ac_unrecognized_sep=
c906108c
SS
889# The variables have the same names as the options, with
890# dashes changed to underlines.
bec39cab 891cache_file=/dev/null
c906108c 892exec_prefix=NONE
c906108c 893no_create=
c906108c
SS
894no_recursion=
895prefix=NONE
896program_prefix=NONE
897program_suffix=NONE
898program_transform_name=s,x,x,
899silent=
900site=
901srcdir=
c906108c
SS
902verbose=
903x_includes=NONE
904x_libraries=NONE
bec39cab
AC
905
906# Installation directory options.
907# These are left unexpanded so users can "make install exec_prefix=/foo"
908# and all the variables that are supposed to be based on exec_prefix
909# by default will actually change.
910# Use braces instead of parens because sh, perl, etc. also accept them.
81ecdfbb 911# (The list follows the same order as the GNU Coding Standards.)
c906108c
SS
912bindir='${exec_prefix}/bin'
913sbindir='${exec_prefix}/sbin'
914libexecdir='${exec_prefix}/libexec'
81ecdfbb
RW
915datarootdir='${prefix}/share'
916datadir='${datarootdir}'
c906108c
SS
917sysconfdir='${prefix}/etc'
918sharedstatedir='${prefix}/com'
919localstatedir='${prefix}/var'
c906108c
SS
920includedir='${prefix}/include'
921oldincludedir='/usr/include'
81ecdfbb
RW
922docdir='${datarootdir}/doc/${PACKAGE}'
923infodir='${datarootdir}/info'
924htmldir='${docdir}'
925dvidir='${docdir}'
926pdfdir='${docdir}'
927psdir='${docdir}'
928libdir='${exec_prefix}/lib'
929localedir='${datarootdir}/locale'
930mandir='${datarootdir}/man'
c906108c 931
c906108c 932ac_prev=
81ecdfbb 933ac_dashdash=
c906108c
SS
934for ac_option
935do
c906108c
SS
936 # If the previous option needs an argument, assign it.
937 if test -n "$ac_prev"; then
81ecdfbb 938 eval $ac_prev=\$ac_option
c906108c
SS
939 ac_prev=
940 continue
941 fi
942
81ecdfbb
RW
943 case $ac_option in
944 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
945 *) ac_optarg=yes ;;
946 esac
c906108c
SS
947
948 # Accept the important Cygnus configure options, so we can diagnose typos.
949
81ecdfbb
RW
950 case $ac_dashdash$ac_option in
951 --)
952 ac_dashdash=yes ;;
c906108c
SS
953
954 -bindir | --bindir | --bindi | --bind | --bin | --bi)
955 ac_prev=bindir ;;
956 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
bec39cab 957 bindir=$ac_optarg ;;
c906108c
SS
958
959 -build | --build | --buil | --bui | --bu)
bec39cab 960 ac_prev=build_alias ;;
c906108c 961 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
bec39cab 962 build_alias=$ac_optarg ;;
c906108c
SS
963
964 -cache-file | --cache-file | --cache-fil | --cache-fi \
965 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
966 ac_prev=cache_file ;;
967 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
968 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
bec39cab
AC
969 cache_file=$ac_optarg ;;
970
971 --config-cache | -C)
972 cache_file=config.cache ;;
c906108c 973
81ecdfbb 974 -datadir | --datadir | --datadi | --datad)
c906108c 975 ac_prev=datadir ;;
81ecdfbb 976 -datadir=* | --datadir=* | --datadi=* | --datad=*)
bec39cab 977 datadir=$ac_optarg ;;
c906108c 978
81ecdfbb
RW
979 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
980 | --dataroo | --dataro | --datar)
981 ac_prev=datarootdir ;;
982 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
983 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
984 datarootdir=$ac_optarg ;;
985
c906108c 986 -disable-* | --disable-*)
81ecdfbb 987 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
c906108c 988 # Reject names that are not valid shell variable names.
81ecdfbb
RW
989 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
990 as_fn_error "invalid feature name: $ac_useropt"
991 ac_useropt_orig=$ac_useropt
992 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
993 case $ac_user_opts in
994 *"
995"enable_$ac_useropt"
996"*) ;;
997 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
998 ac_unrecognized_sep=', ';;
999 esac
1000 eval enable_$ac_useropt=no ;;
1001
1002 -docdir | --docdir | --docdi | --doc | --do)
1003 ac_prev=docdir ;;
1004 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1005 docdir=$ac_optarg ;;
1006
1007 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1008 ac_prev=dvidir ;;
1009 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1010 dvidir=$ac_optarg ;;
c906108c
SS
1011
1012 -enable-* | --enable-*)
81ecdfbb 1013 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
c906108c 1014 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1015 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1016 as_fn_error "invalid feature name: $ac_useropt"
1017 ac_useropt_orig=$ac_useropt
1018 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1019 case $ac_user_opts in
1020 *"
1021"enable_$ac_useropt"
1022"*) ;;
1023 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1024 ac_unrecognized_sep=', ';;
b4e70030 1025 esac
81ecdfbb 1026 eval enable_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1027
1028 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1029 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1030 | --exec | --exe | --ex)
1031 ac_prev=exec_prefix ;;
1032 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1033 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1034 | --exec=* | --exe=* | --ex=*)
bec39cab 1035 exec_prefix=$ac_optarg ;;
c906108c
SS
1036
1037 -gas | --gas | --ga | --g)
1038 # Obsolete; use --with-gas.
1039 with_gas=yes ;;
1040
bec39cab
AC
1041 -help | --help | --hel | --he | -h)
1042 ac_init_help=long ;;
1043 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1044 ac_init_help=recursive ;;
1045 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1046 ac_init_help=short ;;
c906108c
SS
1047
1048 -host | --host | --hos | --ho)
bec39cab 1049 ac_prev=host_alias ;;
c906108c 1050 -host=* | --host=* | --hos=* | --ho=*)
bec39cab 1051 host_alias=$ac_optarg ;;
c906108c 1052
81ecdfbb
RW
1053 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1054 ac_prev=htmldir ;;
1055 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1056 | --ht=*)
1057 htmldir=$ac_optarg ;;
1058
c906108c
SS
1059 -includedir | --includedir | --includedi | --included | --include \
1060 | --includ | --inclu | --incl | --inc)
1061 ac_prev=includedir ;;
1062 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1063 | --includ=* | --inclu=* | --incl=* | --inc=*)
bec39cab 1064 includedir=$ac_optarg ;;
c906108c
SS
1065
1066 -infodir | --infodir | --infodi | --infod | --info | --inf)
1067 ac_prev=infodir ;;
1068 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
bec39cab 1069 infodir=$ac_optarg ;;
c906108c
SS
1070
1071 -libdir | --libdir | --libdi | --libd)
1072 ac_prev=libdir ;;
1073 -libdir=* | --libdir=* | --libdi=* | --libd=*)
bec39cab 1074 libdir=$ac_optarg ;;
c906108c
SS
1075
1076 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1077 | --libexe | --libex | --libe)
1078 ac_prev=libexecdir ;;
1079 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1080 | --libexe=* | --libex=* | --libe=*)
bec39cab 1081 libexecdir=$ac_optarg ;;
c906108c 1082
81ecdfbb
RW
1083 -localedir | --localedir | --localedi | --localed | --locale)
1084 ac_prev=localedir ;;
1085 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1086 localedir=$ac_optarg ;;
1087
c906108c 1088 -localstatedir | --localstatedir | --localstatedi | --localstated \
81ecdfbb 1089 | --localstate | --localstat | --localsta | --localst | --locals)
c906108c
SS
1090 ac_prev=localstatedir ;;
1091 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
81ecdfbb 1092 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
bec39cab 1093 localstatedir=$ac_optarg ;;
c906108c
SS
1094
1095 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1096 ac_prev=mandir ;;
1097 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
bec39cab 1098 mandir=$ac_optarg ;;
c906108c
SS
1099
1100 -nfp | --nfp | --nf)
1101 # Obsolete; use --without-fp.
1102 with_fp=no ;;
1103
1104 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
bec39cab 1105 | --no-cr | --no-c | -n)
c906108c
SS
1106 no_create=yes ;;
1107
1108 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1109 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1110 no_recursion=yes ;;
1111
1112 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1113 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1114 | --oldin | --oldi | --old | --ol | --o)
1115 ac_prev=oldincludedir ;;
1116 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1117 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1118 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
bec39cab 1119 oldincludedir=$ac_optarg ;;
c906108c
SS
1120
1121 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1122 ac_prev=prefix ;;
1123 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
bec39cab 1124 prefix=$ac_optarg ;;
c906108c
SS
1125
1126 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1127 | --program-pre | --program-pr | --program-p)
1128 ac_prev=program_prefix ;;
1129 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1130 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
bec39cab 1131 program_prefix=$ac_optarg ;;
c906108c
SS
1132
1133 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1134 | --program-suf | --program-su | --program-s)
1135 ac_prev=program_suffix ;;
1136 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1137 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
bec39cab 1138 program_suffix=$ac_optarg ;;
c906108c
SS
1139
1140 -program-transform-name | --program-transform-name \
1141 | --program-transform-nam | --program-transform-na \
1142 | --program-transform-n | --program-transform- \
1143 | --program-transform | --program-transfor \
1144 | --program-transfo | --program-transf \
1145 | --program-trans | --program-tran \
1146 | --progr-tra | --program-tr | --program-t)
1147 ac_prev=program_transform_name ;;
1148 -program-transform-name=* | --program-transform-name=* \
1149 | --program-transform-nam=* | --program-transform-na=* \
1150 | --program-transform-n=* | --program-transform-=* \
1151 | --program-transform=* | --program-transfor=* \
1152 | --program-transfo=* | --program-transf=* \
1153 | --program-trans=* | --program-tran=* \
1154 | --progr-tra=* | --program-tr=* | --program-t=*)
bec39cab 1155 program_transform_name=$ac_optarg ;;
c906108c 1156
81ecdfbb
RW
1157 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1158 ac_prev=pdfdir ;;
1159 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1160 pdfdir=$ac_optarg ;;
1161
1162 -psdir | --psdir | --psdi | --psd | --ps)
1163 ac_prev=psdir ;;
1164 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1165 psdir=$ac_optarg ;;
1166
c906108c
SS
1167 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1168 | -silent | --silent | --silen | --sile | --sil)
1169 silent=yes ;;
1170
1171 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1172 ac_prev=sbindir ;;
1173 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1174 | --sbi=* | --sb=*)
bec39cab 1175 sbindir=$ac_optarg ;;
c906108c
SS
1176
1177 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1178 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1179 | --sharedst | --shareds | --shared | --share | --shar \
1180 | --sha | --sh)
1181 ac_prev=sharedstatedir ;;
1182 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1183 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1184 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1185 | --sha=* | --sh=*)
bec39cab 1186 sharedstatedir=$ac_optarg ;;
c906108c
SS
1187
1188 -site | --site | --sit)
1189 ac_prev=site ;;
1190 -site=* | --site=* | --sit=*)
bec39cab 1191 site=$ac_optarg ;;
3ace7edb 1192
c906108c
SS
1193 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1194 ac_prev=srcdir ;;
1195 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
bec39cab 1196 srcdir=$ac_optarg ;;
c906108c
SS
1197
1198 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1199 | --syscon | --sysco | --sysc | --sys | --sy)
1200 ac_prev=sysconfdir ;;
1201 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1202 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
bec39cab 1203 sysconfdir=$ac_optarg ;;
c906108c
SS
1204
1205 -target | --target | --targe | --targ | --tar | --ta | --t)
bec39cab 1206 ac_prev=target_alias ;;
c906108c 1207 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
bec39cab 1208 target_alias=$ac_optarg ;;
c906108c
SS
1209
1210 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1211 verbose=yes ;;
1212
bec39cab
AC
1213 -version | --version | --versio | --versi | --vers | -V)
1214 ac_init_version=: ;;
c906108c
SS
1215
1216 -with-* | --with-*)
81ecdfbb 1217 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
c906108c 1218 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1219 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1220 as_fn_error "invalid package name: $ac_useropt"
1221 ac_useropt_orig=$ac_useropt
1222 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1223 case $ac_user_opts in
1224 *"
1225"with_$ac_useropt"
1226"*) ;;
1227 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1228 ac_unrecognized_sep=', ';;
b4e70030 1229 esac
81ecdfbb 1230 eval with_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1231
1232 -without-* | --without-*)
81ecdfbb 1233 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
c906108c 1234 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1235 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1236 as_fn_error "invalid package name: $ac_useropt"
1237 ac_useropt_orig=$ac_useropt
1238 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1239 case $ac_user_opts in
1240 *"
1241"with_$ac_useropt"
1242"*) ;;
1243 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1244 ac_unrecognized_sep=', ';;
1245 esac
1246 eval with_$ac_useropt=no ;;
c906108c
SS
1247
1248 --x)
1249 # Obsolete; use --with-x.
1250 with_x=yes ;;
1251
1252 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1253 | --x-incl | --x-inc | --x-in | --x-i)
1254 ac_prev=x_includes ;;
1255 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1256 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
bec39cab 1257 x_includes=$ac_optarg ;;
c906108c
SS
1258
1259 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1260 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1261 ac_prev=x_libraries ;;
1262 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1263 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
bec39cab 1264 x_libraries=$ac_optarg ;;
c906108c 1265
81ecdfbb
RW
1266 -*) as_fn_error "unrecognized option: \`$ac_option'
1267Try \`$0 --help' for more information."
c906108c
SS
1268 ;;
1269
bec39cab
AC
1270 *=*)
1271 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1272 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1273 case $ac_envvar in #(
1274 '' | [0-9]* | *[!_$as_cr_alnum]* )
1275 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1276 esac
1277 eval $ac_envvar=\$ac_optarg
bec39cab
AC
1278 export $ac_envvar ;;
1279
c906108c 1280 *)
bec39cab 1281 # FIXME: should be removed in autoconf 3.0.
81ecdfbb 1282 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
bec39cab 1283 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
81ecdfbb 1284 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
bec39cab 1285 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
c906108c
SS
1286 ;;
1287
1288 esac
1289done
1290
1291if test -n "$ac_prev"; then
bec39cab 1292 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
81ecdfbb 1293 as_fn_error "missing argument to $ac_option"
c906108c 1294fi
c906108c 1295
81ecdfbb
RW
1296if test -n "$ac_unrecognized_opts"; then
1297 case $enable_option_checking in
1298 no) ;;
1299 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
1300 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
b4e70030 1301 esac
81ecdfbb 1302fi
b4e70030 1303
81ecdfbb
RW
1304# Check all directory arguments for consistency.
1305for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1306 datadir sysconfdir sharedstatedir localstatedir includedir \
1307 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1308 libdir localedir mandir
b4e70030 1309do
81ecdfbb
RW
1310 eval ac_val=\$$ac_var
1311 # Remove trailing slashes.
1312 case $ac_val in
1313 */ )
1314 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1315 eval $ac_var=\$ac_val;;
1316 esac
1317 # Be sure to have absolute directory names.
b4e70030 1318 case $ac_val in
81ecdfbb
RW
1319 [\\/$]* | ?:[\\/]* ) continue;;
1320 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
c906108c 1321 esac
81ecdfbb 1322 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
c906108c
SS
1323done
1324
bec39cab
AC
1325# There might be people who depend on the old broken behavior: `$host'
1326# used to hold the argument of --host etc.
1327# FIXME: To remove some day.
1328build=$build_alias
1329host=$host_alias
1330target=$target_alias
1331
1332# FIXME: To remove some day.
1333if test "x$host_alias" != x; then
1334 if test "x$build_alias" = x; then
1335 cross_compiling=maybe
81ecdfbb 1336 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
bec39cab
AC
1337 If a cross compiler is detected then cross compile mode will be used." >&2
1338 elif test "x$build_alias" != "x$host_alias"; then
1339 cross_compiling=yes
1340 fi
1341fi
c906108c 1342
bec39cab
AC
1343ac_tool_prefix=
1344test -n "$host_alias" && ac_tool_prefix=$host_alias-
1345
1346test "$silent" = yes && exec 6>/dev/null
c906108c 1347
c906108c 1348
81ecdfbb
RW
1349ac_pwd=`pwd` && test -n "$ac_pwd" &&
1350ac_ls_di=`ls -di .` &&
1351ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1352 as_fn_error "working directory cannot be determined"
1353test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1354 as_fn_error "pwd does not report name of working directory"
1355
1356
c906108c
SS
1357# Find the source files, if location was not specified.
1358if test -z "$srcdir"; then
1359 ac_srcdir_defaulted=yes
81ecdfbb
RW
1360 # Try the directory containing this script, then the parent directory.
1361 ac_confdir=`$as_dirname -- "$as_myself" ||
1362$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1363 X"$as_myself" : 'X\(//\)[^/]' \| \
1364 X"$as_myself" : 'X\(//\)$' \| \
1365 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1366$as_echo X"$as_myself" |
1367 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1368 s//\1/
1369 q
1370 }
1371 /^X\(\/\/\)[^/].*/{
1372 s//\1/
1373 q
1374 }
1375 /^X\(\/\/\)$/{
1376 s//\1/
1377 q
1378 }
1379 /^X\(\/\).*/{
1380 s//\1/
1381 q
1382 }
1383 s/.*/./; q'`
c906108c 1384 srcdir=$ac_confdir
81ecdfbb 1385 if test ! -r "$srcdir/$ac_unique_file"; then
c906108c
SS
1386 srcdir=..
1387 fi
1388else
1389 ac_srcdir_defaulted=no
1390fi
81ecdfbb
RW
1391if test ! -r "$srcdir/$ac_unique_file"; then
1392 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1393 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
1394fi
1395ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1396ac_abs_confdir=`(
1397 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
1398 pwd)`
1399# When building in place, set srcdir=.
1400if test "$ac_abs_confdir" = "$ac_pwd"; then
1401 srcdir=.
1402fi
1403# Remove unnecessary trailing slashes from srcdir.
1404# Double slashes in file names in object file debugging info
1405# mess up M-x gdb in Emacs.
1406case $srcdir in
1407*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1408esac
1409for ac_var in $ac_precious_vars; do
1410 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1411 eval ac_env_${ac_var}_value=\$${ac_var}
1412 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1413 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1414done
c906108c 1415
bec39cab
AC
1416#
1417# Report the --help message.
1418#
1419if test "$ac_init_help" = "long"; then
1420 # Omit some internal or obsolete options to make the list less imposing.
1421 # This message is too long to be a string in the A/UX 3.1 sh.
1422 cat <<_ACEOF
1423\`configure' configures this package to adapt to many kinds of systems.
1424
1425Usage: $0 [OPTION]... [VAR=VALUE]...
1426
1427To assign environment variables (e.g., CC, CFLAGS...), specify them as
1428VAR=VALUE. See below for descriptions of some of the useful variables.
1429
1430Defaults for the options are specified in brackets.
1431
1432Configuration:
1433 -h, --help display this help and exit
1434 --help=short display options specific to this package
1435 --help=recursive display the short help of all the included packages
1436 -V, --version display version information and exit
1437 -q, --quiet, --silent do not print \`checking...' messages
1438 --cache-file=FILE cache test results in FILE [disabled]
1439 -C, --config-cache alias for \`--cache-file=config.cache'
1440 -n, --no-create do not create output files
1441 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1442
bec39cab
AC
1443Installation directories:
1444 --prefix=PREFIX install architecture-independent files in PREFIX
81ecdfbb 1445 [$ac_default_prefix]
bec39cab 1446 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
81ecdfbb 1447 [PREFIX]
bec39cab
AC
1448
1449By default, \`make install' will install all the files in
1450\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1451an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1452for instance \`--prefix=\$HOME'.
1453
1454For better control, use the options below.
1455
1456Fine tuning of the installation directories:
81ecdfbb
RW
1457 --bindir=DIR user executables [EPREFIX/bin]
1458 --sbindir=DIR system admin executables [EPREFIX/sbin]
1459 --libexecdir=DIR program executables [EPREFIX/libexec]
1460 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1461 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1462 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1463 --libdir=DIR object code libraries [EPREFIX/lib]
1464 --includedir=DIR C header files [PREFIX/include]
1465 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1466 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1467 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1468 --infodir=DIR info documentation [DATAROOTDIR/info]
1469 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1470 --mandir=DIR man documentation [DATAROOTDIR/man]
1471 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1472 --htmldir=DIR html documentation [DOCDIR]
1473 --dvidir=DIR dvi documentation [DOCDIR]
1474 --pdfdir=DIR pdf documentation [DOCDIR]
1475 --psdir=DIR ps documentation [DOCDIR]
bec39cab
AC
1476_ACEOF
1477
1478 cat <<\_ACEOF
1479
9009e1ae
MR
1480Program names:
1481 --program-prefix=PREFIX prepend PREFIX to installed program names
1482 --program-suffix=SUFFIX append SUFFIX to installed program names
1483 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1484
bec39cab
AC
1485X features:
1486 --x-includes=DIR X include files are in DIR
1487 --x-libraries=DIR X library files are in DIR
1488
1489System types:
1490 --build=BUILD configure for building on BUILD [guessed]
1491 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1492 --target=TARGET configure for building compilers for TARGET [HOST]
1493_ACEOF
1494fi
1495
1496if test -n "$ac_init_help"; then
1497
1498 cat <<\_ACEOF
1499
1500Optional Features:
81ecdfbb 1501 --disable-option-checking ignore unrecognized --enable/--with options
bec39cab
AC
1502 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1503 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
85981d60
AC
1504 --enable-maintainer-mode enable make rules and dependencies not useful
1505 (and sometimes confusing) to the casual installer
2974be62 1506 --enable-plugins Enable support for plugins
da2f07f1 1507 --disable-largefile omit support for large files
a1220294
TT
1508 --enable-targets=TARGETS
1509 alternative target configurations
c0993dbe 1510 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
bec39cab
AC
1511 --disable-gdbcli disable command-line interface (CLI)
1512 --disable-gdbmi disable machine-interface (MI)
1513 --enable-tui enable full-screen terminal user interface (TUI)
1514 --enable-gdbtk enable gdbtk graphical user interface (GUI)
1515 --enable-profiling enable profiling of GDB
3841debe 1516 --disable-rpath do not hardcode runtime library paths
17ef446e 1517 --enable-libmcheck Try linking with -lmcheck if available
a1220294 1518 --enable-werror treat compile warnings as errors
32c1c914 1519 --enable-build-warnings enable build-time compiler warnings if gcc is used
a1220294 1520 --enable-gdb-build-warnings
32c1c914 1521 enable GDB specific build-time compiler warnings if
a1220294 1522 gcc is used
32c1c914 1523 --enable-sim link gdb with simulator
bec39cab 1524 --enable-multi-ice build the multi-ice-gdb-server
496c0e1b
JB
1525 --enable-gdbserver automatically build gdbserver (yes/no/auto, default
1526 is auto)
bec39cab
AC
1527
1528Optional Packages:
1529 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1530 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
a1220294 1531 --with-separate-debug-dir=PATH
32c1c914 1532 look for global separate debug info in this path
62e4f60c 1533 [LIBDIR/debug]
b14b1491
TT
1534 --with-gdb-datadir=PATH look for global separate data files in this path
1535 [DATADIR/gdb]
29b0e8a2 1536 --with-relocated-sources=PATH
32c1c914 1537 automatically relocate this path for source files
7349ff92 1538 --with-auto-load-dir=PATH
aff139ff 1539 directories from which to load auto-loaded scripts
1564a261 1540 [$debugdir:$datadir/auto-load]
bccbefd2 1541 --with-auto-load-safe-path=PATH
aff139ff 1542 directories safe to hold auto-loaded files
7349ff92 1543 [--with-auto-load-dir]
bccbefd2
JK
1544 --without-auto-load-safe-path
1545 do not restrict auto-loaded files locations
05e7c244 1546 --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets
cb01cfba
JB
1547 --with-curses use the curses library instead of the termcap
1548 library
c16158bc
JM
1549 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
1550 --with-bugurl=URL Direct users to URL to report a bug
711a72d3 1551 --with-system-zlib use installed libz
016a3251
DD
1552 --with-gnu-ld assume the C compiler uses GNU ld default=no
1553 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
1554 --without-libiconv-prefix don't search for libiconv in includedir and libdir
478aac75 1555 --with-iconv-bin=PATH specify where to find the iconv program
6a30b0a5 1556 --with-system-readline use installed readline library
b8e0a31c
SD
1557 --with-jit-reader-dir=PATH
1558 directory to load the JIT readers from
5c39566f 1559 --with-expat include expat support (auto/yes/no)
3841debe
DJ
1560 --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib
1561 --without-libexpat-prefix don't search for libexpat in includedir and libdir
0c4a4063
DE
1562 --with-python[=PYTHON] include python support
1563 (auto/yes/no/<python-program>)
ed3ef339
DE
1564 --with-guile[=GUILE] include guile support
1565 (auto/yes/no/<guile-version>/<pkg-config-program>)
bc504a31 1566 --with-intel-pt include Intel Processor Trace support (auto/yes/no)
58bfce93
MM
1567 --with-libipt-prefix[=DIR] search for libipt in DIR/include and DIR/lib
1568 --without-libipt-prefix don't search for libipt in includedir and libdir
a1220294
TT
1569 --without-included-regex
1570 don't use included regex; this is the default on
1571 systems with version 2 of the GNU C library (use
1572 with caution on other system)
81ecdfbb 1573 --with-sysroot[=DIR] search for usr/lib et al within DIR
b14b1491 1574 --with-system-gdbinit=PATH
32c1c914 1575 automatically load a system-wide gdbinit file
608e2dbb
TT
1576 --with-lzma support lzma compression (auto/yes/no)
1577 --with-liblzma-prefix[=DIR] search for liblzma in DIR/include and DIR/lib
1578 --without-liblzma-prefix don't search for liblzma in includedir and libdir
5062cc19
KS
1579 --with-tcl directory containing tcl configuration (tclConfig.sh)
1580 --with-tk directory containing tk configuration (tkConfig.sh)
bec39cab 1581 --with-x use the X Window System
393fd4c3
YQ
1582 --with-babeltrace include babeltrace support (auto/yes/no)
1583 --with-libbabeltrace-prefix[=DIR] search for libbabeltrace in DIR/include and DIR/lib
1584 --without-libbabeltrace-prefix don't search for libbabeltrace in includedir and libdir
bec39cab
AC
1585
1586Some influential environment variables:
1587 CC C compiler command
1588 CFLAGS C compiler flags
1589 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1590 nonstandard directory <lib dir>
81ecdfbb
RW
1591 LIBS libraries to pass to the linker, e.g. -l<library>
1592 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1593 you have headers in a nonstandard directory <include dir>
3bc3d82a
PA
1594 CXX C++ compiler command
1595 CXXFLAGS C++ compiler flags
bec39cab 1596 CPP C preprocessor
f06e05e0
JK
1597 MAKEINFO Parent configure detects if it is of sufficient version.
1598 MAKEINFOFLAGS
1599 Parameters for MAKEINFO.
81ecdfbb
RW
1600 YACC The `Yet Another C Compiler' implementation to use. Defaults to
1601 the first program found out of: `bison -y', `byacc', `yacc'.
1602 YFLAGS The list of arguments that will be passed by default to $YACC.
1603 This script will default YFLAGS to the empty string to avoid a
1604 default value of `-d' given by some make applications.
1605 XMKMF Path to xmkmf, Makefile generator for X Window System
bec39cab
AC
1606
1607Use these variables to override the choices made by `configure' or to help
1608it to find libraries and programs with nonstandard names/locations.
1609
81ecdfbb 1610Report bugs to the package provider.
bec39cab 1611_ACEOF
81ecdfbb 1612ac_status=$?
bec39cab
AC
1613fi
1614
1615if test "$ac_init_help" = "recursive"; then
1616 # If there are subdirs, report their specific --help.
bec39cab 1617 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
81ecdfbb
RW
1618 test -d "$ac_dir" ||
1619 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1620 continue
bec39cab
AC
1621 ac_builddir=.
1622
81ecdfbb
RW
1623case "$ac_dir" in
1624.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1625*)
1626 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1627 # A ".." for each directory in $ac_dir_suffix.
1628 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1629 case $ac_top_builddir_sub in
1630 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1631 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1632 esac ;;
1633esac
1634ac_abs_top_builddir=$ac_pwd
1635ac_abs_builddir=$ac_pwd$ac_dir_suffix
1636# for backward compatibility:
1637ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
1638
1639case $srcdir in
81ecdfbb 1640 .) # We are building in place.
bec39cab 1641 ac_srcdir=.
81ecdfbb
RW
1642 ac_top_srcdir=$ac_top_builddir_sub
1643 ac_abs_top_srcdir=$ac_pwd ;;
1644 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 1645 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
1646 ac_top_srcdir=$srcdir
1647 ac_abs_top_srcdir=$srcdir ;;
1648 *) # Relative name.
1649 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1650 ac_top_srcdir=$ac_top_build_prefix$srcdir
1651 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 1652esac
81ecdfbb 1653ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 1654
81ecdfbb
RW
1655 cd "$ac_dir" || { ac_status=$?; continue; }
1656 # Check for guested configure.
1657 if test -f "$ac_srcdir/configure.gnu"; then
1658 echo &&
1659 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1660 elif test -f "$ac_srcdir/configure"; then
1661 echo &&
1662 $SHELL "$ac_srcdir/configure" --help=recursive
3ace7edb 1663 else
81ecdfbb
RW
1664 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1665 fi || ac_status=$?
1666 cd "$ac_pwd" || { ac_status=$?; break; }
bec39cab
AC
1667 done
1668fi
1669
81ecdfbb 1670test -n "$ac_init_help" && exit $ac_status
bec39cab
AC
1671if $ac_init_version; then
1672 cat <<\_ACEOF
81ecdfbb
RW
1673configure
1674generated by GNU Autoconf 2.64
bec39cab 1675
81ecdfbb 1676Copyright (C) 2009 Free Software Foundation, Inc.
bec39cab
AC
1677This configure script is free software; the Free Software Foundation
1678gives unlimited permission to copy, distribute and modify it.
1679_ACEOF
81ecdfbb 1680 exit
bec39cab 1681fi
bec39cab 1682
81ecdfbb
RW
1683## ------------------------ ##
1684## Autoconf initialization. ##
1685## ------------------------ ##
bec39cab 1686
81ecdfbb
RW
1687# ac_fn_c_try_compile LINENO
1688# --------------------------
1689# Try to compile conftest.$ac_ext, and return whether this succeeded.
1690ac_fn_c_try_compile ()
1691{
1692 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1693 rm -f conftest.$ac_objext
1694 if { { ac_try="$ac_compile"
1695case "(($ac_try" in
1696 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1697 *) ac_try_echo=$ac_try;;
1698esac
1699eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1700$as_echo "$ac_try_echo"; } >&5
1701 (eval "$ac_compile") 2>conftest.err
1702 ac_status=$?
1703 if test -s conftest.err; then
1704 grep -v '^ *+' conftest.err >conftest.er1
1705 cat conftest.er1 >&5
1706 mv -f conftest.er1 conftest.err
1707 fi
1708 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1709 test $ac_status = 0; } && {
1710 test -z "$ac_c_werror_flag" ||
1711 test ! -s conftest.err
1712 } && test -s conftest.$ac_objext; then :
1713 ac_retval=0
1714else
1715 $as_echo "$as_me: failed program was:" >&5
1716sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1717
81ecdfbb
RW
1718 ac_retval=1
1719fi
1720 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1721 return $ac_retval
1722
1723} # ac_fn_c_try_compile
1724
3bc3d82a
PA
1725# ac_fn_cxx_try_compile LINENO
1726# ----------------------------
1727# Try to compile conftest.$ac_ext, and return whether this succeeded.
1728ac_fn_cxx_try_compile ()
1729{
1730 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1731 rm -f conftest.$ac_objext
1732 if { { ac_try="$ac_compile"
1733case "(($ac_try" in
1734 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1735 *) ac_try_echo=$ac_try;;
1736esac
1737eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1738$as_echo "$ac_try_echo"; } >&5
1739 (eval "$ac_compile") 2>conftest.err
1740 ac_status=$?
1741 if test -s conftest.err; then
1742 grep -v '^ *+' conftest.err >conftest.er1
1743 cat conftest.er1 >&5
1744 mv -f conftest.er1 conftest.err
1745 fi
1746 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1747 test $ac_status = 0; } && {
1748 test -z "$ac_cxx_werror_flag" ||
1749 test ! -s conftest.err
1750 } && test -s conftest.$ac_objext; then :
1751 ac_retval=0
1752else
1753 $as_echo "$as_me: failed program was:" >&5
1754sed 's/^/| /' conftest.$ac_ext >&5
1755
1756 ac_retval=1
1757fi
1758 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1759 return $ac_retval
1760
1761} # ac_fn_cxx_try_compile
1762
81ecdfbb
RW
1763# ac_fn_c_try_cpp LINENO
1764# ----------------------
1765# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1766ac_fn_c_try_cpp ()
bec39cab 1767{
81ecdfbb
RW
1768 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1769 if { { ac_try="$ac_cpp conftest.$ac_ext"
1770case "(($ac_try" in
1771 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1772 *) ac_try_echo=$ac_try;;
1773esac
1774eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1775$as_echo "$ac_try_echo"; } >&5
1776 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1777 ac_status=$?
1778 if test -s conftest.err; then
1779 grep -v '^ *+' conftest.err >conftest.er1
1780 cat conftest.er1 >&5
1781 mv -f conftest.er1 conftest.err
1782 fi
1783 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1784 test $ac_status = 0; } >/dev/null && {
1785 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1786 test ! -s conftest.err
1787 }; then :
1788 ac_retval=0
1789else
1790 $as_echo "$as_me: failed program was:" >&5
1791sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1792
81ecdfbb
RW
1793 ac_retval=1
1794fi
1795 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1796 return $ac_retval
bec39cab 1797
81ecdfbb 1798} # ac_fn_c_try_cpp
bec39cab 1799
81ecdfbb
RW
1800# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1801# -------------------------------------------------------
1802# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1803# the include files in INCLUDES and setting the cache variable VAR
1804# accordingly.
1805ac_fn_c_check_header_mongrel ()
1806{
1807 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1808 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1809 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1810$as_echo_n "checking for $2... " >&6; }
1811if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1812 $as_echo_n "(cached) " >&6
1813fi
1814eval ac_res=\$$3
1815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1816$as_echo "$ac_res" >&6; }
1817else
1818 # Is the header compilable?
1819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1820$as_echo_n "checking $2 usability... " >&6; }
1821cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1822/* end confdefs.h. */
1823$4
1824#include <$2>
1825_ACEOF
1826if ac_fn_c_try_compile "$LINENO"; then :
1827 ac_header_compiler=yes
1828else
1829 ac_header_compiler=no
1830fi
1831rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1833$as_echo "$ac_header_compiler" >&6; }
bec39cab 1834
81ecdfbb
RW
1835# Is the header present?
1836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1837$as_echo_n "checking $2 presence... " >&6; }
1838cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1839/* end confdefs.h. */
1840#include <$2>
1841_ACEOF
1842if ac_fn_c_try_cpp "$LINENO"; then :
1843 ac_header_preproc=yes
1844else
1845 ac_header_preproc=no
1846fi
1847rm -f conftest.err conftest.$ac_ext
1848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1849$as_echo "$ac_header_preproc" >&6; }
bec39cab 1850
81ecdfbb
RW
1851# So? What about this header?
1852case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1853 yes:no: )
1854 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1855$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1856 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1857$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1858 ;;
1859 no:yes:* )
1860 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1861$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1862 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1863$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1864 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1865$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1866 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1867$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1868 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1869$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1870 ;;
1871esac
1872 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1873$as_echo_n "checking for $2... " >&6; }
1874if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1875 $as_echo_n "(cached) " >&6
1876else
1877 eval "$3=\$ac_header_compiler"
1878fi
1879eval ac_res=\$$3
1880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1881$as_echo "$ac_res" >&6; }
1882fi
1883 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 1884
81ecdfbb 1885} # ac_fn_c_check_header_mongrel
bec39cab 1886
81ecdfbb
RW
1887# ac_fn_c_try_run LINENO
1888# ----------------------
1889# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1890# that executables *can* be run.
1891ac_fn_c_try_run ()
1892{
1893 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1894 if { { ac_try="$ac_link"
1895case "(($ac_try" in
1896 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1897 *) ac_try_echo=$ac_try;;
1898esac
1899eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1900$as_echo "$ac_try_echo"; } >&5
1901 (eval "$ac_link") 2>&5
1902 ac_status=$?
1903 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1904 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1905 { { case "(($ac_try" in
1906 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1907 *) ac_try_echo=$ac_try;;
1908esac
1909eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1910$as_echo "$ac_try_echo"; } >&5
1911 (eval "$ac_try") 2>&5
1912 ac_status=$?
1913 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1914 test $ac_status = 0; }; }; then :
1915 ac_retval=0
1916else
1917 $as_echo "$as_me: program exited with status $ac_status" >&5
1918 $as_echo "$as_me: failed program was:" >&5
1919sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1920
81ecdfbb
RW
1921 ac_retval=$ac_status
1922fi
1923 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1924 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1925 return $ac_retval
bec39cab 1926
81ecdfbb 1927} # ac_fn_c_try_run
bec39cab 1928
81ecdfbb
RW
1929# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1930# -------------------------------------------------------
1931# Tests whether HEADER exists and can be compiled using the include files in
1932# INCLUDES, setting the cache variable VAR accordingly.
1933ac_fn_c_check_header_compile ()
1934{
1935 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1937$as_echo_n "checking for $2... " >&6; }
1938if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1939 $as_echo_n "(cached) " >&6
1940else
1941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1942/* end confdefs.h. */
1943$4
1944#include <$2>
bec39cab 1945_ACEOF
81ecdfbb
RW
1946if ac_fn_c_try_compile "$LINENO"; then :
1947 eval "$3=yes"
1948else
1949 eval "$3=no"
1950fi
1951rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1952fi
1953eval ac_res=\$$3
1954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1955$as_echo "$ac_res" >&6; }
1956 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 1957
81ecdfbb 1958} # ac_fn_c_check_header_compile
bec39cab 1959
2974be62
AM
1960# ac_fn_c_try_link LINENO
1961# -----------------------
1962# Try to link conftest.$ac_ext, and return whether this succeeded.
1963ac_fn_c_try_link ()
1964{
1965 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1966 rm -f conftest.$ac_objext conftest$ac_exeext
1967 if { { ac_try="$ac_link"
1968case "(($ac_try" in
1969 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1970 *) ac_try_echo=$ac_try;;
1971esac
1972eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1973$as_echo "$ac_try_echo"; } >&5
1974 (eval "$ac_link") 2>conftest.err
1975 ac_status=$?
1976 if test -s conftest.err; then
1977 grep -v '^ *+' conftest.err >conftest.er1
1978 cat conftest.er1 >&5
1979 mv -f conftest.er1 conftest.err
1980 fi
1981 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1982 test $ac_status = 0; } && {
1983 test -z "$ac_c_werror_flag" ||
1984 test ! -s conftest.err
1985 } && test -s conftest$ac_exeext && {
1986 test "$cross_compiling" = yes ||
1987 $as_test_x conftest$ac_exeext
1988 }; then :
1989 ac_retval=0
1990else
1991 $as_echo "$as_me: failed program was:" >&5
1992sed 's/^/| /' conftest.$ac_ext >&5
1993
1994 ac_retval=1
1995fi
1996 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1997 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1998 # interfere with the next link command; also delete a directory that is
1999 # left behind by Apple's compiler. We do this before executing the actions.
2000 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2001 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2002 return $ac_retval
2003
2004} # ac_fn_c_try_link
2005
81ecdfbb
RW
2006# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2007# --------------------------------------------
2008# Tries to find the compile-time value of EXPR in a program that includes
2009# INCLUDES, setting VAR accordingly. Returns whether the value could be
2010# computed
2011ac_fn_c_compute_int ()
2012{
2013 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2014 if test "$cross_compiling" = yes; then
2015 # Depending upon the size, compute the lo and hi bounds.
2016cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2017/* end confdefs.h. */
2018$4
2019int
2020main ()
2021{
2022static int test_array [1 - 2 * !(($2) >= 0)];
2023test_array [0] = 0
bec39cab 2024
81ecdfbb
RW
2025 ;
2026 return 0;
2027}
2028_ACEOF
2029if ac_fn_c_try_compile "$LINENO"; then :
2030 ac_lo=0 ac_mid=0
2031 while :; do
2032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2033/* end confdefs.h. */
2034$4
2035int
2036main ()
2037{
2038static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2039test_array [0] = 0
bec39cab 2040
81ecdfbb
RW
2041 ;
2042 return 0;
2043}
2044_ACEOF
2045if ac_fn_c_try_compile "$LINENO"; then :
2046 ac_hi=$ac_mid; break
2047else
2048 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2049 if test $ac_lo -le $ac_mid; then
2050 ac_lo= ac_hi=
2051 break
2052 fi
2053 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
c906108c 2054fi
81ecdfbb
RW
2055rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2056 done
c906108c 2057else
81ecdfbb
RW
2058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2059/* end confdefs.h. */
2060$4
2061int
2062main ()
2063{
2064static int test_array [1 - 2 * !(($2) < 0)];
2065test_array [0] = 0
bec39cab 2066
81ecdfbb
RW
2067 ;
2068 return 0;
2069}
2070_ACEOF
2071if ac_fn_c_try_compile "$LINENO"; then :
2072 ac_hi=-1 ac_mid=-1
2073 while :; do
2074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2075/* end confdefs.h. */
2076$4
2077int
2078main ()
2079{
2080static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2081test_array [0] = 0
bec39cab 2082
81ecdfbb
RW
2083 ;
2084 return 0;
2085}
2086_ACEOF
2087if ac_fn_c_try_compile "$LINENO"; then :
2088 ac_lo=$ac_mid; break
2089else
2090 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2091 if test $ac_mid -le $ac_hi; then
2092 ac_lo= ac_hi=
2093 break
2094 fi
2095 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2096fi
2097rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2098 done
2099else
2100 ac_lo= ac_hi=
2101fi
2102rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2103fi
2104rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2105# Binary search between lo and hi bounds.
2106while test "x$ac_lo" != "x$ac_hi"; do
2107 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2109/* end confdefs.h. */
2110$4
2111int
2112main ()
2113{
2114static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2115test_array [0] = 0
bec39cab 2116
81ecdfbb
RW
2117 ;
2118 return 0;
2119}
2120_ACEOF
2121if ac_fn_c_try_compile "$LINENO"; then :
2122 ac_hi=$ac_mid
2123else
2124 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2125fi
2126rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2127done
2128case $ac_lo in #((
2129?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2130'') ac_retval=1 ;;
2131esac
2132 else
2133 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2134/* end confdefs.h. */
2135$4
2136static long int longval () { return $2; }
2137static unsigned long int ulongval () { return $2; }
2138#include <stdio.h>
2139#include <stdlib.h>
2140int
2141main ()
2142{
bec39cab 2143
81ecdfbb
RW
2144 FILE *f = fopen ("conftest.val", "w");
2145 if (! f)
2146 return 1;
2147 if (($2) < 0)
2148 {
2149 long int i = longval ();
2150 if (i != ($2))
2151 return 1;
2152 fprintf (f, "%ld", i);
2153 }
2154 else
2155 {
2156 unsigned long int i = ulongval ();
2157 if (i != ($2))
2158 return 1;
2159 fprintf (f, "%lu", i);
2160 }
2161 /* Do not output a trailing newline, as this causes \r\n confusion
2162 on some platforms. */
2163 return ferror (f) || fclose (f) != 0;
bec39cab 2164
81ecdfbb
RW
2165 ;
2166 return 0;
2167}
2168_ACEOF
2169if ac_fn_c_try_run "$LINENO"; then :
2170 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2171else
2172 ac_retval=1
2173fi
2174rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2175 conftest.$ac_objext conftest.beam conftest.$ac_ext
2176rm -f conftest.val
bec39cab 2177
81ecdfbb
RW
2178 fi
2179 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2180 return $ac_retval
bec39cab 2181
81ecdfbb 2182} # ac_fn_c_compute_int
bec39cab 2183
55a8c076
YQ
2184# ac_fn_c_check_func LINENO FUNC VAR
2185# ----------------------------------
2186# Tests whether FUNC exists, setting the cache variable VAR accordingly
2187ac_fn_c_check_func ()
81ecdfbb
RW
2188{
2189 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2191$as_echo_n "checking for $2... " >&6; }
2192if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2193 $as_echo_n "(cached) " >&6
2194else
81ecdfbb
RW
2195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2196/* end confdefs.h. */
55a8c076
YQ
2197/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2198 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2199#define $2 innocuous_$2
2200
2201/* System header to define __stub macros and hopefully few prototypes,
2202 which can conflict with char $2 (); below.
2203 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2204 <limits.h> exists even on freestanding compilers. */
2205
2206#ifdef __STDC__
2207# include <limits.h>
2208#else
2209# include <assert.h>
2210#endif
2211
2212#undef $2
2213
2214/* Override any GCC internal prototype to avoid an error.
2215 Use char because int might match the return type of a GCC
2216 builtin and then its argument prototype would still apply. */
2217#ifdef __cplusplus
2218extern "C"
2219#endif
2220char $2 ();
2221/* The GNU C library defines this for functions which it implements
2222 to always fail with ENOSYS. Some functions are actually named
2223 something starting with __ and the normal name is an alias. */
2224#if defined __stub_$2 || defined __stub___$2
2225choke me
2226#endif
2227
2228int
2229main ()
2230{
2231return $2 ();
2232 ;
2233 return 0;
2234}
2235_ACEOF
2236if ac_fn_c_try_link "$LINENO"; then :
2237 eval "$3=yes"
2238else
2239 eval "$3=no"
2240fi
2241rm -f core conftest.err conftest.$ac_objext \
2242 conftest$ac_exeext conftest.$ac_ext
2243fi
2244eval ac_res=\$$3
2245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2246$as_echo "$ac_res" >&6; }
2247 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2248
2249} # ac_fn_c_check_func
2250
c56ccc05
MM
2251# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2252# ----------------------------------------------------
2253# Tries to find if the field MEMBER exists in type AGGR, after including
2254# INCLUDES, setting cache variable VAR accordingly.
2255ac_fn_c_check_member ()
2256{
2257 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2258 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2259$as_echo_n "checking for $2.$3... " >&6; }
2260if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
2261 $as_echo_n "(cached) " >&6
2262else
2263 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2264/* end confdefs.h. */
2265$5
2266int
2267main ()
2268{
2269static $2 ac_aggr;
2270if (ac_aggr.$3)
2271return 0;
2272 ;
2273 return 0;
2274}
2275_ACEOF
2276if ac_fn_c_try_compile "$LINENO"; then :
2277 eval "$4=yes"
2278else
2279 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2280/* end confdefs.h. */
2281$5
2282int
2283main ()
2284{
2285static $2 ac_aggr;
2286if (sizeof ac_aggr.$3)
2287return 0;
2288 ;
2289 return 0;
2290}
2291_ACEOF
2292if ac_fn_c_try_compile "$LINENO"; then :
2293 eval "$4=yes"
2294else
2295 eval "$4=no"
2296fi
2297rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2298fi
2299rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2300fi
2301eval ac_res=\$$4
2302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2303$as_echo "$ac_res" >&6; }
2304 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2305
2306} # ac_fn_c_check_member
2307
07697489
PA
2308# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2309# -------------------------------------------
2310# Tests whether TYPE exists after having included INCLUDES, setting cache
2311# variable VAR accordingly.
2312ac_fn_c_check_type ()
2313{
2314 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2316$as_echo_n "checking for $2... " >&6; }
2317if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2318 $as_echo_n "(cached) " >&6
2319else
2320 eval "$3=no"
2321 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2322/* end confdefs.h. */
2323$4
2324int
2325main ()
2326{
2327if (sizeof ($2))
2328 return 0;
2329 ;
2330 return 0;
2331}
2332_ACEOF
2333if ac_fn_c_try_compile "$LINENO"; then :
2334 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2335/* end confdefs.h. */
2336$4
2337int
2338main ()
2339{
2340if (sizeof (($2)))
2341 return 0;
2342 ;
2343 return 0;
2344}
2345_ACEOF
2346if ac_fn_c_try_compile "$LINENO"; then :
2347
2348else
2349 eval "$3=yes"
2350fi
2351rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2352fi
2353rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2354fi
2355eval ac_res=\$$3
2356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2357$as_echo "$ac_res" >&6; }
2358 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2359
2360} # ac_fn_c_check_type
2361
770d76d7
PA
2362# ac_fn_c_check_decl LINENO SYMBOL VAR
2363# ------------------------------------
2364# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2365ac_fn_c_check_decl ()
2366{
2367 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2368 as_decl_name=`echo $2|sed 's/ *(.*//'`
2369 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2370 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2371$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2372if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2373 $as_echo_n "(cached) " >&6
2374else
2375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2376/* end confdefs.h. */
2377$4
2378int
2379main ()
2380{
2381#ifndef $as_decl_name
2382#ifdef __cplusplus
2383 (void) $as_decl_use;
2384#else
2385 (void) $as_decl_name;
2386#endif
2387#endif
2388
2389 ;
2390 return 0;
2391}
2392_ACEOF
2393if ac_fn_c_try_compile "$LINENO"; then :
2394 eval "$3=yes"
2395else
2396 eval "$3=no"
2397fi
2398rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2399fi
2400eval ac_res=\$$3
2401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2402$as_echo "$ac_res" >&6; }
2403 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2404
2405} # ac_fn_c_check_decl
81ecdfbb
RW
2406cat >config.log <<_ACEOF
2407This file contains any messages produced by compilers while
2408running configure, to aid debugging if configure makes a mistake.
d5af19ba 2409
81ecdfbb
RW
2410It was created by $as_me, which was
2411generated by GNU Autoconf 2.64. Invocation command line was
b4e70030 2412
81ecdfbb 2413 $ $0 $@
413ccac7 2414
81ecdfbb
RW
2415_ACEOF
2416exec 5>>config.log
2417{
2418cat <<_ASUNAME
2419## --------- ##
2420## Platform. ##
2421## --------- ##
413ccac7 2422
81ecdfbb
RW
2423hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2424uname -m = `(uname -m) 2>/dev/null || echo unknown`
2425uname -r = `(uname -r) 2>/dev/null || echo unknown`
2426uname -s = `(uname -s) 2>/dev/null || echo unknown`
2427uname -v = `(uname -v) 2>/dev/null || echo unknown`
85981d60 2428
81ecdfbb
RW
2429/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2430/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
413ccac7 2431
81ecdfbb
RW
2432/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2433/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2434/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2435/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2436/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2437/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2438/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
c906108c 2439
81ecdfbb 2440_ASUNAME
bec39cab 2441
bec39cab
AC
2442as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2443for as_dir in $PATH
2444do
2445 IFS=$as_save_IFS
2446 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2447 $as_echo "PATH: $as_dir"
2448 done
2449IFS=$as_save_IFS
bec39cab 2450
81ecdfbb 2451} >&5
bec39cab 2452
81ecdfbb 2453cat >&5 <<_ACEOF
bec39cab 2454
bec39cab 2455
81ecdfbb
RW
2456## ----------- ##
2457## Core tests. ##
2458## ----------- ##
2459
2460_ACEOF
2461
2462
2463# Keep a trace of the command line.
2464# Strip out --no-create and --no-recursion so they do not pile up.
2465# Strip out --silent because we don't want to record it for future runs.
2466# Also quote any args containing shell meta-characters.
2467# Make two passes to allow for proper duplicate-argument suppression.
2468ac_configure_args=
2469ac_configure_args0=
2470ac_configure_args1=
2471ac_must_keep_next=false
2472for ac_pass in 1 2
2473do
2474 for ac_arg
2475 do
2476 case $ac_arg in
2477 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2478 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2479 | -silent | --silent | --silen | --sile | --sil)
2480 continue ;;
2481 *\'*)
2482 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2483 esac
2484 case $ac_pass in
2485 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2486 2)
2487 as_fn_append ac_configure_args1 " '$ac_arg'"
2488 if test $ac_must_keep_next = true; then
2489 ac_must_keep_next=false # Got value, back to normal.
2490 else
2491 case $ac_arg in
2492 *=* | --config-cache | -C | -disable-* | --disable-* \
2493 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2494 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2495 | -with-* | --with-* | -without-* | --without-* | --x)
2496 case "$ac_configure_args0 " in
2497 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2498 esac
2499 ;;
2500 -* ) ac_must_keep_next=true ;;
2501 esac
2502 fi
2503 as_fn_append ac_configure_args " '$ac_arg'"
2504 ;;
2505 esac
2506 done
2507done
2508{ ac_configure_args0=; unset ac_configure_args0;}
2509{ ac_configure_args1=; unset ac_configure_args1;}
2510
2511# When interrupted or exit'd, cleanup temporary files, and complete
2512# config.log. We remove comments because anyway the quotes in there
2513# would cause problems or look ugly.
2514# WARNING: Use '\'' to represent an apostrophe within the trap.
2515# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2516trap 'exit_status=$?
2517 # Save into config.log some information that might help in debugging.
2518 {
2519 echo
2520
2521 cat <<\_ASBOX
2522## ---------------- ##
2523## Cache variables. ##
2524## ---------------- ##
2525_ASBOX
2526 echo
2527 # The following way of writing the cache mishandles newlines in values,
2528(
2529 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2530 eval ac_val=\$$ac_var
2531 case $ac_val in #(
2532 *${as_nl}*)
2533 case $ac_var in #(
2534 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2535$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2536 esac
2537 case $ac_var in #(
2538 _ | IFS | as_nl) ;; #(
2539 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2540 *) { eval $ac_var=; unset $ac_var;} ;;
2541 esac ;;
2542 esac
2543 done
2544 (set) 2>&1 |
2545 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2546 *${as_nl}ac_space=\ *)
2547 sed -n \
2548 "s/'\''/'\''\\\\'\'''\''/g;
2549 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2550 ;; #(
2551 *)
2552 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2553 ;;
2554 esac |
2555 sort
2556)
2557 echo
2558
2559 cat <<\_ASBOX
2560## ----------------- ##
2561## Output variables. ##
2562## ----------------- ##
2563_ASBOX
2564 echo
2565 for ac_var in $ac_subst_vars
2566 do
2567 eval ac_val=\$$ac_var
2568 case $ac_val in
2569 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2570 esac
2571 $as_echo "$ac_var='\''$ac_val'\''"
2572 done | sort
2573 echo
2574
2575 if test -n "$ac_subst_files"; then
2576 cat <<\_ASBOX
2577## ------------------- ##
2578## File substitutions. ##
2579## ------------------- ##
2580_ASBOX
2581 echo
2582 for ac_var in $ac_subst_files
2583 do
2584 eval ac_val=\$$ac_var
2585 case $ac_val in
2586 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2587 esac
2588 $as_echo "$ac_var='\''$ac_val'\''"
2589 done | sort
2590 echo
2591 fi
2592
2593 if test -s confdefs.h; then
2594 cat <<\_ASBOX
2595## ----------- ##
2596## confdefs.h. ##
2597## ----------- ##
2598_ASBOX
2599 echo
2600 cat confdefs.h
2601 echo
2602 fi
2603 test "$ac_signal" != 0 &&
2604 $as_echo "$as_me: caught signal $ac_signal"
2605 $as_echo "$as_me: exit $exit_status"
2606 } >&5
2607 rm -f core *.core core.conftest.* &&
2608 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2609 exit $exit_status
2610' 0
2611for ac_signal in 1 2 13 15; do
2612 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2613done
2614ac_signal=0
2615
2616# confdefs.h avoids OS command line length limits that DEFS can exceed.
2617rm -f -r conftest* confdefs.h
2618
2619$as_echo "/* confdefs.h */" > confdefs.h
2620
2621# Predefined preprocessor variables.
2622
2623cat >>confdefs.h <<_ACEOF
2624#define PACKAGE_NAME "$PACKAGE_NAME"
2625_ACEOF
2626
2627cat >>confdefs.h <<_ACEOF
2628#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2629_ACEOF
2630
2631cat >>confdefs.h <<_ACEOF
2632#define PACKAGE_VERSION "$PACKAGE_VERSION"
2633_ACEOF
2634
2635cat >>confdefs.h <<_ACEOF
2636#define PACKAGE_STRING "$PACKAGE_STRING"
2637_ACEOF
2638
2639cat >>confdefs.h <<_ACEOF
2640#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2641_ACEOF
2642
2643cat >>confdefs.h <<_ACEOF
2644#define PACKAGE_URL "$PACKAGE_URL"
2645_ACEOF
2646
2647
2648# Let the site file select an alternate cache file if it wants to.
2649# Prefer an explicitly selected file to automatically selected ones.
2650ac_site_file1=NONE
2651ac_site_file2=NONE
2652if test -n "$CONFIG_SITE"; then
2653 ac_site_file1=$CONFIG_SITE
2654elif test "x$prefix" != xNONE; then
2655 ac_site_file1=$prefix/share/config.site
2656 ac_site_file2=$prefix/etc/config.site
2657else
2658 ac_site_file1=$ac_default_prefix/share/config.site
2659 ac_site_file2=$ac_default_prefix/etc/config.site
2660fi
2661for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2662do
2663 test "x$ac_site_file" = xNONE && continue
2664 if test -r "$ac_site_file"; then
2665 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2666$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2667 sed 's/^/| /' "$ac_site_file" >&5
2668 . "$ac_site_file"
2669 fi
2670done
2671
2672if test -r "$cache_file"; then
2673 # Some versions of bash will fail to source /dev/null (special
2674 # files actually), so we avoid doing that.
2675 if test -f "$cache_file"; then
2676 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2677$as_echo "$as_me: loading cache $cache_file" >&6;}
2678 case $cache_file in
2679 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2680 *) . "./$cache_file";;
2681 esac
2682 fi
2683else
2684 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2685$as_echo "$as_me: creating cache $cache_file" >&6;}
2686 >$cache_file
bec39cab
AC
2687fi
2688
81ecdfbb
RW
2689# Check that the precious variables saved in the cache have kept the same
2690# value.
2691ac_cache_corrupted=false
2692for ac_var in $ac_precious_vars; do
2693 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2694 eval ac_new_set=\$ac_env_${ac_var}_set
2695 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2696 eval ac_new_val=\$ac_env_${ac_var}_value
2697 case $ac_old_set,$ac_new_set in
2698 set,)
2699 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2700$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2701 ac_cache_corrupted=: ;;
2702 ,set)
2703 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2704$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2705 ac_cache_corrupted=: ;;
2706 ,);;
2707 *)
2708 if test "x$ac_old_val" != "x$ac_new_val"; then
2709 # differences in whitespace do not lead to failure.
2710 ac_old_val_w=`echo x $ac_old_val`
2711 ac_new_val_w=`echo x $ac_new_val`
2712 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2713 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2714$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2715 ac_cache_corrupted=:
2716 else
2717 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2718$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2719 eval $ac_var=\$ac_old_val
2720 fi
2721 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2722$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2723 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2724$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2725 fi;;
2726 esac
2727 # Pass precious variables to config.status.
2728 if test "$ac_new_set" = set; then
2729 case $ac_new_val in
2730 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2731 *) ac_arg=$ac_var=$ac_new_val ;;
2732 esac
2733 case " $ac_configure_args " in
2734 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2735 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2736 esac
2737 fi
2738done
2739if $ac_cache_corrupted; then
2740 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2741$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2742 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2743$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2744 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2745fi
2746## -------------------- ##
2747## Main body of script. ##
2748## -------------------- ##
2749
2750ac_ext=c
2751ac_cpp='$CPP $CPPFLAGS'
2752ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2753ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2754ac_compiler_gnu=$ac_cv_c_compiler_gnu
2755
2756
2757
2758
2759
2760ac_config_headers="$ac_config_headers config.h:config.in"
2761
2762
2763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2764$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2765 # Check whether --enable-maintainer-mode was given.
2766if test "${enable_maintainer_mode+set}" = set; then :
2767 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2768else
2769 USE_MAINTAINER_MODE=no
2770fi
2771
2772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
2773$as_echo "$USE_MAINTAINER_MODE" >&6; }
2774 if test $USE_MAINTAINER_MODE = yes; then
2775 MAINTAINER_MODE_TRUE=
2776 MAINTAINER_MODE_FALSE='#'
2777else
2778 MAINTAINER_MODE_TRUE='#'
2779 MAINTAINER_MODE_FALSE=
2780fi
2781
2782 MAINT=$MAINTAINER_MODE_TRUE
2783
2784
2785
17ef446e 2786# Set the 'development' global.
270c9937 2787. $srcdir/../bfd/development.sh
f5f1cdb6 2788
81ecdfbb
RW
2789ac_ext=c
2790ac_cpp='$CPP $CPPFLAGS'
2791ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2792ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2793ac_compiler_gnu=$ac_cv_c_compiler_gnu
2794if test -n "$ac_tool_prefix"; then
2795 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2796set dummy ${ac_tool_prefix}gcc; ac_word=$2
2797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2798$as_echo_n "checking for $ac_word... " >&6; }
2799if test "${ac_cv_prog_CC+set}" = set; then :
2800 $as_echo_n "(cached) " >&6
c906108c
SS
2801else
2802 if test -n "$CC"; then
2803 ac_cv_prog_CC="$CC" # Let the user override the test.
2804else
bec39cab
AC
2805as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2806for as_dir in $PATH
2807do
2808 IFS=$as_save_IFS
2809 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2810 for ac_exec_ext in '' $ac_executable_extensions; do
2811 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2812 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2813 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2814 break 2
2815 fi
2816done
81ecdfbb
RW
2817 done
2818IFS=$as_save_IFS
bec39cab 2819
c906108c
SS
2820fi
2821fi
bec39cab 2822CC=$ac_cv_prog_CC
c906108c 2823if test -n "$CC"; then
81ecdfbb
RW
2824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2825$as_echo "$CC" >&6; }
c906108c 2826else
81ecdfbb
RW
2827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2828$as_echo "no" >&6; }
c906108c
SS
2829fi
2830
81ecdfbb 2831
b4e70030
JB
2832fi
2833if test -z "$ac_cv_prog_CC"; then
2834 ac_ct_CC=$CC
81ecdfbb
RW
2835 # Extract the first word of "gcc", so it can be a program name with args.
2836set dummy gcc; ac_word=$2
2837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2838$as_echo_n "checking for $ac_word... " >&6; }
2839if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
2840 $as_echo_n "(cached) " >&6
b4e70030
JB
2841else
2842 if test -n "$ac_ct_CC"; then
2843 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2844else
2845as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2846for as_dir in $PATH
2847do
2848 IFS=$as_save_IFS
2849 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2850 for ac_exec_ext in '' $ac_executable_extensions; do
2851 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2852 ac_cv_prog_ac_ct_CC="gcc"
2853 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b4e70030 2854 break 2
4e8d927d 2855 fi
b4e70030 2856done
81ecdfbb
RW
2857 done
2858IFS=$as_save_IFS
b4e70030
JB
2859
2860fi
2861fi
2862ac_ct_CC=$ac_cv_prog_ac_ct_CC
2863if test -n "$ac_ct_CC"; then
81ecdfbb
RW
2864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2865$as_echo "$ac_ct_CC" >&6; }
b4e70030 2866else
81ecdfbb
RW
2867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2868$as_echo "no" >&6; }
b4e70030
JB
2869fi
2870
81ecdfbb
RW
2871 if test "x$ac_ct_CC" = x; then
2872 CC=""
2873 else
2874 case $cross_compiling:$ac_tool_warned in
2875yes:)
2876{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2877$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2878ac_tool_warned=yes ;;
2879esac
2880 CC=$ac_ct_CC
2881 fi
b4e70030
JB
2882else
2883 CC="$ac_cv_prog_CC"
2884fi
2885
c906108c 2886if test -z "$CC"; then
81ecdfbb
RW
2887 if test -n "$ac_tool_prefix"; then
2888 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2889set dummy ${ac_tool_prefix}cc; ac_word=$2
2890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2891$as_echo_n "checking for $ac_word... " >&6; }
2892if test "${ac_cv_prog_CC+set}" = set; then :
2893 $as_echo_n "(cached) " >&6
c906108c
SS
2894else
2895 if test -n "$CC"; then
2896 ac_cv_prog_CC="$CC" # Let the user override the test.
2897else
bec39cab
AC
2898as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2899for as_dir in $PATH
2900do
2901 IFS=$as_save_IFS
2902 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2903 for ac_exec_ext in '' $ac_executable_extensions; do
2904 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2905 ac_cv_prog_CC="${ac_tool_prefix}cc"
2906 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2907 break 2
2908 fi
2909done
81ecdfbb
RW
2910 done
2911IFS=$as_save_IFS
2912
2913fi
2914fi
2915CC=$ac_cv_prog_CC
2916if test -n "$CC"; then
2917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2918$as_echo "$CC" >&6; }
2919else
2920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2921$as_echo "no" >&6; }
2922fi
2923
2924
2925 fi
2926fi
2927if test -z "$CC"; then
2928 # Extract the first word of "cc", so it can be a program name with args.
2929set dummy cc; ac_word=$2
2930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2931$as_echo_n "checking for $ac_word... " >&6; }
2932if test "${ac_cv_prog_CC+set}" = set; then :
2933 $as_echo_n "(cached) " >&6
2934else
2935 if test -n "$CC"; then
2936 ac_cv_prog_CC="$CC" # Let the user override the test.
2937else
2938 ac_prog_rejected=no
2939as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2940for as_dir in $PATH
2941do
2942 IFS=$as_save_IFS
2943 test -z "$as_dir" && as_dir=.
2944 for ac_exec_ext in '' $ac_executable_extensions; do
2945 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2946 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2947 ac_prog_rejected=yes
2948 continue
2949 fi
2950 ac_cv_prog_CC="cc"
2951 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2952 break 2
2953 fi
2954done
2955 done
2956IFS=$as_save_IFS
bec39cab 2957
c906108c
SS
2958if test $ac_prog_rejected = yes; then
2959 # We found a bogon in the path, so make sure we never use it.
2960 set dummy $ac_cv_prog_CC
2961 shift
bec39cab 2962 if test $# != 0; then
c906108c
SS
2963 # We chose a different compiler from the bogus one.
2964 # However, it has the same basename, so the bogon will be chosen
2965 # first if we set CC to just the basename; use the full file name.
2966 shift
bec39cab 2967 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
c906108c
SS
2968 fi
2969fi
2970fi
2971fi
bec39cab 2972CC=$ac_cv_prog_CC
c906108c 2973if test -n "$CC"; then
81ecdfbb
RW
2974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2975$as_echo "$CC" >&6; }
c906108c 2976else
81ecdfbb
RW
2977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2978$as_echo "no" >&6; }
c906108c
SS
2979fi
2980
81ecdfbb 2981
bec39cab
AC
2982fi
2983if test -z "$CC"; then
2984 if test -n "$ac_tool_prefix"; then
81ecdfbb 2985 for ac_prog in cl.exe
bec39cab
AC
2986 do
2987 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2988set dummy $ac_tool_prefix$ac_prog; ac_word=$2
81ecdfbb
RW
2989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2990$as_echo_n "checking for $ac_word... " >&6; }
2991if test "${ac_cv_prog_CC+set}" = set; then :
2992 $as_echo_n "(cached) " >&6
c906108c
SS
2993else
2994 if test -n "$CC"; then
2995 ac_cv_prog_CC="$CC" # Let the user override the test.
2996else
bec39cab
AC
2997as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2998for as_dir in $PATH
2999do
3000 IFS=$as_save_IFS
3001 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
3002 for ac_exec_ext in '' $ac_executable_extensions; do
3003 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 3004 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
81ecdfbb 3005 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
3006 break 2
3007 fi
3008done
81ecdfbb
RW
3009 done
3010IFS=$as_save_IFS
bec39cab 3011
c906108c
SS
3012fi
3013fi
bec39cab 3014CC=$ac_cv_prog_CC
c906108c 3015if test -n "$CC"; then
81ecdfbb
RW
3016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3017$as_echo "$CC" >&6; }
c906108c 3018else
81ecdfbb
RW
3019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3020$as_echo "no" >&6; }
c906108c 3021fi
bec39cab 3022
81ecdfbb 3023
bec39cab
AC
3024 test -n "$CC" && break
3025 done
3026fi
3027if test -z "$CC"; then
3028 ac_ct_CC=$CC
81ecdfbb 3029 for ac_prog in cl.exe
bec39cab
AC
3030do
3031 # Extract the first word of "$ac_prog", so it can be a program name with args.
3032set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
3033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3034$as_echo_n "checking for $ac_word... " >&6; }
3035if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3036 $as_echo_n "(cached) " >&6
bec39cab
AC
3037else
3038 if test -n "$ac_ct_CC"; then
3039 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3040else
3041as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3042for as_dir in $PATH
3043do
3044 IFS=$as_save_IFS
3045 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
3046 for ac_exec_ext in '' $ac_executable_extensions; do
3047 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 3048 ac_cv_prog_ac_ct_CC="$ac_prog"
81ecdfbb 3049 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab 3050 break 2
c906108c 3051 fi
bec39cab 3052done
81ecdfbb
RW
3053 done
3054IFS=$as_save_IFS
bec39cab
AC
3055
3056fi
3057fi
3058ac_ct_CC=$ac_cv_prog_ac_ct_CC
3059if test -n "$ac_ct_CC"; then
81ecdfbb
RW
3060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3061$as_echo "$ac_ct_CC" >&6; }
bec39cab 3062else
81ecdfbb
RW
3063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3064$as_echo "no" >&6; }
c906108c
SS
3065fi
3066
81ecdfbb 3067
bec39cab
AC
3068 test -n "$ac_ct_CC" && break
3069done
c906108c 3070
81ecdfbb
RW
3071 if test "x$ac_ct_CC" = x; then
3072 CC=""
3073 else
3074 case $cross_compiling:$ac_tool_warned in
3075yes:)
3076{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3077$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3078ac_tool_warned=yes ;;
3079esac
3080 CC=$ac_ct_CC
3081 fi
bec39cab
AC
3082fi
3083
3084fi
3085
3086
81ecdfbb
RW
3087test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3088$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3089as_fn_error "no acceptable C compiler found in \$PATH
3090See \`config.log' for more details." "$LINENO" 5; }
bec39cab
AC
3091
3092# Provide some information about the compiler.
81ecdfbb
RW
3093$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3094set X $ac_compile
3095ac_compiler=$2
3096for ac_option in --version -v -V -qversion; do
3097 { { ac_try="$ac_compiler $ac_option >&5"
3098case "(($ac_try" in
3099 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3100 *) ac_try_echo=$ac_try;;
3101esac
3102eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3103$as_echo "$ac_try_echo"; } >&5
3104 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
bec39cab 3105 ac_status=$?
81ecdfbb
RW
3106 if test -s conftest.err; then
3107 sed '10a\
3108... rest of stderr output deleted ...
3109 10q' conftest.err >conftest.er1
3110 cat conftest.er1 >&5
3111 rm -f conftest.er1 conftest.err
3112 fi
3113 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3114 test $ac_status = 0; }
3115done
bec39cab 3116
81ecdfbb 3117cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3118/* end confdefs.h. */
3119
3120int
3121main ()
3122{
3123
3124 ;
3125 return 0;
3126}
3127_ACEOF
3128ac_clean_files_save=$ac_clean_files
81ecdfbb 3129ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out"
bec39cab
AC
3130# Try to create an executable without -o first, disregard a.out.
3131# It will help us diagnose broken compilers, and finding out an intuition
3132# of exeext.
81ecdfbb
RW
3133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3134$as_echo_n "checking for C compiler default output file name... " >&6; }
3135ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3136
3137# The possible output files:
3138ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3139
3140ac_rmfiles=
3141for ac_file in $ac_files
3142do
3143 case $ac_file in
3144 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3145 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3146 esac
3147done
3148rm -f $ac_rmfiles
3149
3150if { { ac_try="$ac_link_default"
3151case "(($ac_try" in
3152 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3153 *) ac_try_echo=$ac_try;;
3154esac
3155eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3156$as_echo "$ac_try_echo"; } >&5
3157 (eval "$ac_link_default") 2>&5
3158 ac_status=$?
3159 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3160 test $ac_status = 0; }; then :
3161 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3162# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3163# in a Makefile. We should not override ac_cv_exeext if it was cached,
3164# so that the user can short-circuit this test for compilers unknown to
3165# Autoconf.
3166for ac_file in $ac_files ''
bec39cab
AC
3167do
3168 test -f "$ac_file" || continue
3169 case $ac_file in
81ecdfbb 3170 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
b4e70030
JB
3171 ;;
3172 [ab].out )
3173 # We found the default executable, but exeext='' is most
3174 # certainly right.
3175 break;;
3176 *.* )
81ecdfbb
RW
3177 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3178 then :; else
3179 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3180 fi
3181 # We set ac_cv_exeext here because the later test for it is not
3182 # safe: cross compilers may not add the suffix if given an `-o'
3183 # argument, so we may need to know it at that point already.
3184 # Even if this section looks crufty: it has the advantage of
3185 # actually working.
b4e70030
JB
3186 break;;
3187 * )
3188 break;;
bec39cab
AC
3189 esac
3190done
81ecdfbb
RW
3191test "$ac_cv_exeext" = no && ac_cv_exeext=
3192
bec39cab 3193else
81ecdfbb
RW
3194 ac_file=''
3195fi
3196{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3197$as_echo "$ac_file" >&6; }
3198if test -z "$ac_file"; then :
3199 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3200sed 's/^/| /' conftest.$ac_ext >&5
3201
81ecdfbb
RW
3202{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3203$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3204{ as_fn_set_status 77
3205as_fn_error "C compiler cannot create executables
3206See \`config.log' for more details." "$LINENO" 5; }; }
bec39cab 3207fi
b4e70030 3208ac_exeext=$ac_cv_exeext
b4e70030 3209
81ecdfbb 3210# Check that the compiler produces executables we can run. If not, either
bec39cab 3211# the compiler is broken, or we cross compile.
81ecdfbb
RW
3212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3213$as_echo_n "checking whether the C compiler works... " >&6; }
bec39cab
AC
3214# If not cross compiling, check that we can run a simple program.
3215if test "$cross_compiling" != yes; then
3216 if { ac_try='./$ac_file'
81ecdfbb
RW
3217 { { case "(($ac_try" in
3218 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3219 *) ac_try_echo=$ac_try;;
3220esac
3221eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3222$as_echo "$ac_try_echo"; } >&5
3223 (eval "$ac_try") 2>&5
bec39cab 3224 ac_status=$?
81ecdfbb
RW
3225 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3226 test $ac_status = 0; }; }; then
bec39cab 3227 cross_compiling=no
c906108c 3228 else
bec39cab
AC
3229 if test "$cross_compiling" = maybe; then
3230 cross_compiling=yes
3231 else
81ecdfbb
RW
3232 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3233$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3234as_fn_error "cannot run C compiled programs.
bec39cab 3235If you meant to cross compile, use \`--host'.
81ecdfbb 3236See \`config.log' for more details." "$LINENO" 5; }
bec39cab 3237 fi
c906108c 3238 fi
bec39cab 3239fi
81ecdfbb
RW
3240{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3241$as_echo "yes" >&6; }
bec39cab 3242
81ecdfbb 3243rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out
b4e70030 3244ac_clean_files=$ac_clean_files_save
81ecdfbb 3245# Check that the compiler produces executables we can run. If not, either
b4e70030 3246# the compiler is broken, or we cross compile.
81ecdfbb
RW
3247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3248$as_echo_n "checking whether we are cross compiling... " >&6; }
3249{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3250$as_echo "$cross_compiling" >&6; }
3251
3252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3253$as_echo_n "checking for suffix of executables... " >&6; }
3254if { { ac_try="$ac_link"
3255case "(($ac_try" in
3256 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3257 *) ac_try_echo=$ac_try;;
3258esac
3259eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3260$as_echo "$ac_try_echo"; } >&5
3261 (eval "$ac_link") 2>&5
bec39cab 3262 ac_status=$?
81ecdfbb
RW
3263 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3264 test $ac_status = 0; }; then :
b4e70030
JB
3265 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3266# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3267# work properly (i.e., refer to `conftest.exe'), while it won't with
3268# `rm'.
3269for ac_file in conftest.exe conftest conftest.*; do
3270 test -f "$ac_file" || continue
3271 case $ac_file in
81ecdfbb 3272 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
b4e70030 3273 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
b4e70030
JB
3274 break;;
3275 * ) break;;
3276 esac
3277done
c906108c 3278else
81ecdfbb
RW
3279 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3280$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3281as_fn_error "cannot compute suffix of executables: cannot compile and link
3282See \`config.log' for more details." "$LINENO" 5; }
c906108c 3283fi
b4e70030 3284rm -f conftest$ac_cv_exeext
81ecdfbb
RW
3285{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3286$as_echo "$ac_cv_exeext" >&6; }
c906108c 3287
b4e70030 3288rm -f conftest.$ac_ext
bec39cab
AC
3289EXEEXT=$ac_cv_exeext
3290ac_exeext=$EXEEXT
81ecdfbb
RW
3291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3292$as_echo_n "checking for suffix of object files... " >&6; }
3293if test "${ac_cv_objext+set}" = set; then :
3294 $as_echo_n "(cached) " >&6
bec39cab 3295else
81ecdfbb 3296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
3297/* end confdefs.h. */
3298
3299int
3300main ()
3301{
3302
3303 ;
3304 return 0;
3305}
3306_ACEOF
3307rm -f conftest.o conftest.obj
81ecdfbb
RW
3308if { { ac_try="$ac_compile"
3309case "(($ac_try" in
3310 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3311 *) ac_try_echo=$ac_try;;
3312esac
3313eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3314$as_echo "$ac_try_echo"; } >&5
3315 (eval "$ac_compile") 2>&5
3316 ac_status=$?
3317 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3318 test $ac_status = 0; }; then :
3319 for ac_file in conftest.o conftest.obj conftest.*; do
3320 test -f "$ac_file" || continue;
bec39cab 3321 case $ac_file in
81ecdfbb 3322 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
bec39cab
AC
3323 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3324 break;;
3325 esac
3326done
c906108c 3327else
81ecdfbb 3328 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3329sed 's/^/| /' conftest.$ac_ext >&5
3330
81ecdfbb
RW
3331{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3332$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3333as_fn_error "cannot compute suffix of object files: cannot compile
3334See \`config.log' for more details." "$LINENO" 5; }
c906108c 3335fi
b4e70030 3336rm -f conftest.$ac_cv_objext conftest.$ac_ext
bec39cab 3337fi
81ecdfbb
RW
3338{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3339$as_echo "$ac_cv_objext" >&6; }
bec39cab
AC
3340OBJEXT=$ac_cv_objext
3341ac_objext=$OBJEXT
81ecdfbb
RW
3342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3343$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3344if test "${ac_cv_c_compiler_gnu+set}" = set; then :
3345 $as_echo_n "(cached) " >&6
c906108c 3346else
81ecdfbb 3347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3348/* end confdefs.h. */
3349
3350int
3351main ()
3352{
3353#ifndef __GNUC__
3354 choke me
3355#endif
3356
3357 ;
3358 return 0;
3359}
3360_ACEOF
81ecdfbb 3361if ac_fn_c_try_compile "$LINENO"; then :
bec39cab
AC
3362 ac_compiler_gnu=yes
3363else
81ecdfbb 3364 ac_compiler_gnu=no
bec39cab 3365fi
81ecdfbb 3366rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab
AC
3367ac_cv_c_compiler_gnu=$ac_compiler_gnu
3368
3369fi
81ecdfbb
RW
3370{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3371$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3372if test $ac_compiler_gnu = yes; then
3373 GCC=yes
3374else
3375 GCC=
3376fi
bec39cab
AC
3377ac_test_CFLAGS=${CFLAGS+set}
3378ac_save_CFLAGS=$CFLAGS
81ecdfbb
RW
3379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3380$as_echo_n "checking whether $CC accepts -g... " >&6; }
3381if test "${ac_cv_prog_cc_g+set}" = set; then :
3382 $as_echo_n "(cached) " >&6
bec39cab 3383else
81ecdfbb
RW
3384 ac_save_c_werror_flag=$ac_c_werror_flag
3385 ac_c_werror_flag=yes
3386 ac_cv_prog_cc_g=no
3387 CFLAGS="-g"
3388 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3389/* end confdefs.h. */
3390
3391int
3392main ()
3393{
3394
3395 ;
3396 return 0;
3397}
3398_ACEOF
81ecdfbb 3399if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
3400 ac_cv_prog_cc_g=yes
3401else
81ecdfbb
RW
3402 CFLAGS=""
3403 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3404/* end confdefs.h. */
3405
3406int
3407main ()
3408{
3409
3410 ;
3411 return 0;
3412}
3413_ACEOF
3414if ac_fn_c_try_compile "$LINENO"; then :
3415
3416else
3417 ac_c_werror_flag=$ac_save_c_werror_flag
3418 CFLAGS="-g"
3419 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3420/* end confdefs.h. */
3421
3422int
3423main ()
3424{
c906108c 3425
81ecdfbb
RW
3426 ;
3427 return 0;
3428}
3429_ACEOF
3430if ac_fn_c_try_compile "$LINENO"; then :
3431 ac_cv_prog_cc_g=yes
3432fi
3433rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3434fi
3435rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4e8d927d 3436fi
81ecdfbb
RW
3437rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3438 ac_c_werror_flag=$ac_save_c_werror_flag
bec39cab 3439fi
81ecdfbb
RW
3440{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3441$as_echo "$ac_cv_prog_cc_g" >&6; }
c906108c 3442if test "$ac_test_CFLAGS" = set; then
bec39cab 3443 CFLAGS=$ac_save_CFLAGS
c906108c
SS
3444elif test $ac_cv_prog_cc_g = yes; then
3445 if test "$GCC" = yes; then
3446 CFLAGS="-g -O2"
3447 else
3448 CFLAGS="-g"
3449 fi
3450else
3451 if test "$GCC" = yes; then
3452 CFLAGS="-O2"
3453 else
3454 CFLAGS=
3455 fi
3456fi
81ecdfbb
RW
3457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3458$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3459if test "${ac_cv_prog_cc_c89+set}" = set; then :
3460 $as_echo_n "(cached) " >&6
bec39cab 3461else
81ecdfbb 3462 ac_cv_prog_cc_c89=no
bec39cab 3463ac_save_CC=$CC
81ecdfbb 3464cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3465/* end confdefs.h. */
c906108c
SS
3466#include <stdarg.h>
3467#include <stdio.h>
3468#include <sys/types.h>
3469#include <sys/stat.h>
3470/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3471struct buf { int x; };
3472FILE * (*rcsopen) (struct buf *, struct stat *, int);
3473static char *e (p, i)
3474 char **p;
3475 int i;
3476{
3477 return p[i];
3478}
3479static char *f (char * (*g) (char **, int), char **p, ...)
3480{
3481 char *s;
3482 va_list v;
3483 va_start (v,p);
3484 s = g (p, va_arg (v,int));
3485 va_end (v);
3486 return s;
3487}
bec39cab
AC
3488
3489/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3490 function prototypes and stuff, but not '\xHH' hex character constants.
3491 These don't provoke an error unfortunately, instead are silently treated
81ecdfbb 3492 as 'x'. The following induces an error, until -std is added to get
bec39cab
AC
3493 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3494 array size at least. It's necessary to write '\x00'==0 to get something
81ecdfbb 3495 that's true only with -std. */
bec39cab
AC
3496int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3497
81ecdfbb
RW
3498/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3499 inside strings and character constants. */
3500#define FOO(x) 'x'
3501int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3502
c906108c
SS
3503int test (int i, double x);
3504struct s1 {int (*f) (int a);};
3505struct s2 {int (*f) (double a);};
3506int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3507int argc;
3508char **argv;
bec39cab
AC
3509int
3510main ()
3511{
c906108c 3512return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
bec39cab
AC
3513 ;
3514 return 0;
3515}
3516_ACEOF
81ecdfbb
RW
3517for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3518 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
bec39cab
AC
3519do
3520 CC="$ac_save_CC $ac_arg"
81ecdfbb
RW
3521 if ac_fn_c_try_compile "$LINENO"; then :
3522 ac_cv_prog_cc_c89=$ac_arg
c906108c 3523fi
81ecdfbb
RW
3524rm -f core conftest.err conftest.$ac_objext
3525 test "x$ac_cv_prog_cc_c89" != "xno" && break
c906108c 3526done
81ecdfbb 3527rm -f conftest.$ac_ext
bec39cab 3528CC=$ac_save_CC
c906108c
SS
3529
3530fi
81ecdfbb
RW
3531# AC_CACHE_VAL
3532case "x$ac_cv_prog_cc_c89" in
3533 x)
3534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3535$as_echo "none needed" >&6; } ;;
3536 xno)
3537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3538$as_echo "unsupported" >&6; } ;;
bec39cab 3539 *)
81ecdfbb
RW
3540 CC="$CC $ac_cv_prog_cc_c89"
3541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3542$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
c906108c 3543esac
81ecdfbb 3544if test "x$ac_cv_prog_cc_c89" != xno; then :
c906108c 3545
b4e70030
JB
3546fi
3547
bec39cab
AC
3548ac_ext=c
3549ac_cpp='$CPP $CPPFLAGS'
3550ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3551ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3552ac_compiler_gnu=$ac_cv_c_compiler_gnu
c906108c 3553
3bc3d82a
PA
3554ac_ext=cpp
3555ac_cpp='$CXXCPP $CPPFLAGS'
3556ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3557ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3558ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3559if test -z "$CXX"; then
3560 if test -n "$CCC"; then
3561 CXX=$CCC
3562 else
3563 if test -n "$ac_tool_prefix"; then
3564 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3565 do
3566 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3567set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3569$as_echo_n "checking for $ac_word... " >&6; }
3570if test "${ac_cv_prog_CXX+set}" = set; then :
3571 $as_echo_n "(cached) " >&6
3572else
3573 if test -n "$CXX"; then
3574 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3575else
3576as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3577for as_dir in $PATH
3578do
3579 IFS=$as_save_IFS
3580 test -z "$as_dir" && as_dir=.
3581 for ac_exec_ext in '' $ac_executable_extensions; do
3582 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3583 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3584 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3585 break 2
3586 fi
3587done
3588 done
3589IFS=$as_save_IFS
3590
3591fi
3592fi
3593CXX=$ac_cv_prog_CXX
3594if test -n "$CXX"; then
3595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
3596$as_echo "$CXX" >&6; }
3597else
3598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3599$as_echo "no" >&6; }
3600fi
3601
3602
3603 test -n "$CXX" && break
3604 done
3605fi
3606if test -z "$CXX"; then
3607 ac_ct_CXX=$CXX
3608 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3609do
3610 # Extract the first word of "$ac_prog", so it can be a program name with args.
3611set dummy $ac_prog; ac_word=$2
3612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3613$as_echo_n "checking for $ac_word... " >&6; }
3614if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
3615 $as_echo_n "(cached) " >&6
3616else
3617 if test -n "$ac_ct_CXX"; then
3618 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3619else
3620as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3621for as_dir in $PATH
3622do
3623 IFS=$as_save_IFS
3624 test -z "$as_dir" && as_dir=.
3625 for ac_exec_ext in '' $ac_executable_extensions; do
3626 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3627 ac_cv_prog_ac_ct_CXX="$ac_prog"
3628 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3629 break 2
3630 fi
3631done
3632 done
3633IFS=$as_save_IFS
3634
3635fi
3636fi
3637ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3638if test -n "$ac_ct_CXX"; then
3639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
3640$as_echo "$ac_ct_CXX" >&6; }
3641else
3642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3643$as_echo "no" >&6; }
3644fi
3645
3646
3647 test -n "$ac_ct_CXX" && break
3648done
3649
3650 if test "x$ac_ct_CXX" = x; then
3651 CXX="g++"
3652 else
3653 case $cross_compiling:$ac_tool_warned in
3654yes:)
3655{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3656$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3657ac_tool_warned=yes ;;
3658esac
3659 CXX=$ac_ct_CXX
3660 fi
3661fi
3662
3663 fi
3664fi
3665# Provide some information about the compiler.
3666$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
3667set X $ac_compile
3668ac_compiler=$2
3669for ac_option in --version -v -V -qversion; do
3670 { { ac_try="$ac_compiler $ac_option >&5"
3671case "(($ac_try" in
3672 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3673 *) ac_try_echo=$ac_try;;
3674esac
3675eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3676$as_echo "$ac_try_echo"; } >&5
3677 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3678 ac_status=$?
3679 if test -s conftest.err; then
3680 sed '10a\
3681... rest of stderr output deleted ...
3682 10q' conftest.err >conftest.er1
3683 cat conftest.er1 >&5
3684 rm -f conftest.er1 conftest.err
3685 fi
3686 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3687 test $ac_status = 0; }
3688done
3689
3690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
3691$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
3692if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
3693 $as_echo_n "(cached) " >&6
3694else
3695 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3696/* end confdefs.h. */
3697
3698int
3699main ()
3700{
3701#ifndef __GNUC__
3702 choke me
3703#endif
3704
3705 ;
3706 return 0;
3707}
3708_ACEOF
3709if ac_fn_cxx_try_compile "$LINENO"; then :
3710 ac_compiler_gnu=yes
3711else
3712 ac_compiler_gnu=no
3713fi
3714rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3715ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3716
3717fi
3718{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
3719$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
3720if test $ac_compiler_gnu = yes; then
3721 GXX=yes
3722else
3723 GXX=
3724fi
3725ac_test_CXXFLAGS=${CXXFLAGS+set}
3726ac_save_CXXFLAGS=$CXXFLAGS
3727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
3728$as_echo_n "checking whether $CXX accepts -g... " >&6; }
3729if test "${ac_cv_prog_cxx_g+set}" = set; then :
3730 $as_echo_n "(cached) " >&6
3731else
3732 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
3733 ac_cxx_werror_flag=yes
3734 ac_cv_prog_cxx_g=no
3735 CXXFLAGS="-g"
3736 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3737/* end confdefs.h. */
3738
3739int
3740main ()
3741{
3742
3743 ;
3744 return 0;
3745}
3746_ACEOF
3747if ac_fn_cxx_try_compile "$LINENO"; then :
3748 ac_cv_prog_cxx_g=yes
3749else
3750 CXXFLAGS=""
3751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3752/* end confdefs.h. */
3753
3754int
3755main ()
3756{
3757
3758 ;
3759 return 0;
3760}
3761_ACEOF
3762if ac_fn_cxx_try_compile "$LINENO"; then :
3763
3764else
3765 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3766 CXXFLAGS="-g"
3767 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3768/* end confdefs.h. */
3769
3770int
3771main ()
3772{
3773
3774 ;
3775 return 0;
3776}
3777_ACEOF
3778if ac_fn_cxx_try_compile "$LINENO"; then :
3779 ac_cv_prog_cxx_g=yes
3780fi
3781rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3782fi
3783rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3784fi
3785rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3786 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3787fi
3788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
3789$as_echo "$ac_cv_prog_cxx_g" >&6; }
3790if test "$ac_test_CXXFLAGS" = set; then
3791 CXXFLAGS=$ac_save_CXXFLAGS
3792elif test $ac_cv_prog_cxx_g = yes; then
3793 if test "$GXX" = yes; then
3794 CXXFLAGS="-g -O2"
3795 else
3796 CXXFLAGS="-g"
3797 fi
3798else
3799 if test "$GXX" = yes; then
3800 CXXFLAGS="-O2"
3801 else
3802 CXXFLAGS=
3803 fi
3804fi
3805ac_ext=c
3806ac_cpp='$CPP $CPPFLAGS'
3807ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3808ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3809ac_compiler_gnu=$ac_cv_c_compiler_gnu
3810
3811
60ca704f 3812
bec39cab
AC
3813ac_ext=c
3814ac_cpp='$CPP $CPPFLAGS'
3815ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3816ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3817ac_compiler_gnu=$ac_cv_c_compiler_gnu
81ecdfbb
RW
3818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3819$as_echo_n "checking how to run the C preprocessor... " >&6; }
bec39cab
AC
3820# On Suns, sometimes $CPP names a directory.
3821if test -n "$CPP" && test -d "$CPP"; then
3822 CPP=
8bb2c122 3823fi
bec39cab 3824if test -z "$CPP"; then
81ecdfbb
RW
3825 if test "${ac_cv_prog_CPP+set}" = set; then :
3826 $as_echo_n "(cached) " >&6
bec39cab
AC
3827else
3828 # Double quotes because CPP needs to be expanded
3829 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3830 do
3831 ac_preproc_ok=false
3832for ac_c_preproc_warn_flag in '' yes
3833do
3834 # Use a header file that comes with gcc, so configuring glibc
3835 # with a fresh cross-compiler works.
3836 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3837 # <limits.h> exists even on freestanding compilers.
3838 # On the NeXT, cc -E runs the code through the compiler's parser,
3839 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3841/* end confdefs.h. */
3842#ifdef __STDC__
3843# include <limits.h>
3844#else
3845# include <assert.h>
3846#endif
3847 Syntax error
3848_ACEOF
81ecdfbb 3849if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3850
81ecdfbb 3851else
bec39cab
AC
3852 # Broken: fails on valid input.
3853continue
3854fi
3855rm -f conftest.err conftest.$ac_ext
3856
81ecdfbb 3857 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3858 # can be detected and how.
81ecdfbb 3859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3860/* end confdefs.h. */
3861#include <ac_nonexistent.h>
3862_ACEOF
81ecdfbb 3863if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3864 # Broken: success on invalid input.
3865continue
8bb2c122 3866else
bec39cab
AC
3867 # Passes both tests.
3868ac_preproc_ok=:
3869break
8bb2c122 3870fi
bec39cab 3871rm -f conftest.err conftest.$ac_ext
8bb2c122 3872
bec39cab
AC
3873done
3874# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3875rm -f conftest.err conftest.$ac_ext
81ecdfbb 3876if $ac_preproc_ok; then :
bec39cab
AC
3877 break
3878fi
8bb2c122 3879
bec39cab
AC
3880 done
3881 ac_cv_prog_CPP=$CPP
ddc9cd0f 3882
c906108c 3883fi
bec39cab
AC
3884 CPP=$ac_cv_prog_CPP
3885else
3886 ac_cv_prog_CPP=$CPP
c906108c 3887fi
81ecdfbb
RW
3888{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3889$as_echo "$CPP" >&6; }
bec39cab
AC
3890ac_preproc_ok=false
3891for ac_c_preproc_warn_flag in '' yes
3892do
3893 # Use a header file that comes with gcc, so configuring glibc
3894 # with a fresh cross-compiler works.
3895 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3896 # <limits.h> exists even on freestanding compilers.
3897 # On the NeXT, cc -E runs the code through the compiler's parser,
3898 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3899 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3900/* end confdefs.h. */
3901#ifdef __STDC__
3902# include <limits.h>
3903#else
3904# include <assert.h>
3905#endif
3906 Syntax error
3907_ACEOF
81ecdfbb 3908if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3909
81ecdfbb 3910else
bec39cab
AC
3911 # Broken: fails on valid input.
3912continue
3913fi
3914rm -f conftest.err conftest.$ac_ext
3915
81ecdfbb 3916 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3917 # can be detected and how.
81ecdfbb 3918 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3919/* end confdefs.h. */
3920#include <ac_nonexistent.h>
3921_ACEOF
81ecdfbb 3922if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3923 # Broken: success on invalid input.
3924continue
c906108c 3925else
bec39cab
AC
3926 # Passes both tests.
3927ac_preproc_ok=:
3928break
c906108c 3929fi
bec39cab 3930rm -f conftest.err conftest.$ac_ext
c906108c 3931
bec39cab
AC
3932done
3933# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3934rm -f conftest.err conftest.$ac_ext
81ecdfbb
RW
3935if $ac_preproc_ok; then :
3936
c906108c 3937else
81ecdfbb
RW
3938 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3939$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3940as_fn_error "C preprocessor \"$CPP\" fails sanity check
3941See \`config.log' for more details." "$LINENO" 5; }
c906108c 3942fi
c906108c 3943
bec39cab
AC
3944ac_ext=c
3945ac_cpp='$CPP $CPPFLAGS'
3946ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3947ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3948ac_compiler_gnu=$ac_cv_c_compiler_gnu
3949
3950
81ecdfbb
RW
3951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3952$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3953if test "${ac_cv_path_GREP+set}" = set; then :
3954 $as_echo_n "(cached) " >&6
4e8d927d 3955else
81ecdfbb
RW
3956 if test -z "$GREP"; then
3957 ac_path_GREP_found=false
3958 # Loop through the user's path and test for each of PROGNAME-LIST
3959 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3960for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3961do
3962 IFS=$as_save_IFS
3963 test -z "$as_dir" && as_dir=.
3964 for ac_prog in grep ggrep; do
3965 for ac_exec_ext in '' $ac_executable_extensions; do
3966 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3967 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3968# Check for GNU ac_path_GREP and select it if it is found.
3969 # Check for GNU $ac_path_GREP
3970case `"$ac_path_GREP" --version 2>&1` in
3971*GNU*)
3972 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3973*)
3974 ac_count=0
3975 $as_echo_n 0123456789 >"conftest.in"
3976 while :
3977 do
3978 cat "conftest.in" "conftest.in" >"conftest.tmp"
3979 mv "conftest.tmp" "conftest.in"
3980 cp "conftest.in" "conftest.nl"
3981 $as_echo 'GREP' >> "conftest.nl"
3982 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3983 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3984 as_fn_arith $ac_count + 1 && ac_count=$as_val
3985 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3986 # Best one so far, save it but keep looking for a better one
3987 ac_cv_path_GREP="$ac_path_GREP"
3988 ac_path_GREP_max=$ac_count
bec39cab 3989 fi
81ecdfbb
RW
3990 # 10*(2^10) chars as input seems more than enough
3991 test $ac_count -gt 10 && break
3992 done
3993 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3994esac
bec39cab 3995
81ecdfbb
RW
3996 $ac_path_GREP_found && break 3
3997 done
3998 done
3999 done
4000IFS=$as_save_IFS
4001 if test -z "$ac_cv_path_GREP"; then
4002 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4003 fi
c906108c 4004else
81ecdfbb 4005 ac_cv_path_GREP=$GREP
c906108c 4006fi
c906108c 4007
81ecdfbb
RW
4008fi
4009{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4010$as_echo "$ac_cv_path_GREP" >&6; }
4011 GREP="$ac_cv_path_GREP"
c906108c 4012
c906108c 4013
81ecdfbb
RW
4014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4015$as_echo_n "checking for egrep... " >&6; }
4016if test "${ac_cv_path_EGREP+set}" = set; then :
4017 $as_echo_n "(cached) " >&6
783e057b 4018else
81ecdfbb
RW
4019 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4020 then ac_cv_path_EGREP="$GREP -E"
4021 else
4022 if test -z "$EGREP"; then
4023 ac_path_EGREP_found=false
4024 # Loop through the user's path and test for each of PROGNAME-LIST
4025 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4026for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
783e057b
DJ
4027do
4028 IFS=$as_save_IFS
4029 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
4030 for ac_prog in egrep; do
4031 for ac_exec_ext in '' $ac_executable_extensions; do
4032 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4033 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4034# Check for GNU ac_path_EGREP and select it if it is found.
4035 # Check for GNU $ac_path_EGREP
4036case `"$ac_path_EGREP" --version 2>&1` in
4037*GNU*)
4038 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4039*)
4040 ac_count=0
4041 $as_echo_n 0123456789 >"conftest.in"
4042 while :
4043 do
4044 cat "conftest.in" "conftest.in" >"conftest.tmp"
4045 mv "conftest.tmp" "conftest.in"
4046 cp "conftest.in" "conftest.nl"
4047 $as_echo 'EGREP' >> "conftest.nl"
4048 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4049 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4050 as_fn_arith $ac_count + 1 && ac_count=$as_val
4051 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4052 # Best one so far, save it but keep looking for a better one
4053 ac_cv_path_EGREP="$ac_path_EGREP"
4054 ac_path_EGREP_max=$ac_count
4055 fi
4056 # 10*(2^10) chars as input seems more than enough
4057 test $ac_count -gt 10 && break
4058 done
4059 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4060esac
bec39cab 4061
81ecdfbb
RW
4062 $ac_path_EGREP_found && break 3
4063 done
4064 done
4065 done
4066IFS=$as_save_IFS
4067 if test -z "$ac_cv_path_EGREP"; then
4068 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
783e057b 4069 fi
783e057b 4070else
81ecdfbb 4071 ac_cv_path_EGREP=$EGREP
783e057b
DJ
4072fi
4073
81ecdfbb 4074 fi
783e057b 4075fi
81ecdfbb
RW
4076{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4077$as_echo "$ac_cv_path_EGREP" >&6; }
4078 EGREP="$ac_cv_path_EGREP"
4079
783e057b 4080
81ecdfbb
RW
4081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4082$as_echo_n "checking for ANSI C header files... " >&6; }
4083if test "${ac_cv_header_stdc+set}" = set; then :
4084 $as_echo_n "(cached) " >&6
783e057b 4085else
81ecdfbb 4086 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 4087/* end confdefs.h. */
783e057b 4088#include <stdlib.h>
bec39cab 4089#include <stdarg.h>
783e057b
DJ
4090#include <string.h>
4091#include <float.h>
c906108c 4092
bec39cab
AC
4093int
4094main ()
4095{
c906108c 4096
bec39cab
AC
4097 ;
4098 return 0;
4099}
4100_ACEOF
81ecdfbb 4101if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4102 ac_cv_header_stdc=yes
c906108c 4103else
81ecdfbb 4104 ac_cv_header_stdc=no
c906108c 4105fi
81ecdfbb 4106rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 4107
783e057b
DJ
4108if test $ac_cv_header_stdc = yes; then
4109 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
81ecdfbb 4110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4111/* end confdefs.h. */
4112#include <string.h>
c906108c 4113
783e057b
DJ
4114_ACEOF
4115if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4116 $EGREP "memchr" >/dev/null 2>&1; then :
4117
c906108c 4118else
783e057b 4119 ac_cv_header_stdc=no
c906108c 4120fi
783e057b 4121rm -f conftest*
c906108c
SS
4122
4123fi
4124
783e057b
DJ
4125if test $ac_cv_header_stdc = yes; then
4126 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
81ecdfbb 4127 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4128/* end confdefs.h. */
4129#include <stdlib.h>
bec39cab 4130
783e057b
DJ
4131_ACEOF
4132if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4133 $EGREP "free" >/dev/null 2>&1; then :
4134
bec39cab 4135else
783e057b 4136 ac_cv_header_stdc=no
bec39cab 4137fi
783e057b 4138rm -f conftest*
bec39cab
AC
4139
4140fi
bec39cab 4141
783e057b
DJ
4142if test $ac_cv_header_stdc = yes; then
4143 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
81ecdfbb 4144 if test "$cross_compiling" = yes; then :
783e057b 4145 :
bec39cab 4146else
81ecdfbb 4147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4148/* end confdefs.h. */
4149#include <ctype.h>
81ecdfbb 4150#include <stdlib.h>
783e057b
DJ
4151#if ((' ' & 0x0FF) == 0x020)
4152# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4153# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4154#else
4155# define ISLOWER(c) \
4156 (('a' <= (c) && (c) <= 'i') \
4157 || ('j' <= (c) && (c) <= 'r') \
4158 || ('s' <= (c) && (c) <= 'z'))
4159# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4160#endif
4161
4162#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4163int
4164main ()
4165{
4166 int i;
4167 for (i = 0; i < 256; i++)
4168 if (XOR (islower (i), ISLOWER (i))
4169 || toupper (i) != TOUPPER (i))
81ecdfbb
RW
4170 return 2;
4171 return 0;
783e057b
DJ
4172}
4173_ACEOF
81ecdfbb 4174if ac_fn_c_try_run "$LINENO"; then :
783e057b 4175
81ecdfbb
RW
4176else
4177 ac_cv_header_stdc=no
783e057b 4178fi
81ecdfbb
RW
4179rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4180 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 4181fi
81ecdfbb 4182
783e057b
DJ
4183fi
4184fi
81ecdfbb
RW
4185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4186$as_echo "$ac_cv_header_stdc" >&6; }
783e057b
DJ
4187if test $ac_cv_header_stdc = yes; then
4188
81ecdfbb 4189$as_echo "#define STDC_HEADERS 1" >>confdefs.h
783e057b
DJ
4190
4191fi
4192
4193# On IRIX 5.3, sys/types and inttypes.h are conflicting.
783e057b
DJ
4194for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4195 inttypes.h stdint.h unistd.h
81ecdfbb
RW
4196do :
4197 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4198ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4199"
4200eval as_val=\$$as_ac_Header
4201 if test "x$as_val" = x""yes; then :
783e057b 4202 cat >>confdefs.h <<_ACEOF
81ecdfbb 4203#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
783e057b
DJ
4204_ACEOF
4205
4206fi
4207
4208done
4209
4210
4211
81ecdfbb
RW
4212 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4213if test "x$ac_cv_header_minix_config_h" = x""yes; then :
783e057b
DJ
4214 MINIX=yes
4215else
4216 MINIX=
4217fi
4218
4219
4220 if test "$MINIX" = yes; then
4221
81ecdfbb 4222$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
783e057b
DJ
4223
4224
81ecdfbb 4225$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
783e057b
DJ
4226
4227
81ecdfbb 4228$as_echo "#define _MINIX 1" >>confdefs.h
783e057b
DJ
4229
4230 fi
4231
4232
81ecdfbb
RW
4233 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4234$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4235if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
4236 $as_echo_n "(cached) " >&6
783e057b 4237else
81ecdfbb 4238 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4239/* end confdefs.h. */
4240
c971b7fa
PA
4241# define __EXTENSIONS__ 1
4242 $ac_includes_default
783e057b
DJ
4243int
4244main ()
4245{
4246
4247 ;
4248 return 0;
4249}
4250_ACEOF
81ecdfbb 4251if ac_fn_c_try_compile "$LINENO"; then :
783e057b
DJ
4252 ac_cv_safe_to_define___extensions__=yes
4253else
81ecdfbb 4254 ac_cv_safe_to_define___extensions__=no
783e057b 4255fi
81ecdfbb 4256rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b 4257fi
81ecdfbb
RW
4258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4259$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
783e057b 4260 test $ac_cv_safe_to_define___extensions__ = yes &&
81ecdfbb 4261 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
783e057b 4262
81ecdfbb 4263 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
783e057b 4264
81ecdfbb 4265 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
783e057b 4266
81ecdfbb 4267 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
783e057b 4268
81ecdfbb 4269 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
783e057b
DJ
4270
4271
c971b7fa
PA
4272ac_aux_dir=
4273for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4274 for ac_t in install-sh install.sh shtool; do
4275 if test -f "$ac_dir/$ac_t"; then
4276 ac_aux_dir=$ac_dir
4277 ac_install_sh="$ac_aux_dir/$ac_t -c"
4278 break 2
4279 fi
4280 done
4281done
4282if test -z "$ac_aux_dir"; then
4283 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
4284fi
770d76d7 4285
c971b7fa
PA
4286# These three variables are undocumented and unsupported,
4287# and are intended to be withdrawn in a future Autoconf release.
4288# They can cause serious problems if a builder's source tree is in a directory
4289# whose full name contains unusual characters.
4290ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4291ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4292ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
770d76d7 4293
770d76d7 4294
c971b7fa
PA
4295# Make sure we can run config.sub.
4296$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
4297 as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
770d76d7 4298
c971b7fa
PA
4299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4300$as_echo_n "checking build system type... " >&6; }
4301if test "${ac_cv_build+set}" = set; then :
4302 $as_echo_n "(cached) " >&6
770d76d7 4303else
c971b7fa
PA
4304 ac_build_alias=$build_alias
4305test "x$ac_build_alias" = x &&
4306 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4307test "x$ac_build_alias" = x &&
4308 as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
4309ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
4310 as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
4311
770d76d7 4312fi
c971b7fa
PA
4313{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4314$as_echo "$ac_cv_build" >&6; }
4315case $ac_cv_build in
4316*-*-*) ;;
4317*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
770d76d7 4318esac
c971b7fa
PA
4319build=$ac_cv_build
4320ac_save_IFS=$IFS; IFS='-'
4321set x $ac_cv_build
4322shift
4323build_cpu=$1
4324build_vendor=$2
4325shift; shift
4326# Remember, the first character of IFS is used to create $*,
4327# except with old shells:
4328build_os=$*
4329IFS=$ac_save_IFS
4330case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
770d76d7
PA
4331
4332
c971b7fa
PA
4333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4334$as_echo_n "checking host system type... " >&6; }
4335if test "${ac_cv_host+set}" = set; then :
81ecdfbb
RW
4336 $as_echo_n "(cached) " >&6
4337else
c971b7fa
PA
4338 if test "x$host_alias" = x; then
4339 ac_cv_host=$ac_cv_build
81ecdfbb 4340else
c971b7fa
PA
4341 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
4342 as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
81ecdfbb 4343fi
81ecdfbb
RW
4344
4345fi
c971b7fa
PA
4346{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4347$as_echo "$ac_cv_host" >&6; }
4348case $ac_cv_host in
4349*-*-*) ;;
4350*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
81ecdfbb 4351esac
c971b7fa
PA
4352host=$ac_cv_host
4353ac_save_IFS=$IFS; IFS='-'
4354set x $ac_cv_host
4355shift
4356host_cpu=$1
4357host_vendor=$2
4358shift; shift
4359# Remember, the first character of IFS is used to create $*,
4360# except with old shells:
4361host_os=$*
4362IFS=$ac_save_IFS
4363case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3388710e
JM
4364
4365
4366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4367$as_echo_n "checking target system type... " >&6; }
4368if test "${ac_cv_target+set}" = set; then :
4369 $as_echo_n "(cached) " >&6
4370else
4371 if test "x$target_alias" = x; then
4372 ac_cv_target=$ac_cv_host
4373else
4374 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
4375 as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
4376fi
4377
4378fi
4379{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4380$as_echo "$ac_cv_target" >&6; }
4381case $ac_cv_target in
4382*-*-*) ;;
4383*) as_fn_error "invalid value of canonical target" "$LINENO" 5;;
4384esac
4385target=$ac_cv_target
4386ac_save_IFS=$IFS; IFS='-'
4387set x $ac_cv_target
4388shift
4389target_cpu=$1
4390target_vendor=$2
4391shift; shift
4392# Remember, the first character of IFS is used to create $*,
4393# except with old shells:
4394target_os=$*
4395IFS=$ac_save_IFS
4396case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4397
4398
4399# The aliases save the names the user supplied, while $host etc.
4400# will get canonicalized.
4401test -n "$target_alias" &&
4402 test "$program_prefix$program_suffix$program_transform_name" = \
4403 NONENONEs,x,x, &&
4404 program_prefix=${target_alias}-
4405
4406# The tests for host and target for $enable_largefile require
4407# canonical names.
4408
4409
81ecdfbb 4410
da2f07f1
JK
4411# As the $enable_largefile decision depends on --enable-plugins we must set it
4412# even in directories otherwise not depending on the $plugins option.
4413
4414
2974be62
AM
4415 maybe_plugins=no
4416 for ac_header in dlfcn.h
4417do :
4418 ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
4419"
4420if test "x$ac_cv_header_dlfcn_h" = x""yes; then :
4421 cat >>confdefs.h <<_ACEOF
4422#define HAVE_DLFCN_H 1
4423_ACEOF
4424 maybe_plugins=yes
4425fi
4426
4427done
4428
4429 for ac_header in windows.h
4430do :
4431 ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
4432"
4433if test "x$ac_cv_header_windows_h" = x""yes; then :
4434 cat >>confdefs.h <<_ACEOF
4435#define HAVE_WINDOWS_H 1
4436_ACEOF
4437 maybe_plugins=yes
4438fi
4439
4440done
4441
4442
4443 # Check whether --enable-plugins was given.
da2f07f1
JK
4444if test "${enable_plugins+set}" = set; then :
4445 enableval=$enable_plugins; case "${enableval}" in
2974be62
AM
4446 no) plugins=no ;;
4447 *) plugins=yes
4448 if test "$maybe_plugins" != "yes" ; then
4449 as_fn_error "Building with plugin support requires a host that supports dlopen." "$LINENO" 5
4450 fi ;;
4451 esac
da2f07f1 4452else
2974be62
AM
4453 plugins=$maybe_plugins
4454
da2f07f1
JK
4455fi
4456
2974be62
AM
4457 if test "$plugins" = "yes"; then
4458 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
4459$as_echo_n "checking for library containing dlopen... " >&6; }
4460if test "${ac_cv_search_dlopen+set}" = set; then :
4461 $as_echo_n "(cached) " >&6
4462else
4463 ac_func_search_save_LIBS=$LIBS
4464cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4465/* end confdefs.h. */
4466
4467/* Override any GCC internal prototype to avoid an error.
4468 Use char because int might match the return type of a GCC
4469 builtin and then its argument prototype would still apply. */
4470#ifdef __cplusplus
4471extern "C"
4472#endif
4473char dlopen ();
4474int
4475main ()
4476{
4477return dlopen ();
4478 ;
4479 return 0;
4480}
4481_ACEOF
4482for ac_lib in '' dl; do
4483 if test -z "$ac_lib"; then
4484 ac_res="none required"
4485 else
4486 ac_res=-l$ac_lib
4487 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4488 fi
4489 if ac_fn_c_try_link "$LINENO"; then :
4490 ac_cv_search_dlopen=$ac_res
4491fi
4492rm -f core conftest.err conftest.$ac_objext \
4493 conftest$ac_exeext
4494 if test "${ac_cv_search_dlopen+set}" = set; then :
4495 break
4496fi
4497done
4498if test "${ac_cv_search_dlopen+set}" = set; then :
4499
4500else
4501 ac_cv_search_dlopen=no
4502fi
4503rm conftest.$ac_ext
4504LIBS=$ac_func_search_save_LIBS
4505fi
4506{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
4507$as_echo "$ac_cv_search_dlopen" >&6; }
4508ac_res=$ac_cv_search_dlopen
4509if test "$ac_res" != no; then :
4510 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4511
4512fi
4513
4514 fi
da2f07f1
JK
4515
4516
4517case "${host}" in
4518 sparc-*-solaris*|i[3-7]86-*-solaris*)
4519 # On native 32bit sparc and ia32 solaris, large-file and procfs support
4520 # are mutually exclusive; and without procfs support, the bfd/ elf module
4521 # cannot provide certain routines such as elfcore_write_prpsinfo
4522 # or elfcore_write_prstatus. So unless the user explicitly requested
4523 # large-file support through the --enable-largefile switch, disable
4524 # large-file support in favor of procfs support.
4525 test "${target}" = "${host}" -a "x$plugins" = xno \
4526 && : ${enable_largefile="no"}
4527 ;;
4528esac
4529
4530# Check whether --enable-largefile was given.
4531if test "${enable_largefile+set}" = set; then :
4532 enableval=$enable_largefile;
4533fi
4534
4535if test "$enable_largefile" != no; then
4536
4537 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4538$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
4539if test "${ac_cv_sys_largefile_CC+set}" = set; then :
4540 $as_echo_n "(cached) " >&6
4541else
4542 ac_cv_sys_largefile_CC=no
4543 if test "$GCC" != yes; then
4544 ac_save_CC=$CC
4545 while :; do
4546 # IRIX 6.2 and later do not support large files by default,
4547 # so use the C compiler's -n32 option if that helps.
4548 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4549/* end confdefs.h. */
4550#include <sys/types.h>
4551 /* Check that off_t can represent 2**63 - 1 correctly.
4552 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4553 since some C++ compilers masquerading as C compilers
4554 incorrectly reject 9223372036854775807. */
4555#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4556 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4557 && LARGE_OFF_T % 2147483647 == 1)
4558 ? 1 : -1];
4559int
4560main ()
4561{
4562
4563 ;
4564 return 0;
4565}
4566_ACEOF
4567 if ac_fn_c_try_compile "$LINENO"; then :
4568 break
4569fi
4570rm -f core conftest.err conftest.$ac_objext
4571 CC="$CC -n32"
4572 if ac_fn_c_try_compile "$LINENO"; then :
4573 ac_cv_sys_largefile_CC=' -n32'; break
4574fi
4575rm -f core conftest.err conftest.$ac_objext
4576 break
4577 done
4578 CC=$ac_save_CC
4579 rm -f conftest.$ac_ext
4580 fi
4581fi
4582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4583$as_echo "$ac_cv_sys_largefile_CC" >&6; }
4584 if test "$ac_cv_sys_largefile_CC" != no; then
4585 CC=$CC$ac_cv_sys_largefile_CC
4586 fi
4587
4588 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4589$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
4590if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
4591 $as_echo_n "(cached) " >&6
4592else
4593 while :; do
4594 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4595/* end confdefs.h. */
4596#include <sys/types.h>
4597 /* Check that off_t can represent 2**63 - 1 correctly.
4598 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4599 since some C++ compilers masquerading as C compilers
4600 incorrectly reject 9223372036854775807. */
4601#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4602 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4603 && LARGE_OFF_T % 2147483647 == 1)
4604 ? 1 : -1];
4605int
4606main ()
4607{
4608
4609 ;
4610 return 0;
4611}
4612_ACEOF
4613if ac_fn_c_try_compile "$LINENO"; then :
4614 ac_cv_sys_file_offset_bits=no; break
4615fi
4616rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4617 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4618/* end confdefs.h. */
4619#define _FILE_OFFSET_BITS 64
4620#include <sys/types.h>
4621 /* Check that off_t can represent 2**63 - 1 correctly.
4622 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4623 since some C++ compilers masquerading as C compilers
4624 incorrectly reject 9223372036854775807. */
4625#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4626 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4627 && LARGE_OFF_T % 2147483647 == 1)
4628 ? 1 : -1];
4629int
4630main ()
4631{
4632
4633 ;
4634 return 0;
4635}
4636_ACEOF
4637if ac_fn_c_try_compile "$LINENO"; then :
4638 ac_cv_sys_file_offset_bits=64; break
4639fi
4640rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4641 ac_cv_sys_file_offset_bits=unknown
4642 break
4643done
4644fi
4645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4646$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4647case $ac_cv_sys_file_offset_bits in #(
4648 no | unknown) ;;
4649 *)
4650cat >>confdefs.h <<_ACEOF
4651#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4652_ACEOF
4653;;
4654esac
4655rm -rf conftest*
4656 if test $ac_cv_sys_file_offset_bits = unknown; then
4657 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4658$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
4659if test "${ac_cv_sys_large_files+set}" = set; then :
4660 $as_echo_n "(cached) " >&6
4661else
4662 while :; do
4663 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4664/* end confdefs.h. */
4665#include <sys/types.h>
4666 /* Check that off_t can represent 2**63 - 1 correctly.
4667 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4668 since some C++ compilers masquerading as C compilers
4669 incorrectly reject 9223372036854775807. */
4670#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4671 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4672 && LARGE_OFF_T % 2147483647 == 1)
4673 ? 1 : -1];
4674int
4675main ()
4676{
4677
4678 ;
4679 return 0;
4680}
4681_ACEOF
4682if ac_fn_c_try_compile "$LINENO"; then :
4683 ac_cv_sys_large_files=no; break
4684fi
4685rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4687/* end confdefs.h. */
4688#define _LARGE_FILES 1
4689#include <sys/types.h>
4690 /* Check that off_t can represent 2**63 - 1 correctly.
4691 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4692 since some C++ compilers masquerading as C compilers
4693 incorrectly reject 9223372036854775807. */
4694#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4695 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4696 && LARGE_OFF_T % 2147483647 == 1)
4697 ? 1 : -1];
4698int
4699main ()
4700{
4701
4702 ;
4703 return 0;
4704}
4705_ACEOF
4706if ac_fn_c_try_compile "$LINENO"; then :
4707 ac_cv_sys_large_files=1; break
4708fi
4709rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4710 ac_cv_sys_large_files=unknown
4711 break
4712done
4713fi
4714{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4715$as_echo "$ac_cv_sys_large_files" >&6; }
4716case $ac_cv_sys_large_files in #(
4717 no | unknown) ;;
4718 *)
4719cat >>confdefs.h <<_ACEOF
4720#define _LARGE_FILES $ac_cv_sys_large_files
4721_ACEOF
4722;;
4723esac
4724rm -rf conftest*
4725 fi
4726fi
4727
4728
4729
81ecdfbb
RW
4730
4731
4732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5
4733$as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; }
4734if test "${am_cv_prog_cc_stdc+set}" = set; then :
4735 $as_echo_n "(cached) " >&6
4736else
4737 am_cv_prog_cc_stdc=no
4738ac_save_CC="$CC"
4739# Don't try gcc -ansi; that turns off useful extensions and
4740# breaks some systems' header files.
4741# AIX -qlanglvl=ansi
4742# Ultrix and OSF/1 -std1
4743# HP-UX 10.20 and later -Ae
4744# HP-UX older versions -Aa -D_HPUX_SOURCE
4745# SVR4 -Xc -D__EXTENSIONS__
4746for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4747do
783e057b 4748 CC="$ac_save_CC $ac_arg"
81ecdfbb 4749 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4750/* end confdefs.h. */
4751#include <stdarg.h>
4752#include <stdio.h>
4753#include <sys/types.h>
4754#include <sys/stat.h>
4755/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4756struct buf { int x; };
4757FILE * (*rcsopen) (struct buf *, struct stat *, int);
4758static char *e (p, i)
4759 char **p;
4760 int i;
4761{
4762 return p[i];
4763}
4764static char *f (char * (*g) (char **, int), char **p, ...)
4765{
4766 char *s;
4767 va_list v;
4768 va_start (v,p);
4769 s = g (p, va_arg (v,int));
4770 va_end (v);
4771 return s;
4772}
4773int test (int i, double x);
4774struct s1 {int (*f) (int a);};
4775struct s2 {int (*f) (double a);};
4776int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4777int argc;
4778char **argv;
4779
4780int
4781main ()
4782{
4783
4784return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4785
4786 ;
4787 return 0;
4788}
4789_ACEOF
81ecdfbb 4790if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4791 am_cv_prog_cc_stdc="$ac_arg"; break
783e057b 4792fi
81ecdfbb 4793rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
4794done
4795CC="$ac_save_CC"
4796
4797fi
4798
4799if test -z "$am_cv_prog_cc_stdc"; then
81ecdfbb
RW
4800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4801$as_echo "none needed" >&6; }
783e057b 4802else
81ecdfbb
RW
4803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5
4804$as_echo "$am_cv_prog_cc_stdc" >&6; }
783e057b
DJ
4805fi
4806case "x$am_cv_prog_cc_stdc" in
4807 x|xno) ;;
4808 *) CC="$CC $am_cv_prog_cc_stdc" ;;
4809esac
4810
4869db5e
RM
4811# expand $ac_aux_dir to an absolute path
4812am_aux_dir=`cd $ac_aux_dir && pwd`
4813
4814if test x"${install_sh}" != xset; then
4815 case $am_aux_dir in
4816 *\ * | *\ *)
4817 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
4818 *)
4819 install_sh="\${SHELL} $am_aux_dir/install-sh"
4820 esac
4821fi
4822
4823# Installed binaries are usually stripped using `strip' when the user
4824# run `make install-strip'. However `strip' might not be the right
4825# tool to use in cross-compilation environments, therefore Automake
4826# will honor the `STRIP' environment variable to overrule this program.
4827if test "$cross_compiling" != no; then
4828 if test -n "$ac_tool_prefix"; then
4829 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4830set dummy ${ac_tool_prefix}strip; ac_word=$2
4831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4832$as_echo_n "checking for $ac_word... " >&6; }
4833if test "${ac_cv_prog_STRIP+set}" = set; then :
4834 $as_echo_n "(cached) " >&6
4835else
4836 if test -n "$STRIP"; then
4837 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4838else
4839as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4840for as_dir in $PATH
4841do
4842 IFS=$as_save_IFS
4843 test -z "$as_dir" && as_dir=.
4844 for ac_exec_ext in '' $ac_executable_extensions; do
4845 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4846 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4847 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4848 break 2
4849 fi
4850done
4851 done
4852IFS=$as_save_IFS
4853
4854fi
4855fi
4856STRIP=$ac_cv_prog_STRIP
4857if test -n "$STRIP"; then
4858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
4859$as_echo "$STRIP" >&6; }
4860else
4861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4862$as_echo "no" >&6; }
4863fi
4864
4865
4866fi
4867if test -z "$ac_cv_prog_STRIP"; then
4868 ac_ct_STRIP=$STRIP
4869 # Extract the first word of "strip", so it can be a program name with args.
4870set dummy strip; ac_word=$2
4871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4872$as_echo_n "checking for $ac_word... " >&6; }
4873if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
4874 $as_echo_n "(cached) " >&6
4875else
4876 if test -n "$ac_ct_STRIP"; then
4877 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
4878else
4879as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4880for as_dir in $PATH
4881do
4882 IFS=$as_save_IFS
4883 test -z "$as_dir" && as_dir=.
4884 for ac_exec_ext in '' $ac_executable_extensions; do
4885 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4886 ac_cv_prog_ac_ct_STRIP="strip"
4887 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4888 break 2
4889 fi
4890done
4891 done
4892IFS=$as_save_IFS
4893
4894fi
4895fi
4896ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
4897if test -n "$ac_ct_STRIP"; then
4898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
4899$as_echo "$ac_ct_STRIP" >&6; }
4900else
4901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4902$as_echo "no" >&6; }
4903fi
4904
4905 if test "x$ac_ct_STRIP" = x; then
4906 STRIP=":"
4907 else
4908 case $cross_compiling:$ac_tool_warned in
4909yes:)
4910{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4911$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4912ac_tool_warned=yes ;;
4913esac
4914 STRIP=$ac_ct_STRIP
4915 fi
4916else
4917 STRIP="$ac_cv_prog_STRIP"
4918fi
4919
4920fi
4921INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
4922
783e057b
DJ
4923
4924ac_aux_dir=
81ecdfbb
RW
4925for ac_dir in .. "$srcdir"/..; do
4926 for ac_t in install-sh install.sh shtool; do
4927 if test -f "$ac_dir/$ac_t"; then
4928 ac_aux_dir=$ac_dir
4929 ac_install_sh="$ac_aux_dir/$ac_t -c"
4930 break 2
4931 fi
4932 done
783e057b
DJ
4933done
4934if test -z "$ac_aux_dir"; then
81ecdfbb 4935 as_fn_error "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
783e057b 4936fi
81ecdfbb
RW
4937
4938# These three variables are undocumented and unsupported,
4939# and are intended to be withdrawn in a future Autoconf release.
4940# They can cause serious problems if a builder's source tree is in a directory
4941# whose full name contains unusual characters.
4942ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4943ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4944ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4945
783e057b 4946
783e057b 4947
9009e1ae
MR
4948test "$program_prefix" != NONE &&
4949 program_transform_name="s&^&$program_prefix&;$program_transform_name"
4950# Use a double $ so make ignores it.
4951test "$program_suffix" != NONE &&
4952 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
4953# Double any \ or $.
4954# By default was `s,x,x', remove it if useless.
4955ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
4956program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
4957
81ecdfbb 4958
0bcda685
PA
4959# We require a C++11 compiler. Check if one is available, and if
4960# necessary, set CXX_DIALECT to some -std=xxx switch.
4961
4962 ax_cxx_compile_cxx11_required=true
4963 ac_ext=cpp
4964ac_cpp='$CXXCPP $CPPFLAGS'
4965ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4966ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4967ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
4968 CXX_DIALECT=""
4969 ac_success=no
4970 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5
4971$as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; }
4972if test "${ax_cv_cxx_compile_cxx11+set}" = set; then :
4973 $as_echo_n "(cached) " >&6
4974else
4975 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4976/* end confdefs.h. */
4977
4978
4979// If the compiler admits that it is not ready for C++11, why torture it?
4980// Hopefully, this will speed up the test.
4981
4982#ifndef __cplusplus
4983
4984#error "This is not a C++ compiler"
4985
4986#elif __cplusplus < 201103L
4987
4988#error "This is not a C++11 compiler"
4989
4990#else
4991
4992namespace cxx11
4993{
4994
4995 namespace test_static_assert
4996 {
4997
4998 template <typename T>
4999 struct check
5000 {
5001 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5002 };
5003
5004 }
5005
5006 namespace test_final_override
5007 {
5008
5009 struct Base
5010 {
5011 virtual void f() {}
5012 };
5013
5014 struct Derived : public Base
5015 {
5016 virtual void f() override {}
5017 };
5018
5019 }
5020
5021 namespace test_double_right_angle_brackets
5022 {
5023
5024 template < typename T >
5025 struct check {};
5026
5027 typedef check<void> single_type;
5028 typedef check<check<void>> double_type;
5029 typedef check<check<check<void>>> triple_type;
5030 typedef check<check<check<check<void>>>> quadruple_type;
5031
5032 }
5033
5034 namespace test_decltype
5035 {
5036
5037 int
5038 f()
5039 {
5040 int a = 1;
5041 decltype(a) b = 2;
5042 return a + b;
5043 }
5044
5045 }
5046
5047 namespace test_type_deduction
5048 {
5049
5050 template < typename T1, typename T2 >
5051 struct is_same
5052 {
5053 static const bool value = false;
5054 };
5055
5056 template < typename T >
5057 struct is_same<T, T>
5058 {
5059 static const bool value = true;
5060 };
5061
5062 template < typename T1, typename T2 >
5063 auto
5064 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5065 {
5066 return a1 + a2;
5067 }
5068
5069 int
5070 test(const int c, volatile int v)
5071 {
5072 static_assert(is_same<int, decltype(0)>::value == true, "");
5073 static_assert(is_same<int, decltype(c)>::value == false, "");
5074 static_assert(is_same<int, decltype(v)>::value == false, "");
5075 auto ac = c;
5076 auto av = v;
5077 auto sumi = ac + av + 'x';
5078 auto sumf = ac + av + 1.0;
5079 static_assert(is_same<int, decltype(ac)>::value == true, "");
5080 static_assert(is_same<int, decltype(av)>::value == true, "");
5081 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5082 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5083 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5084 return (sumf > 0.0) ? sumi : add(c, v);
5085 }
5086
5087 }
5088
5089 namespace test_noexcept
5090 {
5091
5092 int f() { return 0; }
5093 int g() noexcept { return 0; }
5094
5095 static_assert(noexcept(f()) == false, "");
5096 static_assert(noexcept(g()) == true, "");
5097
5098 }
5099
5100 namespace test_constexpr
5101 {
5102
5103 template < typename CharT >
5104 unsigned long constexpr
5105 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5106 {
5107 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5108 }
5109
5110 template < typename CharT >
5111 unsigned long constexpr
5112 strlen_c(const CharT *const s) noexcept
5113 {
5114 return strlen_c_r(s, 0UL);
5115 }
5116
5117 static_assert(strlen_c("") == 0UL, "");
5118 static_assert(strlen_c("1") == 1UL, "");
5119 static_assert(strlen_c("example") == 7UL, "");
5120 static_assert(strlen_c("another\0example") == 7UL, "");
5121
5122 }
5123
5124 namespace test_rvalue_references
5125 {
5126
5127 template < int N >
5128 struct answer
5129 {
5130 static constexpr int value = N;
5131 };
5132
5133 answer<1> f(int&) { return answer<1>(); }
5134 answer<2> f(const int&) { return answer<2>(); }
5135 answer<3> f(int&&) { return answer<3>(); }
5136
5137 void
5138 test()
5139 {
5140 int i = 0;
5141 const int c = 0;
5142 static_assert(decltype(f(i))::value == 1, "");
5143 static_assert(decltype(f(c))::value == 2, "");
5144 static_assert(decltype(f(0))::value == 3, "");
5145 }
5146
5147 }
5148
5149 namespace test_uniform_initialization
5150 {
5151
5152 struct test
5153 {
5154 static const int zero {};
5155 static const int one {1};
5156 };
5157
5158 static_assert(test::zero == 0, "");
5159 static_assert(test::one == 1, "");
5160
5161 }
5162
5163 namespace test_lambdas
5164 {
5165
5166 void
5167 test1()
5168 {
5169 auto lambda1 = [](){};
5170 auto lambda2 = lambda1;
5171 lambda1();
5172 lambda2();
5173 }
5174
5175 int
5176 test2()
5177 {
5178 auto a = [](int i, int j){ return i + j; }(1, 2);
5179 auto b = []() -> int { return '0'; }();
5180 auto c = [=](){ return a + b; }();
5181 auto d = [&](){ return c; }();
5182 auto e = [a, &b](int x) mutable {
5183 const auto identity = [](int y){ return y; };
5184 for (auto i = 0; i < a; ++i)
5185 a += b--;
5186 return x + identity(a + b);
5187 }(0);
5188 return a + b + c + d + e;
5189 }
5190
5191 int
5192 test3()
5193 {
5194 const auto nullary = [](){ return 0; };
5195 const auto unary = [](int x){ return x; };
5196 using nullary_t = decltype(nullary);
5197 using unary_t = decltype(unary);
5198 const auto higher1st = [](nullary_t f){ return f(); };
5199 const auto higher2nd = [unary](nullary_t f1){
5200 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5201 };
5202 return higher1st(nullary) + higher2nd(nullary)(unary);
5203 }
5204
5205 }
5206
5207 namespace test_variadic_templates
5208 {
5209
5210 template <int...>
5211 struct sum;
5212
5213 template <int N0, int... N1toN>
5214 struct sum<N0, N1toN...>
5215 {
5216 static constexpr auto value = N0 + sum<N1toN...>::value;
5217 };
5218
5219 template <>
5220 struct sum<>
5221 {
5222 static constexpr auto value = 0;
5223 };
5224
5225 static_assert(sum<>::value == 0, "");
5226 static_assert(sum<1>::value == 1, "");
5227 static_assert(sum<23>::value == 23, "");
5228 static_assert(sum<1, 2>::value == 3, "");
5229 static_assert(sum<5, 5, 11>::value == 21, "");
5230 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5231
5232 }
5233
5234 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5235 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5236 // because of this.
5237 namespace test_template_alias_sfinae
5238 {
5239
5240 struct foo {};
5241
5242 template<typename T>
5243 using member = typename T::member_type;
5244
5245 template<typename T>
5246 void func(...) {}
5247
5248 template<typename T>
5249 void func(member<T>*) {}
5250
5251 void test();
5252
5253 void test() { func<foo>(0); }
5254
5255 }
5256
5257} // namespace cxx11
5258
5259#endif // __cplusplus >= 201103L
5260
5261
5262
5263_ACEOF
5264if ac_fn_cxx_try_compile "$LINENO"; then :
5265 ax_cv_cxx_compile_cxx11=yes
5266else
5267 ax_cv_cxx_compile_cxx11=no
5268fi
5269rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5270fi
5271{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5
5272$as_echo "$ax_cv_cxx_compile_cxx11" >&6; }
5273 if test x$ax_cv_cxx_compile_cxx11 = xyes; then
5274 ac_success=yes
5275 fi
5276
5277 if test x$ac_success = xno; then
5278 for switch in -std=gnu++11 -std=gnu++0x; do
5279 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
5281$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
5282if { as_var=$cachevar; eval "test \"\${$as_var+set}\" = set"; }; then :
5283 $as_echo_n "(cached) " >&6
5284else
5285 ac_save_CXX="$CXX"
5286 CXX="$CXX $switch"
5287 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5288/* end confdefs.h. */
5289
5290
5291// If the compiler admits that it is not ready for C++11, why torture it?
5292// Hopefully, this will speed up the test.
5293
5294#ifndef __cplusplus
5295
5296#error "This is not a C++ compiler"
5297
5298#elif __cplusplus < 201103L
5299
5300#error "This is not a C++11 compiler"
5301
5302#else
5303
5304namespace cxx11
5305{
5306
5307 namespace test_static_assert
5308 {
5309
5310 template <typename T>
5311 struct check
5312 {
5313 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5314 };
5315
5316 }
5317
5318 namespace test_final_override
5319 {
5320
5321 struct Base
5322 {
5323 virtual void f() {}
5324 };
5325
5326 struct Derived : public Base
5327 {
5328 virtual void f() override {}
5329 };
5330
5331 }
5332
5333 namespace test_double_right_angle_brackets
5334 {
5335
5336 template < typename T >
5337 struct check {};
5338
5339 typedef check<void> single_type;
5340 typedef check<check<void>> double_type;
5341 typedef check<check<check<void>>> triple_type;
5342 typedef check<check<check<check<void>>>> quadruple_type;
5343
5344 }
5345
5346 namespace test_decltype
5347 {
5348
5349 int
5350 f()
5351 {
5352 int a = 1;
5353 decltype(a) b = 2;
5354 return a + b;
5355 }
5356
5357 }
5358
5359 namespace test_type_deduction
5360 {
5361
5362 template < typename T1, typename T2 >
5363 struct is_same
5364 {
5365 static const bool value = false;
5366 };
5367
5368 template < typename T >
5369 struct is_same<T, T>
5370 {
5371 static const bool value = true;
5372 };
5373
5374 template < typename T1, typename T2 >
5375 auto
5376 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5377 {
5378 return a1 + a2;
5379 }
5380
5381 int
5382 test(const int c, volatile int v)
5383 {
5384 static_assert(is_same<int, decltype(0)>::value == true, "");
5385 static_assert(is_same<int, decltype(c)>::value == false, "");
5386 static_assert(is_same<int, decltype(v)>::value == false, "");
5387 auto ac = c;
5388 auto av = v;
5389 auto sumi = ac + av + 'x';
5390 auto sumf = ac + av + 1.0;
5391 static_assert(is_same<int, decltype(ac)>::value == true, "");
5392 static_assert(is_same<int, decltype(av)>::value == true, "");
5393 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5394 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5395 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5396 return (sumf > 0.0) ? sumi : add(c, v);
5397 }
5398
5399 }
5400
5401 namespace test_noexcept
5402 {
5403
5404 int f() { return 0; }
5405 int g() noexcept { return 0; }
5406
5407 static_assert(noexcept(f()) == false, "");
5408 static_assert(noexcept(g()) == true, "");
5409
5410 }
5411
5412 namespace test_constexpr
5413 {
5414
5415 template < typename CharT >
5416 unsigned long constexpr
5417 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5418 {
5419 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5420 }
5421
5422 template < typename CharT >
5423 unsigned long constexpr
5424 strlen_c(const CharT *const s) noexcept
5425 {
5426 return strlen_c_r(s, 0UL);
5427 }
5428
5429 static_assert(strlen_c("") == 0UL, "");
5430 static_assert(strlen_c("1") == 1UL, "");
5431 static_assert(strlen_c("example") == 7UL, "");
5432 static_assert(strlen_c("another\0example") == 7UL, "");
5433
5434 }
5435
5436 namespace test_rvalue_references
5437 {
5438
5439 template < int N >
5440 struct answer
5441 {
5442 static constexpr int value = N;
5443 };
5444
5445 answer<1> f(int&) { return answer<1>(); }
5446 answer<2> f(const int&) { return answer<2>(); }
5447 answer<3> f(int&&) { return answer<3>(); }
5448
5449 void
5450 test()
5451 {
5452 int i = 0;
5453 const int c = 0;
5454 static_assert(decltype(f(i))::value == 1, "");
5455 static_assert(decltype(f(c))::value == 2, "");
5456 static_assert(decltype(f(0))::value == 3, "");
5457 }
5458
5459 }
5460
5461 namespace test_uniform_initialization
5462 {
5463
5464 struct test
5465 {
5466 static const int zero {};
5467 static const int one {1};
5468 };
5469
5470 static_assert(test::zero == 0, "");
5471 static_assert(test::one == 1, "");
5472
5473 }
5474
5475 namespace test_lambdas
5476 {
5477
5478 void
5479 test1()
5480 {
5481 auto lambda1 = [](){};
5482 auto lambda2 = lambda1;
5483 lambda1();
5484 lambda2();
5485 }
5486
5487 int
5488 test2()
5489 {
5490 auto a = [](int i, int j){ return i + j; }(1, 2);
5491 auto b = []() -> int { return '0'; }();
5492 auto c = [=](){ return a + b; }();
5493 auto d = [&](){ return c; }();
5494 auto e = [a, &b](int x) mutable {
5495 const auto identity = [](int y){ return y; };
5496 for (auto i = 0; i < a; ++i)
5497 a += b--;
5498 return x + identity(a + b);
5499 }(0);
5500 return a + b + c + d + e;
5501 }
5502
5503 int
5504 test3()
5505 {
5506 const auto nullary = [](){ return 0; };
5507 const auto unary = [](int x){ return x; };
5508 using nullary_t = decltype(nullary);
5509 using unary_t = decltype(unary);
5510 const auto higher1st = [](nullary_t f){ return f(); };
5511 const auto higher2nd = [unary](nullary_t f1){
5512 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5513 };
5514 return higher1st(nullary) + higher2nd(nullary)(unary);
5515 }
5516
5517 }
5518
5519 namespace test_variadic_templates
5520 {
5521
5522 template <int...>
5523 struct sum;
5524
5525 template <int N0, int... N1toN>
5526 struct sum<N0, N1toN...>
5527 {
5528 static constexpr auto value = N0 + sum<N1toN...>::value;
5529 };
5530
5531 template <>
5532 struct sum<>
5533 {
5534 static constexpr auto value = 0;
5535 };
5536
5537 static_assert(sum<>::value == 0, "");
5538 static_assert(sum<1>::value == 1, "");
5539 static_assert(sum<23>::value == 23, "");
5540 static_assert(sum<1, 2>::value == 3, "");
5541 static_assert(sum<5, 5, 11>::value == 21, "");
5542 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5543
5544 }
5545
5546 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5547 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5548 // because of this.
5549 namespace test_template_alias_sfinae
5550 {
5551
5552 struct foo {};
5553
5554 template<typename T>
5555 using member = typename T::member_type;
5556
5557 template<typename T>
5558 void func(...) {}
5559
5560 template<typename T>
5561 void func(member<T>*) {}
5562
5563 void test();
5564
5565 void test() { func<foo>(0); }
5566
5567 }
5568
5569} // namespace cxx11
5570
5571#endif // __cplusplus >= 201103L
5572
5573
5574
5575_ACEOF
5576if ac_fn_cxx_try_compile "$LINENO"; then :
5577 eval $cachevar=yes
5578else
5579 eval $cachevar=no
5580fi
5581rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5582 CXX="$ac_save_CXX"
5583fi
5584eval ac_res=\$$cachevar
5585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5586$as_echo "$ac_res" >&6; }
5587 if eval test x\$$cachevar = xyes; then
5588 CXX_DIALECT="$switch"
5589 ac_success=yes
5590 break
5591 fi
5592 done
5593 fi
5594
5595 if test x$ac_success = xno; then
5596 for switch in -std=c++11 -std=c++0x +std=c++11 "-h std=c++11"; do
5597 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5598 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
5599$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
5600if { as_var=$cachevar; eval "test \"\${$as_var+set}\" = set"; }; then :
5601 $as_echo_n "(cached) " >&6
5602else
5603 ac_save_CXX="$CXX"
5604 CXX="$CXX $switch"
5605 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5606/* end confdefs.h. */
5607
5608
5609// If the compiler admits that it is not ready for C++11, why torture it?
5610// Hopefully, this will speed up the test.
5611
5612#ifndef __cplusplus
5613
5614#error "This is not a C++ compiler"
5615
5616#elif __cplusplus < 201103L
5617
5618#error "This is not a C++11 compiler"
5619
5620#else
5621
5622namespace cxx11
5623{
5624
5625 namespace test_static_assert
5626 {
5627
5628 template <typename T>
5629 struct check
5630 {
5631 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5632 };
5633
5634 }
5635
5636 namespace test_final_override
5637 {
5638
5639 struct Base
5640 {
5641 virtual void f() {}
5642 };
5643
5644 struct Derived : public Base
5645 {
5646 virtual void f() override {}
5647 };
5648
5649 }
5650
5651 namespace test_double_right_angle_brackets
5652 {
5653
5654 template < typename T >
5655 struct check {};
5656
5657 typedef check<void> single_type;
5658 typedef check<check<void>> double_type;
5659 typedef check<check<check<void>>> triple_type;
5660 typedef check<check<check<check<void>>>> quadruple_type;
5661
5662 }
5663
5664 namespace test_decltype
5665 {
5666
5667 int
5668 f()
5669 {
5670 int a = 1;
5671 decltype(a) b = 2;
5672 return a + b;
5673 }
5674
5675 }
5676
5677 namespace test_type_deduction
5678 {
5679
5680 template < typename T1, typename T2 >
5681 struct is_same
5682 {
5683 static const bool value = false;
5684 };
5685
5686 template < typename T >
5687 struct is_same<T, T>
5688 {
5689 static const bool value = true;
5690 };
5691
5692 template < typename T1, typename T2 >
5693 auto
5694 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5695 {
5696 return a1 + a2;
5697 }
5698
5699 int
5700 test(const int c, volatile int v)
5701 {
5702 static_assert(is_same<int, decltype(0)>::value == true, "");
5703 static_assert(is_same<int, decltype(c)>::value == false, "");
5704 static_assert(is_same<int, decltype(v)>::value == false, "");
5705 auto ac = c;
5706 auto av = v;
5707 auto sumi = ac + av + 'x';
5708 auto sumf = ac + av + 1.0;
5709 static_assert(is_same<int, decltype(ac)>::value == true, "");
5710 static_assert(is_same<int, decltype(av)>::value == true, "");
5711 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5712 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5713 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5714 return (sumf > 0.0) ? sumi : add(c, v);
5715 }
5716
5717 }
5718
5719 namespace test_noexcept
5720 {
5721
5722 int f() { return 0; }
5723 int g() noexcept { return 0; }
5724
5725 static_assert(noexcept(f()) == false, "");
5726 static_assert(noexcept(g()) == true, "");
5727
5728 }
5729
5730 namespace test_constexpr
5731 {
5732
5733 template < typename CharT >
5734 unsigned long constexpr
5735 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5736 {
5737 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5738 }
5739
5740 template < typename CharT >
5741 unsigned long constexpr
5742 strlen_c(const CharT *const s) noexcept
5743 {
5744 return strlen_c_r(s, 0UL);
5745 }
5746
5747 static_assert(strlen_c("") == 0UL, "");
5748 static_assert(strlen_c("1") == 1UL, "");
5749 static_assert(strlen_c("example") == 7UL, "");
5750 static_assert(strlen_c("another\0example") == 7UL, "");
5751
5752 }
5753
5754 namespace test_rvalue_references
5755 {
5756
5757 template < int N >
5758 struct answer
5759 {
5760 static constexpr int value = N;
5761 };
5762
5763 answer<1> f(int&) { return answer<1>(); }
5764 answer<2> f(const int&) { return answer<2>(); }
5765 answer<3> f(int&&) { return answer<3>(); }
5766
5767 void
5768 test()
5769 {
5770 int i = 0;
5771 const int c = 0;
5772 static_assert(decltype(f(i))::value == 1, "");
5773 static_assert(decltype(f(c))::value == 2, "");
5774 static_assert(decltype(f(0))::value == 3, "");
5775 }
5776
5777 }
5778
5779 namespace test_uniform_initialization
5780 {
5781
5782 struct test
5783 {
5784 static const int zero {};
5785 static const int one {1};
5786 };
5787
5788 static_assert(test::zero == 0, "");
5789 static_assert(test::one == 1, "");
5790
5791 }
5792
5793 namespace test_lambdas
5794 {
5795
5796 void
5797 test1()
5798 {
5799 auto lambda1 = [](){};
5800 auto lambda2 = lambda1;
5801 lambda1();
5802 lambda2();
5803 }
5804
5805 int
5806 test2()
5807 {
5808 auto a = [](int i, int j){ return i + j; }(1, 2);
5809 auto b = []() -> int { return '0'; }();
5810 auto c = [=](){ return a + b; }();
5811 auto d = [&](){ return c; }();
5812 auto e = [a, &b](int x) mutable {
5813 const auto identity = [](int y){ return y; };
5814 for (auto i = 0; i < a; ++i)
5815 a += b--;
5816 return x + identity(a + b);
5817 }(0);
5818 return a + b + c + d + e;
5819 }
5820
5821 int
5822 test3()
5823 {
5824 const auto nullary = [](){ return 0; };
5825 const auto unary = [](int x){ return x; };
5826 using nullary_t = decltype(nullary);
5827 using unary_t = decltype(unary);
5828 const auto higher1st = [](nullary_t f){ return f(); };
5829 const auto higher2nd = [unary](nullary_t f1){
5830 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5831 };
5832 return higher1st(nullary) + higher2nd(nullary)(unary);
5833 }
5834
5835 }
5836
5837 namespace test_variadic_templates
5838 {
5839
5840 template <int...>
5841 struct sum;
5842
5843 template <int N0, int... N1toN>
5844 struct sum<N0, N1toN...>
5845 {
5846 static constexpr auto value = N0 + sum<N1toN...>::value;
5847 };
5848
5849 template <>
5850 struct sum<>
5851 {
5852 static constexpr auto value = 0;
5853 };
5854
5855 static_assert(sum<>::value == 0, "");
5856 static_assert(sum<1>::value == 1, "");
5857 static_assert(sum<23>::value == 23, "");
5858 static_assert(sum<1, 2>::value == 3, "");
5859 static_assert(sum<5, 5, 11>::value == 21, "");
5860 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5861
5862 }
5863
5864 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5865 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5866 // because of this.
5867 namespace test_template_alias_sfinae
5868 {
5869
5870 struct foo {};
5871
5872 template<typename T>
5873 using member = typename T::member_type;
5874
5875 template<typename T>
5876 void func(...) {}
5877
5878 template<typename T>
5879 void func(member<T>*) {}
5880
5881 void test();
5882
5883 void test() { func<foo>(0); }
5884
5885 }
5886
5887} // namespace cxx11
5888
5889#endif // __cplusplus >= 201103L
5890
5891
5892
5893_ACEOF
5894if ac_fn_cxx_try_compile "$LINENO"; then :
5895 eval $cachevar=yes
5896else
5897 eval $cachevar=no
5898fi
5899rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5900 CXX="$ac_save_CXX"
5901fi
5902eval ac_res=\$$cachevar
5903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5904$as_echo "$ac_res" >&6; }
5905 if eval test x\$$cachevar = xyes; then
5906 CXX_DIALECT="$switch"
5907 ac_success=yes
5908 break
5909 fi
5910 done
5911 fi
5912 ac_ext=c
5913ac_cpp='$CPP $CPPFLAGS'
5914ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5915ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5916ac_compiler_gnu=$ac_cv_c_compiler_gnu
5917
5918 if test x$ax_cxx_compile_cxx11_required = xtrue; then
5919 if test x$ac_success = xno; then
5920 as_fn_error "*** A compiler with support for C++11 language features is required." "$LINENO" 5
5921 fi
5922 fi
5923 if test x$ac_success = xno; then
5924 HAVE_CXX11=0
5925 { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5
5926$as_echo "$as_me: No compiler with C++11 support was found" >&6;}
5927 else
5928 HAVE_CXX11=1
5929
5930$as_echo "#define HAVE_CXX11 1" >>confdefs.h
5931
5932 fi
5933
5934
5935
5936
a417dc56
RW
5937# Dependency checking.
5938rm -rf .tst 2>/dev/null
5939mkdir .tst 2>/dev/null
5940if test -d .tst; then
5941 am__leading_dot=.
5942else
5943 am__leading_dot=_
5944fi
5945rmdir .tst 2>/dev/null
5946
5947DEPDIR="${am__leading_dot}deps"
5948
81ecdfbb 5949ac_config_commands="$ac_config_commands depdir"
a417dc56
RW
5950
5951
5952depcc="$CC" am_compiler_list=
5953
5954am_depcomp=$ac_aux_dir/depcomp
81ecdfbb
RW
5955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
5956$as_echo_n "checking dependency style of $depcc... " >&6; }
5957if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
5958 $as_echo_n "(cached) " >&6
a417dc56
RW
5959else
5960 if test -f "$am_depcomp"; then
5961 # We make a subdir and do the tests there. Otherwise we can end up
5962 # making bogus files that we don't know about and never remove. For
5963 # instance it was reported that on HP-UX the gcc test will end up
5964 # making a dummy file named `D' -- because `-MD' means `put the output
5965 # in D'.
5966 mkdir conftest.dir
5967 # Copy depcomp to subdir because otherwise we won't find it if we're
5968 # using a relative directory.
5969 cp "$am_depcomp" conftest.dir
5970 cd conftest.dir
5971 # We will build objects and dependencies in a subdirectory because
5972 # it helps to detect inapplicable dependency modes. For instance
5973 # both Tru64's cc and ICC support -MD to output dependencies as a
5974 # side effect of compilation, but ICC will put the dependencies in
5975 # the current directory while Tru64 will put them in the object
5976 # directory.
5977 mkdir sub
5978
5979 am_cv_CC_dependencies_compiler_type=none
5980 if test "$am_compiler_list" = ""; then
5981 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
5982 fi
5983 for depmode in $am_compiler_list; do
5984 if test $depmode = none; then break; fi
5985
81ecdfbb 5986 $as_echo "$as_me:$LINENO: trying $depmode" >&5
a417dc56
RW
5987 # Setup a source with many dependencies, because some compilers
5988 # like to wrap large dependency lists on column 80 (with \), and
5989 # we should not choose a depcomp mode which is confused by this.
5990 #
5991 # We need to recreate these files for each test, as the compiler may
5992 # overwrite some of them when testing with obscure command lines.
5993 # This happens at least with the AIX C compiler.
5994 : > sub/conftest.c
5995 for i in 1 2 3 4 5 6; do
5996 echo '#include "conftst'$i'.h"' >> sub/conftest.c
5997 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
5998 # Solaris 8's {/usr,}/bin/sh.
5999 touch sub/conftst$i.h
6000 done
6001 echo "include sub/conftest.Po" > confmf
6002
6003 # We check with `-c' and `-o' for the sake of the "dashmstdout"
6004 # mode. It turns out that the SunPro C++ compiler does not properly
6005 # handle `-M -o', and we need to detect this.
6006 depcmd="depmode=$depmode \
6007 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
6008 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6009 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
6010 echo "| $depcmd" | sed -e 's/ */ /g' >&5
6011 if env $depcmd > conftest.err 2>&1 &&
6012 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
6013 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
6014 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
6015 # icc doesn't choke on unknown options, it will just issue warnings
6016 # or remarks (even with -Werror). So we grep stderr for any message
6017 # that says an option was ignored or not supported.
6018 # When given -MP, icc 7.0 and 7.1 complain thusly:
6019 # icc: Command line warning: ignoring option '-M'; no argument required
6020 # The diagnosis changed in icc 8.0:
6021 # icc: Command line remark: option '-MP' not supported
6022 if (grep 'ignoring option' conftest.err ||
6023 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6024 am_cv_CC_dependencies_compiler_type=$depmode
81ecdfbb 6025 $as_echo "$as_me:$LINENO: success" >&5
a417dc56
RW
6026 break
6027 fi
6028 fi
81ecdfbb 6029 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
a417dc56
RW
6030 sed -e 's/^/| /' < conftest.err >&5
6031 done
6032
6033 cd ..
6034 rm -rf conftest.dir
6035else
6036 am_cv_CC_dependencies_compiler_type=none
6037fi
6038
6039fi
81ecdfbb
RW
6040{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
6041$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
a417dc56 6042if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
81ecdfbb 6043then as_fn_error "no usable dependency style found" "$LINENO" 5
a417dc56
RW
6044else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
6045
6046fi
6047
6048
648d586d
JB
6049gnulib_extra_configure_args=
6050# If large-file support is disabled, make sure gnulib does the same.
6051if test "$enable_largefile" = no; then
6052gnulib_extra_configure_args="$gnulib_extra_configure_args --disable-largefile"
6053fi
6054
c971b7fa
PA
6055# Configure gnulib. We need to build gnulib under some other
6056# directory not "gnulib", to avoid the problem of both GDB and
6057# GDBserver wanting to build it in the same directory, when building
6058# in the source dir.
783e057b 6059
c971b7fa
PA
6060 in_src="gnulib"
6061 in_build="build-gnulib"
648d586d 6062 in_extra_args="$gnulib_extra_configure_args"
c971b7fa
PA
6063
6064 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
6065 # so they do not pile up.
6066 ac_sub_configure_args=
6067 ac_prev=
6068 eval "set x $ac_configure_args"
6069 shift
6070 for ac_arg
6071 do
6072 if test -n "$ac_prev"; then
6073 ac_prev=
6074 continue
6075 fi
6076 case $ac_arg in
6077 -cache-file | --cache-file | --cache-fil | --cache-fi \
6078 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
6079 ac_prev=cache_file ;;
6080 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
6081 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
6082 | --c=*)
6083 ;;
6084 --config-cache | -C)
6085 ;;
6086 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
6087 ac_prev=srcdir ;;
6088 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
6089 ;;
6090 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
6091 ac_prev=prefix ;;
6092 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
6093 ;;
6094 --disable-option-checking)
6095 ;;
6096 *)
6097 case $ac_arg in
6098 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
6099 esac
6100 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
6101 esac
6102 done
6103
6104 # Always prepend --prefix to ensure using the same prefix
6105 # in subdir configurations.
6106 ac_arg="--prefix=$prefix"
6107 case $ac_arg in
6108 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
6109 esac
6110 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
6111
6112 # Pass --silent
6113 if test "$silent" = yes; then
6114 ac_sub_configure_args="--silent $ac_sub_configure_args"
6115 fi
6116
6117 # Always prepend --disable-option-checking to silence warnings, since
6118 # different subdirs can have different --enable and --with options.
6119 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
6120
6121 ac_popdir=`pwd`
6122 ac_dir=$in_build
6123
6124 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
6125 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
6126 $as_echo "$ac_msg" >&6
6127 as_dir="$ac_dir"; as_fn_mkdir_p
6128
38ea300a
PA
6129 case $srcdir in
6130 [\\/]* | ?:[\\/]* )
6131 ac_srcdir=$srcdir/$in_src ;;
6132 *) # Relative name.
6133 ac_srcdir=../$srcdir/$in_src ;;
6134 esac
c971b7fa
PA
6135
6136 cd "$ac_dir"
6137
6138 ac_sub_configure=$ac_srcdir/configure
6139
6140 # Make the cache file name correct relative to the subdirectory.
6141 case $cache_file in
6142 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
6143 *) # Relative name.
6144 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
6145 esac
6146
648d586d
JB
6147 if test -n "$in_extra_args"; then
6148 # Add the extra args at the end.
6149 ac_sub_configure_args="$ac_sub_configure_args $in_extra_args"
6150 fi
6151
c971b7fa
PA
6152 { $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
6153$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
6154 # The eval makes quoting arguments work.
6155 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
6156 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
6157 as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
6158
6159 cd "$ac_popdir"
783e057b 6160
c971b7fa
PA
6161
6162
6163CONFIG_OBS=
6164CONFIG_DEPS=
6165CONFIG_SRCS=
6166ENABLE_CFLAGS=
6167
6168CONFIG_ALL=
6169CONFIG_CLEAN=
6170CONFIG_INSTALL=
6171CONFIG_UNINSTALL=
6172
6173# If we haven't got the data from the intl directory,
6174# assume NLS is disabled.
6175USE_NLS=no
6176LIBINTL=
6177LIBINTL_DEP=
6178INCINTL=
6179XGETTEXT=
6180GMSGFMT=
6181POSUB=
783e057b
DJ
6182
6183if test -f ../intl/config.intl; then
6184 . ../intl/config.intl
6185fi
81ecdfbb
RW
6186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
6187$as_echo_n "checking whether NLS is requested... " >&6; }
783e057b 6188if test x"$USE_NLS" != xyes; then
81ecdfbb
RW
6189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6190$as_echo "no" >&6; }
783e057b 6191else
81ecdfbb
RW
6192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6193$as_echo "yes" >&6; }
783e057b 6194
81ecdfbb 6195$as_echo "#define ENABLE_NLS 1" >>confdefs.h
783e057b
DJ
6196
6197
81ecdfbb
RW
6198 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
6199$as_echo_n "checking for catalogs to be installed... " >&6; }
783e057b
DJ
6200 # Look for .po and .gmo files in the source directory.
6201 CATALOGS=
6202 XLINGUAS=
6203 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
6204 # If there aren't any .gmo files the shell will give us the
6205 # literal string "../path/to/srcdir/po/*.gmo" which has to be
6206 # weeded out.
6207 case "$cat" in *\**)
6208 continue;;
6209 esac
6210 # The quadruple backslash is collapsed to a double backslash
6211 # by the backticks, then collapsed again by the double quotes,
6212 # leaving us with one backslash in the sed expression (right
6213 # before the dot that mustn't act as a wildcard).
c971b7fa
PA
6214 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
6215 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
6216 # The user is allowed to set LINGUAS to a list of languages to
6217 # install catalogs for. If it's empty that means "all of them."
6218 if test "x$LINGUAS" = x; then
6219 CATALOGS="$CATALOGS $cat"
6220 XLINGUAS="$XLINGUAS $lang"
6221 else
6222 case "$LINGUAS" in *$lang*)
6223 CATALOGS="$CATALOGS $cat"
6224 XLINGUAS="$XLINGUAS $lang"
6225 ;;
6226 esac
e28b3332
DJ
6227 fi
6228 done
c971b7fa
PA
6229 LINGUAS="$XLINGUAS"
6230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
6231$as_echo "$LINGUAS" >&6; }
6232
6233
6234 DATADIRNAME=share
6235
6236 INSTOBJEXT=.mo
6237
6238 GENCAT=gencat
6239
6240 CATOBJEXT=.gmo
e28b3332 6241
e28b3332
DJ
6242fi
6243
c971b7fa
PA
6244localedir='${datadir}/locale'
6245
6246
6247if test x"$USE_NLS" = xyes; then
6248 CONFIG_ALL="$CONFIG_ALL all-po"
6249 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
6250 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
6251 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
e28b3332 6252fi
e28b3332 6253
c971b7fa
PA
6254GNULIB=build-gnulib/import
6255
6256# For Makefile dependencies.
6257GNULIB_STDINT_H=
6258if test x"$STDINT_H" != x; then
6259 GNULIB_STDINT_H=$GNULIB/$STDINT_H
e28b3332
DJ
6260fi
6261
6262
c971b7fa
PA
6263PACKAGE=gdb
6264
6265cat >>confdefs.h <<_ACEOF
6266#define PACKAGE "$PACKAGE"
6267_ACEOF
6268
6269
6270
6271# We never need to detect it in this sub-configure.
6272# But preserve it for config.status --recheck.
6273
6274
6275
6276MAKEINFO_EXTRA_FLAGS=""
6277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5
6278$as_echo_n "checking whether $MAKEINFO supports @click... " >&6; }
6279if test "${gdb_cv_have_makeinfo_click+set}" = set; then :
6280 $as_echo_n "(cached) " >&6
6281else
6282 echo '@clicksequence{a @click{} b}' >conftest.texinfo
6283 if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then
6284 gdb_cv_have_makeinfo_click=yes
6285 else
6286 gdb_cv_have_makeinfo_click=no
6287 fi
6288fi
6289{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5
6290$as_echo "$gdb_cv_have_makeinfo_click" >&6; }
6291if test x"$gdb_cv_have_makeinfo_click" = xyes; then
6292 MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK"
6293fi
e28b3332
DJ
6294
6295
bec39cab
AC
6296
6297
81ecdfbb
RW
6298# Check whether --with-separate-debug-dir was given.
6299if test "${with_separate_debug_dir+set}" = set; then :
6300 withval=$with_separate_debug_dir;
b14b1491
TT
6301 DEBUGDIR=$withval
6302else
6303 DEBUGDIR=${libdir}/debug
81ecdfbb
RW
6304fi
6305
20e95c23 6306
783e057b
DJ
6307 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6308 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 6309 ac_define_dir=`eval echo $DEBUGDIR`
783e057b 6310 ac_define_dir=`eval echo $ac_define_dir`
20e95c23 6311
783e057b
DJ
6312cat >>confdefs.h <<_ACEOF
6313#define DEBUGDIR "$ac_define_dir"
20e95c23 6314_ACEOF
20e95c23 6315
20e95c23 6316
20e95c23 6317
0c4a4063 6318
b14b1491
TT
6319 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6320 if test "x$prefix" = xNONE; then
6321 test_prefix=/usr/local
6322 else
6323 test_prefix=$prefix
6324 fi
783e057b 6325 else
b14b1491 6326 test_prefix=$exec_prefix
783e057b 6327 fi
b14b1491
TT
6328 value=0
6329 case ${ac_define_dir} in
6330 "${test_prefix}"|"${test_prefix}/"*|\
6331 '${exec_prefix}'|'${exec_prefix}/'*)
6332 value=1
6333 ;;
6334 esac
6335
6336cat >>confdefs.h <<_ACEOF
6337#define DEBUGDIR_RELOCATABLE $value
6338_ACEOF
6339
6340
6341
0c4a4063 6342
f83d8a90
DE
6343# We can't pass paths as command line arguments.
6344# Mingw32 tries to be clever and will convert the paths for us.
6345# For example -DBINDIR="/usr/local/bin" passed on the command line may get
6346# converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin".
6347# This breaks GDB's relocatable path conversions since paths passed in
6348# config.h would not get so translated, the path prefixes no longer match.
6349
6350 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6351 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6352 ac_define_dir=`eval echo $bindir`
6353 ac_define_dir=`eval echo $ac_define_dir`
6354
6355cat >>confdefs.h <<_ACEOF
6356#define BINDIR "$ac_define_dir"
6357_ACEOF
6358
6359
6360
b14b1491
TT
6361# GDB's datadir relocation
6362
6363
6364
81ecdfbb
RW
6365# Check whether --with-gdb-datadir was given.
6366if test "${with_gdb_datadir+set}" = set; then :
6367 withval=$with_gdb_datadir;
b14b1491 6368 GDB_DATADIR=$withval
20e95c23 6369else
b14b1491 6370 GDB_DATADIR=${datadir}/gdb
81ecdfbb
RW
6371fi
6372
20e95c23 6373
b14b1491
TT
6374 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6375 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6376 ac_define_dir=`eval echo $GDB_DATADIR`
6377 ac_define_dir=`eval echo $ac_define_dir`
6378
6379cat >>confdefs.h <<_ACEOF
6380#define GDB_DATADIR "$ac_define_dir"
20e95c23
DJ
6381_ACEOF
6382
b14b1491
TT
6383
6384
0c4a4063 6385
b14b1491
TT
6386 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6387 if test "x$prefix" = xNONE; then
6388 test_prefix=/usr/local
6389 else
6390 test_prefix=$prefix
6391 fi
6392 else
6393 test_prefix=$exec_prefix
6394 fi
6395 value=0
6396 case ${ac_define_dir} in
6397 "${test_prefix}"|"${test_prefix}/"*|\
6398 '${exec_prefix}'|'${exec_prefix}/'*)
6399 value=1
6400 ;;
6401 esac
6402
6403cat >>confdefs.h <<_ACEOF
6404#define GDB_DATADIR_RELOCATABLE $value
6405_ACEOF
6406
6407
783e057b 6408
20e95c23 6409
0c4a4063 6410
81ecdfbb
RW
6411# Check whether --with-relocated-sources was given.
6412if test "${with_relocated_sources+set}" = set; then :
6413 withval=$with_relocated_sources; reloc_srcdir="${withval}"
29b0e8a2
JM
6414
6415 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6416 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6417 ac_define_dir=`eval echo $reloc_srcdir`
6418 ac_define_dir=`eval echo $ac_define_dir`
6419
6420cat >>confdefs.h <<_ACEOF
6421#define RELOC_SRCDIR "$ac_define_dir"
6422_ACEOF
6423
6424
6425
81ecdfbb
RW
6426fi
6427
29b0e8a2 6428
7349ff92
JK
6429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5
6430$as_echo_n "checking for default auto-load directory... " >&6; }
6431
6432# Check whether --with-auto-load-dir was given.
6433if test "${with_auto_load_dir+set}" = set; then :
6434 withval=$with_auto_load_dir;
6435else
1564a261 6436 with_auto_load_dir='$debugdir:$datadir/auto-load'
7349ff92
JK
6437fi
6438
1564a261 6439escape_dir=`echo $with_auto_load_dir | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'`
7349ff92
JK
6440
6441 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6442 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6443 ac_define_dir=`eval echo $escape_dir`
6444 ac_define_dir=`eval echo $ac_define_dir`
6445
6446cat >>confdefs.h <<_ACEOF
6447#define AUTO_LOAD_DIR "$ac_define_dir"
6448_ACEOF
6449
6450
6451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5
6452$as_echo "$with_auto_load_dir" >&6; }
6453
bccbefd2
JK
6454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5
6455$as_echo_n "checking for default auto-load safe-path... " >&6; }
6456
6457# Check whether --with-auto-load-safe-path was given.
6458if test "${with_auto_load_safe_path+set}" = set; then :
6459 withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then
6dea1fbd
JK
6460 with_auto_load_safe_path="/"
6461 fi
bccbefd2 6462else
7349ff92 6463 with_auto_load_safe_path="$with_auto_load_dir"
bccbefd2
JK
6464fi
6465
1564a261 6466escape_dir=`echo $with_auto_load_safe_path | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'`
bccbefd2
JK
6467
6468 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6469 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6dea1fbd 6470 ac_define_dir=`eval echo $escape_dir`
bccbefd2
JK
6471 ac_define_dir=`eval echo $ac_define_dir`
6472
6473cat >>confdefs.h <<_ACEOF
6dea1fbd 6474#define AUTO_LOAD_SAFE_PATH "$ac_define_dir"
bccbefd2
JK
6475_ACEOF
6476
6477
6478{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
6479$as_echo "$with_auto_load_safe_path" >&6; }
6480
29b0e8a2 6481
20e95c23 6482
5ae98d25 6483subdirs="$subdirs testsuite"
20e95c23
DJ
6484
6485
783e057b 6486# Check whether to support alternative target configurations
81ecdfbb
RW
6487# Check whether --enable-targets was given.
6488if test "${enable_targets+set}" = set; then :
6489 enableval=$enable_targets; case "${enableval}" in
6490 yes | "") as_fn_error "enable-targets option must specify target names or 'all'" "$LINENO" 5
783e057b
DJ
6491 ;;
6492 no) enable_targets= ;;
6493 *) enable_targets=$enableval ;;
6494esac
81ecdfbb
RW
6495fi
6496
20e95c23 6497
783e057b 6498# Check whether to enable 64-bit support on 32-bit hosts
81ecdfbb
RW
6499# Check whether --enable-64-bit-bfd was given.
6500if test "${enable_64_bit_bfd+set}" = set; then :
6501 enableval=$enable_64_bit_bfd; case "${enableval}" in
783e057b
DJ
6502 yes) want64=true ;;
6503 no) want64=false ;;
81ecdfbb 6504 *) as_fn_error "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
783e057b
DJ
6505esac
6506else
6507 want64=false
81ecdfbb
RW
6508fi
6509
783e057b
DJ
6510# Provide defaults for some variables set by the per-host and per-target
6511# configuration.
6512gdb_host_obs=posix-hdep.o
20e95c23 6513
783e057b
DJ
6514if test "${target}" = "${host}"; then
6515 gdb_native=yes
6516else
6517 gdb_native=no
6518fi
20e95c23 6519
783e057b 6520. $srcdir/configure.host
20e95c23 6521
fb23d554
SDJ
6522# Add in the common host objects.
6523. $srcdir/common/common.host
6524gdb_host_obs="$gdb_host_obs $common_host_obs"
6525
783e057b 6526# Accumulate some settings from configure.tgt over all enabled targets
20e95c23 6527
783e057b
DJ
6528TARGET_OBS=
6529all_targets=
b292c783 6530HAVE_NATIVE_GCORE_TARGET=
20e95c23 6531
783e057b 6532for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
20e95c23 6533do
783e057b
DJ
6534 if test "$targ_alias" = "all"; then
6535 all_targets=true
6536 else
6537 # Canonicalize the secondary target names.
6538 result=`$ac_config_sub $targ_alias 2>/dev/null`
6539 if test -n "$result"; then
6540 targ=$result
6541 else
6542 targ=$targ_alias
6543 fi
20e95c23 6544
783e057b 6545 . ${srcdir}/configure.tgt
20e95c23 6546
bf307134
JB
6547 if test -z "${gdb_target_obs}"; then :
6548 as_fn_error "configuration ${targ} is unsupported." "$LINENO" 5
6549fi
6550
783e057b
DJ
6551 # Target-specific object files
6552 for i in ${gdb_target_obs}; do
6553 case " $TARGET_OBS " in
6554 *" ${i} "*) ;;
6555 *)
6556 TARGET_OBS="$TARGET_OBS ${i}"
6557 ;;
6558 esac
6559 done
20e95c23 6560
783e057b
DJ
6561 # Check whether this target needs 64-bit CORE_ADDR
6562 if test x${want64} = xfalse; then
6563 . ${srcdir}/../bfd/config.bfd
6564 fi
b292c783
JK
6565
6566 # Check whether this target is native and supports gcore.
6567 if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \
6568 && $gdb_have_gcore; then
6569 HAVE_NATIVE_GCORE_TARGET=1
6570 fi
783e057b 6571 fi
20e95c23
DJ
6572done
6573
783e057b
DJ
6574if test x${all_targets} = xtrue; then
6575
6576 # We want all 64-bit targets if we either:
6577 # - run on a 64-bit host or
6578 # - already require 64-bit support for some other target or
6579 # - the --enable-64-bit-bfd option was supplied
6580 # Otherwise we only support all 32-bit targets.
6581 #
6582 # NOTE: This test must be in sync with the corresponding
6583 # tests in BFD!
20e95c23 6584
783e057b 6585 if test x${want64} = xfalse; then
81ecdfbb
RW
6586 # The cast to long int works around a bug in the HP C Compiler
6587# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6588# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6589# This bug is HP SR number 8606223364.
6590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6591$as_echo_n "checking size of long... " >&6; }
6592if test "${ac_cv_sizeof_long+set}" = set; then :
6593 $as_echo_n "(cached) " >&6
c0993dbe 6594else
81ecdfbb 6595 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
c0993dbe 6596
81ecdfbb
RW
6597else
6598 if test "$ac_cv_type_long" = yes; then
6599 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6600$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6601{ as_fn_set_status 77
6602as_fn_error "cannot compute sizeof (long)
6603See \`config.log' for more details." "$LINENO" 5; }; }
6604 else
6605 ac_cv_sizeof_long=0
6606 fi
c0993dbe 6607fi
81ecdfbb 6608
c0993dbe 6609fi
81ecdfbb
RW
6610{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6611$as_echo "$ac_cv_sizeof_long" >&6; }
c0993dbe 6612
c0993dbe 6613
c0993dbe 6614
c0993dbe
UW
6615cat >>confdefs.h <<_ACEOF
6616#define SIZEOF_LONG $ac_cv_sizeof_long
6617_ACEOF
6618
6619
6620 if test "x${ac_cv_sizeof_long}" = "x8"; then
6621 want64=true
6622 fi
6623 fi
6624 if test x${want64} = xtrue; then
6625 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
6626 else
6627 TARGET_OBS='$(ALL_TARGET_OBS)'
6628 fi
6629fi
6630
6631
6632
b292c783 6633
c0993dbe
UW
6634# For other settings, only the main target counts.
6635gdb_sim=
6636gdb_osabi=
6637build_gdbserver=
6638targ=$target; . ${srcdir}/configure.tgt
6639
6640# Fetch the default architecture and default target vector from BFD.
6641targ=$target; . $srcdir/../bfd/config.bfd
6642
6643# We only want the first architecture, so strip off the others if
6644# there is more than one.
6645targ_archs=`echo $targ_archs | sed 's/ .*//'`
6646
6647if test "x$targ_archs" != x; then
6648
6649cat >>confdefs.h <<_ACEOF
6650#define DEFAULT_BFD_ARCH $targ_archs
6651_ACEOF
6652
6653fi
6654if test "x$targ_defvec" != x; then
6655
6656cat >>confdefs.h <<_ACEOF
6657#define DEFAULT_BFD_VEC $targ_defvec
6658_ACEOF
6659
6660fi
6661
c0993dbe
UW
6662# The CLI cannot be disabled yet, but may be in the future.
6663
6664# Enable CLI.
81ecdfbb
RW
6665# Check whether --enable-gdbcli was given.
6666if test "${enable_gdbcli+set}" = set; then :
6667 enableval=$enable_gdbcli; case $enableval in
c0993dbe
UW
6668 yes)
6669 ;;
6670 no)
81ecdfbb 6671 as_fn_error "the command-line interface cannot be disabled yet" "$LINENO" 5 ;;
c0993dbe 6672 *)
81ecdfbb 6673 as_fn_error "bad value $enableval for --enable-gdbcli" "$LINENO" 5 ;;
c0993dbe
UW
6674 esac
6675else
6676 enable_gdbcli=yes
81ecdfbb
RW
6677fi
6678
c0993dbe
UW
6679if test x"$enable_gdbcli" = xyes; then
6680 if test -d $srcdir/cli; then
6681 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
6682 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
6683 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
6684 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
6685 fi
6686fi
6687
6688# Enable MI.
81ecdfbb
RW
6689# Check whether --enable-gdbmi was given.
6690if test "${enable_gdbmi+set}" = set; then :
6691 enableval=$enable_gdbmi; case $enableval in
c0993dbe
UW
6692 yes | no)
6693 ;;
6694 *)
81ecdfbb 6695 as_fn_error "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
c0993dbe
UW
6696 esac
6697else
6698 enable_gdbmi=yes
81ecdfbb
RW
6699fi
6700
c0993dbe
UW
6701if test x"$enable_gdbmi" = xyes; then
6702 if test -d $srcdir/mi; then
6703 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
6704 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
6705 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
6706 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
6707 fi
6708fi
6709
6710# Enable TUI.
81ecdfbb
RW
6711# Check whether --enable-tui was given.
6712if test "${enable_tui+set}" = set; then :
6713 enableval=$enable_tui; case $enableval in
3ca64bd3 6714 yes | no | auto)
c0993dbe
UW
6715 ;;
6716 *)
81ecdfbb 6717 as_fn_error "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
c0993dbe
UW
6718 esac
6719else
3ca64bd3 6720 enable_tui=auto
81ecdfbb
RW
6721fi
6722
c0993dbe
UW
6723
6724# Enable gdbtk.
81ecdfbb
RW
6725# Check whether --enable-gdbtk was given.
6726if test "${enable_gdbtk+set}" = set; then :
6727 enableval=$enable_gdbtk; case $enableval in
c0993dbe
UW
6728 yes | no)
6729 ;;
6730 *)
81ecdfbb 6731 as_fn_error "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
c0993dbe
UW
6732 esac
6733else
5062cc19 6734 if test -d $srcdir/gdbtk; then
c0993dbe
UW
6735 enable_gdbtk=yes
6736 else
6737 enable_gdbtk=no
6738 fi
81ecdfbb
RW
6739fi
6740
c0993dbe
UW
6741# We unconditionally disable gdbtk tests on selected platforms.
6742case $host_os in
6743 go32* | windows*)
81ecdfbb
RW
6744 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
6745$as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
c0993dbe
UW
6746 enable_gdbtk=no ;;
6747esac
6748
05e7c244 6749# Libunwind support for ia64.
bec39cab 6750
05e7c244
JK
6751
6752# Check whether --with-libunwind-ia64 was given.
6753if test "${with_libunwind_ia64+set}" = set; then :
6754 withval=$with_libunwind_ia64;
bec39cab 6755else
05e7c244
JK
6756 with_libunwind_ia64=auto
6757fi
bec39cab 6758
05e7c244
JK
6759
6760# Backward compatibility option.
6761if test "${with_libunwind+set}" = set; then
6762 if test x"$with_libunwind_ia64" != xauto; then
6763 as_fn_error "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5
6764 fi
6765 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5
6766$as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;}
6767 with_libunwind_ia64="$with_libunwind"
6768fi
6769
6770case "$with_libunwind_ia64" in
6771 yes | no)
6772 ;;
6773 auto)
6774 for ac_header in libunwind-ia64.h
81ecdfbb 6775do :
b54a8fd7
PA
6776 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
6777if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
bec39cab 6778 cat >>confdefs.h <<_ACEOF
b54a8fd7 6779#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
6780_ACEOF
6781
6782fi
6783
6784done
6785
05e7c244
JK
6786 with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h
6787 ;;
6788 *)
6789 as_fn_error "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5
6790 ;;
6791esac
bec39cab 6792
05e7c244 6793if test x"$with_libunwind_ia64" = xyes; then
b54a8fd7 6794 for ac_header in libunwind-ia64.h
81ecdfbb 6795do :
b54a8fd7
PA
6796 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
6797if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
bec39cab 6798 cat >>confdefs.h <<_ACEOF
b54a8fd7 6799#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
6800_ACEOF
6801
6802fi
6803
6804done
6805
05e7c244
JK
6806 if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then
6807 as_fn_error "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5
6808 fi
6809 CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o"
6810 CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o"
6811 CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c"
a9322a30
TT
6812fi
6813
cb01cfba
JB
6814opt_curses=no
6815
81ecdfbb
RW
6816# Check whether --with-curses was given.
6817if test "${with_curses+set}" = set; then :
6818 withval=$with_curses; opt_curses=$withval
6819fi
6820
cb01cfba 6821
76a39ba7 6822prefer_curses=no
cb01cfba 6823if test "$opt_curses" = "yes"; then
76a39ba7 6824 prefer_curses=yes
cb01cfba
JB
6825fi
6826
a9322a30 6827# Profiling support.
81ecdfbb
RW
6828# Check whether --enable-profiling was given.
6829if test "${enable_profiling+set}" = set; then :
6830 enableval=$enable_profiling; case $enableval in
a9322a30
TT
6831 yes | no)
6832 ;;
6833 *)
81ecdfbb 6834 as_fn_error "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
a9322a30
TT
6835 esac
6836else
6837 enable_profiling=no
81ecdfbb 6838fi
bec39cab 6839
a9322a30
TT
6840
6841for ac_func in monstartup _mcleanup
81ecdfbb
RW
6842do :
6843 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6844ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
6845eval as_val=\$$as_ac_var
6846 if test "x$as_val" = x""yes; then :
6847 cat >>confdefs.h <<_ACEOF
6848#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 6849_ACEOF
a9322a30 6850
81ecdfbb
RW
6851fi
6852done
a9322a30 6853
81ecdfbb
RW
6854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
6855$as_echo_n "checking for _etext... " >&6; }
6856if test "${ac_cv_var__etext+set}" = set; then :
6857 $as_echo_n "(cached) " >&6
6858else
6859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6860/* end confdefs.h. */
6861#include <stdlib.h>
6862extern char _etext;
a9322a30
TT
6863
6864int
6865main ()
6866{
6867free (&_etext);
6868 ;
6869 return 0;
6870}
bec39cab 6871_ACEOF
81ecdfbb 6872if ac_fn_c_try_link "$LINENO"; then :
a9322a30 6873 ac_cv_var__etext=yes
bec39cab 6874else
81ecdfbb 6875 ac_cv_var__etext=no
bec39cab 6876fi
81ecdfbb
RW
6877rm -f core conftest.err conftest.$ac_objext \
6878 conftest$ac_exeext conftest.$ac_ext
bec39cab 6879fi
81ecdfbb
RW
6880{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
6881$as_echo "$ac_cv_var__etext" >&6; }
a9322a30 6882if test $ac_cv_var__etext = yes; then
60ca704f 6883
81ecdfbb 6884$as_echo "#define HAVE__ETEXT 1" >>confdefs.h
bec39cab 6885
bec39cab 6886fi
81ecdfbb
RW
6887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
6888$as_echo_n "checking for etext... " >&6; }
6889if test "${ac_cv_var_etext+set}" = set; then :
6890 $as_echo_n "(cached) " >&6
bec39cab 6891else
81ecdfbb 6892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6893/* end confdefs.h. */
a9322a30
TT
6894#include <stdlib.h>
6895extern char etext;
bec39cab
AC
6896
6897int
6898main ()
6899{
a9322a30 6900free (&etext);
bec39cab
AC
6901 ;
6902 return 0;
6903}
6904_ACEOF
81ecdfbb 6905if ac_fn_c_try_link "$LINENO"; then :
a9322a30 6906 ac_cv_var_etext=yes
bec39cab 6907else
81ecdfbb 6908 ac_cv_var_etext=no
bec39cab 6909fi
81ecdfbb
RW
6910rm -f core conftest.err conftest.$ac_objext \
6911 conftest$ac_exeext conftest.$ac_ext
bec39cab 6912fi
81ecdfbb
RW
6913{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
6914$as_echo "$ac_cv_var_etext" >&6; }
a9322a30
TT
6915if test $ac_cv_var_etext = yes; then
6916
81ecdfbb 6917$as_echo "#define HAVE_ETEXT 1" >>confdefs.h
bec39cab
AC
6918
6919fi
a9322a30
TT
6920if test "$enable_profiling" = yes ; then
6921 if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
81ecdfbb 6922 as_fn_error "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
a9322a30
TT
6923 fi
6924 PROFILE_CFLAGS=-pg
6925 OLD_CFLAGS="$CFLAGS"
6926 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
bec39cab 6927
81ecdfbb
RW
6928 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
6929$as_echo_n "checking whether $CC supports -pg... " >&6; }
6930if test "${ac_cv_cc_supports_pg+set}" = set; then :
6931 $as_echo_n "(cached) " >&6
bec39cab 6932else
81ecdfbb 6933 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6934/* end confdefs.h. */
bec39cab
AC
6935
6936int
6937main ()
6938{
a9322a30 6939int x;
bec39cab
AC
6940 ;
6941 return 0;
6942}
6943_ACEOF
81ecdfbb 6944if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 6945 ac_cv_cc_supports_pg=yes
bec39cab 6946else
81ecdfbb 6947 ac_cv_cc_supports_pg=no
bec39cab 6948fi
81ecdfbb 6949rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 6950fi
81ecdfbb
RW
6951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
6952$as_echo "$ac_cv_cc_supports_pg" >&6; }
bec39cab 6953
a9322a30 6954 if test $ac_cv_cc_supports_pg = no; then
81ecdfbb 6955 as_fn_error "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
a9322a30 6956 fi
bec39cab 6957
a9322a30 6958 CFLAGS="$OLD_CFLAGS"
bec39cab
AC
6959fi
6960
c16158bc
JM
6961
6962
81ecdfbb
RW
6963# Check whether --with-pkgversion was given.
6964if test "${with_pkgversion+set}" = set; then :
6965 withval=$with_pkgversion; case "$withval" in
6966 yes) as_fn_error "package version not specified" "$LINENO" 5 ;;
c16158bc
JM
6967 no) PKGVERSION= ;;
6968 *) PKGVERSION="($withval) " ;;
6969 esac
6970else
6971 PKGVERSION="(GDB) "
6972
81ecdfbb 6973fi
c16158bc
JM
6974
6975
6976
6977
81ecdfbb
RW
6978
6979# Check whether --with-bugurl was given.
6980if test "${with_bugurl+set}" = set; then :
6981 withval=$with_bugurl; case "$withval" in
6982 yes) as_fn_error "bug URL not specified" "$LINENO" 5 ;;
c16158bc
JM
6983 no) BUGURL=
6984 ;;
6985 *) BUGURL="$withval"
6986 ;;
6987 esac
6988else
6989 BUGURL="http://www.gnu.org/software/gdb/bugs/"
6990
81ecdfbb
RW
6991fi
6992
c16158bc
JM
6993 case ${BUGURL} in
6994 "")
6995 REPORT_BUGS_TO=
6996 REPORT_BUGS_TEXI=
6997 ;;
6998 *)
6999 REPORT_BUGS_TO="<$BUGURL>"
7000 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
7001 ;;
7002 esac;
7003
7004
7005
7006
7007cat >>confdefs.h <<_ACEOF
7008#define PKGVERSION "$PKGVERSION"
7009_ACEOF
7010
7011
7012cat >>confdefs.h <<_ACEOF
7013#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
7014_ACEOF
7015
7016
bec39cab
AC
7017# --------------------- #
7018# Checks for programs. #
7019# --------------------- #
7020
7021for ac_prog in gawk mawk nawk awk
7022do
7023 # Extract the first word of "$ac_prog", so it can be a program name with args.
7024set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
7025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7026$as_echo_n "checking for $ac_word... " >&6; }
7027if test "${ac_cv_prog_AWK+set}" = set; then :
7028 $as_echo_n "(cached) " >&6
bec39cab
AC
7029else
7030 if test -n "$AWK"; then
7031 ac_cv_prog_AWK="$AWK" # Let the user override the test.
7032else
7033as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7034for as_dir in $PATH
7035do
7036 IFS=$as_save_IFS
7037 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7038 for ac_exec_ext in '' $ac_executable_extensions; do
7039 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7040 ac_cv_prog_AWK="$ac_prog"
81ecdfbb 7041 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7042 break 2
7043 fi
7044done
81ecdfbb
RW
7045 done
7046IFS=$as_save_IFS
bec39cab
AC
7047
7048fi
7049fi
7050AWK=$ac_cv_prog_AWK
7051if test -n "$AWK"; then
81ecdfbb
RW
7052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
7053$as_echo "$AWK" >&6; }
bec39cab 7054else
81ecdfbb
RW
7055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7056$as_echo "no" >&6; }
bec39cab
AC
7057fi
7058
bec39cab 7059
81ecdfbb 7060 test -n "$AWK" && break
bec39cab
AC
7061done
7062
c971b7fa
PA
7063# Find a good install program. We prefer a C program (faster),
7064# so one script is as good as another. But avoid the broken or
7065# incompatible versions:
7066# SysV /etc/install, /usr/sbin/install
7067# SunOS /usr/etc/install
7068# IRIX /sbin/install
7069# AIX /bin/install
7070# AmigaOS /C/install, which installs bootblocks on floppy discs
7071# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
7072# AFS /usr/afsws/bin/install, which mishandles nonexistent args
7073# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
7074# OS/2's system install, which has a completely different semantic
7075# ./install, which can be erroneously created by make from ./install.sh.
7076# Reject install programs that cannot install multiple files.
7077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
7078$as_echo_n "checking for a BSD-compatible install... " >&6; }
7079if test -z "$INSTALL"; then
7080if test "${ac_cv_path_install+set}" = set; then :
7081 $as_echo_n "(cached) " >&6
7082else
7083 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7084for as_dir in $PATH
7085do
7086 IFS=$as_save_IFS
7087 test -z "$as_dir" && as_dir=.
7088 # Account for people who put trailing slashes in PATH elements.
7089case $as_dir/ in #((
7090 ./ | .// | /[cC]/* | \
7091 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
7092 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
7093 /usr/ucb/* ) ;;
7094 *)
7095 # OSF1 and SCO ODT 3.0 have their own names for install.
7096 # Don't use installbsd from OSF since it installs stuff as root
7097 # by default.
7098 for ac_prog in ginstall scoinst install; do
7099 for ac_exec_ext in '' $ac_executable_extensions; do
7100 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
7101 if test $ac_prog = install &&
7102 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7103 # AIX install. It has an incompatible calling convention.
7104 :
7105 elif test $ac_prog = install &&
7106 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7107 # program-specific install script used by HP pwplus--don't use.
7108 :
7109 else
7110 rm -rf conftest.one conftest.two conftest.dir
7111 echo one > conftest.one
7112 echo two > conftest.two
7113 mkdir conftest.dir
7114 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
7115 test -s conftest.one && test -s conftest.two &&
7116 test -s conftest.dir/conftest.one &&
7117 test -s conftest.dir/conftest.two
7118 then
7119 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
7120 break 3
7121 fi
7122 fi
7123 fi
7124 done
7125 done
7126 ;;
7127esac
7128
7129 done
7130IFS=$as_save_IFS
7131
7132rm -rf conftest.one conftest.two conftest.dir
7133
7134fi
7135 if test "${ac_cv_path_install+set}" = set; then
7136 INSTALL=$ac_cv_path_install
7137 else
7138 # As a last resort, use the slow shell script. Don't cache a
7139 # value for INSTALL within a source directory, because that will
7140 # break other packages using the cache if that directory is
7141 # removed, or if the value is a relative name.
7142 INSTALL=$ac_install_sh
7143 fi
7144fi
7145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
7146$as_echo "$INSTALL" >&6; }
7147
7148# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7149# It thinks the first close brace ends the variable substitution.
7150test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7151
7152test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
7153
7154test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
bec39cab 7155
81ecdfbb
RW
7156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7157$as_echo_n "checking whether ln -s works... " >&6; }
bec39cab
AC
7158LN_S=$as_ln_s
7159if test "$LN_S" = "ln -s"; then
81ecdfbb
RW
7160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7161$as_echo "yes" >&6; }
bec39cab 7162else
81ecdfbb
RW
7163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
7164$as_echo "no, using $LN_S" >&6; }
bec39cab
AC
7165fi
7166
7167if test -n "$ac_tool_prefix"; then
7168 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7169set dummy ${ac_tool_prefix}ranlib; ac_word=$2
81ecdfbb
RW
7170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7171$as_echo_n "checking for $ac_word... " >&6; }
7172if test "${ac_cv_prog_RANLIB+set}" = set; then :
7173 $as_echo_n "(cached) " >&6
bec39cab
AC
7174else
7175 if test -n "$RANLIB"; then
7176 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7177else
7178as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7179for as_dir in $PATH
7180do
7181 IFS=$as_save_IFS
7182 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7183 for ac_exec_ext in '' $ac_executable_extensions; do
7184 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7185 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
81ecdfbb 7186 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7187 break 2
7188 fi
7189done
81ecdfbb
RW
7190 done
7191IFS=$as_save_IFS
bec39cab
AC
7192
7193fi
7194fi
7195RANLIB=$ac_cv_prog_RANLIB
7196if test -n "$RANLIB"; then
81ecdfbb
RW
7197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
7198$as_echo "$RANLIB" >&6; }
bec39cab 7199else
81ecdfbb
RW
7200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7201$as_echo "no" >&6; }
bec39cab
AC
7202fi
7203
81ecdfbb 7204
bec39cab
AC
7205fi
7206if test -z "$ac_cv_prog_RANLIB"; then
7207 ac_ct_RANLIB=$RANLIB
7208 # Extract the first word of "ranlib", so it can be a program name with args.
7209set dummy ranlib; ac_word=$2
81ecdfbb
RW
7210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7211$as_echo_n "checking for $ac_word... " >&6; }
7212if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
7213 $as_echo_n "(cached) " >&6
bec39cab
AC
7214else
7215 if test -n "$ac_ct_RANLIB"; then
7216 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7217else
7218as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7219for as_dir in $PATH
7220do
7221 IFS=$as_save_IFS
7222 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7223 for ac_exec_ext in '' $ac_executable_extensions; do
7224 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7225 ac_cv_prog_ac_ct_RANLIB="ranlib"
81ecdfbb 7226 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7227 break 2
7228 fi
7229done
81ecdfbb
RW
7230 done
7231IFS=$as_save_IFS
bec39cab 7232
bec39cab
AC
7233fi
7234fi
7235ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7236if test -n "$ac_ct_RANLIB"; then
81ecdfbb
RW
7237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
7238$as_echo "$ac_ct_RANLIB" >&6; }
bec39cab 7239else
81ecdfbb
RW
7240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7241$as_echo "no" >&6; }
bec39cab
AC
7242fi
7243
81ecdfbb
RW
7244 if test "x$ac_ct_RANLIB" = x; then
7245 RANLIB=":"
7246 else
7247 case $cross_compiling:$ac_tool_warned in
7248yes:)
7249{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7250$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7251ac_tool_warned=yes ;;
7252esac
7253 RANLIB=$ac_ct_RANLIB
7254 fi
bec39cab
AC
7255else
7256 RANLIB="$ac_cv_prog_RANLIB"
7257fi
7258
7259for ac_prog in 'bison -y' byacc
7260do
7261 # Extract the first word of "$ac_prog", so it can be a program name with args.
7262set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
7263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7264$as_echo_n "checking for $ac_word... " >&6; }
7265if test "${ac_cv_prog_YACC+set}" = set; then :
7266 $as_echo_n "(cached) " >&6
bec39cab
AC
7267else
7268 if test -n "$YACC"; then
7269 ac_cv_prog_YACC="$YACC" # Let the user override the test.
7270else
7271as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7272for as_dir in $PATH
7273do
7274 IFS=$as_save_IFS
7275 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7276 for ac_exec_ext in '' $ac_executable_extensions; do
7277 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7278 ac_cv_prog_YACC="$ac_prog"
81ecdfbb 7279 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7280 break 2
7281 fi
7282done
81ecdfbb
RW
7283 done
7284IFS=$as_save_IFS
bec39cab
AC
7285
7286fi
7287fi
7288YACC=$ac_cv_prog_YACC
7289if test -n "$YACC"; then
81ecdfbb
RW
7290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
7291$as_echo "$YACC" >&6; }
bec39cab 7292else
81ecdfbb
RW
7293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7294$as_echo "no" >&6; }
bec39cab
AC
7295fi
7296
81ecdfbb 7297
bec39cab
AC
7298 test -n "$YACC" && break
7299done
7300test -n "$YACC" || YACC="yacc"
7301
7302
7303if test -n "$ac_tool_prefix"; then
7304 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
7305set dummy ${ac_tool_prefix}ar; ac_word=$2
81ecdfbb
RW
7306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7307$as_echo_n "checking for $ac_word... " >&6; }
7308if test "${ac_cv_prog_AR+set}" = set; then :
7309 $as_echo_n "(cached) " >&6
bec39cab
AC
7310else
7311 if test -n "$AR"; then
7312 ac_cv_prog_AR="$AR" # Let the user override the test.
7313else
7314as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7315for as_dir in $PATH
7316do
7317 IFS=$as_save_IFS
7318 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7319 for ac_exec_ext in '' $ac_executable_extensions; do
7320 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7321 ac_cv_prog_AR="${ac_tool_prefix}ar"
81ecdfbb 7322 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7323 break 2
7324 fi
7325done
81ecdfbb
RW
7326 done
7327IFS=$as_save_IFS
bec39cab
AC
7328
7329fi
7330fi
7331AR=$ac_cv_prog_AR
7332if test -n "$AR"; then
81ecdfbb
RW
7333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
7334$as_echo "$AR" >&6; }
bec39cab 7335else
81ecdfbb
RW
7336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7337$as_echo "no" >&6; }
bec39cab
AC
7338fi
7339
81ecdfbb 7340
bec39cab
AC
7341fi
7342if test -z "$ac_cv_prog_AR"; then
7343 ac_ct_AR=$AR
7344 # Extract the first word of "ar", so it can be a program name with args.
7345set dummy ar; ac_word=$2
81ecdfbb
RW
7346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7347$as_echo_n "checking for $ac_word... " >&6; }
7348if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
7349 $as_echo_n "(cached) " >&6
bec39cab
AC
7350else
7351 if test -n "$ac_ct_AR"; then
7352 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
7353else
7354as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7355for as_dir in $PATH
7356do
7357 IFS=$as_save_IFS
7358 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7359 for ac_exec_ext in '' $ac_executable_extensions; do
7360 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7361 ac_cv_prog_ac_ct_AR="ar"
81ecdfbb 7362 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7363 break 2
7364 fi
7365done
81ecdfbb
RW
7366 done
7367IFS=$as_save_IFS
bec39cab
AC
7368
7369fi
7370fi
7371ac_ct_AR=$ac_cv_prog_ac_ct_AR
7372if test -n "$ac_ct_AR"; then
81ecdfbb
RW
7373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
7374$as_echo "$ac_ct_AR" >&6; }
bec39cab 7375else
81ecdfbb
RW
7376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7377$as_echo "no" >&6; }
bec39cab
AC
7378fi
7379
81ecdfbb
RW
7380 if test "x$ac_ct_AR" = x; then
7381 AR=""
7382 else
7383 case $cross_compiling:$ac_tool_warned in
7384yes:)
7385{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7386$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7387ac_tool_warned=yes ;;
7388esac
7389 AR=$ac_ct_AR
7390 fi
bec39cab
AC
7391else
7392 AR="$ac_cv_prog_AR"
7393fi
7394
7395if test -n "$ac_tool_prefix"; then
7396 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
7397set dummy ${ac_tool_prefix}dlltool; ac_word=$2
81ecdfbb
RW
7398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7399$as_echo_n "checking for $ac_word... " >&6; }
7400if test "${ac_cv_prog_DLLTOOL+set}" = set; then :
7401 $as_echo_n "(cached) " >&6
bec39cab
AC
7402else
7403 if test -n "$DLLTOOL"; then
7404 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
7405else
7406as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7407for as_dir in $PATH
7408do
7409 IFS=$as_save_IFS
7410 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7411 for ac_exec_ext in '' $ac_executable_extensions; do
7412 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7413 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
81ecdfbb 7414 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7415 break 2
7416 fi
7417done
81ecdfbb
RW
7418 done
7419IFS=$as_save_IFS
bec39cab
AC
7420
7421fi
7422fi
7423DLLTOOL=$ac_cv_prog_DLLTOOL
7424if test -n "$DLLTOOL"; then
81ecdfbb
RW
7425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
7426$as_echo "$DLLTOOL" >&6; }
bec39cab 7427else
81ecdfbb
RW
7428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7429$as_echo "no" >&6; }
bec39cab
AC
7430fi
7431
81ecdfbb 7432
bec39cab
AC
7433fi
7434if test -z "$ac_cv_prog_DLLTOOL"; then
7435 ac_ct_DLLTOOL=$DLLTOOL
7436 # Extract the first word of "dlltool", so it can be a program name with args.
7437set dummy dlltool; ac_word=$2
81ecdfbb
RW
7438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7439$as_echo_n "checking for $ac_word... " >&6; }
7440if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then :
7441 $as_echo_n "(cached) " >&6
bec39cab
AC
7442else
7443 if test -n "$ac_ct_DLLTOOL"; then
7444 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
7445else
7446as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7447for as_dir in $PATH
7448do
7449 IFS=$as_save_IFS
7450 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7451 for ac_exec_ext in '' $ac_executable_extensions; do
7452 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7453 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
81ecdfbb 7454 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7455 break 2
7456 fi
7457done
81ecdfbb
RW
7458 done
7459IFS=$as_save_IFS
bec39cab
AC
7460
7461fi
7462fi
7463ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
7464if test -n "$ac_ct_DLLTOOL"; then
81ecdfbb
RW
7465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
7466$as_echo "$ac_ct_DLLTOOL" >&6; }
bec39cab 7467else
81ecdfbb
RW
7468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7469$as_echo "no" >&6; }
bec39cab
AC
7470fi
7471
81ecdfbb
RW
7472 if test "x$ac_ct_DLLTOOL" = x; then
7473 DLLTOOL=""
7474 else
7475 case $cross_compiling:$ac_tool_warned in
7476yes:)
7477{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7478$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7479ac_tool_warned=yes ;;
7480esac
7481 DLLTOOL=$ac_ct_DLLTOOL
7482 fi
bec39cab
AC
7483else
7484 DLLTOOL="$ac_cv_prog_DLLTOOL"
7485fi
7486
7487if test -n "$ac_tool_prefix"; then
7488 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
7489set dummy ${ac_tool_prefix}windres; ac_word=$2
81ecdfbb
RW
7490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7491$as_echo_n "checking for $ac_word... " >&6; }
7492if test "${ac_cv_prog_WINDRES+set}" = set; then :
7493 $as_echo_n "(cached) " >&6
bec39cab
AC
7494else
7495 if test -n "$WINDRES"; then
7496 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
7497else
7498as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7499for as_dir in $PATH
7500do
7501 IFS=$as_save_IFS
7502 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7503 for ac_exec_ext in '' $ac_executable_extensions; do
7504 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7505 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
81ecdfbb 7506 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7507 break 2
7508 fi
7509done
81ecdfbb
RW
7510 done
7511IFS=$as_save_IFS
bec39cab
AC
7512
7513fi
7514fi
7515WINDRES=$ac_cv_prog_WINDRES
7516if test -n "$WINDRES"; then
81ecdfbb
RW
7517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
7518$as_echo "$WINDRES" >&6; }
bec39cab 7519else
81ecdfbb
RW
7520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7521$as_echo "no" >&6; }
bec39cab
AC
7522fi
7523
81ecdfbb 7524
bec39cab
AC
7525fi
7526if test -z "$ac_cv_prog_WINDRES"; then
7527 ac_ct_WINDRES=$WINDRES
7528 # Extract the first word of "windres", so it can be a program name with args.
7529set dummy windres; ac_word=$2
81ecdfbb
RW
7530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7531$as_echo_n "checking for $ac_word... " >&6; }
7532if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then :
7533 $as_echo_n "(cached) " >&6
bec39cab
AC
7534else
7535 if test -n "$ac_ct_WINDRES"; then
7536 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
7537else
7538as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7539for as_dir in $PATH
7540do
7541 IFS=$as_save_IFS
7542 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7543 for ac_exec_ext in '' $ac_executable_extensions; do
7544 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7545 ac_cv_prog_ac_ct_WINDRES="windres"
81ecdfbb 7546 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7547 break 2
7548 fi
7549done
81ecdfbb
RW
7550 done
7551IFS=$as_save_IFS
bec39cab
AC
7552
7553fi
7554fi
7555ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
7556if test -n "$ac_ct_WINDRES"; then
81ecdfbb
RW
7557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
7558$as_echo "$ac_ct_WINDRES" >&6; }
bec39cab 7559else
81ecdfbb
RW
7560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7561$as_echo "no" >&6; }
c906108c 7562fi
bec39cab 7563
81ecdfbb
RW
7564 if test "x$ac_ct_WINDRES" = x; then
7565 WINDRES=""
7566 else
7567 case $cross_compiling:$ac_tool_warned in
7568yes:)
7569{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7570$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7571ac_tool_warned=yes ;;
7572esac
7573 WINDRES=$ac_ct_WINDRES
7574 fi
c906108c 7575else
bec39cab 7576 WINDRES="$ac_cv_prog_WINDRES"
c906108c
SS
7577fi
7578
bec39cab 7579
036c3acb
TS
7580case $host_os in
7581 gnu*)
7582 # Needed for GNU Hurd hosts.
7583 if test -n "$ac_tool_prefix"; then
bec39cab
AC
7584 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
7585set dummy ${ac_tool_prefix}mig; ac_word=$2
81ecdfbb
RW
7586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7587$as_echo_n "checking for $ac_word... " >&6; }
7588if test "${ac_cv_prog_MIG+set}" = set; then :
7589 $as_echo_n "(cached) " >&6
c906108c 7590else
bec39cab
AC
7591 if test -n "$MIG"; then
7592 ac_cv_prog_MIG="$MIG" # Let the user override the test.
7593else
7594as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7595for as_dir in $PATH
7596do
7597 IFS=$as_save_IFS
7598 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7599 for ac_exec_ext in '' $ac_executable_extensions; do
7600 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7601 ac_cv_prog_MIG="${ac_tool_prefix}mig"
81ecdfbb 7602 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7603 break 2
7604 fi
7605done
81ecdfbb
RW
7606 done
7607IFS=$as_save_IFS
bec39cab 7608
c906108c 7609fi
bec39cab
AC
7610fi
7611MIG=$ac_cv_prog_MIG
7612if test -n "$MIG"; then
81ecdfbb
RW
7613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
7614$as_echo "$MIG" >&6; }
c906108c 7615else
81ecdfbb
RW
7616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7617$as_echo "no" >&6; }
c906108c
SS
7618fi
7619
81ecdfbb 7620
bec39cab
AC
7621fi
7622if test -z "$ac_cv_prog_MIG"; then
7623 ac_ct_MIG=$MIG
7624 # Extract the first word of "mig", so it can be a program name with args.
7625set dummy mig; ac_word=$2
81ecdfbb
RW
7626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7627$as_echo_n "checking for $ac_word... " >&6; }
7628if test "${ac_cv_prog_ac_ct_MIG+set}" = set; then :
7629 $as_echo_n "(cached) " >&6
bec39cab
AC
7630else
7631 if test -n "$ac_ct_MIG"; then
7632 ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
7633else
7634as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7635for as_dir in $PATH
7636do
7637 IFS=$as_save_IFS
7638 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7639 for ac_exec_ext in '' $ac_executable_extensions; do
7640 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7641 ac_cv_prog_ac_ct_MIG="mig"
81ecdfbb 7642 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7643 break 2
7644 fi
7645done
81ecdfbb
RW
7646 done
7647IFS=$as_save_IFS
c906108c 7648
bec39cab
AC
7649fi
7650fi
7651ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
7652if test -n "$ac_ct_MIG"; then
81ecdfbb
RW
7653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
7654$as_echo "$ac_ct_MIG" >&6; }
bec39cab 7655else
81ecdfbb
RW
7656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7657$as_echo "no" >&6; }
bec39cab 7658fi
c906108c 7659
81ecdfbb
RW
7660 if test "x$ac_ct_MIG" = x; then
7661 MIG=""
7662 else
7663 case $cross_compiling:$ac_tool_warned in
7664yes:)
7665{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7666$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7667ac_tool_warned=yes ;;
7668esac
7669 MIG=$ac_ct_MIG
7670 fi
bec39cab
AC
7671else
7672 MIG="$ac_cv_prog_MIG"
7673fi
c906108c 7674
036c3acb
TS
7675 if test x"$MIG" = x; then
7676 as_fn_error "MIG not found but required for $host hosts" "$LINENO" 5
7677 fi
7678 ;;
7679esac
c906108c 7680
bec39cab
AC
7681# ---------------------- #
7682# Checks for libraries. #
7683# ---------------------- #
c906108c 7684
bec39cab 7685# We might need to link with -lm; most simulators need it.
81ecdfbb
RW
7686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
7687$as_echo_n "checking for main in -lm... " >&6; }
7688if test "${ac_cv_lib_m_main+set}" = set; then :
7689 $as_echo_n "(cached) " >&6
bec39cab
AC
7690else
7691 ac_check_lib_save_LIBS=$LIBS
7692LIBS="-lm $LIBS"
81ecdfbb 7693cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7694/* end confdefs.h. */
c906108c 7695
c906108c 7696
bec39cab
AC
7697int
7698main ()
7699{
81ecdfbb 7700return main ();
bec39cab
AC
7701 ;
7702 return 0;
7703}
7704_ACEOF
81ecdfbb 7705if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
7706 ac_cv_lib_m_main=yes
7707else
81ecdfbb 7708 ac_cv_lib_m_main=no
bec39cab 7709fi
81ecdfbb
RW
7710rm -f core conftest.err conftest.$ac_objext \
7711 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
7712LIBS=$ac_check_lib_save_LIBS
7713fi
81ecdfbb
RW
7714{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
7715$as_echo "$ac_cv_lib_m_main" >&6; }
7716if test "x$ac_cv_lib_m_main" = x""yes; then :
bec39cab
AC
7717 cat >>confdefs.h <<_ACEOF
7718#define HAVE_LIBM 1
7719_ACEOF
7720
7721 LIBS="-lm $LIBS"
c906108c 7722
c906108c 7723fi
bec39cab
AC
7724
7725
bec39cab 7726# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
81ecdfbb
RW
7727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
7728$as_echo_n "checking for library containing gethostbyname... " >&6; }
7729if test "${ac_cv_search_gethostbyname+set}" = set; then :
7730 $as_echo_n "(cached) " >&6
bec39cab
AC
7731else
7732 ac_func_search_save_LIBS=$LIBS
81ecdfbb 7733cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7734/* end confdefs.h. */
ddc9cd0f 7735
81ecdfbb
RW
7736/* Override any GCC internal prototype to avoid an error.
7737 Use char because int might match the return type of a GCC
7738 builtin and then its argument prototype would still apply. */
bec39cab
AC
7739#ifdef __cplusplus
7740extern "C"
7741#endif
bec39cab
AC
7742char gethostbyname ();
7743int
7744main ()
7745{
81ecdfbb 7746return gethostbyname ();
bec39cab
AC
7747 ;
7748 return 0;
7749}
7750_ACEOF
81ecdfbb
RW
7751for ac_lib in '' nsl; do
7752 if test -z "$ac_lib"; then
7753 ac_res="none required"
7754 else
7755 ac_res=-l$ac_lib
b4e70030 7756 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
7757 fi
7758 if ac_fn_c_try_link "$LINENO"; then :
7759 ac_cv_search_gethostbyname=$ac_res
7760fi
7761rm -f core conftest.err conftest.$ac_objext \
7762 conftest$ac_exeext
7763 if test "${ac_cv_search_gethostbyname+set}" = set; then :
7764 break
7765fi
7766done
7767if test "${ac_cv_search_gethostbyname+set}" = set; then :
ddc9cd0f 7768
bec39cab 7769else
81ecdfbb 7770 ac_cv_search_gethostbyname=no
bec39cab 7771fi
81ecdfbb 7772rm conftest.$ac_ext
bec39cab
AC
7773LIBS=$ac_func_search_save_LIBS
7774fi
81ecdfbb
RW
7775{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
7776$as_echo "$ac_cv_search_gethostbyname" >&6; }
7777ac_res=$ac_cv_search_gethostbyname
7778if test "$ac_res" != no; then :
7779 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
96baa820 7780
bec39cab 7781fi
96baa820 7782
c906108c 7783
b4e70030 7784# Some systems (e.g. Solaris) have `socketpair' in libsocket.
81ecdfbb
RW
7785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
7786$as_echo_n "checking for library containing socketpair... " >&6; }
7787if test "${ac_cv_search_socketpair+set}" = set; then :
7788 $as_echo_n "(cached) " >&6
b4e70030
JB
7789else
7790 ac_func_search_save_LIBS=$LIBS
81ecdfbb 7791cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
7792/* end confdefs.h. */
7793
81ecdfbb
RW
7794/* Override any GCC internal prototype to avoid an error.
7795 Use char because int might match the return type of a GCC
7796 builtin and then its argument prototype would still apply. */
b4e70030
JB
7797#ifdef __cplusplus
7798extern "C"
7799#endif
b4e70030
JB
7800char socketpair ();
7801int
7802main ()
7803{
81ecdfbb 7804return socketpair ();
b4e70030
JB
7805 ;
7806 return 0;
7807}
7808_ACEOF
81ecdfbb
RW
7809for ac_lib in '' socket; do
7810 if test -z "$ac_lib"; then
7811 ac_res="none required"
7812 else
7813 ac_res=-l$ac_lib
b4e70030 7814 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
7815 fi
7816 if ac_fn_c_try_link "$LINENO"; then :
7817 ac_cv_search_socketpair=$ac_res
7818fi
7819rm -f core conftest.err conftest.$ac_objext \
7820 conftest$ac_exeext
7821 if test "${ac_cv_search_socketpair+set}" = set; then :
7822 break
7823fi
7824done
7825if test "${ac_cv_search_socketpair+set}" = set; then :
b4e70030 7826
b4e70030 7827else
81ecdfbb 7828 ac_cv_search_socketpair=no
b4e70030 7829fi
81ecdfbb 7830rm conftest.$ac_ext
b4e70030
JB
7831LIBS=$ac_func_search_save_LIBS
7832fi
81ecdfbb
RW
7833{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
7834$as_echo "$ac_cv_search_socketpair" >&6; }
7835ac_res=$ac_cv_search_socketpair
7836if test "$ac_res" != no; then :
7837 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
b4e70030
JB
7838
7839fi
7840
7841
233a11ab 7842# Link in zlib if we can. This allows us to read compressed debug sections.
b040ad30 7843
711a72d3 7844 # Use the system's zlib library.
39f3de7c
L
7845 zlibdir="-L\$(top_builddir)/../zlib"
7846 zlibinc="-I\$(top_srcdir)/../zlib"
b040ad30 7847
711a72d3
L
7848# Check whether --with-system-zlib was given.
7849if test "${with_system_zlib+set}" = set; then :
afa59b79
L
7850 withval=$with_system_zlib; if test x$with_system_zlib = xyes ; then
7851 zlibdir=
7852 zlibinc=
7853 fi
b040ad30 7854
233a11ab 7855fi
233a11ab 7856
233a11ab 7857
233a11ab 7858
b040ad30 7859
233a11ab 7860
25268153 7861# On FreeBSD we may need libutil for kinfo_getvmmap (used by fbsd-nat.c).
37773e78 7862# On GNU/kFreeBSD systems, FreeBSD libutil is renamed to libutil-freebsd.
25268153
JB
7863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getvmmap" >&5
7864$as_echo_n "checking for library containing kinfo_getvmmap... " >&6; }
7865if test "${ac_cv_search_kinfo_getvmmap+set}" = set; then :
7866 $as_echo_n "(cached) " >&6
7867else
7868 ac_func_search_save_LIBS=$LIBS
7869cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7870/* end confdefs.h. */
7871
7872/* Override any GCC internal prototype to avoid an error.
7873 Use char because int might match the return type of a GCC
7874 builtin and then its argument prototype would still apply. */
7875#ifdef __cplusplus
7876extern "C"
7877#endif
7878char kinfo_getvmmap ();
7879int
7880main ()
7881{
7882return kinfo_getvmmap ();
7883 ;
7884 return 0;
7885}
7886_ACEOF
37773e78 7887for ac_lib in '' util util-freebsd; do
25268153
JB
7888 if test -z "$ac_lib"; then
7889 ac_res="none required"
7890 else
7891 ac_res=-l$ac_lib
7892 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7893 fi
7894 if ac_fn_c_try_link "$LINENO"; then :
7895 ac_cv_search_kinfo_getvmmap=$ac_res
7896fi
7897rm -f core conftest.err conftest.$ac_objext \
7898 conftest$ac_exeext
7899 if test "${ac_cv_search_kinfo_getvmmap+set}" = set; then :
7900 break
7901fi
7902done
7903if test "${ac_cv_search_kinfo_getvmmap+set}" = set; then :
7904
7905else
7906 ac_cv_search_kinfo_getvmmap=no
7907fi
7908rm conftest.$ac_ext
7909LIBS=$ac_func_search_save_LIBS
7910fi
7911{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getvmmap" >&5
7912$as_echo "$ac_cv_search_kinfo_getvmmap" >&6; }
7913ac_res=$ac_cv_search_kinfo_getvmmap
7914if test "$ac_res" != no; then :
7915 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7916
7917$as_echo "#define HAVE_KINFO_GETVMMAP 1" >>confdefs.h
7918
7919fi
7920
7921
77f120bf 7922
016a3251
DD
7923 if test "X$prefix" = "XNONE"; then
7924 acl_final_prefix="$ac_default_prefix"
7925 else
7926 acl_final_prefix="$prefix"
7927 fi
7928 if test "X$exec_prefix" = "XNONE"; then
7929 acl_final_exec_prefix='${prefix}'
7930 else
7931 acl_final_exec_prefix="$exec_prefix"
7932 fi
7933 acl_save_prefix="$prefix"
7934 prefix="$acl_final_prefix"
7935 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
7936 prefix="$acl_save_prefix"
7937
7938
7939# Check whether --with-gnu-ld was given.
7940if test "${with_gnu_ld+set}" = set; then :
7941 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
7942else
7943 with_gnu_ld=no
7944fi
7945
7946# Prepare PATH_SEPARATOR.
7947# The user is always right.
7948if test "${PATH_SEPARATOR+set}" != set; then
7949 echo "#! /bin/sh" >conf$$.sh
7950 echo "exit 0" >>conf$$.sh
7951 chmod +x conf$$.sh
7952 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
7953 PATH_SEPARATOR=';'
7954 else
7955 PATH_SEPARATOR=:
7956 fi
7957 rm -f conf$$.sh
7958fi
7959ac_prog=ld
7960if test "$GCC" = yes; then
7961 # Check if gcc -print-prog-name=ld gives a path.
7962 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
7963$as_echo_n "checking for ld used by GCC... " >&6; }
7964 case $host in
7965 *-*-mingw*)
7966 # gcc leaves a trailing carriage return which upsets mingw
7967 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
7968 *)
7969 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
7970 esac
7971 case $ac_prog in
7972 # Accept absolute paths.
7973 [\\/]* | [A-Za-z]:[\\/]*)
7974 re_direlt='/[^/][^/]*/\.\./'
7975 # Canonicalize the path of ld
7976 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
7977 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
7978 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
7979 done
7980 test -z "$LD" && LD="$ac_prog"
7981 ;;
7982 "")
7983 # If it fails, then pretend we aren't using GCC.
7984 ac_prog=ld
7985 ;;
7986 *)
7987 # If it is relative, then search for the first ld in PATH.
7988 with_gnu_ld=unknown
7989 ;;
7990 esac
7991elif test "$with_gnu_ld" = yes; then
7992 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
7993$as_echo_n "checking for GNU ld... " >&6; }
7994else
7995 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
7996$as_echo_n "checking for non-GNU ld... " >&6; }
7997fi
7998if test "${acl_cv_path_LD+set}" = set; then :
7999 $as_echo_n "(cached) " >&6
8000else
8001 if test -z "$LD"; then
8002 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
8003 for ac_dir in $PATH; do
8004 test -z "$ac_dir" && ac_dir=.
8005 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8006 acl_cv_path_LD="$ac_dir/$ac_prog"
8007 # Check to see if the program is GNU ld. I'd rather use --version,
8008 # but apparently some GNU ld's only accept -v.
8009 # Break only if it was the GNU/non-GNU ld that we prefer.
8010 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
8011 test "$with_gnu_ld" != no && break
8012 else
8013 test "$with_gnu_ld" != yes && break
8014 fi
8015 fi
8016 done
8017 IFS="$ac_save_ifs"
8018else
8019 acl_cv_path_LD="$LD" # Let the user override the test with a path.
8020fi
8021fi
8022
8023LD="$acl_cv_path_LD"
8024if test -n "$LD"; then
8025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8026$as_echo "$LD" >&6; }
8027else
8028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8029$as_echo "no" >&6; }
8030fi
8031test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
8032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8033$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
8034if test "${acl_cv_prog_gnu_ld+set}" = set; then :
8035 $as_echo_n "(cached) " >&6
8036else
8037 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
8038if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
8039 acl_cv_prog_gnu_ld=yes
8040else
8041 acl_cv_prog_gnu_ld=no
8042fi
8043fi
8044{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
8045$as_echo "$acl_cv_prog_gnu_ld" >&6; }
8046with_gnu_ld=$acl_cv_prog_gnu_ld
8047
8048
8049
8050 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
8051$as_echo_n "checking for shared library run path origin... " >&6; }
8052if test "${acl_cv_rpath+set}" = set; then :
8053 $as_echo_n "(cached) " >&6
8054else
8055
8056 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
8057 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
8058 . ./conftest.sh
8059 rm -f ./conftest.sh
8060 acl_cv_rpath=done
8061
8062fi
8063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
8064$as_echo "$acl_cv_rpath" >&6; }
8065 wl="$acl_cv_wl"
8066 libext="$acl_cv_libext"
8067 shlibext="$acl_cv_shlibext"
8068 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
8069 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
8070 hardcode_direct="$acl_cv_hardcode_direct"
8071 hardcode_minus_L="$acl_cv_hardcode_minus_L"
8072 # Check whether --enable-rpath was given.
8073if test "${enable_rpath+set}" = set; then :
8074 enableval=$enable_rpath; :
8075else
8076 enable_rpath=yes
8077fi
8078
8079
8080
8081
8082
8083
8084
8085
8086 use_additional=yes
8087
8088 acl_save_prefix="$prefix"
8089 prefix="$acl_final_prefix"
8090 acl_save_exec_prefix="$exec_prefix"
8091 exec_prefix="$acl_final_exec_prefix"
8092
8093 eval additional_includedir=\"$includedir\"
8094 eval additional_libdir=\"$libdir\"
8095
8096 exec_prefix="$acl_save_exec_prefix"
8097 prefix="$acl_save_prefix"
77f120bf 8098
6c7a06a3 8099
81ecdfbb
RW
8100# Check whether --with-libiconv-prefix was given.
8101if test "${with_libiconv_prefix+set}" = set; then :
8102 withval=$with_libiconv_prefix;
016a3251
DD
8103 if test "X$withval" = "Xno"; then
8104 use_additional=no
8105 else
8106 if test "X$withval" = "X"; then
8107
8108 acl_save_prefix="$prefix"
8109 prefix="$acl_final_prefix"
8110 acl_save_exec_prefix="$exec_prefix"
8111 exec_prefix="$acl_final_exec_prefix"
8112
8113 eval additional_includedir=\"$includedir\"
8114 eval additional_libdir=\"$libdir\"
8115
8116 exec_prefix="$acl_save_exec_prefix"
8117 prefix="$acl_save_prefix"
8118
8119 else
8120 additional_includedir="$withval/include"
8121 additional_libdir="$withval/lib"
8122 fi
8123 fi
6c7a06a3 8124
81ecdfbb
RW
8125fi
8126
016a3251
DD
8127 LIBICONV=
8128 LTLIBICONV=
8129 INCICONV=
8130 rpathdirs=
8131 ltrpathdirs=
8132 names_already_handled=
8133 names_next_round='iconv '
8134 while test -n "$names_next_round"; do
8135 names_this_round="$names_next_round"
8136 names_next_round=
8137 for name in $names_this_round; do
8138 already_handled=
8139 for n in $names_already_handled; do
8140 if test "$n" = "$name"; then
8141 already_handled=yes
8142 break
8143 fi
8144 done
8145 if test -z "$already_handled"; then
8146 names_already_handled="$names_already_handled $name"
8147 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
8148 eval value=\"\$HAVE_LIB$uppername\"
8149 if test -n "$value"; then
8150 if test "$value" = yes; then
8151 eval value=\"\$LIB$uppername\"
8152 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
8153 eval value=\"\$LTLIB$uppername\"
8154 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
8155 else
8156 :
8157 fi
8158 else
8159 found_dir=
8160 found_la=
8161 found_so=
8162 found_a=
8163 if test $use_additional = yes; then
8164 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
8165 found_dir="$additional_libdir"
8166 found_so="$additional_libdir/lib$name.$shlibext"
8167 if test -f "$additional_libdir/lib$name.la"; then
8168 found_la="$additional_libdir/lib$name.la"
8169 fi
8170 else
8171 if test -f "$additional_libdir/lib$name.$libext"; then
8172 found_dir="$additional_libdir"
8173 found_a="$additional_libdir/lib$name.$libext"
8174 if test -f "$additional_libdir/lib$name.la"; then
8175 found_la="$additional_libdir/lib$name.la"
8176 fi
8177 fi
8178 fi
8179 fi
8180 if test "X$found_dir" = "X"; then
8181 for x in $LDFLAGS $LTLIBICONV; do
8182
8183 acl_save_prefix="$prefix"
8184 prefix="$acl_final_prefix"
8185 acl_save_exec_prefix="$exec_prefix"
8186 exec_prefix="$acl_final_exec_prefix"
8187 eval x=\"$x\"
8188 exec_prefix="$acl_save_exec_prefix"
8189 prefix="$acl_save_prefix"
8190
8191 case "$x" in
8192 -L*)
8193 dir=`echo "X$x" | sed -e 's/^X-L//'`
8194 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
8195 found_dir="$dir"
8196 found_so="$dir/lib$name.$shlibext"
8197 if test -f "$dir/lib$name.la"; then
8198 found_la="$dir/lib$name.la"
8199 fi
8200 else
8201 if test -f "$dir/lib$name.$libext"; then
8202 found_dir="$dir"
8203 found_a="$dir/lib$name.$libext"
8204 if test -f "$dir/lib$name.la"; then
8205 found_la="$dir/lib$name.la"
8206 fi
8207 fi
8208 fi
8209 ;;
8210 esac
8211 if test "X$found_dir" != "X"; then
8212 break
8213 fi
8214 done
8215 fi
8216 if test "X$found_dir" != "X"; then
8217 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
8218 if test "X$found_so" != "X"; then
8219 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
8220 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8221 else
8222 haveit=
8223 for x in $ltrpathdirs; do
8224 if test "X$x" = "X$found_dir"; then
8225 haveit=yes
8226 break
8227 fi
8228 done
8229 if test -z "$haveit"; then
8230 ltrpathdirs="$ltrpathdirs $found_dir"
8231 fi
8232 if test "$hardcode_direct" = yes; then
8233 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8234 else
8235 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
8236 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8237 haveit=
8238 for x in $rpathdirs; do
8239 if test "X$x" = "X$found_dir"; then
8240 haveit=yes
8241 break
8242 fi
8243 done
8244 if test -z "$haveit"; then
8245 rpathdirs="$rpathdirs $found_dir"
8246 fi
8247 else
8248 haveit=
8249 for x in $LDFLAGS $LIBICONV; do
8250
8251 acl_save_prefix="$prefix"
8252 prefix="$acl_final_prefix"
8253 acl_save_exec_prefix="$exec_prefix"
8254 exec_prefix="$acl_final_exec_prefix"
8255 eval x=\"$x\"
8256 exec_prefix="$acl_save_exec_prefix"
8257 prefix="$acl_save_prefix"
8258
8259 if test "X$x" = "X-L$found_dir"; then
8260 haveit=yes
8261 break
8262 fi
8263 done
8264 if test -z "$haveit"; then
8265 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
8266 fi
8267 if test "$hardcode_minus_L" != no; then
8268 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8269 else
8270 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8271 fi
8272 fi
8273 fi
8274 fi
8275 else
8276 if test "X$found_a" != "X"; then
8277 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
8278 else
8279 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
8280 fi
8281 fi
8282 additional_includedir=
8283 case "$found_dir" in
8284 */lib | */lib/)
8285 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
8286 additional_includedir="$basedir/include"
8287 ;;
8288 esac
8289 if test "X$additional_includedir" != "X"; then
8290 if test "X$additional_includedir" != "X/usr/include"; then
8291 haveit=
8292 if test "X$additional_includedir" = "X/usr/local/include"; then
8293 if test -n "$GCC"; then
8294 case $host_os in
8295 linux*) haveit=yes;;
8296 esac
8297 fi
8298 fi
8299 if test -z "$haveit"; then
8300 for x in $CPPFLAGS $INCICONV; do
8301
8302 acl_save_prefix="$prefix"
8303 prefix="$acl_final_prefix"
8304 acl_save_exec_prefix="$exec_prefix"
8305 exec_prefix="$acl_final_exec_prefix"
8306 eval x=\"$x\"
8307 exec_prefix="$acl_save_exec_prefix"
8308 prefix="$acl_save_prefix"
8309
8310 if test "X$x" = "X-I$additional_includedir"; then
8311 haveit=yes
8312 break
8313 fi
8314 done
8315 if test -z "$haveit"; then
8316 if test -d "$additional_includedir"; then
8317 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
8318 fi
8319 fi
8320 fi
8321 fi
8322 fi
8323 if test -n "$found_la"; then
8324 save_libdir="$libdir"
8325 case "$found_la" in
8326 */* | *\\*) . "$found_la" ;;
8327 *) . "./$found_la" ;;
8328 esac
8329 libdir="$save_libdir"
8330 for dep in $dependency_libs; do
8331 case "$dep" in
8332 -L*)
8333 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
8334 if test "X$additional_libdir" != "X/usr/lib"; then
8335 haveit=
8336 if test "X$additional_libdir" = "X/usr/local/lib"; then
8337 if test -n "$GCC"; then
8338 case $host_os in
8339 linux*) haveit=yes;;
8340 esac
8341 fi
8342 fi
8343 if test -z "$haveit"; then
8344 haveit=
8345 for x in $LDFLAGS $LIBICONV; do
8346
8347 acl_save_prefix="$prefix"
8348 prefix="$acl_final_prefix"
8349 acl_save_exec_prefix="$exec_prefix"
8350 exec_prefix="$acl_final_exec_prefix"
8351 eval x=\"$x\"
8352 exec_prefix="$acl_save_exec_prefix"
8353 prefix="$acl_save_prefix"
8354
8355 if test "X$x" = "X-L$additional_libdir"; then
8356 haveit=yes
8357 break
8358 fi
8359 done
8360 if test -z "$haveit"; then
8361 if test -d "$additional_libdir"; then
8362 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
8363 fi
8364 fi
8365 haveit=
8366 for x in $LDFLAGS $LTLIBICONV; do
8367
8368 acl_save_prefix="$prefix"
8369 prefix="$acl_final_prefix"
8370 acl_save_exec_prefix="$exec_prefix"
8371 exec_prefix="$acl_final_exec_prefix"
8372 eval x=\"$x\"
8373 exec_prefix="$acl_save_exec_prefix"
8374 prefix="$acl_save_prefix"
8375
8376 if test "X$x" = "X-L$additional_libdir"; then
8377 haveit=yes
8378 break
8379 fi
8380 done
8381 if test -z "$haveit"; then
8382 if test -d "$additional_libdir"; then
8383 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
8384 fi
8385 fi
8386 fi
8387 fi
8388 ;;
8389 -R*)
8390 dir=`echo "X$dep" | sed -e 's/^X-R//'`
8391 if test "$enable_rpath" != no; then
8392 haveit=
8393 for x in $rpathdirs; do
8394 if test "X$x" = "X$dir"; then
8395 haveit=yes
8396 break
8397 fi
8398 done
8399 if test -z "$haveit"; then
8400 rpathdirs="$rpathdirs $dir"
8401 fi
8402 haveit=
8403 for x in $ltrpathdirs; do
8404 if test "X$x" = "X$dir"; then
8405 haveit=yes
8406 break
8407 fi
8408 done
8409 if test -z "$haveit"; then
8410 ltrpathdirs="$ltrpathdirs $dir"
8411 fi
8412 fi
8413 ;;
8414 -l*)
8415 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
8416 ;;
8417 *.la)
8418 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
8419 ;;
8420 *)
8421 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
8422 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
8423 ;;
8424 esac
8425 done
8426 fi
8427 else
8428 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8429 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
8430 fi
8431 fi
8432 fi
8433 done
8434 done
8435 if test "X$rpathdirs" != "X"; then
8436 if test -n "$hardcode_libdir_separator"; then
8437 alldirs=
8438 for found_dir in $rpathdirs; do
8439 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
8440 done
8441 acl_save_libdir="$libdir"
8442 libdir="$alldirs"
8443 eval flag=\"$hardcode_libdir_flag_spec\"
8444 libdir="$acl_save_libdir"
8445 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8446 else
8447 for found_dir in $rpathdirs; do
8448 acl_save_libdir="$libdir"
8449 libdir="$found_dir"
8450 eval flag=\"$hardcode_libdir_flag_spec\"
8451 libdir="$acl_save_libdir"
8452 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8453 done
8454 fi
8455 fi
8456 if test "X$ltrpathdirs" != "X"; then
8457 for found_dir in $ltrpathdirs; do
8458 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
8459 done
8460 fi
8461
8462
8463
8464
8465
6c7a06a3 8466
6c7a06a3 8467
81ecdfbb
RW
8468 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
8469$as_echo_n "checking for iconv... " >&6; }
8470if test "${am_cv_func_iconv+set}" = set; then :
8471 $as_echo_n "(cached) " >&6
d542061a 8472else
6c7a06a3
TT
8473
8474 am_cv_func_iconv="no, consider installing GNU libiconv"
8475 am_cv_lib_iconv=no
016a3251
DD
8476 am_save_CPPFLAGS="$CPPFLAGS"
8477 CPPFLAGS="$CPPFLAGS $INCICONV"
8478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 8479/* end confdefs.h. */
6c7a06a3
TT
8480#include <stdlib.h>
8481#include <iconv.h>
d542061a
UW
8482int
8483main ()
8484{
6c7a06a3 8485iconv_t cd = iconv_open("","");
016a3251
DD
8486 iconv(cd,NULL,NULL,NULL,NULL);
8487 iconv_close(cd);
d542061a
UW
8488 ;
8489 return 0;
8490}
8491_ACEOF
81ecdfbb 8492if ac_fn_c_try_link "$LINENO"; then :
016a3251 8493 am_cv_func_iconv=yes
d542061a 8494fi
81ecdfbb
RW
8495rm -f core conftest.err conftest.$ac_objext \
8496 conftest$ac_exeext conftest.$ac_ext
016a3251 8497 CPPFLAGS="$am_save_CPPFLAGS"
94ae1714 8498
016a3251
DD
8499 if test "$am_cv_func_iconv" != yes && test -d ../libiconv; then
8500 for _libs in .libs _libs; do
8501 am_save_CPPFLAGS="$CPPFLAGS"
8502 am_save_LIBS="$LIBS"
8503 CPPFLAGS="$CPPFLAGS -I../libiconv/include"
8504 LIBS="$LIBS ../libiconv/lib/$_libs/libiconv.a"
8505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 8506/* end confdefs.h. */
6c7a06a3
TT
8507#include <stdlib.h>
8508#include <iconv.h>
d542061a
UW
8509int
8510main ()
8511{
6c7a06a3 8512iconv_t cd = iconv_open("","");
016a3251
DD
8513 iconv(cd,NULL,NULL,NULL,NULL);
8514 iconv_close(cd);
d542061a
UW
8515 ;
8516 return 0;
8517}
8518_ACEOF
81ecdfbb 8519if ac_fn_c_try_link "$LINENO"; then :
016a3251
DD
8520 INCICONV="-I../libiconv/include"
8521 LIBICONV='${top_builddir}'/../libiconv/lib/$_libs/libiconv.a
8522 LTLIBICONV='${top_builddir}'/../libiconv/lib/libiconv.la
8523 am_cv_lib_iconv=yes
8524 am_cv_func_iconv=yes
d542061a 8525fi
81ecdfbb
RW
8526rm -f core conftest.err conftest.$ac_objext \
8527 conftest$ac_exeext conftest.$ac_ext
016a3251
DD
8528 CPPFLAGS="$am_save_CPPFLAGS"
8529 LIBS="$am_save_LIBS"
8530 if test "$am_cv_func_iconv" = "yes"; then
8531 break
8532 fi
8533 done
77f120bf 8534 fi
94ae1714 8535
4edb1e84 8536 if test "$am_cv_func_iconv" != yes; then
6c7a06a3 8537 am_save_CPPFLAGS="$CPPFLAGS"
4edb1e84 8538 am_save_LIBS="$LIBS"
016a3251
DD
8539 CPPFLAGS="$LIBS $INCICONV"
8540 LIBS="$LIBS $LIBICONV"
81ecdfbb 8541 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8542/* end confdefs.h. */
6c7a06a3
TT
8543#include <stdlib.h>
8544#include <iconv.h>
bec39cab
AC
8545int
8546main ()
8547{
6c7a06a3
TT
8548iconv_t cd = iconv_open("","");
8549 iconv(cd,NULL,NULL,NULL,NULL);
8550 iconv_close(cd);
bec39cab
AC
8551 ;
8552 return 0;
8553}
8554_ACEOF
81ecdfbb 8555if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 8556 am_cv_lib_iconv=yes
6c7a06a3 8557 am_cv_func_iconv=yes
627af7ea 8558fi
81ecdfbb
RW
8559rm -f core conftest.err conftest.$ac_objext \
8560 conftest$ac_exeext conftest.$ac_ext
fc3b640d 8561 CPPFLAGS="$am_save_CPPFLAGS"
016a3251 8562 LIBS="$am_save_LIBS"
6c7a06a3
TT
8563 fi
8564
8565fi
81ecdfbb
RW
8566{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
8567$as_echo "$am_cv_func_iconv" >&6; }
016a3251
DD
8568 if test "$am_cv_func_iconv" = yes; then
8569
8570$as_echo "#define HAVE_ICONV 1" >>confdefs.h
94ae1714 8571
016a3251 8572 fi
fc3b640d 8573 if test "$am_cv_lib_iconv" = yes; then
016a3251
DD
8574
8575 for element in $INCICONV; do
8576 haveit=
8577 for x in $CPPFLAGS; do
8578
8579 acl_save_prefix="$prefix"
8580 prefix="$acl_final_prefix"
8581 acl_save_exec_prefix="$exec_prefix"
8582 exec_prefix="$acl_final_exec_prefix"
8583 eval x=\"$x\"
8584 exec_prefix="$acl_save_exec_prefix"
8585 prefix="$acl_save_prefix"
8586
8587 if test "X$x" = "X$element"; then
8588 haveit=yes
8589 break
8590 fi
8591 done
8592 if test -z "$haveit"; then
8593 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
8594 fi
8595 done
8596
8597 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
8598$as_echo_n "checking how to link with libiconv... " >&6; }
8599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
8600$as_echo "$LIBICONV" >&6; }
94ae1714 8601 else
016a3251
DD
8602 LIBICONV=
8603 LTLIBICONV=
fc3b640d 8604 fi
94ae1714 8605
6c7a06a3 8606
6c7a06a3 8607
016a3251 8608 if test "$am_cv_func_iconv" = yes; then
81ecdfbb
RW
8609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
8610$as_echo_n "checking for iconv declaration... " >&6; }
8611 if test "${am_cv_proto_iconv+set}" = set; then :
8612 $as_echo_n "(cached) " >&6
6c7a06a3
TT
8613else
8614
81ecdfbb 8615 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
8616/* end confdefs.h. */
8617
6c7a06a3
TT
8618#include <stdlib.h>
8619#include <iconv.h>
8620extern
b4e70030 8621#ifdef __cplusplus
6c7a06a3 8622"C"
b4e70030 8623#endif
6c7a06a3
TT
8624#if defined(__STDC__) || defined(__cplusplus)
8625size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
8626#else
8627size_t iconv();
8628#endif
8629
b4e70030
JB
8630int
8631main ()
8632{
6c7a06a3 8633
b4e70030
JB
8634 ;
8635 return 0;
8636}
8637_ACEOF
81ecdfbb 8638if ac_fn_c_try_compile "$LINENO"; then :
6c7a06a3 8639 am_cv_proto_iconv_arg1=""
4e8d927d 8640else
81ecdfbb 8641 am_cv_proto_iconv_arg1="const"
b4e70030 8642fi
81ecdfbb 8643rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6c7a06a3
TT
8644 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);"
8645fi
8646
8647 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
81ecdfbb 8648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
6c7a06a3 8649 }$am_cv_proto_iconv" >&5
81ecdfbb
RW
8650$as_echo "${ac_t:-
8651 }$am_cv_proto_iconv" >&6; }
6c7a06a3
TT
8652
8653cat >>confdefs.h <<_ACEOF
8654#define ICONV_CONST $am_cv_proto_iconv_arg1
8655_ACEOF
8656
8657 fi
6c7a06a3
TT
8658
8659
478aac75
DE
8660# GDB may fork/exec the iconv program to get the list of supported character
8661# sets. Allow the user to specify where to find it.
8662# There are several factors affecting the choice of option name:
8663# - There is already --with-libiconv-prefix but we can't use it, it specifies
8664# the build-time location of libiconv files.
8665# - The program we need to find is iconv, which comes with glibc. The user
8666# doesn't necessarily have libiconv installed. Therefore naming this
8667# --with-libiconv-foo feels wrong.
8668# - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is
8669# defined to work on directories not files (though it really doesn't know
8670# the difference).
8671# - Calling this --with-iconv-prefix is perceived to cause too much confusion
8672# with --with-libiconv-prefix.
8673# Putting these together is why the option name is --with-iconv-bin.
8674
8675
8676# Check whether --with-iconv-bin was given.
8677if test "${with_iconv_bin+set}" = set; then :
8678 withval=$with_iconv_bin; iconv_bin="${withval}"
8679
8680cat >>confdefs.h <<_ACEOF
8681#define ICONV_BIN "${iconv_bin}"
8682_ACEOF
8683
8684
8685 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
8686 if test "x$prefix" = xNONE; then
8687 test_prefix=/usr/local
8688 else
8689 test_prefix=$prefix
8690 fi
8691 else
8692 test_prefix=$exec_prefix
8693 fi
8694 value=0
8695 case ${iconv_bin} in
8696 "${test_prefix}"|"${test_prefix}/"*|\
8697 '${exec_prefix}'|'${exec_prefix}/'*)
8698 value=1
8699 ;;
8700 esac
8701
8702cat >>confdefs.h <<_ACEOF
8703#define ICONV_BIN_RELOCATABLE $value
8704_ACEOF
8705
8706
8707
8708fi
8709
8710
cb01cfba 8711# For the TUI, we need enhanced curses functionality.
bd8a8e1b 8712if test x"$enable_tui" != xno; then
cb01cfba
JB
8713 prefer_curses=yes
8714fi
8715
8716curses_found=no
8717if test x"$prefer_curses" = xyes; then
8718 # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
8719 # curses library because the latter might not provide all the
8720 # functionality we need. However, this leads to problems on systems
8721 # where the linker searches /usr/local/lib, but the compiler doesn't
8722 # search /usr/local/include, if ncurses is installed in /usr/local. A
8723 # default installation of ncurses on alpha*-dec-osf* will lead to such
8724 # a situation.
81ecdfbb
RW
8725 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
8726$as_echo_n "checking for library containing waddstr... " >&6; }
8727if test "${ac_cv_search_waddstr+set}" = set; then :
8728 $as_echo_n "(cached) " >&6
6c7a06a3
TT
8729else
8730 ac_func_search_save_LIBS=$LIBS
81ecdfbb 8731cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
8732/* end confdefs.h. */
8733
81ecdfbb
RW
8734/* Override any GCC internal prototype to avoid an error.
8735 Use char because int might match the return type of a GCC
8736 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
8737#ifdef __cplusplus
8738extern "C"
8739#endif
6c7a06a3
TT
8740char waddstr ();
8741int
8742main ()
8743{
81ecdfbb 8744return waddstr ();
6c7a06a3
TT
8745 ;
8746 return 0;
8747}
8748_ACEOF
5007d765 8749for ac_lib in '' ncursesw ncurses cursesX curses; do
81ecdfbb
RW
8750 if test -z "$ac_lib"; then
8751 ac_res="none required"
8752 else
8753 ac_res=-l$ac_lib
8754 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8755 fi
8756 if ac_fn_c_try_link "$LINENO"; then :
8757 ac_cv_search_waddstr=$ac_res
8758fi
8759rm -f core conftest.err conftest.$ac_objext \
8760 conftest$ac_exeext
8761 if test "${ac_cv_search_waddstr+set}" = set; then :
8762 break
8763fi
8764done
8765if test "${ac_cv_search_waddstr+set}" = set; then :
8766
6c7a06a3 8767else
81ecdfbb
RW
8768 ac_cv_search_waddstr=no
8769fi
8770rm conftest.$ac_ext
8771LIBS=$ac_func_search_save_LIBS
8772fi
8773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
8774$as_echo "$ac_cv_search_waddstr" >&6; }
8775ac_res=$ac_cv_search_waddstr
8776if test "$ac_res" != no; then :
8777 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3
TT
8778
8779fi
8780
8781
cb01cfba
JB
8782 if test "$ac_cv_search_waddstr" != no; then
8783 curses_found=yes
8784 fi
8785fi
8786
8787# Check whether we should enable the TUI, but only do so if we really
8788# can.
8789if test x"$enable_tui" != xno; then
8790 if test -d $srcdir/tui; then
8791 if test "$curses_found" != no; then
6c7a06a3
TT
8792 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
8793 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
8794 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
8795 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
6c7a06a3
TT
8796 else
8797 if test x"$enable_tui" = xyes; then
81ecdfbb 8798 as_fn_error "no enhanced curses library found; disable TUI" "$LINENO" 5
6c7a06a3 8799 else
81ecdfbb
RW
8800 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
8801$as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
6c7a06a3
TT
8802 fi
8803 fi
8804 fi
8805fi
8806
8807# Since GDB uses Readline, we need termcap functionality. In many
8808# cases this will be provided by the curses library, but some systems
96fe4562 8809# have a separate termcap library, or no curses library at all.
6c7a06a3
TT
8810
8811case $host_os in
8812 cygwin*)
8813 if test -d $srcdir/libtermcap; then
8814 LIBS="../libtermcap/libtermcap.a $LIBS"
8815 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
8816 fi ;;
8817 go32* | *djgpp*)
8818 ac_cv_search_tgetent="none required"
8819 ;;
6c7a06a3
TT
8820esac
8821
8822# These are the libraries checked by Readline.
81ecdfbb
RW
8823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
8824$as_echo_n "checking for library containing tgetent... " >&6; }
8825if test "${ac_cv_search_tgetent+set}" = set; then :
8826 $as_echo_n "(cached) " >&6
6c7a06a3
TT
8827else
8828 ac_func_search_save_LIBS=$LIBS
81ecdfbb 8829cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
8830/* end confdefs.h. */
8831
81ecdfbb
RW
8832/* Override any GCC internal prototype to avoid an error.
8833 Use char because int might match the return type of a GCC
8834 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
8835#ifdef __cplusplus
8836extern "C"
8837#endif
6c7a06a3
TT
8838char tgetent ();
8839int
8840main ()
8841{
81ecdfbb 8842return tgetent ();
6c7a06a3
TT
8843 ;
8844 return 0;
8845}
8846_ACEOF
5007d765 8847for ac_lib in '' termcap tinfo curses ncursesw ncurses; do
81ecdfbb
RW
8848 if test -z "$ac_lib"; then
8849 ac_res="none required"
8850 else
8851 ac_res=-l$ac_lib
6c7a06a3 8852 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
8853 fi
8854 if ac_fn_c_try_link "$LINENO"; then :
8855 ac_cv_search_tgetent=$ac_res
8856fi
8857rm -f core conftest.err conftest.$ac_objext \
8858 conftest$ac_exeext
8859 if test "${ac_cv_search_tgetent+set}" = set; then :
8860 break
8861fi
8862done
8863if test "${ac_cv_search_tgetent+set}" = set; then :
6c7a06a3 8864
6c7a06a3 8865else
81ecdfbb 8866 ac_cv_search_tgetent=no
6c7a06a3 8867fi
81ecdfbb 8868rm conftest.$ac_ext
6c7a06a3
TT
8869LIBS=$ac_func_search_save_LIBS
8870fi
81ecdfbb
RW
8871{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
8872$as_echo "$ac_cv_search_tgetent" >&6; }
8873ac_res=$ac_cv_search_tgetent
8874if test "$ac_res" != no; then :
8875 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3 8876
06825bd1
MK
8877fi
8878
06825bd1 8879
bec39cab 8880if test "$ac_cv_search_tgetent" = no; then
7a85168d 8881 CONFIG_OBS="$CONFIG_OBS stub-termcap.o"
8ee53726
MK
8882fi
8883
3841debe 8884
81ecdfbb
RW
8885# Check whether --with-system-readline was given.
8886if test "${with_system_readline+set}" = set; then :
8887 withval=$with_system_readline;
8888fi
6a30b0a5 8889
6a30b0a5
AS
8890
8891if test "$with_system_readline" = yes; then
8892 READLINE=-lreadline
8893 READLINE_DEPS=
8894 READLINE_CFLAGS=
39037522 8895 READLINE_TEXI_INCFLAG=
6a30b0a5
AS
8896else
8897 READLINE='$(READLINE_DIR)/libreadline.a'
8898 READLINE_DEPS='$(READLINE)'
8899 READLINE_CFLAGS='-I$(READLINE_SRC)/..'
39037522 8900 READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
6a30b0a5
AS
8901fi
8902
8903
8904
8905
8906
f997c383
SD
8907# Generate jit-reader.h
8908
8909# This is typedeffed to GDB_CORE_ADDR in jit-reader.h
8910TARGET_PTR=
8911
8912# The cast to long int works around a bug in the HP C Compiler
8913# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8914# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8915# This bug is HP SR number 8606223364.
8916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5
8917$as_echo_n "checking size of unsigned long long... " >&6; }
8918if test "${ac_cv_sizeof_unsigned_long_long+set}" = set; then :
8919 $as_echo_n "(cached) " >&6
8920else
8921 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then :
8922
8923else
8924 if test "$ac_cv_type_unsigned_long_long" = yes; then
8925 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8926$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8927{ as_fn_set_status 77
8928as_fn_error "cannot compute sizeof (unsigned long long)
8929See \`config.log' for more details." "$LINENO" 5; }; }
8930 else
8931 ac_cv_sizeof_unsigned_long_long=0
8932 fi
8933fi
8934
8935fi
8936{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5
8937$as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; }
8938
8939
8940
8941cat >>confdefs.h <<_ACEOF
8942#define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
8943_ACEOF
8944
8945
8946# The cast to long int works around a bug in the HP C Compiler
8947# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8948# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8949# This bug is HP SR number 8606223364.
8950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
8951$as_echo_n "checking size of unsigned long... " >&6; }
8952if test "${ac_cv_sizeof_unsigned_long+set}" = set; then :
8953 $as_echo_n "(cached) " >&6
8954else
8955 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then :
8956
8957else
8958 if test "$ac_cv_type_unsigned_long" = yes; then
8959 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8960$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8961{ as_fn_set_status 77
8962as_fn_error "cannot compute sizeof (unsigned long)
8963See \`config.log' for more details." "$LINENO" 5; }; }
8964 else
8965 ac_cv_sizeof_unsigned_long=0
8966 fi
8967fi
8968
8969fi
8970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
8971$as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
8972
8973
8974
8975cat >>confdefs.h <<_ACEOF
8976#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
8977_ACEOF
8978
8979
8980# The cast to long int works around a bug in the HP C Compiler
8981# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8982# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8983# This bug is HP SR number 8606223364.
8984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5
8985$as_echo_n "checking size of unsigned __int128... " >&6; }
8986if test "${ac_cv_sizeof_unsigned___int128+set}" = set; then :
8987 $as_echo_n "(cached) " >&6
8988else
8989 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then :
8990
8991else
8992 if test "$ac_cv_type_unsigned___int128" = yes; then
8993 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8994$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8995{ as_fn_set_status 77
8996as_fn_error "cannot compute sizeof (unsigned __int128)
8997See \`config.log' for more details." "$LINENO" 5; }; }
8998 else
8999 ac_cv_sizeof_unsigned___int128=0
9000 fi
9001fi
9002
9003fi
9004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5
9005$as_echo "$ac_cv_sizeof_unsigned___int128" >&6; }
9006
9007
9008
9009cat >>confdefs.h <<_ACEOF
9010#define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128
9011_ACEOF
9012
9013
9014
9015if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
9016 TARGET_PTR="unsigned long"
9017elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
9018 TARGET_PTR="unsigned long long"
9019elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
9020 TARGET_PTR="unsigned __int128"
9021else
9022 TARGET_PTR="unsigned long"
9023fi
9024
9025
9026ac_config_files="$ac_config_files jit-reader.h:jit-reader.in"
9027
9028
a2d08b9e
SD
9029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
9030$as_echo_n "checking for library containing dlopen... " >&6; }
9031if test "${ac_cv_search_dlopen+set}" = set; then :
9032 $as_echo_n "(cached) " >&6
9033else
9034 ac_func_search_save_LIBS=$LIBS
9035cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9036/* end confdefs.h. */
9037
9038/* Override any GCC internal prototype to avoid an error.
9039 Use char because int might match the return type of a GCC
9040 builtin and then its argument prototype would still apply. */
9041#ifdef __cplusplus
9042extern "C"
9043#endif
9044char dlopen ();
9045int
9046main ()
9047{
9048return dlopen ();
9049 ;
9050 return 0;
9051}
9052_ACEOF
9053for ac_lib in '' dl; do
9054 if test -z "$ac_lib"; then
9055 ac_res="none required"
9056 else
9057 ac_res=-l$ac_lib
9058 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9059 fi
9060 if ac_fn_c_try_link "$LINENO"; then :
9061 ac_cv_search_dlopen=$ac_res
9062fi
9063rm -f core conftest.err conftest.$ac_objext \
9064 conftest$ac_exeext
9065 if test "${ac_cv_search_dlopen+set}" = set; then :
9066 break
9067fi
9068done
9069if test "${ac_cv_search_dlopen+set}" = set; then :
9070
9071else
9072 ac_cv_search_dlopen=no
9073fi
9074rm conftest.$ac_ext
9075LIBS=$ac_func_search_save_LIBS
9076fi
9077{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
9078$as_echo "$ac_cv_search_dlopen" >&6; }
9079ac_res=$ac_cv_search_dlopen
9080if test "$ac_res" != no; then :
9081 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9082
9083fi
9084
9085
39037522 9086
b8e0a31c
SD
9087
9088# Check whether --with-jit-reader-dir was given.
9089if test "${with_jit_reader_dir+set}" = set; then :
9090 withval=$with_jit_reader_dir;
9091 JIT_READER_DIR=$withval
9092else
9093 JIT_READER_DIR=${libdir}/gdb
9094fi
9095
9096
9097 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
9098 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9099 ac_define_dir=`eval echo $JIT_READER_DIR`
9100 ac_define_dir=`eval echo $ac_define_dir`
9101
9102cat >>confdefs.h <<_ACEOF
9103#define JIT_READER_DIR "$ac_define_dir"
9104_ACEOF
9105
9106
9107
9108
9109 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
9110 if test "x$prefix" = xNONE; then
9111 test_prefix=/usr/local
9112 else
9113 test_prefix=$prefix
9114 fi
9115 else
9116 test_prefix=$exec_prefix
9117 fi
9118 value=0
9119 case ${ac_define_dir} in
9120 "${test_prefix}"|"${test_prefix}/"*|\
9121 '${exec_prefix}'|'${exec_prefix}/'*)
9122 value=1
9123 ;;
9124 esac
9125
9126cat >>confdefs.h <<_ACEOF
9127#define JIT_READER_DIR_RELOCATABLE $value
9128_ACEOF
9129
9130
9131
9132
9133
81ecdfbb
RW
9134# Check whether --with-expat was given.
9135if test "${with_expat+set}" = set; then :
9136 withval=$with_expat;
5c39566f
DJ
9137else
9138 with_expat=auto
81ecdfbb
RW
9139fi
9140
9141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
9142$as_echo_n "checking whether to use expat... " >&6; }
9143{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
9144$as_echo "$with_expat" >&6; }
5c39566f
DJ
9145
9146if test "${with_expat}" = no; then
81ecdfbb
RW
9147 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
9148$as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
5c39566f
DJ
9149 HAVE_LIBEXPAT=no
9150else
9151
3841debe
DJ
9152
9153
9154
9155
9156
9157
9158
9159 use_additional=yes
9160
9161 acl_save_prefix="$prefix"
9162 prefix="$acl_final_prefix"
9163 acl_save_exec_prefix="$exec_prefix"
9164 exec_prefix="$acl_final_exec_prefix"
9165
9166 eval additional_includedir=\"$includedir\"
9167 eval additional_libdir=\"$libdir\"
9168
9169 exec_prefix="$acl_save_exec_prefix"
9170 prefix="$acl_save_prefix"
9171
9172
81ecdfbb
RW
9173# Check whether --with-libexpat-prefix was given.
9174if test "${with_libexpat_prefix+set}" = set; then :
9175 withval=$with_libexpat_prefix;
3841debe
DJ
9176 if test "X$withval" = "Xno"; then
9177 use_additional=no
9178 else
9179 if test "X$withval" = "X"; then
9180
9181 acl_save_prefix="$prefix"
9182 prefix="$acl_final_prefix"
9183 acl_save_exec_prefix="$exec_prefix"
9184 exec_prefix="$acl_final_exec_prefix"
9185
9186 eval additional_includedir=\"$includedir\"
9187 eval additional_libdir=\"$libdir\"
9188
9189 exec_prefix="$acl_save_exec_prefix"
9190 prefix="$acl_save_prefix"
9191
9192 else
9193 additional_includedir="$withval/include"
9194 additional_libdir="$withval/lib"
9195 fi
9196 fi
9197
81ecdfbb
RW
9198fi
9199
3841debe
DJ
9200 LIBEXPAT=
9201 LTLIBEXPAT=
9202 INCEXPAT=
9203 rpathdirs=
9204 ltrpathdirs=
9205 names_already_handled=
9206 names_next_round='expat '
9207 while test -n "$names_next_round"; do
9208 names_this_round="$names_next_round"
9209 names_next_round=
9210 for name in $names_this_round; do
9211 already_handled=
9212 for n in $names_already_handled; do
9213 if test "$n" = "$name"; then
9214 already_handled=yes
9215 break
9216 fi
9217 done
9218 if test -z "$already_handled"; then
9219 names_already_handled="$names_already_handled $name"
9220 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
9221 eval value=\"\$HAVE_LIB$uppername\"
9222 if test -n "$value"; then
9223 if test "$value" = yes; then
9224 eval value=\"\$LIB$uppername\"
9225 test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
9226 eval value=\"\$LTLIB$uppername\"
9227 test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
9228 else
9229 :
9230 fi
9231 else
9232 found_dir=
9233 found_la=
9234 found_so=
9235 found_a=
9236 if test $use_additional = yes; then
9237 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
9238 found_dir="$additional_libdir"
9239 found_so="$additional_libdir/lib$name.$shlibext"
9240 if test -f "$additional_libdir/lib$name.la"; then
9241 found_la="$additional_libdir/lib$name.la"
9242 fi
9243 else
9244 if test -f "$additional_libdir/lib$name.$libext"; then
9245 found_dir="$additional_libdir"
9246 found_a="$additional_libdir/lib$name.$libext"
9247 if test -f "$additional_libdir/lib$name.la"; then
9248 found_la="$additional_libdir/lib$name.la"
9249 fi
9250 fi
9251 fi
9252 fi
9253 if test "X$found_dir" = "X"; then
9254 for x in $LDFLAGS $LTLIBEXPAT; do
9255
9256 acl_save_prefix="$prefix"
9257 prefix="$acl_final_prefix"
9258 acl_save_exec_prefix="$exec_prefix"
9259 exec_prefix="$acl_final_exec_prefix"
9260 eval x=\"$x\"
9261 exec_prefix="$acl_save_exec_prefix"
9262 prefix="$acl_save_prefix"
9263
9264 case "$x" in
9265 -L*)
9266 dir=`echo "X$x" | sed -e 's/^X-L//'`
9267 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
9268 found_dir="$dir"
9269 found_so="$dir/lib$name.$shlibext"
9270 if test -f "$dir/lib$name.la"; then
9271 found_la="$dir/lib$name.la"
9272 fi
9273 else
9274 if test -f "$dir/lib$name.$libext"; then
9275 found_dir="$dir"
9276 found_a="$dir/lib$name.$libext"
9277 if test -f "$dir/lib$name.la"; then
9278 found_la="$dir/lib$name.la"
9279 fi
9280 fi
9281 fi
9282 ;;
9283 esac
9284 if test "X$found_dir" != "X"; then
9285 break
9286 fi
9287 done
9288 fi
9289 if test "X$found_dir" != "X"; then
9290 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
9291 if test "X$found_so" != "X"; then
9292 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
9293 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9294 else
9295 haveit=
9296 for x in $ltrpathdirs; do
9297 if test "X$x" = "X$found_dir"; then
9298 haveit=yes
9299 break
9300 fi
9301 done
9302 if test -z "$haveit"; then
9303 ltrpathdirs="$ltrpathdirs $found_dir"
9304 fi
9305 if test "$hardcode_direct" = yes; then
9306 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9307 else
9308 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
9309 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9310 haveit=
9311 for x in $rpathdirs; do
9312 if test "X$x" = "X$found_dir"; then
9313 haveit=yes
9314 break
9315 fi
9316 done
9317 if test -z "$haveit"; then
9318 rpathdirs="$rpathdirs $found_dir"
9319 fi
9320 else
9321 haveit=
9322 for x in $LDFLAGS $LIBEXPAT; do
9323
9324 acl_save_prefix="$prefix"
9325 prefix="$acl_final_prefix"
9326 acl_save_exec_prefix="$exec_prefix"
9327 exec_prefix="$acl_final_exec_prefix"
9328 eval x=\"$x\"
9329 exec_prefix="$acl_save_exec_prefix"
9330 prefix="$acl_save_prefix"
9331
9332 if test "X$x" = "X-L$found_dir"; then
9333 haveit=yes
9334 break
9335 fi
9336 done
9337 if test -z "$haveit"; then
9338 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
9339 fi
9340 if test "$hardcode_minus_L" != no; then
9341 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9342 else
9343 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9344 fi
9345 fi
9346 fi
9347 fi
9348 else
9349 if test "X$found_a" != "X"; then
9350 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
9351 else
9352 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
9353 fi
9354 fi
9355 additional_includedir=
9356 case "$found_dir" in
9357 */lib | */lib/)
9358 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
9359 additional_includedir="$basedir/include"
9360 ;;
9361 esac
9362 if test "X$additional_includedir" != "X"; then
9363 if test "X$additional_includedir" != "X/usr/include"; then
9364 haveit=
9365 if test "X$additional_includedir" = "X/usr/local/include"; then
9366 if test -n "$GCC"; then
9367 case $host_os in
9368 linux*) haveit=yes;;
9369 esac
9370 fi
9371 fi
9372 if test -z "$haveit"; then
9373 for x in $CPPFLAGS $INCEXPAT; do
9374
9375 acl_save_prefix="$prefix"
9376 prefix="$acl_final_prefix"
9377 acl_save_exec_prefix="$exec_prefix"
9378 exec_prefix="$acl_final_exec_prefix"
9379 eval x=\"$x\"
9380 exec_prefix="$acl_save_exec_prefix"
9381 prefix="$acl_save_prefix"
9382
9383 if test "X$x" = "X-I$additional_includedir"; then
9384 haveit=yes
9385 break
9386 fi
9387 done
9388 if test -z "$haveit"; then
9389 if test -d "$additional_includedir"; then
9390 INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
9391 fi
9392 fi
9393 fi
9394 fi
9395 fi
9396 if test -n "$found_la"; then
9397 save_libdir="$libdir"
9398 case "$found_la" in
9399 */* | *\\*) . "$found_la" ;;
9400 *) . "./$found_la" ;;
9401 esac
9402 libdir="$save_libdir"
9403 for dep in $dependency_libs; do
9404 case "$dep" in
9405 -L*)
9406 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
9407 if test "X$additional_libdir" != "X/usr/lib"; then
9408 haveit=
9409 if test "X$additional_libdir" = "X/usr/local/lib"; then
9410 if test -n "$GCC"; then
9411 case $host_os in
9412 linux*) haveit=yes;;
9413 esac
9414 fi
9415 fi
9416 if test -z "$haveit"; then
9417 haveit=
9418 for x in $LDFLAGS $LIBEXPAT; do
9419
9420 acl_save_prefix="$prefix"
9421 prefix="$acl_final_prefix"
9422 acl_save_exec_prefix="$exec_prefix"
9423 exec_prefix="$acl_final_exec_prefix"
9424 eval x=\"$x\"
9425 exec_prefix="$acl_save_exec_prefix"
9426 prefix="$acl_save_prefix"
9427
9428 if test "X$x" = "X-L$additional_libdir"; then
9429 haveit=yes
9430 break
9431 fi
9432 done
9433 if test -z "$haveit"; then
9434 if test -d "$additional_libdir"; then
9435 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
9436 fi
9437 fi
9438 haveit=
9439 for x in $LDFLAGS $LTLIBEXPAT; do
9440
9441 acl_save_prefix="$prefix"
9442 prefix="$acl_final_prefix"
9443 acl_save_exec_prefix="$exec_prefix"
9444 exec_prefix="$acl_final_exec_prefix"
9445 eval x=\"$x\"
9446 exec_prefix="$acl_save_exec_prefix"
9447 prefix="$acl_save_prefix"
9448
9449 if test "X$x" = "X-L$additional_libdir"; then
9450 haveit=yes
9451 break
9452 fi
9453 done
9454 if test -z "$haveit"; then
9455 if test -d "$additional_libdir"; then
9456 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
9457 fi
9458 fi
9459 fi
9460 fi
9461 ;;
9462 -R*)
9463 dir=`echo "X$dep" | sed -e 's/^X-R//'`
9464 if test "$enable_rpath" != no; then
9465 haveit=
9466 for x in $rpathdirs; do
9467 if test "X$x" = "X$dir"; then
9468 haveit=yes
9469 break
9470 fi
9471 done
9472 if test -z "$haveit"; then
9473 rpathdirs="$rpathdirs $dir"
9474 fi
9475 haveit=
9476 for x in $ltrpathdirs; do
9477 if test "X$x" = "X$dir"; then
9478 haveit=yes
9479 break
9480 fi
9481 done
9482 if test -z "$haveit"; then
9483 ltrpathdirs="$ltrpathdirs $dir"
9484 fi
9485 fi
9486 ;;
9487 -l*)
9488 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
9489 ;;
9490 *.la)
9491 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
9492 ;;
9493 *)
9494 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
9495 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
9496 ;;
81ecdfbb
RW
9497 esac
9498 done
9499 fi
9500 else
9501 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9502 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
9503 fi
9504 fi
9505 fi
9506 done
9507 done
9508 if test "X$rpathdirs" != "X"; then
9509 if test -n "$hardcode_libdir_separator"; then
9510 alldirs=
9511 for found_dir in $rpathdirs; do
9512 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
9513 done
9514 acl_save_libdir="$libdir"
9515 libdir="$alldirs"
9516 eval flag=\"$hardcode_libdir_flag_spec\"
9517 libdir="$acl_save_libdir"
9518 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9519 else
9520 for found_dir in $rpathdirs; do
9521 acl_save_libdir="$libdir"
9522 libdir="$found_dir"
9523 eval flag=\"$hardcode_libdir_flag_spec\"
9524 libdir="$acl_save_libdir"
9525 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9526 done
9527 fi
9528 fi
9529 if test "X$ltrpathdirs" != "X"; then
9530 for found_dir in $ltrpathdirs; do
9531 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
9532 done
9533 fi
a9322a30
TT
9534
9535
81ecdfbb 9536 ac_save_CPPFLAGS="$CPPFLAGS"
a9322a30 9537
81ecdfbb
RW
9538 for element in $INCEXPAT; do
9539 haveit=
9540 for x in $CPPFLAGS; do
a9322a30 9541
81ecdfbb
RW
9542 acl_save_prefix="$prefix"
9543 prefix="$acl_final_prefix"
9544 acl_save_exec_prefix="$exec_prefix"
9545 exec_prefix="$acl_final_exec_prefix"
9546 eval x=\"$x\"
9547 exec_prefix="$acl_save_exec_prefix"
9548 prefix="$acl_save_prefix"
a8111142 9549
81ecdfbb
RW
9550 if test "X$x" = "X$element"; then
9551 haveit=yes
9552 break
9553 fi
9554 done
9555 if test -z "$haveit"; then
9556 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
9557 fi
9558 done
a9322a30
TT
9559
9560
81ecdfbb
RW
9561 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
9562$as_echo_n "checking for libexpat... " >&6; }
9563if test "${ac_cv_libexpat+set}" = set; then :
9564 $as_echo_n "(cached) " >&6
bec39cab 9565else
bec39cab 9566
81ecdfbb
RW
9567 ac_save_LIBS="$LIBS"
9568 LIBS="$LIBS $LIBEXPAT"
9569 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9570/* end confdefs.h. */
81ecdfbb
RW
9571#include "expat.h"
9572int
9573main ()
9574{
9575XML_Parser p = XML_ParserCreate (0);
9576 ;
9577 return 0;
9578}
bec39cab 9579_ACEOF
81ecdfbb
RW
9580if ac_fn_c_try_link "$LINENO"; then :
9581 ac_cv_libexpat=yes
c906108c 9582else
81ecdfbb 9583 ac_cv_libexpat=no
bec39cab 9584fi
81ecdfbb
RW
9585rm -f core conftest.err conftest.$ac_objext \
9586 conftest$ac_exeext conftest.$ac_ext
9587 LIBS="$ac_save_LIBS"
c906108c 9588
95ca63c4 9589fi
81ecdfbb
RW
9590{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
9591$as_echo "$ac_cv_libexpat" >&6; }
9592 if test "$ac_cv_libexpat" = yes; then
9593 HAVE_LIBEXPAT=yes
bec39cab 9594
81ecdfbb 9595$as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
bec39cab 9596
81ecdfbb
RW
9597 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
9598$as_echo_n "checking how to link with libexpat... " >&6; }
9599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
9600$as_echo "$LIBEXPAT" >&6; }
9601 else
9602 HAVE_LIBEXPAT=no
9603 CPPFLAGS="$ac_save_CPPFLAGS"
9604 LIBEXPAT=
9605 LTLIBEXPAT=
9606 fi
95ca63c4
CF
9607
9608
9609
7cb9022a
MK
9610
9611
bec39cab 9612
81ecdfbb
RW
9613 if test "$HAVE_LIBEXPAT" != yes; then
9614 if test "$with_expat" = yes; then
9615 as_fn_error "expat is missing or unusable" "$LINENO" 5
9616 else
9617 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
9618$as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
9619 fi
9620 else
9621 save_LIBS=$LIBS
9622 LIBS="$LIBS $LIBEXPAT"
9623 for ac_func in XML_StopParser
9624do :
9625 ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
9626if test "x$ac_cv_func_XML_StopParser" = x""yes; then :
bec39cab 9627 cat >>confdefs.h <<_ACEOF
81ecdfbb 9628#define HAVE_XML_STOPPARSER 1
bec39cab 9629_ACEOF
95ca63c4 9630
bec39cab 9631fi
bec39cab 9632done
95ca63c4 9633
81ecdfbb
RW
9634 LIBS=$save_LIBS
9635 fi
a9322a30
TT
9636fi
9637
d344e670
DE
9638# --------------------- #
9639# Check for libpython. #
9640# --------------------- #
9641
a9322a30 9642
a9322a30
TT
9643
9644
ec685c5e 9645
0c4a4063 9646
81ecdfbb
RW
9647# Check whether --with-python was given.
9648if test "${with_python+set}" = set; then :
9649 withval=$with_python;
bec39cab 9650else
81ecdfbb 9651 with_python=auto
bec39cab 9652fi
bec39cab 9653
81ecdfbb
RW
9654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
9655$as_echo_n "checking whether to use python... " >&6; }
9656{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
9657$as_echo "$with_python" >&6; }
9a156167 9658
81ecdfbb
RW
9659if test "${with_python}" = no; then
9660 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
9661$as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
9662 have_libpython=no
bec39cab 9663else
81ecdfbb 9664 case "${with_python}" in
8c85a4e2 9665 [\\/]* | ?:[\\/]*)
ec685c5e
DE
9666 if test -d ${with_python}; then
9667 # Assume the python binary is ${with_python}/bin/python.
ec685c5e 9668 python_prog="${with_python}/bin/python"
0c4a4063 9669 python_prefix=
9c4ea6c5
JB
9670 # If python does not exit ${with_python}/bin, then try in
9671 # ${with_python}. On Windows/MinGW, this is where the Python
9672 # executable is.
9673 if test ! -x "${python_prog}"; then
9674 python_prog="${with_python}/python"
9675 python_prefix=
9676 fi
e7a30f46 9677 if test ! -x "${python_prog}"; then
ec685c5e
DE
9678 # Fall back to gdb 7.0/7.1 behaviour.
9679 python_prog=missing
0c4a4063 9680 python_prefix=${with_python}
ec685c5e 9681 fi
e7a30f46 9682 elif test -x "${with_python}"; then
ec685c5e
DE
9683 # While we can't run python compiled for $host (unless host == build),
9684 # the user could write a script that provides the needed information,
9685 # so we support that.
ec685c5e 9686 python_prog=${with_python}
0c4a4063 9687 python_prefix=
ec685c5e
DE
9688 else
9689 as_fn_error "invalid value for --with-python" "$LINENO" 5
9690 fi
81ecdfbb 9691 ;;
ec685c5e
DE
9692 */*)
9693 # Disallow --with-python=foo/bar.
81ecdfbb
RW
9694 as_fn_error "invalid value for --with-python" "$LINENO" 5
9695 ;;
ec685c5e
DE
9696 *)
9697 # The user has either specified auto, yes, or the name of the python
9698 # program assumed to be in $PATH.
9699 python_prefix=
9700 case "${with_python}" in
9701 yes | auto)
9702 if test ${build} = ${host}; then
9703 # Extract the first word of "python", so it can be a program name with args.
9704set dummy python; ac_word=$2
9705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9706$as_echo_n "checking for $ac_word... " >&6; }
9707if test "${ac_cv_path_python_prog_path+set}" = set; then :
9708 $as_echo_n "(cached) " >&6
9709else
9710 case $python_prog_path in
9711 [\\/]* | ?:[\\/]*)
9712 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
9713 ;;
9714 *)
9715 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9716for as_dir in $PATH
9717do
9718 IFS=$as_save_IFS
9719 test -z "$as_dir" && as_dir=.
9720 for ac_exec_ext in '' $ac_executable_extensions; do
9721 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9722 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
9723 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9724 break 2
9725 fi
9726done
9727 done
9728IFS=$as_save_IFS
9729
9730 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
9731 ;;
9732esac
9733fi
9734python_prog_path=$ac_cv_path_python_prog_path
9735if test -n "$python_prog_path"; then
9736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
9737$as_echo "$python_prog_path" >&6; }
9738else
9739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9740$as_echo "no" >&6; }
9741fi
9742
9743
9744 if test "${python_prog_path}" = missing; then
9745 python_prog=missing
9746 else
9747 python_prog=${python_prog_path}
9748 fi
9749 else
9750 # Not much we can do except assume the cross-compiler will find the
9751 # right files.
9752 python_prog=missing
9753 fi
9754 ;;
9755 *)
9756 # While we can't run python compiled for $host (unless host == build),
9757 # the user could write a script that provides the needed information,
9758 # so we support that.
9759 python_prog="${with_python}"
9760 # Extract the first word of "${python_prog}", so it can be a program name with args.
9761set dummy ${python_prog}; ac_word=$2
9762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9763$as_echo_n "checking for $ac_word... " >&6; }
9764if test "${ac_cv_path_python_prog_path+set}" = set; then :
9765 $as_echo_n "(cached) " >&6
9766else
9767 case $python_prog_path in
9768 [\\/]* | ?:[\\/]*)
9769 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
9770 ;;
9771 *)
9772 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9773for as_dir in $PATH
9774do
9775 IFS=$as_save_IFS
9776 test -z "$as_dir" && as_dir=.
9777 for ac_exec_ext in '' $ac_executable_extensions; do
9778 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9779 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
9780 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9781 break 2
9782 fi
9783done
9784 done
9785IFS=$as_save_IFS
9786
9787 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
9788 ;;
9789esac
9790fi
9791python_prog_path=$ac_cv_path_python_prog_path
9792if test -n "$python_prog_path"; then
9793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
9794$as_echo "$python_prog_path" >&6; }
9795else
9796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9797$as_echo "no" >&6; }
9798fi
9799
9800
9801 if test "${python_prog_path}" = missing; then
9802 as_fn_error "unable to find python program ${python_prog}" "$LINENO" 5
9803 fi
9804 ;;
9805 esac
81ecdfbb
RW
9806 esac
9807
ec685c5e 9808 if test "${python_prog}" != missing; then
e7a30f46
DE
9809 # We have a python program to use, but it may be too old.
9810 # Don't flag an error for --with-python=auto (the default).
9811 have_python_config=yes
ec685c5e
DE
9812 python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
9813 if test $? != 0; then
e7a30f46
DE
9814 have_python_config=failed
9815 if test "${with_python}" != auto; then
9816 as_fn_error "failure running python-config --includes" "$LINENO" 5
9817 fi
ec685c5e
DE
9818 fi
9819 python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
9820 if test $? != 0; then
e7a30f46
DE
9821 have_python_config=failed
9822 if test "${with_python}" != auto; then
9823 as_fn_error "failure running python-config --ldflags" "$LINENO" 5
9824 fi
ec685c5e 9825 fi
0c4a4063
DE
9826 python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
9827 if test $? != 0; then
e7a30f46
DE
9828 have_python_config=failed
9829 if test "${with_python}" != auto; then
9830 as_fn_error "failure running python-config --exec-prefix" "$LINENO" 5
9831 fi
0c4a4063 9832 fi
ec685c5e 9833 else
ac534cba
JB
9834 # We do not have a python executable we can use to determine where
9835 # to find the Python headers and libs. We cannot guess the include
9836 # path from the python_prefix either, because that include path
9837 # depends on the Python version. So, there is nothing much we can
9838 # do except assume that the compiler will be able to find those files.
9839 python_includes=
9840 python_libs=
0c4a4063 9841 have_python_config=no
ec685c5e 9842 fi
bec39cab 9843
ec685c5e
DE
9844 # If we have python-config, only try the configuration it provides.
9845 # Otherwise fallback on the old way of trying different versions of
9846 # python in turn.
81ecdfbb 9847
ec685c5e
DE
9848 have_libpython=no
9849 if test "${have_python_config}" = yes; then
c1039e3c
JB
9850 # Determine the Python version by extracting "-lpython<version>"
9851 # part of the python_libs. <version> is usually X.Y with X and Y
9852 # being decimal numbers, but can also be XY (seen on Windows).
9853 #
9854 # The extraction is performed using sed with a regular expression.
9855 # Initially, the regexp used was using the '?' quantifier to make
9856 # the dot in the version number optional. Unfortunately, this
9857 # does not work with non-GNU versions of sed because, because of
9858 # what looks like a limitation (the '?' quantifier does not work
9859 # with back-references). We work around this limitation by using
9860 # the '*' quantifier instead. It means that, in theory, we might
9861 # match unexpected version strings such as "-lpython2..7", but
9862 # this seems unlikely in practice. And even if that happens,
9863 # an error will be triggered later on, when checking that version
9864 # number.
ec685c5e 9865 python_version=`echo " ${python_libs} " \
c1039e3c 9866 | sed -e 's,^.* -l\(python[0-9]*[.]*[0-9]*\).*$,\1,'`
0c4a4063
DE
9867 case "${python_version}" in
9868 python*)
ec685c5e
DE
9869
9870 version=${python_version}
9871
9872 new_CPPFLAGS=${python_includes}
9873 new_LIBS=${python_libs}
81ecdfbb
RW
9874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
9875$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 9876 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 9877 save_LIBS=$LIBS
ec685c5e
DE
9878 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9879 LIBS="$LIBS $new_LIBS"
9880 found_usable_python=no
81ecdfbb 9881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9882/* end confdefs.h. */
ac534cba 9883#include "Python.h"
81ecdfbb
RW
9884int
9885main ()
9886{
9887Py_Initialize ();
9888 ;
9889 return 0;
9890}
bec39cab 9891_ACEOF
81ecdfbb 9892if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
9893 have_libpython=${version}
9894 found_usable_python=yes
ac534cba
JB
9895 PYTHON_CPPFLAGS=$new_CPPFLAGS
9896 PYTHON_LIBS=$new_LIBS
9a156167 9897fi
81ecdfbb
RW
9898rm -f core conftest.err conftest.$ac_objext \
9899 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
9900 CPPFLAGS=$save_CPPFLAGS
9901 LIBS=$save_LIBS
ec685c5e
DE
9902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
9903$as_echo "${found_usable_python}" >&6; }
9a156167 9904
0c4a4063
DE
9905 ;;
9906 *)
ec685c5e 9907 as_fn_error "unable to determine python version from ${python_libs}" "$LINENO" 5
0c4a4063
DE
9908 ;;
9909 esac
e7a30f46 9910 elif test "${have_python_config}" != failed; then
ec685c5e 9911 if test "${have_libpython}" = no; then
9a156167 9912
420697bb
TT
9913 version=python2.7
9914
9915 new_CPPFLAGS=${python_includes}
9916 new_LIBS="${python_libs} -lpython2.7"
9917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
9918$as_echo_n "checking for ${version}... " >&6; }
9919 save_CPPFLAGS=$CPPFLAGS
9920 save_LIBS=$LIBS
9921 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9922 LIBS="$LIBS $new_LIBS"
9923 found_usable_python=no
9924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9925/* end confdefs.h. */
ac534cba 9926#include "Python.h"
420697bb
TT
9927int
9928main ()
9929{
9930Py_Initialize ();
9931 ;
9932 return 0;
9933}
9934_ACEOF
9935if ac_fn_c_try_link "$LINENO"; then :
9936 have_libpython=${version}
9937 found_usable_python=yes
ac534cba
JB
9938 PYTHON_CPPFLAGS=$new_CPPFLAGS
9939 PYTHON_LIBS=$new_LIBS
420697bb
TT
9940fi
9941rm -f core conftest.err conftest.$ac_objext \
9942 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
9943 CPPFLAGS=$save_CPPFLAGS
9944 LIBS=$save_LIBS
420697bb
TT
9945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
9946$as_echo "${found_usable_python}" >&6; }
9947
9948 fi
9949 if test "${have_libpython}" = no; then
9950
ec685c5e
DE
9951 version=python2.6
9952
9953 new_CPPFLAGS=${python_includes}
9954 new_LIBS="${python_libs} -lpython2.6"
9955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
9956$as_echo_n "checking for ${version}... " >&6; }
9957 save_CPPFLAGS=$CPPFLAGS
9958 save_LIBS=$LIBS
9959 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9960 LIBS="$LIBS $new_LIBS"
9961 found_usable_python=no
9962 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9963/* end confdefs.h. */
ac534cba 9964#include "Python.h"
ec685c5e
DE
9965int
9966main ()
9967{
9968Py_Initialize ();
9969 ;
9970 return 0;
9971}
9972_ACEOF
9973if ac_fn_c_try_link "$LINENO"; then :
9974 have_libpython=${version}
9975 found_usable_python=yes
ac534cba
JB
9976 PYTHON_CPPFLAGS=$new_CPPFLAGS
9977 PYTHON_LIBS=$new_LIBS
ec685c5e
DE
9978fi
9979rm -f core conftest.err conftest.$ac_objext \
9980 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
9981 CPPFLAGS=$save_CPPFLAGS
9982 LIBS=$save_LIBS
ec685c5e
DE
9983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
9984$as_echo "${found_usable_python}" >&6; }
9a156167 9985
81ecdfbb 9986 fi
ec685c5e 9987 if test ${have_libpython} = no; then
9a156167 9988
81ecdfbb 9989 version=python2.5
9a156167 9990
ec685c5e
DE
9991 new_CPPFLAGS=${python_includes}
9992 new_LIBS="${python_libs} -lpython2.5"
81ecdfbb
RW
9993 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
9994$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 9995 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 9996 save_LIBS=$LIBS
ec685c5e
DE
9997 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9998 LIBS="$LIBS $new_LIBS"
9999 found_usable_python=no
81ecdfbb 10000 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 10001/* end confdefs.h. */
ac534cba 10002#include "Python.h"
81ecdfbb
RW
10003int
10004main ()
10005{
10006Py_Initialize ();
10007 ;
10008 return 0;
10009}
436868fb 10010_ACEOF
81ecdfbb 10011if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
10012 have_libpython=${version}
10013 found_usable_python=yes
ac534cba
JB
10014 PYTHON_CPPFLAGS=$new_CPPFLAGS
10015 PYTHON_LIBS=$new_LIBS
436868fb 10016fi
81ecdfbb
RW
10017rm -f core conftest.err conftest.$ac_objext \
10018 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10019 CPPFLAGS=$save_CPPFLAGS
10020 LIBS=$save_LIBS
ec685c5e
DE
10021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10022$as_echo "${found_usable_python}" >&6; }
a9322a30 10023
81ecdfbb 10024 fi
ec685c5e 10025 if test ${have_libpython} = no; then
a9322a30 10026
81ecdfbb 10027 version=python2.4
a9322a30 10028
ec685c5e
DE
10029 new_CPPFLAGS=${python_includes}
10030 new_LIBS="${python_libs} -lpython2.4"
81ecdfbb
RW
10031 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10032$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 10033 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 10034 save_LIBS=$LIBS
ec685c5e
DE
10035 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10036 LIBS="$LIBS $new_LIBS"
10037 found_usable_python=no
81ecdfbb 10038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 10039/* end confdefs.h. */
ac534cba 10040#include "Python.h"
a9322a30
TT
10041int
10042main ()
10043{
81ecdfbb 10044Py_Initialize ();
a9322a30
TT
10045 ;
10046 return 0;
10047}
436868fb 10048_ACEOF
81ecdfbb 10049if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
10050 have_libpython=${version}
10051 found_usable_python=yes
ac534cba
JB
10052 PYTHON_CPPFLAGS=$new_CPPFLAGS
10053 PYTHON_LIBS=$new_LIBS
436868fb 10054fi
81ecdfbb
RW
10055rm -f core conftest.err conftest.$ac_objext \
10056 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10057 CPPFLAGS=$save_CPPFLAGS
10058 LIBS=$save_LIBS
ec685c5e
DE
10059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10060$as_echo "${found_usable_python}" >&6; }
81ecdfbb 10061
ec685c5e
DE
10062 fi
10063 fi
9c4ea6c5 10064 if test "${have_libpython}" = python2.7 -o "${have_libpython}" = python27; then
11763c18
TT
10065
10066$as_echo "#define HAVE_LIBPYTHON2_7 1" >>confdefs.h
10067
9c4ea6c5 10068 elif test "${have_libpython}" = python2.6 -o "${have_libpython}" = python26; then
ec685c5e
DE
10069
10070$as_echo "#define HAVE_LIBPYTHON2_6 1" >>confdefs.h
10071
9c4ea6c5 10072 elif test "${have_libpython}" = python2.5 -o "${have_libpython}" = python25; then
ec685c5e
DE
10073
10074$as_echo "#define HAVE_LIBPYTHON2_5 1" >>confdefs.h
10075
9c4ea6c5 10076 elif test "${have_libpython}" = python2.4 -o "${have_libpython}" = python24; then
81ecdfbb
RW
10077
10078$as_echo "#define HAVE_LIBPYTHON2_4 1" >>confdefs.h
10079
81ecdfbb 10080 fi
ec685c5e
DE
10081
10082 if test "${have_libpython}" = no; then
81ecdfbb
RW
10083 case "${with_python}" in
10084 yes)
10085 as_fn_error "python is missing or unusable" "$LINENO" 5
10086 ;;
10087 auto)
10088 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
10089$as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
10090 ;;
10091 *)
10092 as_fn_error "no usable python found at ${with_python}" "$LINENO" 5
10093 ;;
10094 esac
0c4a4063
DE
10095 else
10096 if test -n "${python_prefix}"; then
10097
10098cat >>confdefs.h <<_ACEOF
10099#define WITH_PYTHON_PATH "${python_prefix}"
10100_ACEOF
10101
10102
10103 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
10104 if test "x$prefix" = xNONE; then
10105 test_prefix=/usr/local
10106 else
10107 test_prefix=$prefix
10108 fi
10109 else
10110 test_prefix=$exec_prefix
10111 fi
10112 value=0
10113 case ${python_prefix} in
10114 "${test_prefix}"|"${test_prefix}/"*|\
10115 '${exec_prefix}'|'${exec_prefix}/'*)
10116 value=1
10117 ;;
10118 esac
10119
10120cat >>confdefs.h <<_ACEOF
10121#define PYTHON_PATH_RELOCATABLE $value
10122_ACEOF
10123
10124
10125 fi
81ecdfbb 10126 fi
436868fb 10127fi
436868fb 10128
ec685c5e 10129if test "${have_libpython}" != no; then
436868fb 10130
81ecdfbb 10131$as_echo "#define HAVE_PYTHON 1" >>confdefs.h
436868fb 10132
81ecdfbb
RW
10133 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
10134 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
10135 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
94f7449c 10136 CONFIG_INSTALL="$CONFIG_INSTALL install-python"
81ecdfbb 10137 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
436868fb 10138
81ecdfbb
RW
10139 # Flags needed to compile Python code (taken from python-config --cflags).
10140 # We cannot call python-config directly because it will output whatever was
10141 # used when compiling the Python interpreter itself, including flags which
10142 # would make the python-related objects be compiled differently from the
10143 # rest of GDB (e.g., -O2 and -fPIC).
10144 if test "${GCC}" = yes; then
10145 tentative_python_cflags="-fno-strict-aliasing -DNDEBUG -fwrapv"
10146 fi
436868fb 10147
81ecdfbb
RW
10148 if test "x${tentative_python_cflags}" != x; then
10149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
10150$as_echo_n "checking compiler flags for python code... " >&6; }
10151 for flag in ${tentative_python_cflags}; do
10152 # Check that the compiler accepts it
10153 saved_CFLAGS="$CFLAGS"
10154 CFLAGS="$CFLAGS $flag"
10155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10156/* end confdefs.h. */
81ecdfbb 10157
a9322a30
TT
10158int
10159main ()
10160{
a9322a30
TT
10161
10162 ;
10163 return 0;
10164}
bec39cab 10165_ACEOF
81ecdfbb
RW
10166if ac_fn_c_try_compile "$LINENO"; then :
10167 PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
bec39cab 10168fi
81ecdfbb
RW
10169rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10170 CFLAGS="$saved_CFLAGS"
10171 done
10172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
10173$as_echo "${PYTHON_CFLAGS}" >&6; }
10174 fi
043b6510 10175
c83393b9
JB
10176 # On x64 Windows, Python's include headers, and pyconfig.h in
10177 # particular, rely on MS_WIN64 macro to detect that it's a 64bit
10178 # version of Windows. Unfortunately, MS_WIN64 is only defined if
10179 # _MSC_VER, a Microsoft-specific macro, is defined. So, when
10180 # building on x64 Windows with GCC, we define MS_WIN64 ourselves.
10181 # The issue was reported to the Python community, but still isn't
10182 # solved as of 2012-10-02 (http://bugs.python.org/issue4709).
10183
043b6510 10184 case "$gdb_host" in
c83393b9
JB
10185 mingw64)
10186 if test "${GCC}" = yes; then
10187 CPPFLAGS="$CPPFLAGS -DMS_WIN64"
10188 fi
10189 ;;
043b6510 10190 esac
a8db4212
YPK
10191
10192 # Note that "python -m threading" cannot be used to check for
10193 # threading support due to a bug in Python 2.7.3
10194 # (http://bugs.python.org/issue15567).
10195 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether python supports threads" >&5
10196$as_echo_n "checking whether python supports threads... " >&6; }
10197 saved_CPPFLAGS="${CPPFLAGS}"
10198 CPPFLAGS="${PYTHON_CPPFLAGS}"
10199 # Note that the test is reversed so that python_has_threads=yes on
10200 # unexpected failures.
10201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10202/* end confdefs.h. */
10203
10204#include <Python.h>
10205#ifdef WITH_THREAD
10206# error
10207#endif
10208
10209_ACEOF
10210if ac_fn_c_try_cpp "$LINENO"; then :
10211 python_has_threads=no
10212else
10213 python_has_threads=yes
10214fi
10215rm -f conftest.err conftest.$ac_ext
10216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_has_threads}" >&5
10217$as_echo "${python_has_threads}" >&6; }
10218 CPPFLAGS="${saved_CPPFLAGS}"
81ecdfbb 10219else
6dddc817
DE
10220 # Even if Python support is not compiled in, we need to have this file
10221 # included so that the "python" command, et.al., still exists.
10222 CONFIG_OBS="$CONFIG_OBS python.o"
10223 CONFIG_SRCS="$CONFIG_SRCS python/python.c"
a9322a30 10224fi
9a156167 10225
a4a1c157
PA
10226# Work around Python http://bugs.python.org/issue10112. See also
10227# http://bugs.python.org/issue11410, otherwise -Wl,--dynamic-list has
10228# no effect. Note that the only test after this that uses Python is
10229# the -rdynamic/-Wl,--dynamic-list test, and we do want that one to be
10230# run without -export-dynamic too.
10231PYTHON_LIBS=`echo $PYTHON_LIBS | sed -e 's/-Xlinker -export-dynamic//'`
10232
10233
ed3ef339
DE
10234
10235
4df42755
DE
10236 if test "${have_libpython}" != no; then
10237 HAVE_PYTHON_TRUE=
10238 HAVE_PYTHON_FALSE='#'
10239else
10240 HAVE_PYTHON_TRUE='#'
10241 HAVE_PYTHON_FALSE=
10242fi
10243
ed3ef339
DE
10244
10245# -------------------- #
10246# Check for libguile. #
10247# -------------------- #
10248
10249
e1402065
DE
10250
10251
10252
10253
10254# Check whether --with-guile was given.
10255if test "${with_guile+set}" = set; then :
10256 withval=$with_guile;
10257else
10258 with_guile=auto
10259fi
10260
10261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use guile" >&5
10262$as_echo_n "checking whether to use guile... " >&6; }
10263{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_guile" >&5
10264$as_echo "$with_guile" >&6; }
10265
ed3ef339
DE
10266# Extract the first word of "pkg-config", so it can be a program name with args.
10267set dummy pkg-config; ac_word=$2
10268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10269$as_echo_n "checking for $ac_word... " >&6; }
10270if test "${ac_cv_path_pkg_config_prog_path+set}" = set; then :
10271 $as_echo_n "(cached) " >&6
10272else
10273 case $pkg_config_prog_path in
10274 [\\/]* | ?:[\\/]*)
10275 ac_cv_path_pkg_config_prog_path="$pkg_config_prog_path" # Let the user override the test with a path.
10276 ;;
10277 *)
10278 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10279for as_dir in $PATH
10280do
10281 IFS=$as_save_IFS
10282 test -z "$as_dir" && as_dir=.
10283 for ac_exec_ext in '' $ac_executable_extensions; do
10284 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10285 ac_cv_path_pkg_config_prog_path="$as_dir/$ac_word$ac_exec_ext"
10286 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10287 break 2
10288 fi
10289done
10290 done
10291IFS=$as_save_IFS
10292
10293 test -z "$ac_cv_path_pkg_config_prog_path" && ac_cv_path_pkg_config_prog_path="missing"
10294 ;;
10295esac
10296fi
10297pkg_config_prog_path=$ac_cv_path_pkg_config_prog_path
10298if test -n "$pkg_config_prog_path"; then
10299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config_prog_path" >&5
10300$as_echo "$pkg_config_prog_path" >&6; }
10301else
10302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10303$as_echo "no" >&6; }
10304fi
10305
10306
10307
214ab2da 10308try_guile_versions="guile-2.2 guile-2.0"
ed3ef339
DE
10309have_libguile=no
10310case "${with_guile}" in
10311no)
10312 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: guile support disabled; some features will be unavailable." >&5
10313$as_echo "$as_me: WARNING: guile support disabled; some features will be unavailable." >&2;}
10314 ;;
10315auto)
e1402065
DE
10316 if test "${pkg_config_prog_path}" = "missing"; then
10317 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found, guile support disabled" >&5
10318$as_echo "$as_me: WARNING: pkg-config not found, guile support disabled" >&2;}
10319 else
ed3ef339
DE
10320
10321 pkg_config=${pkg_config_prog_path}
10322 guile_version_list=${try_guile_versions}
10323 flag_errors=no
10324
ed3ef339
DE
10325 found_usable_guile=checking
10326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
10327$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
10328 for guile_version in ${guile_version_list}; do
10329 ${pkg_config} --exists ${guile_version} 2>/dev/null
10330 if test $? != 0; then
10331 continue
10332 fi
10333 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
10334 if test $? != 0; then
10335 as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
10336 fi
10337 new_LIBS=`${pkg_config} --libs ${guile_version}`
10338 if test $? != 0; then
10339 as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
10340 fi
10341 found_usable_guile=${guile_version}
10342 break
10343 done
10344 if test "${found_usable_guile}" = "checking"; then
10345 if test "${flag_errors}" = "yes"; then
10346 as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
10347 else
10348 found_usable_guile=no
10349 fi
10350 fi
10351 if test "${found_usable_guile}" != no; then
10352 save_CPPFLAGS=$CPPFLAGS
10353 save_LIBS=$LIBS
10354 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10355 LIBS="$LIBS $new_LIBS"
10356 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10357/* end confdefs.h. */
10358#include "libguile.h"
10359int
10360main ()
10361{
10362scm_init_guile ();
10363 ;
10364 return 0;
10365}
10366_ACEOF
10367if ac_fn_c_try_link "$LINENO"; then :
10368 have_libguile=yes
10369 GUILE_CPPFLAGS=$new_CPPFLAGS
10370 GUILE_LIBS=$new_LIBS
10371else
10372 found_usable_guile=no
10373fi
10374rm -f core conftest.err conftest.$ac_objext \
10375 conftest$ac_exeext conftest.$ac_ext
92fab5a6
AW
10376 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
10377if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then :
10378
10379$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
10380
10381
10382fi
10383
ed3ef339
DE
10384 CPPFLAGS=$save_CPPFLAGS
10385 LIBS=$save_LIBS
10386 if test "${found_usable_guile}" = no; then
10387 if test "${flag_errors}" = yes; then
10388 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10389$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10390as_fn_error "linking guile version ${guile_version} test program failed
10391See \`config.log' for more details." "$LINENO" 5; }
10392 fi
10393 fi
10394 fi
10395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
10396$as_echo "${found_usable_guile}" >&6; }
10397
e1402065 10398 fi
ed3ef339
DE
10399 ;;
10400yes)
e1402065
DE
10401 if test "${pkg_config_prog_path}" = "missing"; then
10402 as_fn_error "pkg-config not found" "$LINENO" 5
10403 fi
ed3ef339
DE
10404
10405 pkg_config=${pkg_config_prog_path}
10406 guile_version_list=${try_guile_versions}
10407 flag_errors=yes
10408
ed3ef339
DE
10409 found_usable_guile=checking
10410 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
10411$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
10412 for guile_version in ${guile_version_list}; do
10413 ${pkg_config} --exists ${guile_version} 2>/dev/null
10414 if test $? != 0; then
10415 continue
10416 fi
10417 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
10418 if test $? != 0; then
10419 as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
10420 fi
10421 new_LIBS=`${pkg_config} --libs ${guile_version}`
10422 if test $? != 0; then
10423 as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
10424 fi
10425 found_usable_guile=${guile_version}
10426 break
10427 done
10428 if test "${found_usable_guile}" = "checking"; then
10429 if test "${flag_errors}" = "yes"; then
10430 as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
10431 else
10432 found_usable_guile=no
10433 fi
10434 fi
10435 if test "${found_usable_guile}" != no; then
10436 save_CPPFLAGS=$CPPFLAGS
10437 save_LIBS=$LIBS
10438 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10439 LIBS="$LIBS $new_LIBS"
10440 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10441/* end confdefs.h. */
10442#include "libguile.h"
10443int
10444main ()
10445{
10446scm_init_guile ();
10447 ;
10448 return 0;
10449}
10450_ACEOF
10451if ac_fn_c_try_link "$LINENO"; then :
10452 have_libguile=yes
10453 GUILE_CPPFLAGS=$new_CPPFLAGS
10454 GUILE_LIBS=$new_LIBS
10455else
10456 found_usable_guile=no
10457fi
10458rm -f core conftest.err conftest.$ac_objext \
10459 conftest$ac_exeext conftest.$ac_ext
92fab5a6
AW
10460 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
10461if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then :
10462
10463$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
10464
10465
10466fi
10467
ed3ef339
DE
10468 CPPFLAGS=$save_CPPFLAGS
10469 LIBS=$save_LIBS
10470 if test "${found_usable_guile}" = no; then
10471 if test "${flag_errors}" = yes; then
10472 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10473$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10474as_fn_error "linking guile version ${guile_version} test program failed
10475See \`config.log' for more details." "$LINENO" 5; }
10476 fi
10477 fi
10478 fi
10479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
10480$as_echo "${found_usable_guile}" >&6; }
10481
10482 ;;
10483[\\/]* | ?:[\\/]*)
e1402065 10484 if test -x "${with_guile}"; then
ed3ef339
DE
10485
10486 pkg_config=${with_guile}
10487 guile_version_list=${try_guile_versions}
10488 flag_errors=yes
10489
ed3ef339
DE
10490 found_usable_guile=checking
10491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
10492$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
10493 for guile_version in ${guile_version_list}; do
10494 ${pkg_config} --exists ${guile_version} 2>/dev/null
10495 if test $? != 0; then
10496 continue
10497 fi
10498 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
10499 if test $? != 0; then
10500 as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
10501 fi
10502 new_LIBS=`${pkg_config} --libs ${guile_version}`
10503 if test $? != 0; then
10504 as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
10505 fi
10506 found_usable_guile=${guile_version}
10507 break
10508 done
10509 if test "${found_usable_guile}" = "checking"; then
10510 if test "${flag_errors}" = "yes"; then
10511 as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
10512 else
10513 found_usable_guile=no
10514 fi
10515 fi
10516 if test "${found_usable_guile}" != no; then
10517 save_CPPFLAGS=$CPPFLAGS
10518 save_LIBS=$LIBS
10519 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10520 LIBS="$LIBS $new_LIBS"
10521 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10522/* end confdefs.h. */
10523#include "libguile.h"
10524int
10525main ()
10526{
10527scm_init_guile ();
10528 ;
10529 return 0;
10530}
10531_ACEOF
10532if ac_fn_c_try_link "$LINENO"; then :
10533 have_libguile=yes
10534 GUILE_CPPFLAGS=$new_CPPFLAGS
10535 GUILE_LIBS=$new_LIBS
10536else
10537 found_usable_guile=no
10538fi
10539rm -f core conftest.err conftest.$ac_objext \
10540 conftest$ac_exeext conftest.$ac_ext
92fab5a6
AW
10541 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
10542if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then :
10543
10544$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
10545
10546
10547fi
10548
ed3ef339
DE
10549 CPPFLAGS=$save_CPPFLAGS
10550 LIBS=$save_LIBS
10551 if test "${found_usable_guile}" = no; then
10552 if test "${flag_errors}" = yes; then
10553 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10554$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10555as_fn_error "linking guile version ${guile_version} test program failed
10556See \`config.log' for more details." "$LINENO" 5; }
10557 fi
10558 fi
10559 fi
10560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
10561$as_echo "${found_usable_guile}" >&6; }
10562
e1402065
DE
10563 else
10564 as_fn_error "Guile config program not executable: ${with_guile}" "$LINENO" 5
10565 fi
ed3ef339
DE
10566 ;;
10567"" | */*)
10568 # Disallow --with=guile="" and --with-guile=foo/bar.
10569 as_fn_error "invalid value for --with-guile" "$LINENO" 5
10570 ;;
10571*)
10572 # A space separate list of guile versions to try, in order.
e1402065
DE
10573 if test "${pkg_config_prog_path}" = "missing"; then
10574 as_fn_error "pkg-config not found" "$LINENO" 5
10575 fi
ed3ef339
DE
10576
10577 pkg_config=${pkg_config_prog_path}
10578 guile_version_list=${with_guile}
10579 flag_errors=yes
10580
ed3ef339
DE
10581 found_usable_guile=checking
10582 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
10583$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
10584 for guile_version in ${guile_version_list}; do
10585 ${pkg_config} --exists ${guile_version} 2>/dev/null
10586 if test $? != 0; then
10587 continue
10588 fi
10589 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
10590 if test $? != 0; then
10591 as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
10592 fi
10593 new_LIBS=`${pkg_config} --libs ${guile_version}`
10594 if test $? != 0; then
10595 as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
10596 fi
10597 found_usable_guile=${guile_version}
10598 break
10599 done
10600 if test "${found_usable_guile}" = "checking"; then
10601 if test "${flag_errors}" = "yes"; then
10602 as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
10603 else
10604 found_usable_guile=no
10605 fi
10606 fi
10607 if test "${found_usable_guile}" != no; then
10608 save_CPPFLAGS=$CPPFLAGS
10609 save_LIBS=$LIBS
10610 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10611 LIBS="$LIBS $new_LIBS"
10612 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10613/* end confdefs.h. */
10614#include "libguile.h"
10615int
10616main ()
10617{
10618scm_init_guile ();
10619 ;
10620 return 0;
10621}
10622_ACEOF
10623if ac_fn_c_try_link "$LINENO"; then :
10624 have_libguile=yes
10625 GUILE_CPPFLAGS=$new_CPPFLAGS
10626 GUILE_LIBS=$new_LIBS
10627else
10628 found_usable_guile=no
10629fi
10630rm -f core conftest.err conftest.$ac_objext \
10631 conftest$ac_exeext conftest.$ac_ext
92fab5a6
AW
10632 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
10633if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then :
10634
10635$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
10636
10637
10638fi
10639
ed3ef339
DE
10640 CPPFLAGS=$save_CPPFLAGS
10641 LIBS=$save_LIBS
10642 if test "${found_usable_guile}" = no; then
10643 if test "${flag_errors}" = yes; then
10644 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10645$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10646as_fn_error "linking guile version ${guile_version} test program failed
10647See \`config.log' for more details." "$LINENO" 5; }
10648 fi
10649 fi
10650 fi
10651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
10652$as_echo "${found_usable_guile}" >&6; }
10653
10654 ;;
10655esac
10656
e76c5d17 10657if test "${have_libguile}" != no; then
d342a0da
DE
10658 case "${with_guile}" in
10659 [\\/]* | ?:[\\/]*)
e76c5d17
DE
10660
10661 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
10662$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
10663if test "${ac_cv_guild_program_name+set}" = set; then :
10664 $as_echo_n "(cached) " >&6
10665else
d342a0da 10666 ac_cv_guild_program_name="`"${with_guile}" --variable guild "${guile_version}"`"
e76c5d17
DE
10667
10668 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
10669 # the 'guild' and 'bindir' variables. In that case, try to guess
10670 # what the program name is, at the risk of getting it wrong if
10671 # Guile was configured with '--program-suffix' or similar.
10672 if test "x$ac_cv_guild_program_name" = "x"; then
d342a0da 10673 guile_exec_prefix="`"${with_guile}" --variable exec_prefix "${guile_version}"`"
e76c5d17
DE
10674 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
10675 fi
10676
10677fi
10678{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
10679$as_echo "$ac_cv_guild_program_name" >&6; }
10680
10681 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
10682 as_fn_error "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
10683 fi
10684
10685 GUILD="$ac_cv_guild_program_name"
10686
10687
d342a0da
DE
10688 ;;
10689 *)
10690
10691 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
10692$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
10693if test "${ac_cv_guild_program_name+set}" = set; then :
10694 $as_echo_n "(cached) " >&6
10695else
10696 ac_cv_guild_program_name="`"${pkg_config_prog_path}" --variable guild "${guile_version}"`"
10697
10698 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
10699 # the 'guild' and 'bindir' variables. In that case, try to guess
10700 # what the program name is, at the risk of getting it wrong if
10701 # Guile was configured with '--program-suffix' or similar.
10702 if test "x$ac_cv_guild_program_name" = "x"; then
10703 guile_exec_prefix="`"${pkg_config_prog_path}" --variable exec_prefix "${guile_version}"`"
10704 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
10705 fi
10706
10707fi
10708{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
10709$as_echo "$ac_cv_guild_program_name" >&6; }
10710
10711 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
10712 as_fn_error "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
10713 fi
10714
10715 GUILD="$ac_cv_guild_program_name"
10716
10717
10718 ;;
10719 esac
e76c5d17
DE
10720
10721
10722 if test "$cross_compiling" = no; then
10723 GUILD_TARGET_FLAG=
10724 else
10725 GUILD_TARGET_FLAG="--target=$host"
10726 fi
10727
10728
10729
10730
10731 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether guild supports this host" >&5
10732$as_echo_n "checking whether guild supports this host... " >&6; }
10733if test "${ac_cv_guild_ok+set}" = set; then :
10734 $as_echo_n "(cached) " >&6
10735else
10736 echo "$ac_cv_guild_program_name compile $GUILD_TARGET_FLAG -o conftest.go $srcdir/guile/lib/gdb/support.scm" >&5
10737 if "$ac_cv_guild_program_name" compile $GUILD_TARGET_FLAG -o conftest.go "$srcdir/guile/lib/gdb/support.scm" >&5 2>&5; then
10738 ac_cv_guild_ok=yes
10739 else
10740 ac_cv_guild_ok=no
10741 fi
10742fi
10743{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_ok" >&5
10744$as_echo "$ac_cv_guild_ok" >&6; }
10745
10746 if test "$ac_cv_guild_ok" = no; then
10747 have_libguile=no
10748 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling guile support" >&5
10749$as_echo "$as_me: WARNING: disabling guile support" >&2;}
10750 fi
10751fi
10752
ed3ef339
DE
10753if test "${have_libguile}" != no; then
10754
10755$as_echo "#define HAVE_GUILE 1" >>confdefs.h
10756
10757 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_GUILE_OBS)"
10758 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_GUILE_DEPS)"
10759 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_GUILE_SRCS)"
10760 CONFIG_INSTALL="$CONFIG_INSTALL install-guile"
10761 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_GUILE_CFLAGS)"
16954d5d
LC
10762
10763 save_LIBS="$LIBS"
10764 save_CPPFLAGS="$CPPFLAGS"
10765 LIBS="$GUILE_LIBS"
10766 CPPFLAGS="$GUILE_CPPFLAGS"
10767 for ac_func in scm_new_smob
10768do :
10769 ac_fn_c_check_func "$LINENO" "scm_new_smob" "ac_cv_func_scm_new_smob"
10770if test "x$ac_cv_func_scm_new_smob" = x""yes; then :
10771 cat >>confdefs.h <<_ACEOF
10772#define HAVE_SCM_NEW_SMOB 1
10773_ACEOF
10774
10775fi
10776done
10777
10778 LIBS="$save_LIBS"
10779 CPPFLAGS="$save_CPPFLAGS"
ed3ef339
DE
10780else
10781 # Even if Guile support is not compiled in, we need to have these files
10782 # included.
10783 CONFIG_OBS="$CONFIG_OBS guile.o"
10784 CONFIG_SRCS="$CONFIG_SRCS guile/guile.c"
10785fi
9a156167 10786
ac534cba 10787
4df42755
DE
10788 if test "${have_libguile}" != no; then
10789 HAVE_GUILE_TRUE=
10790 HAVE_GUILE_FALSE='#'
10791else
10792 HAVE_GUILE_TRUE='#'
10793 HAVE_GUILE_FALSE=
10794fi
10795
ac534cba 10796
d344e670
DE
10797# --------------------- #
10798# Check for libmcheck. #
10799# --------------------- #
10800
a8db4212
YPK
10801# Enable -lmcheck by default (it provides cheap-enough memory mangling),
10802# but turn it off if Python is enabled with threads, since -lmcheck is
10803# not thread safe (http://sourceware.org/bugzilla/show_bug.cgi?id=9939),
10804# and for releases.
17ef446e
PA
10805if test \( "${have_libpython}" = "no" -o "${python_has_threads}" = "no" \) \
10806 && $development; then
10807 libmcheck_default=yes
10808else
10809 libmcheck_default=no
a8db4212
YPK
10810fi
10811
17ef446e
PA
10812 # Check whether --enable-libmcheck was given.
10813if test "${enable_libmcheck+set}" = set; then :
10814 enableval=$enable_libmcheck; case "${enableval}" in
10815 yes | y) ENABLE_LIBMCHECK="yes" ;;
10816 no | n) ENABLE_LIBMCHECK="no" ;;
10817 *) as_fn_error "bad value ${enableval} for --enable-libmcheck" "$LINENO" 5 ;;
10818 esac
10819fi
10820
10821
10822 if test -z "${ENABLE_LIBMCHECK}"; then
10823 ENABLE_LIBMCHECK=${libmcheck_default}
a8db4212 10824 fi
17ef446e
PA
10825
10826 if test "$ENABLE_LIBMCHECK" = "yes" ; then
10827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lmcheck" >&5
a8db4212
YPK
10828$as_echo_n "checking for main in -lmcheck... " >&6; }
10829if test "${ac_cv_lib_mcheck_main+set}" = set; then :
10830 $as_echo_n "(cached) " >&6
10831else
10832 ac_check_lib_save_LIBS=$LIBS
10833LIBS="-lmcheck $LIBS"
10834cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10835/* end confdefs.h. */
10836
10837
10838int
10839main ()
10840{
10841return main ();
10842 ;
10843 return 0;
10844}
10845_ACEOF
10846if ac_fn_c_try_link "$LINENO"; then :
10847 ac_cv_lib_mcheck_main=yes
10848else
10849 ac_cv_lib_mcheck_main=no
10850fi
10851rm -f core conftest.err conftest.$ac_objext \
10852 conftest$ac_exeext conftest.$ac_ext
10853LIBS=$ac_check_lib_save_LIBS
10854fi
10855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mcheck_main" >&5
10856$as_echo "$ac_cv_lib_mcheck_main" >&6; }
10857if test "x$ac_cv_lib_mcheck_main" = x""yes; then :
10858 cat >>confdefs.h <<_ACEOF
10859#define HAVE_LIBMCHECK 1
10860_ACEOF
10861
10862 LIBS="-lmcheck $LIBS"
10863
10864fi
10865
17ef446e
PA
10866 fi
10867
10868
10869if test "$ENABLE_LIBMCHECK" = "yes" \
10870 -a "${have_libpython}" != "no" \
10871 -a "${python_has_threads}" = "yes" ; then
10872 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&5
10873$as_echo "$as_me: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&2;}
a8db4212
YPK
10874fi
10875
58bfce93
MM
10876
10877# Check whether --with-intel_pt was given.
10878if test "${with_intel_pt+set}" = set; then :
10879 withval=$with_intel_pt;
10880else
10881 with_intel_pt=auto
10882fi
10883
10884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5
10885$as_echo_n "checking whether to use intel pt... " >&6; }
10886{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5
10887$as_echo "$with_intel_pt" >&6; }
10888
10889if test "${with_intel_pt}" = no; then
bc504a31
PA
10890 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&5
10891$as_echo "$as_me: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&2;}
58bfce93
MM
10892 HAVE_LIBIPT=no
10893else
5599c404
MM
10894 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10895/* end confdefs.h. */
10896
10897#include <linux/perf_event.h>
10898#ifndef PERF_ATTR_SIZE_VER5
10899# error
10900#endif
10901
10902_ACEOF
10903if ac_fn_c_try_cpp "$LINENO"; then :
10904 perf_event=yes
10905else
10906 perf_event=no
10907fi
10908rm -f conftest.err conftest.$ac_ext
10909 if test "$perf_event" != yes; then
10910 if test "$with_intel_pt" = yes; then
10911 as_fn_error "linux/perf_event.h missing or too old" "$LINENO" 5
10912 else
10913 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5
10914$as_echo "$as_me: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&2;}
10915 fi
10916 fi
10917
58bfce93
MM
10918
10919
10920
10921
10922
10923
10924
10925
10926 use_additional=yes
10927
10928 acl_save_prefix="$prefix"
10929 prefix="$acl_final_prefix"
10930 acl_save_exec_prefix="$exec_prefix"
10931 exec_prefix="$acl_final_exec_prefix"
10932
10933 eval additional_includedir=\"$includedir\"
10934 eval additional_libdir=\"$libdir\"
10935
10936 exec_prefix="$acl_save_exec_prefix"
10937 prefix="$acl_save_prefix"
10938
10939
10940# Check whether --with-libipt-prefix was given.
10941if test "${with_libipt_prefix+set}" = set; then :
10942 withval=$with_libipt_prefix;
10943 if test "X$withval" = "Xno"; then
10944 use_additional=no
10945 else
10946 if test "X$withval" = "X"; then
10947
10948 acl_save_prefix="$prefix"
10949 prefix="$acl_final_prefix"
10950 acl_save_exec_prefix="$exec_prefix"
10951 exec_prefix="$acl_final_exec_prefix"
10952
10953 eval additional_includedir=\"$includedir\"
10954 eval additional_libdir=\"$libdir\"
10955
10956 exec_prefix="$acl_save_exec_prefix"
10957 prefix="$acl_save_prefix"
10958
10959 else
10960 additional_includedir="$withval/include"
10961 additional_libdir="$withval/lib"
10962 fi
10963 fi
10964
10965fi
10966
10967 LIBIPT=
10968 LTLIBIPT=
10969 INCIPT=
10970 rpathdirs=
10971 ltrpathdirs=
10972 names_already_handled=
10973 names_next_round='ipt '
10974 while test -n "$names_next_round"; do
10975 names_this_round="$names_next_round"
10976 names_next_round=
10977 for name in $names_this_round; do
10978 already_handled=
10979 for n in $names_already_handled; do
10980 if test "$n" = "$name"; then
10981 already_handled=yes
10982 break
10983 fi
10984 done
10985 if test -z "$already_handled"; then
10986 names_already_handled="$names_already_handled $name"
10987 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
10988 eval value=\"\$HAVE_LIB$uppername\"
10989 if test -n "$value"; then
10990 if test "$value" = yes; then
10991 eval value=\"\$LIB$uppername\"
10992 test -z "$value" || LIBIPT="${LIBIPT}${LIBIPT:+ }$value"
10993 eval value=\"\$LTLIB$uppername\"
10994 test -z "$value" || LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$value"
10995 else
10996 :
10997 fi
10998 else
10999 found_dir=
11000 found_la=
11001 found_so=
11002 found_a=
11003 if test $use_additional = yes; then
11004 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
11005 found_dir="$additional_libdir"
11006 found_so="$additional_libdir/lib$name.$shlibext"
11007 if test -f "$additional_libdir/lib$name.la"; then
11008 found_la="$additional_libdir/lib$name.la"
11009 fi
11010 else
11011 if test -f "$additional_libdir/lib$name.$libext"; then
11012 found_dir="$additional_libdir"
11013 found_a="$additional_libdir/lib$name.$libext"
11014 if test -f "$additional_libdir/lib$name.la"; then
11015 found_la="$additional_libdir/lib$name.la"
11016 fi
11017 fi
11018 fi
11019 fi
11020 if test "X$found_dir" = "X"; then
11021 for x in $LDFLAGS $LTLIBIPT; do
11022
11023 acl_save_prefix="$prefix"
11024 prefix="$acl_final_prefix"
11025 acl_save_exec_prefix="$exec_prefix"
11026 exec_prefix="$acl_final_exec_prefix"
11027 eval x=\"$x\"
11028 exec_prefix="$acl_save_exec_prefix"
11029 prefix="$acl_save_prefix"
11030
11031 case "$x" in
11032 -L*)
11033 dir=`echo "X$x" | sed -e 's/^X-L//'`
11034 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
11035 found_dir="$dir"
11036 found_so="$dir/lib$name.$shlibext"
11037 if test -f "$dir/lib$name.la"; then
11038 found_la="$dir/lib$name.la"
11039 fi
11040 else
11041 if test -f "$dir/lib$name.$libext"; then
11042 found_dir="$dir"
11043 found_a="$dir/lib$name.$libext"
11044 if test -f "$dir/lib$name.la"; then
11045 found_la="$dir/lib$name.la"
11046 fi
11047 fi
11048 fi
11049 ;;
11050 esac
11051 if test "X$found_dir" != "X"; then
11052 break
11053 fi
11054 done
11055 fi
11056 if test "X$found_dir" != "X"; then
11057 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$found_dir -l$name"
11058 if test "X$found_so" != "X"; then
11059 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
11060 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11061 else
11062 haveit=
11063 for x in $ltrpathdirs; do
11064 if test "X$x" = "X$found_dir"; then
11065 haveit=yes
11066 break
11067 fi
11068 done
11069 if test -z "$haveit"; then
11070 ltrpathdirs="$ltrpathdirs $found_dir"
11071 fi
11072 if test "$hardcode_direct" = yes; then
11073 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11074 else
11075 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
11076 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11077 haveit=
11078 for x in $rpathdirs; do
11079 if test "X$x" = "X$found_dir"; then
11080 haveit=yes
11081 break
11082 fi
11083 done
11084 if test -z "$haveit"; then
11085 rpathdirs="$rpathdirs $found_dir"
11086 fi
11087 else
11088 haveit=
11089 for x in $LDFLAGS $LIBIPT; do
11090
11091 acl_save_prefix="$prefix"
11092 prefix="$acl_final_prefix"
11093 acl_save_exec_prefix="$exec_prefix"
11094 exec_prefix="$acl_final_exec_prefix"
11095 eval x=\"$x\"
11096 exec_prefix="$acl_save_exec_prefix"
11097 prefix="$acl_save_prefix"
11098
11099 if test "X$x" = "X-L$found_dir"; then
11100 haveit=yes
11101 break
11102 fi
11103 done
11104 if test -z "$haveit"; then
11105 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir"
11106 fi
11107 if test "$hardcode_minus_L" != no; then
11108 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11109 else
11110 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
11111 fi
11112 fi
11113 fi
11114 fi
11115 else
11116 if test "X$found_a" != "X"; then
11117 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_a"
11118 else
11119 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir -l$name"
11120 fi
11121 fi
11122 additional_includedir=
11123 case "$found_dir" in
11124 */lib | */lib/)
11125 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
11126 additional_includedir="$basedir/include"
11127 ;;
11128 esac
11129 if test "X$additional_includedir" != "X"; then
11130 if test "X$additional_includedir" != "X/usr/include"; then
11131 haveit=
11132 if test "X$additional_includedir" = "X/usr/local/include"; then
11133 if test -n "$GCC"; then
11134 case $host_os in
11135 linux*) haveit=yes;;
11136 esac
11137 fi
11138 fi
11139 if test -z "$haveit"; then
11140 for x in $CPPFLAGS $INCIPT; do
11141
11142 acl_save_prefix="$prefix"
11143 prefix="$acl_final_prefix"
11144 acl_save_exec_prefix="$exec_prefix"
11145 exec_prefix="$acl_final_exec_prefix"
11146 eval x=\"$x\"
11147 exec_prefix="$acl_save_exec_prefix"
11148 prefix="$acl_save_prefix"
11149
11150 if test "X$x" = "X-I$additional_includedir"; then
11151 haveit=yes
11152 break
11153 fi
11154 done
11155 if test -z "$haveit"; then
11156 if test -d "$additional_includedir"; then
11157 INCIPT="${INCIPT}${INCIPT:+ }-I$additional_includedir"
11158 fi
11159 fi
11160 fi
11161 fi
11162 fi
11163 if test -n "$found_la"; then
11164 save_libdir="$libdir"
11165 case "$found_la" in
11166 */* | *\\*) . "$found_la" ;;
11167 *) . "./$found_la" ;;
11168 esac
11169 libdir="$save_libdir"
11170 for dep in $dependency_libs; do
11171 case "$dep" in
11172 -L*)
11173 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
11174 if test "X$additional_libdir" != "X/usr/lib"; then
11175 haveit=
11176 if test "X$additional_libdir" = "X/usr/local/lib"; then
11177 if test -n "$GCC"; then
11178 case $host_os in
11179 linux*) haveit=yes;;
11180 esac
11181 fi
11182 fi
11183 if test -z "$haveit"; then
11184 haveit=
11185 for x in $LDFLAGS $LIBIPT; do
11186
11187 acl_save_prefix="$prefix"
11188 prefix="$acl_final_prefix"
11189 acl_save_exec_prefix="$exec_prefix"
11190 exec_prefix="$acl_final_exec_prefix"
11191 eval x=\"$x\"
11192 exec_prefix="$acl_save_exec_prefix"
11193 prefix="$acl_save_prefix"
11194
11195 if test "X$x" = "X-L$additional_libdir"; then
11196 haveit=yes
11197 break
11198 fi
11199 done
11200 if test -z "$haveit"; then
11201 if test -d "$additional_libdir"; then
11202 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$additional_libdir"
11203 fi
11204 fi
11205 haveit=
11206 for x in $LDFLAGS $LTLIBIPT; do
11207
11208 acl_save_prefix="$prefix"
11209 prefix="$acl_final_prefix"
11210 acl_save_exec_prefix="$exec_prefix"
11211 exec_prefix="$acl_final_exec_prefix"
11212 eval x=\"$x\"
11213 exec_prefix="$acl_save_exec_prefix"
11214 prefix="$acl_save_prefix"
11215
11216 if test "X$x" = "X-L$additional_libdir"; then
11217 haveit=yes
11218 break
11219 fi
11220 done
11221 if test -z "$haveit"; then
11222 if test -d "$additional_libdir"; then
11223 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$additional_libdir"
11224 fi
11225 fi
11226 fi
11227 fi
11228 ;;
11229 -R*)
11230 dir=`echo "X$dep" | sed -e 's/^X-R//'`
11231 if test "$enable_rpath" != no; then
11232 haveit=
11233 for x in $rpathdirs; do
11234 if test "X$x" = "X$dir"; then
11235 haveit=yes
11236 break
11237 fi
11238 done
11239 if test -z "$haveit"; then
11240 rpathdirs="$rpathdirs $dir"
11241 fi
11242 haveit=
11243 for x in $ltrpathdirs; do
11244 if test "X$x" = "X$dir"; then
11245 haveit=yes
11246 break
11247 fi
11248 done
11249 if test -z "$haveit"; then
11250 ltrpathdirs="$ltrpathdirs $dir"
11251 fi
11252 fi
11253 ;;
11254 -l*)
11255 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
11256 ;;
11257 *.la)
11258 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
11259 ;;
11260 *)
11261 LIBIPT="${LIBIPT}${LIBIPT:+ }$dep"
11262 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$dep"
11263 ;;
11264 esac
11265 done
11266 fi
11267 else
11268 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
11269 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l$name"
11270 fi
11271 fi
11272 fi
11273 done
11274 done
11275 if test "X$rpathdirs" != "X"; then
11276 if test -n "$hardcode_libdir_separator"; then
11277 alldirs=
11278 for found_dir in $rpathdirs; do
11279 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
11280 done
11281 acl_save_libdir="$libdir"
11282 libdir="$alldirs"
11283 eval flag=\"$hardcode_libdir_flag_spec\"
11284 libdir="$acl_save_libdir"
11285 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
11286 else
11287 for found_dir in $rpathdirs; do
11288 acl_save_libdir="$libdir"
11289 libdir="$found_dir"
11290 eval flag=\"$hardcode_libdir_flag_spec\"
11291 libdir="$acl_save_libdir"
11292 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
11293 done
11294 fi
11295 fi
11296 if test "X$ltrpathdirs" != "X"; then
11297 for found_dir in $ltrpathdirs; do
11298 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-R$found_dir"
11299 done
11300 fi
11301
11302
11303 ac_save_CPPFLAGS="$CPPFLAGS"
11304
11305 for element in $INCIPT; do
11306 haveit=
11307 for x in $CPPFLAGS; do
11308
11309 acl_save_prefix="$prefix"
11310 prefix="$acl_final_prefix"
11311 acl_save_exec_prefix="$exec_prefix"
11312 exec_prefix="$acl_final_exec_prefix"
11313 eval x=\"$x\"
11314 exec_prefix="$acl_save_exec_prefix"
11315 prefix="$acl_save_prefix"
11316
11317 if test "X$x" = "X$element"; then
11318 haveit=yes
11319 break
11320 fi
11321 done
11322 if test -z "$haveit"; then
11323 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
11324 fi
11325 done
11326
11327
11328 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libipt" >&5
11329$as_echo_n "checking for libipt... " >&6; }
11330if test "${ac_cv_libipt+set}" = set; then :
11331 $as_echo_n "(cached) " >&6
11332else
11333
11334 ac_save_LIBS="$LIBS"
11335 LIBS="$LIBS $LIBIPT"
11336 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11337/* end confdefs.h. */
11338#include "intel-pt.h"
11339int
11340main ()
11341{
11342pt_insn_alloc_decoder (0);
11343 ;
11344 return 0;
11345}
11346_ACEOF
11347if ac_fn_c_try_link "$LINENO"; then :
11348 ac_cv_libipt=yes
11349else
11350 ac_cv_libipt=no
11351fi
11352rm -f core conftest.err conftest.$ac_objext \
11353 conftest$ac_exeext conftest.$ac_ext
11354 LIBS="$ac_save_LIBS"
11355
11356fi
11357{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libipt" >&5
11358$as_echo "$ac_cv_libipt" >&6; }
11359 if test "$ac_cv_libipt" = yes; then
11360 HAVE_LIBIPT=yes
11361
11362$as_echo "#define HAVE_LIBIPT 1" >>confdefs.h
11363
11364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libipt" >&5
11365$as_echo_n "checking how to link with libipt... " >&6; }
11366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBIPT" >&5
11367$as_echo "$LIBIPT" >&6; }
11368 else
11369 HAVE_LIBIPT=no
11370 CPPFLAGS="$ac_save_CPPFLAGS"
11371 LIBIPT=
11372 LTLIBIPT=
11373 fi
11374
11375
11376
11377
11378
11379
11380 if test "$HAVE_LIBIPT" != yes; then
11381 if test "$with_intel_pt" = yes; then
11382 as_fn_error "libipt is missing or unusable" "$LINENO" 5
11383 else
11384 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5
11385$as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be unavailable." >&2;}
11386 fi
c56ccc05
MM
11387 else
11388 save_LIBS=$LIBS
11389 LIBS="$LIBS $LIBIPT"
11390 for ac_func in pt_insn_event
11391do :
11392 ac_fn_c_check_func "$LINENO" "pt_insn_event" "ac_cv_func_pt_insn_event"
11393if test "x$ac_cv_func_pt_insn_event" = x""yes; then :
11394 cat >>confdefs.h <<_ACEOF
11395#define HAVE_PT_INSN_EVENT 1
11396_ACEOF
11397
11398fi
11399done
11400
11401 ac_fn_c_check_member "$LINENO" "struct pt_insn" "enabled" "ac_cv_member_struct_pt_insn_enabled" "#include <intel-pt.h>
11402"
11403if test "x$ac_cv_member_struct_pt_insn_enabled" = x""yes; then :
11404
11405cat >>confdefs.h <<_ACEOF
11406#define HAVE_STRUCT_PT_INSN_ENABLED 1
11407_ACEOF
11408
11409
11410fi
11411ac_fn_c_check_member "$LINENO" "struct pt_insn" "resynced" "ac_cv_member_struct_pt_insn_resynced" "#include <intel-pt.h>
11412"
11413if test "x$ac_cv_member_struct_pt_insn_resynced" = x""yes; then :
11414
11415cat >>confdefs.h <<_ACEOF
11416#define HAVE_STRUCT_PT_INSN_RESYNCED 1
11417_ACEOF
11418
11419
11420fi
11421
11422 LIBS=$save_LIBS
58bfce93
MM
11423 fi
11424fi
11425
81ecdfbb
RW
11426# ------------------------- #
11427# Checks for header files. #
11428# ------------------------- #
c890192f 11429
81ecdfbb
RW
11430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
11431$as_echo_n "checking for ANSI C header files... " >&6; }
11432if test "${ac_cv_header_stdc+set}" = set; then :
11433 $as_echo_n "(cached) " >&6
bec39cab 11434else
81ecdfbb 11435 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11436/* end confdefs.h. */
81ecdfbb
RW
11437#include <stdlib.h>
11438#include <stdarg.h>
11439#include <string.h>
11440#include <float.h>
11441
a9322a30
TT
11442int
11443main ()
11444{
a9322a30
TT
11445
11446 ;
11447 return 0;
11448}
bec39cab 11449_ACEOF
81ecdfbb
RW
11450if ac_fn_c_try_compile "$LINENO"; then :
11451 ac_cv_header_stdc=yes
bec39cab 11452else
81ecdfbb 11453 ac_cv_header_stdc=no
a9322a30 11454fi
81ecdfbb 11455rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 11456
81ecdfbb
RW
11457if test $ac_cv_header_stdc = yes; then
11458 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11460/* end confdefs.h. */
11461#include <string.h>
bec39cab 11462
81ecdfbb
RW
11463_ACEOF
11464if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11465 $EGREP "memchr" >/dev/null 2>&1; then :
bec39cab 11466
bec39cab 11467else
81ecdfbb
RW
11468 ac_cv_header_stdc=no
11469fi
11470rm -f conftest*
11471
11472fi
11473
11474if test $ac_cv_header_stdc = yes; then
11475 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11476 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11477/* end confdefs.h. */
11478#include <stdlib.h>
11479
bec39cab 11480_ACEOF
81ecdfbb
RW
11481if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11482 $EGREP "free" >/dev/null 2>&1; then :
06825bd1 11483
81ecdfbb
RW
11484else
11485 ac_cv_header_stdc=no
11486fi
11487rm -f conftest*
bec39cab 11488
bec39cab 11489fi
81ecdfbb
RW
11490
11491if test $ac_cv_header_stdc = yes; then
11492 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11493 if test "$cross_compiling" = yes; then :
11494 :
bec39cab 11495else
81ecdfbb 11496 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11497/* end confdefs.h. */
81ecdfbb
RW
11498#include <ctype.h>
11499#include <stdlib.h>
11500#if ((' ' & 0x0FF) == 0x020)
11501# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11502# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11503#else
11504# define ISLOWER(c) \
11505 (('a' <= (c) && (c) <= 'i') \
11506 || ('j' <= (c) && (c) <= 'r') \
11507 || ('s' <= (c) && (c) <= 'z'))
11508# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11509#endif
11510
11511#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
a9322a30
TT
11512int
11513main ()
11514{
81ecdfbb
RW
11515 int i;
11516 for (i = 0; i < 256; i++)
11517 if (XOR (islower (i), ISLOWER (i))
11518 || toupper (i) != TOUPPER (i))
11519 return 2;
a9322a30
TT
11520 return 0;
11521}
bec39cab 11522_ACEOF
81ecdfbb
RW
11523if ac_fn_c_try_run "$LINENO"; then :
11524
bec39cab 11525else
81ecdfbb
RW
11526 ac_cv_header_stdc=no
11527fi
11528rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11529 conftest.$ac_objext conftest.beam conftest.$ac_ext
11530fi
bec39cab 11531
bec39cab 11532fi
a9322a30 11533fi
81ecdfbb
RW
11534{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
11535$as_echo "$ac_cv_header_stdc" >&6; }
11536if test $ac_cv_header_stdc = yes; then
bec39cab 11537
81ecdfbb 11538$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5ee754fc 11539
81ecdfbb 11540fi
bec39cab 11541
81ecdfbb 11542# elf_hp.h is for HP/UX 64-bit shared library support.
9467110b 11543for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
161d1bec 11544 thread_db.h \
0080a2f6 11545 sys/fault.h \
81ecdfbb
RW
11546 sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
11547 sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
11548 sys/reg.h sys/debugreg.h sys/select.h sys/syscall.h \
9467110b 11549 termios.h termio.h \
3447c057 11550 sgtty.h elf_hp.h \
9467110b 11551 dlfcn.h
81ecdfbb
RW
11552do :
11553 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11554ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
11555eval as_val=\$$as_ac_Header
11556 if test "x$as_val" = x""yes; then :
bec39cab 11557 cat >>confdefs.h <<_ACEOF
81ecdfbb 11558#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 11559_ACEOF
c906108c 11560
bec39cab 11561fi
81ecdfbb
RW
11562
11563done
11564
81ecdfbb
RW
11565for ac_header in sys/proc.h
11566do :
11567 ac_fn_c_check_header_compile "$LINENO" "sys/proc.h" "ac_cv_header_sys_proc_h" "#if HAVE_SYS_PARAM_H
11568# include <sys/param.h>
11569#endif
c906108c 11570
81ecdfbb
RW
11571"
11572if test "x$ac_cv_header_sys_proc_h" = x""yes; then :
bec39cab 11573 cat >>confdefs.h <<_ACEOF
81ecdfbb 11574#define HAVE_SYS_PROC_H 1
bec39cab 11575_ACEOF
5ee754fc 11576
bec39cab 11577fi
81ecdfbb
RW
11578
11579done
11580
11581for ac_header in sys/user.h
11582do :
11583 ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
11584# include <sys/param.h>
a9322a30
TT
11585#endif
11586
81ecdfbb
RW
11587"
11588if test "x$ac_cv_header_sys_user_h" = x""yes; then :
11589 cat >>confdefs.h <<_ACEOF
11590#define HAVE_SYS_USER_H 1
bec39cab 11591_ACEOF
bec39cab 11592
a9322a30 11593fi
bec39cab 11594
81ecdfbb 11595done
5ee754fc 11596
5ee754fc 11597
5007d765 11598for ac_header in curses.h cursesX.h ncurses.h ncursesw/ncurses.h ncurses/ncurses.h ncurses/term.h
81ecdfbb
RW
11599do :
11600 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11601ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
11602eval as_val=\$$as_ac_Header
11603 if test "x$as_val" = x""yes; then :
bec39cab 11604 cat >>confdefs.h <<_ACEOF
81ecdfbb 11605#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 11606_ACEOF
5ee754fc
MK
11607
11608fi
11609
81ecdfbb 11610done
bec39cab 11611
81ecdfbb
RW
11612for ac_header in term.h
11613do :
11614 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
11615# include <curses.h>
11616#endif
bec39cab 11617
81ecdfbb
RW
11618"
11619if test "x$ac_cv_header_term_h" = x""yes; then :
11620 cat >>confdefs.h <<_ACEOF
11621#define HAVE_TERM_H 1
a8111142 11622_ACEOF
a8111142 11623
a8111142 11624fi
a8111142 11625
81ecdfbb 11626done
a8111142
TT
11627
11628
81ecdfbb
RW
11629# ------------------------- #
11630# Checks for declarations. #
11631# ------------------------- #
a9322a30 11632
07697489
PA
11633
11634 # Check for presence and size of long long.
11635 ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
11636if test "x$ac_cv_type_long_long" = x""yes; then :
11637
11638cat >>confdefs.h <<_ACEOF
11639#define HAVE_LONG_LONG 1
11640_ACEOF
11641
11642# The cast to long int works around a bug in the HP C Compiler
11643# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11644# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11645# This bug is HP SR number 8606223364.
11646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
11647$as_echo_n "checking size of long long... " >&6; }
11648if test "${ac_cv_sizeof_long_long+set}" = set; then :
11649 $as_echo_n "(cached) " >&6
11650else
11651 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
11652
11653else
11654 if test "$ac_cv_type_long_long" = yes; then
11655 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11656$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11657{ as_fn_set_status 77
11658as_fn_error "cannot compute sizeof (long long)
11659See \`config.log' for more details." "$LINENO" 5; }; }
11660 else
11661 ac_cv_sizeof_long_long=0
11662 fi
11663fi
11664
11665fi
11666{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
11667$as_echo "$ac_cv_sizeof_long_long" >&6; }
11668
11669
11670
11671cat >>confdefs.h <<_ACEOF
11672#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
11673_ACEOF
11674
11675
11676fi
11677
11678
11679 ac_fn_c_check_decl "$LINENO" "basename(char *)" "ac_cv_have_decl_basename_char_p_" "$ac_includes_default"
11680if test "x$ac_cv_have_decl_basename_char_p_" = x""yes; then :
11681 ac_have_decl=1
11682else
11683 ac_have_decl=0
11684fi
11685
11686cat >>confdefs.h <<_ACEOF
11687#define HAVE_DECL_BASENAME $ac_have_decl
11688_ACEOF
11689ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default"
11690if test "x$ac_cv_have_decl_ffs" = x""yes; then :
11691 ac_have_decl=1
11692else
11693 ac_have_decl=0
11694fi
11695
11696cat >>confdefs.h <<_ACEOF
11697#define HAVE_DECL_FFS $ac_have_decl
11698_ACEOF
11699ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default"
11700if test "x$ac_cv_have_decl_asprintf" = x""yes; then :
11701 ac_have_decl=1
11702else
11703 ac_have_decl=0
11704fi
11705
11706cat >>confdefs.h <<_ACEOF
11707#define HAVE_DECL_ASPRINTF $ac_have_decl
11708_ACEOF
11709ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
11710if test "x$ac_cv_have_decl_vasprintf" = x""yes; then :
11711 ac_have_decl=1
11712else
11713 ac_have_decl=0
11714fi
11715
11716cat >>confdefs.h <<_ACEOF
11717#define HAVE_DECL_VASPRINTF $ac_have_decl
11718_ACEOF
11719ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
11720if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
11721 ac_have_decl=1
11722else
11723 ac_have_decl=0
11724fi
11725
11726cat >>confdefs.h <<_ACEOF
11727#define HAVE_DECL_SNPRINTF $ac_have_decl
11728_ACEOF
11729ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
11730if test "x$ac_cv_have_decl_vsnprintf" = x""yes; then :
11731 ac_have_decl=1
11732else
11733 ac_have_decl=0
11734fi
11735
11736cat >>confdefs.h <<_ACEOF
11737#define HAVE_DECL_VSNPRINTF $ac_have_decl
11738_ACEOF
11739
11740 ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default"
11741if test "x$ac_cv_have_decl_strtol" = x""yes; then :
11742 ac_have_decl=1
11743else
11744 ac_have_decl=0
11745fi
11746
11747cat >>confdefs.h <<_ACEOF
11748#define HAVE_DECL_STRTOL $ac_have_decl
11749_ACEOF
11750ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default"
11751if test "x$ac_cv_have_decl_strtoul" = x""yes; then :
11752 ac_have_decl=1
11753else
11754 ac_have_decl=0
11755fi
11756
11757cat >>confdefs.h <<_ACEOF
11758#define HAVE_DECL_STRTOUL $ac_have_decl
11759_ACEOF
11760ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
11761if test "x$ac_cv_have_decl_strtoll" = x""yes; then :
11762 ac_have_decl=1
11763else
11764 ac_have_decl=0
11765fi
11766
11767cat >>confdefs.h <<_ACEOF
11768#define HAVE_DECL_STRTOLL $ac_have_decl
11769_ACEOF
11770ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
11771if test "x$ac_cv_have_decl_strtoull" = x""yes; then :
11772 ac_have_decl=1
11773else
11774 ac_have_decl=0
11775fi
11776
11777cat >>confdefs.h <<_ACEOF
11778#define HAVE_DECL_STRTOULL $ac_have_decl
11779_ACEOF
11780
11781 ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default"
11782if test "x$ac_cv_have_decl_strverscmp" = x""yes; then :
11783 ac_have_decl=1
11784else
11785 ac_have_decl=0
11786fi
11787
11788cat >>confdefs.h <<_ACEOF
11789#define HAVE_DECL_STRVERSCMP $ac_have_decl
11790_ACEOF
11791
11792
11793
81ecdfbb
RW
11794ac_fn_c_check_decl "$LINENO" "free" "ac_cv_have_decl_free" "$ac_includes_default"
11795if test "x$ac_cv_have_decl_free" = x""yes; then :
11796 ac_have_decl=1
bec39cab 11797else
81ecdfbb
RW
11798 ac_have_decl=0
11799fi
11800
11801cat >>confdefs.h <<_ACEOF
11802#define HAVE_DECL_FREE $ac_have_decl
bec39cab 11803_ACEOF
81ecdfbb
RW
11804ac_fn_c_check_decl "$LINENO" "malloc" "ac_cv_have_decl_malloc" "$ac_includes_default"
11805if test "x$ac_cv_have_decl_malloc" = x""yes; then :
11806 ac_have_decl=1
11807else
11808 ac_have_decl=0
11809fi
11810
11811cat >>confdefs.h <<_ACEOF
11812#define HAVE_DECL_MALLOC $ac_have_decl
bec39cab 11813_ACEOF
81ecdfbb
RW
11814ac_fn_c_check_decl "$LINENO" "realloc" "ac_cv_have_decl_realloc" "$ac_includes_default"
11815if test "x$ac_cv_have_decl_realloc" = x""yes; then :
11816 ac_have_decl=1
bec39cab 11817else
81ecdfbb
RW
11818 ac_have_decl=0
11819fi
bec39cab 11820
81ecdfbb
RW
11821cat >>confdefs.h <<_ACEOF
11822#define HAVE_DECL_REALLOC $ac_have_decl
bec39cab 11823_ACEOF
81ecdfbb
RW
11824ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
11825if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
11826 ac_have_decl=1
11827else
11828 ac_have_decl=0
5ee754fc 11829fi
81ecdfbb
RW
11830
11831cat >>confdefs.h <<_ACEOF
11832#define HAVE_DECL_SNPRINTF $ac_have_decl
a9322a30 11833_ACEOF
5ee754fc 11834
5ee754fc 11835
81ecdfbb
RW
11836 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
11837$as_echo_n "checking for LC_MESSAGES... " >&6; }
11838if test "${am_cv_val_LC_MESSAGES+set}" = set; then :
11839 $as_echo_n "(cached) " >&6
bec39cab 11840else
81ecdfbb 11841 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11842/* end confdefs.h. */
81ecdfbb 11843#include <locale.h>
a9322a30
TT
11844int
11845main ()
11846{
81ecdfbb 11847return LC_MESSAGES
a9322a30
TT
11848 ;
11849 return 0;
11850}
bec39cab 11851_ACEOF
81ecdfbb
RW
11852if ac_fn_c_try_link "$LINENO"; then :
11853 am_cv_val_LC_MESSAGES=yes
bec39cab 11854else
81ecdfbb
RW
11855 am_cv_val_LC_MESSAGES=no
11856fi
11857rm -f core conftest.err conftest.$ac_objext \
11858 conftest$ac_exeext conftest.$ac_ext
11859fi
11860{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
11861$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
11862 if test $am_cv_val_LC_MESSAGES = yes; then
bec39cab 11863
81ecdfbb
RW
11864$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
11865
11866 fi
11867
11868
11869# ----------------------- #
11870# Checks for structures. #
11871# ----------------------- #
11872
11873ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
11874if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
11875
11876cat >>confdefs.h <<_ACEOF
11877#define HAVE_STRUCT_STAT_ST_BLOCKS 1
7eb368b3 11878_ACEOF
7eb368b3 11879
81ecdfbb 11880
7eb368b3 11881fi
81ecdfbb
RW
11882ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
11883if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
7eb368b3 11884
a9322a30
TT
11885cat >>confdefs.h <<_ACEOF
11886#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
7eb368b3
NR
11887_ACEOF
11888
a9322a30 11889
7eb368b3
NR
11890fi
11891
7eb368b3 11892
a9322a30
TT
11893# ------------------ #
11894# Checks for types. #
11895# ------------------ #
7eb368b3 11896
81ecdfbb 11897ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
a9322a30
TT
11898#include <sys/socket.h>
11899
81ecdfbb
RW
11900"
11901if test "x$ac_cv_type_socklen_t" = x""yes; then :
bec39cab 11902
a9322a30
TT
11903cat >>confdefs.h <<_ACEOF
11904#define HAVE_SOCKLEN_T 1
11905_ACEOF
11906
11907
11908fi
11909
11910
11911# ------------------------------------- #
11912# Checks for compiler characteristics. #
11913# ------------------------------------- #
11914
81ecdfbb
RW
11915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11916$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
11917if test "${ac_cv_c_const+set}" = set; then :
11918 $as_echo_n "(cached) " >&6
a9322a30 11919else
81ecdfbb 11920 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11921/* end confdefs.h. */
a9322a30
TT
11922
11923int
11924main ()
11925{
11926/* FIXME: Include the comments suggested by Paul. */
11927#ifndef __cplusplus
11928 /* Ultrix mips cc rejects this. */
11929 typedef int charset[2];
81ecdfbb 11930 const charset cs;
a9322a30 11931 /* SunOS 4.1.1 cc rejects this. */
81ecdfbb
RW
11932 char const *const *pcpcc;
11933 char **ppc;
a9322a30
TT
11934 /* NEC SVR4.0.2 mips cc rejects this. */
11935 struct point {int x, y;};
11936 static struct point const zero = {0,0};
11937 /* AIX XL C 1.02.0.0 rejects this.
11938 It does not let you subtract one const X* pointer from another in
11939 an arm of an if-expression whose if-part is not a constant
11940 expression */
11941 const char *g = "string";
81ecdfbb 11942 pcpcc = &g + (g ? g-g : 0);
a9322a30 11943 /* HPUX 7.0 cc rejects these. */
81ecdfbb
RW
11944 ++pcpcc;
11945 ppc = (char**) pcpcc;
11946 pcpcc = (char const *const *) ppc;
a9322a30
TT
11947 { /* SCO 3.2v4 cc rejects this. */
11948 char *t;
11949 char const *s = 0 ? (char *) 0 : (char const *) 0;
11950
11951 *t++ = 0;
81ecdfbb 11952 if (s) return 0;
a9322a30
TT
11953 }
11954 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11955 int x[] = {25, 17};
11956 const int *foo = &x[0];
11957 ++foo;
11958 }
11959 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11960 typedef const int *iptr;
11961 iptr p = 0;
11962 ++p;
11963 }
11964 { /* AIX XL C 1.02.0.0 rejects this saying
11965 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11966 struct s { int j; const int *ap[3]; };
11967 struct s *b; b->j = 5;
11968 }
11969 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11970 const int foo = 10;
81ecdfbb 11971 if (!foo) return 0;
a9322a30 11972 }
81ecdfbb 11973 return !cs[0] && !zero.x;
a9322a30
TT
11974#endif
11975
11976 ;
11977 return 0;
11978}
bec39cab 11979_ACEOF
81ecdfbb 11980if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 11981 ac_cv_c_const=yes
5ee754fc 11982else
81ecdfbb 11983 ac_cv_c_const=no
5ee754fc 11984fi
81ecdfbb 11985rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 11986fi
81ecdfbb
RW
11987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11988$as_echo "$ac_cv_c_const" >&6; }
a9322a30 11989if test $ac_cv_c_const = no; then
bec39cab 11990
81ecdfbb 11991$as_echo "#define const /**/" >>confdefs.h
bec39cab 11992
5ee754fc 11993fi
bec39cab 11994
81ecdfbb
RW
11995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
11996$as_echo_n "checking for inline... " >&6; }
11997if test "${ac_cv_c_inline+set}" = set; then :
11998 $as_echo_n "(cached) " >&6
bec39cab 11999else
a9322a30
TT
12000 ac_cv_c_inline=no
12001for ac_kw in inline __inline__ __inline; do
81ecdfbb 12002 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12003/* end confdefs.h. */
a9322a30
TT
12004#ifndef __cplusplus
12005typedef int foo_t;
12006static $ac_kw foo_t static_foo () {return 0; }
12007$ac_kw foo_t foo () {return 0; }
12008#endif
12009
bec39cab 12010_ACEOF
81ecdfbb
RW
12011if ac_fn_c_try_compile "$LINENO"; then :
12012 ac_cv_c_inline=$ac_kw
bec39cab 12013fi
81ecdfbb
RW
12014rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12015 test "$ac_cv_c_inline" != no && break
a9322a30 12016done
bec39cab 12017
5ee754fc 12018fi
81ecdfbb
RW
12019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
12020$as_echo "$ac_cv_c_inline" >&6; }
5ee754fc 12021
a9322a30
TT
12022case $ac_cv_c_inline in
12023 inline | yes) ;;
12024 *)
12025 case $ac_cv_c_inline in
12026 no) ac_val=;;
12027 *) ac_val=$ac_cv_c_inline;;
12028 esac
12029 cat >>confdefs.h <<_ACEOF
12030#ifndef __cplusplus
12031#define inline $ac_val
12032#endif
12033_ACEOF
bec39cab
AC
12034 ;;
12035esac
bec39cab 12036
81ecdfbb
RW
12037 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12038$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
12039if test "${ac_cv_c_bigendian+set}" = set; then :
12040 $as_echo_n "(cached) " >&6
bec39cab 12041else
81ecdfbb
RW
12042 ac_cv_c_bigendian=unknown
12043 # See if we're dealing with a universal compiler.
12044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12045/* end confdefs.h. */
12046#ifndef __APPLE_CC__
12047 not a universal capable compiler
12048 #endif
12049 typedef int dummy;
12050
12051_ACEOF
12052if ac_fn_c_try_compile "$LINENO"; then :
12053
12054 # Check for potential -arch flags. It is not universal unless
12055 # there are at least two -arch flags with different values.
12056 ac_arch=
12057 ac_prev=
12058 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12059 if test -n "$ac_prev"; then
12060 case $ac_word in
12061 i?86 | x86_64 | ppc | ppc64)
12062 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12063 ac_arch=$ac_word
12064 else
12065 ac_cv_c_bigendian=universal
12066 break
12067 fi
12068 ;;
12069 esac
12070 ac_prev=
12071 elif test "x$ac_word" = "x-arch"; then
12072 ac_prev=arch
12073 fi
12074 done
12075fi
12076rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12077 if test $ac_cv_c_bigendian = unknown; then
12078 # See if sys/param.h defines the BYTE_ORDER macro.
12079 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12080/* end confdefs.h. */
a9322a30 12081#include <sys/types.h>
81ecdfbb 12082 #include <sys/param.h>
a9322a30
TT
12083
12084int
12085main ()
12086{
81ecdfbb
RW
12087#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12088 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12089 && LITTLE_ENDIAN)
12090 bogus endian macros
12091 #endif
a9322a30
TT
12092
12093 ;
12094 return 0;
12095}
bec39cab 12096_ACEOF
81ecdfbb 12097if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12098 # It does; now see whether it defined to BIG_ENDIAN or not.
81ecdfbb 12099 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12100/* end confdefs.h. */
a9322a30 12101#include <sys/types.h>
81ecdfbb 12102 #include <sys/param.h>
a9322a30
TT
12103
12104int
12105main ()
12106{
12107#if BYTE_ORDER != BIG_ENDIAN
81ecdfbb
RW
12108 not big endian
12109 #endif
a9322a30
TT
12110
12111 ;
12112 return 0;
12113}
bec39cab 12114_ACEOF
81ecdfbb 12115if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12116 ac_cv_c_bigendian=yes
5ee754fc 12117else
81ecdfbb 12118 ac_cv_c_bigendian=no
5ee754fc 12119fi
81ecdfbb
RW
12120rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12121fi
12122rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12123 fi
12124 if test $ac_cv_c_bigendian = unknown; then
12125 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12126 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12127/* end confdefs.h. */
12128#include <limits.h>
bec39cab 12129
81ecdfbb
RW
12130int
12131main ()
12132{
12133#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12134 bogus endian macros
12135 #endif
12136
12137 ;
12138 return 0;
12139}
7eb368b3 12140_ACEOF
81ecdfbb
RW
12141if ac_fn_c_try_compile "$LINENO"; then :
12142 # It does; now see whether it defined to _BIG_ENDIAN or not.
12143 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7eb368b3 12144/* end confdefs.h. */
81ecdfbb
RW
12145#include <limits.h>
12146
7eb368b3
NR
12147int
12148main ()
12149{
81ecdfbb
RW
12150#ifndef _BIG_ENDIAN
12151 not big endian
12152 #endif
12153
7eb368b3
NR
12154 ;
12155 return 0;
12156}
12157_ACEOF
81ecdfbb 12158if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12159 ac_cv_c_bigendian=yes
81ecdfbb
RW
12160else
12161 ac_cv_c_bigendian=no
a9322a30 12162fi
81ecdfbb 12163rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30 12164fi
81ecdfbb
RW
12165rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12166 fi
12167 if test $ac_cv_c_bigendian = unknown; then
12168 # Compile a test program.
12169 if test "$cross_compiling" = yes; then :
12170 # Try to guess by grepping values from an object file.
12171 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12172/* end confdefs.h. */
12173short int ascii_mm[] =
12174 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12175 short int ascii_ii[] =
12176 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12177 int use_ascii (int i) {
12178 return ascii_mm[i] + ascii_ii[i];
12179 }
12180 short int ebcdic_ii[] =
12181 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12182 short int ebcdic_mm[] =
12183 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12184 int use_ebcdic (int i) {
12185 return ebcdic_mm[i] + ebcdic_ii[i];
12186 }
12187 extern int foo;
7eb368b3 12188
81ecdfbb
RW
12189int
12190main ()
12191{
12192return use_ascii (foo) == use_ebcdic (foo);
12193 ;
12194 return 0;
12195}
12196_ACEOF
12197if ac_fn_c_try_compile "$LINENO"; then :
12198 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12199 ac_cv_c_bigendian=yes
12200 fi
12201 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12202 if test "$ac_cv_c_bigendian" = unknown; then
12203 ac_cv_c_bigendian=no
12204 else
12205 # finding both strings is unlikely to happen, but who knows?
12206 ac_cv_c_bigendian=unknown
12207 fi
12208 fi
7eb368b3 12209fi
81ecdfbb 12210rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 12211else
81ecdfbb 12212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12213/* end confdefs.h. */
81ecdfbb 12214$ac_includes_default
d3ea6809
MM
12215int
12216main ()
12217{
81ecdfbb
RW
12218
12219 /* Are we little or big endian? From Harbison&Steele. */
12220 union
12221 {
12222 long int l;
12223 char c[sizeof (long int)];
12224 } u;
12225 u.l = 1;
12226 return u.c[sizeof (long int) - 1] == 1;
12227
12228 ;
12229 return 0;
d3ea6809
MM
12230}
12231_ACEOF
81ecdfbb 12232if ac_fn_c_try_run "$LINENO"; then :
a9322a30 12233 ac_cv_c_bigendian=no
d3ea6809 12234else
81ecdfbb 12235 ac_cv_c_bigendian=yes
d3ea6809 12236fi
81ecdfbb
RW
12237rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12238 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 12239fi
a9322a30 12240
81ecdfbb
RW
12241 fi
12242fi
12243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12244$as_echo "$ac_cv_c_bigendian" >&6; }
12245 case $ac_cv_c_bigendian in #(
12246 yes)
12247 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12248;; #(
12249 no)
12250 ;; #(
12251 universal)
12252
12253$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
12254
12255 ;; #(
12256 *)
12257 as_fn_error "unknown endianness
12258 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
12259 esac
d3ea6809
MM
12260
12261
a9322a30
TT
12262# ------------------------------ #
12263# Checks for library functions. #
12264# ------------------------------ #
d3ea6809 12265
a9322a30 12266for ac_header in stdlib.h unistd.h
81ecdfbb
RW
12267do :
12268 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12269ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12270eval as_val=\$$as_ac_Header
12271 if test "x$as_val" = x""yes; then :
bec39cab 12272 cat >>confdefs.h <<_ACEOF
81ecdfbb 12273#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 12274_ACEOF
b757528f 12275
b757528f 12276fi
bec39cab 12277
a9322a30 12278done
a3828db0 12279
a9322a30 12280for ac_func in getpagesize
81ecdfbb
RW
12281do :
12282 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
12283if test "x$ac_cv_func_getpagesize" = x""yes; then :
bec39cab 12284 cat >>confdefs.h <<_ACEOF
81ecdfbb 12285#define HAVE_GETPAGESIZE 1
bec39cab 12286_ACEOF
bcb3dc3d 12287
bcb3dc3d
MK
12288fi
12289done
12290
81ecdfbb
RW
12291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
12292$as_echo_n "checking for working mmap... " >&6; }
12293if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then :
12294 $as_echo_n "(cached) " >&6
a9322a30 12295else
81ecdfbb 12296 if test "$cross_compiling" = yes; then :
a9322a30 12297 ac_cv_func_mmap_fixed_mapped=no
bec39cab 12298else
81ecdfbb 12299 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12300/* end confdefs.h. */
a9322a30
TT
12301$ac_includes_default
12302/* malloc might have been renamed as rpl_malloc. */
12303#undef malloc
bec39cab 12304
a9322a30
TT
12305/* Thanks to Mike Haertel and Jim Avera for this test.
12306 Here is a matrix of mmap possibilities:
12307 mmap private not fixed
12308 mmap private fixed at somewhere currently unmapped
12309 mmap private fixed at somewhere already mapped
12310 mmap shared not fixed
12311 mmap shared fixed at somewhere currently unmapped
12312 mmap shared fixed at somewhere already mapped
12313 For private mappings, we should verify that changes cannot be read()
12314 back from the file, nor mmap's back from the file at a different
12315 address. (There have been systems where private was not correctly
12316 implemented like the infamous i386 svr4.0, and systems where the
12317 VM page cache was not coherent with the file system buffer cache
12318 like early versions of FreeBSD and possibly contemporary NetBSD.)
12319 For shared mappings, we should conversely verify that changes get
12320 propagated back to all the places they're supposed to be.
bec39cab 12321
a9322a30
TT
12322 Grep wants private fixed already mapped.
12323 The main things grep needs to know about mmap are:
12324 * does it exist and is it safe to write into the mmap'd area
12325 * how to use it (BSD variants) */
8b9cf735 12326
a9322a30
TT
12327#include <fcntl.h>
12328#include <sys/mman.h>
8b9cf735 12329
81ecdfbb 12330#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
a9322a30 12331char *malloc ();
a3828db0
MK
12332#endif
12333
a9322a30 12334/* This mess was copied from the GNU getpagesize.h. */
81ecdfbb 12335#ifndef HAVE_GETPAGESIZE
a9322a30 12336/* Assume that all systems that can run configure have sys/param.h. */
81ecdfbb 12337# ifndef HAVE_SYS_PARAM_H
a9322a30
TT
12338# define HAVE_SYS_PARAM_H 1
12339# endif
12340
12341# ifdef _SC_PAGESIZE
12342# define getpagesize() sysconf(_SC_PAGESIZE)
12343# else /* no _SC_PAGESIZE */
81ecdfbb 12344# ifdef HAVE_SYS_PARAM_H
a9322a30
TT
12345# include <sys/param.h>
12346# ifdef EXEC_PAGESIZE
12347# define getpagesize() EXEC_PAGESIZE
12348# else /* no EXEC_PAGESIZE */
12349# ifdef NBPG
12350# define getpagesize() NBPG * CLSIZE
12351# ifndef CLSIZE
12352# define CLSIZE 1
12353# endif /* no CLSIZE */
12354# else /* no NBPG */
12355# ifdef NBPC
12356# define getpagesize() NBPC
12357# else /* no NBPC */
12358# ifdef PAGESIZE
12359# define getpagesize() PAGESIZE
12360# endif /* PAGESIZE */
12361# endif /* no NBPC */
12362# endif /* no NBPG */
12363# endif /* no EXEC_PAGESIZE */
12364# else /* no HAVE_SYS_PARAM_H */
12365# define getpagesize() 8192 /* punt totally */
12366# endif /* no HAVE_SYS_PARAM_H */
12367# endif /* no _SC_PAGESIZE */
12368
12369#endif /* no HAVE_GETPAGESIZE */
12370
bec39cab
AC
12371int
12372main ()
12373{
a9322a30
TT
12374 char *data, *data2, *data3;
12375 int i, pagesize;
12376 int fd;
12377
12378 pagesize = getpagesize ();
12379
12380 /* First, make a file with some known garbage in it. */
12381 data = (char *) malloc (pagesize);
12382 if (!data)
81ecdfbb 12383 return 1;
a9322a30
TT
12384 for (i = 0; i < pagesize; ++i)
12385 *(data + i) = rand ();
12386 umask (0);
12387 fd = creat ("conftest.mmap", 0600);
12388 if (fd < 0)
81ecdfbb 12389 return 1;
a9322a30 12390 if (write (fd, data, pagesize) != pagesize)
81ecdfbb 12391 return 1;
a9322a30
TT
12392 close (fd);
12393
12394 /* Next, try to mmap the file at a fixed address which already has
12395 something else allocated at it. If we can, also make sure that
12396 we see the same garbage. */
12397 fd = open ("conftest.mmap", O_RDWR);
12398 if (fd < 0)
81ecdfbb 12399 return 1;
a9322a30
TT
12400 data2 = (char *) malloc (2 * pagesize);
12401 if (!data2)
81ecdfbb
RW
12402 return 1;
12403 data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
a9322a30
TT
12404 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
12405 MAP_PRIVATE | MAP_FIXED, fd, 0L))
81ecdfbb 12406 return 1;
a9322a30
TT
12407 for (i = 0; i < pagesize; ++i)
12408 if (*(data + i) != *(data2 + i))
81ecdfbb 12409 return 1;
a9322a30
TT
12410
12411 /* Finally, make sure that changes to the mapped area do not
12412 percolate back to the file as seen by read(). (This is a bug on
12413 some variants of i386 svr4.0.) */
12414 for (i = 0; i < pagesize; ++i)
12415 *(data2 + i) = *(data2 + i) + 1;
12416 data3 = (char *) malloc (pagesize);
12417 if (!data3)
81ecdfbb 12418 return 1;
a9322a30 12419 if (read (fd, data3, pagesize) != pagesize)
81ecdfbb 12420 return 1;
a9322a30
TT
12421 for (i = 0; i < pagesize; ++i)
12422 if (*(data + i) != *(data3 + i))
81ecdfbb 12423 return 1;
a9322a30 12424 close (fd);
81ecdfbb 12425 return 0;
bec39cab
AC
12426}
12427_ACEOF
81ecdfbb 12428if ac_fn_c_try_run "$LINENO"; then :
a9322a30 12429 ac_cv_func_mmap_fixed_mapped=yes
086ec9eb 12430else
81ecdfbb 12431 ac_cv_func_mmap_fixed_mapped=no
a3828db0 12432fi
81ecdfbb
RW
12433rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12434 conftest.$ac_objext conftest.beam conftest.$ac_ext
a3828db0 12435fi
81ecdfbb 12436
a9322a30 12437fi
81ecdfbb
RW
12438{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
12439$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
a9322a30
TT
12440if test $ac_cv_func_mmap_fixed_mapped = yes; then
12441
81ecdfbb 12442$as_echo "#define HAVE_MMAP 1" >>confdefs.h
a3828db0 12443
086ec9eb 12444fi
a9322a30 12445rm -f conftest.mmap
a3828db0 12446
81ecdfbb
RW
12447ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
12448if test "x$ac_cv_type_pid_t" = x""yes; then :
bec39cab 12449
a9322a30
TT
12450else
12451
12452cat >>confdefs.h <<_ACEOF
12453#define pid_t int
bec39cab 12454_ACEOF
086ec9eb
MK
12455
12456fi
12457
81ecdfbb
RW
12458for ac_header in vfork.h
12459do :
12460 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
12461if test "x$ac_cv_header_vfork_h" = x""yes; then :
a3828db0 12462 cat >>confdefs.h <<_ACEOF
81ecdfbb 12463#define HAVE_VFORK_H 1
bec39cab 12464_ACEOF
c906108c
SS
12465
12466fi
a9322a30 12467
a3828db0 12468done
c906108c 12469
a9322a30 12470for ac_func in fork vfork
81ecdfbb
RW
12471do :
12472 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12473ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12474eval as_val=\$$as_ac_var
12475 if test "x$as_val" = x""yes; then :
a3828db0 12476 cat >>confdefs.h <<_ACEOF
81ecdfbb 12477#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 12478_ACEOF
b83266a0 12479
97bf5e38 12480fi
a3828db0 12481done
b83266a0 12482
a9322a30 12483if test "x$ac_cv_func_fork" = xyes; then
81ecdfbb
RW
12484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
12485$as_echo_n "checking for working fork... " >&6; }
12486if test "${ac_cv_func_fork_works+set}" = set; then :
12487 $as_echo_n "(cached) " >&6
a9322a30 12488else
81ecdfbb 12489 if test "$cross_compiling" = yes; then :
a9322a30
TT
12490 ac_cv_func_fork_works=cross
12491else
81ecdfbb
RW
12492 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12493/* end confdefs.h. */
12494$ac_includes_default
12495int
12496main ()
12497{
12498
12499 /* By Ruediger Kuhlmann. */
12500 return fork () < 0;
12501
12502 ;
12503 return 0;
12504}
a9322a30 12505_ACEOF
81ecdfbb 12506if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
12507 ac_cv_func_fork_works=yes
12508else
81ecdfbb 12509 ac_cv_func_fork_works=no
a9322a30 12510fi
81ecdfbb
RW
12511rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12512 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 12513fi
81ecdfbb 12514
a9322a30 12515fi
81ecdfbb
RW
12516{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
12517$as_echo "$ac_cv_func_fork_works" >&6; }
a9322a30
TT
12518
12519else
12520 ac_cv_func_fork_works=$ac_cv_func_fork
12521fi
12522if test "x$ac_cv_func_fork_works" = xcross; then
12523 case $host in
12524 *-*-amigaos* | *-*-msdosdjgpp*)
12525 # Override, as these systems have only a dummy fork() stub
12526 ac_cv_func_fork_works=no
12527 ;;
12528 *)
12529 ac_cv_func_fork_works=yes
12530 ;;
12531 esac
81ecdfbb
RW
12532 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
12533$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
a9322a30
TT
12534fi
12535ac_cv_func_vfork_works=$ac_cv_func_vfork
12536if test "x$ac_cv_func_vfork" = xyes; then
81ecdfbb
RW
12537 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
12538$as_echo_n "checking for working vfork... " >&6; }
12539if test "${ac_cv_func_vfork_works+set}" = set; then :
12540 $as_echo_n "(cached) " >&6
a9322a30 12541else
81ecdfbb 12542 if test "$cross_compiling" = yes; then :
a9322a30
TT
12543 ac_cv_func_vfork_works=cross
12544else
81ecdfbb 12545 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30
TT
12546/* end confdefs.h. */
12547/* Thanks to Paul Eggert for this test. */
81ecdfbb 12548$ac_includes_default
a9322a30 12549#include <sys/wait.h>
81ecdfbb 12550#ifdef HAVE_VFORK_H
a9322a30
TT
12551# include <vfork.h>
12552#endif
12553/* On some sparc systems, changes by the child to local and incoming
12554 argument registers are propagated back to the parent. The compiler
12555 is told about this with #include <vfork.h>, but some compilers
12556 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
12557 static variable whose address is put into a register that is
12558 clobbered by the vfork. */
12559static void
12560#ifdef __cplusplus
12561sparc_address_test (int arg)
12562# else
12563sparc_address_test (arg) int arg;
12564#endif
12565{
12566 static pid_t child;
12567 if (!child) {
12568 child = vfork ();
12569 if (child < 0) {
12570 perror ("vfork");
12571 _exit(2);
12572 }
12573 if (!child) {
12574 arg = getpid();
12575 write(-1, "", 0);
12576 _exit (arg);
12577 }
12578 }
12579}
12580
12581int
12582main ()
12583{
12584 pid_t parent = getpid ();
12585 pid_t child;
12586
12587 sparc_address_test (0);
12588
12589 child = vfork ();
12590
12591 if (child == 0) {
12592 /* Here is another test for sparc vfork register problems. This
12593 test uses lots of local variables, at least as many local
12594 variables as main has allocated so far including compiler
12595 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
12596 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
12597 reuse the register of parent for one of the local variables,
12598 since it will think that parent can't possibly be used any more
12599 in this routine. Assigning to the local variable will thus
12600 munge parent in the parent process. */
12601 pid_t
12602 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
12603 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
12604 /* Convince the compiler that p..p7 are live; otherwise, it might
12605 use the same hardware register for all 8 local variables. */
12606 if (p != p1 || p != p2 || p != p3 || p != p4
12607 || p != p5 || p != p6 || p != p7)
12608 _exit(1);
12609
12610 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
12611 from child file descriptors. If the child closes a descriptor
12612 before it execs or exits, this munges the parent's descriptor
12613 as well. Test for this by closing stdout in the child. */
12614 _exit(close(fileno(stdout)) != 0);
12615 } else {
12616 int status;
12617 struct stat st;
12618
12619 while (wait(&status) != child)
12620 ;
81ecdfbb 12621 return (
a9322a30
TT
12622 /* Was there some problem with vforking? */
12623 child < 0
12624
12625 /* Did the child fail? (This shouldn't happen.) */
12626 || status
12627
12628 /* Did the vfork/compiler bug occur? */
12629 || parent != getpid()
12630
12631 /* Did the file descriptor bug occur? */
12632 || fstat(fileno(stdout), &st) != 0
12633 );
12634 }
12635}
12636_ACEOF
81ecdfbb 12637if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
12638 ac_cv_func_vfork_works=yes
12639else
81ecdfbb 12640 ac_cv_func_vfork_works=no
a9322a30 12641fi
81ecdfbb
RW
12642rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12643 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 12644fi
81ecdfbb 12645
a9322a30 12646fi
81ecdfbb
RW
12647{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
12648$as_echo "$ac_cv_func_vfork_works" >&6; }
a9322a30
TT
12649
12650fi;
12651if test "x$ac_cv_func_fork_works" = xcross; then
12652 ac_cv_func_vfork_works=$ac_cv_func_vfork
81ecdfbb
RW
12653 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
12654$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
a9322a30
TT
12655fi
12656
12657if test "x$ac_cv_func_vfork_works" = xyes; then
12658
81ecdfbb 12659$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
a9322a30
TT
12660
12661else
12662
81ecdfbb 12663$as_echo "#define vfork fork" >>confdefs.h
a9322a30
TT
12664
12665fi
12666if test "x$ac_cv_func_fork_works" = xyes; then
12667
81ecdfbb 12668$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
a9322a30
TT
12669
12670fi
12671
cdf43629 12672for ac_func in getauxval getrusage getuid getgid \
bdca27a2 12673 pipe poll pread pread64 pwrite resize_term \
7313baad 12674 sbrk setpgid setpgrp setsid \
9467110b 12675 sigaction sigprocmask sigsetmask socketpair \
110ed339 12676 ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
3332aaf2 12677 setrlimit getrlimit posix_madvise waitpid \
4b8b5e72 12678 ptrace64 sigaltstack mkdtemp setns
81ecdfbb
RW
12679do :
12680 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12681ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12682eval as_val=\$$as_ac_var
12683 if test "x$as_val" = x""yes; then :
6c7a06a3 12684 cat >>confdefs.h <<_ACEOF
81ecdfbb 12685#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6c7a06a3
TT
12686_ACEOF
12687
12688fi
12689done
12690
12691
81ecdfbb
RW
12692 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
12693$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
12694if test "${am_cv_langinfo_codeset+set}" = set; then :
12695 $as_echo_n "(cached) " >&6
6c7a06a3 12696else
81ecdfbb 12697 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
12698/* end confdefs.h. */
12699#include <langinfo.h>
12700int
12701main ()
12702{
12703char* cs = nl_langinfo(CODESET);
bec39cab
AC
12704 ;
12705 return 0;
12706}
12707_ACEOF
81ecdfbb 12708if ac_fn_c_try_link "$LINENO"; then :
6c7a06a3 12709 am_cv_langinfo_codeset=yes
a4db0f07 12710else
81ecdfbb 12711 am_cv_langinfo_codeset=no
a4db0f07 12712fi
81ecdfbb
RW
12713rm -f core conftest.err conftest.$ac_objext \
12714 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 12715
a4db0f07 12716fi
81ecdfbb
RW
12717{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
12718$as_echo "$am_cv_langinfo_codeset" >&6; }
6c7a06a3
TT
12719 if test $am_cv_langinfo_codeset = yes; then
12720
81ecdfbb 12721$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
a4db0f07 12722
6c7a06a3 12723 fi
c906108c 12724
06825bd1 12725
3266f10b
TT
12726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
12727$as_echo_n "checking for ANSI C header files... " >&6; }
12728if test "${ac_cv_header_stdc+set}" = set; then :
12729 $as_echo_n "(cached) " >&6
12730else
12731 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12732/* end confdefs.h. */
12733#include <stdlib.h>
12734#include <stdarg.h>
12735#include <string.h>
12736#include <float.h>
12737
12738int
12739main ()
12740{
12741
12742 ;
12743 return 0;
12744}
12745_ACEOF
12746if ac_fn_c_try_compile "$LINENO"; then :
12747 ac_cv_header_stdc=yes
12748else
12749 ac_cv_header_stdc=no
12750fi
12751rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12752
12753if test $ac_cv_header_stdc = yes; then
12754 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12756/* end confdefs.h. */
12757#include <string.h>
12758
12759_ACEOF
12760if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12761 $EGREP "memchr" >/dev/null 2>&1; then :
12762
12763else
12764 ac_cv_header_stdc=no
12765fi
12766rm -f conftest*
12767
12768fi
12769
12770if test $ac_cv_header_stdc = yes; then
12771 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12773/* end confdefs.h. */
12774#include <stdlib.h>
12775
12776_ACEOF
12777if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12778 $EGREP "free" >/dev/null 2>&1; then :
12779
12780else
12781 ac_cv_header_stdc=no
12782fi
12783rm -f conftest*
12784
12785fi
12786
12787if test $ac_cv_header_stdc = yes; then
12788 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12789 if test "$cross_compiling" = yes; then :
12790 :
12791else
12792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12793/* end confdefs.h. */
12794#include <ctype.h>
12795#include <stdlib.h>
12796#if ((' ' & 0x0FF) == 0x020)
12797# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12798# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12799#else
12800# define ISLOWER(c) \
12801 (('a' <= (c) && (c) <= 'i') \
12802 || ('j' <= (c) && (c) <= 'r') \
12803 || ('s' <= (c) && (c) <= 'z'))
12804# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12805#endif
12806
12807#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12808int
12809main ()
12810{
12811 int i;
12812 for (i = 0; i < 256; i++)
12813 if (XOR (islower (i), ISLOWER (i))
12814 || toupper (i) != TOUPPER (i))
12815 return 2;
12816 return 0;
12817}
12818_ACEOF
12819if ac_fn_c_try_run "$LINENO"; then :
12820
12821else
12822 ac_cv_header_stdc=no
12823fi
12824rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12825 conftest.$ac_objext conftest.beam conftest.$ac_ext
12826fi
12827
12828fi
12829fi
12830{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
12831$as_echo "$ac_cv_header_stdc" >&6; }
12832if test $ac_cv_header_stdc = yes; then
12833
12834$as_echo "#define STDC_HEADERS 1" >>confdefs.h
12835
3266f10b
TT
12836fi
12837
12838 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
12839# for constant arguments. Useless!
12840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
12841$as_echo_n "checking for working alloca.h... " >&6; }
12842if test "${ac_cv_working_alloca_h+set}" = set; then :
12843 $as_echo_n "(cached) " >&6
12844else
12845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12846/* end confdefs.h. */
12847#include <alloca.h>
12848int
12849main ()
12850{
12851char *p = (char *) alloca (2 * sizeof (int));
12852 if (p) return 0;
12853 ;
12854 return 0;
12855}
12856_ACEOF
12857if ac_fn_c_try_link "$LINENO"; then :
12858 ac_cv_working_alloca_h=yes
12859else
12860 ac_cv_working_alloca_h=no
12861fi
12862rm -f core conftest.err conftest.$ac_objext \
12863 conftest$ac_exeext conftest.$ac_ext
12864fi
12865{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
12866$as_echo "$ac_cv_working_alloca_h" >&6; }
12867if test $ac_cv_working_alloca_h = yes; then
12868
12869$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
12870
12871fi
12872
12873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
12874$as_echo_n "checking for alloca... " >&6; }
12875if test "${ac_cv_func_alloca_works+set}" = set; then :
12876 $as_echo_n "(cached) " >&6
12877else
12878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12879/* end confdefs.h. */
12880#ifdef __GNUC__
12881# define alloca __builtin_alloca
12882#else
12883# ifdef _MSC_VER
12884# include <malloc.h>
12885# define alloca _alloca
12886# else
12887# ifdef HAVE_ALLOCA_H
12888# include <alloca.h>
12889# else
12890# ifdef _AIX
12891 #pragma alloca
12892# else
12893# ifndef alloca /* predefined by HP cc +Olibcalls */
12894char *alloca ();
12895# endif
12896# endif
12897# endif
12898# endif
12899#endif
12900
12901int
12902main ()
12903{
12904char *p = (char *) alloca (1);
12905 if (p) return 0;
12906 ;
12907 return 0;
12908}
12909_ACEOF
12910if ac_fn_c_try_link "$LINENO"; then :
12911 ac_cv_func_alloca_works=yes
12912else
12913 ac_cv_func_alloca_works=no
12914fi
12915rm -f core conftest.err conftest.$ac_objext \
12916 conftest$ac_exeext conftest.$ac_ext
12917fi
12918{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
12919$as_echo "$ac_cv_func_alloca_works" >&6; }
12920
12921if test $ac_cv_func_alloca_works = yes; then
12922
12923$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
12924
12925else
12926 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
12927# that cause trouble. Some versions do not even contain alloca or
12928# contain a buggy version. If you still want to use their alloca,
12929# use ar to extract alloca.o from them instead of compiling alloca.c.
12930
12931ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
12932
12933$as_echo "#define C_ALLOCA 1" >>confdefs.h
12934
12935
12936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
12937$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
12938if test "${ac_cv_os_cray+set}" = set; then :
12939 $as_echo_n "(cached) " >&6
12940else
12941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12942/* end confdefs.h. */
12943#if defined CRAY && ! defined CRAY2
12944webecray
12945#else
12946wenotbecray
12947#endif
12948
12949_ACEOF
12950if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12951 $EGREP "webecray" >/dev/null 2>&1; then :
12952 ac_cv_os_cray=yes
12953else
12954 ac_cv_os_cray=no
12955fi
12956rm -f conftest*
12957
12958fi
12959{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
12960$as_echo "$ac_cv_os_cray" >&6; }
12961if test $ac_cv_os_cray = yes; then
12962 for ac_func in _getb67 GETB67 getb67; do
12963 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12964ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12965eval as_val=\$$as_ac_var
12966 if test "x$as_val" = x""yes; then :
12967
12968cat >>confdefs.h <<_ACEOF
12969#define CRAY_STACKSEG_END $ac_func
12970_ACEOF
12971
12972 break
12973fi
12974
12975 done
12976fi
12977
12978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
12979$as_echo_n "checking stack direction for C alloca... " >&6; }
12980if test "${ac_cv_c_stack_direction+set}" = set; then :
12981 $as_echo_n "(cached) " >&6
12982else
12983 if test "$cross_compiling" = yes; then :
12984 ac_cv_c_stack_direction=0
12985else
12986 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12987/* end confdefs.h. */
12988$ac_includes_default
12989int
12990find_stack_direction ()
12991{
12992 static char *addr = 0;
12993 auto char dummy;
12994 if (addr == 0)
12995 {
12996 addr = &dummy;
12997 return find_stack_direction ();
12998 }
12999 else
13000 return (&dummy > addr) ? 1 : -1;
13001}
13002
13003int
13004main ()
13005{
13006 return find_stack_direction () < 0;
13007}
13008_ACEOF
13009if ac_fn_c_try_run "$LINENO"; then :
13010 ac_cv_c_stack_direction=1
13011else
13012 ac_cv_c_stack_direction=-1
13013fi
13014rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13015 conftest.$ac_objext conftest.beam conftest.$ac_ext
13016fi
13017
13018fi
13019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
13020$as_echo "$ac_cv_c_stack_direction" >&6; }
13021cat >>confdefs.h <<_ACEOF
13022#define STACK_DIRECTION $ac_cv_c_stack_direction
13023_ACEOF
13024
13025
13026fi
13027
13028
13029
13030 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
13031$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
13032if test "${am_cv_langinfo_codeset+set}" = set; then :
13033 $as_echo_n "(cached) " >&6
13034else
13035 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13036/* end confdefs.h. */
13037#include <langinfo.h>
13038int
13039main ()
13040{
13041char* cs = nl_langinfo(CODESET);
13042 ;
13043 return 0;
13044}
13045_ACEOF
13046if ac_fn_c_try_link "$LINENO"; then :
13047 am_cv_langinfo_codeset=yes
13048else
13049 am_cv_langinfo_codeset=no
13050fi
13051rm -f core conftest.err conftest.$ac_objext \
13052 conftest$ac_exeext conftest.$ac_ext
13053
13054fi
13055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
13056$as_echo "$am_cv_langinfo_codeset" >&6; }
13057 if test $am_cv_langinfo_codeset = yes; then
13058
13059$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
13060
13061 fi
13062
13063
c94fee56 13064 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 termios.h termio.h sgtty.h
3266f10b
TT
13065do :
13066 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13067ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13068eval as_val=\$$as_ac_Header
13069 if test "x$as_val" = x""yes; then :
13070 cat >>confdefs.h <<_ACEOF
13071#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13072_ACEOF
13073
13074fi
13075
13076done
13077
13078
f348d89a 13079 for ac_func in fdwalk getrlimit pipe pipe2 socketpair sigaction
3266f10b
TT
13080do :
13081 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13082ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13083eval as_val=\$$as_ac_var
13084 if test "x$as_val" = x""yes; then :
13085 cat >>confdefs.h <<_ACEOF
13086#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13087_ACEOF
13088
13089fi
13090done
13091
13092
13093 ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default"
13094if test "x$ac_cv_have_decl_strerror" = x""yes; then :
13095 ac_have_decl=1
13096else
13097 ac_have_decl=0
13098fi
13099
13100cat >>confdefs.h <<_ACEOF
13101#define HAVE_DECL_STRERROR $ac_have_decl
13102_ACEOF
13103ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
13104if test "x$ac_cv_have_decl_strstr" = x""yes; then :
13105 ac_have_decl=1
13106else
13107 ac_have_decl=0
13108fi
13109
13110cat >>confdefs.h <<_ACEOF
13111#define HAVE_DECL_STRSTR $ac_have_decl
13112_ACEOF
13113
13114
e9bcb658
GB
13115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
13116$as_echo_n "checking for sigsetjmp... " >&6; }
13117if test "${gdb_cv_func_sigsetjmp+set}" = set; then :
13118 $as_echo_n "(cached) " >&6
13119else
13120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13121/* end confdefs.h. */
13122
13123#include <setjmp.h>
13124
13125int
13126main ()
13127{
13128sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
13129 ;
13130 return 0;
13131}
13132_ACEOF
13133if ac_fn_c_try_compile "$LINENO"; then :
13134 gdb_cv_func_sigsetjmp=yes
13135else
13136 gdb_cv_func_sigsetjmp=no
13137fi
13138rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13139fi
13140{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
13141$as_echo "$gdb_cv_func_sigsetjmp" >&6; }
13142if test $gdb_cv_func_sigsetjmp = yes; then
13143
13144$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
13145
13146fi
13147
3266f10b 13148
54019719
PA
13149# Check the return and argument types of ptrace.
13150
13151
54019719
PA
13152for ac_header in sys/ptrace.h ptrace.h
13153do :
13154 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13155ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13156eval as_val=\$$as_ac_Header
13157 if test "x$as_val" = x""yes; then :
13158 cat >>confdefs.h <<_ACEOF
13159#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13160_ACEOF
13161
13162fi
13163
13164done
13165
13166
a3828db0 13167gdb_ptrace_headers='
4ff70b84 13168#include <sys/types.h>
a3828db0
MK
13169#if HAVE_SYS_PTRACE_H
13170# include <sys/ptrace.h>
13171#endif
13172#if HAVE_UNISTD_H
13173# include <unistd.h>
13174#endif
13175'
13176# There is no point in checking if we don't have a prototype.
9b30624b 13177ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers
81ecdfbb
RW
13178"
13179if test "x$ac_cv_have_decl_ptrace" = x""yes; then :
13180 ac_have_decl=1
06825bd1 13181else
81ecdfbb 13182 ac_have_decl=0
06825bd1 13183fi
06825bd1 13184
a3828db0 13185cat >>confdefs.h <<_ACEOF
81ecdfbb 13186#define HAVE_DECL_PTRACE $ac_have_decl
a3828db0 13187_ACEOF
81ecdfbb 13188if test $ac_have_decl = 1; then :
bec39cab 13189
a3828db0 13190else
a3828db0
MK
13191
13192 : ${gdb_cv_func_ptrace_ret='int'}
13193 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
13194
06825bd1
MK
13195fi
13196
064ef605
DJ
13197# Check return type. Varargs (used on GNU/Linux) conflict with the
13198# empty argument list, so check for that explicitly.
81ecdfbb
RW
13199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
13200$as_echo_n "checking return type of ptrace... " >&6; }
13201if test "${gdb_cv_func_ptrace_ret+set}" = set; then :
13202 $as_echo_n "(cached) " >&6
bec39cab 13203else
81ecdfbb 13204 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13205/* end confdefs.h. */
a3828db0 13206$gdb_ptrace_headers
bec39cab
AC
13207int
13208main ()
13209{
064ef605
DJ
13210extern long ptrace (enum __ptrace_request, ...);
13211 ;
13212 return 0;
13213}
13214_ACEOF
9b30624b 13215if ac_fn_c_try_compile "$LINENO"; then :
064ef605
DJ
13216 gdb_cv_func_ptrace_ret='long'
13217else
81ecdfbb 13218 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
13219/* end confdefs.h. */
13220$gdb_ptrace_headers
13221int
13222main ()
13223{
a3828db0 13224extern int ptrace ();
bec39cab
AC
13225 ;
13226 return 0;
13227}
13228_ACEOF
9b30624b 13229if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13230 gdb_cv_func_ptrace_ret='int'
70f9f479 13231else
81ecdfbb 13232 gdb_cv_func_ptrace_ret='long'
70f9f479 13233fi
81ecdfbb 13234rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
70f9f479 13235fi
81ecdfbb 13236rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
064ef605 13237fi
81ecdfbb
RW
13238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
13239$as_echo "$gdb_cv_func_ptrace_ret" >&6; }
bec39cab 13240
a3828db0
MK
13241cat >>confdefs.h <<_ACEOF
13242#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
bec39cab 13243_ACEOF
70f9f479 13244
a3828db0 13245# Check argument types.
81ecdfbb
RW
13246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
13247$as_echo_n "checking types of arguments for ptrace... " >&6; }
13248if test "${gdb_cv_func_ptrace_args+set}" = set; then :
13249 $as_echo_n "(cached) " >&6
bec39cab 13250else
a3828db0 13251
81ecdfbb 13252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
13253/* end confdefs.h. */
13254$gdb_ptrace_headers
13255int
13256main ()
13257{
13258extern long ptrace (enum __ptrace_request, ...);
13259 ;
13260 return 0;
13261}
13262_ACEOF
9b30624b 13263if ac_fn_c_try_compile "$LINENO"; then :
54019719 13264 gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long'
064ef605 13265else
064ef605 13266
a3828db0
MK
13267for gdb_arg1 in 'int' 'long'; do
13268 for gdb_arg2 in 'pid_t' 'int' 'long'; do
5ed10e6e 13269 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
96d7229d 13270 for gdb_arg4 in 'int' 'long' 'void *'; do
81ecdfbb 13271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13272/* end confdefs.h. */
a3828db0 13273$gdb_ptrace_headers
bec39cab
AC
13274int
13275main ()
13276{
a3828db0
MK
13277
13278extern $gdb_cv_func_ptrace_ret
13279 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
13280
bec39cab
AC
13281 ;
13282 return 0;
13283}
13284_ACEOF
9b30624b 13285if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
13286 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
13287 break 4;
5c7f2947 13288fi
81ecdfbb 13289rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0 13290 for gdb_arg5 in 'int *' 'int' 'long'; do
81ecdfbb 13291 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13292/* end confdefs.h. */
a3828db0 13293$gdb_ptrace_headers
bec39cab
AC
13294int
13295main ()
13296{
a3828db0
MK
13297
13298extern $gdb_cv_func_ptrace_ret
13299 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
13300
bec39cab
AC
13301 ;
13302 return 0;
13303}
13304_ACEOF
9b30624b 13305if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
13306
13307gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
13308 break 5;
78434e59 13309fi
81ecdfbb 13310rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0
MK
13311 done
13312 done
13313 done
13314 done
13315done
13316# Provide a safe default value.
13317: ${gdb_cv_func_ptrace_args='int,int,long,long'}
13318
064ef605 13319fi
81ecdfbb 13320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
78434e59 13321fi
81ecdfbb
RW
13322{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
13323$as_echo "$gdb_cv_func_ptrace_args" >&6; }
a3828db0
MK
13324ac_save_IFS=$IFS; IFS=','
13325set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
13326IFS=$ac_save_IFS
13327shift
bec39cab 13328
54019719
PA
13329cat >>confdefs.h <<_ACEOF
13330#define PTRACE_TYPE_ARG1 $1
13331_ACEOF
13332
13333
a3828db0
MK
13334cat >>confdefs.h <<_ACEOF
13335#define PTRACE_TYPE_ARG3 $3
13336_ACEOF
13337
96d7229d
LM
13338
13339cat >>confdefs.h <<_ACEOF
13340#define PTRACE_TYPE_ARG4 $4
13341_ACEOF
13342
a3828db0
MK
13343if test -n "$5"; then
13344
13345cat >>confdefs.h <<_ACEOF
13346#define PTRACE_TYPE_ARG5 $5
bec39cab 13347_ACEOF
78434e59
MK
13348
13349fi
13350
54019719 13351
a3828db0 13352if test "$cross_compiling" = no; then
81ecdfbb
RW
13353 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
13354$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
13355if test "${ac_cv_func_setpgrp_void+set}" = set; then :
13356 $as_echo_n "(cached) " >&6
a3828db0 13357else
81ecdfbb
RW
13358 if test "$cross_compiling" = yes; then :
13359 as_fn_error "cannot check setpgrp when cross compiling" "$LINENO" 5
bec39cab 13360else
81ecdfbb 13361 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13362/* end confdefs.h. */
81ecdfbb 13363$ac_includes_default
bec39cab
AC
13364int
13365main ()
13366{
a3828db0
MK
13367/* If this system has a BSD-style setpgrp which takes arguments,
13368 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
13369 exit successfully. */
81ecdfbb 13370 return setpgrp (1,1) != -1;
bec39cab
AC
13371 ;
13372 return 0;
13373}
13374_ACEOF
81ecdfbb 13375if ac_fn_c_try_run "$LINENO"; then :
a3828db0 13376 ac_cv_func_setpgrp_void=no
c906108c 13377else
81ecdfbb 13378 ac_cv_func_setpgrp_void=yes
c906108c 13379fi
81ecdfbb
RW
13380rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13381 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 13382fi
81ecdfbb 13383
a3828db0 13384fi
81ecdfbb
RW
13385{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
13386$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0
MK
13387if test $ac_cv_func_setpgrp_void = yes; then
13388
81ecdfbb 13389$as_echo "#define SETPGRP_VOID 1" >>confdefs.h
97bf5e38
MK
13390
13391fi
a3828db0
MK
13392
13393else
81ecdfbb
RW
13394 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
13395$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
13396if test "${ac_cv_func_setpgrp_void+set}" = set; then :
13397 $as_echo_n "(cached) " >&6
97bf5e38 13398else
81ecdfbb 13399 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13400/* end confdefs.h. */
a3828db0
MK
13401
13402#include <unistd.h>
13403
bec39cab
AC
13404int
13405main ()
13406{
a3828db0
MK
13407
13408 if (setpgrp(1,1) == -1)
13409 exit (0);
13410 else
13411 exit (1);
13412
bec39cab
AC
13413 ;
13414 return 0;
13415}
13416_ACEOF
81ecdfbb 13417if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13418 ac_cv_func_setpgrp_void=no
c906108c 13419else
81ecdfbb 13420 ac_cv_func_setpgrp_void=yes
c906108c 13421fi
81ecdfbb 13422rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 13423fi
81ecdfbb
RW
13424{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
13425$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0 13426if test $ac_cv_func_setpgrp_void = yes; then
81ecdfbb 13427 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
c3f6f71d 13428
a3828db0 13429fi
c906108c
SS
13430fi
13431
db1ff28b
JK
13432# Assume we'll default to using the included libiberty regex.
13433gdb_use_included_regex=yes
13434
13435# However, if the system regex is GNU regex, then default to *not*
13436# using the included regex.
13437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5
13438$as_echo_n "checking for GNU regex... " >&6; }
13439if test "${gdb_cv_have_gnu_regex+set}" = set; then :
13440 $as_echo_n "(cached) " >&6
13441else
13442 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13443/* end confdefs.h. */
13444#include <gnu-versions.h>
13445int
13446main ()
13447{
13448#define REGEX_INTERFACE_VERSION 1
13449#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
13450# error "Version mismatch"
13451#endif
13452 ;
13453 return 0;
13454}
13455_ACEOF
13456if ac_fn_c_try_compile "$LINENO"; then :
13457 gdb_cv_have_gnu_regex=yes
13458else
13459 gdb_cv_have_gnu_regex=no
13460fi
13461rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13462fi
13463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
13464$as_echo "$gdb_cv_have_gnu_regex" >&6; }
13465if test $gdb_cv_have_gnu_regex = yes; then
13466 gdb_use_included_regex=no
13467fi
13468
13469
13470# Check whether --with-included-regex was given.
13471if test "${with_included_regex+set}" = set; then :
13472 withval=$with_included_regex; gdb_with_regex=$withval
13473else
13474 gdb_with_regex=$gdb_use_included_regex
13475fi
13476
13477if test "$gdb_with_regex" = yes; then
13478
13479$as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h
13480
13481fi
13482
81ecdfbb
RW
13483# Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
13484ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
13485#include <sys/proc.h>
13486
13487"
13488if test "x$ac_cv_member_struct_thread_td_pcb" = x""yes; then :
c906108c 13489
5c45e068 13490cat >>confdefs.h <<_ACEOF
a3828db0 13491#define HAVE_STRUCT_THREAD_TD_PCB 1
bec39cab 13492_ACEOF
c906108c 13493
5c45e068 13494
97bf5e38 13495fi
c906108c 13496
5c45e068 13497
a3828db0 13498# See if <sys/lwp.h> defines `struct lwp`.
81ecdfbb
RW
13499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
13500$as_echo_n "checking for struct lwp... " >&6; }
13501if test "${gdb_cv_struct_lwp+set}" = set; then :
13502 $as_echo_n "(cached) " >&6
bec39cab 13503else
81ecdfbb 13504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13505/* end confdefs.h. */
a3828db0 13506#include <sys/param.h>
c49fbc6c 13507#define _KMEMUSER
a3828db0 13508#include <sys/lwp.h>
bec39cab
AC
13509int
13510main ()
13511{
a3828db0 13512struct lwp l;
bec39cab
AC
13513 ;
13514 return 0;
13515}
13516_ACEOF
81ecdfbb 13517if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13518 gdb_cv_struct_lwp=yes
c906108c 13519else
81ecdfbb 13520 gdb_cv_struct_lwp=no
c906108c 13521fi
81ecdfbb 13522rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 13523fi
81ecdfbb
RW
13524{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
13525$as_echo "$gdb_cv_struct_lwp" >&6; }
a3828db0 13526if test $gdb_cv_struct_lwp = yes; then
c906108c 13527
81ecdfbb 13528$as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
c906108c 13529
97bf5e38 13530fi
c906108c 13531
a3828db0 13532# See if <machine/reg.h> degines `struct reg'.
81ecdfbb
RW
13533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
13534$as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
13535if test "${gdb_cv_struct_reg+set}" = set; then :
13536 $as_echo_n "(cached) " >&6
bec39cab 13537else
81ecdfbb 13538 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13539/* end confdefs.h. */
a3828db0
MK
13540#include <sys/types.h>
13541#include <machine/reg.h>
bec39cab
AC
13542int
13543main ()
13544{
a3828db0 13545struct reg r;
bec39cab
AC
13546 ;
13547 return 0;
13548}
13549_ACEOF
81ecdfbb 13550if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13551 gdb_cv_struct_reg=yes
27ca5dad 13552else
81ecdfbb 13553 gdb_cv_struct_reg=no
27ca5dad 13554fi
81ecdfbb 13555rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27ca5dad 13556fi
81ecdfbb
RW
13557{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
13558$as_echo "$gdb_cv_struct_reg" >&6; }
a3828db0 13559if test $gdb_cv_struct_reg = yes; then
bec39cab 13560
81ecdfbb 13561$as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
27ca5dad
MC
13562
13563fi
97bf5e38 13564
a3828db0
MK
13565# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
13566# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
a6e69c1f
JB
13567ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <sys/types.h>
13568#include <machine/reg.h>
81ecdfbb
RW
13569"
13570if test "x$ac_cv_member_struct_reg_r_fs" = x""yes; then :
5c45e068
MK
13571
13572cat >>confdefs.h <<_ACEOF
a3828db0 13573#define HAVE_STRUCT_REG_R_FS 1
bec39cab 13574_ACEOF
3862412b 13575
5c45e068 13576
97bf5e38 13577fi
a6e69c1f
JB
13578ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <sys/types.h>
13579#include <machine/reg.h>
81ecdfbb
RW
13580"
13581if test "x$ac_cv_member_struct_reg_r_gs" = x""yes; then :
5c45e068
MK
13582
13583cat >>confdefs.h <<_ACEOF
a3828db0 13584#define HAVE_STRUCT_REG_R_GS 1
bec39cab 13585_ACEOF
3862412b 13586
5c45e068 13587
97bf5e38 13588fi
3862412b 13589
5c45e068 13590
6fea9e18
L
13591# See if <sys/user.h> supports the %fs_base and %gs_bas amd64 segment registers.
13592# Older amd64 Linux's don't have the fs_base and gs_base members of
13593# `struct user_regs_struct'.
13594ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "fs_base" "ac_cv_member_struct_user_regs_struct_fs_base" "#include <sys/user.h>
13595"
13596if test "x$ac_cv_member_struct_user_regs_struct_fs_base" = x""yes; then :
13597
13598cat >>confdefs.h <<_ACEOF
13599#define HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE 1
13600_ACEOF
13601
13602
13603fi
13604ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "gs_base" "ac_cv_member_struct_user_regs_struct_gs_base" "#include <sys/user.h>
13605"
13606if test "x$ac_cv_member_struct_user_regs_struct_gs_base" = x""yes; then :
13607
13608cat >>confdefs.h <<_ACEOF
13609#define HAVE_STRUCT_USER_REGS_STRUCT_GS_BASE 1
13610_ACEOF
13611
13612
13613fi
13614
13615
a3828db0 13616# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
81ecdfbb
RW
13617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
13618$as_echo_n "checking for PTRACE_GETREGS... " >&6; }
13619if test "${gdb_cv_have_ptrace_getregs+set}" = set; then :
13620 $as_echo_n "(cached) " >&6
451928c5 13621else
81ecdfbb 13622 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13623/* end confdefs.h. */
a3828db0 13624#include <sys/ptrace.h>
bec39cab
AC
13625int
13626main ()
13627{
a3828db0 13628PTRACE_GETREGS;
bec39cab
AC
13629 ;
13630 return 0;
13631}
13632_ACEOF
81ecdfbb 13633if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13634 gdb_cv_have_ptrace_getregs=yes
451928c5 13635else
81ecdfbb 13636 gdb_cv_have_ptrace_getregs=no
451928c5 13637fi
81ecdfbb 13638rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
13639fi
13640
81ecdfbb
RW
13641{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
13642$as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
a3828db0 13643if test $gdb_cv_have_ptrace_getregs = yes; then
60ca704f 13644
81ecdfbb 13645$as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
451928c5 13646
97bf5e38 13647fi
451928c5 13648
a3828db0 13649# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
81ecdfbb
RW
13650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
13651$as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
13652if test "${gdb_cv_have_ptrace_getfpxregs+set}" = set; then :
13653 $as_echo_n "(cached) " >&6
451928c5 13654else
81ecdfbb 13655 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13656/* end confdefs.h. */
a3828db0 13657#include <sys/ptrace.h>
bec39cab
AC
13658int
13659main ()
13660{
a3828db0 13661PTRACE_GETFPXREGS;
bec39cab
AC
13662 ;
13663 return 0;
13664}
13665_ACEOF
81ecdfbb 13666if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13667 gdb_cv_have_ptrace_getfpxregs=yes
451928c5 13668else
81ecdfbb 13669 gdb_cv_have_ptrace_getfpxregs=no
451928c5 13670fi
81ecdfbb 13671rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
13672fi
13673
81ecdfbb
RW
13674{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
13675$as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
a3828db0 13676if test $gdb_cv_have_ptrace_getfpxregs = yes; then
60ca704f 13677
81ecdfbb 13678$as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
451928c5 13679
97bf5e38 13680fi
451928c5 13681
a3828db0 13682# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
81ecdfbb
RW
13683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
13684$as_echo_n "checking for PT_GETDBREGS... " >&6; }
13685if test "${gdb_cv_have_pt_getdbregs+set}" = set; then :
13686 $as_echo_n "(cached) " >&6
3862412b 13687else
81ecdfbb 13688 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13689/* end confdefs.h. */
a3828db0
MK
13690#include <sys/types.h>
13691#include <sys/ptrace.h>
bec39cab
AC
13692int
13693main ()
13694{
a3828db0 13695PT_GETDBREGS;
bec39cab
AC
13696 ;
13697 return 0;
13698}
13699_ACEOF
81ecdfbb 13700if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13701 gdb_cv_have_pt_getdbregs=yes
3862412b 13702else
81ecdfbb 13703 gdb_cv_have_pt_getdbregs=no
3862412b 13704fi
81ecdfbb 13705rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
13706fi
13707
81ecdfbb
RW
13708{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
13709$as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
a3828db0 13710if test $gdb_cv_have_pt_getdbregs = yes; then
60ca704f 13711
81ecdfbb 13712$as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
3862412b 13713
97bf5e38 13714fi
3862412b 13715
a3828db0 13716# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
81ecdfbb
RW
13717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
13718$as_echo_n "checking for PT_GETXMMREGS... " >&6; }
13719if test "${gdb_cv_have_pt_getxmmregs+set}" = set; then :
13720 $as_echo_n "(cached) " >&6
3862412b 13721else
81ecdfbb 13722 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13723/* end confdefs.h. */
a3828db0
MK
13724#include <sys/types.h>
13725#include <sys/ptrace.h>
bec39cab
AC
13726int
13727main ()
13728{
a3828db0 13729PT_GETXMMREGS;
bec39cab
AC
13730 ;
13731 return 0;
13732}
13733_ACEOF
81ecdfbb 13734if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13735 gdb_cv_have_pt_getxmmregs=yes
3862412b 13736else
81ecdfbb 13737 gdb_cv_have_pt_getxmmregs=no
3862412b 13738fi
81ecdfbb 13739rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
13740fi
13741
81ecdfbb
RW
13742{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
13743$as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
a3828db0 13744if test $gdb_cv_have_pt_getxmmregs = yes; then
60ca704f 13745
81ecdfbb 13746$as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
3862412b 13747
97bf5e38 13748fi
3862412b 13749
6e9567fe
JB
13750# See if <sys/ptrace.h> supports LWP names on FreeBSD
13751# Older FreeBSD versions don't have the pl_tdname member of
13752# `struct ptrace_lwpinfo'.
13753ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_tdname" "ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" "#include <sys/ptrace.h>
13754"
13755if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" = x""yes; then :
13756
13757cat >>confdefs.h <<_ACEOF
13758#define HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME 1
13759_ACEOF
13760
13761
13762fi
13763
13764
e6cdd38e
JB
13765# See if <sys/ptrace.h> supports syscall fields on FreeBSD. The
13766# pl_syscall_code member of `struct ptrace_lwpinfo' was added in
13767# FreeBSD 10.3.
13768ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_syscall_code" "ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" "#include <sys/ptrace.h>
13769"
13770if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" = x""yes; then :
13771
13772cat >>confdefs.h <<_ACEOF
13773#define HAVE_STRUCT_PTRACE_LWPINFO_PL_SYSCALL_CODE 1
13774_ACEOF
13775
13776
13777fi
13778
6e9567fe 13779
05b4bd79 13780# Detect which type of /proc is in use, such as for Solaris.
97bf5e38
MK
13781
13782if test "${target}" = "${host}"; then
13783 case "${host}" in
7b00db47 13784 *-*-sysv4.2* | *-*-sysv5* )
60ca704f 13785
81ecdfbb 13786$as_echo "#define NEW_PROC_API 1" >>confdefs.h
97bf5e38
MK
13787
13788 ;;
c162e8c9 13789 *-*-solaris2.[6789] | *-*-solaris2.1[0-9]*)
60ca704f 13790
81ecdfbb 13791$as_echo "#define NEW_PROC_API 1" >>confdefs.h
c960c18f 13792
97bf5e38
MK
13793 ;;
13794 esac
13795fi
13796
13797if test "$ac_cv_header_sys_procfs_h" = yes; then
81ecdfbb
RW
13798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
13799$as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
13800 if test "${bfd_cv_have_sys_procfs_type_gregset_t+set}" = set; then :
13801 $as_echo_n "(cached) " >&6
596c9d4b 13802else
81ecdfbb 13803 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13804/* end confdefs.h. */
596c9d4b
KB
13805
13806#define _SYSCALL32
d30c5336
JK
13807/* Needed for new procfs interface on sparc-solaris. */
13808#define _STRUCTURED_PROC 1
596c9d4b 13809#include <sys/procfs.h>
bec39cab
AC
13810int
13811main ()
13812{
97bf5e38 13813gregset_t avar
bec39cab
AC
13814 ;
13815 return 0;
13816}
13817_ACEOF
81ecdfbb 13818if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13819 bfd_cv_have_sys_procfs_type_gregset_t=yes
596c9d4b 13820else
81ecdfbb 13821 bfd_cv_have_sys_procfs_type_gregset_t=no
bec39cab 13822
596c9d4b 13823fi
81ecdfbb 13824rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
13825fi
13826
97bf5e38 13827 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
bec39cab 13828
81ecdfbb 13829$as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
596c9d4b
KB
13830
13831 fi
81ecdfbb
RW
13832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
13833$as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
451928c5 13834
81ecdfbb
RW
13835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
13836$as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
13837 if test "${bfd_cv_have_sys_procfs_type_fpregset_t+set}" = set; then :
13838 $as_echo_n "(cached) " >&6
d84dd0c5 13839else
81ecdfbb 13840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13841/* end confdefs.h. */
97bf5e38
MK
13842
13843#define _SYSCALL32
d30c5336
JK
13844/* Needed for new procfs interface on sparc-solaris. */
13845#define _STRUCTURED_PROC 1
d84dd0c5 13846#include <sys/procfs.h>
bec39cab
AC
13847int
13848main ()
13849{
97bf5e38 13850fpregset_t avar
bec39cab
AC
13851 ;
13852 return 0;
13853}
13854_ACEOF
81ecdfbb 13855if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13856 bfd_cv_have_sys_procfs_type_fpregset_t=yes
d84dd0c5 13857else
81ecdfbb 13858 bfd_cv_have_sys_procfs_type_fpregset_t=no
bec39cab 13859
d84dd0c5 13860fi
81ecdfbb 13861rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d84dd0c5
MK
13862fi
13863
97bf5e38 13864 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
bec39cab 13865
81ecdfbb 13866$as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
d84dd0c5 13867
97bf5e38 13868 fi
81ecdfbb
RW
13869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
13870$as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
d84dd0c5 13871
81ecdfbb
RW
13872 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
13873$as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
13874 if test "${bfd_cv_have_sys_procfs_type_prgregset_t+set}" = set; then :
13875 $as_echo_n "(cached) " >&6
c906108c 13876else
81ecdfbb 13877 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13878/* end confdefs.h. */
c906108c 13879
97bf5e38 13880#define _SYSCALL32
d30c5336
JK
13881/* Needed for new procfs interface on sparc-solaris. */
13882#define _STRUCTURED_PROC 1
97bf5e38 13883#include <sys/procfs.h>
bec39cab
AC
13884int
13885main ()
13886{
97bf5e38 13887prgregset_t avar
bec39cab
AC
13888 ;
13889 return 0;
13890}
13891_ACEOF
81ecdfbb 13892if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13893 bfd_cv_have_sys_procfs_type_prgregset_t=yes
c906108c 13894else
81ecdfbb 13895 bfd_cv_have_sys_procfs_type_prgregset_t=no
bec39cab 13896
c906108c 13897fi
81ecdfbb 13898rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13899fi
13900
97bf5e38 13901 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
bec39cab 13902
81ecdfbb 13903$as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
c906108c 13904
97bf5e38 13905 fi
81ecdfbb
RW
13906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
13907$as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
c906108c 13908
81ecdfbb
RW
13909 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
13910$as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
13911 if test "${bfd_cv_have_sys_procfs_type_prfpregset_t+set}" = set; then :
13912 $as_echo_n "(cached) " >&6
d45fe813 13913else
81ecdfbb 13914 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13915/* end confdefs.h. */
97bf5e38
MK
13916
13917#define _SYSCALL32
d30c5336
JK
13918/* Needed for new procfs interface on sparc-solaris. */
13919#define _STRUCTURED_PROC 1
97bf5e38 13920#include <sys/procfs.h>
bec39cab
AC
13921int
13922main ()
13923{
97bf5e38 13924prfpregset_t avar
bec39cab
AC
13925 ;
13926 return 0;
13927}
13928_ACEOF
81ecdfbb 13929if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13930 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
d45fe813 13931else
81ecdfbb 13932 bfd_cv_have_sys_procfs_type_prfpregset_t=no
bec39cab 13933
d45fe813 13934fi
81ecdfbb 13935rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
13936fi
13937
97bf5e38 13938 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
bec39cab 13939
81ecdfbb 13940$as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
d45fe813 13941
97bf5e38 13942 fi
81ecdfbb
RW
13943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
13944$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
d45fe813 13945
81ecdfbb
RW
13946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
13947$as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
13948 if test "${bfd_cv_have_sys_procfs_type_prgregset32_t+set}" = set; then :
13949 $as_echo_n "(cached) " >&6
d45fe813 13950else
81ecdfbb 13951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13952/* end confdefs.h. */
97bf5e38
MK
13953
13954#define _SYSCALL32
d30c5336
JK
13955/* Needed for new procfs interface on sparc-solaris. */
13956#define _STRUCTURED_PROC 1
97bf5e38 13957#include <sys/procfs.h>
bec39cab
AC
13958int
13959main ()
13960{
97bf5e38 13961prgregset32_t avar
bec39cab
AC
13962 ;
13963 return 0;
13964}
13965_ACEOF
81ecdfbb 13966if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13967 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
d45fe813 13968else
81ecdfbb 13969 bfd_cv_have_sys_procfs_type_prgregset32_t=no
bec39cab 13970
d45fe813 13971fi
81ecdfbb 13972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
13973fi
13974
97bf5e38 13975 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
bec39cab 13976
81ecdfbb 13977$as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
d45fe813 13978
97bf5e38 13979 fi
81ecdfbb
RW
13980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
13981$as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
d45fe813 13982
81ecdfbb
RW
13983 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
13984$as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
13985 if test "${bfd_cv_have_sys_procfs_type_lwpid_t+set}" = set; then :
13986 $as_echo_n "(cached) " >&6
d45fe813 13987else
81ecdfbb 13988 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13989/* end confdefs.h. */
97bf5e38 13990
d45fe813 13991#define _SYSCALL32
d30c5336
JK
13992/* Needed for new procfs interface on sparc-solaris. */
13993#define _STRUCTURED_PROC 1
97bf5e38 13994#include <sys/procfs.h>
bec39cab
AC
13995int
13996main ()
13997{
97bf5e38 13998lwpid_t avar
bec39cab
AC
13999 ;
14000 return 0;
14001}
14002_ACEOF
81ecdfbb 14003if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14004 bfd_cv_have_sys_procfs_type_lwpid_t=yes
d45fe813 14005else
81ecdfbb 14006 bfd_cv_have_sys_procfs_type_lwpid_t=no
bec39cab 14007
d45fe813 14008fi
81ecdfbb 14009rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
14010fi
14011
97bf5e38 14012 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
bec39cab 14013
81ecdfbb 14014$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
d45fe813 14015
97bf5e38 14016 fi
81ecdfbb
RW
14017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
14018$as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
c906108c 14019
81ecdfbb
RW
14020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
14021$as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
14022 if test "${bfd_cv_have_sys_procfs_type_psaddr_t+set}" = set; then :
14023 $as_echo_n "(cached) " >&6
c906108c 14024else
81ecdfbb 14025 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14026/* end confdefs.h. */
c906108c 14027
97bf5e38 14028#define _SYSCALL32
d30c5336
JK
14029/* Needed for new procfs interface on sparc-solaris. */
14030#define _STRUCTURED_PROC 1
97bf5e38 14031#include <sys/procfs.h>
bec39cab
AC
14032int
14033main ()
14034{
97bf5e38 14035psaddr_t avar
bec39cab
AC
14036 ;
14037 return 0;
14038}
14039_ACEOF
81ecdfbb 14040if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14041 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c 14042else
81ecdfbb 14043 bfd_cv_have_sys_procfs_type_psaddr_t=no
bec39cab 14044
c906108c 14045fi
81ecdfbb 14046rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
14047fi
14048
97bf5e38 14049 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
bec39cab 14050
81ecdfbb 14051$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
c906108c 14052
97bf5e38 14053 fi
81ecdfbb
RW
14054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
14055$as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
c906108c 14056
81ecdfbb
RW
14057 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prsysent_t in sys/procfs.h" >&5
14058$as_echo_n "checking for prsysent_t in sys/procfs.h... " >&6; }
14059 if test "${bfd_cv_have_sys_procfs_type_prsysent_t+set}" = set; then :
14060 $as_echo_n "(cached) " >&6
c906108c 14061else
81ecdfbb 14062 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14063/* end confdefs.h. */
c906108c 14064
97bf5e38 14065#define _SYSCALL32
d30c5336
JK
14066/* Needed for new procfs interface on sparc-solaris. */
14067#define _STRUCTURED_PROC 1
97bf5e38 14068#include <sys/procfs.h>
bec39cab
AC
14069int
14070main ()
14071{
97bf5e38 14072prsysent_t avar
bec39cab
AC
14073 ;
14074 return 0;
14075}
14076_ACEOF
81ecdfbb 14077if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14078 bfd_cv_have_sys_procfs_type_prsysent_t=yes
c906108c 14079else
81ecdfbb 14080 bfd_cv_have_sys_procfs_type_prsysent_t=no
bec39cab 14081
c906108c 14082fi
81ecdfbb 14083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
14084fi
14085
97bf5e38 14086 if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
bec39cab 14087
81ecdfbb 14088$as_echo "#define HAVE_PRSYSENT_T 1" >>confdefs.h
c906108c 14089
97bf5e38 14090 fi
81ecdfbb
RW
14091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prsysent_t" >&5
14092$as_echo "$bfd_cv_have_sys_procfs_type_prsysent_t" >&6; }
c906108c 14093
81ecdfbb
RW
14094 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigset_t in sys/procfs.h" >&5
14095$as_echo_n "checking for pr_sigset_t in sys/procfs.h... " >&6; }
14096 if test "${bfd_cv_have_sys_procfs_type_pr_sigset_t+set}" = set; then :
14097 $as_echo_n "(cached) " >&6
c906108c 14098else
81ecdfbb 14099 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14100/* end confdefs.h. */
c906108c 14101
97bf5e38 14102#define _SYSCALL32
d30c5336
JK
14103/* Needed for new procfs interface on sparc-solaris. */
14104#define _STRUCTURED_PROC 1
97bf5e38 14105#include <sys/procfs.h>
bec39cab
AC
14106int
14107main ()
14108{
97bf5e38 14109pr_sigset_t avar
bec39cab
AC
14110 ;
14111 return 0;
14112}
14113_ACEOF
81ecdfbb 14114if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14115 bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
c906108c 14116else
81ecdfbb 14117 bfd_cv_have_sys_procfs_type_pr_sigset_t=no
bec39cab 14118
c906108c 14119fi
81ecdfbb 14120rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
14121fi
14122
97bf5e38 14123 if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
bec39cab 14124
81ecdfbb 14125$as_echo "#define HAVE_PR_SIGSET_T 1" >>confdefs.h
c906108c 14126
97bf5e38 14127 fi
81ecdfbb
RW
14128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigset_t" >&5
14129$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigset_t" >&6; }
c906108c 14130
81ecdfbb
RW
14131 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigaction64_t in sys/procfs.h" >&5
14132$as_echo_n "checking for pr_sigaction64_t in sys/procfs.h... " >&6; }
14133 if test "${bfd_cv_have_sys_procfs_type_pr_sigaction64_t+set}" = set; then :
14134 $as_echo_n "(cached) " >&6
c906108c 14135else
81ecdfbb 14136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14137/* end confdefs.h. */
c906108c 14138
97bf5e38 14139#define _SYSCALL32
d30c5336
JK
14140/* Needed for new procfs interface on sparc-solaris. */
14141#define _STRUCTURED_PROC 1
97bf5e38 14142#include <sys/procfs.h>
bec39cab
AC
14143int
14144main ()
14145{
97bf5e38 14146pr_sigaction64_t avar
bec39cab
AC
14147 ;
14148 return 0;
14149}
14150_ACEOF
81ecdfbb 14151if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14152 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
c906108c 14153else
81ecdfbb 14154 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
bec39cab 14155
c906108c 14156fi
81ecdfbb 14157rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
14158fi
14159
97bf5e38 14160 if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
bec39cab 14161
81ecdfbb 14162$as_echo "#define HAVE_PR_SIGACTION64_T 1" >>confdefs.h
c906108c 14163
97bf5e38 14164 fi
81ecdfbb
RW
14165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&5
14166$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&6; }
97bf5e38 14167
81ecdfbb
RW
14168 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_siginfo64_t in sys/procfs.h" >&5
14169$as_echo_n "checking for pr_siginfo64_t in sys/procfs.h... " >&6; }
14170 if test "${bfd_cv_have_sys_procfs_type_pr_siginfo64_t+set}" = set; then :
14171 $as_echo_n "(cached) " >&6
97bf5e38 14172else
81ecdfbb 14173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14174/* end confdefs.h. */
97bf5e38
MK
14175
14176#define _SYSCALL32
d30c5336
JK
14177/* Needed for new procfs interface on sparc-solaris. */
14178#define _STRUCTURED_PROC 1
97bf5e38 14179#include <sys/procfs.h>
bec39cab
AC
14180int
14181main ()
14182{
97bf5e38 14183pr_siginfo64_t avar
bec39cab
AC
14184 ;
14185 return 0;
14186}
14187_ACEOF
81ecdfbb 14188if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
14189 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
14190else
81ecdfbb 14191 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
bec39cab 14192
97bf5e38 14193fi
81ecdfbb 14194rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 14195fi
c906108c 14196
97bf5e38 14197 if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
bec39cab 14198
81ecdfbb 14199$as_echo "#define HAVE_PR_SIGINFO64_T 1" >>confdefs.h
c906108c 14200
97bf5e38 14201 fi
81ecdfbb
RW
14202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&5
14203$as_echo "$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&6; }
bec39cab
AC
14204
14205
97bf5e38
MK
14206
14207
14208
97bf5e38 14209 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
81ecdfbb
RW
14210 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether prfpregset_t type is broken" >&5
14211$as_echo_n "checking whether prfpregset_t type is broken... " >&6; }
14212 if test "${gdb_cv_prfpregset_t_broken+set}" = set; then :
14213 $as_echo_n "(cached) " >&6
c906108c 14214else
81ecdfbb 14215 if test "$cross_compiling" = yes; then :
97bf5e38 14216 gdb_cv_prfpregset_t_broken=yes
c906108c 14217else
81ecdfbb 14218 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14219/* end confdefs.h. */
97bf5e38
MK
14220#include <sys/procfs.h>
14221 int main ()
14222 {
14223 if (sizeof (prfpregset_t) == sizeof (void *))
14224 return 1;
14225 return 0;
14226 }
bec39cab 14227_ACEOF
81ecdfbb 14228if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 14229 gdb_cv_prfpregset_t_broken=no
81ecdfbb
RW
14230else
14231 gdb_cv_prfpregset_t_broken=yes
c906108c 14232fi
81ecdfbb
RW
14233rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14234 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 14235fi
81ecdfbb 14236
c906108c
SS
14237fi
14238
81ecdfbb
RW
14239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_prfpregset_t_broken" >&5
14240$as_echo "$gdb_cv_prfpregset_t_broken" >&6; }
97bf5e38 14241 if test $gdb_cv_prfpregset_t_broken = yes; then
60ca704f 14242
81ecdfbb 14243$as_echo "#define PRFPREGSET_T_BROKEN 1" >>confdefs.h
c906108c 14244
97bf5e38
MK
14245 fi
14246 fi
c906108c 14247fi
c906108c 14248
bc8bcb4b 14249# Check if the compiler supports the `long long' type.
c906108c 14250
81ecdfbb
RW
14251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
14252$as_echo_n "checking for long long support in compiler... " >&6; }
14253if test "${gdb_cv_c_long_long+set}" = set; then :
14254 $as_echo_n "(cached) " >&6
97bf5e38 14255else
81ecdfbb 14256 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14257/* end confdefs.h. */
bc8bcb4b 14258extern long long foo;
bec39cab
AC
14259int
14260main ()
14261{
bc8bcb4b 14262switch (foo & 2) { case 0: return 1; }
bec39cab
AC
14263 ;
14264 return 0;
14265}
14266_ACEOF
81ecdfbb 14267if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
14268 gdb_cv_c_long_long=yes
14269else
81ecdfbb 14270 gdb_cv_c_long_long=no
97bf5e38 14271fi
81ecdfbb 14272rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 14273fi
81ecdfbb
RW
14274{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
14275$as_echo "$gdb_cv_c_long_long" >&6; }
74a0d9f6
JK
14276if test $gdb_cv_c_long_long != yes; then
14277 # libdecnumber requires long long.
14278 as_fn_error "Compiler must support long long for GDB." "$LINENO" 5
97bf5e38
MK
14279fi
14280
bc8bcb4b 14281# Check if the compiler and runtime support printing long longs.
97bf5e38 14282
81ecdfbb
RW
14283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
14284$as_echo_n "checking for long long support in printf... " >&6; }
14285if test "${gdb_cv_printf_has_long_long+set}" = set; then :
14286 $as_echo_n "(cached) " >&6
97bf5e38 14287else
81ecdfbb 14288 if test "$cross_compiling" = yes; then :
97bf5e38
MK
14289 gdb_cv_printf_has_long_long=no
14290else
81ecdfbb 14291 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14292/* end confdefs.h. */
bc8bcb4b
MK
14293$ac_includes_default
14294int
14295main ()
14296{
14297char buf[32];
97bf5e38
MK
14298 long long l = 0;
14299 l = (l << 16) + 0x0123;
14300 l = (l << 16) + 0x4567;
14301 l = (l << 16) + 0x89ab;
14302 l = (l << 16) + 0xcdef;
14303 sprintf (buf, "0x%016llx", l);
14304 return (strcmp ("0x0123456789abcdef", buf));
bc8bcb4b
MK
14305 ;
14306 return 0;
c906108c 14307}
bec39cab 14308_ACEOF
81ecdfbb 14309if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
14310 gdb_cv_printf_has_long_long=yes
14311else
81ecdfbb 14312 gdb_cv_printf_has_long_long=no
97bf5e38 14313fi
81ecdfbb
RW
14314rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14315 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 14316fi
81ecdfbb 14317
97bf5e38 14318fi
81ecdfbb
RW
14319{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
14320$as_echo "$gdb_cv_printf_has_long_long" >&6; }
97bf5e38 14321if test $gdb_cv_printf_has_long_long = yes; then
bc8bcb4b 14322
81ecdfbb 14323$as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
97bf5e38
MK
14324
14325fi
97bf5e38 14326
1a619819
LM
14327# Check if the compiler and runtime support printing decfloats.
14328
81ecdfbb
RW
14329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
14330$as_echo_n "checking for decfloat support in printf... " >&6; }
14331if test "${gdb_cv_printf_has_decfloat+set}" = set; then :
14332 $as_echo_n "(cached) " >&6
1a619819 14333else
81ecdfbb 14334 if test "$cross_compiling" = yes; then :
1a619819
LM
14335 gdb_cv_printf_has_decfloat=no
14336else
81ecdfbb 14337 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1a619819
LM
14338/* end confdefs.h. */
14339$ac_includes_default
14340int
14341main ()
14342{
14343char buf[64];
14344 _Decimal32 d32 = 1.2345df;
14345 _Decimal64 d64 = 1.2345dd;
14346 _Decimal128 d128 = 1.2345dl;
14347 sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
14348 return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
14349 ;
14350 return 0;
14351}
14352_ACEOF
81ecdfbb 14353if ac_fn_c_try_run "$LINENO"; then :
1a619819
LM
14354 gdb_cv_printf_has_decfloat=yes
14355else
81ecdfbb 14356 gdb_cv_printf_has_decfloat=no
1a619819 14357fi
81ecdfbb
RW
14358rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14359 conftest.$ac_objext conftest.beam conftest.$ac_ext
1a619819 14360fi
81ecdfbb 14361
1a619819 14362fi
81ecdfbb
RW
14363{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
14364$as_echo "$gdb_cv_printf_has_decfloat" >&6; }
1a619819
LM
14365if test $gdb_cv_printf_has_decfloat = yes; then
14366
81ecdfbb 14367$as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
1a619819
LM
14368
14369fi
14370
bc8bcb4b
MK
14371# Check if the compiler supports the `long double' type. We can't use
14372# AC_C_LONG_DOUBLE because that one does additional checks on the
14373# constants defined in <float.h> that fail on some systems,
14374# e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
97bf5e38 14375
81ecdfbb
RW
14376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
14377$as_echo_n "checking for long double support in compiler... " >&6; }
14378if test "${gdb_cv_c_long_double+set}" = set; then :
14379 $as_echo_n "(cached) " >&6
97bf5e38 14380else
81ecdfbb 14381 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14382/* end confdefs.h. */
97bf5e38 14383long double foo;
bec39cab 14384_ACEOF
81ecdfbb 14385if ac_fn_c_try_compile "$LINENO"; then :
bc8bcb4b 14386 gdb_cv_c_long_double=yes
97bf5e38 14387else
81ecdfbb 14388 gdb_cv_c_long_double=no
97bf5e38 14389fi
81ecdfbb 14390rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 14391fi
81ecdfbb
RW
14392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
14393$as_echo "$gdb_cv_c_long_double" >&6; }
bc8bcb4b 14394if test $gdb_cv_c_long_double = yes; then
c906108c 14395
81ecdfbb 14396$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
14397
14398fi
14399
bc8bcb4b 14400# Check if the compiler and runtime support printing long doubles.
97bf5e38 14401
81ecdfbb
RW
14402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
14403$as_echo_n "checking for long double support in printf... " >&6; }
14404if test "${gdb_cv_printf_has_long_double+set}" = set; then :
14405 $as_echo_n "(cached) " >&6
97bf5e38 14406else
81ecdfbb 14407 if test "$cross_compiling" = yes; then :
97bf5e38
MK
14408 gdb_cv_printf_has_long_double=no
14409else
81ecdfbb 14410 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14411/* end confdefs.h. */
bc8bcb4b
MK
14412$ac_includes_default
14413int
14414main ()
14415{
14416char buf[16];
97bf5e38
MK
14417 long double f = 3.141592653;
14418 sprintf (buf, "%Lg", f);
14419 return (strncmp ("3.14159", buf, 7));
bc8bcb4b
MK
14420 ;
14421 return 0;
97bf5e38 14422}
bec39cab 14423_ACEOF
81ecdfbb 14424if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 14425 gdb_cv_printf_has_long_double=yes
c906108c 14426else
81ecdfbb 14427 gdb_cv_printf_has_long_double=no
c906108c 14428fi
81ecdfbb
RW
14429rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14430 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 14431fi
81ecdfbb 14432
c906108c 14433fi
81ecdfbb
RW
14434{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
14435$as_echo "$gdb_cv_printf_has_long_double" >&6; }
97bf5e38 14436if test $gdb_cv_printf_has_long_double = yes; then
bc8bcb4b 14437
81ecdfbb 14438$as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
14439
14440fi
97bf5e38 14441
bc8bcb4b 14442# Check if the compiler and runtime support scanning long doubles.
97bf5e38 14443
81ecdfbb
RW
14444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
14445$as_echo_n "checking for long double support in scanf... " >&6; }
14446if test "${gdb_cv_scanf_has_long_double+set}" = set; then :
14447 $as_echo_n "(cached) " >&6
97bf5e38 14448else
81ecdfbb 14449 if test "$cross_compiling" = yes; then :
97bf5e38
MK
14450 gdb_cv_scanf_has_long_double=no
14451else
81ecdfbb 14452 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14453/* end confdefs.h. */
bc8bcb4b
MK
14454#include <stdio.h>
14455int
14456main ()
14457{
14458char *buf = "3.141592653";
97bf5e38
MK
14459 long double f = 0;
14460 sscanf (buf, "%Lg", &f);
14461 return !(f > 3.14159 && f < 3.14160);
bc8bcb4b
MK
14462 ;
14463 return 0;
97bf5e38 14464}
bec39cab 14465_ACEOF
81ecdfbb 14466if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
14467 gdb_cv_scanf_has_long_double=yes
14468else
81ecdfbb 14469 gdb_cv_scanf_has_long_double=no
97bf5e38 14470fi
81ecdfbb
RW
14471rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14472 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 14473fi
81ecdfbb 14474
c906108c 14475fi
81ecdfbb
RW
14476{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
14477$as_echo "$gdb_cv_scanf_has_long_double" >&6; }
97bf5e38 14478if test $gdb_cv_scanf_has_long_double = yes; then
bc8bcb4b 14479
81ecdfbb 14480$as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
14481
14482fi
c906108c 14483
438013df
AO
14484case ${host_os} in
14485aix*)
81ecdfbb
RW
14486 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
14487$as_echo_n "checking for -bbigtoc option... " >&6; }
14488if test "${gdb_cv_bigtoc+set}" = set; then :
14489 $as_echo_n "(cached) " >&6
438013df 14490else
bec39cab 14491
438013df
AO
14492 SAVE_LDFLAGS=$LDFLAGS
14493
14494 case $GCC in
14495 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
14496 *) gdb_cv_bigtoc=-bbigtoc ;;
14497 esac
14498
14499 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
81ecdfbb 14500 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14501/* end confdefs.h. */
438013df 14502
bec39cab
AC
14503int
14504main ()
14505{
438013df 14506int i;
bec39cab
AC
14507 ;
14508 return 0;
14509}
14510_ACEOF
81ecdfbb 14511if ac_fn_c_try_link "$LINENO"; then :
bec39cab 14512
81ecdfbb
RW
14513else
14514 gdb_cv_bigtoc=
438013df 14515fi
81ecdfbb
RW
14516rm -f core conftest.err conftest.$ac_objext \
14517 conftest$ac_exeext conftest.$ac_ext
ec76baa5 14518 LDFLAGS="${SAVE_LDFLAGS}"
438013df 14519
bec39cab 14520fi
81ecdfbb
RW
14521{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
14522$as_echo "$gdb_cv_bigtoc" >&6; }
438013df
AO
14523 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
14524 ;;
14525esac
14526
38f6b338 14527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
f6528abd 14528$as_echo_n "checking for the dynamic export flag... " >&6; }
38f6b338
JK
14529dynamic_list=false
14530if test "${gdb_native}" = yes; then
14531 # The dynamically loaded libthread_db needs access to symbols in the gdb
14532 # executable. Older GNU ld supports --export-dynamic but --dynamic-list
14533 # may not be supported there.
14534 old_LDFLAGS="$LDFLAGS"
14535 # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
14536 RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
14537 LDFLAGS="$LDFLAGS $RDYNAMIC"
14538 if test "${have_libpython}" = no; then
14539 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f6528abd
JK
14540/* end confdefs.h. */
14541
14542int
14543main ()
14544{
14545
14546 ;
14547 return 0;
14548}
14549_ACEOF
14550if ac_fn_c_try_link "$LINENO"; then :
3bebe2f2
JK
14551 dynamic_list=true
14552fi
14553rm -f core conftest.err conftest.$ac_objext \
14554 conftest$ac_exeext conftest.$ac_ext
38f6b338
JK
14555 else
14556 # Workaround http://bugs.python.org/issue4434 where static
14557 # libpythonX.Y.a would get its symbols required for
14558 # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
14559 # Problem does not happen for the recommended libpythonX.Y.so linkage.
a4a1c157
PA
14560
14561 # Note the workaround for Python
14562 # http://bugs.python.org/issue10112 earlier has removed
14563 # -export-dynamic from PYTHON_LIBS. That's exactly what we want
14564 # here too, as otherwise it'd make this -Wl,--dynamic-list test
14565 # always pass.
38f6b338
JK
14566 old_CFLAGS="$CFLAGS"
14567 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
8c1fb155
JK
14568 old_LIBS="$LIBS"
14569 LIBS="$LIBS $PYTHON_LIBS"
1b4f615e
PA
14570 old_CPPFLAGS="$CPPFLAGS"
14571 CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
38f6b338 14572 if test "$cross_compiling" = yes; then :
3bebe2f2 14573 true
f6528abd 14574else
3bebe2f2
JK
14575 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14576/* end confdefs.h. */
1b4f615e 14577#include "Python.h"
3bebe2f2
JK
14578int
14579main ()
14580{
14581int err;
38f6b338
JK
14582 Py_Initialize ();
14583 err = PyRun_SimpleString ("import itertools\n");
14584 Py_Finalize ();
14585 return err == 0 ? 0 : 1;
3bebe2f2
JK
14586 ;
14587 return 0;
14588}
14589_ACEOF
14590if ac_fn_c_try_run "$LINENO"; then :
14591 dynamic_list=true
14592fi
14593rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14594 conftest.$ac_objext conftest.beam conftest.$ac_ext
14595fi
14596
8c1fb155 14597 LIBS="$old_LIBS"
38f6b338 14598 CFLAGS="$old_CFLAGS"
1b4f615e 14599 CPPFLAGS="$old_CPPFLAGS"
38f6b338
JK
14600 fi
14601 LDFLAGS="$old_LDFLAGS"
14602fi
14603if $dynamic_list; then
14604 found="-Wl,--dynamic-list"
14605 RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
f6528abd 14606else
38f6b338
JK
14607 found="-rdynamic"
14608 RDYNAMIC="-rdynamic"
f6528abd 14609fi
f6528abd 14610
38f6b338 14611{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
f6528abd 14612$as_echo "$found" >&6; }
0407b3f1 14613
f6528abd 14614
0407b3f1 14615if test ${build} = ${host} -a ${host} = ${target} ; then
c906108c 14616 case ${host_os} in
d92419e5 14617 aix*)
81ecdfbb
RW
14618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
14619$as_echo_n "checking for AiX thread debugging library... " >&6; }
14620 if test "${gdb_cv_have_aix_thread_debug+set}" = set; then :
14621 $as_echo_n "(cached) " >&6
bec39cab 14622else
81ecdfbb 14623 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14624/* end confdefs.h. */
d92419e5 14625#include <sys/pthdebug.h>
bec39cab
AC
14626int
14627main ()
14628{
d92419e5
JB
14629#ifndef PTHDB_VERSION_3
14630 #error
14631 #endif
bec39cab
AC
14632 ;
14633 return 0;
14634}
14635_ACEOF
81ecdfbb 14636if ac_fn_c_try_compile "$LINENO"; then :
d92419e5
JB
14637 gdb_cv_have_aix_thread_debug=yes
14638else
81ecdfbb 14639 gdb_cv_have_aix_thread_debug=no
d92419e5 14640fi
81ecdfbb 14641rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d92419e5
JB
14642fi
14643
81ecdfbb
RW
14644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
14645$as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
d92419e5
JB
14646 if test $gdb_cv_have_aix_thread_debug = yes; then
14647 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
3483b318 14648 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
7f533142 14649 LIBS="$LIBS -lpthdebug"
d645e32e
JB
14650
14651 # Older versions of AIX do not provide the declaration for
14652 # the getthrds function (it appears that it was introduced
14653 # with AIX 6.x).
14654 ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h>
14655"
14656if test "x$ac_cv_have_decl_getthrds" = x""yes; then :
14657 ac_have_decl=1
14658else
14659 ac_have_decl=0
14660fi
14661
14662cat >>confdefs.h <<_ACEOF
14663#define HAVE_DECL_GETTHRDS $ac_have_decl
14664_ACEOF
14665
d92419e5
JB
14666 fi
14667 ;;
c906108c 14668 esac
bec39cab 14669
c906108c
SS
14670fi
14671
3f47be5c 14672if test "x$ac_cv_header_thread_db_h" = "xyes"; then
81ecdfbb
RW
14673 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
14674$as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
14675if test "${gdb_cv_thread_db_h_has_td_notalloc+set}" = set; then :
14676 $as_echo_n "(cached) " >&6
bec39cab 14677else
81ecdfbb 14678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14679/* end confdefs.h. */
3f47be5c 14680#include <thread_db.h>
bec39cab
AC
14681int
14682main ()
14683{
3f47be5c 14684int i = TD_NOTALLOC;
bec39cab
AC
14685 ;
14686 return 0;
14687}
14688_ACEOF
81ecdfbb 14689if ac_fn_c_try_compile "$LINENO"; then :
3f47be5c
EZ
14690 gdb_cv_thread_db_h_has_td_notalloc=yes
14691else
81ecdfbb 14692 gdb_cv_thread_db_h_has_td_notalloc=no
bec39cab 14693
3f47be5c 14694fi
81ecdfbb 14695rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3f47be5c 14696
bec39cab 14697fi
81ecdfbb
RW
14698{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
14699$as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
14700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
14701$as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
14702if test "${gdb_cv_thread_db_h_has_td_version+set}" = set; then :
14703 $as_echo_n "(cached) " >&6
59f80f10 14704else
81ecdfbb 14705 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
14706/* end confdefs.h. */
14707#include <thread_db.h>
14708int
14709main ()
14710{
14711int i = TD_VERSION;
14712 ;
14713 return 0;
14714}
14715_ACEOF
81ecdfbb 14716if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
14717 gdb_cv_thread_db_h_has_td_version=yes
14718else
81ecdfbb 14719 gdb_cv_thread_db_h_has_td_version=no
59f80f10
DJ
14720
14721fi
81ecdfbb 14722rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
14723
14724fi
81ecdfbb
RW
14725{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
14726$as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
14727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
14728$as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
14729if test "${gdb_cv_thread_db_h_has_td_notls+set}" = set; then :
14730 $as_echo_n "(cached) " >&6
59f80f10 14731else
81ecdfbb 14732 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
14733/* end confdefs.h. */
14734#include <thread_db.h>
14735int
14736main ()
14737{
14738int i = TD_NOTLS;
14739 ;
14740 return 0;
14741}
14742_ACEOF
81ecdfbb 14743if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
14744 gdb_cv_thread_db_h_has_td_notls=yes
14745else
81ecdfbb 14746 gdb_cv_thread_db_h_has_td_notls=no
59f80f10
DJ
14747
14748fi
81ecdfbb 14749rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
14750
14751fi
81ecdfbb
RW
14752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
14753$as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
3f47be5c
EZ
14754fi
14755if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
bec39cab 14756
81ecdfbb 14757$as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
3f47be5c 14758
59f80f10
DJ
14759fi
14760if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
14761
81ecdfbb 14762$as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
59f80f10
DJ
14763
14764fi
14765if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
14766
81ecdfbb 14767$as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
59f80f10 14768
3f47be5c
EZ
14769fi
14770
81ecdfbb
RW
14771ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
14772"
14773if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = x""yes; then :
14774 ac_have_decl=1
10568435 14775else
81ecdfbb 14776 ac_have_decl=0
10568435 14777fi
10568435
JK
14778
14779cat >>confdefs.h <<_ACEOF
81ecdfbb 14780#define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
10568435
JK
14781_ACEOF
14782
14783
81ecdfbb
RW
14784if test "$cross_compiling" = yes; then :
14785 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
14786/* end confdefs.h. */
14787#include <sys/personality.h>
14788int
14789main ()
14790{
14791
14792# if !HAVE_DECL_ADDR_NO_RANDOMIZE
14793# define ADDR_NO_RANDOMIZE 0x0040000
14794# endif
14795 /* Test the flag could be set and stays set. */
14796 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
14797 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
14798 return 1
14799 ;
14800 return 0;
14801}
14802_ACEOF
81ecdfbb 14803if ac_fn_c_try_link "$LINENO"; then :
10568435
JK
14804 have_personality=true
14805else
81ecdfbb 14806 have_personality=false
10568435 14807fi
81ecdfbb
RW
14808rm -f core conftest.err conftest.$ac_objext \
14809 conftest$ac_exeext conftest.$ac_ext
10568435 14810else
81ecdfbb 14811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
14812/* end confdefs.h. */
14813#include <sys/personality.h>
14814int
14815main ()
14816{
14817
14818# if !HAVE_DECL_ADDR_NO_RANDOMIZE
14819# define ADDR_NO_RANDOMIZE 0x0040000
14820# endif
14821 /* Test the flag could be set and stays set. */
14822 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
14823 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
14824 return 1
14825 ;
14826 return 0;
14827}
14828_ACEOF
81ecdfbb 14829if ac_fn_c_try_run "$LINENO"; then :
10568435
JK
14830 have_personality=true
14831else
81ecdfbb 14832 have_personality=false
10568435 14833fi
81ecdfbb
RW
14834rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14835 conftest.$ac_objext conftest.beam conftest.$ac_ext
10568435 14836fi
81ecdfbb 14837
10568435
JK
14838if $have_personality
14839then
14840
81ecdfbb 14841$as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
10568435
JK
14842
14843fi
14844
e655c1a2
PA
14845case $host_os in
14846 go32* | *djgpp*)
14847 gdbinit=gdb.ini
14848 ;;
14849 *)
14850 gdbinit=.gdbinit
14851 ;;
14852esac
14853
14854cat >>confdefs.h <<_ACEOF
14855#define GDBINIT "$gdbinit"
14856_ACEOF
14857
14858
fb40c209 14859
f83d8a90
DE
14860# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
14861# except that the argument to --with-sysroot is optional.
14862# --with-sysroot (or --with-sysroot=yes) sets the default sysroot path.
14863if test "x$with_sysroot" = xyes; then
14864 with_sysroot="${exec_prefix}/${target_alias}/sys-root"
14865fi
bec39cab 14866
81ecdfbb
RW
14867# Check whether --with-sysroot was given.
14868if test "${with_sysroot+set}" = set; then :
f83d8a90
DE
14869 withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval
14870else
14871 TARGET_SYSTEM_ROOT=
14872fi
030292b7 14873
030292b7 14874
f83d8a90
DE
14875 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
14876 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14877 ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT`
14878 ac_define_dir=`eval echo $ac_define_dir`
030292b7 14879
f83d8a90
DE
14880cat >>confdefs.h <<_ACEOF
14881#define TARGET_SYSTEM_ROOT "$ac_define_dir"
14882_ACEOF
bec39cab 14883
030292b7 14884
b14b1491 14885
f83d8a90
DE
14886
14887 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
14888 if test "x$prefix" = xNONE; then
14889 test_prefix=/usr/local
14890 else
14891 test_prefix=$prefix
14892 fi
14893 else
14894 test_prefix=$exec_prefix
14895 fi
14896 value=0
14897 case ${ac_define_dir} in
14898 "${test_prefix}"|"${test_prefix}/"*|\
14899 '${exec_prefix}'|'${exec_prefix}/'*)
14900 value=1
14901 ;;
14902 esac
14903
14904cat >>confdefs.h <<_ACEOF
14905#define TARGET_SYSTEM_ROOT_RELOCATABLE $value
14906_ACEOF
030292b7
DJ
14907
14908
14909
16e7150e 14910
16e7150e 14911
81ecdfbb
RW
14912# Check whether --with-system-gdbinit was given.
14913if test "${with_system_gdbinit+set}" = set; then :
14914 withval=$with_system_gdbinit;
b14b1491
TT
14915 SYSTEM_GDBINIT=$withval
14916else
14917 SYSTEM_GDBINIT=
81ecdfbb
RW
14918fi
14919
16e7150e
JG
14920
14921 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
14922 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 14923 ac_define_dir=`eval echo $SYSTEM_GDBINIT`
16e7150e
JG
14924 ac_define_dir=`eval echo $ac_define_dir`
14925
14926cat >>confdefs.h <<_ACEOF
14927#define SYSTEM_GDBINIT "$ac_define_dir"
14928_ACEOF
14929
14930
14931
0c4a4063 14932
b14b1491
TT
14933 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
14934 if test "x$prefix" = xNONE; then
14935 test_prefix=/usr/local
14936 else
14937 test_prefix=$prefix
14938 fi
14939 else
14940 test_prefix=$exec_prefix
14941 fi
14942 value=0
14943 case ${ac_define_dir} in
14944 "${test_prefix}"|"${test_prefix}/"*|\
14945 '${exec_prefix}'|'${exec_prefix}/'*)
14946 value=1
14947 ;;
14948 esac
16e7150e 14949
b14b1491
TT
14950cat >>confdefs.h <<_ACEOF
14951#define SYSTEM_GDBINIT_RELOCATABLE $value
16e7150e
JG
14952_ACEOF
14953
b14b1491 14954
16e7150e 14955
0c4a4063 14956
b835bb52 14957
81ecdfbb
RW
14958# Check whether --enable-werror was given.
14959if test "${enable_werror+set}" = set; then :
14960 enableval=$enable_werror; case "${enableval}" in
094a342e
MK
14961 yes | y) ERROR_ON_WARNING="yes" ;;
14962 no | n) ERROR_ON_WARNING="no" ;;
81ecdfbb 14963 *) as_fn_error "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
094a342e 14964 esac
81ecdfbb
RW
14965fi
14966
094a342e 14967
9a084706
PA
14968# Enable -Werror by default when using gcc. Turn it off for releases.
14969if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
094a342e
MK
14970 ERROR_ON_WARNING=yes
14971fi
14972
14973WERROR_CFLAGS=""
14974if test "${ERROR_ON_WARNING}" = yes ; then
14975 WERROR_CFLAGS="-Werror"
14976fi
14977
cf6de44d 14978# The options we'll try to enable.
aac331e4 14979build_warnings="-Wall -Wpointer-arith \
1cb5e2a4 14980-Wno-unused -Wunused-value -Wunused-function \
aac331e4 14981-Wno-switch -Wno-char-subscripts \
cf6de44d 14982-Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \
8465943a
SM
14983-Wno-sign-compare -Wno-narrowing -Wno-error=maybe-uninitialized \
14984-Wno-mismatched-tags"
3bc3d82a 14985
3526781e 14986case "${host}" in
4fa7574e
RO
14987 *-*-mingw32*)
14988 # Enable -Wno-format by default when using gcc on mingw since many
14989 # GCC versions complain about %I64.
14990 build_warnings="$build_warnings -Wno-format" ;;
14991 *-*-solaris*)
14992 # Solaris 11.4 <python2.7/ceval.h> uses #pragma no_inline that GCC
14993 # doesn't understand.
14994 build_warnings="$build_warnings -Wno-unknown-pragmas"
14995 # Solaris 11 <unistd.h> marks vfork deprecated.
14996 build_warnings="$build_warnings -Wno-deprecated-declarations" ;;
d3685d60 14997 *) build_warnings="$build_warnings -Wformat-nonliteral" ;;
3526781e
DJ
14998esac
14999
81ecdfbb
RW
15000# Check whether --enable-build-warnings was given.
15001if test "${enable_build_warnings+set}" = set; then :
15002 enableval=$enable_build_warnings; case "${enableval}" in
c906108c
SS
15003 yes) ;;
15004 no) build_warnings="-w";;
15005 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15006 build_warnings="${build_warnings} ${t}";;
15007 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15008 build_warnings="${t} ${build_warnings}";;
15009 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
15010esac
d4f3574e 15011if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 15012 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 15013fi
81ecdfbb
RW
15014fi
15015# Check whether --enable-gdb-build-warnings was given.
15016if test "${enable_gdb_build_warnings+set}" = set; then :
15017 enableval=$enable_gdb_build_warnings; case "${enableval}" in
3b851bce
AC
15018 yes) ;;
15019 no) build_warnings="-w";;
15020 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15021 build_warnings="${build_warnings} ${t}";;
15022 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15023 build_warnings="${t} ${build_warnings}";;
15024 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
15025esac
15026if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
15027 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
15028fi
81ecdfbb 15029fi
3bc3d82a
PA
15030
15031# The set of warnings supported by a C++ compiler is not the same as
15032# of the C compiler.
cf6de44d 15033ac_ext=cpp
3bc3d82a
PA
15034ac_cpp='$CXXCPP $CPPFLAGS'
15035ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15036ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15037ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15038
3bc3d82a 15039
81ecdfbb 15040WARN_CFLAGS=""
c906108c
SS
15041if test "x${build_warnings}" != x -a "x$GCC" = xyes
15042then
81ecdfbb
RW
15043 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
15044$as_echo_n "checking compiler warning flags... " >&6; }
746a987d
AC
15045 # Separate out the -Werror flag as some files just cannot be
15046 # compiled with it enabled.
15047 for w in ${build_warnings}; do
7544db95
PA
15048 # GCC does not complain about -Wno-unknown-warning. Invert
15049 # and test -Wunknown-warning instead.
15050 case $w in
15051 -Wno-*)
15052 wtest=`echo $w | sed 's/-Wno-/-W/g'` ;;
15053 *)
15054 wtest=$w ;;
15055 esac
15056
746a987d
AC
15057 case $w in
15058 -Werr*) WERROR_CFLAGS=-Werror ;;
3bc3d82a
PA
15059 *)
15060 # Check whether GCC accepts it.
4536bbc6 15061 saved_CFLAGS="$CFLAGS"
3e019bdc 15062 CFLAGS="$CFLAGS -Werror $wtest"
3bc3d82a 15063 saved_CXXFLAGS="$CXXFLAGS"
3e019bdc 15064 CXXFLAGS="$CXXFLAGS -Werror $wtest"
54019719 15065 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15066/* end confdefs.h. */
4536bbc6 15067
bec39cab
AC
15068int
15069main ()
15070{
4536bbc6 15071
bec39cab
AC
15072 ;
15073 return 0;
15074}
15075_ACEOF
3bc3d82a 15076if ac_fn_cxx_try_compile "$LINENO"; then :
4536bbc6 15077 WARN_CFLAGS="${WARN_CFLAGS} $w"
4536bbc6 15078fi
81ecdfbb 15079rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4536bbc6 15080 CFLAGS="$saved_CFLAGS"
3bc3d82a 15081 CXXFLAGS="$saved_CXXFLAGS"
746a987d
AC
15082 esac
15083 done
81ecdfbb
RW
15084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
15085$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
c906108c
SS
15086fi
15087
15088
104c1213 15089
cf6de44d 15090ac_ext=c
3bc3d82a
PA
15091ac_cpp='$CPP $CPPFLAGS'
15092ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15093ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15094ac_compiler_gnu=$ac_cv_c_compiler_gnu
15095
3bc3d82a 15096
b835bb52 15097
7a292a7a 15098# In the Cygwin environment, we need some additional flags.
81ecdfbb
RW
15099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
15100$as_echo_n "checking for cygwin... " >&6; }
15101if test "${gdb_cv_os_cygwin+set}" = set; then :
15102 $as_echo_n "(cached) " >&6
bec39cab 15103else
81ecdfbb 15104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15105/* end confdefs.h. */
7a292a7a
SS
15106
15107#if defined (__CYGWIN__) || defined (__CYGWIN32__)
15108lose
15109#endif
bec39cab 15110_ACEOF
7a292a7a 15111if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
92a021de 15112 $EGREP "^lose$" >/dev/null 2>&1; then :
7a292a7a
SS
15113 gdb_cv_os_cygwin=yes
15114else
7a292a7a
SS
15115 gdb_cv_os_cygwin=no
15116fi
15117rm -f conftest*
15118
15119fi
81ecdfbb
RW
15120{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
15121$as_echo "$gdb_cv_os_cygwin" >&6; }
7a292a7a 15122
aff38e61 15123
3eb25fda 15124SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
aff38e61 15125case ${host} in
95cbc983
AC
15126 *go32* ) SER_HARDWIRE=ser-go32.o ;;
15127 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
0ea3f30e 15128 *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
aff38e61
AC
15129esac
15130
15131
cd0fc7c3
SS
15132# libreadline needs libuser32.a in a cygwin environment
15133WIN32LIBS=
15134if test x$gdb_cv_os_cygwin = xyes; then
c5394b80
JM
15135 WIN32LIBS="-luser32"
15136 case "${target}" in
15137 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
15138 ;;
15139 esac
cd0fc7c3 15140fi
c906108c 15141
b4505029
MM
15142# The ser-tcp.c module requires sockets.
15143case ${host} in
15144 *mingw32*)
15145
81ecdfbb 15146$as_echo "#define USE_WIN32API 1" >>confdefs.h
b4505029
MM
15147
15148 WIN32LIBS="$WIN32LIBS -lws2_32"
15149 ;;
15150esac
15151
7a292a7a 15152
31d99776 15153# Add ELF support to GDB, but only if BFD includes ELF support.
def63ff0
TT
15154
15155 OLD_CFLAGS=$CFLAGS
15156 OLD_LDFLAGS=$LDFLAGS
15157 OLD_LIBS=$LIBS
15158 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
15159 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
15160 # always want our bfd.
15161 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
5a2d4533
L
15162 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
15163 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
def63ff0 15164 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
711a72d3 15165 LIBS="-lbfd -liberty -lz $intl $LIBS"
def63ff0 15166 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
81ecdfbb
RW
15167$as_echo_n "checking for ELF support in BFD... " >&6; }
15168if test "${gdb_cv_var_elf+set}" = set; then :
15169 $as_echo_n "(cached) " >&6
31d99776 15170else
81ecdfbb 15171 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31d99776
DJ
15172/* end confdefs.h. */
15173#include <stdlib.h>
def63ff0
TT
15174 #include "bfd.h"
15175 #include "elf-bfd.h"
31d99776
DJ
15176
15177int
15178main ()
15179{
def63ff0 15180return bfd_get_elf_phdr_upper_bound (NULL);
31d99776
DJ
15181 ;
15182 return 0;
15183}
15184_ACEOF
81ecdfbb 15185if ac_fn_c_try_link "$LINENO"; then :
31d99776
DJ
15186 gdb_cv_var_elf=yes
15187else
81ecdfbb 15188 gdb_cv_var_elf=no
31d99776 15189fi
81ecdfbb
RW
15190rm -f core conftest.err conftest.$ac_objext \
15191 conftest$ac_exeext conftest.$ac_ext
31d99776 15192fi
81ecdfbb
RW
15193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
15194$as_echo "$gdb_cv_var_elf" >&6; }
def63ff0
TT
15195 CFLAGS=$OLD_CFLAGS
15196 LDFLAGS=$OLD_LDFLAGS
15197 LIBS=$OLD_LIBS
31d99776 15198if test $gdb_cv_var_elf = yes; then
d4777acb 15199 CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o dtrace-probe.o"
31d99776 15200
81ecdfbb 15201$as_echo "#define HAVE_ELF 1" >>confdefs.h
31d99776 15202
075ff26d
JK
15203 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
15204 if test "$plugins" = "yes"; then
a48b32c0
L
15205 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
15206$as_echo_n "checking for library containing dlopen... " >&6; }
15207if test "${ac_cv_search_dlopen+set}" = set; then :
15208 $as_echo_n "(cached) " >&6
15209else
15210 ac_func_search_save_LIBS=$LIBS
15211cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15212/* end confdefs.h. */
15213
15214/* Override any GCC internal prototype to avoid an error.
15215 Use char because int might match the return type of a GCC
15216 builtin and then its argument prototype would still apply. */
15217#ifdef __cplusplus
15218extern "C"
15219#endif
15220char dlopen ();
15221int
15222main ()
15223{
15224return dlopen ();
15225 ;
15226 return 0;
15227}
15228_ACEOF
15229for ac_lib in '' dl; do
15230 if test -z "$ac_lib"; then
15231 ac_res="none required"
15232 else
15233 ac_res=-l$ac_lib
15234 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
15235 fi
15236 if ac_fn_c_try_link "$LINENO"; then :
15237 ac_cv_search_dlopen=$ac_res
15238fi
15239rm -f core conftest.err conftest.$ac_objext \
15240 conftest$ac_exeext
15241 if test "${ac_cv_search_dlopen+set}" = set; then :
15242 break
15243fi
15244done
15245if test "${ac_cv_search_dlopen+set}" = set; then :
15246
15247else
15248 ac_cv_search_dlopen=no
15249fi
15250rm conftest.$ac_ext
15251LIBS=$ac_func_search_save_LIBS
15252fi
15253{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
15254$as_echo "$ac_cv_search_dlopen" >&6; }
15255ac_res=$ac_cv_search_dlopen
15256if test "$ac_res" != no; then :
15257 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15258
15259fi
15260
075ff26d 15261 fi
31d99776 15262fi
31d99776 15263
4f05add4
TT
15264# Add macho support to GDB, but only if BFD includes it.
15265
15266 OLD_CFLAGS=$CFLAGS
15267 OLD_LDFLAGS=$LDFLAGS
15268 OLD_LIBS=$LIBS
15269 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
15270 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
15271 # always want our bfd.
15272 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
5a2d4533
L
15273 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
15274 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
4f05add4 15275 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
711a72d3 15276 LIBS="-lbfd -liberty -lz $intl $LIBS"
4f05add4
TT
15277 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5
15278$as_echo_n "checking for Mach-O support in BFD... " >&6; }
15279if test "${gdb_cv_var_macho+set}" = set; then :
15280 $as_echo_n "(cached) " >&6
15281else
15282 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15283/* end confdefs.h. */
15284#include <stdlib.h>
15285 #include "bfd.h"
15286 #include "mach-o.h"
15287
15288int
15289main ()
15290{
15291return bfd_mach_o_lookup_command (NULL, 0, NULL);
15292 ;
15293 return 0;
15294}
15295_ACEOF
15296if ac_fn_c_try_link "$LINENO"; then :
15297 gdb_cv_var_macho=yes
15298else
15299 gdb_cv_var_macho=no
15300fi
15301rm -f core conftest.err conftest.$ac_objext \
15302 conftest$ac_exeext conftest.$ac_ext
15303fi
15304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5
15305$as_echo "$gdb_cv_var_macho" >&6; }
15306 CFLAGS=$OLD_CFLAGS
15307 LDFLAGS=$OLD_LDFLAGS
15308 LIBS=$OLD_LIBS
15309if test $gdb_cv_var_macho = yes; then
15310 CONFIG_OBS="$CONFIG_OBS machoread.o"
15311fi
15312
121ce6e5
DJ
15313# Add any host-specific objects to GDB.
15314CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
15315
608e2dbb
TT
15316# If building on ELF, look for lzma support for embedded compressed debug info.
15317if test $gdb_cv_var_elf = yes; then
15318
15319# Check whether --with-lzma was given.
15320if test "${with_lzma+set}" = set; then :
15321 withval=$with_lzma;
15322else
15323 with_lzma=auto
15324fi
15325
15326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5
15327$as_echo_n "checking whether to use lzma... " >&6; }
15328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5
15329$as_echo "$with_lzma" >&6; }
15330
15331 if test "${with_lzma}" != no; then
15332
15333
15334
15335
15336
15337
15338
15339
15340 use_additional=yes
15341
15342 acl_save_prefix="$prefix"
15343 prefix="$acl_final_prefix"
15344 acl_save_exec_prefix="$exec_prefix"
15345 exec_prefix="$acl_final_exec_prefix"
15346
15347 eval additional_includedir=\"$includedir\"
15348 eval additional_libdir=\"$libdir\"
15349
15350 exec_prefix="$acl_save_exec_prefix"
15351 prefix="$acl_save_prefix"
15352
15353
15354# Check whether --with-liblzma-prefix was given.
15355if test "${with_liblzma_prefix+set}" = set; then :
15356 withval=$with_liblzma_prefix;
15357 if test "X$withval" = "Xno"; then
15358 use_additional=no
15359 else
15360 if test "X$withval" = "X"; then
15361
15362 acl_save_prefix="$prefix"
15363 prefix="$acl_final_prefix"
15364 acl_save_exec_prefix="$exec_prefix"
15365 exec_prefix="$acl_final_exec_prefix"
15366
15367 eval additional_includedir=\"$includedir\"
15368 eval additional_libdir=\"$libdir\"
15369
15370 exec_prefix="$acl_save_exec_prefix"
15371 prefix="$acl_save_prefix"
15372
15373 else
15374 additional_includedir="$withval/include"
15375 additional_libdir="$withval/lib"
15376 fi
15377 fi
15378
15379fi
15380
15381 LIBLZMA=
15382 LTLIBLZMA=
15383 INCLZMA=
15384 rpathdirs=
15385 ltrpathdirs=
15386 names_already_handled=
15387 names_next_round='lzma '
15388 while test -n "$names_next_round"; do
15389 names_this_round="$names_next_round"
15390 names_next_round=
15391 for name in $names_this_round; do
15392 already_handled=
15393 for n in $names_already_handled; do
15394 if test "$n" = "$name"; then
15395 already_handled=yes
15396 break
15397 fi
15398 done
15399 if test -z "$already_handled"; then
15400 names_already_handled="$names_already_handled $name"
15401 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
15402 eval value=\"\$HAVE_LIB$uppername\"
15403 if test -n "$value"; then
15404 if test "$value" = yes; then
15405 eval value=\"\$LIB$uppername\"
15406 test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value"
15407 eval value=\"\$LTLIB$uppername\"
15408 test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value"
15409 else
15410 :
15411 fi
15412 else
15413 found_dir=
15414 found_la=
15415 found_so=
15416 found_a=
15417 if test $use_additional = yes; then
15418 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
15419 found_dir="$additional_libdir"
15420 found_so="$additional_libdir/lib$name.$shlibext"
15421 if test -f "$additional_libdir/lib$name.la"; then
15422 found_la="$additional_libdir/lib$name.la"
15423 fi
15424 else
15425 if test -f "$additional_libdir/lib$name.$libext"; then
15426 found_dir="$additional_libdir"
15427 found_a="$additional_libdir/lib$name.$libext"
15428 if test -f "$additional_libdir/lib$name.la"; then
15429 found_la="$additional_libdir/lib$name.la"
15430 fi
15431 fi
15432 fi
15433 fi
15434 if test "X$found_dir" = "X"; then
15435 for x in $LDFLAGS $LTLIBLZMA; do
15436
15437 acl_save_prefix="$prefix"
15438 prefix="$acl_final_prefix"
15439 acl_save_exec_prefix="$exec_prefix"
15440 exec_prefix="$acl_final_exec_prefix"
15441 eval x=\"$x\"
15442 exec_prefix="$acl_save_exec_prefix"
15443 prefix="$acl_save_prefix"
15444
15445 case "$x" in
15446 -L*)
15447 dir=`echo "X$x" | sed -e 's/^X-L//'`
15448 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
15449 found_dir="$dir"
15450 found_so="$dir/lib$name.$shlibext"
15451 if test -f "$dir/lib$name.la"; then
15452 found_la="$dir/lib$name.la"
15453 fi
15454 else
15455 if test -f "$dir/lib$name.$libext"; then
15456 found_dir="$dir"
15457 found_a="$dir/lib$name.$libext"
15458 if test -f "$dir/lib$name.la"; then
15459 found_la="$dir/lib$name.la"
15460 fi
15461 fi
15462 fi
15463 ;;
15464 esac
15465 if test "X$found_dir" != "X"; then
15466 break
15467 fi
15468 done
15469 fi
15470 if test "X$found_dir" != "X"; then
15471 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name"
15472 if test "X$found_so" != "X"; then
15473 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
15474 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
15475 else
15476 haveit=
15477 for x in $ltrpathdirs; do
15478 if test "X$x" = "X$found_dir"; then
15479 haveit=yes
15480 break
15481 fi
15482 done
15483 if test -z "$haveit"; then
15484 ltrpathdirs="$ltrpathdirs $found_dir"
15485 fi
15486 if test "$hardcode_direct" = yes; then
15487 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
15488 else
15489 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
15490 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
15491 haveit=
15492 for x in $rpathdirs; do
15493 if test "X$x" = "X$found_dir"; then
15494 haveit=yes
15495 break
15496 fi
15497 done
15498 if test -z "$haveit"; then
15499 rpathdirs="$rpathdirs $found_dir"
15500 fi
15501 else
15502 haveit=
15503 for x in $LDFLAGS $LIBLZMA; do
15504
15505 acl_save_prefix="$prefix"
15506 prefix="$acl_final_prefix"
15507 acl_save_exec_prefix="$exec_prefix"
15508 exec_prefix="$acl_final_exec_prefix"
15509 eval x=\"$x\"
15510 exec_prefix="$acl_save_exec_prefix"
15511 prefix="$acl_save_prefix"
15512
15513 if test "X$x" = "X-L$found_dir"; then
15514 haveit=yes
15515 break
15516 fi
15517 done
15518 if test -z "$haveit"; then
15519 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir"
15520 fi
15521 if test "$hardcode_minus_L" != no; then
15522 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
15523 else
15524 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
15525 fi
15526 fi
15527 fi
15528 fi
15529 else
15530 if test "X$found_a" != "X"; then
15531 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a"
15532 else
15533 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name"
15534 fi
15535 fi
15536 additional_includedir=
15537 case "$found_dir" in
15538 */lib | */lib/)
15539 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
15540 additional_includedir="$basedir/include"
15541 ;;
15542 esac
15543 if test "X$additional_includedir" != "X"; then
15544 if test "X$additional_includedir" != "X/usr/include"; then
15545 haveit=
15546 if test "X$additional_includedir" = "X/usr/local/include"; then
15547 if test -n "$GCC"; then
15548 case $host_os in
15549 linux*) haveit=yes;;
15550 esac
15551 fi
15552 fi
15553 if test -z "$haveit"; then
15554 for x in $CPPFLAGS $INCLZMA; do
15555
15556 acl_save_prefix="$prefix"
15557 prefix="$acl_final_prefix"
15558 acl_save_exec_prefix="$exec_prefix"
15559 exec_prefix="$acl_final_exec_prefix"
15560 eval x=\"$x\"
15561 exec_prefix="$acl_save_exec_prefix"
15562 prefix="$acl_save_prefix"
15563
15564 if test "X$x" = "X-I$additional_includedir"; then
15565 haveit=yes
15566 break
15567 fi
15568 done
15569 if test -z "$haveit"; then
15570 if test -d "$additional_includedir"; then
15571 INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir"
15572 fi
15573 fi
15574 fi
15575 fi
15576 fi
15577 if test -n "$found_la"; then
15578 save_libdir="$libdir"
15579 case "$found_la" in
15580 */* | *\\*) . "$found_la" ;;
15581 *) . "./$found_la" ;;
15582 esac
15583 libdir="$save_libdir"
15584 for dep in $dependency_libs; do
15585 case "$dep" in
15586 -L*)
15587 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
15588 if test "X$additional_libdir" != "X/usr/lib"; then
15589 haveit=
15590 if test "X$additional_libdir" = "X/usr/local/lib"; then
15591 if test -n "$GCC"; then
15592 case $host_os in
15593 linux*) haveit=yes;;
15594 esac
15595 fi
15596 fi
15597 if test -z "$haveit"; then
15598 haveit=
15599 for x in $LDFLAGS $LIBLZMA; do
15600
15601 acl_save_prefix="$prefix"
15602 prefix="$acl_final_prefix"
15603 acl_save_exec_prefix="$exec_prefix"
15604 exec_prefix="$acl_final_exec_prefix"
15605 eval x=\"$x\"
15606 exec_prefix="$acl_save_exec_prefix"
15607 prefix="$acl_save_prefix"
15608
15609 if test "X$x" = "X-L$additional_libdir"; then
15610 haveit=yes
15611 break
15612 fi
15613 done
15614 if test -z "$haveit"; then
15615 if test -d "$additional_libdir"; then
15616 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir"
15617 fi
15618 fi
15619 haveit=
15620 for x in $LDFLAGS $LTLIBLZMA; do
15621
15622 acl_save_prefix="$prefix"
15623 prefix="$acl_final_prefix"
15624 acl_save_exec_prefix="$exec_prefix"
15625 exec_prefix="$acl_final_exec_prefix"
15626 eval x=\"$x\"
15627 exec_prefix="$acl_save_exec_prefix"
15628 prefix="$acl_save_prefix"
15629
15630 if test "X$x" = "X-L$additional_libdir"; then
15631 haveit=yes
15632 break
15633 fi
15634 done
15635 if test -z "$haveit"; then
15636 if test -d "$additional_libdir"; then
15637 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir"
15638 fi
15639 fi
15640 fi
15641 fi
15642 ;;
15643 -R*)
15644 dir=`echo "X$dep" | sed -e 's/^X-R//'`
15645 if test "$enable_rpath" != no; then
15646 haveit=
15647 for x in $rpathdirs; do
15648 if test "X$x" = "X$dir"; then
15649 haveit=yes
15650 break
15651 fi
15652 done
15653 if test -z "$haveit"; then
15654 rpathdirs="$rpathdirs $dir"
15655 fi
15656 haveit=
15657 for x in $ltrpathdirs; do
15658 if test "X$x" = "X$dir"; then
15659 haveit=yes
15660 break
15661 fi
15662 done
15663 if test -z "$haveit"; then
15664 ltrpathdirs="$ltrpathdirs $dir"
15665 fi
15666 fi
15667 ;;
15668 -l*)
15669 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
15670 ;;
15671 *.la)
15672 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
15673 ;;
15674 *)
15675 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep"
15676 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep"
15677 ;;
15678 esac
15679 done
15680 fi
15681 else
15682 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
15683 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name"
15684 fi
15685 fi
15686 fi
15687 done
15688 done
15689 if test "X$rpathdirs" != "X"; then
15690 if test -n "$hardcode_libdir_separator"; then
15691 alldirs=
15692 for found_dir in $rpathdirs; do
15693 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
15694 done
15695 acl_save_libdir="$libdir"
15696 libdir="$alldirs"
15697 eval flag=\"$hardcode_libdir_flag_spec\"
15698 libdir="$acl_save_libdir"
15699 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
15700 else
15701 for found_dir in $rpathdirs; do
15702 acl_save_libdir="$libdir"
15703 libdir="$found_dir"
15704 eval flag=\"$hardcode_libdir_flag_spec\"
15705 libdir="$acl_save_libdir"
15706 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
15707 done
15708 fi
15709 fi
15710 if test "X$ltrpathdirs" != "X"; then
15711 for found_dir in $ltrpathdirs; do
15712 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir"
15713 done
15714 fi
15715
15716
15717 ac_save_CPPFLAGS="$CPPFLAGS"
15718
15719 for element in $INCLZMA; do
15720 haveit=
15721 for x in $CPPFLAGS; do
15722
15723 acl_save_prefix="$prefix"
15724 prefix="$acl_final_prefix"
15725 acl_save_exec_prefix="$exec_prefix"
15726 exec_prefix="$acl_final_exec_prefix"
15727 eval x=\"$x\"
15728 exec_prefix="$acl_save_exec_prefix"
15729 prefix="$acl_save_prefix"
15730
15731 if test "X$x" = "X$element"; then
15732 haveit=yes
15733 break
15734 fi
15735 done
15736 if test -z "$haveit"; then
15737 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
15738 fi
15739 done
15740
15741
15742 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5
15743$as_echo_n "checking for liblzma... " >&6; }
15744if test "${ac_cv_liblzma+set}" = set; then :
15745 $as_echo_n "(cached) " >&6
15746else
15747
15748 ac_save_LIBS="$LIBS"
15749 LIBS="$LIBS $LIBLZMA"
15750 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15751/* end confdefs.h. */
15752#include "lzma.h"
15753int
15754main ()
15755{
15756lzma_index_iter iter;
15757 lzma_index_iter_init (&iter, 0);
15758 lzma_mf_is_supported (LZMA_MF_HC3);
15759 ;
15760 return 0;
15761}
15762_ACEOF
15763if ac_fn_c_try_link "$LINENO"; then :
15764 ac_cv_liblzma=yes
15765else
15766 ac_cv_liblzma=no
15767fi
15768rm -f core conftest.err conftest.$ac_objext \
15769 conftest$ac_exeext conftest.$ac_ext
15770 LIBS="$ac_save_LIBS"
15771
15772fi
15773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5
15774$as_echo "$ac_cv_liblzma" >&6; }
15775 if test "$ac_cv_liblzma" = yes; then
15776 HAVE_LIBLZMA=yes
15777
15778$as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h
15779
15780 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5
15781$as_echo_n "checking how to link with liblzma... " >&6; }
15782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5
15783$as_echo "$LIBLZMA" >&6; }
15784 else
15785 HAVE_LIBLZMA=no
15786 CPPFLAGS="$ac_save_CPPFLAGS"
15787 LIBLZMA=
15788 LTLIBLZMA=
15789 fi
15790
15791
15792
15793
15794
15795
15796 if test "$HAVE_LIBLZMA" != yes; then
15797 if test "$with_lzma" = yes; then
15798 as_fn_error "missing liblzma for --with-lzma" "$LINENO" 5
15799 fi
15800 fi
15801 fi
15802fi
15803
3fc11d3e
JM
15804LIBGUI="../libgui/src/libgui.a"
15805GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
15806
15807
7a292a7a 15808
3fc11d3e
JM
15809WIN32LDAPP=
15810
15811
15812
d91670b9 15813case "${host}" in
686a5eed 15814*-*-cygwin* | *-*-mingw* )
d91670b9
CV
15815 configdir="win"
15816 ;;
15817*)
15818 configdir="unix"
15819 ;;
15820esac
3fc11d3e
JM
15821
15822GDBTKLIBS=
15823if test "${enable_gdbtk}" = "yes"; then
15824
d1c3b63a
KS
15825 # Gdbtk must have an absolute path to srcdir in order to run
15826 # properly when not installed.
15827 here=`pwd`
15828 cd ${srcdir}
15829 GDBTK_SRC_DIR=`pwd`
15830 cd $here
15831
bec39cab 15832
5062cc19
KS
15833 #
15834 # Ok, lets find the tcl configuration
15835 # First, look for one uninstalled.
15836 # the alternative search directory is invoked by --with-tcl
15837 #
3fc11d3e 15838
5062cc19
KS
15839 if test x"${no_tcl}" = x ; then
15840 # we reset no_tcl in case something fails here
15841 no_tcl=true
bec39cab 15842
81ecdfbb
RW
15843# Check whether --with-tcl was given.
15844if test "${with_tcl+set}" = set; then :
15845 withval=$with_tcl; with_tclconfig=${withval}
15846fi
15847
15848 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
15849$as_echo_n "checking for Tcl configuration... " >&6; }
15850 if test "${ac_cv_c_tclconfig+set}" = set; then :
15851 $as_echo_n "(cached) " >&6
3fc11d3e 15852else
bec39cab 15853
3fc11d3e 15854
5062cc19
KS
15855 # First check to see if --with-tcl was specified.
15856 case "${host}" in
15857 *-*-cygwin*) platDir="win" ;;
15858 *) platDir="unix" ;;
15859 esac
15860 if test x"${with_tclconfig}" != x ; then
15861 if test -f "${with_tclconfig}/tclConfig.sh" ; then
15862 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
15863 else
81ecdfbb 15864 as_fn_error "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
5062cc19
KS
15865 fi
15866 fi
15867
15868 # then check for a private Tcl installation
15869 if test x"${ac_cv_c_tclconfig}" = x ; then
15870 for i in \
15871 ../tcl \
15872 `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
15873 `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
15874 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
15875 ../../tcl \
15876 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
15877 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
15878 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
15879 ../../../tcl \
15880 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
15881 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
15882 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
15883 if test -f "$i/$platDir/tclConfig.sh" ; then
15884 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
15885 break
15886 fi
15887 done
15888 fi
15889
15890 # on Darwin, check in Framework installation locations
15891 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
15892 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
15893 `ls -d /Library/Frameworks 2>/dev/null` \
15894 `ls -d /Network/Library/Frameworks 2>/dev/null` \
15895 `ls -d /System/Library/Frameworks 2>/dev/null` \
15896 ; do
15897 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
15898 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
15899 break
15900 fi
15901 done
15902 fi
15903
15904 # check in a few common install locations
15905 if test x"${ac_cv_c_tclconfig}" = x ; then
15906 for i in `ls -d ${libdir} 2>/dev/null` \
15907 `ls -d ${exec_prefix}/lib 2>/dev/null` \
15908 `ls -d ${prefix}/lib 2>/dev/null` \
15909 `ls -d /usr/local/lib 2>/dev/null` \
15910 `ls -d /usr/contrib/lib 2>/dev/null` \
15911 `ls -d /usr/lib 2>/dev/null` \
15912 ; do
15913 if test -f "$i/tclConfig.sh" ; then
15914 ac_cv_c_tclconfig=`(cd $i; pwd)`
15915 break
15916 fi
15917 done
15918 fi
3fc11d3e 15919
5062cc19
KS
15920 # check in a few other private locations
15921 if test x"${ac_cv_c_tclconfig}" = x ; then
15922 for i in \
15923 ${srcdir}/../tcl \
15924 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
15925 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
15926 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
15927 if test -f "$i/$platDir/tclConfig.sh" ; then
15928 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
15929 break
15930 fi
15931 done
15932 fi
bec39cab 15933
3fc11d3e
JM
15934fi
15935
5062cc19
KS
15936
15937 if test x"${ac_cv_c_tclconfig}" = x ; then
15938 TCL_BIN_DIR="# no Tcl configs found"
81ecdfbb
RW
15939 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
15940$as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
5062cc19
KS
15941 else
15942 no_tcl=
15943 TCL_BIN_DIR=${ac_cv_c_tclconfig}
81ecdfbb
RW
15944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
15945$as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
5062cc19
KS
15946 fi
15947 fi
3fc11d3e 15948
bec39cab 15949
85541719
DE
15950 # If $no_tk is nonempty, then we can't do Tk, and there is no
15951 # point to doing Tcl.
bec39cab 15952
5062cc19
KS
15953 #
15954 # Ok, lets find the tk configuration
15955 # First, look for one uninstalled.
15956 # the alternative search directory is invoked by --with-tk
15957 #
3fc11d3e 15958
5062cc19
KS
15959 if test x"${no_tk}" = x ; then
15960 # we reset no_tk in case something fails here
15961 no_tk=true
bec39cab 15962
81ecdfbb
RW
15963# Check whether --with-tk was given.
15964if test "${with_tk+set}" = set; then :
15965 withval=$with_tk; with_tkconfig=${withval}
15966fi
15967
15968 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
15969$as_echo_n "checking for Tk configuration... " >&6; }
15970 if test "${ac_cv_c_tkconfig+set}" = set; then :
15971 $as_echo_n "(cached) " >&6
bec39cab 15972else
3fc11d3e
JM
15973
15974
5062cc19
KS
15975 # First check to see if --with-tkconfig was specified.
15976 if test x"${with_tkconfig}" != x ; then
15977 if test -f "${with_tkconfig}/tkConfig.sh" ; then
15978 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
15979 else
81ecdfbb 15980 as_fn_error "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
5062cc19
KS
15981 fi
15982 fi
3fc11d3e 15983
5062cc19
KS
15984 # then check for a private Tk library
15985 case "${host}" in
15986 *-*-cygwin*) platDir="win" ;;
15987 *) platDir="unix" ;;
15988 esac
15989 if test x"${ac_cv_c_tkconfig}" = x ; then
15990 for i in \
15991 ../tk \
15992 `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
15993 `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
15994 `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
15995 ../../tk \
15996 `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
15997 `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
15998 `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
15999 ../../../tk \
16000 `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16001 `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
16002 `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
16003 if test -f "$i/$platDir/tkConfig.sh" ; then
16004 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
16005 break
16006 fi
16007 done
16008 fi
16009
16010 # on Darwin, check in Framework installation locations
16011 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
16012 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
16013 `ls -d /Library/Frameworks 2>/dev/null` \
16014 `ls -d /Network/Library/Frameworks 2>/dev/null` \
16015 `ls -d /System/Library/Frameworks 2>/dev/null` \
16016 ; do
16017 if test -f "$i/Tk.framework/tkConfig.sh" ; then
16018 ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
16019 break
16020 fi
16021 done
16022 fi
16023
16024 # check in a few common install locations
16025 if test x"${ac_cv_c_tkconfig}" = x ; then
16026 for i in `ls -d ${libdir} 2>/dev/null` \
16027 `ls -d ${exec_prefix}/lib 2>/dev/null` \
16028 `ls -d ${prefix}/lib 2>/dev/null` \
16029 `ls -d /usr/local/lib 2>/dev/null` \
16030 `ls -d /usr/contrib/lib 2>/dev/null` \
16031 `ls -d /usr/lib 2>/dev/null` \
16032 ; do
16033 if test -f "$i/tkConfig.sh" ; then
16034 ac_cv_c_tkconfig=`(cd $i; pwd)`
16035 break
16036 fi
16037 done
16038 fi
16039 # check in a few other private locations
16040 if test x"${ac_cv_c_tkconfig}" = x ; then
16041 for i in \
16042 ${srcdir}/../tk \
16043 `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16044 `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
16045 `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
16046 if test -f "$i/$platDir/tkConfig.sh" ; then
16047 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
16048 break
16049 fi
16050 done
16051 fi
3fc11d3e 16052
3fc11d3e
JM
16053fi
16054
16055
5062cc19
KS
16056 if test x"${ac_cv_c_tkconfig}" = x ; then
16057 TK_BIN_DIR="# no Tk configs found"
81ecdfbb
RW
16058 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
16059$as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
5062cc19
KS
16060 else
16061 no_tk=
16062 TK_BIN_DIR=${ac_cv_c_tkconfig}
81ecdfbb
RW
16063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
16064$as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
5062cc19 16065 fi
3fc11d3e 16066 fi
dd2504ab 16067
dd2504ab 16068
85541719
DE
16069 if test -z "${no_tcl}" -a -z "${no_tk}"; then
16070
81ecdfbb
RW
16071 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
16072$as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
85541719
DE
16073
16074 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
81ecdfbb
RW
16075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
16076$as_echo "loading" >&6; }
85541719
DE
16077 . ${TCL_BIN_DIR}/tclConfig.sh
16078 else
81ecdfbb
RW
16079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
16080$as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
85541719
DE
16081 fi
16082
16083 # eval is required to do the TCL_DBGX substitution
16084 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
16085 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
16086
16087 # If the TCL_BIN_DIR is the build directory (not the install directory),
16088 # then set the common variable name to the value of the build variables.
16089 # For example, the variable TCL_LIB_SPEC will be set to the value
16090 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
16091 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
16092 # installed and uninstalled version of Tcl.
16093 if test -f "${TCL_BIN_DIR}/Makefile" ; then
16094 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
16095 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
16096 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
16097 elif test "`uname -s`" = "Darwin"; then
16098 # If Tcl was built as a framework, attempt to use the libraries
16099 # from the framework at the given location so that linking works
a68ffae9 16100 # against Tcl.framework installed in an arbitrary location.
85541719
DE
16101 case ${TCL_DEFS} in
16102 *TCL_FRAMEWORK*)
16103 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
16104 for i in "`cd ${TCL_BIN_DIR}; pwd`" \
16105 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
16106 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
16107 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
16108 break
16109 fi
16110 done
16111 fi
16112 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
16113 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
16114 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
16115 fi
16116 ;;
16117 esac
16118 fi
16119
16120 # eval is required to do the TCL_DBGX substitution
16121 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
16122 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
16123 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
16124 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
16125
16126
16127
16128
16129
16130
16131
16132
16133
16134
16135
16136
16137
16138
16139
16140 # Check for in-tree tcl
16141 here=`pwd`
16142 cd ${srcdir}/..
16143 topdir=`pwd`
16144 cd ${here}
16145
16146 intree="no"
16147 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
16148 intree="yes"
16149 fi
16150
16151 # Find Tcl private headers
16152 if test x"${intree}" = xno; then
16153
81ecdfbb
RW
16154 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
16155$as_echo_n "checking for Tcl private headers... " >&6; }
85541719
DE
16156 private_dir=""
16157 dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
16158 if test -f ${dir}/tclInt.h ; then
16159 private_dir=${dir}
16160 fi
16161
16162 if test x"${private_dir}" = x; then
81ecdfbb 16163 as_fn_error "could not find private Tcl headers" "$LINENO" 5
85541719
DE
16164 else
16165 TCL_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
16166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
16167$as_echo "${private_dir}" >&6; }
85541719
DE
16168 fi
16169
16170 TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
16171 TCL_LIBRARY="${TCL_LIB_SPEC}"
16172 TCL_DEPS=""
16173 else
16174 # If building tcl in the same src tree, private headers
16175 # are not needed, but we need to be sure to use the right
16176 # headers library
16177 TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
16178 TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
16179 TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
16180 fi
16181
16182
16183
16184
16185
81ecdfbb
RW
16186 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
16187$as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
dd2504ab 16188
5062cc19 16189 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
81ecdfbb
RW
16190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
16191$as_echo "loading" >&6; }
5062cc19 16192 . ${TK_BIN_DIR}/tkConfig.sh
3fc11d3e 16193 else
81ecdfbb
RW
16194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
16195$as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
3fc11d3e 16196 fi
bec39cab 16197
5062cc19
KS
16198 # eval is required to do the TK_DBGX substitution
16199 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
16200 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
16201
16202 # If the TK_BIN_DIR is the build directory (not the install directory),
16203 # then set the common variable name to the value of the build variables.
16204 # For example, the variable TK_LIB_SPEC will be set to the value
16205 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
16206 # instead of TK_BUILD_LIB_SPEC since it will work with both an
16207 # installed and uninstalled version of Tcl.
85541719 16208 if test -f "${TK_BIN_DIR}/Makefile" ; then
5062cc19
KS
16209 TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
16210 TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
16211 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
16212 elif test "`uname -s`" = "Darwin"; then
16213 # If Tk was built as a framework, attempt to use the libraries
16214 # from the framework at the given location so that linking works
a68ffae9 16215 # against Tk.framework installed in an arbitrary location.
5062cc19
KS
16216 case ${TK_DEFS} in
16217 *TK_FRAMEWORK*)
85541719 16218 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
5062cc19
KS
16219 for i in "`cd ${TK_BIN_DIR}; pwd`" \
16220 "`cd ${TK_BIN_DIR}/../..; pwd`"; do
16221 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
16222 TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
16223 break
16224 fi
16225 done
16226 fi
85541719 16227 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
5062cc19
KS
16228 TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
16229 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
16230 fi
16231 ;;
16232 esac
3fc11d3e
JM
16233 fi
16234
5062cc19
KS
16235 # eval is required to do the TK_DBGX substitution
16236 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
16237 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
16238 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
16239 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
3fc11d3e 16240
3fc11d3e
JM
16241
16242
bec39cab
AC
16243
16244
16245
16246
16247
16248
16249
3fc11d3e 16250
3fc11d3e 16251
bec39cab 16252
bec39cab 16253
85541719
DE
16254 # Check for in-tree Tk
16255 intree="no"
16256 if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
16257 intree="yes"
16258 fi
3fc11d3e 16259
85541719
DE
16260 # Find Tk private headers
16261 if test x"${intree}" = xno; then
3fc11d3e 16262
81ecdfbb
RW
16263 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
16264$as_echo_n "checking for Tk private headers... " >&6; }
5062cc19
KS
16265 private_dir=""
16266 dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
16267 if test -f ${dir}/tkInt.h; then
16268 private_dir=${dir}
3fc11d3e 16269 fi
bec39cab 16270
5062cc19 16271 if test x"${private_dir}" = x; then
81ecdfbb 16272 as_fn_error "could not find Tk private headers" "$LINENO" 5
3fc11d3e 16273 else
5062cc19 16274 TK_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
16275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
16276$as_echo "${private_dir}" >&6; }
3fc11d3e 16277 fi
3fc11d3e 16278
85541719
DE
16279 TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
16280 TK_LIBRARY=${TK_LIB_SPEC}
16281 TK_DEPS=""
16282 else
16283 TK_INCLUDE="-I${TK_SRC_DIR}/generic"
16284 TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
16285 TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
16286 fi
3fc11d3e
JM
16287
16288
3fc11d3e
JM
16289
16290
3fc11d3e 16291
85541719 16292 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e 16293
85541719
DE
16294 # Include some libraries that Tcl and Tk want.
16295 TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
16296 # Yes, the ordering seems wrong here. But it isn't.
16297 # TK_LIBS is the list of libraries that need to be linked
16298 # after Tcl/Tk. Note that this isn't put into LIBS. If it
16299 # were in LIBS then any link tests after this point would
16300 # try to include things like `$(LIBGUI)', which wouldn't work.
16301 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5 16302
85541719
DE
16303 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
16304 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
16305 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
16306 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
16307 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
16308 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
16309 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
3fc11d3e 16310
85541719
DE
16311 if test x$gdb_cv_os_cygwin = xyes; then
16312 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
16313 WIN32LDAPP="-Wl,--subsystem,console"
16314 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
3fc11d3e 16315 fi
ffc6a242 16316
81ecdfbb 16317 subdirs="$subdirs gdbtk"
3ace7edb 16318
85541719 16319 fi
3fc11d3e
JM
16320fi
16321
16322
16323
16324
16325
16326
16327
16328
81ecdfbb
RW
16329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
16330$as_echo_n "checking for X... " >&6; }
bec39cab 16331
c906108c 16332
81ecdfbb
RW
16333# Check whether --with-x was given.
16334if test "${with_x+set}" = set; then :
16335 withval=$with_x;
16336fi
c906108c
SS
16337
16338# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
16339if test "x$with_x" = xno; then
16340 # The user explicitly disabled X.
16341 have_x=disabled
16342else
81ecdfbb
RW
16343 case $x_includes,$x_libraries in #(
16344 *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
16345 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
16346 $as_echo_n "(cached) " >&6
c906108c
SS
16347else
16348 # One or both of the vars are not set, and there is no cached value.
bec39cab 16349ac_x_includes=no ac_x_libraries=no
81ecdfbb 16350rm -f -r conftest.dir
bec39cab
AC
16351if mkdir conftest.dir; then
16352 cd conftest.dir
bec39cab 16353 cat >Imakefile <<'_ACEOF'
81ecdfbb
RW
16354incroot:
16355 @echo incroot='${INCROOT}'
16356usrlibdir:
16357 @echo usrlibdir='${USRLIBDIR}'
16358libdir:
16359 @echo libdir='${LIBDIR}'
16360_ACEOF
16361 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
c906108c 16362 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
81ecdfbb
RW
16363 for ac_var in incroot usrlibdir libdir; do
16364 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
16365 done
c906108c 16366 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
81ecdfbb
RW
16367 for ac_extension in a so sl dylib la dll; do
16368 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
16369 test -f "$ac_im_libdir/libX11.$ac_extension"; then
bec39cab 16370 ac_im_usrlibdir=$ac_im_libdir; break
c906108c
SS
16371 fi
16372 done
16373 # Screen out bogus values from the imake configuration. They are
16374 # bogus both because they are the default anyway, and because
16375 # using them would break gcc on systems where it needs fixed includes.
bec39cab 16376 case $ac_im_incroot in
81ecdfbb 16377 /usr/include) ac_x_includes= ;;
bec39cab 16378 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
c906108c 16379 esac
bec39cab 16380 case $ac_im_usrlibdir in
81ecdfbb 16381 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
bec39cab 16382 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
c906108c
SS
16383 esac
16384 fi
16385 cd ..
81ecdfbb 16386 rm -f -r conftest.dir
c906108c
SS
16387fi
16388
bec39cab
AC
16389# Standard set of common directories for X headers.
16390# Check X11 before X11Rn because it is often a symlink to the current release.
16391ac_x_header_dirs='
16392/usr/X11/include
81ecdfbb 16393/usr/X11R7/include
bec39cab
AC
16394/usr/X11R6/include
16395/usr/X11R5/include
16396/usr/X11R4/include
16397
16398/usr/include/X11
81ecdfbb 16399/usr/include/X11R7
bec39cab
AC
16400/usr/include/X11R6
16401/usr/include/X11R5
16402/usr/include/X11R4
16403
16404/usr/local/X11/include
81ecdfbb 16405/usr/local/X11R7/include
bec39cab
AC
16406/usr/local/X11R6/include
16407/usr/local/X11R5/include
16408/usr/local/X11R4/include
16409
16410/usr/local/include/X11
81ecdfbb 16411/usr/local/include/X11R7
bec39cab
AC
16412/usr/local/include/X11R6
16413/usr/local/include/X11R5
16414/usr/local/include/X11R4
16415
16416/usr/X386/include
16417/usr/x386/include
16418/usr/XFree86/include/X11
16419
16420/usr/include
16421/usr/local/include
16422/usr/unsupported/include
16423/usr/athena/include
16424/usr/local/x11r5/include
16425/usr/lpp/Xamples/include
16426
16427/usr/openwin/include
16428/usr/openwin/share/include'
16429
16430if test "$ac_x_includes" = no; then
81ecdfbb 16431 # Guess where to find include files, by looking for Xlib.h.
c906108c 16432 # First, try using that file with no special directory specified.
81ecdfbb 16433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 16434/* end confdefs.h. */
81ecdfbb 16435#include <X11/Xlib.h>
bec39cab 16436_ACEOF
81ecdfbb 16437if ac_fn_c_try_cpp "$LINENO"; then :
c906108c
SS
16438 # We can compile using X headers with no special include directory.
16439ac_x_includes=
16440else
bec39cab 16441 for ac_dir in $ac_x_header_dirs; do
81ecdfbb 16442 if test -r "$ac_dir/X11/Xlib.h"; then
bec39cab
AC
16443 ac_x_includes=$ac_dir
16444 break
16445 fi
16446done
c906108c 16447fi
bec39cab
AC
16448rm -f conftest.err conftest.$ac_ext
16449fi # $ac_x_includes = no
c906108c 16450
bec39cab 16451if test "$ac_x_libraries" = no; then
c906108c 16452 # Check for the libraries.
c906108c
SS
16453 # See if we find them without any special options.
16454 # Don't add to $LIBS permanently.
bec39cab 16455 ac_save_LIBS=$LIBS
81ecdfbb
RW
16456 LIBS="-lX11 $LIBS"
16457 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 16458/* end confdefs.h. */
81ecdfbb 16459#include <X11/Xlib.h>
bec39cab
AC
16460int
16461main ()
16462{
81ecdfbb 16463XrmInitialize ()
bec39cab
AC
16464 ;
16465 return 0;
16466}
16467_ACEOF
81ecdfbb 16468if ac_fn_c_try_link "$LINENO"; then :
bec39cab 16469 LIBS=$ac_save_LIBS
c906108c
SS
16470# We can link X programs with no special library path.
16471ac_x_libraries=
16472else
81ecdfbb
RW
16473 LIBS=$ac_save_LIBS
16474for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
c906108c 16475do
bec39cab 16476 # Don't even attempt the hair of trying to link an X program!
81ecdfbb
RW
16477 for ac_extension in a so sl dylib la dll; do
16478 if test -r "$ac_dir/libX11.$ac_extension"; then
c906108c
SS
16479 ac_x_libraries=$ac_dir
16480 break 2
16481 fi
16482 done
16483done
16484fi
81ecdfbb
RW
16485rm -f core conftest.err conftest.$ac_objext \
16486 conftest$ac_exeext conftest.$ac_ext
bec39cab 16487fi # $ac_x_libraries = no
c906108c 16488
81ecdfbb
RW
16489case $ac_x_includes,$ac_x_libraries in #(
16490 no,* | *,no | *\'*)
16491 # Didn't find X, or a directory has "'" in its name.
16492 ac_cv_have_x="have_x=no";; #(
16493 *)
16494 # Record where we found X for the cache.
16495 ac_cv_have_x="have_x=yes\
16496 ac_x_includes='$ac_x_includes'\
16497 ac_x_libraries='$ac_x_libraries'"
16498esac
c906108c 16499fi
81ecdfbb
RW
16500;; #(
16501 *) have_x=yes;;
16502 esac
c906108c
SS
16503 eval "$ac_cv_have_x"
16504fi # $with_x != no
16505
16506if test "$have_x" != yes; then
81ecdfbb
RW
16507 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
16508$as_echo "$have_x" >&6; }
c906108c
SS
16509 no_x=yes
16510else
16511 # If each of the values was on the command line, it overrides each guess.
16512 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
16513 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
16514 # Update the cache value to reflect the command line values.
81ecdfbb
RW
16515 ac_cv_have_x="have_x=yes\
16516 ac_x_includes='$x_includes'\
16517 ac_x_libraries='$x_libraries'"
16518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
16519$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
c906108c
SS
16520fi
16521
16522
bec39cab 16523# Unlike the sim directory, whether a simulator is linked is controlled by
9b624dbe 16524# presence of a gdb_sim definition in the target configure.tgt entry.
7a292a7a
SS
16525# This code just checks for a few cases where we'd like to ignore those
16526# definitions, even when they're present in the '.mt' file. These cases
16527# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 16528# not part of the source tree.
7a292a7a 16529#
81ecdfbb
RW
16530# Check whether --enable-sim was given.
16531if test "${enable_sim+set}" = set; then :
16532 enableval=$enable_sim; echo "enable_sim = $enable_sim";
7a292a7a
SS
16533 echo "enableval = ${enableval}";
16534 case "${enableval}" in
16535 yes) ignore_sim=false ;;
16536 no) ignore_sim=true ;;
16537 *) ignore_sim=false ;;
16538 esac
16539else
16540 ignore_sim=false
81ecdfbb
RW
16541fi
16542
7a292a7a
SS
16543
16544if test ! -d "${srcdir}/../sim"; then
16545 ignore_sim=true
16546fi
16547
9b624dbe
UW
16548SIM=
16549SIM_OBS=
16550if test "${ignore_sim}" = "false"; then
16551 if test x"${gdb_sim}" != x ; then
16552 SIM="${gdb_sim}"
16553 SIM_OBS="remote-sim.o"
60ca704f 16554
81ecdfbb 16555$as_echo "#define WITH_SIM 1" >>confdefs.h
7a292a7a 16556
976102cd
PA
16557
16558 # Some tdep code should only be compiled in when the ppc sim is
16559 # built. PR sim/13418.
16560 case $target in
16561 powerpc*-*-*)
16562
16563$as_echo "#define WITH_PPC_SIM 1" >>confdefs.h
16564
16565 ;;
16566 esac
9b624dbe 16567 fi
7a292a7a
SS
16568fi
16569
16570
16571
c906108c
SS
16572
16573
16574
16575
16576
16577
dfcd3bfb 16578
e56ac5c3
AC
16579
16580
b3a90332
AC
16581
16582
c35f4ffc 16583# List of host floatformats.
bec39cab
AC
16584
16585cat >>confdefs.h <<_ACEOF
c35f4ffc 16586#define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
bec39cab 16587_ACEOF
c35f4ffc 16588
bec39cab
AC
16589
16590cat >>confdefs.h <<_ACEOF
c35f4ffc 16591#define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
bec39cab
AC
16592_ACEOF
16593
c35f4ffc 16594
bec39cab 16595cat >>confdefs.h <<_ACEOF
c35f4ffc 16596#define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
bec39cab 16597_ACEOF
c35f4ffc
AC
16598
16599
c906108c
SS
16600# target_subdir is used by the testsuite to find the target libraries.
16601target_subdir=
16602if test "${host}" != "${target}"; then
16603 target_subdir="${target_alias}/"
16604fi
16605
16606
21ea5acd 16607# Import nat definitions.
2b351b19 16608nat_makefile_frag=/dev/null
771b4502 16609if test "${gdb_native}" = "yes"; then
21ea5acd
SDJ
16610 . ${srcdir}/configure.nat
16611 nativefile=$NAT_FILE
c906108c 16612fi
c906108c 16613
c906108c
SS
16614
16615
16616
21ea5acd
SDJ
16617
16618
16619
16620
16621
c906108c
SS
16622
16623
b00a8037 16624if test x"${gdb_osabi}" != x ; then
bec39cab
AC
16625
16626cat >>confdefs.h <<_ACEOF
b00a8037 16627#define GDB_OSABI_DEFAULT $gdb_osabi
bec39cab 16628_ACEOF
b00a8037
DJ
16629
16630fi
16631
8dcde887 16632# Enable multi-ice-gdb-server.
81ecdfbb
RW
16633# Check whether --enable-multi-ice was given.
16634if test "${enable_multi_ice+set}" = set; then :
16635 enableval=$enable_multi_ice; case $enableval in
8dcde887
MK
16636 yes | no)
16637 ;;
81ecdfbb 16638 *) as_fn_error "bad value $enableval for --enable-multi-ice" "$LINENO" 5 ;;
8dcde887 16639 esac
81ecdfbb 16640fi
b4e70030 16641
81ecdfbb
RW
16642if test "x$enable_multi_ice" = xyes; then
16643 subdirs="$subdirs multi-ice"
3ace7edb 16644
a85f51e7
DJ
16645fi
16646
496c0e1b
JB
16647# Check whether --enable-gdbserver was given.
16648if test "${enable_gdbserver+set}" = set; then :
16649 enableval=$enable_gdbserver; case "${enableval}" in
16650 yes| no|auto) ;;
16651 *) as_fn_error "bad value ${enableval} for --enable-gdbserver option" "$LINENO" 5 ;;
16652esac
16653else
16654 enable_gdbserver=auto
16655fi
16656
16657
16658# We only build gdbserver automatically in a native configuration, and
16659# only if the user did not explicitly disable its build.
16660if test "$gdb_native" = "yes" -a "$enable_gdbserver" != "no"; then
81ecdfbb
RW
16661 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5
16662$as_echo_n "checking whether gdbserver is supported on this host... " >&6; }
8dcde887 16663 if test "x$build_gdbserver" = xyes; then
81ecdfbb
RW
16664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16665$as_echo "yes" >&6; }
16666 subdirs="$subdirs gdbserver"
3ace7edb 16667
496c0e1b 16668 gdbserver_build_enabled=yes
8dcde887 16669 else
81ecdfbb
RW
16670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16671$as_echo "no" >&6; }
8dcde887
MK
16672 fi
16673fi
16674
496c0e1b
JB
16675# If the user explicitly request the gdbserver to be built, verify that
16676# we were in fact able to enable it.
16677if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then
16678 as_fn_error "Automatic gdbserver build is not supported for this configuration" "$LINENO" 5
16679fi
16680
393fd4c3
YQ
16681# Check for babeltrace and babeltrace-ctf
16682
16683# Check whether --with-babeltrace was given.
16684if test "${with_babeltrace+set}" = set; then :
16685 withval=$with_babeltrace;
16686else
16687 with_babeltrace=auto
16688fi
16689
16690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltrace" >&5
16691$as_echo_n "checking whether to use babeltrace... " >&6; }
16692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5
16693$as_echo "$with_babeltrace" >&6; }
16694
16695if test "x$with_babeltrace" = "xno"; then
16696 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&5
16697$as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&2;}
16698else
16699 # Append -Werror to CFLAGS so that configure can catch the warning
16700 # "assignment from incompatible pointer type", which is related to
16701 # the babeltrace change from 1.0.3 to 1.1.0. Babeltrace 1.1.0 works
16702 # in GDB, while babeltrace 1.0.3 is broken.
16703 # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be
16704 # safe to save and restore CFLAGS here.
16705 saved_CFLAGS=$CFLAGS
16706 CFLAGS="$CFLAGS -Werror"
16707
16708
16709
16710
16711
16712
16713
16714
16715 use_additional=yes
16716
16717 acl_save_prefix="$prefix"
16718 prefix="$acl_final_prefix"
16719 acl_save_exec_prefix="$exec_prefix"
16720 exec_prefix="$acl_final_exec_prefix"
16721
16722 eval additional_includedir=\"$includedir\"
16723 eval additional_libdir=\"$libdir\"
16724
16725 exec_prefix="$acl_save_exec_prefix"
16726 prefix="$acl_save_prefix"
16727
16728
16729# Check whether --with-libbabeltrace-prefix was given.
16730if test "${with_libbabeltrace_prefix+set}" = set; then :
16731 withval=$with_libbabeltrace_prefix;
16732 if test "X$withval" = "Xno"; then
16733 use_additional=no
16734 else
16735 if test "X$withval" = "X"; then
16736
16737 acl_save_prefix="$prefix"
16738 prefix="$acl_final_prefix"
16739 acl_save_exec_prefix="$exec_prefix"
16740 exec_prefix="$acl_final_exec_prefix"
16741
16742 eval additional_includedir=\"$includedir\"
16743 eval additional_libdir=\"$libdir\"
16744
16745 exec_prefix="$acl_save_exec_prefix"
16746 prefix="$acl_save_prefix"
16747
16748 else
16749 additional_includedir="$withval/include"
16750 additional_libdir="$withval/lib"
16751 fi
16752 fi
16753
16754fi
16755
16756 LIBBABELTRACE=
16757 LTLIBBABELTRACE=
16758 INCBABELTRACE=
16759 rpathdirs=
16760 ltrpathdirs=
16761 names_already_handled=
16762 names_next_round='babeltrace babeltrace-ctf'
16763 while test -n "$names_next_round"; do
16764 names_this_round="$names_next_round"
16765 names_next_round=
16766 for name in $names_this_round; do
16767 already_handled=
16768 for n in $names_already_handled; do
16769 if test "$n" = "$name"; then
16770 already_handled=yes
16771 break
16772 fi
16773 done
16774 if test -z "$already_handled"; then
16775 names_already_handled="$names_already_handled $name"
16776 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
16777 eval value=\"\$HAVE_LIB$uppername\"
16778 if test -n "$value"; then
16779 if test "$value" = yes; then
16780 eval value=\"\$LIB$uppername\"
16781 test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value"
16782 eval value=\"\$LTLIB$uppername\"
16783 test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value"
16784 else
16785 :
16786 fi
16787 else
16788 found_dir=
16789 found_la=
16790 found_so=
16791 found_a=
16792 if test $use_additional = yes; then
16793 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
16794 found_dir="$additional_libdir"
16795 found_so="$additional_libdir/lib$name.$shlibext"
16796 if test -f "$additional_libdir/lib$name.la"; then
16797 found_la="$additional_libdir/lib$name.la"
16798 fi
16799 else
16800 if test -f "$additional_libdir/lib$name.$libext"; then
16801 found_dir="$additional_libdir"
16802 found_a="$additional_libdir/lib$name.$libext"
16803 if test -f "$additional_libdir/lib$name.la"; then
16804 found_la="$additional_libdir/lib$name.la"
16805 fi
16806 fi
16807 fi
16808 fi
16809 if test "X$found_dir" = "X"; then
16810 for x in $LDFLAGS $LTLIBBABELTRACE; do
16811
16812 acl_save_prefix="$prefix"
16813 prefix="$acl_final_prefix"
16814 acl_save_exec_prefix="$exec_prefix"
16815 exec_prefix="$acl_final_exec_prefix"
16816 eval x=\"$x\"
16817 exec_prefix="$acl_save_exec_prefix"
16818 prefix="$acl_save_prefix"
16819
16820 case "$x" in
16821 -L*)
16822 dir=`echo "X$x" | sed -e 's/^X-L//'`
16823 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
16824 found_dir="$dir"
16825 found_so="$dir/lib$name.$shlibext"
16826 if test -f "$dir/lib$name.la"; then
16827 found_la="$dir/lib$name.la"
16828 fi
16829 else
16830 if test -f "$dir/lib$name.$libext"; then
16831 found_dir="$dir"
16832 found_a="$dir/lib$name.$libext"
16833 if test -f "$dir/lib$name.la"; then
16834 found_la="$dir/lib$name.la"
16835 fi
16836 fi
16837 fi
16838 ;;
16839 esac
16840 if test "X$found_dir" != "X"; then
16841 break
16842 fi
16843 done
16844 fi
16845 if test "X$found_dir" != "X"; then
16846 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name"
16847 if test "X$found_so" != "X"; then
16848 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
16849 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
16850 else
16851 haveit=
16852 for x in $ltrpathdirs; do
16853 if test "X$x" = "X$found_dir"; then
16854 haveit=yes
16855 break
16856 fi
16857 done
16858 if test -z "$haveit"; then
16859 ltrpathdirs="$ltrpathdirs $found_dir"
16860 fi
16861 if test "$hardcode_direct" = yes; then
16862 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
16863 else
16864 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
16865 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
16866 haveit=
16867 for x in $rpathdirs; do
16868 if test "X$x" = "X$found_dir"; then
16869 haveit=yes
16870 break
16871 fi
16872 done
16873 if test -z "$haveit"; then
16874 rpathdirs="$rpathdirs $found_dir"
16875 fi
16876 else
16877 haveit=
16878 for x in $LDFLAGS $LIBBABELTRACE; do
16879
16880 acl_save_prefix="$prefix"
16881 prefix="$acl_final_prefix"
16882 acl_save_exec_prefix="$exec_prefix"
16883 exec_prefix="$acl_final_exec_prefix"
16884 eval x=\"$x\"
16885 exec_prefix="$acl_save_exec_prefix"
16886 prefix="$acl_save_prefix"
16887
16888 if test "X$x" = "X-L$found_dir"; then
16889 haveit=yes
16890 break
16891 fi
16892 done
16893 if test -z "$haveit"; then
16894 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir"
16895 fi
16896 if test "$hardcode_minus_L" != no; then
16897 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
16898 else
16899 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
16900 fi
16901 fi
16902 fi
16903 fi
16904 else
16905 if test "X$found_a" != "X"; then
16906 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a"
16907 else
16908 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name"
16909 fi
16910 fi
16911 additional_includedir=
16912 case "$found_dir" in
16913 */lib | */lib/)
16914 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
16915 additional_includedir="$basedir/include"
16916 ;;
16917 esac
16918 if test "X$additional_includedir" != "X"; then
16919 if test "X$additional_includedir" != "X/usr/include"; then
16920 haveit=
16921 if test "X$additional_includedir" = "X/usr/local/include"; then
16922 if test -n "$GCC"; then
16923 case $host_os in
16924 linux*) haveit=yes;;
16925 esac
16926 fi
16927 fi
16928 if test -z "$haveit"; then
16929 for x in $CPPFLAGS $INCBABELTRACE; do
16930
16931 acl_save_prefix="$prefix"
16932 prefix="$acl_final_prefix"
16933 acl_save_exec_prefix="$exec_prefix"
16934 exec_prefix="$acl_final_exec_prefix"
16935 eval x=\"$x\"
16936 exec_prefix="$acl_save_exec_prefix"
16937 prefix="$acl_save_prefix"
16938
16939 if test "X$x" = "X-I$additional_includedir"; then
16940 haveit=yes
16941 break
16942 fi
16943 done
16944 if test -z "$haveit"; then
16945 if test -d "$additional_includedir"; then
16946 INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir"
16947 fi
16948 fi
16949 fi
16950 fi
16951 fi
16952 if test -n "$found_la"; then
16953 save_libdir="$libdir"
16954 case "$found_la" in
16955 */* | *\\*) . "$found_la" ;;
16956 *) . "./$found_la" ;;
16957 esac
16958 libdir="$save_libdir"
16959 for dep in $dependency_libs; do
16960 case "$dep" in
16961 -L*)
16962 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
16963 if test "X$additional_libdir" != "X/usr/lib"; then
16964 haveit=
16965 if test "X$additional_libdir" = "X/usr/local/lib"; then
16966 if test -n "$GCC"; then
16967 case $host_os in
16968 linux*) haveit=yes;;
16969 esac
16970 fi
16971 fi
16972 if test -z "$haveit"; then
16973 haveit=
16974 for x in $LDFLAGS $LIBBABELTRACE; do
16975
16976 acl_save_prefix="$prefix"
16977 prefix="$acl_final_prefix"
16978 acl_save_exec_prefix="$exec_prefix"
16979 exec_prefix="$acl_final_exec_prefix"
16980 eval x=\"$x\"
16981 exec_prefix="$acl_save_exec_prefix"
16982 prefix="$acl_save_prefix"
16983
16984 if test "X$x" = "X-L$additional_libdir"; then
16985 haveit=yes
16986 break
16987 fi
16988 done
16989 if test -z "$haveit"; then
16990 if test -d "$additional_libdir"; then
16991 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir"
16992 fi
16993 fi
16994 haveit=
16995 for x in $LDFLAGS $LTLIBBABELTRACE; do
16996
16997 acl_save_prefix="$prefix"
16998 prefix="$acl_final_prefix"
16999 acl_save_exec_prefix="$exec_prefix"
17000 exec_prefix="$acl_final_exec_prefix"
17001 eval x=\"$x\"
17002 exec_prefix="$acl_save_exec_prefix"
17003 prefix="$acl_save_prefix"
17004
17005 if test "X$x" = "X-L$additional_libdir"; then
17006 haveit=yes
17007 break
17008 fi
17009 done
17010 if test -z "$haveit"; then
17011 if test -d "$additional_libdir"; then
17012 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir"
17013 fi
17014 fi
17015 fi
17016 fi
17017 ;;
17018 -R*)
17019 dir=`echo "X$dep" | sed -e 's/^X-R//'`
17020 if test "$enable_rpath" != no; then
17021 haveit=
17022 for x in $rpathdirs; do
17023 if test "X$x" = "X$dir"; then
17024 haveit=yes
17025 break
17026 fi
17027 done
17028 if test -z "$haveit"; then
17029 rpathdirs="$rpathdirs $dir"
17030 fi
17031 haveit=
17032 for x in $ltrpathdirs; do
17033 if test "X$x" = "X$dir"; then
17034 haveit=yes
17035 break
17036 fi
17037 done
17038 if test -z "$haveit"; then
17039 ltrpathdirs="$ltrpathdirs $dir"
17040 fi
17041 fi
17042 ;;
17043 -l*)
17044 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
17045 ;;
17046 *.la)
17047 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
17048 ;;
17049 *)
17050 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$dep"
17051 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$dep"
17052 ;;
17053 esac
17054 done
17055 fi
17056 else
17057 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
17058 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name"
17059 fi
17060 fi
17061 fi
17062 done
17063 done
17064 if test "X$rpathdirs" != "X"; then
17065 if test -n "$hardcode_libdir_separator"; then
17066 alldirs=
17067 for found_dir in $rpathdirs; do
17068 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
17069 done
17070 acl_save_libdir="$libdir"
17071 libdir="$alldirs"
17072 eval flag=\"$hardcode_libdir_flag_spec\"
17073 libdir="$acl_save_libdir"
17074 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
17075 else
17076 for found_dir in $rpathdirs; do
17077 acl_save_libdir="$libdir"
17078 libdir="$found_dir"
17079 eval flag=\"$hardcode_libdir_flag_spec\"
17080 libdir="$acl_save_libdir"
17081 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
17082 done
17083 fi
17084 fi
17085 if test "X$ltrpathdirs" != "X"; then
17086 for found_dir in $ltrpathdirs; do
17087 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir"
17088 done
17089 fi
17090
17091
17092 ac_save_CPPFLAGS="$CPPFLAGS"
17093
17094 for element in $INCBABELTRACE; do
17095 haveit=
17096 for x in $CPPFLAGS; do
17097
17098 acl_save_prefix="$prefix"
17099 prefix="$acl_final_prefix"
17100 acl_save_exec_prefix="$exec_prefix"
17101 exec_prefix="$acl_final_exec_prefix"
17102 eval x=\"$x\"
17103 exec_prefix="$acl_save_exec_prefix"
17104 prefix="$acl_save_prefix"
17105
17106 if test "X$x" = "X$element"; then
17107 haveit=yes
17108 break
17109 fi
17110 done
17111 if test -z "$haveit"; then
17112 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
17113 fi
17114 done
17115
17116
17117 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5
17118$as_echo_n "checking for libbabeltrace... " >&6; }
17119if test "${ac_cv_libbabeltrace+set}" = set; then :
17120 $as_echo_n "(cached) " >&6
17121else
17122
17123 ac_save_LIBS="$LIBS"
17124 LIBS="$LIBS $LIBBABELTRACE"
17125 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17126/* end confdefs.h. */
17127#include <babeltrace/babeltrace.h>
17128 #include <babeltrace/ctf/events.h>
17129 #include <babeltrace/ctf/iterator.h>
17130int
17131main ()
17132{
17133struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL));
17134 struct bt_ctf_event *event = NULL;
17135 const struct bt_definition *scope;
17136
13cdc2af 17137 pos->type = BT_SEEK_BEGIN;
65c749e7 17138 bt_iter_set_pos (bt_ctf_get_iter (NULL), pos);
393fd4c3
YQ
17139 scope = bt_ctf_get_top_level_scope (event,
17140 BT_STREAM_EVENT_HEADER);
17141 bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id"));
17142
17143 ;
17144 return 0;
17145}
17146_ACEOF
17147if ac_fn_c_try_link "$LINENO"; then :
17148 ac_cv_libbabeltrace=yes
17149else
17150 ac_cv_libbabeltrace=no
17151fi
17152rm -f core conftest.err conftest.$ac_objext \
17153 conftest$ac_exeext conftest.$ac_ext
17154 LIBS="$ac_save_LIBS"
17155
17156fi
17157{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5
17158$as_echo "$ac_cv_libbabeltrace" >&6; }
17159 if test "$ac_cv_libbabeltrace" = yes; then
17160 HAVE_LIBBABELTRACE=yes
17161
17162$as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h
17163
17164 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libbabeltrace" >&5
17165$as_echo_n "checking how to link with libbabeltrace... " >&6; }
17166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5
17167$as_echo "$LIBBABELTRACE" >&6; }
17168 else
17169 HAVE_LIBBABELTRACE=no
17170 CPPFLAGS="$ac_save_CPPFLAGS"
17171 LIBBABELTRACE=
17172 LTLIBBABELTRACE=
17173 fi
17174
17175
17176
17177
17178
17179
17180 CFLAGS=$saved_CFLAGS
17181
17182 if test "$HAVE_LIBBABELTRACE" != yes; then
17183 if test "$with_babeltrace" = yes; then
17184 as_fn_error "babeltrace is missing or unusable" "$LINENO" 5
17185 else
17186 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&5
17187$as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&2;}
17188 fi
17189 fi
17190fi
17191
21ea5acd
SDJ
17192# If nativefile (NAT_FILE) is not set in configure.nat, we link to an
17193# empty version.
c906108c
SS
17194
17195files=
17196links=
5a2402b8 17197
c906108c
SS
17198rm -f nm.h
17199if test "${nativefile}" != ""; then
0f475e27
AC
17200 case "${nativefile}" in
17201 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
17202 * ) GDB_NM_FILE="${nativefile}"
17203 esac
5a2402b8
AC
17204 files="${files} ${GDB_NM_FILE}"
17205 links="${links} nm.h"
60ca704f
SE
17206
17207cat >>confdefs.h <<_ACEOF
b78960be 17208#define GDB_NM_FILE "${GDB_NM_FILE}"
bec39cab 17209_ACEOF
5a2402b8 17210
c906108c 17211fi
5a2402b8
AC
17212
17213
e3487908
GKB
17214for ac_prog in xsltproc
17215do
17216 # Extract the first word of "$ac_prog", so it can be a program name with args.
17217set dummy $ac_prog; ac_word=$2
17218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17219$as_echo_n "checking for $ac_word... " >&6; }
17220if test "${ac_cv_path_XSLTPROC+set}" = set; then :
17221 $as_echo_n "(cached) " >&6
17222else
17223 case $XSLTPROC in
17224 [\\/]* | ?:[\\/]*)
17225 ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
17226 ;;
17227 *)
17228 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17229for as_dir in $PATH
17230do
17231 IFS=$as_save_IFS
17232 test -z "$as_dir" && as_dir=.
17233 for ac_exec_ext in '' $ac_executable_extensions; do
17234 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17235 ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
17236 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17237 break 2
17238 fi
17239done
17240 done
17241IFS=$as_save_IFS
17242
17243 ;;
17244esac
17245fi
17246XSLTPROC=$ac_cv_path_XSLTPROC
17247if test -n "$XSLTPROC"; then
17248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
17249$as_echo "$XSLTPROC" >&6; }
17250else
17251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17252$as_echo "no" >&6; }
17253fi
17254
17255
17256 test -n "$XSLTPROC" && break
17257done
17258test -n "$XSLTPROC" || XSLTPROC="missing"
17259
17260if test "x$USE_MAINTAINER_MODE" = xyes; then
17261 if test "${XSLTPROC}" = missing; then
17262 as_fn_error "unable to find xsltproc. maintainer-mode requires xsltproc." "$LINENO" 5
17263 fi
17264fi
17265
17266
bec39cab
AC
17267ac_sources="$files"
17268ac_dests="$links"
17269while test -n "$ac_sources"; do
17270 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
17271 set $ac_sources; ac_source=$1; shift; ac_sources=$*
17272 ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source"
17273done
81ecdfbb 17274ac_config_links="$ac_config_links $ac_config_links_1"
c906108c
SS
17275
17276
c906108c
SS
17277
17278
c906108c 17279
81ecdfbb 17280$as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
bec39cab 17281
bec39cab 17282
dcd1f979
TT
17283if $development; then
17284
17285$as_echo "#define GDB_SELF_TEST 1" >>confdefs.h
17286
07e253aa
PA
17287 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_UNITTESTS_OBS)"
17288 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_UNITTESTS_SRCS)"
dcd1f979
TT
17289fi
17290
b292c783 17291
f6a88844
JM
17292 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
17293 GDB_TRANSFORM_NAME=`echo gdb | sed -e "$gdb_ac_transform"`
17294 if test "x$GDB_TRANSFORM_NAME" = x; then
17295 GDB_TRANSFORM_NAME=gdb
17296 fi
17297
17298
17299
17300 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
17301 GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$gdb_ac_transform"`
17302 if test "x$GCORE_TRANSFORM_NAME" = x; then
17303 GCORE_TRANSFORM_NAME=gcore
17304 fi
17305
b292c783
JK
17306
17307ac_config_files="$ac_config_files gcore"
17308
c971b7fa 17309ac_config_files="$ac_config_files Makefile gdb-gdb.gdb doc/Makefile data-directory/Makefile"
81ecdfbb 17310
89a34d1b 17311
bec39cab
AC
17312cat >confcache <<\_ACEOF
17313# This file is a shell script that caches the results of configure
17314# tests run on this system so they can be shared between configure
17315# scripts and configure runs, see configure's option --config-cache.
17316# It is not useful on other systems. If it contains results you don't
17317# want to keep, you may remove or edit it.
17318#
17319# config.status only pays attention to the cache file if you give it
17320# the --recheck option to rerun configure.
17321#
17322# `ac_cv_env_foo' variables (set or unset) will be overridden when
17323# loading this file, other *unset* `ac_cv_foo' will be assigned the
17324# following values.
17325
17326_ACEOF
17327
17328# The following way of writing the cache mishandles newlines in values,
17329# but we know of no workaround that is simple, portable, and efficient.
81ecdfbb 17330# So, we kill variables containing newlines.
bec39cab
AC
17331# Ultrix sh set writes to stderr and can't be redirected directly,
17332# and sets the high bit in the cache file unless we assign to the vars.
81ecdfbb
RW
17333(
17334 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17335 eval ac_val=\$$ac_var
17336 case $ac_val in #(
17337 *${as_nl}*)
17338 case $ac_var in #(
17339 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17340$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
17341 esac
17342 case $ac_var in #(
17343 _ | IFS | as_nl) ;; #(
17344 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
17345 *) { eval $ac_var=; unset $ac_var;} ;;
17346 esac ;;
17347 esac
17348 done
17349
bec39cab 17350 (set) 2>&1 |
81ecdfbb
RW
17351 case $as_nl`(ac_space=' '; set) 2>&1` in #(
17352 *${as_nl}ac_space=\ *)
17353 # `set' does not quote correctly, so add quotes: double-quote
17354 # substitution turns \\\\ into \\, and sed turns \\ into \.
bec39cab
AC
17355 sed -n \
17356 "s/'/'\\\\''/g;
17357 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
81ecdfbb 17358 ;; #(
bec39cab
AC
17359 *)
17360 # `set' quotes correctly as required by POSIX, so do not add quotes.
81ecdfbb 17361 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
bec39cab 17362 ;;
81ecdfbb
RW
17363 esac |
17364 sort
17365) |
bec39cab 17366 sed '
81ecdfbb 17367 /^ac_cv_env_/b end
bec39cab 17368 t clear
81ecdfbb 17369 :clear
bec39cab
AC
17370 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17371 t end
81ecdfbb
RW
17372 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17373 :end' >>confcache
17374if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17375 if test -w "$cache_file"; then
17376 test "x$cache_file" != "x/dev/null" &&
17377 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17378$as_echo "$as_me: updating cache $cache_file" >&6;}
bec39cab
AC
17379 cat confcache >$cache_file
17380 else
81ecdfbb
RW
17381 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17382$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
bec39cab
AC
17383 fi
17384fi
17385rm -f confcache
17386
17387test "x$prefix" = xNONE && prefix=$ac_default_prefix
17388# Let make expand exec_prefix.
17389test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
17390
bec39cab
AC
17391DEFS=-DHAVE_CONFIG_H
17392
17393ac_libobjs=
17394ac_ltlibobjs=
17395for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17396 # 1. Remove the extension, and $U if already installed.
81ecdfbb
RW
17397 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
17398 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
17399 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
17400 # will be set to the directory where LIBOBJS objects are built.
17401 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17402 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
bec39cab
AC
17403done
17404LIBOBJS=$ac_libobjs
17405
17406LTLIBOBJS=$ac_ltlibobjs
17407
17408
85981d60 17409if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
81ecdfbb
RW
17410 as_fn_error "conditional \"MAINTAINER_MODE\" was never defined.
17411Usually this means the macro was only invoked conditionally." "$LINENO" 5
85981d60 17412fi
4df42755
DE
17413if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then
17414 as_fn_error "conditional \"HAVE_PYTHON\" was never defined.
17415Usually this means the macro was only invoked conditionally." "$LINENO" 5
17416fi
17417if test -z "${HAVE_GUILE_TRUE}" && test -z "${HAVE_GUILE_FALSE}"; then
17418 as_fn_error "conditional \"HAVE_GUILE\" was never defined.
17419Usually this means the macro was only invoked conditionally." "$LINENO" 5
17420fi
81ecdfbb
RW
17421
17422
bec39cab 17423: ${CONFIG_STATUS=./config.status}
81ecdfbb 17424ac_write_fail=0
bec39cab
AC
17425ac_clean_files_save=$ac_clean_files
17426ac_clean_files="$ac_clean_files $CONFIG_STATUS"
81ecdfbb
RW
17427{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17428$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
17429as_write_fail=0
17430cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
bec39cab
AC
17431#! $SHELL
17432# Generated by $as_me.
17433# Run this file to recreate the current configuration.
17434# Compiler output produced by configure, useful for debugging
17435# configure, is in config.log if it exists.
17436
17437debug=false
17438ac_cs_recheck=false
17439ac_cs_silent=false
bec39cab 17440
81ecdfbb
RW
17441SHELL=\${CONFIG_SHELL-$SHELL}
17442export SHELL
17443_ASEOF
17444cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17445## -------------------- ##
17446## M4sh Initialization. ##
17447## -------------------- ##
17448
17449# Be more Bourne compatible
17450DUALCASE=1; export DUALCASE # for MKS sh
17451if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
17452 emulate sh
17453 NULLCMD=:
81ecdfbb 17454 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
17455 # is contrary to our usage. Disable this feature.
17456 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
17457 setopt NO_GLOB_SUBST
17458else
17459 case `(set -o) 2>/dev/null` in #(
17460 *posix*) :
17461 set -o posix ;; #(
17462 *) :
17463 ;;
17464esac
bec39cab 17465fi
bec39cab 17466
81ecdfbb
RW
17467
17468as_nl='
17469'
17470export as_nl
17471# Printing a long string crashes Solaris 7 /usr/bin/printf.
17472as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
17473as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
17474as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
17475# Prefer a ksh shell builtin over an external printf program on Solaris,
17476# but without wasting forks for bash or zsh.
17477if test -z "$BASH_VERSION$ZSH_VERSION" \
17478 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
17479 as_echo='print -r --'
17480 as_echo_n='print -rn --'
17481elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
17482 as_echo='printf %s\n'
17483 as_echo_n='printf %s'
17484else
17485 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
17486 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
17487 as_echo_n='/usr/ucb/echo -n'
17488 else
17489 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
17490 as_echo_n_body='eval
17491 arg=$1;
17492 case $arg in #(
17493 *"$as_nl"*)
17494 expr "X$arg" : "X\\(.*\\)$as_nl";
17495 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
17496 esac;
17497 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
17498 '
17499 export as_echo_n_body
17500 as_echo_n='sh -c $as_echo_n_body as_echo'
17501 fi
17502 export as_echo_body
17503 as_echo='sh -c $as_echo_body as_echo'
17504fi
17505
17506# The user is always right.
17507if test "${PATH_SEPARATOR+set}" != set; then
17508 PATH_SEPARATOR=:
17509 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
17510 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
17511 PATH_SEPARATOR=';'
17512 }
bec39cab
AC
17513fi
17514
17515
81ecdfbb
RW
17516# IFS
17517# We need space, tab and new line, in precisely that order. Quoting is
17518# there to prevent editors from complaining about space-tab.
17519# (If _AS_PATH_WALK were called with IFS unset, it would disable word
17520# splitting by setting IFS to empty value.)
17521IFS=" "" $as_nl"
17522
17523# Find who we are. Look in the path if we contain no directory separator.
17524case $0 in #((
17525 *[\\/]* ) as_myself=$0 ;;
17526 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17527for as_dir in $PATH
17528do
17529 IFS=$as_save_IFS
17530 test -z "$as_dir" && as_dir=.
17531 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17532 done
17533IFS=$as_save_IFS
17534
17535 ;;
17536esac
17537# We did not find ourselves, most probably we were run as `sh COMMAND'
17538# in which case we are not to be found in the path.
17539if test "x$as_myself" = x; then
17540 as_myself=$0
17541fi
17542if test ! -f "$as_myself"; then
17543 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
17544 exit 1
17545fi
17546
17547# Unset variables that we do not need and which cause bugs (e.g. in
17548# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
17549# suppresses any "Segmentation fault" message there. '((' could
17550# trigger a bug in pdksh 5.2.14.
17551for as_var in BASH_ENV ENV MAIL MAILPATH
17552do eval test x\${$as_var+set} = xset \
17553 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
17554done
bec39cab
AC
17555PS1='$ '
17556PS2='> '
17557PS4='+ '
17558
17559# NLS nuisances.
81ecdfbb
RW
17560LC_ALL=C
17561export LC_ALL
17562LANGUAGE=C
17563export LANGUAGE
17564
17565# CDPATH.
17566(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
17567
17568
17569# as_fn_error ERROR [LINENO LOG_FD]
17570# ---------------------------------
17571# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
17572# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
17573# script with status $?, using 1 if that was 0.
17574as_fn_error ()
17575{
17576 as_status=$?; test $as_status -eq 0 && as_status=1
17577 if test "$3"; then
17578 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
17579 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
17580 fi
17581 $as_echo "$as_me: error: $1" >&2
17582 as_fn_exit $as_status
17583} # as_fn_error
17584
17585
17586# as_fn_set_status STATUS
17587# -----------------------
17588# Set $? to STATUS, without forking.
17589as_fn_set_status ()
17590{
17591 return $1
17592} # as_fn_set_status
17593
17594# as_fn_exit STATUS
17595# -----------------
17596# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
17597as_fn_exit ()
17598{
17599 set +e
17600 as_fn_set_status $1
17601 exit $1
17602} # as_fn_exit
17603
17604# as_fn_unset VAR
17605# ---------------
17606# Portably unset VAR.
17607as_fn_unset ()
17608{
17609 { eval $1=; unset $1;}
17610}
17611as_unset=as_fn_unset
17612# as_fn_append VAR VALUE
17613# ----------------------
17614# Append the text in VALUE to the end of the definition contained in VAR. Take
17615# advantage of any shell optimizations that allow amortized linear growth over
17616# repeated appends, instead of the typical quadratic growth present in naive
17617# implementations.
17618if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
17619 eval 'as_fn_append ()
17620 {
17621 eval $1+=\$2
17622 }'
17623else
17624 as_fn_append ()
17625 {
17626 eval $1=\$$1\$2
17627 }
17628fi # as_fn_append
17629
17630# as_fn_arith ARG...
17631# ------------------
17632# Perform arithmetic evaluation on the ARGs, and store the result in the
17633# global $as_val. Take advantage of shells that can avoid forks. The arguments
17634# must be portable across $(()) and expr.
17635if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
17636 eval 'as_fn_arith ()
17637 {
17638 as_val=$(( $* ))
17639 }'
17640else
17641 as_fn_arith ()
17642 {
17643 as_val=`expr "$@" || test $? -eq 1`
17644 }
17645fi # as_fn_arith
bec39cab 17646
81ecdfbb
RW
17647
17648if expr a : '\(a\)' >/dev/null 2>&1 &&
17649 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
17650 as_expr=expr
17651else
17652 as_expr=false
17653fi
17654
81ecdfbb 17655if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
17656 as_basename=basename
17657else
17658 as_basename=false
17659fi
17660
81ecdfbb
RW
17661if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17662 as_dirname=dirname
17663else
17664 as_dirname=false
17665fi
bec39cab 17666
81ecdfbb 17667as_me=`$as_basename -- "$0" ||
bec39cab
AC
17668$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17669 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
17670 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
17671$as_echo X/"$0" |
17672 sed '/^.*\/\([^/][^/]*\)\/*$/{
17673 s//\1/
17674 q
17675 }
17676 /^X\/\(\/\/\)$/{
17677 s//\1/
17678 q
17679 }
17680 /^X\/\(\/\).*/{
17681 s//\1/
17682 q
17683 }
17684 s/.*/./; q'`
b4e70030 17685
b4e70030
JB
17686# Avoid depending upon Character Ranges.
17687as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17688as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17689as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17690as_cr_digits='0123456789'
17691as_cr_alnum=$as_cr_Letters$as_cr_digits
17692
81ecdfbb
RW
17693ECHO_C= ECHO_N= ECHO_T=
17694case `echo -n x` in #(((((
17695-n*)
17696 case `echo 'xy\c'` in
17697 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
17698 xy) ECHO_C='\c';;
17699 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
17700 ECHO_T=' ';;
17701 esac;;
17702*)
17703 ECHO_N='-n';;
bec39cab
AC
17704esac
17705
81ecdfbb
RW
17706rm -f conf$$ conf$$.exe conf$$.file
17707if test -d conf$$.dir; then
17708 rm -f conf$$.dir/conf$$.file
bec39cab 17709else
81ecdfbb
RW
17710 rm -f conf$$.dir
17711 mkdir conf$$.dir 2>/dev/null
bec39cab 17712fi
81ecdfbb
RW
17713if (echo >conf$$.file) 2>/dev/null; then
17714 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 17715 as_ln_s='ln -s'
81ecdfbb
RW
17716 # ... but there are two gotchas:
17717 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17718 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
17719 # In both cases, we have to default to `cp -p'.
17720 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
17721 as_ln_s='cp -p'
17722 elif ln conf$$.file conf$$ 2>/dev/null; then
17723 as_ln_s=ln
17724 else
17725 as_ln_s='cp -p'
b4e70030 17726 fi
bec39cab
AC
17727else
17728 as_ln_s='cp -p'
17729fi
81ecdfbb
RW
17730rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17731rmdir conf$$.dir 2>/dev/null
17732
17733
17734# as_fn_mkdir_p
17735# -------------
17736# Create "$as_dir" as a directory, including parents if necessary.
17737as_fn_mkdir_p ()
17738{
17739
17740 case $as_dir in #(
17741 -*) as_dir=./$as_dir;;
17742 esac
17743 test -d "$as_dir" || eval $as_mkdir_p || {
17744 as_dirs=
17745 while :; do
17746 case $as_dir in #(
17747 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17748 *) as_qdir=$as_dir;;
17749 esac
17750 as_dirs="'$as_qdir' $as_dirs"
17751 as_dir=`$as_dirname -- "$as_dir" ||
17752$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17753 X"$as_dir" : 'X\(//\)[^/]' \| \
17754 X"$as_dir" : 'X\(//\)$' \| \
17755 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17756$as_echo X"$as_dir" |
17757 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17758 s//\1/
17759 q
17760 }
17761 /^X\(\/\/\)[^/].*/{
17762 s//\1/
17763 q
17764 }
17765 /^X\(\/\/\)$/{
17766 s//\1/
17767 q
17768 }
17769 /^X\(\/\).*/{
17770 s//\1/
17771 q
17772 }
17773 s/.*/./; q'`
17774 test -d "$as_dir" && break
17775 done
17776 test -z "$as_dirs" || eval "mkdir $as_dirs"
17777 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
17778
bec39cab 17779
81ecdfbb 17780} # as_fn_mkdir_p
bec39cab 17781if mkdir -p . 2>/dev/null; then
81ecdfbb 17782 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
17783else
17784 test -d ./-p && rmdir ./-p
17785 as_mkdir_p=false
17786fi
17787
81ecdfbb
RW
17788if test -x / >/dev/null 2>&1; then
17789 as_test_x='test -x'
17790else
17791 if ls -dL / >/dev/null 2>&1; then
17792 as_ls_L_option=L
17793 else
17794 as_ls_L_option=
17795 fi
17796 as_test_x='
17797 eval sh -c '\''
17798 if test -d "$1"; then
17799 test -d "$1/.";
17800 else
17801 case $1 in #(
17802 -*)set "./$1";;
17803 esac;
17804 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
17805 ???[sx]*):;;*)false;;esac;fi
17806 '\'' sh
17807 '
17808fi
17809as_executable_p=$as_test_x
bec39cab
AC
17810
17811# Sed expression to map a string onto a valid CPP name.
17812as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
17813
17814# Sed expression to map a string onto a valid variable name.
17815as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
17816
17817
bec39cab 17818exec 6>&1
81ecdfbb
RW
17819## ----------------------------------- ##
17820## Main body of $CONFIG_STATUS script. ##
17821## ----------------------------------- ##
17822_ASEOF
17823test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
17824
17825cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17826# Save the log message, to keep $0 and so on meaningful, and to
bec39cab 17827# report actual input values of CONFIG_FILES etc. instead of their
81ecdfbb
RW
17828# values after options handling.
17829ac_log="
bec39cab 17830This file was extended by $as_me, which was
81ecdfbb 17831generated by GNU Autoconf 2.64. Invocation command line was
bec39cab
AC
17832
17833 CONFIG_FILES = $CONFIG_FILES
17834 CONFIG_HEADERS = $CONFIG_HEADERS
17835 CONFIG_LINKS = $CONFIG_LINKS
17836 CONFIG_COMMANDS = $CONFIG_COMMANDS
17837 $ $0 $@
17838
81ecdfbb
RW
17839on `(hostname || uname -n) 2>/dev/null | sed 1q`
17840"
17841
bec39cab
AC
17842_ACEOF
17843
81ecdfbb
RW
17844case $ac_config_files in *"
17845"*) set x $ac_config_files; shift; ac_config_files=$*;;
17846esac
234b45d4 17847
81ecdfbb
RW
17848case $ac_config_headers in *"
17849"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17850esac
b4e70030 17851
b4e70030 17852
81ecdfbb
RW
17853cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17854# Files that config.status was made for.
17855config_files="$ac_config_files"
17856config_headers="$ac_config_headers"
17857config_links="$ac_config_links"
17858config_commands="$ac_config_commands"
234b45d4 17859
81ecdfbb 17860_ACEOF
b4e70030 17861
81ecdfbb 17862cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab 17863ac_cs_usage="\
81ecdfbb
RW
17864\`$as_me' instantiates files and other configuration actions
17865from templates according to the current configuration. Unless the files
17866and actions are specified as TAGs, all are instantiated by default.
234b45d4 17867
81ecdfbb 17868Usage: $0 [OPTION]... [TAG]...
234b45d4 17869
bec39cab 17870 -h, --help print this help, then exit
81ecdfbb
RW
17871 -V, --version print version number and configuration settings, then exit
17872 -q, --quiet, --silent
17873 do not print progress messages
bec39cab
AC
17874 -d, --debug don't remove temporary files
17875 --recheck update $as_me by reconfiguring in the same conditions
81ecdfbb
RW
17876 --file=FILE[:TEMPLATE]
17877 instantiate the configuration file FILE
17878 --header=FILE[:TEMPLATE]
17879 instantiate the configuration header FILE
234b45d4 17880
bec39cab
AC
17881Configuration files:
17882$config_files
234b45d4 17883
bec39cab
AC
17884Configuration headers:
17885$config_headers
234b45d4 17886
bec39cab
AC
17887Configuration links:
17888$config_links
234b45d4 17889
bec39cab
AC
17890Configuration commands:
17891$config_commands
17892
81ecdfbb 17893Report bugs to the package provider."
b4e70030 17894
81ecdfbb
RW
17895_ACEOF
17896cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab
AC
17897ac_cs_version="\\
17898config.status
81ecdfbb
RW
17899configured by $0, generated by GNU Autoconf 2.64,
17900 with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
bec39cab 17901
81ecdfbb 17902Copyright (C) 2009 Free Software Foundation, Inc.
bec39cab
AC
17903This config.status script is free software; the Free Software Foundation
17904gives unlimited permission to copy, distribute and modify it."
81ecdfbb
RW
17905
17906ac_pwd='$ac_pwd'
17907srcdir='$srcdir'
17908INSTALL='$INSTALL'
81ecdfbb
RW
17909AWK='$AWK'
17910test -n "\$AWK" || AWK=awk
bec39cab
AC
17911_ACEOF
17912
81ecdfbb
RW
17913cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17914# The default lists apply if the user does not specify any file.
bec39cab
AC
17915ac_need_defaults=:
17916while test $# != 0
17917do
17918 case $1 in
17919 --*=*)
81ecdfbb
RW
17920 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17921 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
bec39cab 17922 ac_shift=:
c906108c 17923 ;;
81ecdfbb 17924 *)
bec39cab
AC
17925 ac_option=$1
17926 ac_optarg=$2
17927 ac_shift=shift
c906108c 17928 ;;
bec39cab 17929 esac
c906108c 17930
bec39cab
AC
17931 case $ac_option in
17932 # Handling of the options.
bec39cab
AC
17933 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17934 ac_cs_recheck=: ;;
81ecdfbb
RW
17935 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
17936 $as_echo "$ac_cs_version"; exit ;;
17937 --debug | --debu | --deb | --de | --d | -d )
bec39cab
AC
17938 debug=: ;;
17939 --file | --fil | --fi | --f )
17940 $ac_shift
81ecdfbb
RW
17941 case $ac_optarg in
17942 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17943 esac
17944 as_fn_append CONFIG_FILES " '$ac_optarg'"
bec39cab
AC
17945 ac_need_defaults=false;;
17946 --header | --heade | --head | --hea )
17947 $ac_shift
81ecdfbb
RW
17948 case $ac_optarg in
17949 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17950 esac
17951 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
bec39cab 17952 ac_need_defaults=false;;
81ecdfbb
RW
17953 --he | --h)
17954 # Conflict between --help and --header
17955 as_fn_error "ambiguous option: \`$1'
17956Try \`$0 --help' for more information.";;
17957 --help | --hel | -h )
17958 $as_echo "$ac_cs_usage"; exit ;;
bec39cab
AC
17959 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17960 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17961 ac_cs_silent=: ;;
c906108c 17962
bec39cab 17963 # This is an error.
81ecdfbb
RW
17964 -*) as_fn_error "unrecognized option: \`$1'
17965Try \`$0 --help' for more information." ;;
c906108c 17966
81ecdfbb
RW
17967 *) as_fn_append ac_config_targets " $1"
17968 ac_need_defaults=false ;;
c906108c 17969
bec39cab
AC
17970 esac
17971 shift
17972done
c906108c 17973
bec39cab 17974ac_configure_extra_args=
c906108c 17975
bec39cab
AC
17976if $ac_cs_silent; then
17977 exec 6>/dev/null
17978 ac_configure_extra_args="$ac_configure_extra_args --silent"
17979fi
c906108c 17980
bec39cab 17981_ACEOF
81ecdfbb 17982cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab 17983if \$ac_cs_recheck; then
81ecdfbb
RW
17984 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
17985 shift
17986 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17987 CONFIG_SHELL='$SHELL'
17988 export CONFIG_SHELL
17989 exec "\$@"
bec39cab
AC
17990fi
17991
17992_ACEOF
81ecdfbb
RW
17993cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17994exec 5>>config.log
17995{
17996 echo
17997 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17998## Running $as_me. ##
17999_ASBOX
18000 $as_echo "$ac_log"
18001} >&5
bec39cab 18002
81ecdfbb
RW
18003_ACEOF
18004cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
c906108c 18005#
81ecdfbb 18006# INIT-COMMANDS
c906108c 18007#
a417dc56 18008ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
b4e70030 18009
bec39cab
AC
18010_ACEOF
18011
81ecdfbb 18012cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
4e8d927d 18013
81ecdfbb 18014# Handling of arguments.
bec39cab 18015for ac_config_target in $ac_config_targets
c906108c 18016do
81ecdfbb
RW
18017 case $ac_config_target in
18018 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
18019 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
f997c383 18020 "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
81ecdfbb 18021 "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;;
b292c783 18022 "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;;
81ecdfbb 18023 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
e2207b9a 18024 "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;;
5ae98d25 18025 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
aa2e2d8d 18026 "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
81ecdfbb
RW
18027
18028 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
c906108c
SS
18029 esac
18030done
18031
81ecdfbb 18032
bec39cab
AC
18033# If the user did not use the arguments to specify the items to instantiate,
18034# then the envvar interface is used. Set only those that are not.
18035# We use the long form for the default assignment because of an extremely
18036# bizarre bug on SunOS 4.1.3.
18037if $ac_need_defaults; then
18038 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18039 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18040 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
18041 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
18042fi
18043
b4e70030 18044# Have a temporary directory for convenience. Make it in the build tree
81ecdfbb 18045# simply because there is no reason against having it here, and in addition,
b4e70030 18046# creating and moving files from /tmp can sometimes cause problems.
81ecdfbb
RW
18047# Hook for its removal unless debugging.
18048# Note that there is a small window in which the directory will not be cleaned:
18049# after its creation but before its name has been assigned to `$tmp'.
b4e70030
JB
18050$debug ||
18051{
81ecdfbb
RW
18052 tmp=
18053 trap 'exit_status=$?
18054 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
18055' 0
18056 trap 'as_fn_exit 1' 1 2 13 15
18057}
18058# Create a (secure) tmp directory for tmp files.
18059
18060{
18061 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
18062 test -n "$tmp" && test -d "$tmp"
18063} ||
18064{
18065 tmp=./conf$$-$RANDOM
18066 (umask 077 && mkdir "$tmp")
18067} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
18068
18069# Set up the scripts for CONFIG_FILES section.
18070# No need to generate them if there are no CONFIG_FILES.
18071# This happens for instance with `./config.status config.h'.
18072if test -n "$CONFIG_FILES"; then
18073
18074if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
18075 ac_cs_awk_getline=:
18076 ac_cs_awk_pipe_init=
18077 ac_cs_awk_read_file='
18078 while ((getline aline < (F[key])) > 0)
18079 print(aline)
18080 close(F[key])'
18081 ac_cs_awk_pipe_fini=
18082else
18083 ac_cs_awk_getline=false
18084 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
18085 ac_cs_awk_read_file='
18086 print "|#_!!_#|"
18087 print "cat " F[key] " &&"
18088 '$ac_cs_awk_pipe_init
18089 # The final `:' finishes the AND list.
18090 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
18091fi
18092ac_cr=`echo X | tr X '\015'`
18093# On cygwin, bash can eat \r inside `` if the user requested igncr.
18094# But we know of no other shell where ac_cr would be empty at this
18095# point, so we can use a bashism as a fallback.
18096if test "x$ac_cr" = x; then
18097 eval ac_cr=\$\'\\r\'
18098fi
18099ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
18100if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
18101 ac_cs_awk_cr='\r'
18102else
18103 ac_cs_awk_cr=$ac_cr
18104fi
18105
18106echo 'BEGIN {' >"$tmp/subs1.awk" &&
18107_ACEOF
18108
18109# Create commands to substitute file output variables.
18110{
18111 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
18112 echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' &&
18113 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
18114 echo "_ACAWK" &&
18115 echo "_ACEOF"
18116} >conf$$files.sh &&
18117. ./conf$$files.sh ||
18118 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
18119rm -f conf$$files.sh
18120
18121{
18122 echo "cat >conf$$subs.awk <<_ACEOF" &&
18123 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
18124 echo "_ACEOF"
18125} >conf$$subs.sh ||
18126 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
18127ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
18128ac_delim='%!_!# '
18129for ac_last_try in false false false false false :; do
18130 . ./conf$$subs.sh ||
18131 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
18132
18133 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
18134 if test $ac_delim_n = $ac_delim_num; then
18135 break
18136 elif $ac_last_try; then
18137 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
18138 else
18139 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18140 fi
18141done
18142rm -f conf$$subs.sh
18143
18144cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18145cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
18146_ACEOF
18147sed -n '
18148h
18149s/^/S["/; s/!.*/"]=/
18150p
18151g
18152s/^[^!]*!//
18153:repl
18154t repl
18155s/'"$ac_delim"'$//
18156t delim
18157:nl
18158h
18159s/\(.\{148\}\).*/\1/
18160t more1
18161s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
18162p
18163n
18164b repl
18165:more1
18166s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18167p
18168g
18169s/.\{148\}//
18170t nl
18171:delim
18172h
18173s/\(.\{148\}\).*/\1/
18174t more2
18175s/["\\]/\\&/g; s/^/"/; s/$/"/
18176p
18177b
18178:more2
18179s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18180p
18181g
18182s/.\{148\}//
18183t delim
18184' <conf$$subs.awk | sed '
18185/^[^""]/{
18186 N
18187 s/\n//
18188}
18189' >>$CONFIG_STATUS || ac_write_fail=1
18190rm -f conf$$subs.awk
18191cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18192_ACAWK
18193cat >>"\$tmp/subs1.awk" <<_ACAWK &&
18194 for (key in S) S_is_set[key] = 1
18195 FS = "\a"
18196 \$ac_cs_awk_pipe_init
18197}
18198{
18199 line = $ 0
18200 nfields = split(line, field, "@")
18201 substed = 0
18202 len = length(field[1])
18203 for (i = 2; i < nfields; i++) {
18204 key = field[i]
18205 keylen = length(key)
18206 if (S_is_set[key]) {
18207 value = S[key]
18208 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
18209 len += length(value) + length(field[++i])
18210 substed = 1
18211 } else
18212 len += 1 + keylen
18213 }
18214 if (nfields == 3 && !substed) {
18215 key = field[2]
18216 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
18217 \$ac_cs_awk_read_file
18218 next
18219 }
18220 }
18221 print line
b4e70030 18222}
81ecdfbb
RW
18223\$ac_cs_awk_pipe_fini
18224_ACAWK
18225_ACEOF
18226cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18227if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
18228 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
18229else
18230 cat
18231fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
18232 || as_fn_error "could not setup config files machinery" "$LINENO" 5
18233_ACEOF
18234
18235# VPATH may cause trouble with some makes, so we remove $(srcdir),
18236# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
18237# trailing colons and then remove the whole line if VPATH becomes empty
18238# (actually we leave an empty line to preserve line numbers).
18239if test "x$srcdir" = x.; then
18240 ac_vpsub='/^[ ]*VPATH[ ]*=/{
18241s/:*\$(srcdir):*/:/
18242s/:*\${srcdir}:*/:/
18243s/:*@srcdir@:*/:/
18244s/^\([^=]*=[ ]*\):*/\1/
18245s/:*$//
18246s/^[^=]*=[ ]*$//
18247}'
18248fi
18249
18250cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18251fi # test -n "$CONFIG_FILES"
18252
18253# Set up the scripts for CONFIG_HEADERS section.
18254# No need to generate them if there are no CONFIG_HEADERS.
18255# This happens for instance with `./config.status Makefile'.
18256if test -n "$CONFIG_HEADERS"; then
18257cat >"$tmp/defines.awk" <<\_ACAWK ||
18258BEGIN {
18259_ACEOF
18260
18261# Transform confdefs.h into an awk script `defines.awk', embedded as
18262# here-document in config.status, that substitutes the proper values into
18263# config.h.in to produce config.h.
4e8d927d 18264
81ecdfbb
RW
18265# Create a delimiter string that does not exist in confdefs.h, to ease
18266# handling of long lines.
18267ac_delim='%!_!# '
18268for ac_last_try in false false :; do
18269 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
18270 if test -z "$ac_t"; then
18271 break
18272 elif $ac_last_try; then
18273 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
18274 else
18275 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18276 fi
18277done
4e8d927d 18278
81ecdfbb
RW
18279# For the awk script, D is an array of macro values keyed by name,
18280# likewise P contains macro parameters if any. Preserve backslash
18281# newline sequences.
18282
18283ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
18284sed -n '
18285s/.\{148\}/&'"$ac_delim"'/g
18286t rset
18287:rset
18288s/^[ ]*#[ ]*define[ ][ ]*/ /
18289t def
18290d
18291:def
18292s/\\$//
18293t bsnl
18294s/["\\]/\\&/g
18295s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18296D["\1"]=" \3"/p
18297s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
18298d
18299:bsnl
18300s/["\\]/\\&/g
18301s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18302D["\1"]=" \3\\\\\\n"\\/p
18303t cont
18304s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
18305t cont
18306d
18307:cont
18308n
18309s/.\{148\}/&'"$ac_delim"'/g
18310t clear
18311:clear
18312s/\\$//
18313t bsnlc
18314s/["\\]/\\&/g; s/^/"/; s/$/"/p
18315d
18316:bsnlc
18317s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
18318b cont
18319' <confdefs.h | sed '
18320s/'"$ac_delim"'/"\\\
18321"/g' >>$CONFIG_STATUS || ac_write_fail=1
18322
18323cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18324 for (key in D) D_is_set[key] = 1
18325 FS = "\a"
18326}
18327/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18328 line = \$ 0
18329 split(line, arg, " ")
18330 if (arg[1] == "#") {
18331 defundef = arg[2]
18332 mac1 = arg[3]
18333 } else {
18334 defundef = substr(arg[1], 2)
18335 mac1 = arg[2]
18336 }
18337 split(mac1, mac2, "(") #)
18338 macro = mac2[1]
18339 prefix = substr(line, 1, index(line, defundef) - 1)
18340 if (D_is_set[macro]) {
18341 # Preserve the white space surrounding the "#".
18342 print prefix "define", macro P[macro] D[macro]
18343 next
18344 } else {
18345 # Replace #undef with comments. This is necessary, for example,
18346 # in the case of _POSIX_SOURCE, which is predefined and required
18347 # on some systems where configure will not decide to define it.
18348 if (defundef == "undef") {
18349 print "/*", prefix defundef, macro, "*/"
18350 next
18351 }
18352 }
b4e70030 18353}
81ecdfbb
RW
18354{ print }
18355_ACAWK
b4e70030 18356_ACEOF
81ecdfbb
RW
18357cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18358 as_fn_error "could not setup config headers machinery" "$LINENO" 5
18359fi # test -n "$CONFIG_HEADERS"
4e8d927d 18360
4e8d927d 18361
81ecdfbb
RW
18362eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
18363shift
18364for ac_tag
18365do
18366 case $ac_tag in
18367 :[FHLC]) ac_mode=$ac_tag; continue;;
18368 esac
18369 case $ac_mode$ac_tag in
18370 :[FHL]*:*);;
18371 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
18372 :[FH]-) ac_tag=-:-;;
18373 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18374 esac
18375 ac_save_IFS=$IFS
18376 IFS=:
18377 set x $ac_tag
18378 IFS=$ac_save_IFS
18379 shift
18380 ac_file=$1
18381 shift
4e8d927d 18382
81ecdfbb
RW
18383 case $ac_mode in
18384 :L) ac_source=$1;;
18385 :[FH])
18386 ac_file_inputs=
18387 for ac_f
18388 do
18389 case $ac_f in
18390 -) ac_f="$tmp/stdin";;
18391 *) # Look for the file first in the build tree, then in the source tree
18392 # (if the path is not absolute). The absolute path cannot be DOS-style,
18393 # because $ac_f cannot contain `:'.
18394 test -f "$ac_f" ||
18395 case $ac_f in
18396 [\\/$]*) false;;
18397 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18398 esac ||
18399 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
18400 esac
18401 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
18402 as_fn_append ac_file_inputs " '$ac_f'"
18403 done
18404
18405 # Let's still pretend it is `configure' which instantiates (i.e., don't
18406 # use $as_me), people would be surprised to read:
18407 # /* config.h. Generated by config.status. */
18408 configure_input='Generated from '`
18409 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
18410 `' by configure.'
18411 if test x"$ac_file" != x-; then
18412 configure_input="$ac_file. $configure_input"
18413 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18414$as_echo "$as_me: creating $ac_file" >&6;}
b4e70030 18415 fi
81ecdfbb
RW
18416 # Neutralize special characters interpreted by sed in replacement strings.
18417 case $configure_input in #(
18418 *\&* | *\|* | *\\* )
18419 ac_sed_conf_input=`$as_echo "$configure_input" |
18420 sed 's/[\\\\&|]/\\\\&/g'`;; #(
18421 *) ac_sed_conf_input=$configure_input;;
18422 esac
4e8d927d 18423
81ecdfbb
RW
18424 case $ac_tag in
18425 *:-:* | *:-) cat >"$tmp/stdin" \
18426 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
18427 esac
18428 ;;
c906108c
SS
18429 esac
18430
81ecdfbb 18431 ac_dir=`$as_dirname -- "$ac_file" ||
bec39cab
AC
18432$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18433 X"$ac_file" : 'X\(//\)[^/]' \| \
18434 X"$ac_file" : 'X\(//\)$' \| \
81ecdfbb
RW
18435 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
18436$as_echo X"$ac_file" |
18437 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18438 s//\1/
18439 q
18440 }
18441 /^X\(\/\/\)[^/].*/{
18442 s//\1/
18443 q
18444 }
18445 /^X\(\/\/\)$/{
18446 s//\1/
18447 q
18448 }
18449 /^X\(\/\).*/{
18450 s//\1/
18451 q
18452 }
18453 s/.*/./; q'`
18454 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
18455 ac_builddir=.
18456
81ecdfbb
RW
18457case "$ac_dir" in
18458.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18459*)
18460 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
18461 # A ".." for each directory in $ac_dir_suffix.
18462 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
18463 case $ac_top_builddir_sub in
18464 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18465 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18466 esac ;;
18467esac
18468ac_abs_top_builddir=$ac_pwd
18469ac_abs_builddir=$ac_pwd$ac_dir_suffix
18470# for backward compatibility:
18471ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
18472
18473case $srcdir in
81ecdfbb 18474 .) # We are building in place.
bec39cab 18475 ac_srcdir=.
81ecdfbb
RW
18476 ac_top_srcdir=$ac_top_builddir_sub
18477 ac_abs_top_srcdir=$ac_pwd ;;
18478 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 18479 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
18480 ac_top_srcdir=$srcdir
18481 ac_abs_top_srcdir=$srcdir ;;
18482 *) # Relative name.
18483 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18484 ac_top_srcdir=$ac_top_build_prefix$srcdir
18485 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 18486esac
81ecdfbb 18487ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 18488
c906108c 18489
81ecdfbb
RW
18490 case $ac_mode in
18491 :F)
18492 #
18493 # CONFIG_FILE
18494 #
c906108c 18495
bec39cab
AC
18496 case $INSTALL in
18497 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
81ecdfbb 18498 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
c906108c 18499 esac
81ecdfbb 18500_ACEOF
121ce6e5 18501
81ecdfbb
RW
18502cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18503# If the template does not know about datarootdir, expand it.
18504# FIXME: This hack should be removed a few years after 2.60.
18505ac_datarootdir_hack=; ac_datarootdir_seen=
18506ac_sed_dataroot='
18507/datarootdir/ {
18508 p
18509 q
18510}
18511/@datadir@/p
18512/@docdir@/p
18513/@infodir@/p
18514/@localedir@/p
18515/@mandir@/p'
18516case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
18517*datarootdir*) ac_datarootdir_seen=yes;;
18518*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
18519 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18520$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
18521_ACEOF
18522cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18523 ac_datarootdir_hack='
18524 s&@datadir@&$datadir&g
18525 s&@docdir@&$docdir&g
18526 s&@infodir@&$infodir&g
18527 s&@localedir@&$localedir&g
18528 s&@mandir@&$mandir&g
18529 s&\\\${datarootdir}&$datarootdir&g' ;;
18530esac
4e8d927d 18531_ACEOF
81ecdfbb
RW
18532
18533# Neutralize VPATH when `$srcdir' = `.'.
18534# Shell code in configure.ac might set extrasub.
18535# FIXME: do we really want to maintain this feature?
18536cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18537ac_sed_extra="$ac_vpsub
bec39cab
AC
18538$extrasub
18539_ACEOF
81ecdfbb 18540cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab
AC
18541:t
18542/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
81ecdfbb
RW
18543s|@configure_input@|$ac_sed_conf_input|;t t
18544s&@top_builddir@&$ac_top_builddir_sub&;t t
18545s&@top_build_prefix@&$ac_top_build_prefix&;t t
18546s&@srcdir@&$ac_srcdir&;t t
18547s&@abs_srcdir@&$ac_abs_srcdir&;t t
18548s&@top_srcdir@&$ac_top_srcdir&;t t
18549s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
18550s&@builddir@&$ac_builddir&;t t
18551s&@abs_builddir@&$ac_abs_builddir&;t t
18552s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
18553s&@INSTALL@&$ac_INSTALL&;t t
81ecdfbb
RW
18554$ac_datarootdir_hack
18555"
18556eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
18557if $ac_cs_awk_getline; then
18558 $AWK -f "$tmp/subs.awk"
18559else
18560 $AWK -f "$tmp/subs.awk" | $SHELL
18561fi >$tmp/out \
18562 || as_fn_error "could not create $ac_file" "$LINENO" 5
18563
18564test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
18565 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
18566 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
18567 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
18568which seems to be undefined. Please make sure it is defined." >&5
18569$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
18570which seems to be undefined. Please make sure it is defined." >&2;}
18571
18572 rm -f "$tmp/stdin"
bec39cab 18573 case $ac_file in
81ecdfbb
RW
18574 -) cat "$tmp/out" && rm -f "$tmp/out";;
18575 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
18576 esac \
18577 || as_fn_error "could not create $ac_file" "$LINENO" 5
18578 ;;
18579 :H)
18580 #
18581 # CONFIG_HEADER
18582 #
bec39cab 18583 if test x"$ac_file" != x-; then
81ecdfbb
RW
18584 {
18585 $as_echo "/* $configure_input */" \
18586 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
18587 } >"$tmp/config.h" \
18588 || as_fn_error "could not create $ac_file" "$LINENO" 5
18589 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
18590 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
18591$as_echo "$as_me: $ac_file is unchanged" >&6;}
bec39cab 18592 else
81ecdfbb
RW
18593 rm -f "$ac_file"
18594 mv "$tmp/config.h" "$ac_file" \
18595 || as_fn_error "could not create $ac_file" "$LINENO" 5
bec39cab
AC
18596 fi
18597 else
81ecdfbb
RW
18598 $as_echo "/* $configure_input */" \
18599 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
18600 || as_fn_error "could not create -" "$LINENO" 5
bec39cab 18601 fi
81ecdfbb
RW
18602 ;;
18603 :L)
18604 #
18605 # CONFIG_LINK
18606 #
c906108c 18607
81ecdfbb
RW
18608 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
18609 :
b4e70030 18610 else
81ecdfbb
RW
18611 # Prefer the file from the source tree if names are identical.
18612 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
18613 ac_source=$srcdir/$ac_source
18614 fi
b4e70030 18615
81ecdfbb
RW
18616 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
18617$as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
b4e70030 18618
81ecdfbb
RW
18619 if test ! -r "$ac_source"; then
18620 as_fn_error "$ac_source: file not found" "$LINENO" 5
18621 fi
18622 rm -f "$ac_file"
bec39cab 18623
81ecdfbb
RW
18624 # Try a relative symlink, then a hard link, then a copy.
18625 case $srcdir in
18626 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
18627 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
18628 esac
18629 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
18630 ln "$ac_source" "$ac_file" 2>/dev/null ||
18631 cp -p "$ac_source" "$ac_file" ||
18632 as_fn_error "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
18633 fi
18634 ;;
18635 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
18636$as_echo "$as_me: executing $ac_file commands" >&6;}
18637 ;;
c906108c 18638 esac
b4e70030 18639
bec39cab 18640
81ecdfbb
RW
18641 case $ac_file$ac_mode in
18642 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
b292c783 18643 "gcore":F) chmod +x gcore ;;
1e94266c
SM
18644 "Makefile":F)
18645case x$CONFIG_HEADERS in
18646xconfig.h:config.in)
18647echo > stamp-h ;;
18648esac
18649 ;;
18650 "gdb-gdb.gdb":F)
18651case x$CONFIG_HEADERS in
18652xconfig.h:config.in)
18653echo > stamp-h ;;
18654esac
18655 ;;
18656 "doc/Makefile":F)
18657case x$CONFIG_HEADERS in
18658xconfig.h:config.in)
18659echo > stamp-h ;;
18660esac
18661 ;;
18662 "data-directory/Makefile":F)
c906108c
SS
18663case x$CONFIG_HEADERS in
18664xconfig.h:config.in)
18665echo > stamp-h ;;
18666esac
bec39cab 18667 ;;
81ecdfbb 18668
bec39cab 18669 esac
81ecdfbb 18670done # for ac_tag
c906108c 18671
bec39cab 18672
81ecdfbb 18673as_fn_exit 0
bec39cab 18674_ACEOF
bec39cab
AC
18675ac_clean_files=$ac_clean_files_save
18676
81ecdfbb
RW
18677test $ac_write_fail = 0 ||
18678 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
18679
bec39cab
AC
18680
18681# configure is writing to config.log, and then calls config.status.
18682# config.status does its own redirection, appending to config.log.
18683# Unfortunately, on DOS this fails, as config.log is still kept open
18684# by configure, so config.status won't be able to write to it; its
18685# output is simply discarded. So we exec the FD to /dev/null,
18686# effectively closing config.log, so it can be properly (re)opened and
18687# appended to by config.status. When coming back to configure, we
18688# need to make the FD available again.
18689if test "$no_create" != yes; then
18690 ac_cs_success=:
18691 ac_config_status_args=
18692 test "$silent" = yes &&
18693 ac_config_status_args="$ac_config_status_args --quiet"
18694 exec 5>/dev/null
18695 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
18696 exec 5>>config.log
18697 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18698 # would make configure fail if this is the last instruction.
81ecdfbb 18699 $ac_cs_success || as_fn_exit $?
bec39cab 18700fi
c906108c 18701
bec39cab 18702#
81ecdfbb 18703# CONFIG_SUBDIRS section.
bec39cab 18704#
c906108c
SS
18705if test "$no_recursion" != yes; then
18706
81ecdfbb
RW
18707 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
18708 # so they do not pile up.
c906108c
SS
18709 ac_sub_configure_args=
18710 ac_prev=
fdc59709
PB
18711 eval "set x $ac_configure_args"
18712 shift
18713 for ac_arg
18714 do
c906108c
SS
18715 if test -n "$ac_prev"; then
18716 ac_prev=
18717 continue
18718 fi
bec39cab 18719 case $ac_arg in
c906108c
SS
18720 -cache-file | --cache-file | --cache-fil | --cache-fi \
18721 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
18722 ac_prev=cache_file ;;
18723 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
bec39cab
AC
18724 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
18725 | --c=*)
18726 ;;
18727 --config-cache | -C)
c906108c
SS
18728 ;;
18729 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
18730 ac_prev=srcdir ;;
18731 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
18732 ;;
bec39cab
AC
18733 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
18734 ac_prev=prefix ;;
18735 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
18736 ;;
81ecdfbb
RW
18737 --disable-option-checking)
18738 ;;
fdc59709
PB
18739 *)
18740 case $ac_arg in
81ecdfbb 18741 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 18742 esac
81ecdfbb 18743 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
c906108c
SS
18744 esac
18745 done
18746
bec39cab
AC
18747 # Always prepend --prefix to ensure using the same prefix
18748 # in subdir configurations.
fdc59709
PB
18749 ac_arg="--prefix=$prefix"
18750 case $ac_arg in
81ecdfbb 18751 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 18752 esac
81ecdfbb
RW
18753 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
18754
18755 # Pass --silent
18756 if test "$silent" = yes; then
18757 ac_sub_configure_args="--silent $ac_sub_configure_args"
18758 fi
18759
18760 # Always prepend --disable-option-checking to silence warnings, since
18761 # different subdirs can have different --enable and --with options.
18762 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
bec39cab 18763
b4e70030 18764 ac_popdir=`pwd`
bec39cab 18765 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
c906108c
SS
18766
18767 # Do not complain, so a configure script can configure whichever
18768 # parts of a large source tree are present.
fdc59709 18769 test -d "$srcdir/$ac_dir" || continue
c906108c 18770
81ecdfbb
RW
18771 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
18772 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
18773 $as_echo "$ac_msg" >&6
18774 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
18775 ac_builddir=.
18776
81ecdfbb
RW
18777case "$ac_dir" in
18778.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18779*)
18780 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
18781 # A ".." for each directory in $ac_dir_suffix.
18782 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
18783 case $ac_top_builddir_sub in
18784 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18785 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18786 esac ;;
18787esac
18788ac_abs_top_builddir=$ac_pwd
18789ac_abs_builddir=$ac_pwd$ac_dir_suffix
18790# for backward compatibility:
18791ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
18792
18793case $srcdir in
81ecdfbb 18794 .) # We are building in place.
bec39cab 18795 ac_srcdir=.
81ecdfbb
RW
18796 ac_top_srcdir=$ac_top_builddir_sub
18797 ac_abs_top_srcdir=$ac_pwd ;;
18798 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 18799 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
18800 ac_top_srcdir=$srcdir
18801 ac_abs_top_srcdir=$srcdir ;;
18802 *) # Relative name.
18803 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18804 ac_top_srcdir=$ac_top_build_prefix$srcdir
18805 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 18806esac
81ecdfbb 18807ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
c906108c 18808
c906108c 18809
fdc59709 18810 cd "$ac_dir"
c906108c
SS
18811
18812 # Check for guested configure; otherwise get Cygnus style configure.
fdc59709
PB
18813 if test -f "$ac_srcdir/configure.gnu"; then
18814 ac_sub_configure=$ac_srcdir/configure.gnu
18815 elif test -f "$ac_srcdir/configure"; then
18816 ac_sub_configure=$ac_srcdir/configure
18817 elif test -f "$ac_srcdir/configure.in"; then
18818 # This should be Cygnus configure.
18819 ac_sub_configure=$ac_aux_dir/configure
c906108c 18820 else
81ecdfbb
RW
18821 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
18822$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
c906108c
SS
18823 ac_sub_configure=
18824 fi
18825
18826 # The recursion is here.
18827 if test -n "$ac_sub_configure"; then
c906108c 18828 # Make the cache file name correct relative to the subdirectory.
bec39cab
AC
18829 case $cache_file in
18830 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
81ecdfbb
RW
18831 *) # Relative name.
18832 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
c906108c 18833 esac
c906108c 18834
81ecdfbb
RW
18835 { $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
18836$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
c906108c 18837 # The eval makes quoting arguments work.
fdc59709
PB
18838 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
18839 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
81ecdfbb 18840 as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
c906108c
SS
18841 fi
18842
fdc59709 18843 cd "$ac_popdir"
c906108c
SS
18844 done
18845fi
81ecdfbb
RW
18846if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
18847 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
18848$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
18849fi
c906108c 18850
This page took 2.882122 seconds and 4 git commands to generate.