Remove obsolete core-regset.c
[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
2400729e
UW
685LTLIBMPFR
686LIBMPFR
687HAVE_LIBMPFR
81ecdfbb
RW
688LTLIBEXPAT
689LIBEXPAT
690HAVE_LIBEXPAT
b8e0a31c 691JIT_READER_DIR
f997c383 692TARGET_PTR
39037522 693READLINE_TEXI_INCFLAG
81ecdfbb
RW
694READLINE_CFLAGS
695READLINE_DEPS
696READLINE
016a3251
DD
697LTLIBICONV
698LIBICONV
711a72d3
L
699zlibinc
700zlibdir
81ecdfbb
RW
701MIG
702WINDRES
703DLLTOOL
c971b7fa 704AR
81ecdfbb
RW
705YFLAGS
706YACC
c971b7fa 707RANLIB
81ecdfbb 708LN_S
c971b7fa
PA
709INSTALL_DATA
710INSTALL_SCRIPT
711INSTALL_PROGRAM
712AWK
81ecdfbb
RW
713REPORT_BUGS_TEXI
714REPORT_BUGS_TO
715PKGVERSION
b292c783 716HAVE_NATIVE_GCORE_TARGET
81ecdfbb
RW
717TARGET_OBS
718subdirs
719GDB_DATADIR
720DEBUGDIR
5048e516
JK
721MAKEINFO_EXTRA_FLAGS
722MAKEINFOFLAGS
723MAKEINFO
81ecdfbb
RW
724PACKAGE
725GNULIB_STDINT_H
81ecdfbb
RW
726CATOBJEXT
727GENCAT
728INSTOBJEXT
729DATADIRNAME
730CATALOGS
731POSUB
732GMSGFMT
733XGETTEXT
734INCINTL
735LIBINTL_DEP
736LIBINTL
737USE_NLS
81ecdfbb 738CCDEPMODE
f38307f5 739CONFIG_SRC_SUBDIR
81ecdfbb
RW
740DEPDIR
741am__leading_dot
0bcda685
PA
742CXX_DIALECT
743HAVE_CXX11
4869db5e
RM
744INSTALL_STRIP_PROGRAM
745STRIP
746install_sh
81ecdfbb
RW
747target_os
748target_vendor
749target_cpu
750target
751host_os
752host_vendor
753host_cpu
754host
755build_os
756build_vendor
757build_cpu
758build
c971b7fa
PA
759EGREP
760GREP
761CPP
3bc3d82a
PA
762ac_ct_CXX
763CXXFLAGS
764CXX
81ecdfbb
RW
765OBJEXT
766EXEEXT
767ac_ct_CC
768CPPFLAGS
769LDFLAGS
770CFLAGS
771CC
772MAINT
773MAINTAINER_MODE_FALSE
774MAINTAINER_MODE_TRUE
775target_alias
776host_alias
777build_alias
778LIBS
779ECHO_T
780ECHO_N
781ECHO_C
782DEFS
783mandir
784localedir
785libdir
786psdir
787pdfdir
788dvidir
789htmldir
790infodir
791docdir
792oldincludedir
793includedir
794localstatedir
795sharedstatedir
796sysconfdir
797datadir
798datarootdir
799libexecdir
800sbindir
801bindir
802program_transform_name
803prefix
804exec_prefix
805PACKAGE_URL
806PACKAGE_BUGREPORT
807PACKAGE_STRING
808PACKAGE_VERSION
809PACKAGE_TARNAME
810PACKAGE_NAME
811PATH_SEPARATOR
812SHELL'
2b351b19 813ac_subst_files='nat_makefile_frag'
81ecdfbb
RW
814ac_user_opts='
815enable_option_checking
816enable_maintainer_mode
da2f07f1
JK
817enable_plugins
818enable_largefile
81ecdfbb
RW
819with_separate_debug_dir
820with_gdb_datadir
821with_relocated_sources
7349ff92 822with_auto_load_dir
bccbefd2 823with_auto_load_safe_path
81ecdfbb
RW
824enable_targets
825enable_64_bit_bfd
826enable_gdbcli
827enable_gdbmi
828enable_tui
829enable_gdbtk
05e7c244 830with_libunwind_ia64
81ecdfbb
RW
831with_curses
832enable_profiling
833with_pkgversion
834with_bugurl
711a72d3 835with_system_zlib
016a3251
DD
836with_gnu_ld
837enable_rpath
81ecdfbb 838with_libiconv_prefix
478aac75 839with_iconv_bin
81ecdfbb 840with_system_readline
b8e0a31c 841with_jit_reader_dir
81ecdfbb 842with_expat
81ecdfbb 843with_libexpat_prefix
2400729e
UW
844with_mpfr
845with_libmpfr_prefix
81ecdfbb 846with_python
ed3ef339 847with_guile
a8db4212 848enable_libmcheck
58bfce93
MM
849with_intel_pt
850with_libipt_prefix
81ecdfbb
RW
851with_included_regex
852with_sysroot
853with_system_gdbinit
854enable_werror
855enable_build_warnings
856enable_gdb_build_warnings
608e2dbb
TT
857with_lzma
858with_liblzma_prefix
81ecdfbb
RW
859with_tcl
860with_tk
861with_x
862enable_sim
863enable_multi_ice
496c0e1b 864enable_gdbserver
393fd4c3
YQ
865with_babeltrace
866with_libbabeltrace_prefix
81ecdfbb
RW
867'
868 ac_precious_vars='build_alias
869host_alias
870target_alias
871CC
872CFLAGS
873LDFLAGS
874LIBS
875CPPFLAGS
3bc3d82a
PA
876CXX
877CXXFLAGS
878CCC
81ecdfbb 879CPP
f06e05e0
JK
880MAKEINFO
881MAKEINFOFLAGS
81ecdfbb
RW
882YACC
883YFLAGS
884XMKMF'
5ae98d25 885ac_subdirs_all='testsuite
81ecdfbb
RW
886gdbtk
887multi-ice
888gdbserver'
c906108c
SS
889
890# Initialize some variables set by options.
bec39cab
AC
891ac_init_help=
892ac_init_version=false
81ecdfbb
RW
893ac_unrecognized_opts=
894ac_unrecognized_sep=
c906108c
SS
895# The variables have the same names as the options, with
896# dashes changed to underlines.
bec39cab 897cache_file=/dev/null
c906108c 898exec_prefix=NONE
c906108c 899no_create=
c906108c
SS
900no_recursion=
901prefix=NONE
902program_prefix=NONE
903program_suffix=NONE
904program_transform_name=s,x,x,
905silent=
906site=
907srcdir=
c906108c
SS
908verbose=
909x_includes=NONE
910x_libraries=NONE
bec39cab
AC
911
912# Installation directory options.
913# These are left unexpanded so users can "make install exec_prefix=/foo"
914# and all the variables that are supposed to be based on exec_prefix
915# by default will actually change.
916# Use braces instead of parens because sh, perl, etc. also accept them.
81ecdfbb 917# (The list follows the same order as the GNU Coding Standards.)
c906108c
SS
918bindir='${exec_prefix}/bin'
919sbindir='${exec_prefix}/sbin'
920libexecdir='${exec_prefix}/libexec'
81ecdfbb
RW
921datarootdir='${prefix}/share'
922datadir='${datarootdir}'
c906108c
SS
923sysconfdir='${prefix}/etc'
924sharedstatedir='${prefix}/com'
925localstatedir='${prefix}/var'
c906108c
SS
926includedir='${prefix}/include'
927oldincludedir='/usr/include'
81ecdfbb
RW
928docdir='${datarootdir}/doc/${PACKAGE}'
929infodir='${datarootdir}/info'
930htmldir='${docdir}'
931dvidir='${docdir}'
932pdfdir='${docdir}'
933psdir='${docdir}'
934libdir='${exec_prefix}/lib'
935localedir='${datarootdir}/locale'
936mandir='${datarootdir}/man'
c906108c 937
c906108c 938ac_prev=
81ecdfbb 939ac_dashdash=
c906108c
SS
940for ac_option
941do
c906108c
SS
942 # If the previous option needs an argument, assign it.
943 if test -n "$ac_prev"; then
81ecdfbb 944 eval $ac_prev=\$ac_option
c906108c
SS
945 ac_prev=
946 continue
947 fi
948
81ecdfbb
RW
949 case $ac_option in
950 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
951 *) ac_optarg=yes ;;
952 esac
c906108c
SS
953
954 # Accept the important Cygnus configure options, so we can diagnose typos.
955
81ecdfbb
RW
956 case $ac_dashdash$ac_option in
957 --)
958 ac_dashdash=yes ;;
c906108c
SS
959
960 -bindir | --bindir | --bindi | --bind | --bin | --bi)
961 ac_prev=bindir ;;
962 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
bec39cab 963 bindir=$ac_optarg ;;
c906108c
SS
964
965 -build | --build | --buil | --bui | --bu)
bec39cab 966 ac_prev=build_alias ;;
c906108c 967 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
bec39cab 968 build_alias=$ac_optarg ;;
c906108c
SS
969
970 -cache-file | --cache-file | --cache-fil | --cache-fi \
971 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
972 ac_prev=cache_file ;;
973 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
974 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
bec39cab
AC
975 cache_file=$ac_optarg ;;
976
977 --config-cache | -C)
978 cache_file=config.cache ;;
c906108c 979
81ecdfbb 980 -datadir | --datadir | --datadi | --datad)
c906108c 981 ac_prev=datadir ;;
81ecdfbb 982 -datadir=* | --datadir=* | --datadi=* | --datad=*)
bec39cab 983 datadir=$ac_optarg ;;
c906108c 984
81ecdfbb
RW
985 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
986 | --dataroo | --dataro | --datar)
987 ac_prev=datarootdir ;;
988 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
989 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
990 datarootdir=$ac_optarg ;;
991
c906108c 992 -disable-* | --disable-*)
81ecdfbb 993 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
c906108c 994 # Reject names that are not valid shell variable names.
81ecdfbb
RW
995 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
996 as_fn_error "invalid feature name: $ac_useropt"
997 ac_useropt_orig=$ac_useropt
998 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
999 case $ac_user_opts in
1000 *"
1001"enable_$ac_useropt"
1002"*) ;;
1003 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1004 ac_unrecognized_sep=', ';;
1005 esac
1006 eval enable_$ac_useropt=no ;;
1007
1008 -docdir | --docdir | --docdi | --doc | --do)
1009 ac_prev=docdir ;;
1010 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1011 docdir=$ac_optarg ;;
1012
1013 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1014 ac_prev=dvidir ;;
1015 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1016 dvidir=$ac_optarg ;;
c906108c
SS
1017
1018 -enable-* | --enable-*)
81ecdfbb 1019 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
c906108c 1020 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1021 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1022 as_fn_error "invalid feature name: $ac_useropt"
1023 ac_useropt_orig=$ac_useropt
1024 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1025 case $ac_user_opts in
1026 *"
1027"enable_$ac_useropt"
1028"*) ;;
1029 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1030 ac_unrecognized_sep=', ';;
b4e70030 1031 esac
81ecdfbb 1032 eval enable_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1033
1034 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1035 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1036 | --exec | --exe | --ex)
1037 ac_prev=exec_prefix ;;
1038 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1039 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1040 | --exec=* | --exe=* | --ex=*)
bec39cab 1041 exec_prefix=$ac_optarg ;;
c906108c
SS
1042
1043 -gas | --gas | --ga | --g)
1044 # Obsolete; use --with-gas.
1045 with_gas=yes ;;
1046
bec39cab
AC
1047 -help | --help | --hel | --he | -h)
1048 ac_init_help=long ;;
1049 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1050 ac_init_help=recursive ;;
1051 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1052 ac_init_help=short ;;
c906108c
SS
1053
1054 -host | --host | --hos | --ho)
bec39cab 1055 ac_prev=host_alias ;;
c906108c 1056 -host=* | --host=* | --hos=* | --ho=*)
bec39cab 1057 host_alias=$ac_optarg ;;
c906108c 1058
81ecdfbb
RW
1059 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1060 ac_prev=htmldir ;;
1061 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1062 | --ht=*)
1063 htmldir=$ac_optarg ;;
1064
c906108c
SS
1065 -includedir | --includedir | --includedi | --included | --include \
1066 | --includ | --inclu | --incl | --inc)
1067 ac_prev=includedir ;;
1068 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1069 | --includ=* | --inclu=* | --incl=* | --inc=*)
bec39cab 1070 includedir=$ac_optarg ;;
c906108c
SS
1071
1072 -infodir | --infodir | --infodi | --infod | --info | --inf)
1073 ac_prev=infodir ;;
1074 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
bec39cab 1075 infodir=$ac_optarg ;;
c906108c
SS
1076
1077 -libdir | --libdir | --libdi | --libd)
1078 ac_prev=libdir ;;
1079 -libdir=* | --libdir=* | --libdi=* | --libd=*)
bec39cab 1080 libdir=$ac_optarg ;;
c906108c
SS
1081
1082 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1083 | --libexe | --libex | --libe)
1084 ac_prev=libexecdir ;;
1085 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1086 | --libexe=* | --libex=* | --libe=*)
bec39cab 1087 libexecdir=$ac_optarg ;;
c906108c 1088
81ecdfbb
RW
1089 -localedir | --localedir | --localedi | --localed | --locale)
1090 ac_prev=localedir ;;
1091 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1092 localedir=$ac_optarg ;;
1093
c906108c 1094 -localstatedir | --localstatedir | --localstatedi | --localstated \
81ecdfbb 1095 | --localstate | --localstat | --localsta | --localst | --locals)
c906108c
SS
1096 ac_prev=localstatedir ;;
1097 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
81ecdfbb 1098 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
bec39cab 1099 localstatedir=$ac_optarg ;;
c906108c
SS
1100
1101 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1102 ac_prev=mandir ;;
1103 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
bec39cab 1104 mandir=$ac_optarg ;;
c906108c
SS
1105
1106 -nfp | --nfp | --nf)
1107 # Obsolete; use --without-fp.
1108 with_fp=no ;;
1109
1110 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
bec39cab 1111 | --no-cr | --no-c | -n)
c906108c
SS
1112 no_create=yes ;;
1113
1114 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1115 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1116 no_recursion=yes ;;
1117
1118 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1119 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1120 | --oldin | --oldi | --old | --ol | --o)
1121 ac_prev=oldincludedir ;;
1122 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1123 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1124 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
bec39cab 1125 oldincludedir=$ac_optarg ;;
c906108c
SS
1126
1127 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1128 ac_prev=prefix ;;
1129 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
bec39cab 1130 prefix=$ac_optarg ;;
c906108c
SS
1131
1132 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1133 | --program-pre | --program-pr | --program-p)
1134 ac_prev=program_prefix ;;
1135 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1136 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
bec39cab 1137 program_prefix=$ac_optarg ;;
c906108c
SS
1138
1139 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1140 | --program-suf | --program-su | --program-s)
1141 ac_prev=program_suffix ;;
1142 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1143 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
bec39cab 1144 program_suffix=$ac_optarg ;;
c906108c
SS
1145
1146 -program-transform-name | --program-transform-name \
1147 | --program-transform-nam | --program-transform-na \
1148 | --program-transform-n | --program-transform- \
1149 | --program-transform | --program-transfor \
1150 | --program-transfo | --program-transf \
1151 | --program-trans | --program-tran \
1152 | --progr-tra | --program-tr | --program-t)
1153 ac_prev=program_transform_name ;;
1154 -program-transform-name=* | --program-transform-name=* \
1155 | --program-transform-nam=* | --program-transform-na=* \
1156 | --program-transform-n=* | --program-transform-=* \
1157 | --program-transform=* | --program-transfor=* \
1158 | --program-transfo=* | --program-transf=* \
1159 | --program-trans=* | --program-tran=* \
1160 | --progr-tra=* | --program-tr=* | --program-t=*)
bec39cab 1161 program_transform_name=$ac_optarg ;;
c906108c 1162
81ecdfbb
RW
1163 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1164 ac_prev=pdfdir ;;
1165 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1166 pdfdir=$ac_optarg ;;
1167
1168 -psdir | --psdir | --psdi | --psd | --ps)
1169 ac_prev=psdir ;;
1170 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1171 psdir=$ac_optarg ;;
1172
c906108c
SS
1173 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1174 | -silent | --silent | --silen | --sile | --sil)
1175 silent=yes ;;
1176
1177 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1178 ac_prev=sbindir ;;
1179 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1180 | --sbi=* | --sb=*)
bec39cab 1181 sbindir=$ac_optarg ;;
c906108c
SS
1182
1183 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1184 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1185 | --sharedst | --shareds | --shared | --share | --shar \
1186 | --sha | --sh)
1187 ac_prev=sharedstatedir ;;
1188 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1189 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1190 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1191 | --sha=* | --sh=*)
bec39cab 1192 sharedstatedir=$ac_optarg ;;
c906108c
SS
1193
1194 -site | --site | --sit)
1195 ac_prev=site ;;
1196 -site=* | --site=* | --sit=*)
bec39cab 1197 site=$ac_optarg ;;
3ace7edb 1198
c906108c
SS
1199 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1200 ac_prev=srcdir ;;
1201 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
bec39cab 1202 srcdir=$ac_optarg ;;
c906108c
SS
1203
1204 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1205 | --syscon | --sysco | --sysc | --sys | --sy)
1206 ac_prev=sysconfdir ;;
1207 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1208 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
bec39cab 1209 sysconfdir=$ac_optarg ;;
c906108c
SS
1210
1211 -target | --target | --targe | --targ | --tar | --ta | --t)
bec39cab 1212 ac_prev=target_alias ;;
c906108c 1213 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
bec39cab 1214 target_alias=$ac_optarg ;;
c906108c
SS
1215
1216 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1217 verbose=yes ;;
1218
bec39cab
AC
1219 -version | --version | --versio | --versi | --vers | -V)
1220 ac_init_version=: ;;
c906108c
SS
1221
1222 -with-* | --with-*)
81ecdfbb 1223 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
c906108c 1224 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1225 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1226 as_fn_error "invalid package name: $ac_useropt"
1227 ac_useropt_orig=$ac_useropt
1228 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1229 case $ac_user_opts in
1230 *"
1231"with_$ac_useropt"
1232"*) ;;
1233 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1234 ac_unrecognized_sep=', ';;
b4e70030 1235 esac
81ecdfbb 1236 eval with_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1237
1238 -without-* | --without-*)
81ecdfbb 1239 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
c906108c 1240 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1241 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1242 as_fn_error "invalid package name: $ac_useropt"
1243 ac_useropt_orig=$ac_useropt
1244 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1245 case $ac_user_opts in
1246 *"
1247"with_$ac_useropt"
1248"*) ;;
1249 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1250 ac_unrecognized_sep=', ';;
1251 esac
1252 eval with_$ac_useropt=no ;;
c906108c
SS
1253
1254 --x)
1255 # Obsolete; use --with-x.
1256 with_x=yes ;;
1257
1258 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1259 | --x-incl | --x-inc | --x-in | --x-i)
1260 ac_prev=x_includes ;;
1261 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1262 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
bec39cab 1263 x_includes=$ac_optarg ;;
c906108c
SS
1264
1265 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1266 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1267 ac_prev=x_libraries ;;
1268 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1269 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
bec39cab 1270 x_libraries=$ac_optarg ;;
c906108c 1271
81ecdfbb
RW
1272 -*) as_fn_error "unrecognized option: \`$ac_option'
1273Try \`$0 --help' for more information."
c906108c
SS
1274 ;;
1275
bec39cab
AC
1276 *=*)
1277 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1278 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1279 case $ac_envvar in #(
1280 '' | [0-9]* | *[!_$as_cr_alnum]* )
1281 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1282 esac
1283 eval $ac_envvar=\$ac_optarg
bec39cab
AC
1284 export $ac_envvar ;;
1285
c906108c 1286 *)
bec39cab 1287 # FIXME: should be removed in autoconf 3.0.
81ecdfbb 1288 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
bec39cab 1289 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
81ecdfbb 1290 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
bec39cab 1291 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
c906108c
SS
1292 ;;
1293
1294 esac
1295done
1296
1297if test -n "$ac_prev"; then
bec39cab 1298 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
81ecdfbb 1299 as_fn_error "missing argument to $ac_option"
c906108c 1300fi
c906108c 1301
81ecdfbb
RW
1302if test -n "$ac_unrecognized_opts"; then
1303 case $enable_option_checking in
1304 no) ;;
1305 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
1306 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
b4e70030 1307 esac
81ecdfbb 1308fi
b4e70030 1309
81ecdfbb
RW
1310# Check all directory arguments for consistency.
1311for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1312 datadir sysconfdir sharedstatedir localstatedir includedir \
1313 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1314 libdir localedir mandir
b4e70030 1315do
81ecdfbb
RW
1316 eval ac_val=\$$ac_var
1317 # Remove trailing slashes.
1318 case $ac_val in
1319 */ )
1320 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1321 eval $ac_var=\$ac_val;;
1322 esac
1323 # Be sure to have absolute directory names.
b4e70030 1324 case $ac_val in
81ecdfbb
RW
1325 [\\/$]* | ?:[\\/]* ) continue;;
1326 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
c906108c 1327 esac
81ecdfbb 1328 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
c906108c
SS
1329done
1330
bec39cab
AC
1331# There might be people who depend on the old broken behavior: `$host'
1332# used to hold the argument of --host etc.
1333# FIXME: To remove some day.
1334build=$build_alias
1335host=$host_alias
1336target=$target_alias
1337
1338# FIXME: To remove some day.
1339if test "x$host_alias" != x; then
1340 if test "x$build_alias" = x; then
1341 cross_compiling=maybe
81ecdfbb 1342 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
bec39cab
AC
1343 If a cross compiler is detected then cross compile mode will be used." >&2
1344 elif test "x$build_alias" != "x$host_alias"; then
1345 cross_compiling=yes
1346 fi
1347fi
c906108c 1348
bec39cab
AC
1349ac_tool_prefix=
1350test -n "$host_alias" && ac_tool_prefix=$host_alias-
1351
1352test "$silent" = yes && exec 6>/dev/null
c906108c 1353
c906108c 1354
81ecdfbb
RW
1355ac_pwd=`pwd` && test -n "$ac_pwd" &&
1356ac_ls_di=`ls -di .` &&
1357ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1358 as_fn_error "working directory cannot be determined"
1359test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1360 as_fn_error "pwd does not report name of working directory"
1361
1362
c906108c
SS
1363# Find the source files, if location was not specified.
1364if test -z "$srcdir"; then
1365 ac_srcdir_defaulted=yes
81ecdfbb
RW
1366 # Try the directory containing this script, then the parent directory.
1367 ac_confdir=`$as_dirname -- "$as_myself" ||
1368$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1369 X"$as_myself" : 'X\(//\)[^/]' \| \
1370 X"$as_myself" : 'X\(//\)$' \| \
1371 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1372$as_echo X"$as_myself" |
1373 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1374 s//\1/
1375 q
1376 }
1377 /^X\(\/\/\)[^/].*/{
1378 s//\1/
1379 q
1380 }
1381 /^X\(\/\/\)$/{
1382 s//\1/
1383 q
1384 }
1385 /^X\(\/\).*/{
1386 s//\1/
1387 q
1388 }
1389 s/.*/./; q'`
c906108c 1390 srcdir=$ac_confdir
81ecdfbb 1391 if test ! -r "$srcdir/$ac_unique_file"; then
c906108c
SS
1392 srcdir=..
1393 fi
1394else
1395 ac_srcdir_defaulted=no
1396fi
81ecdfbb
RW
1397if test ! -r "$srcdir/$ac_unique_file"; then
1398 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1399 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
1400fi
1401ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1402ac_abs_confdir=`(
1403 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
1404 pwd)`
1405# When building in place, set srcdir=.
1406if test "$ac_abs_confdir" = "$ac_pwd"; then
1407 srcdir=.
1408fi
1409# Remove unnecessary trailing slashes from srcdir.
1410# Double slashes in file names in object file debugging info
1411# mess up M-x gdb in Emacs.
1412case $srcdir in
1413*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1414esac
1415for ac_var in $ac_precious_vars; do
1416 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1417 eval ac_env_${ac_var}_value=\$${ac_var}
1418 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1419 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1420done
c906108c 1421
bec39cab
AC
1422#
1423# Report the --help message.
1424#
1425if test "$ac_init_help" = "long"; then
1426 # Omit some internal or obsolete options to make the list less imposing.
1427 # This message is too long to be a string in the A/UX 3.1 sh.
1428 cat <<_ACEOF
1429\`configure' configures this package to adapt to many kinds of systems.
1430
1431Usage: $0 [OPTION]... [VAR=VALUE]...
1432
1433To assign environment variables (e.g., CC, CFLAGS...), specify them as
1434VAR=VALUE. See below for descriptions of some of the useful variables.
1435
1436Defaults for the options are specified in brackets.
1437
1438Configuration:
1439 -h, --help display this help and exit
1440 --help=short display options specific to this package
1441 --help=recursive display the short help of all the included packages
1442 -V, --version display version information and exit
1443 -q, --quiet, --silent do not print \`checking...' messages
1444 --cache-file=FILE cache test results in FILE [disabled]
1445 -C, --config-cache alias for \`--cache-file=config.cache'
1446 -n, --no-create do not create output files
1447 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1448
bec39cab
AC
1449Installation directories:
1450 --prefix=PREFIX install architecture-independent files in PREFIX
81ecdfbb 1451 [$ac_default_prefix]
bec39cab 1452 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
81ecdfbb 1453 [PREFIX]
bec39cab
AC
1454
1455By default, \`make install' will install all the files in
1456\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1457an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1458for instance \`--prefix=\$HOME'.
1459
1460For better control, use the options below.
1461
1462Fine tuning of the installation directories:
81ecdfbb
RW
1463 --bindir=DIR user executables [EPREFIX/bin]
1464 --sbindir=DIR system admin executables [EPREFIX/sbin]
1465 --libexecdir=DIR program executables [EPREFIX/libexec]
1466 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1467 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1468 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1469 --libdir=DIR object code libraries [EPREFIX/lib]
1470 --includedir=DIR C header files [PREFIX/include]
1471 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1472 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1473 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1474 --infodir=DIR info documentation [DATAROOTDIR/info]
1475 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1476 --mandir=DIR man documentation [DATAROOTDIR/man]
1477 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1478 --htmldir=DIR html documentation [DOCDIR]
1479 --dvidir=DIR dvi documentation [DOCDIR]
1480 --pdfdir=DIR pdf documentation [DOCDIR]
1481 --psdir=DIR ps documentation [DOCDIR]
bec39cab
AC
1482_ACEOF
1483
1484 cat <<\_ACEOF
1485
9009e1ae
MR
1486Program names:
1487 --program-prefix=PREFIX prepend PREFIX to installed program names
1488 --program-suffix=SUFFIX append SUFFIX to installed program names
1489 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1490
bec39cab
AC
1491X features:
1492 --x-includes=DIR X include files are in DIR
1493 --x-libraries=DIR X library files are in DIR
1494
1495System types:
1496 --build=BUILD configure for building on BUILD [guessed]
1497 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1498 --target=TARGET configure for building compilers for TARGET [HOST]
1499_ACEOF
1500fi
1501
1502if test -n "$ac_init_help"; then
1503
1504 cat <<\_ACEOF
1505
1506Optional Features:
81ecdfbb 1507 --disable-option-checking ignore unrecognized --enable/--with options
bec39cab
AC
1508 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1509 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
85981d60
AC
1510 --enable-maintainer-mode enable make rules and dependencies not useful
1511 (and sometimes confusing) to the casual installer
2974be62 1512 --enable-plugins Enable support for plugins
da2f07f1 1513 --disable-largefile omit support for large files
a1220294
TT
1514 --enable-targets=TARGETS
1515 alternative target configurations
c0993dbe 1516 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
bec39cab
AC
1517 --disable-gdbcli disable command-line interface (CLI)
1518 --disable-gdbmi disable machine-interface (MI)
1519 --enable-tui enable full-screen terminal user interface (TUI)
1520 --enable-gdbtk enable gdbtk graphical user interface (GUI)
1521 --enable-profiling enable profiling of GDB
3841debe 1522 --disable-rpath do not hardcode runtime library paths
17ef446e 1523 --enable-libmcheck Try linking with -lmcheck if available
a1220294 1524 --enable-werror treat compile warnings as errors
32c1c914 1525 --enable-build-warnings enable build-time compiler warnings if gcc is used
a1220294 1526 --enable-gdb-build-warnings
32c1c914 1527 enable GDB specific build-time compiler warnings if
a1220294 1528 gcc is used
32c1c914 1529 --enable-sim link gdb with simulator
bec39cab 1530 --enable-multi-ice build the multi-ice-gdb-server
496c0e1b
JB
1531 --enable-gdbserver automatically build gdbserver (yes/no/auto, default
1532 is auto)
bec39cab
AC
1533
1534Optional Packages:
1535 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1536 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
a1220294 1537 --with-separate-debug-dir=PATH
32c1c914 1538 look for global separate debug info in this path
62e4f60c 1539 [LIBDIR/debug]
b14b1491
TT
1540 --with-gdb-datadir=PATH look for global separate data files in this path
1541 [DATADIR/gdb]
29b0e8a2 1542 --with-relocated-sources=PATH
32c1c914 1543 automatically relocate this path for source files
7349ff92 1544 --with-auto-load-dir=PATH
aff139ff 1545 directories from which to load auto-loaded scripts
1564a261 1546 [$debugdir:$datadir/auto-load]
bccbefd2 1547 --with-auto-load-safe-path=PATH
aff139ff 1548 directories safe to hold auto-loaded files
7349ff92 1549 [--with-auto-load-dir]
bccbefd2
JK
1550 --without-auto-load-safe-path
1551 do not restrict auto-loaded files locations
05e7c244 1552 --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets
cb01cfba
JB
1553 --with-curses use the curses library instead of the termcap
1554 library
c16158bc
JM
1555 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
1556 --with-bugurl=URL Direct users to URL to report a bug
711a72d3 1557 --with-system-zlib use installed libz
016a3251
DD
1558 --with-gnu-ld assume the C compiler uses GNU ld default=no
1559 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
1560 --without-libiconv-prefix don't search for libiconv in includedir and libdir
478aac75 1561 --with-iconv-bin=PATH specify where to find the iconv program
6a30b0a5 1562 --with-system-readline use installed readline library
b8e0a31c
SD
1563 --with-jit-reader-dir=PATH
1564 directory to load the JIT readers from
5c39566f 1565 --with-expat include expat support (auto/yes/no)
3841debe
DJ
1566 --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib
1567 --without-libexpat-prefix don't search for libexpat in includedir and libdir
2400729e
UW
1568 --with-mpfr include MPFR support (auto/yes/no)
1569 --with-libmpfr-prefix[=DIR] search for libmpfr in DIR/include and DIR/lib
1570 --without-libmpfr-prefix don't search for libmpfr in includedir and libdir
0c4a4063
DE
1571 --with-python[=PYTHON] include python support
1572 (auto/yes/no/<python-program>)
ed3ef339
DE
1573 --with-guile[=GUILE] include guile support
1574 (auto/yes/no/<guile-version>/<pkg-config-program>)
bc504a31 1575 --with-intel-pt include Intel Processor Trace support (auto/yes/no)
58bfce93
MM
1576 --with-libipt-prefix[=DIR] search for libipt in DIR/include and DIR/lib
1577 --without-libipt-prefix don't search for libipt in includedir and libdir
a1220294
TT
1578 --without-included-regex
1579 don't use included regex; this is the default on
1580 systems with version 2 of the GNU C library (use
1581 with caution on other system)
81ecdfbb 1582 --with-sysroot[=DIR] search for usr/lib et al within DIR
b14b1491 1583 --with-system-gdbinit=PATH
32c1c914 1584 automatically load a system-wide gdbinit file
608e2dbb
TT
1585 --with-lzma support lzma compression (auto/yes/no)
1586 --with-liblzma-prefix[=DIR] search for liblzma in DIR/include and DIR/lib
1587 --without-liblzma-prefix don't search for liblzma in includedir and libdir
5062cc19
KS
1588 --with-tcl directory containing tcl configuration (tclConfig.sh)
1589 --with-tk directory containing tk configuration (tkConfig.sh)
bec39cab 1590 --with-x use the X Window System
393fd4c3
YQ
1591 --with-babeltrace include babeltrace support (auto/yes/no)
1592 --with-libbabeltrace-prefix[=DIR] search for libbabeltrace in DIR/include and DIR/lib
1593 --without-libbabeltrace-prefix don't search for libbabeltrace in includedir and libdir
bec39cab
AC
1594
1595Some influential environment variables:
1596 CC C compiler command
1597 CFLAGS C compiler flags
1598 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1599 nonstandard directory <lib dir>
81ecdfbb
RW
1600 LIBS libraries to pass to the linker, e.g. -l<library>
1601 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1602 you have headers in a nonstandard directory <include dir>
3bc3d82a
PA
1603 CXX C++ compiler command
1604 CXXFLAGS C++ compiler flags
bec39cab 1605 CPP C preprocessor
f06e05e0
JK
1606 MAKEINFO Parent configure detects if it is of sufficient version.
1607 MAKEINFOFLAGS
1608 Parameters for MAKEINFO.
81ecdfbb
RW
1609 YACC The `Yet Another C Compiler' implementation to use. Defaults to
1610 the first program found out of: `bison -y', `byacc', `yacc'.
1611 YFLAGS The list of arguments that will be passed by default to $YACC.
1612 This script will default YFLAGS to the empty string to avoid a
1613 default value of `-d' given by some make applications.
1614 XMKMF Path to xmkmf, Makefile generator for X Window System
bec39cab
AC
1615
1616Use these variables to override the choices made by `configure' or to help
1617it to find libraries and programs with nonstandard names/locations.
1618
81ecdfbb 1619Report bugs to the package provider.
bec39cab 1620_ACEOF
81ecdfbb 1621ac_status=$?
bec39cab
AC
1622fi
1623
1624if test "$ac_init_help" = "recursive"; then
1625 # If there are subdirs, report their specific --help.
bec39cab 1626 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
81ecdfbb
RW
1627 test -d "$ac_dir" ||
1628 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1629 continue
bec39cab
AC
1630 ac_builddir=.
1631
81ecdfbb
RW
1632case "$ac_dir" in
1633.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1634*)
1635 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1636 # A ".." for each directory in $ac_dir_suffix.
1637 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1638 case $ac_top_builddir_sub in
1639 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1640 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1641 esac ;;
1642esac
1643ac_abs_top_builddir=$ac_pwd
1644ac_abs_builddir=$ac_pwd$ac_dir_suffix
1645# for backward compatibility:
1646ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
1647
1648case $srcdir in
81ecdfbb 1649 .) # We are building in place.
bec39cab 1650 ac_srcdir=.
81ecdfbb
RW
1651 ac_top_srcdir=$ac_top_builddir_sub
1652 ac_abs_top_srcdir=$ac_pwd ;;
1653 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 1654 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
1655 ac_top_srcdir=$srcdir
1656 ac_abs_top_srcdir=$srcdir ;;
1657 *) # Relative name.
1658 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1659 ac_top_srcdir=$ac_top_build_prefix$srcdir
1660 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 1661esac
81ecdfbb 1662ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 1663
81ecdfbb
RW
1664 cd "$ac_dir" || { ac_status=$?; continue; }
1665 # Check for guested configure.
1666 if test -f "$ac_srcdir/configure.gnu"; then
1667 echo &&
1668 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1669 elif test -f "$ac_srcdir/configure"; then
1670 echo &&
1671 $SHELL "$ac_srcdir/configure" --help=recursive
3ace7edb 1672 else
81ecdfbb
RW
1673 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1674 fi || ac_status=$?
1675 cd "$ac_pwd" || { ac_status=$?; break; }
bec39cab
AC
1676 done
1677fi
1678
81ecdfbb 1679test -n "$ac_init_help" && exit $ac_status
bec39cab
AC
1680if $ac_init_version; then
1681 cat <<\_ACEOF
81ecdfbb
RW
1682configure
1683generated by GNU Autoconf 2.64
bec39cab 1684
81ecdfbb 1685Copyright (C) 2009 Free Software Foundation, Inc.
bec39cab
AC
1686This configure script is free software; the Free Software Foundation
1687gives unlimited permission to copy, distribute and modify it.
1688_ACEOF
81ecdfbb 1689 exit
bec39cab 1690fi
bec39cab 1691
81ecdfbb
RW
1692## ------------------------ ##
1693## Autoconf initialization. ##
1694## ------------------------ ##
bec39cab 1695
81ecdfbb
RW
1696# ac_fn_c_try_compile LINENO
1697# --------------------------
1698# Try to compile conftest.$ac_ext, and return whether this succeeded.
1699ac_fn_c_try_compile ()
1700{
1701 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1702 rm -f conftest.$ac_objext
1703 if { { ac_try="$ac_compile"
1704case "(($ac_try" in
1705 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1706 *) ac_try_echo=$ac_try;;
1707esac
1708eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1709$as_echo "$ac_try_echo"; } >&5
1710 (eval "$ac_compile") 2>conftest.err
1711 ac_status=$?
1712 if test -s conftest.err; then
1713 grep -v '^ *+' conftest.err >conftest.er1
1714 cat conftest.er1 >&5
1715 mv -f conftest.er1 conftest.err
1716 fi
1717 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1718 test $ac_status = 0; } && {
1719 test -z "$ac_c_werror_flag" ||
1720 test ! -s conftest.err
1721 } && test -s conftest.$ac_objext; then :
1722 ac_retval=0
1723else
1724 $as_echo "$as_me: failed program was:" >&5
1725sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1726
81ecdfbb
RW
1727 ac_retval=1
1728fi
1729 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1730 return $ac_retval
1731
1732} # ac_fn_c_try_compile
1733
3bc3d82a
PA
1734# ac_fn_cxx_try_compile LINENO
1735# ----------------------------
1736# Try to compile conftest.$ac_ext, and return whether this succeeded.
1737ac_fn_cxx_try_compile ()
1738{
1739 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1740 rm -f conftest.$ac_objext
1741 if { { ac_try="$ac_compile"
1742case "(($ac_try" in
1743 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1744 *) ac_try_echo=$ac_try;;
1745esac
1746eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1747$as_echo "$ac_try_echo"; } >&5
1748 (eval "$ac_compile") 2>conftest.err
1749 ac_status=$?
1750 if test -s conftest.err; then
1751 grep -v '^ *+' conftest.err >conftest.er1
1752 cat conftest.er1 >&5
1753 mv -f conftest.er1 conftest.err
1754 fi
1755 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1756 test $ac_status = 0; } && {
1757 test -z "$ac_cxx_werror_flag" ||
1758 test ! -s conftest.err
1759 } && test -s conftest.$ac_objext; then :
1760 ac_retval=0
1761else
1762 $as_echo "$as_me: failed program was:" >&5
1763sed 's/^/| /' conftest.$ac_ext >&5
1764
1765 ac_retval=1
1766fi
1767 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1768 return $ac_retval
1769
1770} # ac_fn_cxx_try_compile
1771
81ecdfbb
RW
1772# ac_fn_c_try_cpp LINENO
1773# ----------------------
1774# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1775ac_fn_c_try_cpp ()
bec39cab 1776{
81ecdfbb
RW
1777 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1778 if { { ac_try="$ac_cpp conftest.$ac_ext"
1779case "(($ac_try" in
1780 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1781 *) ac_try_echo=$ac_try;;
1782esac
1783eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1784$as_echo "$ac_try_echo"; } >&5
1785 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1786 ac_status=$?
1787 if test -s conftest.err; then
1788 grep -v '^ *+' conftest.err >conftest.er1
1789 cat conftest.er1 >&5
1790 mv -f conftest.er1 conftest.err
1791 fi
1792 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1793 test $ac_status = 0; } >/dev/null && {
1794 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1795 test ! -s conftest.err
1796 }; then :
1797 ac_retval=0
1798else
1799 $as_echo "$as_me: failed program was:" >&5
1800sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1801
81ecdfbb
RW
1802 ac_retval=1
1803fi
1804 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1805 return $ac_retval
bec39cab 1806
81ecdfbb 1807} # ac_fn_c_try_cpp
bec39cab 1808
81ecdfbb
RW
1809# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1810# -------------------------------------------------------
1811# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1812# the include files in INCLUDES and setting the cache variable VAR
1813# accordingly.
1814ac_fn_c_check_header_mongrel ()
1815{
1816 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1817 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1819$as_echo_n "checking for $2... " >&6; }
1820if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1821 $as_echo_n "(cached) " >&6
1822fi
1823eval ac_res=\$$3
1824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1825$as_echo "$ac_res" >&6; }
1826else
1827 # Is the header compilable?
1828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1829$as_echo_n "checking $2 usability... " >&6; }
1830cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1831/* end confdefs.h. */
1832$4
1833#include <$2>
1834_ACEOF
1835if ac_fn_c_try_compile "$LINENO"; then :
1836 ac_header_compiler=yes
1837else
1838 ac_header_compiler=no
1839fi
1840rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1841{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1842$as_echo "$ac_header_compiler" >&6; }
bec39cab 1843
81ecdfbb
RW
1844# Is the header present?
1845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1846$as_echo_n "checking $2 presence... " >&6; }
1847cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1848/* end confdefs.h. */
1849#include <$2>
1850_ACEOF
1851if ac_fn_c_try_cpp "$LINENO"; then :
1852 ac_header_preproc=yes
1853else
1854 ac_header_preproc=no
1855fi
1856rm -f conftest.err conftest.$ac_ext
1857{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1858$as_echo "$ac_header_preproc" >&6; }
bec39cab 1859
81ecdfbb
RW
1860# So? What about this header?
1861case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1862 yes:no: )
1863 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1864$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1865 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1866$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1867 ;;
1868 no:yes:* )
1869 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1870$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1871 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1872$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1873 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1874$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1875 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1876$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1877 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1878$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1879 ;;
1880esac
1881 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1882$as_echo_n "checking for $2... " >&6; }
1883if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1884 $as_echo_n "(cached) " >&6
1885else
1886 eval "$3=\$ac_header_compiler"
1887fi
1888eval ac_res=\$$3
1889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1890$as_echo "$ac_res" >&6; }
1891fi
1892 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 1893
81ecdfbb 1894} # ac_fn_c_check_header_mongrel
bec39cab 1895
81ecdfbb
RW
1896# ac_fn_c_try_run LINENO
1897# ----------------------
1898# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1899# that executables *can* be run.
1900ac_fn_c_try_run ()
1901{
1902 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1903 if { { ac_try="$ac_link"
1904case "(($ac_try" in
1905 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1906 *) ac_try_echo=$ac_try;;
1907esac
1908eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1909$as_echo "$ac_try_echo"; } >&5
1910 (eval "$ac_link") 2>&5
1911 ac_status=$?
1912 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1913 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1914 { { case "(($ac_try" in
1915 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1916 *) ac_try_echo=$ac_try;;
1917esac
1918eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1919$as_echo "$ac_try_echo"; } >&5
1920 (eval "$ac_try") 2>&5
1921 ac_status=$?
1922 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1923 test $ac_status = 0; }; }; then :
1924 ac_retval=0
1925else
1926 $as_echo "$as_me: program exited with status $ac_status" >&5
1927 $as_echo "$as_me: failed program was:" >&5
1928sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1929
81ecdfbb
RW
1930 ac_retval=$ac_status
1931fi
1932 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1933 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1934 return $ac_retval
bec39cab 1935
81ecdfbb 1936} # ac_fn_c_try_run
bec39cab 1937
81ecdfbb
RW
1938# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1939# -------------------------------------------------------
1940# Tests whether HEADER exists and can be compiled using the include files in
1941# INCLUDES, setting the cache variable VAR accordingly.
1942ac_fn_c_check_header_compile ()
1943{
1944 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1946$as_echo_n "checking for $2... " >&6; }
1947if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1948 $as_echo_n "(cached) " >&6
1949else
1950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1951/* end confdefs.h. */
1952$4
1953#include <$2>
bec39cab 1954_ACEOF
81ecdfbb
RW
1955if ac_fn_c_try_compile "$LINENO"; then :
1956 eval "$3=yes"
1957else
1958 eval "$3=no"
1959fi
1960rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1961fi
1962eval ac_res=\$$3
1963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1964$as_echo "$ac_res" >&6; }
1965 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 1966
81ecdfbb 1967} # ac_fn_c_check_header_compile
bec39cab 1968
2974be62
AM
1969# ac_fn_c_try_link LINENO
1970# -----------------------
1971# Try to link conftest.$ac_ext, and return whether this succeeded.
1972ac_fn_c_try_link ()
1973{
1974 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1975 rm -f conftest.$ac_objext conftest$ac_exeext
1976 if { { ac_try="$ac_link"
1977case "(($ac_try" in
1978 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1979 *) ac_try_echo=$ac_try;;
1980esac
1981eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1982$as_echo "$ac_try_echo"; } >&5
1983 (eval "$ac_link") 2>conftest.err
1984 ac_status=$?
1985 if test -s conftest.err; then
1986 grep -v '^ *+' conftest.err >conftest.er1
1987 cat conftest.er1 >&5
1988 mv -f conftest.er1 conftest.err
1989 fi
1990 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1991 test $ac_status = 0; } && {
1992 test -z "$ac_c_werror_flag" ||
1993 test ! -s conftest.err
1994 } && test -s conftest$ac_exeext && {
1995 test "$cross_compiling" = yes ||
1996 $as_test_x conftest$ac_exeext
1997 }; then :
1998 ac_retval=0
1999else
2000 $as_echo "$as_me: failed program was:" >&5
2001sed 's/^/| /' conftest.$ac_ext >&5
2002
2003 ac_retval=1
2004fi
2005 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2006 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2007 # interfere with the next link command; also delete a directory that is
2008 # left behind by Apple's compiler. We do this before executing the actions.
2009 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2010 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2011 return $ac_retval
2012
2013} # ac_fn_c_try_link
2014
81ecdfbb
RW
2015# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2016# --------------------------------------------
2017# Tries to find the compile-time value of EXPR in a program that includes
2018# INCLUDES, setting VAR accordingly. Returns whether the value could be
2019# computed
2020ac_fn_c_compute_int ()
2021{
2022 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2023 if test "$cross_compiling" = yes; then
2024 # Depending upon the size, compute the lo and hi bounds.
2025cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2026/* end confdefs.h. */
2027$4
2028int
2029main ()
2030{
2031static int test_array [1 - 2 * !(($2) >= 0)];
2032test_array [0] = 0
bec39cab 2033
81ecdfbb
RW
2034 ;
2035 return 0;
2036}
2037_ACEOF
2038if ac_fn_c_try_compile "$LINENO"; then :
2039 ac_lo=0 ac_mid=0
2040 while :; do
2041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2042/* end confdefs.h. */
2043$4
2044int
2045main ()
2046{
2047static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2048test_array [0] = 0
bec39cab 2049
81ecdfbb
RW
2050 ;
2051 return 0;
2052}
2053_ACEOF
2054if ac_fn_c_try_compile "$LINENO"; then :
2055 ac_hi=$ac_mid; break
2056else
2057 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2058 if test $ac_lo -le $ac_mid; then
2059 ac_lo= ac_hi=
2060 break
2061 fi
2062 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
c906108c 2063fi
81ecdfbb
RW
2064rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2065 done
c906108c 2066else
81ecdfbb
RW
2067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2068/* end confdefs.h. */
2069$4
2070int
2071main ()
2072{
2073static int test_array [1 - 2 * !(($2) < 0)];
2074test_array [0] = 0
bec39cab 2075
81ecdfbb
RW
2076 ;
2077 return 0;
2078}
2079_ACEOF
2080if ac_fn_c_try_compile "$LINENO"; then :
2081 ac_hi=-1 ac_mid=-1
2082 while :; do
2083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2084/* end confdefs.h. */
2085$4
2086int
2087main ()
2088{
2089static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2090test_array [0] = 0
bec39cab 2091
81ecdfbb
RW
2092 ;
2093 return 0;
2094}
2095_ACEOF
2096if ac_fn_c_try_compile "$LINENO"; then :
2097 ac_lo=$ac_mid; break
2098else
2099 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2100 if test $ac_mid -le $ac_hi; then
2101 ac_lo= ac_hi=
2102 break
2103 fi
2104 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2105fi
2106rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2107 done
2108else
2109 ac_lo= ac_hi=
2110fi
2111rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2112fi
2113rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2114# Binary search between lo and hi bounds.
2115while test "x$ac_lo" != "x$ac_hi"; do
2116 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2117 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2118/* end confdefs.h. */
2119$4
2120int
2121main ()
2122{
2123static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2124test_array [0] = 0
bec39cab 2125
81ecdfbb
RW
2126 ;
2127 return 0;
2128}
2129_ACEOF
2130if ac_fn_c_try_compile "$LINENO"; then :
2131 ac_hi=$ac_mid
2132else
2133 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2134fi
2135rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2136done
2137case $ac_lo in #((
2138?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2139'') ac_retval=1 ;;
2140esac
2141 else
2142 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2143/* end confdefs.h. */
2144$4
2145static long int longval () { return $2; }
2146static unsigned long int ulongval () { return $2; }
2147#include <stdio.h>
2148#include <stdlib.h>
2149int
2150main ()
2151{
bec39cab 2152
81ecdfbb
RW
2153 FILE *f = fopen ("conftest.val", "w");
2154 if (! f)
2155 return 1;
2156 if (($2) < 0)
2157 {
2158 long int i = longval ();
2159 if (i != ($2))
2160 return 1;
2161 fprintf (f, "%ld", i);
2162 }
2163 else
2164 {
2165 unsigned long int i = ulongval ();
2166 if (i != ($2))
2167 return 1;
2168 fprintf (f, "%lu", i);
2169 }
2170 /* Do not output a trailing newline, as this causes \r\n confusion
2171 on some platforms. */
2172 return ferror (f) || fclose (f) != 0;
bec39cab 2173
81ecdfbb
RW
2174 ;
2175 return 0;
2176}
2177_ACEOF
2178if ac_fn_c_try_run "$LINENO"; then :
2179 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2180else
2181 ac_retval=1
2182fi
2183rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2184 conftest.$ac_objext conftest.beam conftest.$ac_ext
2185rm -f conftest.val
bec39cab 2186
81ecdfbb
RW
2187 fi
2188 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2189 return $ac_retval
bec39cab 2190
81ecdfbb 2191} # ac_fn_c_compute_int
bec39cab 2192
55a8c076
YQ
2193# ac_fn_c_check_func LINENO FUNC VAR
2194# ----------------------------------
2195# Tests whether FUNC exists, setting the cache variable VAR accordingly
2196ac_fn_c_check_func ()
81ecdfbb
RW
2197{
2198 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2199 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2200$as_echo_n "checking for $2... " >&6; }
2201if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2202 $as_echo_n "(cached) " >&6
2203else
81ecdfbb
RW
2204 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2205/* end confdefs.h. */
55a8c076
YQ
2206/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2207 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2208#define $2 innocuous_$2
2209
2210/* System header to define __stub macros and hopefully few prototypes,
2211 which can conflict with char $2 (); below.
2212 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2213 <limits.h> exists even on freestanding compilers. */
2214
2215#ifdef __STDC__
2216# include <limits.h>
2217#else
2218# include <assert.h>
2219#endif
2220
2221#undef $2
2222
2223/* Override any GCC internal prototype to avoid an error.
2224 Use char because int might match the return type of a GCC
2225 builtin and then its argument prototype would still apply. */
2226#ifdef __cplusplus
2227extern "C"
2228#endif
2229char $2 ();
2230/* The GNU C library defines this for functions which it implements
2231 to always fail with ENOSYS. Some functions are actually named
2232 something starting with __ and the normal name is an alias. */
2233#if defined __stub_$2 || defined __stub___$2
2234choke me
2235#endif
2236
2237int
2238main ()
2239{
2240return $2 ();
2241 ;
2242 return 0;
2243}
2244_ACEOF
2245if ac_fn_c_try_link "$LINENO"; then :
2246 eval "$3=yes"
2247else
2248 eval "$3=no"
2249fi
2250rm -f core conftest.err conftest.$ac_objext \
2251 conftest$ac_exeext conftest.$ac_ext
2252fi
2253eval ac_res=\$$3
2254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2255$as_echo "$ac_res" >&6; }
2256 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2257
2258} # ac_fn_c_check_func
2259
c56ccc05
MM
2260# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2261# ----------------------------------------------------
2262# Tries to find if the field MEMBER exists in type AGGR, after including
2263# INCLUDES, setting cache variable VAR accordingly.
2264ac_fn_c_check_member ()
2265{
2266 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2268$as_echo_n "checking for $2.$3... " >&6; }
2269if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
2270 $as_echo_n "(cached) " >&6
2271else
2272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2273/* end confdefs.h. */
2274$5
2275int
2276main ()
2277{
2278static $2 ac_aggr;
2279if (ac_aggr.$3)
2280return 0;
2281 ;
2282 return 0;
2283}
2284_ACEOF
2285if ac_fn_c_try_compile "$LINENO"; then :
2286 eval "$4=yes"
2287else
2288 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2289/* end confdefs.h. */
2290$5
2291int
2292main ()
2293{
2294static $2 ac_aggr;
2295if (sizeof ac_aggr.$3)
2296return 0;
2297 ;
2298 return 0;
2299}
2300_ACEOF
2301if ac_fn_c_try_compile "$LINENO"; then :
2302 eval "$4=yes"
2303else
2304 eval "$4=no"
2305fi
2306rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2307fi
2308rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2309fi
2310eval ac_res=\$$4
2311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2312$as_echo "$ac_res" >&6; }
2313 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2314
2315} # ac_fn_c_check_member
2316
07697489
PA
2317# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2318# -------------------------------------------
2319# Tests whether TYPE exists after having included INCLUDES, setting cache
2320# variable VAR accordingly.
2321ac_fn_c_check_type ()
2322{
2323 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2324 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2325$as_echo_n "checking for $2... " >&6; }
2326if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2327 $as_echo_n "(cached) " >&6
2328else
2329 eval "$3=no"
2330 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2331/* end confdefs.h. */
2332$4
2333int
2334main ()
2335{
2336if (sizeof ($2))
2337 return 0;
2338 ;
2339 return 0;
2340}
2341_ACEOF
2342if ac_fn_c_try_compile "$LINENO"; then :
2343 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2344/* end confdefs.h. */
2345$4
2346int
2347main ()
2348{
2349if (sizeof (($2)))
2350 return 0;
2351 ;
2352 return 0;
2353}
2354_ACEOF
2355if ac_fn_c_try_compile "$LINENO"; then :
2356
2357else
2358 eval "$3=yes"
2359fi
2360rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2361fi
2362rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2363fi
2364eval ac_res=\$$3
2365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2366$as_echo "$ac_res" >&6; }
2367 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2368
2369} # ac_fn_c_check_type
2370
770d76d7
PA
2371# ac_fn_c_check_decl LINENO SYMBOL VAR
2372# ------------------------------------
2373# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2374ac_fn_c_check_decl ()
2375{
2376 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2377 as_decl_name=`echo $2|sed 's/ *(.*//'`
2378 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2379 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2380$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2381if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2382 $as_echo_n "(cached) " >&6
2383else
2384 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2385/* end confdefs.h. */
2386$4
2387int
2388main ()
2389{
2390#ifndef $as_decl_name
2391#ifdef __cplusplus
2392 (void) $as_decl_use;
2393#else
2394 (void) $as_decl_name;
2395#endif
2396#endif
2397
2398 ;
2399 return 0;
2400}
2401_ACEOF
2402if ac_fn_c_try_compile "$LINENO"; then :
2403 eval "$3=yes"
2404else
2405 eval "$3=no"
2406fi
2407rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2408fi
2409eval ac_res=\$$3
2410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2411$as_echo "$ac_res" >&6; }
2412 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2413
2414} # ac_fn_c_check_decl
81ecdfbb
RW
2415cat >config.log <<_ACEOF
2416This file contains any messages produced by compilers while
2417running configure, to aid debugging if configure makes a mistake.
d5af19ba 2418
81ecdfbb
RW
2419It was created by $as_me, which was
2420generated by GNU Autoconf 2.64. Invocation command line was
b4e70030 2421
81ecdfbb 2422 $ $0 $@
413ccac7 2423
81ecdfbb
RW
2424_ACEOF
2425exec 5>>config.log
2426{
2427cat <<_ASUNAME
2428## --------- ##
2429## Platform. ##
2430## --------- ##
413ccac7 2431
81ecdfbb
RW
2432hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2433uname -m = `(uname -m) 2>/dev/null || echo unknown`
2434uname -r = `(uname -r) 2>/dev/null || echo unknown`
2435uname -s = `(uname -s) 2>/dev/null || echo unknown`
2436uname -v = `(uname -v) 2>/dev/null || echo unknown`
85981d60 2437
81ecdfbb
RW
2438/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2439/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
413ccac7 2440
81ecdfbb
RW
2441/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2442/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2443/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2444/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2445/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2446/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2447/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
c906108c 2448
81ecdfbb 2449_ASUNAME
bec39cab 2450
bec39cab
AC
2451as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2452for as_dir in $PATH
2453do
2454 IFS=$as_save_IFS
2455 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2456 $as_echo "PATH: $as_dir"
2457 done
2458IFS=$as_save_IFS
bec39cab 2459
81ecdfbb 2460} >&5
bec39cab 2461
81ecdfbb 2462cat >&5 <<_ACEOF
bec39cab 2463
bec39cab 2464
81ecdfbb
RW
2465## ----------- ##
2466## Core tests. ##
2467## ----------- ##
2468
2469_ACEOF
2470
2471
2472# Keep a trace of the command line.
2473# Strip out --no-create and --no-recursion so they do not pile up.
2474# Strip out --silent because we don't want to record it for future runs.
2475# Also quote any args containing shell meta-characters.
2476# Make two passes to allow for proper duplicate-argument suppression.
2477ac_configure_args=
2478ac_configure_args0=
2479ac_configure_args1=
2480ac_must_keep_next=false
2481for ac_pass in 1 2
2482do
2483 for ac_arg
2484 do
2485 case $ac_arg in
2486 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2487 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2488 | -silent | --silent | --silen | --sile | --sil)
2489 continue ;;
2490 *\'*)
2491 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2492 esac
2493 case $ac_pass in
2494 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2495 2)
2496 as_fn_append ac_configure_args1 " '$ac_arg'"
2497 if test $ac_must_keep_next = true; then
2498 ac_must_keep_next=false # Got value, back to normal.
2499 else
2500 case $ac_arg in
2501 *=* | --config-cache | -C | -disable-* | --disable-* \
2502 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2503 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2504 | -with-* | --with-* | -without-* | --without-* | --x)
2505 case "$ac_configure_args0 " in
2506 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2507 esac
2508 ;;
2509 -* ) ac_must_keep_next=true ;;
2510 esac
2511 fi
2512 as_fn_append ac_configure_args " '$ac_arg'"
2513 ;;
2514 esac
2515 done
2516done
2517{ ac_configure_args0=; unset ac_configure_args0;}
2518{ ac_configure_args1=; unset ac_configure_args1;}
2519
2520# When interrupted or exit'd, cleanup temporary files, and complete
2521# config.log. We remove comments because anyway the quotes in there
2522# would cause problems or look ugly.
2523# WARNING: Use '\'' to represent an apostrophe within the trap.
2524# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2525trap 'exit_status=$?
2526 # Save into config.log some information that might help in debugging.
2527 {
2528 echo
2529
2530 cat <<\_ASBOX
2531## ---------------- ##
2532## Cache variables. ##
2533## ---------------- ##
2534_ASBOX
2535 echo
2536 # The following way of writing the cache mishandles newlines in values,
2537(
2538 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2539 eval ac_val=\$$ac_var
2540 case $ac_val in #(
2541 *${as_nl}*)
2542 case $ac_var in #(
2543 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2544$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2545 esac
2546 case $ac_var in #(
2547 _ | IFS | as_nl) ;; #(
2548 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2549 *) { eval $ac_var=; unset $ac_var;} ;;
2550 esac ;;
2551 esac
2552 done
2553 (set) 2>&1 |
2554 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2555 *${as_nl}ac_space=\ *)
2556 sed -n \
2557 "s/'\''/'\''\\\\'\'''\''/g;
2558 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2559 ;; #(
2560 *)
2561 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2562 ;;
2563 esac |
2564 sort
2565)
2566 echo
2567
2568 cat <<\_ASBOX
2569## ----------------- ##
2570## Output variables. ##
2571## ----------------- ##
2572_ASBOX
2573 echo
2574 for ac_var in $ac_subst_vars
2575 do
2576 eval ac_val=\$$ac_var
2577 case $ac_val in
2578 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2579 esac
2580 $as_echo "$ac_var='\''$ac_val'\''"
2581 done | sort
2582 echo
2583
2584 if test -n "$ac_subst_files"; then
2585 cat <<\_ASBOX
2586## ------------------- ##
2587## File substitutions. ##
2588## ------------------- ##
2589_ASBOX
2590 echo
2591 for ac_var in $ac_subst_files
2592 do
2593 eval ac_val=\$$ac_var
2594 case $ac_val in
2595 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2596 esac
2597 $as_echo "$ac_var='\''$ac_val'\''"
2598 done | sort
2599 echo
2600 fi
2601
2602 if test -s confdefs.h; then
2603 cat <<\_ASBOX
2604## ----------- ##
2605## confdefs.h. ##
2606## ----------- ##
2607_ASBOX
2608 echo
2609 cat confdefs.h
2610 echo
2611 fi
2612 test "$ac_signal" != 0 &&
2613 $as_echo "$as_me: caught signal $ac_signal"
2614 $as_echo "$as_me: exit $exit_status"
2615 } >&5
2616 rm -f core *.core core.conftest.* &&
2617 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2618 exit $exit_status
2619' 0
2620for ac_signal in 1 2 13 15; do
2621 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2622done
2623ac_signal=0
2624
2625# confdefs.h avoids OS command line length limits that DEFS can exceed.
2626rm -f -r conftest* confdefs.h
2627
2628$as_echo "/* confdefs.h */" > confdefs.h
2629
2630# Predefined preprocessor variables.
2631
2632cat >>confdefs.h <<_ACEOF
2633#define PACKAGE_NAME "$PACKAGE_NAME"
2634_ACEOF
2635
2636cat >>confdefs.h <<_ACEOF
2637#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2638_ACEOF
2639
2640cat >>confdefs.h <<_ACEOF
2641#define PACKAGE_VERSION "$PACKAGE_VERSION"
2642_ACEOF
2643
2644cat >>confdefs.h <<_ACEOF
2645#define PACKAGE_STRING "$PACKAGE_STRING"
2646_ACEOF
2647
2648cat >>confdefs.h <<_ACEOF
2649#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2650_ACEOF
2651
2652cat >>confdefs.h <<_ACEOF
2653#define PACKAGE_URL "$PACKAGE_URL"
2654_ACEOF
2655
2656
2657# Let the site file select an alternate cache file if it wants to.
2658# Prefer an explicitly selected file to automatically selected ones.
2659ac_site_file1=NONE
2660ac_site_file2=NONE
2661if test -n "$CONFIG_SITE"; then
2662 ac_site_file1=$CONFIG_SITE
2663elif test "x$prefix" != xNONE; then
2664 ac_site_file1=$prefix/share/config.site
2665 ac_site_file2=$prefix/etc/config.site
2666else
2667 ac_site_file1=$ac_default_prefix/share/config.site
2668 ac_site_file2=$ac_default_prefix/etc/config.site
2669fi
2670for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2671do
2672 test "x$ac_site_file" = xNONE && continue
2673 if test -r "$ac_site_file"; then
2674 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2675$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2676 sed 's/^/| /' "$ac_site_file" >&5
2677 . "$ac_site_file"
2678 fi
2679done
2680
2681if test -r "$cache_file"; then
2682 # Some versions of bash will fail to source /dev/null (special
2683 # files actually), so we avoid doing that.
2684 if test -f "$cache_file"; then
2685 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2686$as_echo "$as_me: loading cache $cache_file" >&6;}
2687 case $cache_file in
2688 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2689 *) . "./$cache_file";;
2690 esac
2691 fi
2692else
2693 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2694$as_echo "$as_me: creating cache $cache_file" >&6;}
2695 >$cache_file
bec39cab
AC
2696fi
2697
81ecdfbb
RW
2698# Check that the precious variables saved in the cache have kept the same
2699# value.
2700ac_cache_corrupted=false
2701for ac_var in $ac_precious_vars; do
2702 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2703 eval ac_new_set=\$ac_env_${ac_var}_set
2704 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2705 eval ac_new_val=\$ac_env_${ac_var}_value
2706 case $ac_old_set,$ac_new_set in
2707 set,)
2708 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2709$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2710 ac_cache_corrupted=: ;;
2711 ,set)
2712 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2713$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2714 ac_cache_corrupted=: ;;
2715 ,);;
2716 *)
2717 if test "x$ac_old_val" != "x$ac_new_val"; then
2718 # differences in whitespace do not lead to failure.
2719 ac_old_val_w=`echo x $ac_old_val`
2720 ac_new_val_w=`echo x $ac_new_val`
2721 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2722 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2723$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2724 ac_cache_corrupted=:
2725 else
2726 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2727$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2728 eval $ac_var=\$ac_old_val
2729 fi
2730 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2731$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2732 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2733$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2734 fi;;
2735 esac
2736 # Pass precious variables to config.status.
2737 if test "$ac_new_set" = set; then
2738 case $ac_new_val in
2739 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2740 *) ac_arg=$ac_var=$ac_new_val ;;
2741 esac
2742 case " $ac_configure_args " in
2743 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2744 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2745 esac
2746 fi
2747done
2748if $ac_cache_corrupted; then
2749 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2750$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2751 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2752$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2753 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2754fi
2755## -------------------- ##
2756## Main body of script. ##
2757## -------------------- ##
2758
2759ac_ext=c
2760ac_cpp='$CPP $CPPFLAGS'
2761ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2762ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2763ac_compiler_gnu=$ac_cv_c_compiler_gnu
2764
2765
2766
2767
2768
2769ac_config_headers="$ac_config_headers config.h:config.in"
2770
2771
2772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2773$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2774 # Check whether --enable-maintainer-mode was given.
2775if test "${enable_maintainer_mode+set}" = set; then :
2776 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2777else
2778 USE_MAINTAINER_MODE=no
2779fi
2780
2781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
2782$as_echo "$USE_MAINTAINER_MODE" >&6; }
2783 if test $USE_MAINTAINER_MODE = yes; then
2784 MAINTAINER_MODE_TRUE=
2785 MAINTAINER_MODE_FALSE='#'
2786else
2787 MAINTAINER_MODE_TRUE='#'
2788 MAINTAINER_MODE_FALSE=
2789fi
2790
2791 MAINT=$MAINTAINER_MODE_TRUE
2792
2793
2794
17ef446e 2795# Set the 'development' global.
270c9937 2796. $srcdir/../bfd/development.sh
f5f1cdb6 2797
81ecdfbb
RW
2798ac_ext=c
2799ac_cpp='$CPP $CPPFLAGS'
2800ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2801ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2802ac_compiler_gnu=$ac_cv_c_compiler_gnu
2803if test -n "$ac_tool_prefix"; then
2804 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2805set dummy ${ac_tool_prefix}gcc; ac_word=$2
2806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2807$as_echo_n "checking for $ac_word... " >&6; }
2808if test "${ac_cv_prog_CC+set}" = set; then :
2809 $as_echo_n "(cached) " >&6
c906108c
SS
2810else
2811 if test -n "$CC"; then
2812 ac_cv_prog_CC="$CC" # Let the user override the test.
2813else
bec39cab
AC
2814as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2815for as_dir in $PATH
2816do
2817 IFS=$as_save_IFS
2818 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2819 for ac_exec_ext in '' $ac_executable_extensions; do
2820 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2821 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2822 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2823 break 2
2824 fi
2825done
81ecdfbb
RW
2826 done
2827IFS=$as_save_IFS
bec39cab 2828
c906108c
SS
2829fi
2830fi
bec39cab 2831CC=$ac_cv_prog_CC
c906108c 2832if test -n "$CC"; then
81ecdfbb
RW
2833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2834$as_echo "$CC" >&6; }
c906108c 2835else
81ecdfbb
RW
2836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2837$as_echo "no" >&6; }
c906108c
SS
2838fi
2839
81ecdfbb 2840
b4e70030
JB
2841fi
2842if test -z "$ac_cv_prog_CC"; then
2843 ac_ct_CC=$CC
81ecdfbb
RW
2844 # Extract the first word of "gcc", so it can be a program name with args.
2845set dummy gcc; ac_word=$2
2846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2847$as_echo_n "checking for $ac_word... " >&6; }
2848if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
2849 $as_echo_n "(cached) " >&6
b4e70030
JB
2850else
2851 if test -n "$ac_ct_CC"; then
2852 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2853else
2854as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2855for as_dir in $PATH
2856do
2857 IFS=$as_save_IFS
2858 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2859 for ac_exec_ext in '' $ac_executable_extensions; do
2860 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2861 ac_cv_prog_ac_ct_CC="gcc"
2862 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b4e70030 2863 break 2
4e8d927d 2864 fi
b4e70030 2865done
81ecdfbb
RW
2866 done
2867IFS=$as_save_IFS
b4e70030
JB
2868
2869fi
2870fi
2871ac_ct_CC=$ac_cv_prog_ac_ct_CC
2872if test -n "$ac_ct_CC"; then
81ecdfbb
RW
2873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2874$as_echo "$ac_ct_CC" >&6; }
b4e70030 2875else
81ecdfbb
RW
2876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2877$as_echo "no" >&6; }
b4e70030
JB
2878fi
2879
81ecdfbb
RW
2880 if test "x$ac_ct_CC" = x; then
2881 CC=""
2882 else
2883 case $cross_compiling:$ac_tool_warned in
2884yes:)
2885{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2886$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2887ac_tool_warned=yes ;;
2888esac
2889 CC=$ac_ct_CC
2890 fi
b4e70030
JB
2891else
2892 CC="$ac_cv_prog_CC"
2893fi
2894
c906108c 2895if test -z "$CC"; then
81ecdfbb
RW
2896 if test -n "$ac_tool_prefix"; then
2897 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2898set dummy ${ac_tool_prefix}cc; ac_word=$2
2899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2900$as_echo_n "checking for $ac_word... " >&6; }
2901if test "${ac_cv_prog_CC+set}" = set; then :
2902 $as_echo_n "(cached) " >&6
c906108c
SS
2903else
2904 if test -n "$CC"; then
2905 ac_cv_prog_CC="$CC" # Let the user override the test.
2906else
bec39cab
AC
2907as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2908for as_dir in $PATH
2909do
2910 IFS=$as_save_IFS
2911 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2912 for ac_exec_ext in '' $ac_executable_extensions; do
2913 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2914 ac_cv_prog_CC="${ac_tool_prefix}cc"
2915 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2916 break 2
2917 fi
2918done
81ecdfbb
RW
2919 done
2920IFS=$as_save_IFS
2921
2922fi
2923fi
2924CC=$ac_cv_prog_CC
2925if test -n "$CC"; then
2926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2927$as_echo "$CC" >&6; }
2928else
2929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2930$as_echo "no" >&6; }
2931fi
2932
2933
2934 fi
2935fi
2936if test -z "$CC"; then
2937 # Extract the first word of "cc", so it can be a program name with args.
2938set dummy cc; ac_word=$2
2939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2940$as_echo_n "checking for $ac_word... " >&6; }
2941if test "${ac_cv_prog_CC+set}" = set; then :
2942 $as_echo_n "(cached) " >&6
2943else
2944 if test -n "$CC"; then
2945 ac_cv_prog_CC="$CC" # Let the user override the test.
2946else
2947 ac_prog_rejected=no
2948as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2949for as_dir in $PATH
2950do
2951 IFS=$as_save_IFS
2952 test -z "$as_dir" && as_dir=.
2953 for ac_exec_ext in '' $ac_executable_extensions; do
2954 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2955 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2956 ac_prog_rejected=yes
2957 continue
2958 fi
2959 ac_cv_prog_CC="cc"
2960 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2961 break 2
2962 fi
2963done
2964 done
2965IFS=$as_save_IFS
bec39cab 2966
c906108c
SS
2967if test $ac_prog_rejected = yes; then
2968 # We found a bogon in the path, so make sure we never use it.
2969 set dummy $ac_cv_prog_CC
2970 shift
bec39cab 2971 if test $# != 0; then
c906108c
SS
2972 # We chose a different compiler from the bogus one.
2973 # However, it has the same basename, so the bogon will be chosen
2974 # first if we set CC to just the basename; use the full file name.
2975 shift
bec39cab 2976 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
c906108c
SS
2977 fi
2978fi
2979fi
2980fi
bec39cab 2981CC=$ac_cv_prog_CC
c906108c 2982if test -n "$CC"; then
81ecdfbb
RW
2983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2984$as_echo "$CC" >&6; }
c906108c 2985else
81ecdfbb
RW
2986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2987$as_echo "no" >&6; }
c906108c
SS
2988fi
2989
81ecdfbb 2990
bec39cab
AC
2991fi
2992if test -z "$CC"; then
2993 if test -n "$ac_tool_prefix"; then
81ecdfbb 2994 for ac_prog in cl.exe
bec39cab
AC
2995 do
2996 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2997set dummy $ac_tool_prefix$ac_prog; ac_word=$2
81ecdfbb
RW
2998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2999$as_echo_n "checking for $ac_word... " >&6; }
3000if test "${ac_cv_prog_CC+set}" = set; then :
3001 $as_echo_n "(cached) " >&6
c906108c
SS
3002else
3003 if test -n "$CC"; then
3004 ac_cv_prog_CC="$CC" # Let the user override the test.
3005else
bec39cab
AC
3006as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3007for as_dir in $PATH
3008do
3009 IFS=$as_save_IFS
3010 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
3011 for ac_exec_ext in '' $ac_executable_extensions; do
3012 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 3013 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
81ecdfbb 3014 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
3015 break 2
3016 fi
3017done
81ecdfbb
RW
3018 done
3019IFS=$as_save_IFS
bec39cab 3020
c906108c
SS
3021fi
3022fi
bec39cab 3023CC=$ac_cv_prog_CC
c906108c 3024if test -n "$CC"; then
81ecdfbb
RW
3025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3026$as_echo "$CC" >&6; }
c906108c 3027else
81ecdfbb
RW
3028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3029$as_echo "no" >&6; }
c906108c 3030fi
bec39cab 3031
81ecdfbb 3032
bec39cab
AC
3033 test -n "$CC" && break
3034 done
3035fi
3036if test -z "$CC"; then
3037 ac_ct_CC=$CC
81ecdfbb 3038 for ac_prog in cl.exe
bec39cab
AC
3039do
3040 # Extract the first word of "$ac_prog", so it can be a program name with args.
3041set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
3042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3043$as_echo_n "checking for $ac_word... " >&6; }
3044if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3045 $as_echo_n "(cached) " >&6
bec39cab
AC
3046else
3047 if test -n "$ac_ct_CC"; then
3048 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3049else
3050as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3051for as_dir in $PATH
3052do
3053 IFS=$as_save_IFS
3054 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
3055 for ac_exec_ext in '' $ac_executable_extensions; do
3056 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 3057 ac_cv_prog_ac_ct_CC="$ac_prog"
81ecdfbb 3058 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab 3059 break 2
c906108c 3060 fi
bec39cab 3061done
81ecdfbb
RW
3062 done
3063IFS=$as_save_IFS
bec39cab
AC
3064
3065fi
3066fi
3067ac_ct_CC=$ac_cv_prog_ac_ct_CC
3068if test -n "$ac_ct_CC"; then
81ecdfbb
RW
3069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3070$as_echo "$ac_ct_CC" >&6; }
bec39cab 3071else
81ecdfbb
RW
3072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3073$as_echo "no" >&6; }
c906108c
SS
3074fi
3075
81ecdfbb 3076
bec39cab
AC
3077 test -n "$ac_ct_CC" && break
3078done
c906108c 3079
81ecdfbb
RW
3080 if test "x$ac_ct_CC" = x; then
3081 CC=""
3082 else
3083 case $cross_compiling:$ac_tool_warned in
3084yes:)
3085{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3086$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3087ac_tool_warned=yes ;;
3088esac
3089 CC=$ac_ct_CC
3090 fi
bec39cab
AC
3091fi
3092
3093fi
3094
3095
81ecdfbb
RW
3096test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3097$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3098as_fn_error "no acceptable C compiler found in \$PATH
3099See \`config.log' for more details." "$LINENO" 5; }
bec39cab
AC
3100
3101# Provide some information about the compiler.
81ecdfbb
RW
3102$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3103set X $ac_compile
3104ac_compiler=$2
3105for ac_option in --version -v -V -qversion; do
3106 { { ac_try="$ac_compiler $ac_option >&5"
3107case "(($ac_try" in
3108 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3109 *) ac_try_echo=$ac_try;;
3110esac
3111eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3112$as_echo "$ac_try_echo"; } >&5
3113 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
bec39cab 3114 ac_status=$?
81ecdfbb
RW
3115 if test -s conftest.err; then
3116 sed '10a\
3117... rest of stderr output deleted ...
3118 10q' conftest.err >conftest.er1
3119 cat conftest.er1 >&5
3120 rm -f conftest.er1 conftest.err
3121 fi
3122 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3123 test $ac_status = 0; }
3124done
bec39cab 3125
81ecdfbb 3126cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3127/* end confdefs.h. */
3128
3129int
3130main ()
3131{
3132
3133 ;
3134 return 0;
3135}
3136_ACEOF
3137ac_clean_files_save=$ac_clean_files
81ecdfbb 3138ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out"
bec39cab
AC
3139# Try to create an executable without -o first, disregard a.out.
3140# It will help us diagnose broken compilers, and finding out an intuition
3141# of exeext.
81ecdfbb
RW
3142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3143$as_echo_n "checking for C compiler default output file name... " >&6; }
3144ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3145
3146# The possible output files:
3147ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3148
3149ac_rmfiles=
3150for ac_file in $ac_files
3151do
3152 case $ac_file in
3153 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3154 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3155 esac
3156done
3157rm -f $ac_rmfiles
3158
3159if { { ac_try="$ac_link_default"
3160case "(($ac_try" in
3161 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3162 *) ac_try_echo=$ac_try;;
3163esac
3164eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3165$as_echo "$ac_try_echo"; } >&5
3166 (eval "$ac_link_default") 2>&5
3167 ac_status=$?
3168 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3169 test $ac_status = 0; }; then :
3170 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3171# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3172# in a Makefile. We should not override ac_cv_exeext if it was cached,
3173# so that the user can short-circuit this test for compilers unknown to
3174# Autoconf.
3175for ac_file in $ac_files ''
bec39cab
AC
3176do
3177 test -f "$ac_file" || continue
3178 case $ac_file in
81ecdfbb 3179 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
b4e70030
JB
3180 ;;
3181 [ab].out )
3182 # We found the default executable, but exeext='' is most
3183 # certainly right.
3184 break;;
3185 *.* )
81ecdfbb
RW
3186 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3187 then :; else
3188 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3189 fi
3190 # We set ac_cv_exeext here because the later test for it is not
3191 # safe: cross compilers may not add the suffix if given an `-o'
3192 # argument, so we may need to know it at that point already.
3193 # Even if this section looks crufty: it has the advantage of
3194 # actually working.
b4e70030
JB
3195 break;;
3196 * )
3197 break;;
bec39cab
AC
3198 esac
3199done
81ecdfbb
RW
3200test "$ac_cv_exeext" = no && ac_cv_exeext=
3201
bec39cab 3202else
81ecdfbb
RW
3203 ac_file=''
3204fi
3205{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3206$as_echo "$ac_file" >&6; }
3207if test -z "$ac_file"; then :
3208 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3209sed 's/^/| /' conftest.$ac_ext >&5
3210
81ecdfbb
RW
3211{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3212$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3213{ as_fn_set_status 77
3214as_fn_error "C compiler cannot create executables
3215See \`config.log' for more details." "$LINENO" 5; }; }
bec39cab 3216fi
b4e70030 3217ac_exeext=$ac_cv_exeext
b4e70030 3218
81ecdfbb 3219# Check that the compiler produces executables we can run. If not, either
bec39cab 3220# the compiler is broken, or we cross compile.
81ecdfbb
RW
3221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3222$as_echo_n "checking whether the C compiler works... " >&6; }
bec39cab
AC
3223# If not cross compiling, check that we can run a simple program.
3224if test "$cross_compiling" != yes; then
3225 if { ac_try='./$ac_file'
81ecdfbb
RW
3226 { { case "(($ac_try" in
3227 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3228 *) ac_try_echo=$ac_try;;
3229esac
3230eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3231$as_echo "$ac_try_echo"; } >&5
3232 (eval "$ac_try") 2>&5
bec39cab 3233 ac_status=$?
81ecdfbb
RW
3234 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3235 test $ac_status = 0; }; }; then
bec39cab 3236 cross_compiling=no
c906108c 3237 else
bec39cab
AC
3238 if test "$cross_compiling" = maybe; then
3239 cross_compiling=yes
3240 else
81ecdfbb
RW
3241 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3242$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3243as_fn_error "cannot run C compiled programs.
bec39cab 3244If you meant to cross compile, use \`--host'.
81ecdfbb 3245See \`config.log' for more details." "$LINENO" 5; }
bec39cab 3246 fi
c906108c 3247 fi
bec39cab 3248fi
81ecdfbb
RW
3249{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3250$as_echo "yes" >&6; }
bec39cab 3251
81ecdfbb 3252rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out
b4e70030 3253ac_clean_files=$ac_clean_files_save
81ecdfbb 3254# Check that the compiler produces executables we can run. If not, either
b4e70030 3255# the compiler is broken, or we cross compile.
81ecdfbb
RW
3256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3257$as_echo_n "checking whether we are cross compiling... " >&6; }
3258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3259$as_echo "$cross_compiling" >&6; }
3260
3261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3262$as_echo_n "checking for suffix of executables... " >&6; }
3263if { { ac_try="$ac_link"
3264case "(($ac_try" in
3265 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3266 *) ac_try_echo=$ac_try;;
3267esac
3268eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3269$as_echo "$ac_try_echo"; } >&5
3270 (eval "$ac_link") 2>&5
bec39cab 3271 ac_status=$?
81ecdfbb
RW
3272 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3273 test $ac_status = 0; }; then :
b4e70030
JB
3274 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3275# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3276# work properly (i.e., refer to `conftest.exe'), while it won't with
3277# `rm'.
3278for ac_file in conftest.exe conftest conftest.*; do
3279 test -f "$ac_file" || continue
3280 case $ac_file in
81ecdfbb 3281 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
b4e70030 3282 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
b4e70030
JB
3283 break;;
3284 * ) break;;
3285 esac
3286done
c906108c 3287else
81ecdfbb
RW
3288 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3289$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3290as_fn_error "cannot compute suffix of executables: cannot compile and link
3291See \`config.log' for more details." "$LINENO" 5; }
c906108c 3292fi
b4e70030 3293rm -f conftest$ac_cv_exeext
81ecdfbb
RW
3294{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3295$as_echo "$ac_cv_exeext" >&6; }
c906108c 3296
b4e70030 3297rm -f conftest.$ac_ext
bec39cab
AC
3298EXEEXT=$ac_cv_exeext
3299ac_exeext=$EXEEXT
81ecdfbb
RW
3300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3301$as_echo_n "checking for suffix of object files... " >&6; }
3302if test "${ac_cv_objext+set}" = set; then :
3303 $as_echo_n "(cached) " >&6
bec39cab 3304else
81ecdfbb 3305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
3306/* end confdefs.h. */
3307
3308int
3309main ()
3310{
3311
3312 ;
3313 return 0;
3314}
3315_ACEOF
3316rm -f conftest.o conftest.obj
81ecdfbb
RW
3317if { { ac_try="$ac_compile"
3318case "(($ac_try" in
3319 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3320 *) ac_try_echo=$ac_try;;
3321esac
3322eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3323$as_echo "$ac_try_echo"; } >&5
3324 (eval "$ac_compile") 2>&5
3325 ac_status=$?
3326 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3327 test $ac_status = 0; }; then :
3328 for ac_file in conftest.o conftest.obj conftest.*; do
3329 test -f "$ac_file" || continue;
bec39cab 3330 case $ac_file in
81ecdfbb 3331 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
bec39cab
AC
3332 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3333 break;;
3334 esac
3335done
c906108c 3336else
81ecdfbb 3337 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3338sed 's/^/| /' conftest.$ac_ext >&5
3339
81ecdfbb
RW
3340{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3341$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3342as_fn_error "cannot compute suffix of object files: cannot compile
3343See \`config.log' for more details." "$LINENO" 5; }
c906108c 3344fi
b4e70030 3345rm -f conftest.$ac_cv_objext conftest.$ac_ext
bec39cab 3346fi
81ecdfbb
RW
3347{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3348$as_echo "$ac_cv_objext" >&6; }
bec39cab
AC
3349OBJEXT=$ac_cv_objext
3350ac_objext=$OBJEXT
81ecdfbb
RW
3351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3352$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3353if test "${ac_cv_c_compiler_gnu+set}" = set; then :
3354 $as_echo_n "(cached) " >&6
c906108c 3355else
81ecdfbb 3356 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3357/* end confdefs.h. */
3358
3359int
3360main ()
3361{
3362#ifndef __GNUC__
3363 choke me
3364#endif
3365
3366 ;
3367 return 0;
3368}
3369_ACEOF
81ecdfbb 3370if ac_fn_c_try_compile "$LINENO"; then :
bec39cab
AC
3371 ac_compiler_gnu=yes
3372else
81ecdfbb 3373 ac_compiler_gnu=no
bec39cab 3374fi
81ecdfbb 3375rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab
AC
3376ac_cv_c_compiler_gnu=$ac_compiler_gnu
3377
3378fi
81ecdfbb
RW
3379{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3380$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3381if test $ac_compiler_gnu = yes; then
3382 GCC=yes
3383else
3384 GCC=
3385fi
bec39cab
AC
3386ac_test_CFLAGS=${CFLAGS+set}
3387ac_save_CFLAGS=$CFLAGS
81ecdfbb
RW
3388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3389$as_echo_n "checking whether $CC accepts -g... " >&6; }
3390if test "${ac_cv_prog_cc_g+set}" = set; then :
3391 $as_echo_n "(cached) " >&6
bec39cab 3392else
81ecdfbb
RW
3393 ac_save_c_werror_flag=$ac_c_werror_flag
3394 ac_c_werror_flag=yes
3395 ac_cv_prog_cc_g=no
3396 CFLAGS="-g"
3397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3398/* end confdefs.h. */
3399
3400int
3401main ()
3402{
3403
3404 ;
3405 return 0;
3406}
3407_ACEOF
81ecdfbb 3408if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
3409 ac_cv_prog_cc_g=yes
3410else
81ecdfbb
RW
3411 CFLAGS=""
3412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3413/* end confdefs.h. */
3414
3415int
3416main ()
3417{
3418
3419 ;
3420 return 0;
3421}
3422_ACEOF
3423if ac_fn_c_try_compile "$LINENO"; then :
3424
3425else
3426 ac_c_werror_flag=$ac_save_c_werror_flag
3427 CFLAGS="-g"
3428 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3429/* end confdefs.h. */
3430
3431int
3432main ()
3433{
c906108c 3434
81ecdfbb
RW
3435 ;
3436 return 0;
3437}
3438_ACEOF
3439if ac_fn_c_try_compile "$LINENO"; then :
3440 ac_cv_prog_cc_g=yes
3441fi
3442rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3443fi
3444rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4e8d927d 3445fi
81ecdfbb
RW
3446rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3447 ac_c_werror_flag=$ac_save_c_werror_flag
bec39cab 3448fi
81ecdfbb
RW
3449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3450$as_echo "$ac_cv_prog_cc_g" >&6; }
c906108c 3451if test "$ac_test_CFLAGS" = set; then
bec39cab 3452 CFLAGS=$ac_save_CFLAGS
c906108c
SS
3453elif test $ac_cv_prog_cc_g = yes; then
3454 if test "$GCC" = yes; then
3455 CFLAGS="-g -O2"
3456 else
3457 CFLAGS="-g"
3458 fi
3459else
3460 if test "$GCC" = yes; then
3461 CFLAGS="-O2"
3462 else
3463 CFLAGS=
3464 fi
3465fi
81ecdfbb
RW
3466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3467$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3468if test "${ac_cv_prog_cc_c89+set}" = set; then :
3469 $as_echo_n "(cached) " >&6
bec39cab 3470else
81ecdfbb 3471 ac_cv_prog_cc_c89=no
bec39cab 3472ac_save_CC=$CC
81ecdfbb 3473cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3474/* end confdefs.h. */
c906108c
SS
3475#include <stdarg.h>
3476#include <stdio.h>
3477#include <sys/types.h>
3478#include <sys/stat.h>
3479/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3480struct buf { int x; };
3481FILE * (*rcsopen) (struct buf *, struct stat *, int);
3482static char *e (p, i)
3483 char **p;
3484 int i;
3485{
3486 return p[i];
3487}
3488static char *f (char * (*g) (char **, int), char **p, ...)
3489{
3490 char *s;
3491 va_list v;
3492 va_start (v,p);
3493 s = g (p, va_arg (v,int));
3494 va_end (v);
3495 return s;
3496}
bec39cab
AC
3497
3498/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3499 function prototypes and stuff, but not '\xHH' hex character constants.
3500 These don't provoke an error unfortunately, instead are silently treated
81ecdfbb 3501 as 'x'. The following induces an error, until -std is added to get
bec39cab
AC
3502 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3503 array size at least. It's necessary to write '\x00'==0 to get something
81ecdfbb 3504 that's true only with -std. */
bec39cab
AC
3505int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3506
81ecdfbb
RW
3507/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3508 inside strings and character constants. */
3509#define FOO(x) 'x'
3510int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3511
c906108c
SS
3512int test (int i, double x);
3513struct s1 {int (*f) (int a);};
3514struct s2 {int (*f) (double a);};
3515int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3516int argc;
3517char **argv;
bec39cab
AC
3518int
3519main ()
3520{
c906108c 3521return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
bec39cab
AC
3522 ;
3523 return 0;
3524}
3525_ACEOF
81ecdfbb
RW
3526for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3527 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
bec39cab
AC
3528do
3529 CC="$ac_save_CC $ac_arg"
81ecdfbb
RW
3530 if ac_fn_c_try_compile "$LINENO"; then :
3531 ac_cv_prog_cc_c89=$ac_arg
c906108c 3532fi
81ecdfbb
RW
3533rm -f core conftest.err conftest.$ac_objext
3534 test "x$ac_cv_prog_cc_c89" != "xno" && break
c906108c 3535done
81ecdfbb 3536rm -f conftest.$ac_ext
bec39cab 3537CC=$ac_save_CC
c906108c
SS
3538
3539fi
81ecdfbb
RW
3540# AC_CACHE_VAL
3541case "x$ac_cv_prog_cc_c89" in
3542 x)
3543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3544$as_echo "none needed" >&6; } ;;
3545 xno)
3546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3547$as_echo "unsupported" >&6; } ;;
bec39cab 3548 *)
81ecdfbb
RW
3549 CC="$CC $ac_cv_prog_cc_c89"
3550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3551$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
c906108c 3552esac
81ecdfbb 3553if test "x$ac_cv_prog_cc_c89" != xno; then :
c906108c 3554
b4e70030
JB
3555fi
3556
bec39cab
AC
3557ac_ext=c
3558ac_cpp='$CPP $CPPFLAGS'
3559ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3560ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3561ac_compiler_gnu=$ac_cv_c_compiler_gnu
c906108c 3562
3bc3d82a
PA
3563ac_ext=cpp
3564ac_cpp='$CXXCPP $CPPFLAGS'
3565ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3566ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3567ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3568if test -z "$CXX"; then
3569 if test -n "$CCC"; then
3570 CXX=$CCC
3571 else
3572 if test -n "$ac_tool_prefix"; then
3573 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3574 do
3575 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3576set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3578$as_echo_n "checking for $ac_word... " >&6; }
3579if test "${ac_cv_prog_CXX+set}" = set; then :
3580 $as_echo_n "(cached) " >&6
3581else
3582 if test -n "$CXX"; then
3583 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3584else
3585as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3586for as_dir in $PATH
3587do
3588 IFS=$as_save_IFS
3589 test -z "$as_dir" && as_dir=.
3590 for ac_exec_ext in '' $ac_executable_extensions; do
3591 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3592 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3593 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3594 break 2
3595 fi
3596done
3597 done
3598IFS=$as_save_IFS
3599
3600fi
3601fi
3602CXX=$ac_cv_prog_CXX
3603if test -n "$CXX"; then
3604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
3605$as_echo "$CXX" >&6; }
3606else
3607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3608$as_echo "no" >&6; }
3609fi
3610
3611
3612 test -n "$CXX" && break
3613 done
3614fi
3615if test -z "$CXX"; then
3616 ac_ct_CXX=$CXX
3617 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3618do
3619 # Extract the first word of "$ac_prog", so it can be a program name with args.
3620set dummy $ac_prog; ac_word=$2
3621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3622$as_echo_n "checking for $ac_word... " >&6; }
3623if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
3624 $as_echo_n "(cached) " >&6
3625else
3626 if test -n "$ac_ct_CXX"; then
3627 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3628else
3629as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3630for as_dir in $PATH
3631do
3632 IFS=$as_save_IFS
3633 test -z "$as_dir" && as_dir=.
3634 for ac_exec_ext in '' $ac_executable_extensions; do
3635 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3636 ac_cv_prog_ac_ct_CXX="$ac_prog"
3637 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3638 break 2
3639 fi
3640done
3641 done
3642IFS=$as_save_IFS
3643
3644fi
3645fi
3646ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3647if test -n "$ac_ct_CXX"; then
3648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
3649$as_echo "$ac_ct_CXX" >&6; }
3650else
3651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3652$as_echo "no" >&6; }
3653fi
3654
3655
3656 test -n "$ac_ct_CXX" && break
3657done
3658
3659 if test "x$ac_ct_CXX" = x; then
3660 CXX="g++"
3661 else
3662 case $cross_compiling:$ac_tool_warned in
3663yes:)
3664{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3665$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3666ac_tool_warned=yes ;;
3667esac
3668 CXX=$ac_ct_CXX
3669 fi
3670fi
3671
3672 fi
3673fi
3674# Provide some information about the compiler.
3675$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
3676set X $ac_compile
3677ac_compiler=$2
3678for ac_option in --version -v -V -qversion; do
3679 { { ac_try="$ac_compiler $ac_option >&5"
3680case "(($ac_try" in
3681 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3682 *) ac_try_echo=$ac_try;;
3683esac
3684eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3685$as_echo "$ac_try_echo"; } >&5
3686 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3687 ac_status=$?
3688 if test -s conftest.err; then
3689 sed '10a\
3690... rest of stderr output deleted ...
3691 10q' conftest.err >conftest.er1
3692 cat conftest.er1 >&5
3693 rm -f conftest.er1 conftest.err
3694 fi
3695 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3696 test $ac_status = 0; }
3697done
3698
3699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
3700$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
3701if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
3702 $as_echo_n "(cached) " >&6
3703else
3704 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3705/* end confdefs.h. */
3706
3707int
3708main ()
3709{
3710#ifndef __GNUC__
3711 choke me
3712#endif
3713
3714 ;
3715 return 0;
3716}
3717_ACEOF
3718if ac_fn_cxx_try_compile "$LINENO"; then :
3719 ac_compiler_gnu=yes
3720else
3721 ac_compiler_gnu=no
3722fi
3723rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3724ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3725
3726fi
3727{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
3728$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
3729if test $ac_compiler_gnu = yes; then
3730 GXX=yes
3731else
3732 GXX=
3733fi
3734ac_test_CXXFLAGS=${CXXFLAGS+set}
3735ac_save_CXXFLAGS=$CXXFLAGS
3736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
3737$as_echo_n "checking whether $CXX accepts -g... " >&6; }
3738if test "${ac_cv_prog_cxx_g+set}" = set; then :
3739 $as_echo_n "(cached) " >&6
3740else
3741 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
3742 ac_cxx_werror_flag=yes
3743 ac_cv_prog_cxx_g=no
3744 CXXFLAGS="-g"
3745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3746/* end confdefs.h. */
3747
3748int
3749main ()
3750{
3751
3752 ;
3753 return 0;
3754}
3755_ACEOF
3756if ac_fn_cxx_try_compile "$LINENO"; then :
3757 ac_cv_prog_cxx_g=yes
3758else
3759 CXXFLAGS=""
3760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3761/* end confdefs.h. */
3762
3763int
3764main ()
3765{
3766
3767 ;
3768 return 0;
3769}
3770_ACEOF
3771if ac_fn_cxx_try_compile "$LINENO"; then :
3772
3773else
3774 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3775 CXXFLAGS="-g"
3776 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3777/* end confdefs.h. */
3778
3779int
3780main ()
3781{
3782
3783 ;
3784 return 0;
3785}
3786_ACEOF
3787if ac_fn_cxx_try_compile "$LINENO"; then :
3788 ac_cv_prog_cxx_g=yes
3789fi
3790rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3791fi
3792rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3793fi
3794rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3795 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3796fi
3797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
3798$as_echo "$ac_cv_prog_cxx_g" >&6; }
3799if test "$ac_test_CXXFLAGS" = set; then
3800 CXXFLAGS=$ac_save_CXXFLAGS
3801elif test $ac_cv_prog_cxx_g = yes; then
3802 if test "$GXX" = yes; then
3803 CXXFLAGS="-g -O2"
3804 else
3805 CXXFLAGS="-g"
3806 fi
3807else
3808 if test "$GXX" = yes; then
3809 CXXFLAGS="-O2"
3810 else
3811 CXXFLAGS=
3812 fi
3813fi
3814ac_ext=c
3815ac_cpp='$CPP $CPPFLAGS'
3816ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3817ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3818ac_compiler_gnu=$ac_cv_c_compiler_gnu
3819
3820
60ca704f 3821
bec39cab
AC
3822ac_ext=c
3823ac_cpp='$CPP $CPPFLAGS'
3824ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3825ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3826ac_compiler_gnu=$ac_cv_c_compiler_gnu
81ecdfbb
RW
3827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3828$as_echo_n "checking how to run the C preprocessor... " >&6; }
bec39cab
AC
3829# On Suns, sometimes $CPP names a directory.
3830if test -n "$CPP" && test -d "$CPP"; then
3831 CPP=
8bb2c122 3832fi
bec39cab 3833if test -z "$CPP"; then
81ecdfbb
RW
3834 if test "${ac_cv_prog_CPP+set}" = set; then :
3835 $as_echo_n "(cached) " >&6
bec39cab
AC
3836else
3837 # Double quotes because CPP needs to be expanded
3838 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3839 do
3840 ac_preproc_ok=false
3841for ac_c_preproc_warn_flag in '' yes
3842do
3843 # Use a header file that comes with gcc, so configuring glibc
3844 # with a fresh cross-compiler works.
3845 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3846 # <limits.h> exists even on freestanding compilers.
3847 # On the NeXT, cc -E runs the code through the compiler's parser,
3848 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3849 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3850/* end confdefs.h. */
3851#ifdef __STDC__
3852# include <limits.h>
3853#else
3854# include <assert.h>
3855#endif
3856 Syntax error
3857_ACEOF
81ecdfbb 3858if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3859
81ecdfbb 3860else
bec39cab
AC
3861 # Broken: fails on valid input.
3862continue
3863fi
3864rm -f conftest.err conftest.$ac_ext
3865
81ecdfbb 3866 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3867 # can be detected and how.
81ecdfbb 3868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3869/* end confdefs.h. */
3870#include <ac_nonexistent.h>
3871_ACEOF
81ecdfbb 3872if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3873 # Broken: success on invalid input.
3874continue
8bb2c122 3875else
bec39cab
AC
3876 # Passes both tests.
3877ac_preproc_ok=:
3878break
8bb2c122 3879fi
bec39cab 3880rm -f conftest.err conftest.$ac_ext
8bb2c122 3881
bec39cab
AC
3882done
3883# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3884rm -f conftest.err conftest.$ac_ext
81ecdfbb 3885if $ac_preproc_ok; then :
bec39cab
AC
3886 break
3887fi
8bb2c122 3888
bec39cab
AC
3889 done
3890 ac_cv_prog_CPP=$CPP
ddc9cd0f 3891
c906108c 3892fi
bec39cab
AC
3893 CPP=$ac_cv_prog_CPP
3894else
3895 ac_cv_prog_CPP=$CPP
c906108c 3896fi
81ecdfbb
RW
3897{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3898$as_echo "$CPP" >&6; }
bec39cab
AC
3899ac_preproc_ok=false
3900for ac_c_preproc_warn_flag in '' yes
3901do
3902 # Use a header file that comes with gcc, so configuring glibc
3903 # with a fresh cross-compiler works.
3904 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3905 # <limits.h> exists even on freestanding compilers.
3906 # On the NeXT, cc -E runs the code through the compiler's parser,
3907 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3908 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3909/* end confdefs.h. */
3910#ifdef __STDC__
3911# include <limits.h>
3912#else
3913# include <assert.h>
3914#endif
3915 Syntax error
3916_ACEOF
81ecdfbb 3917if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3918
81ecdfbb 3919else
bec39cab
AC
3920 # Broken: fails on valid input.
3921continue
3922fi
3923rm -f conftest.err conftest.$ac_ext
3924
81ecdfbb 3925 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3926 # can be detected and how.
81ecdfbb 3927 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3928/* end confdefs.h. */
3929#include <ac_nonexistent.h>
3930_ACEOF
81ecdfbb 3931if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3932 # Broken: success on invalid input.
3933continue
c906108c 3934else
bec39cab
AC
3935 # Passes both tests.
3936ac_preproc_ok=:
3937break
c906108c 3938fi
bec39cab 3939rm -f conftest.err conftest.$ac_ext
c906108c 3940
bec39cab
AC
3941done
3942# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3943rm -f conftest.err conftest.$ac_ext
81ecdfbb
RW
3944if $ac_preproc_ok; then :
3945
c906108c 3946else
81ecdfbb
RW
3947 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3948$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3949as_fn_error "C preprocessor \"$CPP\" fails sanity check
3950See \`config.log' for more details." "$LINENO" 5; }
c906108c 3951fi
c906108c 3952
bec39cab
AC
3953ac_ext=c
3954ac_cpp='$CPP $CPPFLAGS'
3955ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3956ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3957ac_compiler_gnu=$ac_cv_c_compiler_gnu
3958
3959
81ecdfbb
RW
3960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3961$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3962if test "${ac_cv_path_GREP+set}" = set; then :
3963 $as_echo_n "(cached) " >&6
4e8d927d 3964else
81ecdfbb
RW
3965 if test -z "$GREP"; then
3966 ac_path_GREP_found=false
3967 # Loop through the user's path and test for each of PROGNAME-LIST
3968 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3969for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3970do
3971 IFS=$as_save_IFS
3972 test -z "$as_dir" && as_dir=.
3973 for ac_prog in grep ggrep; do
3974 for ac_exec_ext in '' $ac_executable_extensions; do
3975 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3976 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3977# Check for GNU ac_path_GREP and select it if it is found.
3978 # Check for GNU $ac_path_GREP
3979case `"$ac_path_GREP" --version 2>&1` in
3980*GNU*)
3981 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3982*)
3983 ac_count=0
3984 $as_echo_n 0123456789 >"conftest.in"
3985 while :
3986 do
3987 cat "conftest.in" "conftest.in" >"conftest.tmp"
3988 mv "conftest.tmp" "conftest.in"
3989 cp "conftest.in" "conftest.nl"
3990 $as_echo 'GREP' >> "conftest.nl"
3991 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3992 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3993 as_fn_arith $ac_count + 1 && ac_count=$as_val
3994 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3995 # Best one so far, save it but keep looking for a better one
3996 ac_cv_path_GREP="$ac_path_GREP"
3997 ac_path_GREP_max=$ac_count
bec39cab 3998 fi
81ecdfbb
RW
3999 # 10*(2^10) chars as input seems more than enough
4000 test $ac_count -gt 10 && break
4001 done
4002 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4003esac
bec39cab 4004
81ecdfbb
RW
4005 $ac_path_GREP_found && break 3
4006 done
4007 done
4008 done
4009IFS=$as_save_IFS
4010 if test -z "$ac_cv_path_GREP"; then
4011 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4012 fi
c906108c 4013else
81ecdfbb 4014 ac_cv_path_GREP=$GREP
c906108c 4015fi
c906108c 4016
81ecdfbb
RW
4017fi
4018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4019$as_echo "$ac_cv_path_GREP" >&6; }
4020 GREP="$ac_cv_path_GREP"
c906108c 4021
c906108c 4022
81ecdfbb
RW
4023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4024$as_echo_n "checking for egrep... " >&6; }
4025if test "${ac_cv_path_EGREP+set}" = set; then :
4026 $as_echo_n "(cached) " >&6
783e057b 4027else
81ecdfbb
RW
4028 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4029 then ac_cv_path_EGREP="$GREP -E"
4030 else
4031 if test -z "$EGREP"; then
4032 ac_path_EGREP_found=false
4033 # Loop through the user's path and test for each of PROGNAME-LIST
4034 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4035for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
783e057b
DJ
4036do
4037 IFS=$as_save_IFS
4038 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
4039 for ac_prog in egrep; do
4040 for ac_exec_ext in '' $ac_executable_extensions; do
4041 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4042 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4043# Check for GNU ac_path_EGREP and select it if it is found.
4044 # Check for GNU $ac_path_EGREP
4045case `"$ac_path_EGREP" --version 2>&1` in
4046*GNU*)
4047 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4048*)
4049 ac_count=0
4050 $as_echo_n 0123456789 >"conftest.in"
4051 while :
4052 do
4053 cat "conftest.in" "conftest.in" >"conftest.tmp"
4054 mv "conftest.tmp" "conftest.in"
4055 cp "conftest.in" "conftest.nl"
4056 $as_echo 'EGREP' >> "conftest.nl"
4057 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4058 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4059 as_fn_arith $ac_count + 1 && ac_count=$as_val
4060 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4061 # Best one so far, save it but keep looking for a better one
4062 ac_cv_path_EGREP="$ac_path_EGREP"
4063 ac_path_EGREP_max=$ac_count
4064 fi
4065 # 10*(2^10) chars as input seems more than enough
4066 test $ac_count -gt 10 && break
4067 done
4068 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4069esac
bec39cab 4070
81ecdfbb
RW
4071 $ac_path_EGREP_found && break 3
4072 done
4073 done
4074 done
4075IFS=$as_save_IFS
4076 if test -z "$ac_cv_path_EGREP"; then
4077 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
783e057b 4078 fi
783e057b 4079else
81ecdfbb 4080 ac_cv_path_EGREP=$EGREP
783e057b
DJ
4081fi
4082
81ecdfbb 4083 fi
783e057b 4084fi
81ecdfbb
RW
4085{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4086$as_echo "$ac_cv_path_EGREP" >&6; }
4087 EGREP="$ac_cv_path_EGREP"
4088
783e057b 4089
81ecdfbb
RW
4090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4091$as_echo_n "checking for ANSI C header files... " >&6; }
4092if test "${ac_cv_header_stdc+set}" = set; then :
4093 $as_echo_n "(cached) " >&6
783e057b 4094else
81ecdfbb 4095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 4096/* end confdefs.h. */
783e057b 4097#include <stdlib.h>
bec39cab 4098#include <stdarg.h>
783e057b
DJ
4099#include <string.h>
4100#include <float.h>
c906108c 4101
bec39cab
AC
4102int
4103main ()
4104{
c906108c 4105
bec39cab
AC
4106 ;
4107 return 0;
4108}
4109_ACEOF
81ecdfbb 4110if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4111 ac_cv_header_stdc=yes
c906108c 4112else
81ecdfbb 4113 ac_cv_header_stdc=no
c906108c 4114fi
81ecdfbb 4115rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 4116
783e057b
DJ
4117if test $ac_cv_header_stdc = yes; then
4118 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
81ecdfbb 4119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4120/* end confdefs.h. */
4121#include <string.h>
c906108c 4122
783e057b
DJ
4123_ACEOF
4124if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4125 $EGREP "memchr" >/dev/null 2>&1; then :
4126
c906108c 4127else
783e057b 4128 ac_cv_header_stdc=no
c906108c 4129fi
783e057b 4130rm -f conftest*
c906108c
SS
4131
4132fi
4133
783e057b
DJ
4134if test $ac_cv_header_stdc = yes; then
4135 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
81ecdfbb 4136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4137/* end confdefs.h. */
4138#include <stdlib.h>
bec39cab 4139
783e057b
DJ
4140_ACEOF
4141if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4142 $EGREP "free" >/dev/null 2>&1; then :
4143
bec39cab 4144else
783e057b 4145 ac_cv_header_stdc=no
bec39cab 4146fi
783e057b 4147rm -f conftest*
bec39cab
AC
4148
4149fi
bec39cab 4150
783e057b
DJ
4151if test $ac_cv_header_stdc = yes; then
4152 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
81ecdfbb 4153 if test "$cross_compiling" = yes; then :
783e057b 4154 :
bec39cab 4155else
81ecdfbb 4156 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4157/* end confdefs.h. */
4158#include <ctype.h>
81ecdfbb 4159#include <stdlib.h>
783e057b
DJ
4160#if ((' ' & 0x0FF) == 0x020)
4161# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4162# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4163#else
4164# define ISLOWER(c) \
4165 (('a' <= (c) && (c) <= 'i') \
4166 || ('j' <= (c) && (c) <= 'r') \
4167 || ('s' <= (c) && (c) <= 'z'))
4168# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4169#endif
4170
4171#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4172int
4173main ()
4174{
4175 int i;
4176 for (i = 0; i < 256; i++)
4177 if (XOR (islower (i), ISLOWER (i))
4178 || toupper (i) != TOUPPER (i))
81ecdfbb
RW
4179 return 2;
4180 return 0;
783e057b
DJ
4181}
4182_ACEOF
81ecdfbb 4183if ac_fn_c_try_run "$LINENO"; then :
783e057b 4184
81ecdfbb
RW
4185else
4186 ac_cv_header_stdc=no
783e057b 4187fi
81ecdfbb
RW
4188rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4189 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 4190fi
81ecdfbb 4191
783e057b
DJ
4192fi
4193fi
81ecdfbb
RW
4194{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4195$as_echo "$ac_cv_header_stdc" >&6; }
783e057b
DJ
4196if test $ac_cv_header_stdc = yes; then
4197
81ecdfbb 4198$as_echo "#define STDC_HEADERS 1" >>confdefs.h
783e057b
DJ
4199
4200fi
4201
4202# On IRIX 5.3, sys/types and inttypes.h are conflicting.
783e057b
DJ
4203for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4204 inttypes.h stdint.h unistd.h
81ecdfbb
RW
4205do :
4206 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4207ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4208"
4209eval as_val=\$$as_ac_Header
4210 if test "x$as_val" = x""yes; then :
783e057b 4211 cat >>confdefs.h <<_ACEOF
81ecdfbb 4212#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
783e057b
DJ
4213_ACEOF
4214
4215fi
4216
4217done
4218
4219
4220
81ecdfbb
RW
4221 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4222if test "x$ac_cv_header_minix_config_h" = x""yes; then :
783e057b
DJ
4223 MINIX=yes
4224else
4225 MINIX=
4226fi
4227
4228
4229 if test "$MINIX" = yes; then
4230
81ecdfbb 4231$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
783e057b
DJ
4232
4233
81ecdfbb 4234$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
783e057b
DJ
4235
4236
81ecdfbb 4237$as_echo "#define _MINIX 1" >>confdefs.h
783e057b
DJ
4238
4239 fi
4240
4241
81ecdfbb
RW
4242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4243$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4244if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
4245 $as_echo_n "(cached) " >&6
783e057b 4246else
81ecdfbb 4247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4248/* end confdefs.h. */
4249
c971b7fa
PA
4250# define __EXTENSIONS__ 1
4251 $ac_includes_default
783e057b
DJ
4252int
4253main ()
4254{
4255
4256 ;
4257 return 0;
4258}
4259_ACEOF
81ecdfbb 4260if ac_fn_c_try_compile "$LINENO"; then :
783e057b
DJ
4261 ac_cv_safe_to_define___extensions__=yes
4262else
81ecdfbb 4263 ac_cv_safe_to_define___extensions__=no
783e057b 4264fi
81ecdfbb 4265rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b 4266fi
81ecdfbb
RW
4267{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4268$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
783e057b 4269 test $ac_cv_safe_to_define___extensions__ = yes &&
81ecdfbb 4270 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
783e057b 4271
81ecdfbb 4272 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
783e057b 4273
81ecdfbb 4274 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
783e057b 4275
81ecdfbb 4276 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
783e057b 4277
81ecdfbb 4278 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
783e057b
DJ
4279
4280
c971b7fa
PA
4281ac_aux_dir=
4282for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4283 for ac_t in install-sh install.sh shtool; do
4284 if test -f "$ac_dir/$ac_t"; then
4285 ac_aux_dir=$ac_dir
4286 ac_install_sh="$ac_aux_dir/$ac_t -c"
4287 break 2
4288 fi
4289 done
4290done
4291if test -z "$ac_aux_dir"; then
4292 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
4293fi
770d76d7 4294
c971b7fa
PA
4295# These three variables are undocumented and unsupported,
4296# and are intended to be withdrawn in a future Autoconf release.
4297# They can cause serious problems if a builder's source tree is in a directory
4298# whose full name contains unusual characters.
4299ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4300ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4301ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
770d76d7 4302
770d76d7 4303
c971b7fa
PA
4304# Make sure we can run config.sub.
4305$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
4306 as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
770d76d7 4307
c971b7fa
PA
4308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4309$as_echo_n "checking build system type... " >&6; }
4310if test "${ac_cv_build+set}" = set; then :
4311 $as_echo_n "(cached) " >&6
770d76d7 4312else
c971b7fa
PA
4313 ac_build_alias=$build_alias
4314test "x$ac_build_alias" = x &&
4315 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4316test "x$ac_build_alias" = x &&
4317 as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
4318ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
4319 as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
4320
770d76d7 4321fi
c971b7fa
PA
4322{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4323$as_echo "$ac_cv_build" >&6; }
4324case $ac_cv_build in
4325*-*-*) ;;
4326*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
770d76d7 4327esac
c971b7fa
PA
4328build=$ac_cv_build
4329ac_save_IFS=$IFS; IFS='-'
4330set x $ac_cv_build
4331shift
4332build_cpu=$1
4333build_vendor=$2
4334shift; shift
4335# Remember, the first character of IFS is used to create $*,
4336# except with old shells:
4337build_os=$*
4338IFS=$ac_save_IFS
4339case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
770d76d7
PA
4340
4341
c971b7fa
PA
4342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4343$as_echo_n "checking host system type... " >&6; }
4344if test "${ac_cv_host+set}" = set; then :
81ecdfbb
RW
4345 $as_echo_n "(cached) " >&6
4346else
c971b7fa
PA
4347 if test "x$host_alias" = x; then
4348 ac_cv_host=$ac_cv_build
81ecdfbb 4349else
c971b7fa
PA
4350 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
4351 as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
81ecdfbb 4352fi
81ecdfbb
RW
4353
4354fi
c971b7fa
PA
4355{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4356$as_echo "$ac_cv_host" >&6; }
4357case $ac_cv_host in
4358*-*-*) ;;
4359*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
81ecdfbb 4360esac
c971b7fa
PA
4361host=$ac_cv_host
4362ac_save_IFS=$IFS; IFS='-'
4363set x $ac_cv_host
4364shift
4365host_cpu=$1
4366host_vendor=$2
4367shift; shift
4368# Remember, the first character of IFS is used to create $*,
4369# except with old shells:
4370host_os=$*
4371IFS=$ac_save_IFS
4372case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3388710e
JM
4373
4374
4375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4376$as_echo_n "checking target system type... " >&6; }
4377if test "${ac_cv_target+set}" = set; then :
4378 $as_echo_n "(cached) " >&6
4379else
4380 if test "x$target_alias" = x; then
4381 ac_cv_target=$ac_cv_host
4382else
4383 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
4384 as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
4385fi
4386
4387fi
4388{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4389$as_echo "$ac_cv_target" >&6; }
4390case $ac_cv_target in
4391*-*-*) ;;
4392*) as_fn_error "invalid value of canonical target" "$LINENO" 5;;
4393esac
4394target=$ac_cv_target
4395ac_save_IFS=$IFS; IFS='-'
4396set x $ac_cv_target
4397shift
4398target_cpu=$1
4399target_vendor=$2
4400shift; shift
4401# Remember, the first character of IFS is used to create $*,
4402# except with old shells:
4403target_os=$*
4404IFS=$ac_save_IFS
4405case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4406
4407
4408# The aliases save the names the user supplied, while $host etc.
4409# will get canonicalized.
4410test -n "$target_alias" &&
4411 test "$program_prefix$program_suffix$program_transform_name" = \
4412 NONENONEs,x,x, &&
4413 program_prefix=${target_alias}-
4414
4415# The tests for host and target for $enable_largefile require
4416# canonical names.
4417
4418
81ecdfbb 4419
da2f07f1
JK
4420# As the $enable_largefile decision depends on --enable-plugins we must set it
4421# even in directories otherwise not depending on the $plugins option.
4422
4423
2974be62
AM
4424 maybe_plugins=no
4425 for ac_header in dlfcn.h
4426do :
4427 ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
4428"
4429if test "x$ac_cv_header_dlfcn_h" = x""yes; then :
4430 cat >>confdefs.h <<_ACEOF
4431#define HAVE_DLFCN_H 1
4432_ACEOF
4433 maybe_plugins=yes
4434fi
4435
4436done
4437
4438 for ac_header in windows.h
4439do :
4440 ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
4441"
4442if test "x$ac_cv_header_windows_h" = x""yes; then :
4443 cat >>confdefs.h <<_ACEOF
4444#define HAVE_WINDOWS_H 1
4445_ACEOF
4446 maybe_plugins=yes
4447fi
4448
4449done
4450
4451
4452 # Check whether --enable-plugins was given.
da2f07f1
JK
4453if test "${enable_plugins+set}" = set; then :
4454 enableval=$enable_plugins; case "${enableval}" in
2974be62
AM
4455 no) plugins=no ;;
4456 *) plugins=yes
4457 if test "$maybe_plugins" != "yes" ; then
4458 as_fn_error "Building with plugin support requires a host that supports dlopen." "$LINENO" 5
4459 fi ;;
4460 esac
da2f07f1 4461else
2974be62
AM
4462 plugins=$maybe_plugins
4463
da2f07f1
JK
4464fi
4465
2974be62
AM
4466 if test "$plugins" = "yes"; then
4467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
4468$as_echo_n "checking for library containing dlopen... " >&6; }
4469if test "${ac_cv_search_dlopen+set}" = set; then :
4470 $as_echo_n "(cached) " >&6
4471else
4472 ac_func_search_save_LIBS=$LIBS
4473cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4474/* end confdefs.h. */
4475
4476/* Override any GCC internal prototype to avoid an error.
4477 Use char because int might match the return type of a GCC
4478 builtin and then its argument prototype would still apply. */
4479#ifdef __cplusplus
4480extern "C"
4481#endif
4482char dlopen ();
4483int
4484main ()
4485{
4486return dlopen ();
4487 ;
4488 return 0;
4489}
4490_ACEOF
4491for ac_lib in '' dl; do
4492 if test -z "$ac_lib"; then
4493 ac_res="none required"
4494 else
4495 ac_res=-l$ac_lib
4496 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4497 fi
4498 if ac_fn_c_try_link "$LINENO"; then :
4499 ac_cv_search_dlopen=$ac_res
4500fi
4501rm -f core conftest.err conftest.$ac_objext \
4502 conftest$ac_exeext
4503 if test "${ac_cv_search_dlopen+set}" = set; then :
4504 break
4505fi
4506done
4507if test "${ac_cv_search_dlopen+set}" = set; then :
4508
4509else
4510 ac_cv_search_dlopen=no
4511fi
4512rm conftest.$ac_ext
4513LIBS=$ac_func_search_save_LIBS
4514fi
4515{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
4516$as_echo "$ac_cv_search_dlopen" >&6; }
4517ac_res=$ac_cv_search_dlopen
4518if test "$ac_res" != no; then :
4519 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4520
4521fi
4522
4523 fi
da2f07f1
JK
4524
4525
4526case "${host}" in
4527 sparc-*-solaris*|i[3-7]86-*-solaris*)
4528 # On native 32bit sparc and ia32 solaris, large-file and procfs support
4529 # are mutually exclusive; and without procfs support, the bfd/ elf module
4530 # cannot provide certain routines such as elfcore_write_prpsinfo
4531 # or elfcore_write_prstatus. So unless the user explicitly requested
4532 # large-file support through the --enable-largefile switch, disable
4533 # large-file support in favor of procfs support.
4534 test "${target}" = "${host}" -a "x$plugins" = xno \
4535 && : ${enable_largefile="no"}
4536 ;;
4537esac
4538
4539# Check whether --enable-largefile was given.
4540if test "${enable_largefile+set}" = set; then :
4541 enableval=$enable_largefile;
4542fi
4543
4544if test "$enable_largefile" != no; then
4545
4546 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4547$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
4548if test "${ac_cv_sys_largefile_CC+set}" = set; then :
4549 $as_echo_n "(cached) " >&6
4550else
4551 ac_cv_sys_largefile_CC=no
4552 if test "$GCC" != yes; then
4553 ac_save_CC=$CC
4554 while :; do
4555 # IRIX 6.2 and later do not support large files by default,
4556 # so use the C compiler's -n32 option if that helps.
4557 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4558/* end confdefs.h. */
4559#include <sys/types.h>
4560 /* Check that off_t can represent 2**63 - 1 correctly.
4561 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4562 since some C++ compilers masquerading as C compilers
4563 incorrectly reject 9223372036854775807. */
4564#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4565 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4566 && LARGE_OFF_T % 2147483647 == 1)
4567 ? 1 : -1];
4568int
4569main ()
4570{
4571
4572 ;
4573 return 0;
4574}
4575_ACEOF
4576 if ac_fn_c_try_compile "$LINENO"; then :
4577 break
4578fi
4579rm -f core conftest.err conftest.$ac_objext
4580 CC="$CC -n32"
4581 if ac_fn_c_try_compile "$LINENO"; then :
4582 ac_cv_sys_largefile_CC=' -n32'; break
4583fi
4584rm -f core conftest.err conftest.$ac_objext
4585 break
4586 done
4587 CC=$ac_save_CC
4588 rm -f conftest.$ac_ext
4589 fi
4590fi
4591{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4592$as_echo "$ac_cv_sys_largefile_CC" >&6; }
4593 if test "$ac_cv_sys_largefile_CC" != no; then
4594 CC=$CC$ac_cv_sys_largefile_CC
4595 fi
4596
4597 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4598$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
4599if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
4600 $as_echo_n "(cached) " >&6
4601else
4602 while :; do
4603 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4604/* end confdefs.h. */
4605#include <sys/types.h>
4606 /* Check that off_t can represent 2**63 - 1 correctly.
4607 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4608 since some C++ compilers masquerading as C compilers
4609 incorrectly reject 9223372036854775807. */
4610#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4611 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4612 && LARGE_OFF_T % 2147483647 == 1)
4613 ? 1 : -1];
4614int
4615main ()
4616{
4617
4618 ;
4619 return 0;
4620}
4621_ACEOF
4622if ac_fn_c_try_compile "$LINENO"; then :
4623 ac_cv_sys_file_offset_bits=no; break
4624fi
4625rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4626 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4627/* end confdefs.h. */
4628#define _FILE_OFFSET_BITS 64
4629#include <sys/types.h>
4630 /* Check that off_t can represent 2**63 - 1 correctly.
4631 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4632 since some C++ compilers masquerading as C compilers
4633 incorrectly reject 9223372036854775807. */
4634#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4635 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4636 && LARGE_OFF_T % 2147483647 == 1)
4637 ? 1 : -1];
4638int
4639main ()
4640{
4641
4642 ;
4643 return 0;
4644}
4645_ACEOF
4646if ac_fn_c_try_compile "$LINENO"; then :
4647 ac_cv_sys_file_offset_bits=64; break
4648fi
4649rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4650 ac_cv_sys_file_offset_bits=unknown
4651 break
4652done
4653fi
4654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4655$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4656case $ac_cv_sys_file_offset_bits in #(
4657 no | unknown) ;;
4658 *)
4659cat >>confdefs.h <<_ACEOF
4660#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4661_ACEOF
4662;;
4663esac
4664rm -rf conftest*
4665 if test $ac_cv_sys_file_offset_bits = unknown; then
4666 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4667$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
4668if test "${ac_cv_sys_large_files+set}" = set; then :
4669 $as_echo_n "(cached) " >&6
4670else
4671 while :; do
4672 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4673/* end confdefs.h. */
4674#include <sys/types.h>
4675 /* Check that off_t can represent 2**63 - 1 correctly.
4676 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4677 since some C++ compilers masquerading as C compilers
4678 incorrectly reject 9223372036854775807. */
4679#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4680 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4681 && LARGE_OFF_T % 2147483647 == 1)
4682 ? 1 : -1];
4683int
4684main ()
4685{
4686
4687 ;
4688 return 0;
4689}
4690_ACEOF
4691if ac_fn_c_try_compile "$LINENO"; then :
4692 ac_cv_sys_large_files=no; break
4693fi
4694rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4695 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4696/* end confdefs.h. */
4697#define _LARGE_FILES 1
4698#include <sys/types.h>
4699 /* Check that off_t can represent 2**63 - 1 correctly.
4700 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4701 since some C++ compilers masquerading as C compilers
4702 incorrectly reject 9223372036854775807. */
4703#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4704 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4705 && LARGE_OFF_T % 2147483647 == 1)
4706 ? 1 : -1];
4707int
4708main ()
4709{
4710
4711 ;
4712 return 0;
4713}
4714_ACEOF
4715if ac_fn_c_try_compile "$LINENO"; then :
4716 ac_cv_sys_large_files=1; break
4717fi
4718rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4719 ac_cv_sys_large_files=unknown
4720 break
4721done
4722fi
4723{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4724$as_echo "$ac_cv_sys_large_files" >&6; }
4725case $ac_cv_sys_large_files in #(
4726 no | unknown) ;;
4727 *)
4728cat >>confdefs.h <<_ACEOF
4729#define _LARGE_FILES $ac_cv_sys_large_files
4730_ACEOF
4731;;
4732esac
4733rm -rf conftest*
4734 fi
4735fi
4736
4737
4738
81ecdfbb
RW
4739
4740
4741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5
4742$as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; }
4743if test "${am_cv_prog_cc_stdc+set}" = set; then :
4744 $as_echo_n "(cached) " >&6
4745else
4746 am_cv_prog_cc_stdc=no
4747ac_save_CC="$CC"
4748# Don't try gcc -ansi; that turns off useful extensions and
4749# breaks some systems' header files.
4750# AIX -qlanglvl=ansi
4751# Ultrix and OSF/1 -std1
4752# HP-UX 10.20 and later -Ae
4753# HP-UX older versions -Aa -D_HPUX_SOURCE
4754# SVR4 -Xc -D__EXTENSIONS__
4755for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4756do
783e057b 4757 CC="$ac_save_CC $ac_arg"
81ecdfbb 4758 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4759/* end confdefs.h. */
4760#include <stdarg.h>
4761#include <stdio.h>
4762#include <sys/types.h>
4763#include <sys/stat.h>
4764/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4765struct buf { int x; };
4766FILE * (*rcsopen) (struct buf *, struct stat *, int);
4767static char *e (p, i)
4768 char **p;
4769 int i;
4770{
4771 return p[i];
4772}
4773static char *f (char * (*g) (char **, int), char **p, ...)
4774{
4775 char *s;
4776 va_list v;
4777 va_start (v,p);
4778 s = g (p, va_arg (v,int));
4779 va_end (v);
4780 return s;
4781}
4782int test (int i, double x);
4783struct s1 {int (*f) (int a);};
4784struct s2 {int (*f) (double a);};
4785int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4786int argc;
4787char **argv;
4788
4789int
4790main ()
4791{
4792
4793return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4794
4795 ;
4796 return 0;
4797}
4798_ACEOF
81ecdfbb 4799if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4800 am_cv_prog_cc_stdc="$ac_arg"; break
783e057b 4801fi
81ecdfbb 4802rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
4803done
4804CC="$ac_save_CC"
4805
4806fi
4807
4808if test -z "$am_cv_prog_cc_stdc"; then
81ecdfbb
RW
4809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4810$as_echo "none needed" >&6; }
783e057b 4811else
81ecdfbb
RW
4812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5
4813$as_echo "$am_cv_prog_cc_stdc" >&6; }
783e057b
DJ
4814fi
4815case "x$am_cv_prog_cc_stdc" in
4816 x|xno) ;;
4817 *) CC="$CC $am_cv_prog_cc_stdc" ;;
4818esac
4819
4869db5e
RM
4820# expand $ac_aux_dir to an absolute path
4821am_aux_dir=`cd $ac_aux_dir && pwd`
4822
4823if test x"${install_sh}" != xset; then
4824 case $am_aux_dir in
4825 *\ * | *\ *)
4826 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
4827 *)
4828 install_sh="\${SHELL} $am_aux_dir/install-sh"
4829 esac
4830fi
4831
4832# Installed binaries are usually stripped using `strip' when the user
4833# run `make install-strip'. However `strip' might not be the right
4834# tool to use in cross-compilation environments, therefore Automake
4835# will honor the `STRIP' environment variable to overrule this program.
4836if test "$cross_compiling" != no; then
4837 if test -n "$ac_tool_prefix"; then
4838 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4839set dummy ${ac_tool_prefix}strip; ac_word=$2
4840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4841$as_echo_n "checking for $ac_word... " >&6; }
4842if test "${ac_cv_prog_STRIP+set}" = set; then :
4843 $as_echo_n "(cached) " >&6
4844else
4845 if test -n "$STRIP"; then
4846 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4847else
4848as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4849for as_dir in $PATH
4850do
4851 IFS=$as_save_IFS
4852 test -z "$as_dir" && as_dir=.
4853 for ac_exec_ext in '' $ac_executable_extensions; do
4854 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4855 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4856 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4857 break 2
4858 fi
4859done
4860 done
4861IFS=$as_save_IFS
4862
4863fi
4864fi
4865STRIP=$ac_cv_prog_STRIP
4866if test -n "$STRIP"; then
4867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
4868$as_echo "$STRIP" >&6; }
4869else
4870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4871$as_echo "no" >&6; }
4872fi
4873
4874
4875fi
4876if test -z "$ac_cv_prog_STRIP"; then
4877 ac_ct_STRIP=$STRIP
4878 # Extract the first word of "strip", so it can be a program name with args.
4879set dummy strip; ac_word=$2
4880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4881$as_echo_n "checking for $ac_word... " >&6; }
4882if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
4883 $as_echo_n "(cached) " >&6
4884else
4885 if test -n "$ac_ct_STRIP"; then
4886 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
4887else
4888as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4889for as_dir in $PATH
4890do
4891 IFS=$as_save_IFS
4892 test -z "$as_dir" && as_dir=.
4893 for ac_exec_ext in '' $ac_executable_extensions; do
4894 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4895 ac_cv_prog_ac_ct_STRIP="strip"
4896 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4897 break 2
4898 fi
4899done
4900 done
4901IFS=$as_save_IFS
4902
4903fi
4904fi
4905ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
4906if test -n "$ac_ct_STRIP"; then
4907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
4908$as_echo "$ac_ct_STRIP" >&6; }
4909else
4910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4911$as_echo "no" >&6; }
4912fi
4913
4914 if test "x$ac_ct_STRIP" = x; then
4915 STRIP=":"
4916 else
4917 case $cross_compiling:$ac_tool_warned in
4918yes:)
4919{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4920$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4921ac_tool_warned=yes ;;
4922esac
4923 STRIP=$ac_ct_STRIP
4924 fi
4925else
4926 STRIP="$ac_cv_prog_STRIP"
4927fi
4928
4929fi
4930INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
4931
783e057b
DJ
4932
4933ac_aux_dir=
81ecdfbb
RW
4934for ac_dir in .. "$srcdir"/..; do
4935 for ac_t in install-sh install.sh shtool; do
4936 if test -f "$ac_dir/$ac_t"; then
4937 ac_aux_dir=$ac_dir
4938 ac_install_sh="$ac_aux_dir/$ac_t -c"
4939 break 2
4940 fi
4941 done
783e057b
DJ
4942done
4943if test -z "$ac_aux_dir"; then
81ecdfbb 4944 as_fn_error "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
783e057b 4945fi
81ecdfbb
RW
4946
4947# These three variables are undocumented and unsupported,
4948# and are intended to be withdrawn in a future Autoconf release.
4949# They can cause serious problems if a builder's source tree is in a directory
4950# whose full name contains unusual characters.
4951ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4952ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4953ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4954
783e057b 4955
783e057b 4956
9009e1ae
MR
4957test "$program_prefix" != NONE &&
4958 program_transform_name="s&^&$program_prefix&;$program_transform_name"
4959# Use a double $ so make ignores it.
4960test "$program_suffix" != NONE &&
4961 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
4962# Double any \ or $.
4963# By default was `s,x,x', remove it if useless.
4964ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
4965program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
4966
81ecdfbb 4967
0bcda685
PA
4968# We require a C++11 compiler. Check if one is available, and if
4969# necessary, set CXX_DIALECT to some -std=xxx switch.
4970
4971 ax_cxx_compile_cxx11_required=true
4972 ac_ext=cpp
4973ac_cpp='$CXXCPP $CPPFLAGS'
4974ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4975ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4976ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
4977 CXX_DIALECT=""
4978 ac_success=no
4979 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5
4980$as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; }
4981if test "${ax_cv_cxx_compile_cxx11+set}" = set; then :
4982 $as_echo_n "(cached) " >&6
4983else
4984 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4985/* end confdefs.h. */
4986
4987
4988// If the compiler admits that it is not ready for C++11, why torture it?
4989// Hopefully, this will speed up the test.
4990
4991#ifndef __cplusplus
4992
4993#error "This is not a C++ compiler"
4994
4995#elif __cplusplus < 201103L
4996
4997#error "This is not a C++11 compiler"
4998
4999#else
5000
5001namespace cxx11
5002{
5003
5004 namespace test_static_assert
5005 {
5006
5007 template <typename T>
5008 struct check
5009 {
5010 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5011 };
5012
5013 }
5014
5015 namespace test_final_override
5016 {
5017
5018 struct Base
5019 {
5020 virtual void f() {}
5021 };
5022
5023 struct Derived : public Base
5024 {
5025 virtual void f() override {}
5026 };
5027
5028 }
5029
5030 namespace test_double_right_angle_brackets
5031 {
5032
5033 template < typename T >
5034 struct check {};
5035
5036 typedef check<void> single_type;
5037 typedef check<check<void>> double_type;
5038 typedef check<check<check<void>>> triple_type;
5039 typedef check<check<check<check<void>>>> quadruple_type;
5040
5041 }
5042
5043 namespace test_decltype
5044 {
5045
5046 int
5047 f()
5048 {
5049 int a = 1;
5050 decltype(a) b = 2;
5051 return a + b;
5052 }
5053
5054 }
5055
5056 namespace test_type_deduction
5057 {
5058
5059 template < typename T1, typename T2 >
5060 struct is_same
5061 {
5062 static const bool value = false;
5063 };
5064
5065 template < typename T >
5066 struct is_same<T, T>
5067 {
5068 static const bool value = true;
5069 };
5070
5071 template < typename T1, typename T2 >
5072 auto
5073 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5074 {
5075 return a1 + a2;
5076 }
5077
5078 int
5079 test(const int c, volatile int v)
5080 {
5081 static_assert(is_same<int, decltype(0)>::value == true, "");
5082 static_assert(is_same<int, decltype(c)>::value == false, "");
5083 static_assert(is_same<int, decltype(v)>::value == false, "");
5084 auto ac = c;
5085 auto av = v;
5086 auto sumi = ac + av + 'x';
5087 auto sumf = ac + av + 1.0;
5088 static_assert(is_same<int, decltype(ac)>::value == true, "");
5089 static_assert(is_same<int, decltype(av)>::value == true, "");
5090 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5091 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5092 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5093 return (sumf > 0.0) ? sumi : add(c, v);
5094 }
5095
5096 }
5097
5098 namespace test_noexcept
5099 {
5100
5101 int f() { return 0; }
5102 int g() noexcept { return 0; }
5103
5104 static_assert(noexcept(f()) == false, "");
5105 static_assert(noexcept(g()) == true, "");
5106
5107 }
5108
5109 namespace test_constexpr
5110 {
5111
5112 template < typename CharT >
5113 unsigned long constexpr
5114 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5115 {
5116 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5117 }
5118
5119 template < typename CharT >
5120 unsigned long constexpr
5121 strlen_c(const CharT *const s) noexcept
5122 {
5123 return strlen_c_r(s, 0UL);
5124 }
5125
5126 static_assert(strlen_c("") == 0UL, "");
5127 static_assert(strlen_c("1") == 1UL, "");
5128 static_assert(strlen_c("example") == 7UL, "");
5129 static_assert(strlen_c("another\0example") == 7UL, "");
5130
5131 }
5132
5133 namespace test_rvalue_references
5134 {
5135
5136 template < int N >
5137 struct answer
5138 {
5139 static constexpr int value = N;
5140 };
5141
5142 answer<1> f(int&) { return answer<1>(); }
5143 answer<2> f(const int&) { return answer<2>(); }
5144 answer<3> f(int&&) { return answer<3>(); }
5145
5146 void
5147 test()
5148 {
5149 int i = 0;
5150 const int c = 0;
5151 static_assert(decltype(f(i))::value == 1, "");
5152 static_assert(decltype(f(c))::value == 2, "");
5153 static_assert(decltype(f(0))::value == 3, "");
5154 }
5155
5156 }
5157
5158 namespace test_uniform_initialization
5159 {
5160
5161 struct test
5162 {
5163 static const int zero {};
5164 static const int one {1};
5165 };
5166
5167 static_assert(test::zero == 0, "");
5168 static_assert(test::one == 1, "");
5169
5170 }
5171
5172 namespace test_lambdas
5173 {
5174
5175 void
5176 test1()
5177 {
5178 auto lambda1 = [](){};
5179 auto lambda2 = lambda1;
5180 lambda1();
5181 lambda2();
5182 }
5183
5184 int
5185 test2()
5186 {
5187 auto a = [](int i, int j){ return i + j; }(1, 2);
5188 auto b = []() -> int { return '0'; }();
5189 auto c = [=](){ return a + b; }();
5190 auto d = [&](){ return c; }();
5191 auto e = [a, &b](int x) mutable {
5192 const auto identity = [](int y){ return y; };
5193 for (auto i = 0; i < a; ++i)
5194 a += b--;
5195 return x + identity(a + b);
5196 }(0);
5197 return a + b + c + d + e;
5198 }
5199
5200 int
5201 test3()
5202 {
5203 const auto nullary = [](){ return 0; };
5204 const auto unary = [](int x){ return x; };
5205 using nullary_t = decltype(nullary);
5206 using unary_t = decltype(unary);
5207 const auto higher1st = [](nullary_t f){ return f(); };
5208 const auto higher2nd = [unary](nullary_t f1){
5209 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5210 };
5211 return higher1st(nullary) + higher2nd(nullary)(unary);
5212 }
5213
5214 }
5215
5216 namespace test_variadic_templates
5217 {
5218
5219 template <int...>
5220 struct sum;
5221
5222 template <int N0, int... N1toN>
5223 struct sum<N0, N1toN...>
5224 {
5225 static constexpr auto value = N0 + sum<N1toN...>::value;
5226 };
5227
5228 template <>
5229 struct sum<>
5230 {
5231 static constexpr auto value = 0;
5232 };
5233
5234 static_assert(sum<>::value == 0, "");
5235 static_assert(sum<1>::value == 1, "");
5236 static_assert(sum<23>::value == 23, "");
5237 static_assert(sum<1, 2>::value == 3, "");
5238 static_assert(sum<5, 5, 11>::value == 21, "");
5239 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5240
5241 }
5242
5243 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5244 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5245 // because of this.
5246 namespace test_template_alias_sfinae
5247 {
5248
5249 struct foo {};
5250
5251 template<typename T>
5252 using member = typename T::member_type;
5253
5254 template<typename T>
5255 void func(...) {}
5256
5257 template<typename T>
5258 void func(member<T>*) {}
5259
5260 void test();
5261
5262 void test() { func<foo>(0); }
5263
5264 }
5265
5266} // namespace cxx11
5267
5268#endif // __cplusplus >= 201103L
5269
5270
5271
5272_ACEOF
5273if ac_fn_cxx_try_compile "$LINENO"; then :
5274 ax_cv_cxx_compile_cxx11=yes
5275else
5276 ax_cv_cxx_compile_cxx11=no
5277fi
5278rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5279fi
5280{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5
5281$as_echo "$ax_cv_cxx_compile_cxx11" >&6; }
5282 if test x$ax_cv_cxx_compile_cxx11 = xyes; then
5283 ac_success=yes
5284 fi
5285
5286 if test x$ac_success = xno; then
5287 for switch in -std=gnu++11 -std=gnu++0x; do
5288 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
5290$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
5291if { as_var=$cachevar; eval "test \"\${$as_var+set}\" = set"; }; then :
5292 $as_echo_n "(cached) " >&6
5293else
5294 ac_save_CXX="$CXX"
5295 CXX="$CXX $switch"
5296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5297/* end confdefs.h. */
5298
5299
5300// If the compiler admits that it is not ready for C++11, why torture it?
5301// Hopefully, this will speed up the test.
5302
5303#ifndef __cplusplus
5304
5305#error "This is not a C++ compiler"
5306
5307#elif __cplusplus < 201103L
5308
5309#error "This is not a C++11 compiler"
5310
5311#else
5312
5313namespace cxx11
5314{
5315
5316 namespace test_static_assert
5317 {
5318
5319 template <typename T>
5320 struct check
5321 {
5322 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5323 };
5324
5325 }
5326
5327 namespace test_final_override
5328 {
5329
5330 struct Base
5331 {
5332 virtual void f() {}
5333 };
5334
5335 struct Derived : public Base
5336 {
5337 virtual void f() override {}
5338 };
5339
5340 }
5341
5342 namespace test_double_right_angle_brackets
5343 {
5344
5345 template < typename T >
5346 struct check {};
5347
5348 typedef check<void> single_type;
5349 typedef check<check<void>> double_type;
5350 typedef check<check<check<void>>> triple_type;
5351 typedef check<check<check<check<void>>>> quadruple_type;
5352
5353 }
5354
5355 namespace test_decltype
5356 {
5357
5358 int
5359 f()
5360 {
5361 int a = 1;
5362 decltype(a) b = 2;
5363 return a + b;
5364 }
5365
5366 }
5367
5368 namespace test_type_deduction
5369 {
5370
5371 template < typename T1, typename T2 >
5372 struct is_same
5373 {
5374 static const bool value = false;
5375 };
5376
5377 template < typename T >
5378 struct is_same<T, T>
5379 {
5380 static const bool value = true;
5381 };
5382
5383 template < typename T1, typename T2 >
5384 auto
5385 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5386 {
5387 return a1 + a2;
5388 }
5389
5390 int
5391 test(const int c, volatile int v)
5392 {
5393 static_assert(is_same<int, decltype(0)>::value == true, "");
5394 static_assert(is_same<int, decltype(c)>::value == false, "");
5395 static_assert(is_same<int, decltype(v)>::value == false, "");
5396 auto ac = c;
5397 auto av = v;
5398 auto sumi = ac + av + 'x';
5399 auto sumf = ac + av + 1.0;
5400 static_assert(is_same<int, decltype(ac)>::value == true, "");
5401 static_assert(is_same<int, decltype(av)>::value == true, "");
5402 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5403 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5404 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5405 return (sumf > 0.0) ? sumi : add(c, v);
5406 }
5407
5408 }
5409
5410 namespace test_noexcept
5411 {
5412
5413 int f() { return 0; }
5414 int g() noexcept { return 0; }
5415
5416 static_assert(noexcept(f()) == false, "");
5417 static_assert(noexcept(g()) == true, "");
5418
5419 }
5420
5421 namespace test_constexpr
5422 {
5423
5424 template < typename CharT >
5425 unsigned long constexpr
5426 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5427 {
5428 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5429 }
5430
5431 template < typename CharT >
5432 unsigned long constexpr
5433 strlen_c(const CharT *const s) noexcept
5434 {
5435 return strlen_c_r(s, 0UL);
5436 }
5437
5438 static_assert(strlen_c("") == 0UL, "");
5439 static_assert(strlen_c("1") == 1UL, "");
5440 static_assert(strlen_c("example") == 7UL, "");
5441 static_assert(strlen_c("another\0example") == 7UL, "");
5442
5443 }
5444
5445 namespace test_rvalue_references
5446 {
5447
5448 template < int N >
5449 struct answer
5450 {
5451 static constexpr int value = N;
5452 };
5453
5454 answer<1> f(int&) { return answer<1>(); }
5455 answer<2> f(const int&) { return answer<2>(); }
5456 answer<3> f(int&&) { return answer<3>(); }
5457
5458 void
5459 test()
5460 {
5461 int i = 0;
5462 const int c = 0;
5463 static_assert(decltype(f(i))::value == 1, "");
5464 static_assert(decltype(f(c))::value == 2, "");
5465 static_assert(decltype(f(0))::value == 3, "");
5466 }
5467
5468 }
5469
5470 namespace test_uniform_initialization
5471 {
5472
5473 struct test
5474 {
5475 static const int zero {};
5476 static const int one {1};
5477 };
5478
5479 static_assert(test::zero == 0, "");
5480 static_assert(test::one == 1, "");
5481
5482 }
5483
5484 namespace test_lambdas
5485 {
5486
5487 void
5488 test1()
5489 {
5490 auto lambda1 = [](){};
5491 auto lambda2 = lambda1;
5492 lambda1();
5493 lambda2();
5494 }
5495
5496 int
5497 test2()
5498 {
5499 auto a = [](int i, int j){ return i + j; }(1, 2);
5500 auto b = []() -> int { return '0'; }();
5501 auto c = [=](){ return a + b; }();
5502 auto d = [&](){ return c; }();
5503 auto e = [a, &b](int x) mutable {
5504 const auto identity = [](int y){ return y; };
5505 for (auto i = 0; i < a; ++i)
5506 a += b--;
5507 return x + identity(a + b);
5508 }(0);
5509 return a + b + c + d + e;
5510 }
5511
5512 int
5513 test3()
5514 {
5515 const auto nullary = [](){ return 0; };
5516 const auto unary = [](int x){ return x; };
5517 using nullary_t = decltype(nullary);
5518 using unary_t = decltype(unary);
5519 const auto higher1st = [](nullary_t f){ return f(); };
5520 const auto higher2nd = [unary](nullary_t f1){
5521 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5522 };
5523 return higher1st(nullary) + higher2nd(nullary)(unary);
5524 }
5525
5526 }
5527
5528 namespace test_variadic_templates
5529 {
5530
5531 template <int...>
5532 struct sum;
5533
5534 template <int N0, int... N1toN>
5535 struct sum<N0, N1toN...>
5536 {
5537 static constexpr auto value = N0 + sum<N1toN...>::value;
5538 };
5539
5540 template <>
5541 struct sum<>
5542 {
5543 static constexpr auto value = 0;
5544 };
5545
5546 static_assert(sum<>::value == 0, "");
5547 static_assert(sum<1>::value == 1, "");
5548 static_assert(sum<23>::value == 23, "");
5549 static_assert(sum<1, 2>::value == 3, "");
5550 static_assert(sum<5, 5, 11>::value == 21, "");
5551 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5552
5553 }
5554
5555 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5556 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5557 // because of this.
5558 namespace test_template_alias_sfinae
5559 {
5560
5561 struct foo {};
5562
5563 template<typename T>
5564 using member = typename T::member_type;
5565
5566 template<typename T>
5567 void func(...) {}
5568
5569 template<typename T>
5570 void func(member<T>*) {}
5571
5572 void test();
5573
5574 void test() { func<foo>(0); }
5575
5576 }
5577
5578} // namespace cxx11
5579
5580#endif // __cplusplus >= 201103L
5581
5582
5583
5584_ACEOF
5585if ac_fn_cxx_try_compile "$LINENO"; then :
5586 eval $cachevar=yes
5587else
5588 eval $cachevar=no
5589fi
5590rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5591 CXX="$ac_save_CXX"
5592fi
5593eval ac_res=\$$cachevar
5594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5595$as_echo "$ac_res" >&6; }
5596 if eval test x\$$cachevar = xyes; then
5597 CXX_DIALECT="$switch"
5598 ac_success=yes
5599 break
5600 fi
5601 done
5602 fi
5603
5604 if test x$ac_success = xno; then
5605 for switch in -std=c++11 -std=c++0x +std=c++11 "-h std=c++11"; do
5606 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5607 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
5608$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
5609if { as_var=$cachevar; eval "test \"\${$as_var+set}\" = set"; }; then :
5610 $as_echo_n "(cached) " >&6
5611else
5612 ac_save_CXX="$CXX"
5613 CXX="$CXX $switch"
5614 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5615/* end confdefs.h. */
5616
5617
5618// If the compiler admits that it is not ready for C++11, why torture it?
5619// Hopefully, this will speed up the test.
5620
5621#ifndef __cplusplus
5622
5623#error "This is not a C++ compiler"
5624
5625#elif __cplusplus < 201103L
5626
5627#error "This is not a C++11 compiler"
5628
5629#else
5630
5631namespace cxx11
5632{
5633
5634 namespace test_static_assert
5635 {
5636
5637 template <typename T>
5638 struct check
5639 {
5640 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5641 };
5642
5643 }
5644
5645 namespace test_final_override
5646 {
5647
5648 struct Base
5649 {
5650 virtual void f() {}
5651 };
5652
5653 struct Derived : public Base
5654 {
5655 virtual void f() override {}
5656 };
5657
5658 }
5659
5660 namespace test_double_right_angle_brackets
5661 {
5662
5663 template < typename T >
5664 struct check {};
5665
5666 typedef check<void> single_type;
5667 typedef check<check<void>> double_type;
5668 typedef check<check<check<void>>> triple_type;
5669 typedef check<check<check<check<void>>>> quadruple_type;
5670
5671 }
5672
5673 namespace test_decltype
5674 {
5675
5676 int
5677 f()
5678 {
5679 int a = 1;
5680 decltype(a) b = 2;
5681 return a + b;
5682 }
5683
5684 }
5685
5686 namespace test_type_deduction
5687 {
5688
5689 template < typename T1, typename T2 >
5690 struct is_same
5691 {
5692 static const bool value = false;
5693 };
5694
5695 template < typename T >
5696 struct is_same<T, T>
5697 {
5698 static const bool value = true;
5699 };
5700
5701 template < typename T1, typename T2 >
5702 auto
5703 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5704 {
5705 return a1 + a2;
5706 }
5707
5708 int
5709 test(const int c, volatile int v)
5710 {
5711 static_assert(is_same<int, decltype(0)>::value == true, "");
5712 static_assert(is_same<int, decltype(c)>::value == false, "");
5713 static_assert(is_same<int, decltype(v)>::value == false, "");
5714 auto ac = c;
5715 auto av = v;
5716 auto sumi = ac + av + 'x';
5717 auto sumf = ac + av + 1.0;
5718 static_assert(is_same<int, decltype(ac)>::value == true, "");
5719 static_assert(is_same<int, decltype(av)>::value == true, "");
5720 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5721 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5722 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5723 return (sumf > 0.0) ? sumi : add(c, v);
5724 }
5725
5726 }
5727
5728 namespace test_noexcept
5729 {
5730
5731 int f() { return 0; }
5732 int g() noexcept { return 0; }
5733
5734 static_assert(noexcept(f()) == false, "");
5735 static_assert(noexcept(g()) == true, "");
5736
5737 }
5738
5739 namespace test_constexpr
5740 {
5741
5742 template < typename CharT >
5743 unsigned long constexpr
5744 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5745 {
5746 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5747 }
5748
5749 template < typename CharT >
5750 unsigned long constexpr
5751 strlen_c(const CharT *const s) noexcept
5752 {
5753 return strlen_c_r(s, 0UL);
5754 }
5755
5756 static_assert(strlen_c("") == 0UL, "");
5757 static_assert(strlen_c("1") == 1UL, "");
5758 static_assert(strlen_c("example") == 7UL, "");
5759 static_assert(strlen_c("another\0example") == 7UL, "");
5760
5761 }
5762
5763 namespace test_rvalue_references
5764 {
5765
5766 template < int N >
5767 struct answer
5768 {
5769 static constexpr int value = N;
5770 };
5771
5772 answer<1> f(int&) { return answer<1>(); }
5773 answer<2> f(const int&) { return answer<2>(); }
5774 answer<3> f(int&&) { return answer<3>(); }
5775
5776 void
5777 test()
5778 {
5779 int i = 0;
5780 const int c = 0;
5781 static_assert(decltype(f(i))::value == 1, "");
5782 static_assert(decltype(f(c))::value == 2, "");
5783 static_assert(decltype(f(0))::value == 3, "");
5784 }
5785
5786 }
5787
5788 namespace test_uniform_initialization
5789 {
5790
5791 struct test
5792 {
5793 static const int zero {};
5794 static const int one {1};
5795 };
5796
5797 static_assert(test::zero == 0, "");
5798 static_assert(test::one == 1, "");
5799
5800 }
5801
5802 namespace test_lambdas
5803 {
5804
5805 void
5806 test1()
5807 {
5808 auto lambda1 = [](){};
5809 auto lambda2 = lambda1;
5810 lambda1();
5811 lambda2();
5812 }
5813
5814 int
5815 test2()
5816 {
5817 auto a = [](int i, int j){ return i + j; }(1, 2);
5818 auto b = []() -> int { return '0'; }();
5819 auto c = [=](){ return a + b; }();
5820 auto d = [&](){ return c; }();
5821 auto e = [a, &b](int x) mutable {
5822 const auto identity = [](int y){ return y; };
5823 for (auto i = 0; i < a; ++i)
5824 a += b--;
5825 return x + identity(a + b);
5826 }(0);
5827 return a + b + c + d + e;
5828 }
5829
5830 int
5831 test3()
5832 {
5833 const auto nullary = [](){ return 0; };
5834 const auto unary = [](int x){ return x; };
5835 using nullary_t = decltype(nullary);
5836 using unary_t = decltype(unary);
5837 const auto higher1st = [](nullary_t f){ return f(); };
5838 const auto higher2nd = [unary](nullary_t f1){
5839 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5840 };
5841 return higher1st(nullary) + higher2nd(nullary)(unary);
5842 }
5843
5844 }
5845
5846 namespace test_variadic_templates
5847 {
5848
5849 template <int...>
5850 struct sum;
5851
5852 template <int N0, int... N1toN>
5853 struct sum<N0, N1toN...>
5854 {
5855 static constexpr auto value = N0 + sum<N1toN...>::value;
5856 };
5857
5858 template <>
5859 struct sum<>
5860 {
5861 static constexpr auto value = 0;
5862 };
5863
5864 static_assert(sum<>::value == 0, "");
5865 static_assert(sum<1>::value == 1, "");
5866 static_assert(sum<23>::value == 23, "");
5867 static_assert(sum<1, 2>::value == 3, "");
5868 static_assert(sum<5, 5, 11>::value == 21, "");
5869 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5870
5871 }
5872
5873 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5874 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5875 // because of this.
5876 namespace test_template_alias_sfinae
5877 {
5878
5879 struct foo {};
5880
5881 template<typename T>
5882 using member = typename T::member_type;
5883
5884 template<typename T>
5885 void func(...) {}
5886
5887 template<typename T>
5888 void func(member<T>*) {}
5889
5890 void test();
5891
5892 void test() { func<foo>(0); }
5893
5894 }
5895
5896} // namespace cxx11
5897
5898#endif // __cplusplus >= 201103L
5899
5900
5901
5902_ACEOF
5903if ac_fn_cxx_try_compile "$LINENO"; then :
5904 eval $cachevar=yes
5905else
5906 eval $cachevar=no
5907fi
5908rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5909 CXX="$ac_save_CXX"
5910fi
5911eval ac_res=\$$cachevar
5912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5913$as_echo "$ac_res" >&6; }
5914 if eval test x\$$cachevar = xyes; then
5915 CXX_DIALECT="$switch"
5916 ac_success=yes
5917 break
5918 fi
5919 done
5920 fi
5921 ac_ext=c
5922ac_cpp='$CPP $CPPFLAGS'
5923ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5924ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5925ac_compiler_gnu=$ac_cv_c_compiler_gnu
5926
5927 if test x$ax_cxx_compile_cxx11_required = xtrue; then
5928 if test x$ac_success = xno; then
5929 as_fn_error "*** A compiler with support for C++11 language features is required." "$LINENO" 5
5930 fi
5931 fi
5932 if test x$ac_success = xno; then
5933 HAVE_CXX11=0
5934 { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5
5935$as_echo "$as_me: No compiler with C++11 support was found" >&6;}
5936 else
5937 HAVE_CXX11=1
5938
5939$as_echo "#define HAVE_CXX11 1" >>confdefs.h
5940
5941 fi
5942
5943
5944
5945
a417dc56
RW
5946# Dependency checking.
5947rm -rf .tst 2>/dev/null
5948mkdir .tst 2>/dev/null
5949if test -d .tst; then
5950 am__leading_dot=.
5951else
5952 am__leading_dot=_
5953fi
5954rmdir .tst 2>/dev/null
5955
5956DEPDIR="${am__leading_dot}deps"
5957
81ecdfbb 5958ac_config_commands="$ac_config_commands depdir"
a417dc56
RW
5959
5960
6e66f753 5961# Create sub-directories for objects and dependencies.
f38307f5
YQ
5962CONFIG_SRC_SUBDIR="arch"
5963
5964
5965ac_config_commands="$ac_config_commands gdbdepdir"
5966
5967
a417dc56
RW
5968depcc="$CC" am_compiler_list=
5969
5970am_depcomp=$ac_aux_dir/depcomp
81ecdfbb
RW
5971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
5972$as_echo_n "checking dependency style of $depcc... " >&6; }
5973if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
5974 $as_echo_n "(cached) " >&6
a417dc56
RW
5975else
5976 if test -f "$am_depcomp"; then
5977 # We make a subdir and do the tests there. Otherwise we can end up
5978 # making bogus files that we don't know about and never remove. For
5979 # instance it was reported that on HP-UX the gcc test will end up
5980 # making a dummy file named `D' -- because `-MD' means `put the output
5981 # in D'.
5982 mkdir conftest.dir
5983 # Copy depcomp to subdir because otherwise we won't find it if we're
5984 # using a relative directory.
5985 cp "$am_depcomp" conftest.dir
5986 cd conftest.dir
5987 # We will build objects and dependencies in a subdirectory because
5988 # it helps to detect inapplicable dependency modes. For instance
5989 # both Tru64's cc and ICC support -MD to output dependencies as a
5990 # side effect of compilation, but ICC will put the dependencies in
5991 # the current directory while Tru64 will put them in the object
5992 # directory.
5993 mkdir sub
5994
5995 am_cv_CC_dependencies_compiler_type=none
5996 if test "$am_compiler_list" = ""; then
5997 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
5998 fi
5999 for depmode in $am_compiler_list; do
6000 if test $depmode = none; then break; fi
6001
81ecdfbb 6002 $as_echo "$as_me:$LINENO: trying $depmode" >&5
a417dc56
RW
6003 # Setup a source with many dependencies, because some compilers
6004 # like to wrap large dependency lists on column 80 (with \), and
6005 # we should not choose a depcomp mode which is confused by this.
6006 #
6007 # We need to recreate these files for each test, as the compiler may
6008 # overwrite some of them when testing with obscure command lines.
6009 # This happens at least with the AIX C compiler.
6010 : > sub/conftest.c
6011 for i in 1 2 3 4 5 6; do
6012 echo '#include "conftst'$i'.h"' >> sub/conftest.c
6013 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
6014 # Solaris 8's {/usr,}/bin/sh.
6015 touch sub/conftst$i.h
6016 done
6017 echo "include sub/conftest.Po" > confmf
6018
6019 # We check with `-c' and `-o' for the sake of the "dashmstdout"
6020 # mode. It turns out that the SunPro C++ compiler does not properly
6021 # handle `-M -o', and we need to detect this.
6022 depcmd="depmode=$depmode \
6023 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
6024 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6025 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
6026 echo "| $depcmd" | sed -e 's/ */ /g' >&5
6027 if env $depcmd > conftest.err 2>&1 &&
6028 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
6029 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
6030 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
6031 # icc doesn't choke on unknown options, it will just issue warnings
6032 # or remarks (even with -Werror). So we grep stderr for any message
6033 # that says an option was ignored or not supported.
6034 # When given -MP, icc 7.0 and 7.1 complain thusly:
6035 # icc: Command line warning: ignoring option '-M'; no argument required
6036 # The diagnosis changed in icc 8.0:
6037 # icc: Command line remark: option '-MP' not supported
6038 if (grep 'ignoring option' conftest.err ||
6039 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6040 am_cv_CC_dependencies_compiler_type=$depmode
81ecdfbb 6041 $as_echo "$as_me:$LINENO: success" >&5
a417dc56
RW
6042 break
6043 fi
6044 fi
81ecdfbb 6045 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
a417dc56
RW
6046 sed -e 's/^/| /' < conftest.err >&5
6047 done
6048
6049 cd ..
6050 rm -rf conftest.dir
6051else
6052 am_cv_CC_dependencies_compiler_type=none
6053fi
6054
6055fi
81ecdfbb
RW
6056{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
6057$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
a417dc56 6058if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
81ecdfbb 6059then as_fn_error "no usable dependency style found" "$LINENO" 5
a417dc56
RW
6060else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
6061
6062fi
6063
6064
648d586d
JB
6065gnulib_extra_configure_args=
6066# If large-file support is disabled, make sure gnulib does the same.
6067if test "$enable_largefile" = no; then
6068gnulib_extra_configure_args="$gnulib_extra_configure_args --disable-largefile"
6069fi
6070
c971b7fa
PA
6071# Configure gnulib. We need to build gnulib under some other
6072# directory not "gnulib", to avoid the problem of both GDB and
6073# GDBserver wanting to build it in the same directory, when building
6074# in the source dir.
783e057b 6075
c971b7fa
PA
6076 in_src="gnulib"
6077 in_build="build-gnulib"
648d586d 6078 in_extra_args="$gnulib_extra_configure_args"
c971b7fa
PA
6079
6080 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
6081 # so they do not pile up.
6082 ac_sub_configure_args=
6083 ac_prev=
6084 eval "set x $ac_configure_args"
6085 shift
6086 for ac_arg
6087 do
6088 if test -n "$ac_prev"; then
6089 ac_prev=
6090 continue
6091 fi
6092 case $ac_arg in
6093 -cache-file | --cache-file | --cache-fil | --cache-fi \
6094 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
6095 ac_prev=cache_file ;;
6096 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
6097 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
6098 | --c=*)
6099 ;;
6100 --config-cache | -C)
6101 ;;
6102 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
6103 ac_prev=srcdir ;;
6104 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
6105 ;;
6106 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
6107 ac_prev=prefix ;;
6108 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
6109 ;;
6110 --disable-option-checking)
6111 ;;
6112 *)
6113 case $ac_arg in
6114 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
6115 esac
6116 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
6117 esac
6118 done
6119
6120 # Always prepend --prefix to ensure using the same prefix
6121 # in subdir configurations.
6122 ac_arg="--prefix=$prefix"
6123 case $ac_arg in
6124 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
6125 esac
6126 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
6127
6128 # Pass --silent
6129 if test "$silent" = yes; then
6130 ac_sub_configure_args="--silent $ac_sub_configure_args"
6131 fi
6132
6133 # Always prepend --disable-option-checking to silence warnings, since
6134 # different subdirs can have different --enable and --with options.
6135 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
6136
6137 ac_popdir=`pwd`
6138 ac_dir=$in_build
6139
6140 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
6141 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
6142 $as_echo "$ac_msg" >&6
6143 as_dir="$ac_dir"; as_fn_mkdir_p
6144
38ea300a
PA
6145 case $srcdir in
6146 [\\/]* | ?:[\\/]* )
6147 ac_srcdir=$srcdir/$in_src ;;
6148 *) # Relative name.
6149 ac_srcdir=../$srcdir/$in_src ;;
6150 esac
c971b7fa
PA
6151
6152 cd "$ac_dir"
6153
6154 ac_sub_configure=$ac_srcdir/configure
6155
6156 # Make the cache file name correct relative to the subdirectory.
6157 case $cache_file in
6158 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
6159 *) # Relative name.
6160 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
6161 esac
6162
648d586d
JB
6163 if test -n "$in_extra_args"; then
6164 # Add the extra args at the end.
6165 ac_sub_configure_args="$ac_sub_configure_args $in_extra_args"
6166 fi
6167
c971b7fa
PA
6168 { $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
6169$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
6170 # The eval makes quoting arguments work.
6171 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
6172 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
6173 as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
6174
6175 cd "$ac_popdir"
783e057b 6176
c971b7fa
PA
6177
6178
6179CONFIG_OBS=
6180CONFIG_DEPS=
6181CONFIG_SRCS=
6182ENABLE_CFLAGS=
6183
6184CONFIG_ALL=
6185CONFIG_CLEAN=
6186CONFIG_INSTALL=
6187CONFIG_UNINSTALL=
6188
6189# If we haven't got the data from the intl directory,
6190# assume NLS is disabled.
6191USE_NLS=no
6192LIBINTL=
6193LIBINTL_DEP=
6194INCINTL=
6195XGETTEXT=
6196GMSGFMT=
6197POSUB=
783e057b
DJ
6198
6199if test -f ../intl/config.intl; then
6200 . ../intl/config.intl
6201fi
81ecdfbb
RW
6202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
6203$as_echo_n "checking whether NLS is requested... " >&6; }
783e057b 6204if test x"$USE_NLS" != xyes; then
81ecdfbb
RW
6205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6206$as_echo "no" >&6; }
783e057b 6207else
81ecdfbb
RW
6208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6209$as_echo "yes" >&6; }
783e057b 6210
81ecdfbb 6211$as_echo "#define ENABLE_NLS 1" >>confdefs.h
783e057b
DJ
6212
6213
81ecdfbb
RW
6214 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
6215$as_echo_n "checking for catalogs to be installed... " >&6; }
783e057b
DJ
6216 # Look for .po and .gmo files in the source directory.
6217 CATALOGS=
6218 XLINGUAS=
6219 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
6220 # If there aren't any .gmo files the shell will give us the
6221 # literal string "../path/to/srcdir/po/*.gmo" which has to be
6222 # weeded out.
6223 case "$cat" in *\**)
6224 continue;;
6225 esac
6226 # The quadruple backslash is collapsed to a double backslash
6227 # by the backticks, then collapsed again by the double quotes,
6228 # leaving us with one backslash in the sed expression (right
6229 # before the dot that mustn't act as a wildcard).
c971b7fa
PA
6230 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
6231 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
6232 # The user is allowed to set LINGUAS to a list of languages to
6233 # install catalogs for. If it's empty that means "all of them."
6234 if test "x$LINGUAS" = x; then
6235 CATALOGS="$CATALOGS $cat"
6236 XLINGUAS="$XLINGUAS $lang"
6237 else
6238 case "$LINGUAS" in *$lang*)
6239 CATALOGS="$CATALOGS $cat"
6240 XLINGUAS="$XLINGUAS $lang"
6241 ;;
6242 esac
e28b3332
DJ
6243 fi
6244 done
c971b7fa
PA
6245 LINGUAS="$XLINGUAS"
6246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
6247$as_echo "$LINGUAS" >&6; }
6248
6249
6250 DATADIRNAME=share
6251
6252 INSTOBJEXT=.mo
6253
6254 GENCAT=gencat
6255
6256 CATOBJEXT=.gmo
e28b3332 6257
e28b3332
DJ
6258fi
6259
c971b7fa
PA
6260localedir='${datadir}/locale'
6261
6262
6263if test x"$USE_NLS" = xyes; then
6264 CONFIG_ALL="$CONFIG_ALL all-po"
6265 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
6266 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
6267 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
e28b3332 6268fi
e28b3332 6269
c971b7fa
PA
6270GNULIB=build-gnulib/import
6271
6272# For Makefile dependencies.
6273GNULIB_STDINT_H=
6274if test x"$STDINT_H" != x; then
6275 GNULIB_STDINT_H=$GNULIB/$STDINT_H
e28b3332
DJ
6276fi
6277
6278
c971b7fa
PA
6279PACKAGE=gdb
6280
6281cat >>confdefs.h <<_ACEOF
6282#define PACKAGE "$PACKAGE"
6283_ACEOF
6284
6285
6286
6287# We never need to detect it in this sub-configure.
6288# But preserve it for config.status --recheck.
6289
6290
6291
6292MAKEINFO_EXTRA_FLAGS=""
6293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5
6294$as_echo_n "checking whether $MAKEINFO supports @click... " >&6; }
6295if test "${gdb_cv_have_makeinfo_click+set}" = set; then :
6296 $as_echo_n "(cached) " >&6
6297else
6298 echo '@clicksequence{a @click{} b}' >conftest.texinfo
6299 if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then
6300 gdb_cv_have_makeinfo_click=yes
6301 else
6302 gdb_cv_have_makeinfo_click=no
6303 fi
6304fi
6305{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5
6306$as_echo "$gdb_cv_have_makeinfo_click" >&6; }
6307if test x"$gdb_cv_have_makeinfo_click" = xyes; then
6308 MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK"
6309fi
e28b3332
DJ
6310
6311
bec39cab
AC
6312
6313
81ecdfbb
RW
6314# Check whether --with-separate-debug-dir was given.
6315if test "${with_separate_debug_dir+set}" = set; then :
6316 withval=$with_separate_debug_dir;
b14b1491
TT
6317 DEBUGDIR=$withval
6318else
6319 DEBUGDIR=${libdir}/debug
81ecdfbb
RW
6320fi
6321
20e95c23 6322
783e057b
DJ
6323 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6324 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 6325 ac_define_dir=`eval echo $DEBUGDIR`
783e057b 6326 ac_define_dir=`eval echo $ac_define_dir`
20e95c23 6327
783e057b
DJ
6328cat >>confdefs.h <<_ACEOF
6329#define DEBUGDIR "$ac_define_dir"
20e95c23 6330_ACEOF
20e95c23 6331
20e95c23 6332
20e95c23 6333
0c4a4063 6334
b14b1491
TT
6335 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6336 if test "x$prefix" = xNONE; then
6337 test_prefix=/usr/local
6338 else
6339 test_prefix=$prefix
6340 fi
783e057b 6341 else
b14b1491 6342 test_prefix=$exec_prefix
783e057b 6343 fi
b14b1491
TT
6344 value=0
6345 case ${ac_define_dir} in
6346 "${test_prefix}"|"${test_prefix}/"*|\
6347 '${exec_prefix}'|'${exec_prefix}/'*)
6348 value=1
6349 ;;
6350 esac
6351
6352cat >>confdefs.h <<_ACEOF
6353#define DEBUGDIR_RELOCATABLE $value
6354_ACEOF
6355
6356
6357
0c4a4063 6358
f83d8a90
DE
6359# We can't pass paths as command line arguments.
6360# Mingw32 tries to be clever and will convert the paths for us.
6361# For example -DBINDIR="/usr/local/bin" passed on the command line may get
6362# converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin".
6363# This breaks GDB's relocatable path conversions since paths passed in
6364# config.h would not get so translated, the path prefixes no longer match.
6365
6366 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6367 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6368 ac_define_dir=`eval echo $bindir`
6369 ac_define_dir=`eval echo $ac_define_dir`
6370
6371cat >>confdefs.h <<_ACEOF
6372#define BINDIR "$ac_define_dir"
6373_ACEOF
6374
6375
6376
b14b1491
TT
6377# GDB's datadir relocation
6378
6379
6380
81ecdfbb
RW
6381# Check whether --with-gdb-datadir was given.
6382if test "${with_gdb_datadir+set}" = set; then :
6383 withval=$with_gdb_datadir;
b14b1491 6384 GDB_DATADIR=$withval
20e95c23 6385else
b14b1491 6386 GDB_DATADIR=${datadir}/gdb
81ecdfbb
RW
6387fi
6388
20e95c23 6389
b14b1491
TT
6390 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6391 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6392 ac_define_dir=`eval echo $GDB_DATADIR`
6393 ac_define_dir=`eval echo $ac_define_dir`
6394
6395cat >>confdefs.h <<_ACEOF
6396#define GDB_DATADIR "$ac_define_dir"
20e95c23
DJ
6397_ACEOF
6398
b14b1491
TT
6399
6400
0c4a4063 6401
b14b1491
TT
6402 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6403 if test "x$prefix" = xNONE; then
6404 test_prefix=/usr/local
6405 else
6406 test_prefix=$prefix
6407 fi
6408 else
6409 test_prefix=$exec_prefix
6410 fi
6411 value=0
6412 case ${ac_define_dir} in
6413 "${test_prefix}"|"${test_prefix}/"*|\
6414 '${exec_prefix}'|'${exec_prefix}/'*)
6415 value=1
6416 ;;
6417 esac
6418
6419cat >>confdefs.h <<_ACEOF
6420#define GDB_DATADIR_RELOCATABLE $value
6421_ACEOF
6422
6423
783e057b 6424
20e95c23 6425
0c4a4063 6426
81ecdfbb
RW
6427# Check whether --with-relocated-sources was given.
6428if test "${with_relocated_sources+set}" = set; then :
6429 withval=$with_relocated_sources; reloc_srcdir="${withval}"
29b0e8a2
JM
6430
6431 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6432 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6433 ac_define_dir=`eval echo $reloc_srcdir`
6434 ac_define_dir=`eval echo $ac_define_dir`
6435
6436cat >>confdefs.h <<_ACEOF
6437#define RELOC_SRCDIR "$ac_define_dir"
6438_ACEOF
6439
6440
6441
81ecdfbb
RW
6442fi
6443
29b0e8a2 6444
7349ff92
JK
6445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5
6446$as_echo_n "checking for default auto-load directory... " >&6; }
6447
6448# Check whether --with-auto-load-dir was given.
6449if test "${with_auto_load_dir+set}" = set; then :
6450 withval=$with_auto_load_dir;
6451else
1564a261 6452 with_auto_load_dir='$debugdir:$datadir/auto-load'
7349ff92
JK
6453fi
6454
1564a261 6455escape_dir=`echo $with_auto_load_dir | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'`
7349ff92
JK
6456
6457 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6458 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6459 ac_define_dir=`eval echo $escape_dir`
6460 ac_define_dir=`eval echo $ac_define_dir`
6461
6462cat >>confdefs.h <<_ACEOF
6463#define AUTO_LOAD_DIR "$ac_define_dir"
6464_ACEOF
6465
6466
6467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5
6468$as_echo "$with_auto_load_dir" >&6; }
6469
bccbefd2
JK
6470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5
6471$as_echo_n "checking for default auto-load safe-path... " >&6; }
6472
6473# Check whether --with-auto-load-safe-path was given.
6474if test "${with_auto_load_safe_path+set}" = set; then :
6475 withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then
6dea1fbd
JK
6476 with_auto_load_safe_path="/"
6477 fi
bccbefd2 6478else
7349ff92 6479 with_auto_load_safe_path="$with_auto_load_dir"
bccbefd2
JK
6480fi
6481
1564a261 6482escape_dir=`echo $with_auto_load_safe_path | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'`
bccbefd2
JK
6483
6484 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6485 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6dea1fbd 6486 ac_define_dir=`eval echo $escape_dir`
bccbefd2
JK
6487 ac_define_dir=`eval echo $ac_define_dir`
6488
6489cat >>confdefs.h <<_ACEOF
6dea1fbd 6490#define AUTO_LOAD_SAFE_PATH "$ac_define_dir"
bccbefd2
JK
6491_ACEOF
6492
6493
6494{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
6495$as_echo "$with_auto_load_safe_path" >&6; }
6496
29b0e8a2 6497
20e95c23 6498
5ae98d25 6499subdirs="$subdirs testsuite"
20e95c23
DJ
6500
6501
783e057b 6502# Check whether to support alternative target configurations
81ecdfbb
RW
6503# Check whether --enable-targets was given.
6504if test "${enable_targets+set}" = set; then :
6505 enableval=$enable_targets; case "${enableval}" in
6506 yes | "") as_fn_error "enable-targets option must specify target names or 'all'" "$LINENO" 5
783e057b
DJ
6507 ;;
6508 no) enable_targets= ;;
6509 *) enable_targets=$enableval ;;
6510esac
81ecdfbb
RW
6511fi
6512
20e95c23 6513
783e057b 6514# Check whether to enable 64-bit support on 32-bit hosts
81ecdfbb
RW
6515# Check whether --enable-64-bit-bfd was given.
6516if test "${enable_64_bit_bfd+set}" = set; then :
6517 enableval=$enable_64_bit_bfd; case "${enableval}" in
783e057b
DJ
6518 yes) want64=true ;;
6519 no) want64=false ;;
81ecdfbb 6520 *) as_fn_error "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
783e057b
DJ
6521esac
6522else
6523 want64=false
81ecdfbb
RW
6524fi
6525
783e057b
DJ
6526# Provide defaults for some variables set by the per-host and per-target
6527# configuration.
6528gdb_host_obs=posix-hdep.o
20e95c23 6529
783e057b
DJ
6530if test "${target}" = "${host}"; then
6531 gdb_native=yes
6532else
6533 gdb_native=no
6534fi
20e95c23 6535
783e057b 6536. $srcdir/configure.host
20e95c23 6537
fb23d554
SDJ
6538# Add in the common host objects.
6539. $srcdir/common/common.host
6540gdb_host_obs="$gdb_host_obs $common_host_obs"
6541
783e057b 6542# Accumulate some settings from configure.tgt over all enabled targets
20e95c23 6543
783e057b
DJ
6544TARGET_OBS=
6545all_targets=
b292c783 6546HAVE_NATIVE_GCORE_TARGET=
20e95c23 6547
783e057b 6548for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
20e95c23 6549do
783e057b
DJ
6550 if test "$targ_alias" = "all"; then
6551 all_targets=true
6552 else
6553 # Canonicalize the secondary target names.
6554 result=`$ac_config_sub $targ_alias 2>/dev/null`
6555 if test -n "$result"; then
6556 targ=$result
6557 else
6558 targ=$targ_alias
6559 fi
20e95c23 6560
783e057b 6561 . ${srcdir}/configure.tgt
20e95c23 6562
bf307134
JB
6563 if test -z "${gdb_target_obs}"; then :
6564 as_fn_error "configuration ${targ} is unsupported." "$LINENO" 5
6565fi
6566
783e057b
DJ
6567 # Target-specific object files
6568 for i in ${gdb_target_obs}; do
6569 case " $TARGET_OBS " in
6570 *" ${i} "*) ;;
6571 *)
6572 TARGET_OBS="$TARGET_OBS ${i}"
6573 ;;
6574 esac
6575 done
20e95c23 6576
783e057b
DJ
6577 # Check whether this target needs 64-bit CORE_ADDR
6578 if test x${want64} = xfalse; then
6579 . ${srcdir}/../bfd/config.bfd
6580 fi
b292c783
JK
6581
6582 # Check whether this target is native and supports gcore.
6583 if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \
6584 && $gdb_have_gcore; then
6585 HAVE_NATIVE_GCORE_TARGET=1
6586 fi
783e057b 6587 fi
20e95c23
DJ
6588done
6589
783e057b
DJ
6590if test x${all_targets} = xtrue; then
6591
6592 # We want all 64-bit targets if we either:
6593 # - run on a 64-bit host or
6594 # - already require 64-bit support for some other target or
6595 # - the --enable-64-bit-bfd option was supplied
6596 # Otherwise we only support all 32-bit targets.
6597 #
6598 # NOTE: This test must be in sync with the corresponding
6599 # tests in BFD!
20e95c23 6600
783e057b 6601 if test x${want64} = xfalse; then
81ecdfbb
RW
6602 # The cast to long int works around a bug in the HP C Compiler
6603# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6604# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6605# This bug is HP SR number 8606223364.
6606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6607$as_echo_n "checking size of long... " >&6; }
6608if test "${ac_cv_sizeof_long+set}" = set; then :
6609 $as_echo_n "(cached) " >&6
c0993dbe 6610else
81ecdfbb 6611 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
c0993dbe 6612
81ecdfbb
RW
6613else
6614 if test "$ac_cv_type_long" = yes; then
6615 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6616$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6617{ as_fn_set_status 77
6618as_fn_error "cannot compute sizeof (long)
6619See \`config.log' for more details." "$LINENO" 5; }; }
6620 else
6621 ac_cv_sizeof_long=0
6622 fi
c0993dbe 6623fi
81ecdfbb 6624
c0993dbe 6625fi
81ecdfbb
RW
6626{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6627$as_echo "$ac_cv_sizeof_long" >&6; }
c0993dbe 6628
c0993dbe 6629
c0993dbe 6630
c0993dbe
UW
6631cat >>confdefs.h <<_ACEOF
6632#define SIZEOF_LONG $ac_cv_sizeof_long
6633_ACEOF
6634
6635
6636 if test "x${ac_cv_sizeof_long}" = "x8"; then
6637 want64=true
6638 fi
6639 fi
6640 if test x${want64} = xtrue; then
6641 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
6642 else
6643 TARGET_OBS='$(ALL_TARGET_OBS)'
6644 fi
6645fi
6646
6647
6648
b292c783 6649
c0993dbe
UW
6650# For other settings, only the main target counts.
6651gdb_sim=
6652gdb_osabi=
6653build_gdbserver=
6654targ=$target; . ${srcdir}/configure.tgt
6655
6656# Fetch the default architecture and default target vector from BFD.
6657targ=$target; . $srcdir/../bfd/config.bfd
6658
6659# We only want the first architecture, so strip off the others if
6660# there is more than one.
6661targ_archs=`echo $targ_archs | sed 's/ .*//'`
6662
6663if test "x$targ_archs" != x; then
6664
6665cat >>confdefs.h <<_ACEOF
6666#define DEFAULT_BFD_ARCH $targ_archs
6667_ACEOF
6668
6669fi
6670if test "x$targ_defvec" != x; then
6671
6672cat >>confdefs.h <<_ACEOF
6673#define DEFAULT_BFD_VEC $targ_defvec
6674_ACEOF
6675
6676fi
6677
c0993dbe
UW
6678# The CLI cannot be disabled yet, but may be in the future.
6679
6680# Enable CLI.
81ecdfbb
RW
6681# Check whether --enable-gdbcli was given.
6682if test "${enable_gdbcli+set}" = set; then :
6683 enableval=$enable_gdbcli; case $enableval in
c0993dbe
UW
6684 yes)
6685 ;;
6686 no)
81ecdfbb 6687 as_fn_error "the command-line interface cannot be disabled yet" "$LINENO" 5 ;;
c0993dbe 6688 *)
81ecdfbb 6689 as_fn_error "bad value $enableval for --enable-gdbcli" "$LINENO" 5 ;;
c0993dbe
UW
6690 esac
6691else
6692 enable_gdbcli=yes
81ecdfbb
RW
6693fi
6694
c0993dbe
UW
6695if test x"$enable_gdbcli" = xyes; then
6696 if test -d $srcdir/cli; then
6697 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
6698 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
6699 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
6700 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
6701 fi
6702fi
6703
6704# Enable MI.
81ecdfbb
RW
6705# Check whether --enable-gdbmi was given.
6706if test "${enable_gdbmi+set}" = set; then :
6707 enableval=$enable_gdbmi; case $enableval in
c0993dbe
UW
6708 yes | no)
6709 ;;
6710 *)
81ecdfbb 6711 as_fn_error "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
c0993dbe
UW
6712 esac
6713else
6714 enable_gdbmi=yes
81ecdfbb
RW
6715fi
6716
c0993dbe
UW
6717if test x"$enable_gdbmi" = xyes; then
6718 if test -d $srcdir/mi; then
6719 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
6720 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
6721 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
6722 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
6723 fi
6724fi
6725
6726# Enable TUI.
81ecdfbb
RW
6727# Check whether --enable-tui was given.
6728if test "${enable_tui+set}" = set; then :
6729 enableval=$enable_tui; case $enableval in
3ca64bd3 6730 yes | no | auto)
c0993dbe
UW
6731 ;;
6732 *)
81ecdfbb 6733 as_fn_error "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
c0993dbe
UW
6734 esac
6735else
3ca64bd3 6736 enable_tui=auto
81ecdfbb
RW
6737fi
6738
c0993dbe
UW
6739
6740# Enable gdbtk.
81ecdfbb
RW
6741# Check whether --enable-gdbtk was given.
6742if test "${enable_gdbtk+set}" = set; then :
6743 enableval=$enable_gdbtk; case $enableval in
c0993dbe
UW
6744 yes | no)
6745 ;;
6746 *)
81ecdfbb 6747 as_fn_error "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
c0993dbe
UW
6748 esac
6749else
5062cc19 6750 if test -d $srcdir/gdbtk; then
c0993dbe
UW
6751 enable_gdbtk=yes
6752 else
6753 enable_gdbtk=no
6754 fi
81ecdfbb
RW
6755fi
6756
c0993dbe
UW
6757# We unconditionally disable gdbtk tests on selected platforms.
6758case $host_os in
6759 go32* | windows*)
81ecdfbb
RW
6760 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
6761$as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
c0993dbe
UW
6762 enable_gdbtk=no ;;
6763esac
6764
05e7c244 6765# Libunwind support for ia64.
bec39cab 6766
05e7c244
JK
6767
6768# Check whether --with-libunwind-ia64 was given.
6769if test "${with_libunwind_ia64+set}" = set; then :
6770 withval=$with_libunwind_ia64;
bec39cab 6771else
05e7c244
JK
6772 with_libunwind_ia64=auto
6773fi
bec39cab 6774
05e7c244
JK
6775
6776# Backward compatibility option.
6777if test "${with_libunwind+set}" = set; then
6778 if test x"$with_libunwind_ia64" != xauto; then
6779 as_fn_error "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5
6780 fi
6781 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5
6782$as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;}
6783 with_libunwind_ia64="$with_libunwind"
6784fi
6785
6786case "$with_libunwind_ia64" in
6787 yes | no)
6788 ;;
6789 auto)
6790 for ac_header in libunwind-ia64.h
81ecdfbb 6791do :
b54a8fd7
PA
6792 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
6793if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
bec39cab 6794 cat >>confdefs.h <<_ACEOF
b54a8fd7 6795#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
6796_ACEOF
6797
6798fi
6799
6800done
6801
05e7c244
JK
6802 with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h
6803 ;;
6804 *)
6805 as_fn_error "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5
6806 ;;
6807esac
bec39cab 6808
05e7c244 6809if test x"$with_libunwind_ia64" = xyes; then
b54a8fd7 6810 for ac_header in libunwind-ia64.h
81ecdfbb 6811do :
b54a8fd7
PA
6812 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
6813if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
bec39cab 6814 cat >>confdefs.h <<_ACEOF
b54a8fd7 6815#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
6816_ACEOF
6817
6818fi
6819
6820done
6821
05e7c244
JK
6822 if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then
6823 as_fn_error "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5
6824 fi
6825 CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o"
6826 CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o"
6827 CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c"
a9322a30
TT
6828fi
6829
cb01cfba
JB
6830opt_curses=no
6831
81ecdfbb
RW
6832# Check whether --with-curses was given.
6833if test "${with_curses+set}" = set; then :
6834 withval=$with_curses; opt_curses=$withval
6835fi
6836
cb01cfba 6837
76a39ba7 6838prefer_curses=no
cb01cfba 6839if test "$opt_curses" = "yes"; then
76a39ba7 6840 prefer_curses=yes
cb01cfba
JB
6841fi
6842
a9322a30 6843# Profiling support.
81ecdfbb
RW
6844# Check whether --enable-profiling was given.
6845if test "${enable_profiling+set}" = set; then :
6846 enableval=$enable_profiling; case $enableval in
a9322a30
TT
6847 yes | no)
6848 ;;
6849 *)
81ecdfbb 6850 as_fn_error "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
a9322a30
TT
6851 esac
6852else
6853 enable_profiling=no
81ecdfbb 6854fi
bec39cab 6855
a9322a30
TT
6856
6857for ac_func in monstartup _mcleanup
81ecdfbb
RW
6858do :
6859 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6860ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
6861eval as_val=\$$as_ac_var
6862 if test "x$as_val" = x""yes; then :
6863 cat >>confdefs.h <<_ACEOF
6864#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 6865_ACEOF
a9322a30 6866
81ecdfbb
RW
6867fi
6868done
a9322a30 6869
81ecdfbb
RW
6870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
6871$as_echo_n "checking for _etext... " >&6; }
6872if test "${ac_cv_var__etext+set}" = set; then :
6873 $as_echo_n "(cached) " >&6
6874else
6875 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6876/* end confdefs.h. */
6877#include <stdlib.h>
6878extern char _etext;
a9322a30
TT
6879
6880int
6881main ()
6882{
6883free (&_etext);
6884 ;
6885 return 0;
6886}
bec39cab 6887_ACEOF
81ecdfbb 6888if ac_fn_c_try_link "$LINENO"; then :
a9322a30 6889 ac_cv_var__etext=yes
bec39cab 6890else
81ecdfbb 6891 ac_cv_var__etext=no
bec39cab 6892fi
81ecdfbb
RW
6893rm -f core conftest.err conftest.$ac_objext \
6894 conftest$ac_exeext conftest.$ac_ext
bec39cab 6895fi
81ecdfbb
RW
6896{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
6897$as_echo "$ac_cv_var__etext" >&6; }
a9322a30 6898if test $ac_cv_var__etext = yes; then
60ca704f 6899
81ecdfbb 6900$as_echo "#define HAVE__ETEXT 1" >>confdefs.h
bec39cab 6901
bec39cab 6902fi
81ecdfbb
RW
6903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
6904$as_echo_n "checking for etext... " >&6; }
6905if test "${ac_cv_var_etext+set}" = set; then :
6906 $as_echo_n "(cached) " >&6
bec39cab 6907else
81ecdfbb 6908 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6909/* end confdefs.h. */
a9322a30
TT
6910#include <stdlib.h>
6911extern char etext;
bec39cab
AC
6912
6913int
6914main ()
6915{
a9322a30 6916free (&etext);
bec39cab
AC
6917 ;
6918 return 0;
6919}
6920_ACEOF
81ecdfbb 6921if ac_fn_c_try_link "$LINENO"; then :
a9322a30 6922 ac_cv_var_etext=yes
bec39cab 6923else
81ecdfbb 6924 ac_cv_var_etext=no
bec39cab 6925fi
81ecdfbb
RW
6926rm -f core conftest.err conftest.$ac_objext \
6927 conftest$ac_exeext conftest.$ac_ext
bec39cab 6928fi
81ecdfbb
RW
6929{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
6930$as_echo "$ac_cv_var_etext" >&6; }
a9322a30
TT
6931if test $ac_cv_var_etext = yes; then
6932
81ecdfbb 6933$as_echo "#define HAVE_ETEXT 1" >>confdefs.h
bec39cab
AC
6934
6935fi
a9322a30
TT
6936if test "$enable_profiling" = yes ; then
6937 if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
81ecdfbb 6938 as_fn_error "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
a9322a30
TT
6939 fi
6940 PROFILE_CFLAGS=-pg
6941 OLD_CFLAGS="$CFLAGS"
6942 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
bec39cab 6943
81ecdfbb
RW
6944 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
6945$as_echo_n "checking whether $CC supports -pg... " >&6; }
6946if test "${ac_cv_cc_supports_pg+set}" = set; then :
6947 $as_echo_n "(cached) " >&6
bec39cab 6948else
81ecdfbb 6949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6950/* end confdefs.h. */
bec39cab
AC
6951
6952int
6953main ()
6954{
a9322a30 6955int x;
bec39cab
AC
6956 ;
6957 return 0;
6958}
6959_ACEOF
81ecdfbb 6960if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 6961 ac_cv_cc_supports_pg=yes
bec39cab 6962else
81ecdfbb 6963 ac_cv_cc_supports_pg=no
bec39cab 6964fi
81ecdfbb 6965rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 6966fi
81ecdfbb
RW
6967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
6968$as_echo "$ac_cv_cc_supports_pg" >&6; }
bec39cab 6969
a9322a30 6970 if test $ac_cv_cc_supports_pg = no; then
81ecdfbb 6971 as_fn_error "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
a9322a30 6972 fi
bec39cab 6973
a9322a30 6974 CFLAGS="$OLD_CFLAGS"
bec39cab
AC
6975fi
6976
c16158bc
JM
6977
6978
81ecdfbb
RW
6979# Check whether --with-pkgversion was given.
6980if test "${with_pkgversion+set}" = set; then :
6981 withval=$with_pkgversion; case "$withval" in
6982 yes) as_fn_error "package version not specified" "$LINENO" 5 ;;
c16158bc
JM
6983 no) PKGVERSION= ;;
6984 *) PKGVERSION="($withval) " ;;
6985 esac
6986else
6987 PKGVERSION="(GDB) "
6988
81ecdfbb 6989fi
c16158bc
JM
6990
6991
6992
6993
81ecdfbb
RW
6994
6995# Check whether --with-bugurl was given.
6996if test "${with_bugurl+set}" = set; then :
6997 withval=$with_bugurl; case "$withval" in
6998 yes) as_fn_error "bug URL not specified" "$LINENO" 5 ;;
c16158bc
JM
6999 no) BUGURL=
7000 ;;
7001 *) BUGURL="$withval"
7002 ;;
7003 esac
7004else
7005 BUGURL="http://www.gnu.org/software/gdb/bugs/"
7006
81ecdfbb
RW
7007fi
7008
c16158bc
JM
7009 case ${BUGURL} in
7010 "")
7011 REPORT_BUGS_TO=
7012 REPORT_BUGS_TEXI=
7013 ;;
7014 *)
7015 REPORT_BUGS_TO="<$BUGURL>"
7016 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
7017 ;;
7018 esac;
7019
7020
7021
7022
7023cat >>confdefs.h <<_ACEOF
7024#define PKGVERSION "$PKGVERSION"
7025_ACEOF
7026
7027
7028cat >>confdefs.h <<_ACEOF
7029#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
7030_ACEOF
7031
7032
bec39cab
AC
7033# --------------------- #
7034# Checks for programs. #
7035# --------------------- #
7036
7037for ac_prog in gawk mawk nawk awk
7038do
7039 # Extract the first word of "$ac_prog", so it can be a program name with args.
7040set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
7041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7042$as_echo_n "checking for $ac_word... " >&6; }
7043if test "${ac_cv_prog_AWK+set}" = set; then :
7044 $as_echo_n "(cached) " >&6
bec39cab
AC
7045else
7046 if test -n "$AWK"; then
7047 ac_cv_prog_AWK="$AWK" # Let the user override the test.
7048else
7049as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7050for as_dir in $PATH
7051do
7052 IFS=$as_save_IFS
7053 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7054 for ac_exec_ext in '' $ac_executable_extensions; do
7055 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7056 ac_cv_prog_AWK="$ac_prog"
81ecdfbb 7057 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7058 break 2
7059 fi
7060done
81ecdfbb
RW
7061 done
7062IFS=$as_save_IFS
bec39cab
AC
7063
7064fi
7065fi
7066AWK=$ac_cv_prog_AWK
7067if test -n "$AWK"; then
81ecdfbb
RW
7068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
7069$as_echo "$AWK" >&6; }
bec39cab 7070else
81ecdfbb
RW
7071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7072$as_echo "no" >&6; }
bec39cab
AC
7073fi
7074
bec39cab 7075
81ecdfbb 7076 test -n "$AWK" && break
bec39cab
AC
7077done
7078
c971b7fa
PA
7079# Find a good install program. We prefer a C program (faster),
7080# so one script is as good as another. But avoid the broken or
7081# incompatible versions:
7082# SysV /etc/install, /usr/sbin/install
7083# SunOS /usr/etc/install
7084# IRIX /sbin/install
7085# AIX /bin/install
7086# AmigaOS /C/install, which installs bootblocks on floppy discs
7087# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
7088# AFS /usr/afsws/bin/install, which mishandles nonexistent args
7089# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
7090# OS/2's system install, which has a completely different semantic
7091# ./install, which can be erroneously created by make from ./install.sh.
7092# Reject install programs that cannot install multiple files.
7093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
7094$as_echo_n "checking for a BSD-compatible install... " >&6; }
7095if test -z "$INSTALL"; then
7096if test "${ac_cv_path_install+set}" = set; then :
7097 $as_echo_n "(cached) " >&6
7098else
7099 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7100for as_dir in $PATH
7101do
7102 IFS=$as_save_IFS
7103 test -z "$as_dir" && as_dir=.
7104 # Account for people who put trailing slashes in PATH elements.
7105case $as_dir/ in #((
7106 ./ | .// | /[cC]/* | \
7107 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
7108 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
7109 /usr/ucb/* ) ;;
7110 *)
7111 # OSF1 and SCO ODT 3.0 have their own names for install.
7112 # Don't use installbsd from OSF since it installs stuff as root
7113 # by default.
7114 for ac_prog in ginstall scoinst install; do
7115 for ac_exec_ext in '' $ac_executable_extensions; do
7116 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
7117 if test $ac_prog = install &&
7118 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7119 # AIX install. It has an incompatible calling convention.
7120 :
7121 elif test $ac_prog = install &&
7122 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7123 # program-specific install script used by HP pwplus--don't use.
7124 :
7125 else
7126 rm -rf conftest.one conftest.two conftest.dir
7127 echo one > conftest.one
7128 echo two > conftest.two
7129 mkdir conftest.dir
7130 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
7131 test -s conftest.one && test -s conftest.two &&
7132 test -s conftest.dir/conftest.one &&
7133 test -s conftest.dir/conftest.two
7134 then
7135 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
7136 break 3
7137 fi
7138 fi
7139 fi
7140 done
7141 done
7142 ;;
7143esac
7144
7145 done
7146IFS=$as_save_IFS
7147
7148rm -rf conftest.one conftest.two conftest.dir
7149
7150fi
7151 if test "${ac_cv_path_install+set}" = set; then
7152 INSTALL=$ac_cv_path_install
7153 else
7154 # As a last resort, use the slow shell script. Don't cache a
7155 # value for INSTALL within a source directory, because that will
7156 # break other packages using the cache if that directory is
7157 # removed, or if the value is a relative name.
7158 INSTALL=$ac_install_sh
7159 fi
7160fi
7161{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
7162$as_echo "$INSTALL" >&6; }
7163
7164# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7165# It thinks the first close brace ends the variable substitution.
7166test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7167
7168test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
7169
7170test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
bec39cab 7171
81ecdfbb
RW
7172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7173$as_echo_n "checking whether ln -s works... " >&6; }
bec39cab
AC
7174LN_S=$as_ln_s
7175if test "$LN_S" = "ln -s"; then
81ecdfbb
RW
7176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7177$as_echo "yes" >&6; }
bec39cab 7178else
81ecdfbb
RW
7179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
7180$as_echo "no, using $LN_S" >&6; }
bec39cab
AC
7181fi
7182
7183if test -n "$ac_tool_prefix"; then
7184 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7185set dummy ${ac_tool_prefix}ranlib; ac_word=$2
81ecdfbb
RW
7186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7187$as_echo_n "checking for $ac_word... " >&6; }
7188if test "${ac_cv_prog_RANLIB+set}" = set; then :
7189 $as_echo_n "(cached) " >&6
bec39cab
AC
7190else
7191 if test -n "$RANLIB"; then
7192 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7193else
7194as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7195for as_dir in $PATH
7196do
7197 IFS=$as_save_IFS
7198 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7199 for ac_exec_ext in '' $ac_executable_extensions; do
7200 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7201 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
81ecdfbb 7202 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7203 break 2
7204 fi
7205done
81ecdfbb
RW
7206 done
7207IFS=$as_save_IFS
bec39cab
AC
7208
7209fi
7210fi
7211RANLIB=$ac_cv_prog_RANLIB
7212if test -n "$RANLIB"; then
81ecdfbb
RW
7213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
7214$as_echo "$RANLIB" >&6; }
bec39cab 7215else
81ecdfbb
RW
7216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7217$as_echo "no" >&6; }
bec39cab
AC
7218fi
7219
81ecdfbb 7220
bec39cab
AC
7221fi
7222if test -z "$ac_cv_prog_RANLIB"; then
7223 ac_ct_RANLIB=$RANLIB
7224 # Extract the first word of "ranlib", so it can be a program name with args.
7225set dummy ranlib; ac_word=$2
81ecdfbb
RW
7226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7227$as_echo_n "checking for $ac_word... " >&6; }
7228if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
7229 $as_echo_n "(cached) " >&6
bec39cab
AC
7230else
7231 if test -n "$ac_ct_RANLIB"; then
7232 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7233else
7234as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7235for as_dir in $PATH
7236do
7237 IFS=$as_save_IFS
7238 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7239 for ac_exec_ext in '' $ac_executable_extensions; do
7240 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7241 ac_cv_prog_ac_ct_RANLIB="ranlib"
81ecdfbb 7242 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7243 break 2
7244 fi
7245done
81ecdfbb
RW
7246 done
7247IFS=$as_save_IFS
bec39cab 7248
bec39cab
AC
7249fi
7250fi
7251ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7252if test -n "$ac_ct_RANLIB"; then
81ecdfbb
RW
7253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
7254$as_echo "$ac_ct_RANLIB" >&6; }
bec39cab 7255else
81ecdfbb
RW
7256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7257$as_echo "no" >&6; }
bec39cab
AC
7258fi
7259
81ecdfbb
RW
7260 if test "x$ac_ct_RANLIB" = x; then
7261 RANLIB=":"
7262 else
7263 case $cross_compiling:$ac_tool_warned in
7264yes:)
7265{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7266$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7267ac_tool_warned=yes ;;
7268esac
7269 RANLIB=$ac_ct_RANLIB
7270 fi
bec39cab
AC
7271else
7272 RANLIB="$ac_cv_prog_RANLIB"
7273fi
7274
7275for ac_prog in 'bison -y' byacc
7276do
7277 # Extract the first word of "$ac_prog", so it can be a program name with args.
7278set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
7279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7280$as_echo_n "checking for $ac_word... " >&6; }
7281if test "${ac_cv_prog_YACC+set}" = set; then :
7282 $as_echo_n "(cached) " >&6
bec39cab
AC
7283else
7284 if test -n "$YACC"; then
7285 ac_cv_prog_YACC="$YACC" # Let the user override the test.
7286else
7287as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7288for as_dir in $PATH
7289do
7290 IFS=$as_save_IFS
7291 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7292 for ac_exec_ext in '' $ac_executable_extensions; do
7293 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7294 ac_cv_prog_YACC="$ac_prog"
81ecdfbb 7295 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7296 break 2
7297 fi
7298done
81ecdfbb
RW
7299 done
7300IFS=$as_save_IFS
bec39cab
AC
7301
7302fi
7303fi
7304YACC=$ac_cv_prog_YACC
7305if test -n "$YACC"; then
81ecdfbb
RW
7306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
7307$as_echo "$YACC" >&6; }
bec39cab 7308else
81ecdfbb
RW
7309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7310$as_echo "no" >&6; }
bec39cab
AC
7311fi
7312
81ecdfbb 7313
bec39cab
AC
7314 test -n "$YACC" && break
7315done
7316test -n "$YACC" || YACC="yacc"
7317
7318
7319if test -n "$ac_tool_prefix"; then
7320 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
7321set dummy ${ac_tool_prefix}ar; ac_word=$2
81ecdfbb
RW
7322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7323$as_echo_n "checking for $ac_word... " >&6; }
7324if test "${ac_cv_prog_AR+set}" = set; then :
7325 $as_echo_n "(cached) " >&6
bec39cab
AC
7326else
7327 if test -n "$AR"; then
7328 ac_cv_prog_AR="$AR" # Let the user override the test.
7329else
7330as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7331for as_dir in $PATH
7332do
7333 IFS=$as_save_IFS
7334 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7335 for ac_exec_ext in '' $ac_executable_extensions; do
7336 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7337 ac_cv_prog_AR="${ac_tool_prefix}ar"
81ecdfbb 7338 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7339 break 2
7340 fi
7341done
81ecdfbb
RW
7342 done
7343IFS=$as_save_IFS
bec39cab
AC
7344
7345fi
7346fi
7347AR=$ac_cv_prog_AR
7348if test -n "$AR"; then
81ecdfbb
RW
7349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
7350$as_echo "$AR" >&6; }
bec39cab 7351else
81ecdfbb
RW
7352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7353$as_echo "no" >&6; }
bec39cab
AC
7354fi
7355
81ecdfbb 7356
bec39cab
AC
7357fi
7358if test -z "$ac_cv_prog_AR"; then
7359 ac_ct_AR=$AR
7360 # Extract the first word of "ar", so it can be a program name with args.
7361set dummy ar; ac_word=$2
81ecdfbb
RW
7362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7363$as_echo_n "checking for $ac_word... " >&6; }
7364if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
7365 $as_echo_n "(cached) " >&6
bec39cab
AC
7366else
7367 if test -n "$ac_ct_AR"; then
7368 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
7369else
7370as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7371for as_dir in $PATH
7372do
7373 IFS=$as_save_IFS
7374 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7375 for ac_exec_ext in '' $ac_executable_extensions; do
7376 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7377 ac_cv_prog_ac_ct_AR="ar"
81ecdfbb 7378 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7379 break 2
7380 fi
7381done
81ecdfbb
RW
7382 done
7383IFS=$as_save_IFS
bec39cab
AC
7384
7385fi
7386fi
7387ac_ct_AR=$ac_cv_prog_ac_ct_AR
7388if test -n "$ac_ct_AR"; then
81ecdfbb
RW
7389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
7390$as_echo "$ac_ct_AR" >&6; }
bec39cab 7391else
81ecdfbb
RW
7392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7393$as_echo "no" >&6; }
bec39cab
AC
7394fi
7395
81ecdfbb
RW
7396 if test "x$ac_ct_AR" = x; then
7397 AR=""
7398 else
7399 case $cross_compiling:$ac_tool_warned in
7400yes:)
7401{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7402$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7403ac_tool_warned=yes ;;
7404esac
7405 AR=$ac_ct_AR
7406 fi
bec39cab
AC
7407else
7408 AR="$ac_cv_prog_AR"
7409fi
7410
7411if test -n "$ac_tool_prefix"; then
7412 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
7413set dummy ${ac_tool_prefix}dlltool; ac_word=$2
81ecdfbb
RW
7414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7415$as_echo_n "checking for $ac_word... " >&6; }
7416if test "${ac_cv_prog_DLLTOOL+set}" = set; then :
7417 $as_echo_n "(cached) " >&6
bec39cab
AC
7418else
7419 if test -n "$DLLTOOL"; then
7420 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
7421else
7422as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7423for as_dir in $PATH
7424do
7425 IFS=$as_save_IFS
7426 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7427 for ac_exec_ext in '' $ac_executable_extensions; do
7428 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7429 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
81ecdfbb 7430 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7431 break 2
7432 fi
7433done
81ecdfbb
RW
7434 done
7435IFS=$as_save_IFS
bec39cab
AC
7436
7437fi
7438fi
7439DLLTOOL=$ac_cv_prog_DLLTOOL
7440if test -n "$DLLTOOL"; then
81ecdfbb
RW
7441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
7442$as_echo "$DLLTOOL" >&6; }
bec39cab 7443else
81ecdfbb
RW
7444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7445$as_echo "no" >&6; }
bec39cab
AC
7446fi
7447
81ecdfbb 7448
bec39cab
AC
7449fi
7450if test -z "$ac_cv_prog_DLLTOOL"; then
7451 ac_ct_DLLTOOL=$DLLTOOL
7452 # Extract the first word of "dlltool", so it can be a program name with args.
7453set dummy dlltool; ac_word=$2
81ecdfbb
RW
7454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7455$as_echo_n "checking for $ac_word... " >&6; }
7456if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then :
7457 $as_echo_n "(cached) " >&6
bec39cab
AC
7458else
7459 if test -n "$ac_ct_DLLTOOL"; then
7460 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
7461else
7462as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7463for as_dir in $PATH
7464do
7465 IFS=$as_save_IFS
7466 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7467 for ac_exec_ext in '' $ac_executable_extensions; do
7468 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7469 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
81ecdfbb 7470 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7471 break 2
7472 fi
7473done
81ecdfbb
RW
7474 done
7475IFS=$as_save_IFS
bec39cab
AC
7476
7477fi
7478fi
7479ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
7480if test -n "$ac_ct_DLLTOOL"; then
81ecdfbb
RW
7481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
7482$as_echo "$ac_ct_DLLTOOL" >&6; }
bec39cab 7483else
81ecdfbb
RW
7484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7485$as_echo "no" >&6; }
bec39cab
AC
7486fi
7487
81ecdfbb
RW
7488 if test "x$ac_ct_DLLTOOL" = x; then
7489 DLLTOOL=""
7490 else
7491 case $cross_compiling:$ac_tool_warned in
7492yes:)
7493{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7494$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7495ac_tool_warned=yes ;;
7496esac
7497 DLLTOOL=$ac_ct_DLLTOOL
7498 fi
bec39cab
AC
7499else
7500 DLLTOOL="$ac_cv_prog_DLLTOOL"
7501fi
7502
7503if test -n "$ac_tool_prefix"; then
7504 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
7505set dummy ${ac_tool_prefix}windres; ac_word=$2
81ecdfbb
RW
7506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7507$as_echo_n "checking for $ac_word... " >&6; }
7508if test "${ac_cv_prog_WINDRES+set}" = set; then :
7509 $as_echo_n "(cached) " >&6
bec39cab
AC
7510else
7511 if test -n "$WINDRES"; then
7512 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
7513else
7514as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7515for as_dir in $PATH
7516do
7517 IFS=$as_save_IFS
7518 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7519 for ac_exec_ext in '' $ac_executable_extensions; do
7520 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7521 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
81ecdfbb 7522 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7523 break 2
7524 fi
7525done
81ecdfbb
RW
7526 done
7527IFS=$as_save_IFS
bec39cab
AC
7528
7529fi
7530fi
7531WINDRES=$ac_cv_prog_WINDRES
7532if test -n "$WINDRES"; then
81ecdfbb
RW
7533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
7534$as_echo "$WINDRES" >&6; }
bec39cab 7535else
81ecdfbb
RW
7536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7537$as_echo "no" >&6; }
bec39cab
AC
7538fi
7539
81ecdfbb 7540
bec39cab
AC
7541fi
7542if test -z "$ac_cv_prog_WINDRES"; then
7543 ac_ct_WINDRES=$WINDRES
7544 # Extract the first word of "windres", so it can be a program name with args.
7545set dummy windres; ac_word=$2
81ecdfbb
RW
7546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7547$as_echo_n "checking for $ac_word... " >&6; }
7548if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then :
7549 $as_echo_n "(cached) " >&6
bec39cab
AC
7550else
7551 if test -n "$ac_ct_WINDRES"; then
7552 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
7553else
7554as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7555for as_dir in $PATH
7556do
7557 IFS=$as_save_IFS
7558 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7559 for ac_exec_ext in '' $ac_executable_extensions; do
7560 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7561 ac_cv_prog_ac_ct_WINDRES="windres"
81ecdfbb 7562 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7563 break 2
7564 fi
7565done
81ecdfbb
RW
7566 done
7567IFS=$as_save_IFS
bec39cab
AC
7568
7569fi
7570fi
7571ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
7572if test -n "$ac_ct_WINDRES"; then
81ecdfbb
RW
7573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
7574$as_echo "$ac_ct_WINDRES" >&6; }
bec39cab 7575else
81ecdfbb
RW
7576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7577$as_echo "no" >&6; }
c906108c 7578fi
bec39cab 7579
81ecdfbb
RW
7580 if test "x$ac_ct_WINDRES" = x; then
7581 WINDRES=""
7582 else
7583 case $cross_compiling:$ac_tool_warned in
7584yes:)
7585{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7586$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7587ac_tool_warned=yes ;;
7588esac
7589 WINDRES=$ac_ct_WINDRES
7590 fi
c906108c 7591else
bec39cab 7592 WINDRES="$ac_cv_prog_WINDRES"
c906108c
SS
7593fi
7594
bec39cab 7595
036c3acb
TS
7596case $host_os in
7597 gnu*)
7598 # Needed for GNU Hurd hosts.
7599 if test -n "$ac_tool_prefix"; then
bec39cab
AC
7600 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
7601set dummy ${ac_tool_prefix}mig; ac_word=$2
81ecdfbb
RW
7602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7603$as_echo_n "checking for $ac_word... " >&6; }
7604if test "${ac_cv_prog_MIG+set}" = set; then :
7605 $as_echo_n "(cached) " >&6
c906108c 7606else
bec39cab
AC
7607 if test -n "$MIG"; then
7608 ac_cv_prog_MIG="$MIG" # Let the user override the test.
7609else
7610as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7611for as_dir in $PATH
7612do
7613 IFS=$as_save_IFS
7614 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7615 for ac_exec_ext in '' $ac_executable_extensions; do
7616 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7617 ac_cv_prog_MIG="${ac_tool_prefix}mig"
81ecdfbb 7618 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7619 break 2
7620 fi
7621done
81ecdfbb
RW
7622 done
7623IFS=$as_save_IFS
bec39cab 7624
c906108c 7625fi
bec39cab
AC
7626fi
7627MIG=$ac_cv_prog_MIG
7628if test -n "$MIG"; then
81ecdfbb
RW
7629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
7630$as_echo "$MIG" >&6; }
c906108c 7631else
81ecdfbb
RW
7632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7633$as_echo "no" >&6; }
c906108c
SS
7634fi
7635
81ecdfbb 7636
bec39cab
AC
7637fi
7638if test -z "$ac_cv_prog_MIG"; then
7639 ac_ct_MIG=$MIG
7640 # Extract the first word of "mig", so it can be a program name with args.
7641set dummy mig; ac_word=$2
81ecdfbb
RW
7642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7643$as_echo_n "checking for $ac_word... " >&6; }
7644if test "${ac_cv_prog_ac_ct_MIG+set}" = set; then :
7645 $as_echo_n "(cached) " >&6
bec39cab
AC
7646else
7647 if test -n "$ac_ct_MIG"; then
7648 ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
7649else
7650as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7651for as_dir in $PATH
7652do
7653 IFS=$as_save_IFS
7654 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7655 for ac_exec_ext in '' $ac_executable_extensions; do
7656 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7657 ac_cv_prog_ac_ct_MIG="mig"
81ecdfbb 7658 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7659 break 2
7660 fi
7661done
81ecdfbb
RW
7662 done
7663IFS=$as_save_IFS
c906108c 7664
bec39cab
AC
7665fi
7666fi
7667ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
7668if test -n "$ac_ct_MIG"; then
81ecdfbb
RW
7669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
7670$as_echo "$ac_ct_MIG" >&6; }
bec39cab 7671else
81ecdfbb
RW
7672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7673$as_echo "no" >&6; }
bec39cab 7674fi
c906108c 7675
81ecdfbb
RW
7676 if test "x$ac_ct_MIG" = x; then
7677 MIG=""
7678 else
7679 case $cross_compiling:$ac_tool_warned in
7680yes:)
7681{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7682$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7683ac_tool_warned=yes ;;
7684esac
7685 MIG=$ac_ct_MIG
7686 fi
bec39cab
AC
7687else
7688 MIG="$ac_cv_prog_MIG"
7689fi
c906108c 7690
036c3acb
TS
7691 if test x"$MIG" = x; then
7692 as_fn_error "MIG not found but required for $host hosts" "$LINENO" 5
7693 fi
7694 ;;
7695esac
c906108c 7696
bec39cab
AC
7697# ---------------------- #
7698# Checks for libraries. #
7699# ---------------------- #
c906108c 7700
bec39cab 7701# We might need to link with -lm; most simulators need it.
81ecdfbb
RW
7702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
7703$as_echo_n "checking for main in -lm... " >&6; }
7704if test "${ac_cv_lib_m_main+set}" = set; then :
7705 $as_echo_n "(cached) " >&6
bec39cab
AC
7706else
7707 ac_check_lib_save_LIBS=$LIBS
7708LIBS="-lm $LIBS"
81ecdfbb 7709cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7710/* end confdefs.h. */
c906108c 7711
c906108c 7712
bec39cab
AC
7713int
7714main ()
7715{
81ecdfbb 7716return main ();
bec39cab
AC
7717 ;
7718 return 0;
7719}
7720_ACEOF
81ecdfbb 7721if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
7722 ac_cv_lib_m_main=yes
7723else
81ecdfbb 7724 ac_cv_lib_m_main=no
bec39cab 7725fi
81ecdfbb
RW
7726rm -f core conftest.err conftest.$ac_objext \
7727 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
7728LIBS=$ac_check_lib_save_LIBS
7729fi
81ecdfbb
RW
7730{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
7731$as_echo "$ac_cv_lib_m_main" >&6; }
7732if test "x$ac_cv_lib_m_main" = x""yes; then :
bec39cab
AC
7733 cat >>confdefs.h <<_ACEOF
7734#define HAVE_LIBM 1
7735_ACEOF
7736
7737 LIBS="-lm $LIBS"
c906108c 7738
c906108c 7739fi
bec39cab
AC
7740
7741
bec39cab 7742# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
81ecdfbb
RW
7743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
7744$as_echo_n "checking for library containing gethostbyname... " >&6; }
7745if test "${ac_cv_search_gethostbyname+set}" = set; then :
7746 $as_echo_n "(cached) " >&6
bec39cab
AC
7747else
7748 ac_func_search_save_LIBS=$LIBS
81ecdfbb 7749cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7750/* end confdefs.h. */
ddc9cd0f 7751
81ecdfbb
RW
7752/* Override any GCC internal prototype to avoid an error.
7753 Use char because int might match the return type of a GCC
7754 builtin and then its argument prototype would still apply. */
bec39cab
AC
7755#ifdef __cplusplus
7756extern "C"
7757#endif
bec39cab
AC
7758char gethostbyname ();
7759int
7760main ()
7761{
81ecdfbb 7762return gethostbyname ();
bec39cab
AC
7763 ;
7764 return 0;
7765}
7766_ACEOF
81ecdfbb
RW
7767for ac_lib in '' nsl; do
7768 if test -z "$ac_lib"; then
7769 ac_res="none required"
7770 else
7771 ac_res=-l$ac_lib
b4e70030 7772 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
7773 fi
7774 if ac_fn_c_try_link "$LINENO"; then :
7775 ac_cv_search_gethostbyname=$ac_res
7776fi
7777rm -f core conftest.err conftest.$ac_objext \
7778 conftest$ac_exeext
7779 if test "${ac_cv_search_gethostbyname+set}" = set; then :
7780 break
7781fi
7782done
7783if test "${ac_cv_search_gethostbyname+set}" = set; then :
ddc9cd0f 7784
bec39cab 7785else
81ecdfbb 7786 ac_cv_search_gethostbyname=no
bec39cab 7787fi
81ecdfbb 7788rm conftest.$ac_ext
bec39cab
AC
7789LIBS=$ac_func_search_save_LIBS
7790fi
81ecdfbb
RW
7791{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
7792$as_echo "$ac_cv_search_gethostbyname" >&6; }
7793ac_res=$ac_cv_search_gethostbyname
7794if test "$ac_res" != no; then :
7795 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
96baa820 7796
bec39cab 7797fi
96baa820 7798
c906108c 7799
b4e70030 7800# Some systems (e.g. Solaris) have `socketpair' in libsocket.
81ecdfbb
RW
7801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
7802$as_echo_n "checking for library containing socketpair... " >&6; }
7803if test "${ac_cv_search_socketpair+set}" = set; then :
7804 $as_echo_n "(cached) " >&6
b4e70030
JB
7805else
7806 ac_func_search_save_LIBS=$LIBS
81ecdfbb 7807cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
7808/* end confdefs.h. */
7809
81ecdfbb
RW
7810/* Override any GCC internal prototype to avoid an error.
7811 Use char because int might match the return type of a GCC
7812 builtin and then its argument prototype would still apply. */
b4e70030
JB
7813#ifdef __cplusplus
7814extern "C"
7815#endif
b4e70030
JB
7816char socketpair ();
7817int
7818main ()
7819{
81ecdfbb 7820return socketpair ();
b4e70030
JB
7821 ;
7822 return 0;
7823}
7824_ACEOF
81ecdfbb
RW
7825for ac_lib in '' socket; do
7826 if test -z "$ac_lib"; then
7827 ac_res="none required"
7828 else
7829 ac_res=-l$ac_lib
b4e70030 7830 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
7831 fi
7832 if ac_fn_c_try_link "$LINENO"; then :
7833 ac_cv_search_socketpair=$ac_res
7834fi
7835rm -f core conftest.err conftest.$ac_objext \
7836 conftest$ac_exeext
7837 if test "${ac_cv_search_socketpair+set}" = set; then :
7838 break
7839fi
7840done
7841if test "${ac_cv_search_socketpair+set}" = set; then :
b4e70030 7842
b4e70030 7843else
81ecdfbb 7844 ac_cv_search_socketpair=no
b4e70030 7845fi
81ecdfbb 7846rm conftest.$ac_ext
b4e70030
JB
7847LIBS=$ac_func_search_save_LIBS
7848fi
81ecdfbb
RW
7849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
7850$as_echo "$ac_cv_search_socketpair" >&6; }
7851ac_res=$ac_cv_search_socketpair
7852if test "$ac_res" != no; then :
7853 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
b4e70030
JB
7854
7855fi
7856
7857
233a11ab 7858# Link in zlib if we can. This allows us to read compressed debug sections.
b040ad30 7859
711a72d3 7860 # Use the system's zlib library.
39f3de7c
L
7861 zlibdir="-L\$(top_builddir)/../zlib"
7862 zlibinc="-I\$(top_srcdir)/../zlib"
b040ad30 7863
711a72d3
L
7864# Check whether --with-system-zlib was given.
7865if test "${with_system_zlib+set}" = set; then :
afa59b79
L
7866 withval=$with_system_zlib; if test x$with_system_zlib = xyes ; then
7867 zlibdir=
7868 zlibinc=
7869 fi
b040ad30 7870
233a11ab 7871fi
233a11ab 7872
233a11ab 7873
233a11ab 7874
b040ad30 7875
233a11ab 7876
25268153 7877# On FreeBSD we may need libutil for kinfo_getvmmap (used by fbsd-nat.c).
37773e78 7878# On GNU/kFreeBSD systems, FreeBSD libutil is renamed to libutil-freebsd.
25268153
JB
7879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getvmmap" >&5
7880$as_echo_n "checking for library containing kinfo_getvmmap... " >&6; }
7881if test "${ac_cv_search_kinfo_getvmmap+set}" = set; then :
7882 $as_echo_n "(cached) " >&6
7883else
7884 ac_func_search_save_LIBS=$LIBS
7885cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7886/* end confdefs.h. */
7887
7888/* Override any GCC internal prototype to avoid an error.
7889 Use char because int might match the return type of a GCC
7890 builtin and then its argument prototype would still apply. */
7891#ifdef __cplusplus
7892extern "C"
7893#endif
7894char kinfo_getvmmap ();
7895int
7896main ()
7897{
7898return kinfo_getvmmap ();
7899 ;
7900 return 0;
7901}
7902_ACEOF
37773e78 7903for ac_lib in '' util util-freebsd; do
25268153
JB
7904 if test -z "$ac_lib"; then
7905 ac_res="none required"
7906 else
7907 ac_res=-l$ac_lib
7908 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7909 fi
7910 if ac_fn_c_try_link "$LINENO"; then :
7911 ac_cv_search_kinfo_getvmmap=$ac_res
7912fi
7913rm -f core conftest.err conftest.$ac_objext \
7914 conftest$ac_exeext
7915 if test "${ac_cv_search_kinfo_getvmmap+set}" = set; then :
7916 break
7917fi
7918done
7919if test "${ac_cv_search_kinfo_getvmmap+set}" = set; then :
7920
7921else
7922 ac_cv_search_kinfo_getvmmap=no
7923fi
7924rm conftest.$ac_ext
7925LIBS=$ac_func_search_save_LIBS
7926fi
7927{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getvmmap" >&5
7928$as_echo "$ac_cv_search_kinfo_getvmmap" >&6; }
7929ac_res=$ac_cv_search_kinfo_getvmmap
7930if test "$ac_res" != no; then :
7931 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7932
7933$as_echo "#define HAVE_KINFO_GETVMMAP 1" >>confdefs.h
7934
7935fi
7936
7937
77f120bf 7938
016a3251
DD
7939 if test "X$prefix" = "XNONE"; then
7940 acl_final_prefix="$ac_default_prefix"
7941 else
7942 acl_final_prefix="$prefix"
7943 fi
7944 if test "X$exec_prefix" = "XNONE"; then
7945 acl_final_exec_prefix='${prefix}'
7946 else
7947 acl_final_exec_prefix="$exec_prefix"
7948 fi
7949 acl_save_prefix="$prefix"
7950 prefix="$acl_final_prefix"
7951 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
7952 prefix="$acl_save_prefix"
7953
7954
7955# Check whether --with-gnu-ld was given.
7956if test "${with_gnu_ld+set}" = set; then :
7957 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
7958else
7959 with_gnu_ld=no
7960fi
7961
7962# Prepare PATH_SEPARATOR.
7963# The user is always right.
7964if test "${PATH_SEPARATOR+set}" != set; then
7965 echo "#! /bin/sh" >conf$$.sh
7966 echo "exit 0" >>conf$$.sh
7967 chmod +x conf$$.sh
7968 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
7969 PATH_SEPARATOR=';'
7970 else
7971 PATH_SEPARATOR=:
7972 fi
7973 rm -f conf$$.sh
7974fi
7975ac_prog=ld
7976if test "$GCC" = yes; then
7977 # Check if gcc -print-prog-name=ld gives a path.
7978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
7979$as_echo_n "checking for ld used by GCC... " >&6; }
7980 case $host in
7981 *-*-mingw*)
7982 # gcc leaves a trailing carriage return which upsets mingw
7983 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
7984 *)
7985 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
7986 esac
7987 case $ac_prog in
7988 # Accept absolute paths.
7989 [\\/]* | [A-Za-z]:[\\/]*)
7990 re_direlt='/[^/][^/]*/\.\./'
7991 # Canonicalize the path of ld
7992 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
7993 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
7994 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
7995 done
7996 test -z "$LD" && LD="$ac_prog"
7997 ;;
7998 "")
7999 # If it fails, then pretend we aren't using GCC.
8000 ac_prog=ld
8001 ;;
8002 *)
8003 # If it is relative, then search for the first ld in PATH.
8004 with_gnu_ld=unknown
8005 ;;
8006 esac
8007elif test "$with_gnu_ld" = yes; then
8008 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8009$as_echo_n "checking for GNU ld... " >&6; }
8010else
8011 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8012$as_echo_n "checking for non-GNU ld... " >&6; }
8013fi
8014if test "${acl_cv_path_LD+set}" = set; then :
8015 $as_echo_n "(cached) " >&6
8016else
8017 if test -z "$LD"; then
8018 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
8019 for ac_dir in $PATH; do
8020 test -z "$ac_dir" && ac_dir=.
8021 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8022 acl_cv_path_LD="$ac_dir/$ac_prog"
8023 # Check to see if the program is GNU ld. I'd rather use --version,
8024 # but apparently some GNU ld's only accept -v.
8025 # Break only if it was the GNU/non-GNU ld that we prefer.
8026 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
8027 test "$with_gnu_ld" != no && break
8028 else
8029 test "$with_gnu_ld" != yes && break
8030 fi
8031 fi
8032 done
8033 IFS="$ac_save_ifs"
8034else
8035 acl_cv_path_LD="$LD" # Let the user override the test with a path.
8036fi
8037fi
8038
8039LD="$acl_cv_path_LD"
8040if test -n "$LD"; then
8041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8042$as_echo "$LD" >&6; }
8043else
8044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8045$as_echo "no" >&6; }
8046fi
8047test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
8048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8049$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
8050if test "${acl_cv_prog_gnu_ld+set}" = set; then :
8051 $as_echo_n "(cached) " >&6
8052else
8053 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
8054if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
8055 acl_cv_prog_gnu_ld=yes
8056else
8057 acl_cv_prog_gnu_ld=no
8058fi
8059fi
8060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
8061$as_echo "$acl_cv_prog_gnu_ld" >&6; }
8062with_gnu_ld=$acl_cv_prog_gnu_ld
8063
8064
8065
8066 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
8067$as_echo_n "checking for shared library run path origin... " >&6; }
8068if test "${acl_cv_rpath+set}" = set; then :
8069 $as_echo_n "(cached) " >&6
8070else
8071
8072 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
8073 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
8074 . ./conftest.sh
8075 rm -f ./conftest.sh
8076 acl_cv_rpath=done
8077
8078fi
8079{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
8080$as_echo "$acl_cv_rpath" >&6; }
8081 wl="$acl_cv_wl"
8082 libext="$acl_cv_libext"
8083 shlibext="$acl_cv_shlibext"
8084 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
8085 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
8086 hardcode_direct="$acl_cv_hardcode_direct"
8087 hardcode_minus_L="$acl_cv_hardcode_minus_L"
8088 # Check whether --enable-rpath was given.
8089if test "${enable_rpath+set}" = set; then :
8090 enableval=$enable_rpath; :
8091else
8092 enable_rpath=yes
8093fi
8094
8095
8096
8097
8098
8099
8100
8101
8102 use_additional=yes
8103
8104 acl_save_prefix="$prefix"
8105 prefix="$acl_final_prefix"
8106 acl_save_exec_prefix="$exec_prefix"
8107 exec_prefix="$acl_final_exec_prefix"
8108
8109 eval additional_includedir=\"$includedir\"
8110 eval additional_libdir=\"$libdir\"
8111
8112 exec_prefix="$acl_save_exec_prefix"
8113 prefix="$acl_save_prefix"
77f120bf 8114
6c7a06a3 8115
81ecdfbb
RW
8116# Check whether --with-libiconv-prefix was given.
8117if test "${with_libiconv_prefix+set}" = set; then :
8118 withval=$with_libiconv_prefix;
016a3251
DD
8119 if test "X$withval" = "Xno"; then
8120 use_additional=no
8121 else
8122 if test "X$withval" = "X"; then
8123
8124 acl_save_prefix="$prefix"
8125 prefix="$acl_final_prefix"
8126 acl_save_exec_prefix="$exec_prefix"
8127 exec_prefix="$acl_final_exec_prefix"
8128
8129 eval additional_includedir=\"$includedir\"
8130 eval additional_libdir=\"$libdir\"
8131
8132 exec_prefix="$acl_save_exec_prefix"
8133 prefix="$acl_save_prefix"
8134
8135 else
8136 additional_includedir="$withval/include"
8137 additional_libdir="$withval/lib"
8138 fi
8139 fi
6c7a06a3 8140
81ecdfbb
RW
8141fi
8142
016a3251
DD
8143 LIBICONV=
8144 LTLIBICONV=
8145 INCICONV=
8146 rpathdirs=
8147 ltrpathdirs=
8148 names_already_handled=
8149 names_next_round='iconv '
8150 while test -n "$names_next_round"; do
8151 names_this_round="$names_next_round"
8152 names_next_round=
8153 for name in $names_this_round; do
8154 already_handled=
8155 for n in $names_already_handled; do
8156 if test "$n" = "$name"; then
8157 already_handled=yes
8158 break
8159 fi
8160 done
8161 if test -z "$already_handled"; then
8162 names_already_handled="$names_already_handled $name"
8163 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
8164 eval value=\"\$HAVE_LIB$uppername\"
8165 if test -n "$value"; then
8166 if test "$value" = yes; then
8167 eval value=\"\$LIB$uppername\"
8168 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
8169 eval value=\"\$LTLIB$uppername\"
8170 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
8171 else
8172 :
8173 fi
8174 else
8175 found_dir=
8176 found_la=
8177 found_so=
8178 found_a=
8179 if test $use_additional = yes; then
8180 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
8181 found_dir="$additional_libdir"
8182 found_so="$additional_libdir/lib$name.$shlibext"
8183 if test -f "$additional_libdir/lib$name.la"; then
8184 found_la="$additional_libdir/lib$name.la"
8185 fi
8186 else
8187 if test -f "$additional_libdir/lib$name.$libext"; then
8188 found_dir="$additional_libdir"
8189 found_a="$additional_libdir/lib$name.$libext"
8190 if test -f "$additional_libdir/lib$name.la"; then
8191 found_la="$additional_libdir/lib$name.la"
8192 fi
8193 fi
8194 fi
8195 fi
8196 if test "X$found_dir" = "X"; then
8197 for x in $LDFLAGS $LTLIBICONV; do
8198
8199 acl_save_prefix="$prefix"
8200 prefix="$acl_final_prefix"
8201 acl_save_exec_prefix="$exec_prefix"
8202 exec_prefix="$acl_final_exec_prefix"
8203 eval x=\"$x\"
8204 exec_prefix="$acl_save_exec_prefix"
8205 prefix="$acl_save_prefix"
8206
8207 case "$x" in
8208 -L*)
8209 dir=`echo "X$x" | sed -e 's/^X-L//'`
8210 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
8211 found_dir="$dir"
8212 found_so="$dir/lib$name.$shlibext"
8213 if test -f "$dir/lib$name.la"; then
8214 found_la="$dir/lib$name.la"
8215 fi
8216 else
8217 if test -f "$dir/lib$name.$libext"; then
8218 found_dir="$dir"
8219 found_a="$dir/lib$name.$libext"
8220 if test -f "$dir/lib$name.la"; then
8221 found_la="$dir/lib$name.la"
8222 fi
8223 fi
8224 fi
8225 ;;
8226 esac
8227 if test "X$found_dir" != "X"; then
8228 break
8229 fi
8230 done
8231 fi
8232 if test "X$found_dir" != "X"; then
8233 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
8234 if test "X$found_so" != "X"; then
8235 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
8236 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8237 else
8238 haveit=
8239 for x in $ltrpathdirs; do
8240 if test "X$x" = "X$found_dir"; then
8241 haveit=yes
8242 break
8243 fi
8244 done
8245 if test -z "$haveit"; then
8246 ltrpathdirs="$ltrpathdirs $found_dir"
8247 fi
8248 if test "$hardcode_direct" = yes; then
8249 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8250 else
8251 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
8252 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8253 haveit=
8254 for x in $rpathdirs; do
8255 if test "X$x" = "X$found_dir"; then
8256 haveit=yes
8257 break
8258 fi
8259 done
8260 if test -z "$haveit"; then
8261 rpathdirs="$rpathdirs $found_dir"
8262 fi
8263 else
8264 haveit=
8265 for x in $LDFLAGS $LIBICONV; do
8266
8267 acl_save_prefix="$prefix"
8268 prefix="$acl_final_prefix"
8269 acl_save_exec_prefix="$exec_prefix"
8270 exec_prefix="$acl_final_exec_prefix"
8271 eval x=\"$x\"
8272 exec_prefix="$acl_save_exec_prefix"
8273 prefix="$acl_save_prefix"
8274
8275 if test "X$x" = "X-L$found_dir"; then
8276 haveit=yes
8277 break
8278 fi
8279 done
8280 if test -z "$haveit"; then
8281 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
8282 fi
8283 if test "$hardcode_minus_L" != no; then
8284 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8285 else
8286 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8287 fi
8288 fi
8289 fi
8290 fi
8291 else
8292 if test "X$found_a" != "X"; then
8293 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
8294 else
8295 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
8296 fi
8297 fi
8298 additional_includedir=
8299 case "$found_dir" in
8300 */lib | */lib/)
8301 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
8302 additional_includedir="$basedir/include"
8303 ;;
8304 esac
8305 if test "X$additional_includedir" != "X"; then
8306 if test "X$additional_includedir" != "X/usr/include"; then
8307 haveit=
8308 if test "X$additional_includedir" = "X/usr/local/include"; then
8309 if test -n "$GCC"; then
8310 case $host_os in
8311 linux*) haveit=yes;;
8312 esac
8313 fi
8314 fi
8315 if test -z "$haveit"; then
8316 for x in $CPPFLAGS $INCICONV; do
8317
8318 acl_save_prefix="$prefix"
8319 prefix="$acl_final_prefix"
8320 acl_save_exec_prefix="$exec_prefix"
8321 exec_prefix="$acl_final_exec_prefix"
8322 eval x=\"$x\"
8323 exec_prefix="$acl_save_exec_prefix"
8324 prefix="$acl_save_prefix"
8325
8326 if test "X$x" = "X-I$additional_includedir"; then
8327 haveit=yes
8328 break
8329 fi
8330 done
8331 if test -z "$haveit"; then
8332 if test -d "$additional_includedir"; then
8333 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
8334 fi
8335 fi
8336 fi
8337 fi
8338 fi
8339 if test -n "$found_la"; then
8340 save_libdir="$libdir"
8341 case "$found_la" in
8342 */* | *\\*) . "$found_la" ;;
8343 *) . "./$found_la" ;;
8344 esac
8345 libdir="$save_libdir"
8346 for dep in $dependency_libs; do
8347 case "$dep" in
8348 -L*)
8349 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
8350 if test "X$additional_libdir" != "X/usr/lib"; then
8351 haveit=
8352 if test "X$additional_libdir" = "X/usr/local/lib"; then
8353 if test -n "$GCC"; then
8354 case $host_os in
8355 linux*) haveit=yes;;
8356 esac
8357 fi
8358 fi
8359 if test -z "$haveit"; then
8360 haveit=
8361 for x in $LDFLAGS $LIBICONV; do
8362
8363 acl_save_prefix="$prefix"
8364 prefix="$acl_final_prefix"
8365 acl_save_exec_prefix="$exec_prefix"
8366 exec_prefix="$acl_final_exec_prefix"
8367 eval x=\"$x\"
8368 exec_prefix="$acl_save_exec_prefix"
8369 prefix="$acl_save_prefix"
8370
8371 if test "X$x" = "X-L$additional_libdir"; then
8372 haveit=yes
8373 break
8374 fi
8375 done
8376 if test -z "$haveit"; then
8377 if test -d "$additional_libdir"; then
8378 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
8379 fi
8380 fi
8381 haveit=
8382 for x in $LDFLAGS $LTLIBICONV; do
8383
8384 acl_save_prefix="$prefix"
8385 prefix="$acl_final_prefix"
8386 acl_save_exec_prefix="$exec_prefix"
8387 exec_prefix="$acl_final_exec_prefix"
8388 eval x=\"$x\"
8389 exec_prefix="$acl_save_exec_prefix"
8390 prefix="$acl_save_prefix"
8391
8392 if test "X$x" = "X-L$additional_libdir"; then
8393 haveit=yes
8394 break
8395 fi
8396 done
8397 if test -z "$haveit"; then
8398 if test -d "$additional_libdir"; then
8399 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
8400 fi
8401 fi
8402 fi
8403 fi
8404 ;;
8405 -R*)
8406 dir=`echo "X$dep" | sed -e 's/^X-R//'`
8407 if test "$enable_rpath" != no; then
8408 haveit=
8409 for x in $rpathdirs; do
8410 if test "X$x" = "X$dir"; then
8411 haveit=yes
8412 break
8413 fi
8414 done
8415 if test -z "$haveit"; then
8416 rpathdirs="$rpathdirs $dir"
8417 fi
8418 haveit=
8419 for x in $ltrpathdirs; do
8420 if test "X$x" = "X$dir"; then
8421 haveit=yes
8422 break
8423 fi
8424 done
8425 if test -z "$haveit"; then
8426 ltrpathdirs="$ltrpathdirs $dir"
8427 fi
8428 fi
8429 ;;
8430 -l*)
8431 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
8432 ;;
8433 *.la)
8434 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
8435 ;;
8436 *)
8437 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
8438 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
8439 ;;
8440 esac
8441 done
8442 fi
8443 else
8444 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8445 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
8446 fi
8447 fi
8448 fi
8449 done
8450 done
8451 if test "X$rpathdirs" != "X"; then
8452 if test -n "$hardcode_libdir_separator"; then
8453 alldirs=
8454 for found_dir in $rpathdirs; do
8455 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
8456 done
8457 acl_save_libdir="$libdir"
8458 libdir="$alldirs"
8459 eval flag=\"$hardcode_libdir_flag_spec\"
8460 libdir="$acl_save_libdir"
8461 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8462 else
8463 for found_dir in $rpathdirs; do
8464 acl_save_libdir="$libdir"
8465 libdir="$found_dir"
8466 eval flag=\"$hardcode_libdir_flag_spec\"
8467 libdir="$acl_save_libdir"
8468 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8469 done
8470 fi
8471 fi
8472 if test "X$ltrpathdirs" != "X"; then
8473 for found_dir in $ltrpathdirs; do
8474 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
8475 done
8476 fi
8477
8478
8479
8480
8481
6c7a06a3 8482
6c7a06a3 8483
81ecdfbb
RW
8484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
8485$as_echo_n "checking for iconv... " >&6; }
8486if test "${am_cv_func_iconv+set}" = set; then :
8487 $as_echo_n "(cached) " >&6
d542061a 8488else
6c7a06a3
TT
8489
8490 am_cv_func_iconv="no, consider installing GNU libiconv"
8491 am_cv_lib_iconv=no
016a3251
DD
8492 am_save_CPPFLAGS="$CPPFLAGS"
8493 CPPFLAGS="$CPPFLAGS $INCICONV"
8494 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 8495/* end confdefs.h. */
6c7a06a3
TT
8496#include <stdlib.h>
8497#include <iconv.h>
d542061a
UW
8498int
8499main ()
8500{
6c7a06a3 8501iconv_t cd = iconv_open("","");
016a3251
DD
8502 iconv(cd,NULL,NULL,NULL,NULL);
8503 iconv_close(cd);
d542061a
UW
8504 ;
8505 return 0;
8506}
8507_ACEOF
81ecdfbb 8508if ac_fn_c_try_link "$LINENO"; then :
016a3251 8509 am_cv_func_iconv=yes
d542061a 8510fi
81ecdfbb
RW
8511rm -f core conftest.err conftest.$ac_objext \
8512 conftest$ac_exeext conftest.$ac_ext
016a3251 8513 CPPFLAGS="$am_save_CPPFLAGS"
94ae1714 8514
016a3251
DD
8515 if test "$am_cv_func_iconv" != yes && test -d ../libiconv; then
8516 for _libs in .libs _libs; do
8517 am_save_CPPFLAGS="$CPPFLAGS"
8518 am_save_LIBS="$LIBS"
8519 CPPFLAGS="$CPPFLAGS -I../libiconv/include"
8520 LIBS="$LIBS ../libiconv/lib/$_libs/libiconv.a"
8521 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 8522/* end confdefs.h. */
6c7a06a3
TT
8523#include <stdlib.h>
8524#include <iconv.h>
d542061a
UW
8525int
8526main ()
8527{
6c7a06a3 8528iconv_t cd = iconv_open("","");
016a3251
DD
8529 iconv(cd,NULL,NULL,NULL,NULL);
8530 iconv_close(cd);
d542061a
UW
8531 ;
8532 return 0;
8533}
8534_ACEOF
81ecdfbb 8535if ac_fn_c_try_link "$LINENO"; then :
016a3251
DD
8536 INCICONV="-I../libiconv/include"
8537 LIBICONV='${top_builddir}'/../libiconv/lib/$_libs/libiconv.a
8538 LTLIBICONV='${top_builddir}'/../libiconv/lib/libiconv.la
8539 am_cv_lib_iconv=yes
8540 am_cv_func_iconv=yes
d542061a 8541fi
81ecdfbb
RW
8542rm -f core conftest.err conftest.$ac_objext \
8543 conftest$ac_exeext conftest.$ac_ext
016a3251
DD
8544 CPPFLAGS="$am_save_CPPFLAGS"
8545 LIBS="$am_save_LIBS"
8546 if test "$am_cv_func_iconv" = "yes"; then
8547 break
8548 fi
8549 done
77f120bf 8550 fi
94ae1714 8551
4edb1e84 8552 if test "$am_cv_func_iconv" != yes; then
6c7a06a3 8553 am_save_CPPFLAGS="$CPPFLAGS"
4edb1e84 8554 am_save_LIBS="$LIBS"
016a3251
DD
8555 CPPFLAGS="$LIBS $INCICONV"
8556 LIBS="$LIBS $LIBICONV"
81ecdfbb 8557 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8558/* end confdefs.h. */
6c7a06a3
TT
8559#include <stdlib.h>
8560#include <iconv.h>
bec39cab
AC
8561int
8562main ()
8563{
6c7a06a3
TT
8564iconv_t cd = iconv_open("","");
8565 iconv(cd,NULL,NULL,NULL,NULL);
8566 iconv_close(cd);
bec39cab
AC
8567 ;
8568 return 0;
8569}
8570_ACEOF
81ecdfbb 8571if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 8572 am_cv_lib_iconv=yes
6c7a06a3 8573 am_cv_func_iconv=yes
627af7ea 8574fi
81ecdfbb
RW
8575rm -f core conftest.err conftest.$ac_objext \
8576 conftest$ac_exeext conftest.$ac_ext
fc3b640d 8577 CPPFLAGS="$am_save_CPPFLAGS"
016a3251 8578 LIBS="$am_save_LIBS"
6c7a06a3
TT
8579 fi
8580
8581fi
81ecdfbb
RW
8582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
8583$as_echo "$am_cv_func_iconv" >&6; }
016a3251
DD
8584 if test "$am_cv_func_iconv" = yes; then
8585
8586$as_echo "#define HAVE_ICONV 1" >>confdefs.h
94ae1714 8587
016a3251 8588 fi
fc3b640d 8589 if test "$am_cv_lib_iconv" = yes; then
016a3251
DD
8590
8591 for element in $INCICONV; do
8592 haveit=
8593 for x in $CPPFLAGS; do
8594
8595 acl_save_prefix="$prefix"
8596 prefix="$acl_final_prefix"
8597 acl_save_exec_prefix="$exec_prefix"
8598 exec_prefix="$acl_final_exec_prefix"
8599 eval x=\"$x\"
8600 exec_prefix="$acl_save_exec_prefix"
8601 prefix="$acl_save_prefix"
8602
8603 if test "X$x" = "X$element"; then
8604 haveit=yes
8605 break
8606 fi
8607 done
8608 if test -z "$haveit"; then
8609 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
8610 fi
8611 done
8612
8613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
8614$as_echo_n "checking how to link with libiconv... " >&6; }
8615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
8616$as_echo "$LIBICONV" >&6; }
94ae1714 8617 else
016a3251
DD
8618 LIBICONV=
8619 LTLIBICONV=
fc3b640d 8620 fi
94ae1714 8621
6c7a06a3 8622
6c7a06a3 8623
016a3251 8624 if test "$am_cv_func_iconv" = yes; then
81ecdfbb
RW
8625 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
8626$as_echo_n "checking for iconv declaration... " >&6; }
8627 if test "${am_cv_proto_iconv+set}" = set; then :
8628 $as_echo_n "(cached) " >&6
6c7a06a3
TT
8629else
8630
81ecdfbb 8631 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
8632/* end confdefs.h. */
8633
6c7a06a3
TT
8634#include <stdlib.h>
8635#include <iconv.h>
8636extern
b4e70030 8637#ifdef __cplusplus
6c7a06a3 8638"C"
b4e70030 8639#endif
6c7a06a3
TT
8640#if defined(__STDC__) || defined(__cplusplus)
8641size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
8642#else
8643size_t iconv();
8644#endif
8645
b4e70030
JB
8646int
8647main ()
8648{
6c7a06a3 8649
b4e70030
JB
8650 ;
8651 return 0;
8652}
8653_ACEOF
81ecdfbb 8654if ac_fn_c_try_compile "$LINENO"; then :
6c7a06a3 8655 am_cv_proto_iconv_arg1=""
4e8d927d 8656else
81ecdfbb 8657 am_cv_proto_iconv_arg1="const"
b4e70030 8658fi
81ecdfbb 8659rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6c7a06a3
TT
8660 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);"
8661fi
8662
8663 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
81ecdfbb 8664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
6c7a06a3 8665 }$am_cv_proto_iconv" >&5
81ecdfbb
RW
8666$as_echo "${ac_t:-
8667 }$am_cv_proto_iconv" >&6; }
6c7a06a3
TT
8668
8669cat >>confdefs.h <<_ACEOF
8670#define ICONV_CONST $am_cv_proto_iconv_arg1
8671_ACEOF
8672
8673 fi
6c7a06a3
TT
8674
8675
478aac75
DE
8676# GDB may fork/exec the iconv program to get the list of supported character
8677# sets. Allow the user to specify where to find it.
8678# There are several factors affecting the choice of option name:
8679# - There is already --with-libiconv-prefix but we can't use it, it specifies
8680# the build-time location of libiconv files.
8681# - The program we need to find is iconv, which comes with glibc. The user
8682# doesn't necessarily have libiconv installed. Therefore naming this
8683# --with-libiconv-foo feels wrong.
8684# - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is
8685# defined to work on directories not files (though it really doesn't know
8686# the difference).
8687# - Calling this --with-iconv-prefix is perceived to cause too much confusion
8688# with --with-libiconv-prefix.
8689# Putting these together is why the option name is --with-iconv-bin.
8690
8691
8692# Check whether --with-iconv-bin was given.
8693if test "${with_iconv_bin+set}" = set; then :
8694 withval=$with_iconv_bin; iconv_bin="${withval}"
8695
8696cat >>confdefs.h <<_ACEOF
8697#define ICONV_BIN "${iconv_bin}"
8698_ACEOF
8699
8700
8701 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
8702 if test "x$prefix" = xNONE; then
8703 test_prefix=/usr/local
8704 else
8705 test_prefix=$prefix
8706 fi
8707 else
8708 test_prefix=$exec_prefix
8709 fi
8710 value=0
8711 case ${iconv_bin} in
8712 "${test_prefix}"|"${test_prefix}/"*|\
8713 '${exec_prefix}'|'${exec_prefix}/'*)
8714 value=1
8715 ;;
8716 esac
8717
8718cat >>confdefs.h <<_ACEOF
8719#define ICONV_BIN_RELOCATABLE $value
8720_ACEOF
8721
8722
8723
8724fi
8725
8726
cb01cfba 8727# For the TUI, we need enhanced curses functionality.
bd8a8e1b 8728if test x"$enable_tui" != xno; then
cb01cfba
JB
8729 prefer_curses=yes
8730fi
8731
8732curses_found=no
8733if test x"$prefer_curses" = xyes; then
8734 # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
8735 # curses library because the latter might not provide all the
8736 # functionality we need. However, this leads to problems on systems
8737 # where the linker searches /usr/local/lib, but the compiler doesn't
8738 # search /usr/local/include, if ncurses is installed in /usr/local. A
8739 # default installation of ncurses on alpha*-dec-osf* will lead to such
8740 # a situation.
81ecdfbb
RW
8741 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
8742$as_echo_n "checking for library containing waddstr... " >&6; }
8743if test "${ac_cv_search_waddstr+set}" = set; then :
8744 $as_echo_n "(cached) " >&6
6c7a06a3
TT
8745else
8746 ac_func_search_save_LIBS=$LIBS
81ecdfbb 8747cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
8748/* end confdefs.h. */
8749
81ecdfbb
RW
8750/* Override any GCC internal prototype to avoid an error.
8751 Use char because int might match the return type of a GCC
8752 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
8753#ifdef __cplusplus
8754extern "C"
8755#endif
6c7a06a3
TT
8756char waddstr ();
8757int
8758main ()
8759{
81ecdfbb 8760return waddstr ();
6c7a06a3
TT
8761 ;
8762 return 0;
8763}
8764_ACEOF
5007d765 8765for ac_lib in '' ncursesw ncurses cursesX curses; do
81ecdfbb
RW
8766 if test -z "$ac_lib"; then
8767 ac_res="none required"
8768 else
8769 ac_res=-l$ac_lib
8770 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8771 fi
8772 if ac_fn_c_try_link "$LINENO"; then :
8773 ac_cv_search_waddstr=$ac_res
8774fi
8775rm -f core conftest.err conftest.$ac_objext \
8776 conftest$ac_exeext
8777 if test "${ac_cv_search_waddstr+set}" = set; then :
8778 break
8779fi
8780done
8781if test "${ac_cv_search_waddstr+set}" = set; then :
8782
6c7a06a3 8783else
81ecdfbb
RW
8784 ac_cv_search_waddstr=no
8785fi
8786rm conftest.$ac_ext
8787LIBS=$ac_func_search_save_LIBS
8788fi
8789{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
8790$as_echo "$ac_cv_search_waddstr" >&6; }
8791ac_res=$ac_cv_search_waddstr
8792if test "$ac_res" != no; then :
8793 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3
TT
8794
8795fi
8796
8797
cb01cfba
JB
8798 if test "$ac_cv_search_waddstr" != no; then
8799 curses_found=yes
8800 fi
8801fi
8802
8803# Check whether we should enable the TUI, but only do so if we really
8804# can.
8805if test x"$enable_tui" != xno; then
8806 if test -d $srcdir/tui; then
8807 if test "$curses_found" != no; then
6c7a06a3
TT
8808 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
8809 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
8810 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
8811 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
6c7a06a3
TT
8812 else
8813 if test x"$enable_tui" = xyes; then
81ecdfbb 8814 as_fn_error "no enhanced curses library found; disable TUI" "$LINENO" 5
6c7a06a3 8815 else
81ecdfbb
RW
8816 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
8817$as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
6c7a06a3
TT
8818 fi
8819 fi
8820 fi
8821fi
8822
8823# Since GDB uses Readline, we need termcap functionality. In many
8824# cases this will be provided by the curses library, but some systems
96fe4562 8825# have a separate termcap library, or no curses library at all.
6c7a06a3
TT
8826
8827case $host_os in
8828 cygwin*)
8829 if test -d $srcdir/libtermcap; then
8830 LIBS="../libtermcap/libtermcap.a $LIBS"
8831 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
8832 fi ;;
8833 go32* | *djgpp*)
8834 ac_cv_search_tgetent="none required"
8835 ;;
6c7a06a3
TT
8836esac
8837
8838# These are the libraries checked by Readline.
81ecdfbb
RW
8839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
8840$as_echo_n "checking for library containing tgetent... " >&6; }
8841if test "${ac_cv_search_tgetent+set}" = set; then :
8842 $as_echo_n "(cached) " >&6
6c7a06a3
TT
8843else
8844 ac_func_search_save_LIBS=$LIBS
81ecdfbb 8845cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
8846/* end confdefs.h. */
8847
81ecdfbb
RW
8848/* Override any GCC internal prototype to avoid an error.
8849 Use char because int might match the return type of a GCC
8850 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
8851#ifdef __cplusplus
8852extern "C"
8853#endif
6c7a06a3
TT
8854char tgetent ();
8855int
8856main ()
8857{
81ecdfbb 8858return tgetent ();
6c7a06a3
TT
8859 ;
8860 return 0;
8861}
8862_ACEOF
5007d765 8863for ac_lib in '' termcap tinfo curses ncursesw ncurses; do
81ecdfbb
RW
8864 if test -z "$ac_lib"; then
8865 ac_res="none required"
8866 else
8867 ac_res=-l$ac_lib
6c7a06a3 8868 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
8869 fi
8870 if ac_fn_c_try_link "$LINENO"; then :
8871 ac_cv_search_tgetent=$ac_res
8872fi
8873rm -f core conftest.err conftest.$ac_objext \
8874 conftest$ac_exeext
8875 if test "${ac_cv_search_tgetent+set}" = set; then :
8876 break
8877fi
8878done
8879if test "${ac_cv_search_tgetent+set}" = set; then :
6c7a06a3 8880
6c7a06a3 8881else
81ecdfbb 8882 ac_cv_search_tgetent=no
6c7a06a3 8883fi
81ecdfbb 8884rm conftest.$ac_ext
6c7a06a3
TT
8885LIBS=$ac_func_search_save_LIBS
8886fi
81ecdfbb
RW
8887{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
8888$as_echo "$ac_cv_search_tgetent" >&6; }
8889ac_res=$ac_cv_search_tgetent
8890if test "$ac_res" != no; then :
8891 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3 8892
06825bd1
MK
8893fi
8894
06825bd1 8895
bec39cab 8896if test "$ac_cv_search_tgetent" = no; then
7a85168d 8897 CONFIG_OBS="$CONFIG_OBS stub-termcap.o"
8ee53726
MK
8898fi
8899
3841debe 8900
81ecdfbb
RW
8901# Check whether --with-system-readline was given.
8902if test "${with_system_readline+set}" = set; then :
8903 withval=$with_system_readline;
8904fi
6a30b0a5 8905
6a30b0a5
AS
8906
8907if test "$with_system_readline" = yes; then
8908 READLINE=-lreadline
8909 READLINE_DEPS=
8910 READLINE_CFLAGS=
39037522 8911 READLINE_TEXI_INCFLAG=
6a30b0a5
AS
8912else
8913 READLINE='$(READLINE_DIR)/libreadline.a'
8914 READLINE_DEPS='$(READLINE)'
8915 READLINE_CFLAGS='-I$(READLINE_SRC)/..'
39037522 8916 READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
6a30b0a5
AS
8917fi
8918
8919
8920
8921
8922
f997c383
SD
8923# Generate jit-reader.h
8924
8925# This is typedeffed to GDB_CORE_ADDR in jit-reader.h
8926TARGET_PTR=
8927
8928# The cast to long int works around a bug in the HP C Compiler
8929# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8930# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8931# This bug is HP SR number 8606223364.
8932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5
8933$as_echo_n "checking size of unsigned long long... " >&6; }
8934if test "${ac_cv_sizeof_unsigned_long_long+set}" = set; then :
8935 $as_echo_n "(cached) " >&6
8936else
8937 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then :
8938
8939else
8940 if test "$ac_cv_type_unsigned_long_long" = yes; then
8941 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8942$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8943{ as_fn_set_status 77
8944as_fn_error "cannot compute sizeof (unsigned long long)
8945See \`config.log' for more details." "$LINENO" 5; }; }
8946 else
8947 ac_cv_sizeof_unsigned_long_long=0
8948 fi
8949fi
8950
8951fi
8952{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5
8953$as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; }
8954
8955
8956
8957cat >>confdefs.h <<_ACEOF
8958#define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
8959_ACEOF
8960
8961
8962# The cast to long int works around a bug in the HP C Compiler
8963# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8964# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8965# This bug is HP SR number 8606223364.
8966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
8967$as_echo_n "checking size of unsigned long... " >&6; }
8968if test "${ac_cv_sizeof_unsigned_long+set}" = set; then :
8969 $as_echo_n "(cached) " >&6
8970else
8971 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then :
8972
8973else
8974 if test "$ac_cv_type_unsigned_long" = yes; then
8975 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8976$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8977{ as_fn_set_status 77
8978as_fn_error "cannot compute sizeof (unsigned long)
8979See \`config.log' for more details." "$LINENO" 5; }; }
8980 else
8981 ac_cv_sizeof_unsigned_long=0
8982 fi
8983fi
8984
8985fi
8986{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
8987$as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
8988
8989
8990
8991cat >>confdefs.h <<_ACEOF
8992#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
8993_ACEOF
8994
8995
8996# The cast to long int works around a bug in the HP C Compiler
8997# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8998# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8999# This bug is HP SR number 8606223364.
9000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5
9001$as_echo_n "checking size of unsigned __int128... " >&6; }
9002if test "${ac_cv_sizeof_unsigned___int128+set}" = set; then :
9003 $as_echo_n "(cached) " >&6
9004else
9005 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then :
9006
9007else
9008 if test "$ac_cv_type_unsigned___int128" = yes; then
9009 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9010$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9011{ as_fn_set_status 77
9012as_fn_error "cannot compute sizeof (unsigned __int128)
9013See \`config.log' for more details." "$LINENO" 5; }; }
9014 else
9015 ac_cv_sizeof_unsigned___int128=0
9016 fi
9017fi
9018
9019fi
9020{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5
9021$as_echo "$ac_cv_sizeof_unsigned___int128" >&6; }
9022
9023
9024
9025cat >>confdefs.h <<_ACEOF
9026#define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128
9027_ACEOF
9028
9029
9030
9031if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
9032 TARGET_PTR="unsigned long"
9033elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
9034 TARGET_PTR="unsigned long long"
9035elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
9036 TARGET_PTR="unsigned __int128"
9037else
9038 TARGET_PTR="unsigned long"
9039fi
9040
9041
9042ac_config_files="$ac_config_files jit-reader.h:jit-reader.in"
9043
9044
a2d08b9e
SD
9045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
9046$as_echo_n "checking for library containing dlopen... " >&6; }
9047if test "${ac_cv_search_dlopen+set}" = set; then :
9048 $as_echo_n "(cached) " >&6
9049else
9050 ac_func_search_save_LIBS=$LIBS
9051cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9052/* end confdefs.h. */
9053
9054/* Override any GCC internal prototype to avoid an error.
9055 Use char because int might match the return type of a GCC
9056 builtin and then its argument prototype would still apply. */
9057#ifdef __cplusplus
9058extern "C"
9059#endif
9060char dlopen ();
9061int
9062main ()
9063{
9064return dlopen ();
9065 ;
9066 return 0;
9067}
9068_ACEOF
9069for ac_lib in '' dl; do
9070 if test -z "$ac_lib"; then
9071 ac_res="none required"
9072 else
9073 ac_res=-l$ac_lib
9074 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9075 fi
9076 if ac_fn_c_try_link "$LINENO"; then :
9077 ac_cv_search_dlopen=$ac_res
9078fi
9079rm -f core conftest.err conftest.$ac_objext \
9080 conftest$ac_exeext
9081 if test "${ac_cv_search_dlopen+set}" = set; then :
9082 break
9083fi
9084done
9085if test "${ac_cv_search_dlopen+set}" = set; then :
9086
9087else
9088 ac_cv_search_dlopen=no
9089fi
9090rm conftest.$ac_ext
9091LIBS=$ac_func_search_save_LIBS
9092fi
9093{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
9094$as_echo "$ac_cv_search_dlopen" >&6; }
9095ac_res=$ac_cv_search_dlopen
9096if test "$ac_res" != no; then :
9097 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9098
9099fi
9100
9101
39037522 9102
b8e0a31c
SD
9103
9104# Check whether --with-jit-reader-dir was given.
9105if test "${with_jit_reader_dir+set}" = set; then :
9106 withval=$with_jit_reader_dir;
9107 JIT_READER_DIR=$withval
9108else
9109 JIT_READER_DIR=${libdir}/gdb
9110fi
9111
9112
9113 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
9114 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9115 ac_define_dir=`eval echo $JIT_READER_DIR`
9116 ac_define_dir=`eval echo $ac_define_dir`
9117
9118cat >>confdefs.h <<_ACEOF
9119#define JIT_READER_DIR "$ac_define_dir"
9120_ACEOF
9121
9122
9123
9124
9125 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
9126 if test "x$prefix" = xNONE; then
9127 test_prefix=/usr/local
9128 else
9129 test_prefix=$prefix
9130 fi
9131 else
9132 test_prefix=$exec_prefix
9133 fi
9134 value=0
9135 case ${ac_define_dir} in
9136 "${test_prefix}"|"${test_prefix}/"*|\
9137 '${exec_prefix}'|'${exec_prefix}/'*)
9138 value=1
9139 ;;
9140 esac
9141
9142cat >>confdefs.h <<_ACEOF
9143#define JIT_READER_DIR_RELOCATABLE $value
9144_ACEOF
9145
9146
9147
9148
9149
81ecdfbb
RW
9150# Check whether --with-expat was given.
9151if test "${with_expat+set}" = set; then :
9152 withval=$with_expat;
5c39566f
DJ
9153else
9154 with_expat=auto
81ecdfbb
RW
9155fi
9156
9157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
9158$as_echo_n "checking whether to use expat... " >&6; }
9159{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
9160$as_echo "$with_expat" >&6; }
5c39566f
DJ
9161
9162if test "${with_expat}" = no; then
81ecdfbb
RW
9163 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
9164$as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
5c39566f
DJ
9165 HAVE_LIBEXPAT=no
9166else
9167
3841debe
DJ
9168
9169
9170
9171
9172
9173
9174
9175 use_additional=yes
9176
9177 acl_save_prefix="$prefix"
9178 prefix="$acl_final_prefix"
9179 acl_save_exec_prefix="$exec_prefix"
9180 exec_prefix="$acl_final_exec_prefix"
9181
9182 eval additional_includedir=\"$includedir\"
9183 eval additional_libdir=\"$libdir\"
9184
9185 exec_prefix="$acl_save_exec_prefix"
9186 prefix="$acl_save_prefix"
9187
9188
81ecdfbb
RW
9189# Check whether --with-libexpat-prefix was given.
9190if test "${with_libexpat_prefix+set}" = set; then :
9191 withval=$with_libexpat_prefix;
3841debe
DJ
9192 if test "X$withval" = "Xno"; then
9193 use_additional=no
9194 else
9195 if test "X$withval" = "X"; then
9196
9197 acl_save_prefix="$prefix"
9198 prefix="$acl_final_prefix"
9199 acl_save_exec_prefix="$exec_prefix"
9200 exec_prefix="$acl_final_exec_prefix"
9201
9202 eval additional_includedir=\"$includedir\"
9203 eval additional_libdir=\"$libdir\"
9204
9205 exec_prefix="$acl_save_exec_prefix"
9206 prefix="$acl_save_prefix"
9207
9208 else
9209 additional_includedir="$withval/include"
9210 additional_libdir="$withval/lib"
9211 fi
9212 fi
9213
81ecdfbb
RW
9214fi
9215
3841debe
DJ
9216 LIBEXPAT=
9217 LTLIBEXPAT=
9218 INCEXPAT=
9219 rpathdirs=
9220 ltrpathdirs=
9221 names_already_handled=
9222 names_next_round='expat '
9223 while test -n "$names_next_round"; do
9224 names_this_round="$names_next_round"
9225 names_next_round=
9226 for name in $names_this_round; do
9227 already_handled=
9228 for n in $names_already_handled; do
9229 if test "$n" = "$name"; then
9230 already_handled=yes
9231 break
9232 fi
9233 done
9234 if test -z "$already_handled"; then
9235 names_already_handled="$names_already_handled $name"
9236 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
9237 eval value=\"\$HAVE_LIB$uppername\"
9238 if test -n "$value"; then
9239 if test "$value" = yes; then
9240 eval value=\"\$LIB$uppername\"
9241 test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
9242 eval value=\"\$LTLIB$uppername\"
9243 test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
9244 else
9245 :
9246 fi
9247 else
9248 found_dir=
9249 found_la=
9250 found_so=
9251 found_a=
9252 if test $use_additional = yes; then
9253 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
9254 found_dir="$additional_libdir"
9255 found_so="$additional_libdir/lib$name.$shlibext"
9256 if test -f "$additional_libdir/lib$name.la"; then
9257 found_la="$additional_libdir/lib$name.la"
9258 fi
9259 else
9260 if test -f "$additional_libdir/lib$name.$libext"; then
9261 found_dir="$additional_libdir"
9262 found_a="$additional_libdir/lib$name.$libext"
9263 if test -f "$additional_libdir/lib$name.la"; then
9264 found_la="$additional_libdir/lib$name.la"
9265 fi
9266 fi
9267 fi
9268 fi
9269 if test "X$found_dir" = "X"; then
9270 for x in $LDFLAGS $LTLIBEXPAT; do
9271
9272 acl_save_prefix="$prefix"
9273 prefix="$acl_final_prefix"
9274 acl_save_exec_prefix="$exec_prefix"
9275 exec_prefix="$acl_final_exec_prefix"
9276 eval x=\"$x\"
9277 exec_prefix="$acl_save_exec_prefix"
9278 prefix="$acl_save_prefix"
9279
9280 case "$x" in
9281 -L*)
9282 dir=`echo "X$x" | sed -e 's/^X-L//'`
9283 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
9284 found_dir="$dir"
9285 found_so="$dir/lib$name.$shlibext"
9286 if test -f "$dir/lib$name.la"; then
9287 found_la="$dir/lib$name.la"
9288 fi
9289 else
9290 if test -f "$dir/lib$name.$libext"; then
9291 found_dir="$dir"
9292 found_a="$dir/lib$name.$libext"
9293 if test -f "$dir/lib$name.la"; then
9294 found_la="$dir/lib$name.la"
9295 fi
9296 fi
9297 fi
9298 ;;
9299 esac
9300 if test "X$found_dir" != "X"; then
9301 break
9302 fi
9303 done
9304 fi
9305 if test "X$found_dir" != "X"; then
9306 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
9307 if test "X$found_so" != "X"; then
9308 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
9309 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9310 else
9311 haveit=
9312 for x in $ltrpathdirs; do
9313 if test "X$x" = "X$found_dir"; then
9314 haveit=yes
9315 break
9316 fi
9317 done
9318 if test -z "$haveit"; then
9319 ltrpathdirs="$ltrpathdirs $found_dir"
9320 fi
9321 if test "$hardcode_direct" = yes; then
9322 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9323 else
9324 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
9325 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9326 haveit=
9327 for x in $rpathdirs; do
9328 if test "X$x" = "X$found_dir"; then
9329 haveit=yes
9330 break
9331 fi
9332 done
9333 if test -z "$haveit"; then
9334 rpathdirs="$rpathdirs $found_dir"
9335 fi
9336 else
9337 haveit=
9338 for x in $LDFLAGS $LIBEXPAT; do
9339
9340 acl_save_prefix="$prefix"
9341 prefix="$acl_final_prefix"
9342 acl_save_exec_prefix="$exec_prefix"
9343 exec_prefix="$acl_final_exec_prefix"
9344 eval x=\"$x\"
9345 exec_prefix="$acl_save_exec_prefix"
9346 prefix="$acl_save_prefix"
9347
9348 if test "X$x" = "X-L$found_dir"; then
9349 haveit=yes
9350 break
9351 fi
9352 done
9353 if test -z "$haveit"; then
9354 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
9355 fi
9356 if test "$hardcode_minus_L" != no; then
9357 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9358 else
9359 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9360 fi
9361 fi
9362 fi
9363 fi
9364 else
9365 if test "X$found_a" != "X"; then
9366 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
9367 else
9368 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
9369 fi
9370 fi
9371 additional_includedir=
9372 case "$found_dir" in
9373 */lib | */lib/)
9374 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
9375 additional_includedir="$basedir/include"
9376 ;;
9377 esac
9378 if test "X$additional_includedir" != "X"; then
9379 if test "X$additional_includedir" != "X/usr/include"; then
9380 haveit=
9381 if test "X$additional_includedir" = "X/usr/local/include"; then
9382 if test -n "$GCC"; then
9383 case $host_os in
9384 linux*) haveit=yes;;
9385 esac
9386 fi
9387 fi
9388 if test -z "$haveit"; then
9389 for x in $CPPFLAGS $INCEXPAT; do
9390
9391 acl_save_prefix="$prefix"
9392 prefix="$acl_final_prefix"
9393 acl_save_exec_prefix="$exec_prefix"
9394 exec_prefix="$acl_final_exec_prefix"
9395 eval x=\"$x\"
9396 exec_prefix="$acl_save_exec_prefix"
9397 prefix="$acl_save_prefix"
9398
9399 if test "X$x" = "X-I$additional_includedir"; then
9400 haveit=yes
9401 break
9402 fi
9403 done
9404 if test -z "$haveit"; then
9405 if test -d "$additional_includedir"; then
9406 INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
9407 fi
9408 fi
9409 fi
9410 fi
9411 fi
9412 if test -n "$found_la"; then
9413 save_libdir="$libdir"
9414 case "$found_la" in
9415 */* | *\\*) . "$found_la" ;;
9416 *) . "./$found_la" ;;
9417 esac
9418 libdir="$save_libdir"
9419 for dep in $dependency_libs; do
9420 case "$dep" in
9421 -L*)
9422 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
9423 if test "X$additional_libdir" != "X/usr/lib"; then
9424 haveit=
9425 if test "X$additional_libdir" = "X/usr/local/lib"; then
9426 if test -n "$GCC"; then
9427 case $host_os in
9428 linux*) haveit=yes;;
9429 esac
9430 fi
9431 fi
9432 if test -z "$haveit"; then
9433 haveit=
9434 for x in $LDFLAGS $LIBEXPAT; do
9435
9436 acl_save_prefix="$prefix"
9437 prefix="$acl_final_prefix"
9438 acl_save_exec_prefix="$exec_prefix"
9439 exec_prefix="$acl_final_exec_prefix"
9440 eval x=\"$x\"
9441 exec_prefix="$acl_save_exec_prefix"
9442 prefix="$acl_save_prefix"
9443
9444 if test "X$x" = "X-L$additional_libdir"; then
9445 haveit=yes
9446 break
9447 fi
9448 done
9449 if test -z "$haveit"; then
9450 if test -d "$additional_libdir"; then
9451 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
9452 fi
9453 fi
9454 haveit=
9455 for x in $LDFLAGS $LTLIBEXPAT; do
9456
9457 acl_save_prefix="$prefix"
9458 prefix="$acl_final_prefix"
9459 acl_save_exec_prefix="$exec_prefix"
9460 exec_prefix="$acl_final_exec_prefix"
9461 eval x=\"$x\"
9462 exec_prefix="$acl_save_exec_prefix"
9463 prefix="$acl_save_prefix"
9464
9465 if test "X$x" = "X-L$additional_libdir"; then
9466 haveit=yes
9467 break
9468 fi
9469 done
9470 if test -z "$haveit"; then
9471 if test -d "$additional_libdir"; then
9472 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
9473 fi
9474 fi
9475 fi
9476 fi
9477 ;;
9478 -R*)
9479 dir=`echo "X$dep" | sed -e 's/^X-R//'`
9480 if test "$enable_rpath" != no; then
9481 haveit=
9482 for x in $rpathdirs; do
9483 if test "X$x" = "X$dir"; then
9484 haveit=yes
9485 break
9486 fi
9487 done
9488 if test -z "$haveit"; then
9489 rpathdirs="$rpathdirs $dir"
9490 fi
9491 haveit=
9492 for x in $ltrpathdirs; do
9493 if test "X$x" = "X$dir"; then
9494 haveit=yes
9495 break
9496 fi
9497 done
9498 if test -z "$haveit"; then
9499 ltrpathdirs="$ltrpathdirs $dir"
9500 fi
9501 fi
9502 ;;
9503 -l*)
9504 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
9505 ;;
9506 *.la)
9507 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
9508 ;;
9509 *)
9510 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
9511 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
9512 ;;
81ecdfbb
RW
9513 esac
9514 done
9515 fi
9516 else
9517 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9518 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
9519 fi
9520 fi
9521 fi
9522 done
9523 done
9524 if test "X$rpathdirs" != "X"; then
9525 if test -n "$hardcode_libdir_separator"; then
9526 alldirs=
9527 for found_dir in $rpathdirs; do
9528 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
9529 done
9530 acl_save_libdir="$libdir"
9531 libdir="$alldirs"
9532 eval flag=\"$hardcode_libdir_flag_spec\"
9533 libdir="$acl_save_libdir"
9534 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9535 else
9536 for found_dir in $rpathdirs; do
9537 acl_save_libdir="$libdir"
9538 libdir="$found_dir"
9539 eval flag=\"$hardcode_libdir_flag_spec\"
9540 libdir="$acl_save_libdir"
9541 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9542 done
9543 fi
9544 fi
9545 if test "X$ltrpathdirs" != "X"; then
9546 for found_dir in $ltrpathdirs; do
9547 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
9548 done
9549 fi
a9322a30
TT
9550
9551
81ecdfbb 9552 ac_save_CPPFLAGS="$CPPFLAGS"
a9322a30 9553
81ecdfbb
RW
9554 for element in $INCEXPAT; do
9555 haveit=
9556 for x in $CPPFLAGS; do
a9322a30 9557
81ecdfbb
RW
9558 acl_save_prefix="$prefix"
9559 prefix="$acl_final_prefix"
9560 acl_save_exec_prefix="$exec_prefix"
9561 exec_prefix="$acl_final_exec_prefix"
9562 eval x=\"$x\"
9563 exec_prefix="$acl_save_exec_prefix"
9564 prefix="$acl_save_prefix"
a8111142 9565
81ecdfbb
RW
9566 if test "X$x" = "X$element"; then
9567 haveit=yes
9568 break
9569 fi
9570 done
9571 if test -z "$haveit"; then
9572 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
9573 fi
9574 done
a9322a30
TT
9575
9576
81ecdfbb
RW
9577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
9578$as_echo_n "checking for libexpat... " >&6; }
9579if test "${ac_cv_libexpat+set}" = set; then :
9580 $as_echo_n "(cached) " >&6
bec39cab 9581else
bec39cab 9582
81ecdfbb
RW
9583 ac_save_LIBS="$LIBS"
9584 LIBS="$LIBS $LIBEXPAT"
9585 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9586/* end confdefs.h. */
81ecdfbb
RW
9587#include "expat.h"
9588int
9589main ()
9590{
9591XML_Parser p = XML_ParserCreate (0);
9592 ;
9593 return 0;
9594}
bec39cab 9595_ACEOF
81ecdfbb
RW
9596if ac_fn_c_try_link "$LINENO"; then :
9597 ac_cv_libexpat=yes
c906108c 9598else
81ecdfbb 9599 ac_cv_libexpat=no
bec39cab 9600fi
81ecdfbb
RW
9601rm -f core conftest.err conftest.$ac_objext \
9602 conftest$ac_exeext conftest.$ac_ext
9603 LIBS="$ac_save_LIBS"
c906108c 9604
95ca63c4 9605fi
81ecdfbb
RW
9606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
9607$as_echo "$ac_cv_libexpat" >&6; }
9608 if test "$ac_cv_libexpat" = yes; then
9609 HAVE_LIBEXPAT=yes
bec39cab 9610
81ecdfbb 9611$as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
bec39cab 9612
81ecdfbb
RW
9613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
9614$as_echo_n "checking how to link with libexpat... " >&6; }
9615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
9616$as_echo "$LIBEXPAT" >&6; }
9617 else
9618 HAVE_LIBEXPAT=no
9619 CPPFLAGS="$ac_save_CPPFLAGS"
9620 LIBEXPAT=
9621 LTLIBEXPAT=
9622 fi
95ca63c4
CF
9623
9624
9625
7cb9022a
MK
9626
9627
bec39cab 9628
81ecdfbb
RW
9629 if test "$HAVE_LIBEXPAT" != yes; then
9630 if test "$with_expat" = yes; then
9631 as_fn_error "expat is missing or unusable" "$LINENO" 5
9632 else
9633 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
9634$as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
9635 fi
9636 else
9637 save_LIBS=$LIBS
9638 LIBS="$LIBS $LIBEXPAT"
9639 for ac_func in XML_StopParser
9640do :
9641 ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
9642if test "x$ac_cv_func_XML_StopParser" = x""yes; then :
bec39cab 9643 cat >>confdefs.h <<_ACEOF
81ecdfbb 9644#define HAVE_XML_STOPPARSER 1
bec39cab 9645_ACEOF
95ca63c4 9646
bec39cab 9647fi
bec39cab 9648done
95ca63c4 9649
81ecdfbb
RW
9650 LIBS=$save_LIBS
9651 fi
a9322a30
TT
9652fi
9653
2400729e
UW
9654
9655# Check whether --with-mpfr was given.
9656if test "${with_mpfr+set}" = set; then :
9657 withval=$with_mpfr;
9658else
9659 with_mpfr=auto
9660fi
9661
9662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use MPFR" >&5
9663$as_echo_n "checking whether to use MPFR... " >&6; }
9664{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_mpfr" >&5
9665$as_echo "$with_mpfr" >&6; }
9666
9667if test "${with_mpfr}" = no; then
9668 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR support disabled; some features may be unavailable." >&5
9669$as_echo "$as_me: WARNING: MPFR support disabled; some features may be unavailable." >&2;}
9670 HAVE_LIBMPFR=no
9671else
9672
9673
9674
9675
9676
9677
9678
9679
9680 use_additional=yes
9681
9682 acl_save_prefix="$prefix"
9683 prefix="$acl_final_prefix"
9684 acl_save_exec_prefix="$exec_prefix"
9685 exec_prefix="$acl_final_exec_prefix"
9686
9687 eval additional_includedir=\"$includedir\"
9688 eval additional_libdir=\"$libdir\"
9689
9690 exec_prefix="$acl_save_exec_prefix"
9691 prefix="$acl_save_prefix"
9692
9693
9694# Check whether --with-libmpfr-prefix was given.
9695if test "${with_libmpfr_prefix+set}" = set; then :
9696 withval=$with_libmpfr_prefix;
9697 if test "X$withval" = "Xno"; then
9698 use_additional=no
9699 else
9700 if test "X$withval" = "X"; then
9701
9702 acl_save_prefix="$prefix"
9703 prefix="$acl_final_prefix"
9704 acl_save_exec_prefix="$exec_prefix"
9705 exec_prefix="$acl_final_exec_prefix"
9706
9707 eval additional_includedir=\"$includedir\"
9708 eval additional_libdir=\"$libdir\"
9709
9710 exec_prefix="$acl_save_exec_prefix"
9711 prefix="$acl_save_prefix"
9712
9713 else
9714 additional_includedir="$withval/include"
9715 additional_libdir="$withval/lib"
9716 fi
9717 fi
9718
9719fi
9720
9721 LIBMPFR=
9722 LTLIBMPFR=
9723 INCMPFR=
9724 rpathdirs=
9725 ltrpathdirs=
9726 names_already_handled=
9727 names_next_round='mpfr '
9728 while test -n "$names_next_round"; do
9729 names_this_round="$names_next_round"
9730 names_next_round=
9731 for name in $names_this_round; do
9732 already_handled=
9733 for n in $names_already_handled; do
9734 if test "$n" = "$name"; then
9735 already_handled=yes
9736 break
9737 fi
9738 done
9739 if test -z "$already_handled"; then
9740 names_already_handled="$names_already_handled $name"
9741 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
9742 eval value=\"\$HAVE_LIB$uppername\"
9743 if test -n "$value"; then
9744 if test "$value" = yes; then
9745 eval value=\"\$LIB$uppername\"
9746 test -z "$value" || LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$value"
9747 eval value=\"\$LTLIB$uppername\"
9748 test -z "$value" || LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$value"
9749 else
9750 :
9751 fi
9752 else
9753 found_dir=
9754 found_la=
9755 found_so=
9756 found_a=
9757 if test $use_additional = yes; then
9758 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
9759 found_dir="$additional_libdir"
9760 found_so="$additional_libdir/lib$name.$shlibext"
9761 if test -f "$additional_libdir/lib$name.la"; then
9762 found_la="$additional_libdir/lib$name.la"
9763 fi
9764 else
9765 if test -f "$additional_libdir/lib$name.$libext"; then
9766 found_dir="$additional_libdir"
9767 found_a="$additional_libdir/lib$name.$libext"
9768 if test -f "$additional_libdir/lib$name.la"; then
9769 found_la="$additional_libdir/lib$name.la"
9770 fi
9771 fi
9772 fi
9773 fi
9774 if test "X$found_dir" = "X"; then
9775 for x in $LDFLAGS $LTLIBMPFR; do
9776
9777 acl_save_prefix="$prefix"
9778 prefix="$acl_final_prefix"
9779 acl_save_exec_prefix="$exec_prefix"
9780 exec_prefix="$acl_final_exec_prefix"
9781 eval x=\"$x\"
9782 exec_prefix="$acl_save_exec_prefix"
9783 prefix="$acl_save_prefix"
9784
9785 case "$x" in
9786 -L*)
9787 dir=`echo "X$x" | sed -e 's/^X-L//'`
9788 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
9789 found_dir="$dir"
9790 found_so="$dir/lib$name.$shlibext"
9791 if test -f "$dir/lib$name.la"; then
9792 found_la="$dir/lib$name.la"
9793 fi
9794 else
9795 if test -f "$dir/lib$name.$libext"; then
9796 found_dir="$dir"
9797 found_a="$dir/lib$name.$libext"
9798 if test -f "$dir/lib$name.la"; then
9799 found_la="$dir/lib$name.la"
9800 fi
9801 fi
9802 fi
9803 ;;
9804 esac
9805 if test "X$found_dir" != "X"; then
9806 break
9807 fi
9808 done
9809 fi
9810 if test "X$found_dir" != "X"; then
9811 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$found_dir -l$name"
9812 if test "X$found_so" != "X"; then
9813 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
9814 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
9815 else
9816 haveit=
9817 for x in $ltrpathdirs; do
9818 if test "X$x" = "X$found_dir"; then
9819 haveit=yes
9820 break
9821 fi
9822 done
9823 if test -z "$haveit"; then
9824 ltrpathdirs="$ltrpathdirs $found_dir"
9825 fi
9826 if test "$hardcode_direct" = yes; then
9827 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
9828 else
9829 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
9830 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
9831 haveit=
9832 for x in $rpathdirs; do
9833 if test "X$x" = "X$found_dir"; then
9834 haveit=yes
9835 break
9836 fi
9837 done
9838 if test -z "$haveit"; then
9839 rpathdirs="$rpathdirs $found_dir"
9840 fi
9841 else
9842 haveit=
9843 for x in $LDFLAGS $LIBMPFR; do
9844
9845 acl_save_prefix="$prefix"
9846 prefix="$acl_final_prefix"
9847 acl_save_exec_prefix="$exec_prefix"
9848 exec_prefix="$acl_final_exec_prefix"
9849 eval x=\"$x\"
9850 exec_prefix="$acl_save_exec_prefix"
9851 prefix="$acl_save_prefix"
9852
9853 if test "X$x" = "X-L$found_dir"; then
9854 haveit=yes
9855 break
9856 fi
9857 done
9858 if test -z "$haveit"; then
9859 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir"
9860 fi
9861 if test "$hardcode_minus_L" != no; then
9862 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
9863 else
9864 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name"
9865 fi
9866 fi
9867 fi
9868 fi
9869 else
9870 if test "X$found_a" != "X"; then
9871 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_a"
9872 else
9873 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir -l$name"
9874 fi
9875 fi
9876 additional_includedir=
9877 case "$found_dir" in
9878 */lib | */lib/)
9879 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
9880 additional_includedir="$basedir/include"
9881 ;;
9882 esac
9883 if test "X$additional_includedir" != "X"; then
9884 if test "X$additional_includedir" != "X/usr/include"; then
9885 haveit=
9886 if test "X$additional_includedir" = "X/usr/local/include"; then
9887 if test -n "$GCC"; then
9888 case $host_os in
9889 linux*) haveit=yes;;
9890 esac
9891 fi
9892 fi
9893 if test -z "$haveit"; then
9894 for x in $CPPFLAGS $INCMPFR; do
9895
9896 acl_save_prefix="$prefix"
9897 prefix="$acl_final_prefix"
9898 acl_save_exec_prefix="$exec_prefix"
9899 exec_prefix="$acl_final_exec_prefix"
9900 eval x=\"$x\"
9901 exec_prefix="$acl_save_exec_prefix"
9902 prefix="$acl_save_prefix"
9903
9904 if test "X$x" = "X-I$additional_includedir"; then
9905 haveit=yes
9906 break
9907 fi
9908 done
9909 if test -z "$haveit"; then
9910 if test -d "$additional_includedir"; then
9911 INCMPFR="${INCMPFR}${INCMPFR:+ }-I$additional_includedir"
9912 fi
9913 fi
9914 fi
9915 fi
9916 fi
9917 if test -n "$found_la"; then
9918 save_libdir="$libdir"
9919 case "$found_la" in
9920 */* | *\\*) . "$found_la" ;;
9921 *) . "./$found_la" ;;
9922 esac
9923 libdir="$save_libdir"
9924 for dep in $dependency_libs; do
9925 case "$dep" in
9926 -L*)
9927 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
9928 if test "X$additional_libdir" != "X/usr/lib"; then
9929 haveit=
9930 if test "X$additional_libdir" = "X/usr/local/lib"; then
9931 if test -n "$GCC"; then
9932 case $host_os in
9933 linux*) haveit=yes;;
9934 esac
9935 fi
9936 fi
9937 if test -z "$haveit"; then
9938 haveit=
9939 for x in $LDFLAGS $LIBMPFR; do
9940
9941 acl_save_prefix="$prefix"
9942 prefix="$acl_final_prefix"
9943 acl_save_exec_prefix="$exec_prefix"
9944 exec_prefix="$acl_final_exec_prefix"
9945 eval x=\"$x\"
9946 exec_prefix="$acl_save_exec_prefix"
9947 prefix="$acl_save_prefix"
9948
9949 if test "X$x" = "X-L$additional_libdir"; then
9950 haveit=yes
9951 break
9952 fi
9953 done
9954 if test -z "$haveit"; then
9955 if test -d "$additional_libdir"; then
9956 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$additional_libdir"
9957 fi
9958 fi
9959 haveit=
9960 for x in $LDFLAGS $LTLIBMPFR; do
9961
9962 acl_save_prefix="$prefix"
9963 prefix="$acl_final_prefix"
9964 acl_save_exec_prefix="$exec_prefix"
9965 exec_prefix="$acl_final_exec_prefix"
9966 eval x=\"$x\"
9967 exec_prefix="$acl_save_exec_prefix"
9968 prefix="$acl_save_prefix"
9969
9970 if test "X$x" = "X-L$additional_libdir"; then
9971 haveit=yes
9972 break
9973 fi
9974 done
9975 if test -z "$haveit"; then
9976 if test -d "$additional_libdir"; then
9977 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$additional_libdir"
9978 fi
9979 fi
9980 fi
9981 fi
9982 ;;
9983 -R*)
9984 dir=`echo "X$dep" | sed -e 's/^X-R//'`
9985 if test "$enable_rpath" != no; then
9986 haveit=
9987 for x in $rpathdirs; do
9988 if test "X$x" = "X$dir"; then
9989 haveit=yes
9990 break
9991 fi
9992 done
9993 if test -z "$haveit"; then
9994 rpathdirs="$rpathdirs $dir"
9995 fi
9996 haveit=
9997 for x in $ltrpathdirs; do
9998 if test "X$x" = "X$dir"; then
9999 haveit=yes
10000 break
10001 fi
10002 done
10003 if test -z "$haveit"; then
10004 ltrpathdirs="$ltrpathdirs $dir"
10005 fi
10006 fi
10007 ;;
10008 -l*)
10009 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10010 ;;
10011 *.la)
10012 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10013 ;;
10014 *)
10015 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$dep"
10016 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$dep"
10017 ;;
10018 esac
10019 done
10020 fi
10021 else
10022 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name"
10023 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-l$name"
10024 fi
10025 fi
10026 fi
10027 done
10028 done
10029 if test "X$rpathdirs" != "X"; then
10030 if test -n "$hardcode_libdir_separator"; then
10031 alldirs=
10032 for found_dir in $rpathdirs; do
10033 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10034 done
10035 acl_save_libdir="$libdir"
10036 libdir="$alldirs"
10037 eval flag=\"$hardcode_libdir_flag_spec\"
10038 libdir="$acl_save_libdir"
10039 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag"
10040 else
10041 for found_dir in $rpathdirs; do
10042 acl_save_libdir="$libdir"
10043 libdir="$found_dir"
10044 eval flag=\"$hardcode_libdir_flag_spec\"
10045 libdir="$acl_save_libdir"
10046 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag"
10047 done
10048 fi
10049 fi
10050 if test "X$ltrpathdirs" != "X"; then
10051 for found_dir in $ltrpathdirs; do
10052 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-R$found_dir"
10053 done
10054 fi
10055
10056
10057 ac_save_CPPFLAGS="$CPPFLAGS"
10058
10059 for element in $INCMPFR; do
10060 haveit=
10061 for x in $CPPFLAGS; do
10062
10063 acl_save_prefix="$prefix"
10064 prefix="$acl_final_prefix"
10065 acl_save_exec_prefix="$exec_prefix"
10066 exec_prefix="$acl_final_exec_prefix"
10067 eval x=\"$x\"
10068 exec_prefix="$acl_save_exec_prefix"
10069 prefix="$acl_save_prefix"
10070
10071 if test "X$x" = "X$element"; then
10072 haveit=yes
10073 break
10074 fi
10075 done
10076 if test -z "$haveit"; then
10077 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10078 fi
10079 done
10080
10081
10082 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmpfr" >&5
10083$as_echo_n "checking for libmpfr... " >&6; }
10084if test "${ac_cv_libmpfr+set}" = set; then :
10085 $as_echo_n "(cached) " >&6
10086else
10087
10088 ac_save_LIBS="$LIBS"
10089 LIBS="$LIBS $LIBMPFR"
10090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10091/* end confdefs.h. */
10092#include <mpfr.h>
10093int
10094main ()
10095{
10096mpfr_exp_t exp; mpfr_t x;
10097 mpfr_frexp (&exp, x, x, MPFR_RNDN);
10098 ;
10099 return 0;
10100}
10101_ACEOF
10102if ac_fn_c_try_link "$LINENO"; then :
10103 ac_cv_libmpfr=yes
10104else
10105 ac_cv_libmpfr=no
10106fi
10107rm -f core conftest.err conftest.$ac_objext \
10108 conftest$ac_exeext conftest.$ac_ext
10109 LIBS="$ac_save_LIBS"
10110
10111fi
10112{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libmpfr" >&5
10113$as_echo "$ac_cv_libmpfr" >&6; }
10114 if test "$ac_cv_libmpfr" = yes; then
10115 HAVE_LIBMPFR=yes
10116
10117$as_echo "#define HAVE_LIBMPFR 1" >>confdefs.h
10118
10119 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libmpfr" >&5
10120$as_echo_n "checking how to link with libmpfr... " >&6; }
10121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBMPFR" >&5
10122$as_echo "$LIBMPFR" >&6; }
10123 else
10124 HAVE_LIBMPFR=no
10125 CPPFLAGS="$ac_save_CPPFLAGS"
10126 LIBMPFR=
10127 LTLIBMPFR=
10128 fi
10129
10130
10131
10132
10133
10134
10135 if test "$HAVE_LIBMPFR" != yes; then
10136 if test "$with_mpfr" = yes; then
10137 as_fn_error "MPFR is missing or unusable" "$LINENO" 5
10138 else
10139 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR is missing or unusable; some features may be unavailable." >&5
10140$as_echo "$as_me: WARNING: MPFR is missing or unusable; some features may be unavailable." >&2;}
10141 fi
10142 fi
10143fi
10144
d344e670
DE
10145# --------------------- #
10146# Check for libpython. #
10147# --------------------- #
10148
a9322a30 10149
a9322a30
TT
10150
10151
ec685c5e 10152
0c4a4063 10153
81ecdfbb
RW
10154# Check whether --with-python was given.
10155if test "${with_python+set}" = set; then :
10156 withval=$with_python;
bec39cab 10157else
81ecdfbb 10158 with_python=auto
bec39cab 10159fi
bec39cab 10160
81ecdfbb
RW
10161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
10162$as_echo_n "checking whether to use python... " >&6; }
10163{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
10164$as_echo "$with_python" >&6; }
9a156167 10165
81ecdfbb
RW
10166if test "${with_python}" = no; then
10167 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
10168$as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
10169 have_libpython=no
bec39cab 10170else
81ecdfbb 10171 case "${with_python}" in
8c85a4e2 10172 [\\/]* | ?:[\\/]*)
ec685c5e
DE
10173 if test -d ${with_python}; then
10174 # Assume the python binary is ${with_python}/bin/python.
ec685c5e 10175 python_prog="${with_python}/bin/python"
0c4a4063 10176 python_prefix=
9c4ea6c5
JB
10177 # If python does not exit ${with_python}/bin, then try in
10178 # ${with_python}. On Windows/MinGW, this is where the Python
10179 # executable is.
10180 if test ! -x "${python_prog}"; then
10181 python_prog="${with_python}/python"
10182 python_prefix=
10183 fi
e7a30f46 10184 if test ! -x "${python_prog}"; then
ec685c5e
DE
10185 # Fall back to gdb 7.0/7.1 behaviour.
10186 python_prog=missing
0c4a4063 10187 python_prefix=${with_python}
ec685c5e 10188 fi
e7a30f46 10189 elif test -x "${with_python}"; then
ec685c5e
DE
10190 # While we can't run python compiled for $host (unless host == build),
10191 # the user could write a script that provides the needed information,
10192 # so we support that.
ec685c5e 10193 python_prog=${with_python}
0c4a4063 10194 python_prefix=
ec685c5e
DE
10195 else
10196 as_fn_error "invalid value for --with-python" "$LINENO" 5
10197 fi
81ecdfbb 10198 ;;
ec685c5e
DE
10199 */*)
10200 # Disallow --with-python=foo/bar.
81ecdfbb
RW
10201 as_fn_error "invalid value for --with-python" "$LINENO" 5
10202 ;;
ec685c5e
DE
10203 *)
10204 # The user has either specified auto, yes, or the name of the python
10205 # program assumed to be in $PATH.
10206 python_prefix=
10207 case "${with_python}" in
10208 yes | auto)
10209 if test ${build} = ${host}; then
10210 # Extract the first word of "python", so it can be a program name with args.
10211set dummy python; ac_word=$2
10212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10213$as_echo_n "checking for $ac_word... " >&6; }
10214if test "${ac_cv_path_python_prog_path+set}" = set; then :
10215 $as_echo_n "(cached) " >&6
10216else
10217 case $python_prog_path in
10218 [\\/]* | ?:[\\/]*)
10219 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
10220 ;;
10221 *)
10222 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10223for as_dir in $PATH
10224do
10225 IFS=$as_save_IFS
10226 test -z "$as_dir" && as_dir=.
10227 for ac_exec_ext in '' $ac_executable_extensions; do
10228 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10229 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
10230 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10231 break 2
10232 fi
10233done
10234 done
10235IFS=$as_save_IFS
10236
10237 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
10238 ;;
10239esac
10240fi
10241python_prog_path=$ac_cv_path_python_prog_path
10242if test -n "$python_prog_path"; then
10243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
10244$as_echo "$python_prog_path" >&6; }
10245else
10246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10247$as_echo "no" >&6; }
10248fi
10249
10250
10251 if test "${python_prog_path}" = missing; then
10252 python_prog=missing
10253 else
10254 python_prog=${python_prog_path}
10255 fi
10256 else
10257 # Not much we can do except assume the cross-compiler will find the
10258 # right files.
10259 python_prog=missing
10260 fi
10261 ;;
10262 *)
10263 # While we can't run python compiled for $host (unless host == build),
10264 # the user could write a script that provides the needed information,
10265 # so we support that.
10266 python_prog="${with_python}"
10267 # Extract the first word of "${python_prog}", so it can be a program name with args.
10268set dummy ${python_prog}; ac_word=$2
10269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10270$as_echo_n "checking for $ac_word... " >&6; }
10271if test "${ac_cv_path_python_prog_path+set}" = set; then :
10272 $as_echo_n "(cached) " >&6
10273else
10274 case $python_prog_path in
10275 [\\/]* | ?:[\\/]*)
10276 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
10277 ;;
10278 *)
10279 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10280for as_dir in $PATH
10281do
10282 IFS=$as_save_IFS
10283 test -z "$as_dir" && as_dir=.
10284 for ac_exec_ext in '' $ac_executable_extensions; do
10285 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10286 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
10287 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10288 break 2
10289 fi
10290done
10291 done
10292IFS=$as_save_IFS
10293
10294 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
10295 ;;
10296esac
10297fi
10298python_prog_path=$ac_cv_path_python_prog_path
10299if test -n "$python_prog_path"; then
10300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
10301$as_echo "$python_prog_path" >&6; }
10302else
10303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10304$as_echo "no" >&6; }
10305fi
10306
10307
10308 if test "${python_prog_path}" = missing; then
10309 as_fn_error "unable to find python program ${python_prog}" "$LINENO" 5
10310 fi
10311 ;;
10312 esac
81ecdfbb
RW
10313 esac
10314
ec685c5e 10315 if test "${python_prog}" != missing; then
e7a30f46
DE
10316 # We have a python program to use, but it may be too old.
10317 # Don't flag an error for --with-python=auto (the default).
10318 have_python_config=yes
ec685c5e
DE
10319 python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
10320 if test $? != 0; then
e7a30f46
DE
10321 have_python_config=failed
10322 if test "${with_python}" != auto; then
10323 as_fn_error "failure running python-config --includes" "$LINENO" 5
10324 fi
ec685c5e
DE
10325 fi
10326 python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
10327 if test $? != 0; then
e7a30f46
DE
10328 have_python_config=failed
10329 if test "${with_python}" != auto; then
10330 as_fn_error "failure running python-config --ldflags" "$LINENO" 5
10331 fi
ec685c5e 10332 fi
0c4a4063
DE
10333 python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
10334 if test $? != 0; then
e7a30f46
DE
10335 have_python_config=failed
10336 if test "${with_python}" != auto; then
10337 as_fn_error "failure running python-config --exec-prefix" "$LINENO" 5
10338 fi
0c4a4063 10339 fi
ec685c5e 10340 else
ac534cba
JB
10341 # We do not have a python executable we can use to determine where
10342 # to find the Python headers and libs. We cannot guess the include
10343 # path from the python_prefix either, because that include path
10344 # depends on the Python version. So, there is nothing much we can
10345 # do except assume that the compiler will be able to find those files.
10346 python_includes=
10347 python_libs=
0c4a4063 10348 have_python_config=no
ec685c5e 10349 fi
bec39cab 10350
ec685c5e
DE
10351 # If we have python-config, only try the configuration it provides.
10352 # Otherwise fallback on the old way of trying different versions of
10353 # python in turn.
81ecdfbb 10354
ec685c5e
DE
10355 have_libpython=no
10356 if test "${have_python_config}" = yes; then
c1039e3c
JB
10357 # Determine the Python version by extracting "-lpython<version>"
10358 # part of the python_libs. <version> is usually X.Y with X and Y
10359 # being decimal numbers, but can also be XY (seen on Windows).
10360 #
10361 # The extraction is performed using sed with a regular expression.
10362 # Initially, the regexp used was using the '?' quantifier to make
10363 # the dot in the version number optional. Unfortunately, this
10364 # does not work with non-GNU versions of sed because, because of
10365 # what looks like a limitation (the '?' quantifier does not work
10366 # with back-references). We work around this limitation by using
10367 # the '*' quantifier instead. It means that, in theory, we might
10368 # match unexpected version strings such as "-lpython2..7", but
10369 # this seems unlikely in practice. And even if that happens,
10370 # an error will be triggered later on, when checking that version
10371 # number.
ec685c5e 10372 python_version=`echo " ${python_libs} " \
c1039e3c 10373 | sed -e 's,^.* -l\(python[0-9]*[.]*[0-9]*\).*$,\1,'`
0c4a4063
DE
10374 case "${python_version}" in
10375 python*)
ec685c5e
DE
10376
10377 version=${python_version}
10378
10379 new_CPPFLAGS=${python_includes}
10380 new_LIBS=${python_libs}
81ecdfbb
RW
10381 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10382$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 10383 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 10384 save_LIBS=$LIBS
ec685c5e
DE
10385 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10386 LIBS="$LIBS $new_LIBS"
10387 found_usable_python=no
81ecdfbb 10388 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10389/* end confdefs.h. */
ac534cba 10390#include "Python.h"
81ecdfbb
RW
10391int
10392main ()
10393{
10394Py_Initialize ();
10395 ;
10396 return 0;
10397}
bec39cab 10398_ACEOF
81ecdfbb 10399if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
10400 have_libpython=${version}
10401 found_usable_python=yes
ac534cba
JB
10402 PYTHON_CPPFLAGS=$new_CPPFLAGS
10403 PYTHON_LIBS=$new_LIBS
9a156167 10404fi
81ecdfbb
RW
10405rm -f core conftest.err conftest.$ac_objext \
10406 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10407 CPPFLAGS=$save_CPPFLAGS
10408 LIBS=$save_LIBS
ec685c5e
DE
10409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10410$as_echo "${found_usable_python}" >&6; }
9a156167 10411
0c4a4063
DE
10412 ;;
10413 *)
ec685c5e 10414 as_fn_error "unable to determine python version from ${python_libs}" "$LINENO" 5
0c4a4063
DE
10415 ;;
10416 esac
e7a30f46 10417 elif test "${have_python_config}" != failed; then
ec685c5e 10418 if test "${have_libpython}" = no; then
9a156167 10419
420697bb
TT
10420 version=python2.7
10421
10422 new_CPPFLAGS=${python_includes}
10423 new_LIBS="${python_libs} -lpython2.7"
10424 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10425$as_echo_n "checking for ${version}... " >&6; }
10426 save_CPPFLAGS=$CPPFLAGS
10427 save_LIBS=$LIBS
10428 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10429 LIBS="$LIBS $new_LIBS"
10430 found_usable_python=no
10431 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10432/* end confdefs.h. */
ac534cba 10433#include "Python.h"
420697bb
TT
10434int
10435main ()
10436{
10437Py_Initialize ();
10438 ;
10439 return 0;
10440}
10441_ACEOF
10442if ac_fn_c_try_link "$LINENO"; then :
10443 have_libpython=${version}
10444 found_usable_python=yes
ac534cba
JB
10445 PYTHON_CPPFLAGS=$new_CPPFLAGS
10446 PYTHON_LIBS=$new_LIBS
420697bb
TT
10447fi
10448rm -f core conftest.err conftest.$ac_objext \
10449 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10450 CPPFLAGS=$save_CPPFLAGS
10451 LIBS=$save_LIBS
420697bb
TT
10452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10453$as_echo "${found_usable_python}" >&6; }
10454
10455 fi
10456 if test "${have_libpython}" = no; then
10457
ec685c5e
DE
10458 version=python2.6
10459
10460 new_CPPFLAGS=${python_includes}
10461 new_LIBS="${python_libs} -lpython2.6"
10462 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10463$as_echo_n "checking for ${version}... " >&6; }
10464 save_CPPFLAGS=$CPPFLAGS
10465 save_LIBS=$LIBS
10466 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10467 LIBS="$LIBS $new_LIBS"
10468 found_usable_python=no
10469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10470/* end confdefs.h. */
ac534cba 10471#include "Python.h"
ec685c5e
DE
10472int
10473main ()
10474{
10475Py_Initialize ();
10476 ;
10477 return 0;
10478}
10479_ACEOF
10480if ac_fn_c_try_link "$LINENO"; then :
10481 have_libpython=${version}
10482 found_usable_python=yes
ac534cba
JB
10483 PYTHON_CPPFLAGS=$new_CPPFLAGS
10484 PYTHON_LIBS=$new_LIBS
ec685c5e
DE
10485fi
10486rm -f core conftest.err conftest.$ac_objext \
10487 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10488 CPPFLAGS=$save_CPPFLAGS
10489 LIBS=$save_LIBS
ec685c5e
DE
10490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10491$as_echo "${found_usable_python}" >&6; }
9a156167 10492
81ecdfbb 10493 fi
ec685c5e 10494 if test ${have_libpython} = no; then
9a156167 10495
81ecdfbb 10496 version=python2.5
9a156167 10497
ec685c5e
DE
10498 new_CPPFLAGS=${python_includes}
10499 new_LIBS="${python_libs} -lpython2.5"
81ecdfbb
RW
10500 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10501$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 10502 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 10503 save_LIBS=$LIBS
ec685c5e
DE
10504 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10505 LIBS="$LIBS $new_LIBS"
10506 found_usable_python=no
81ecdfbb 10507 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 10508/* end confdefs.h. */
ac534cba 10509#include "Python.h"
81ecdfbb
RW
10510int
10511main ()
10512{
10513Py_Initialize ();
10514 ;
10515 return 0;
10516}
436868fb 10517_ACEOF
81ecdfbb 10518if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
10519 have_libpython=${version}
10520 found_usable_python=yes
ac534cba
JB
10521 PYTHON_CPPFLAGS=$new_CPPFLAGS
10522 PYTHON_LIBS=$new_LIBS
436868fb 10523fi
81ecdfbb
RW
10524rm -f core conftest.err conftest.$ac_objext \
10525 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10526 CPPFLAGS=$save_CPPFLAGS
10527 LIBS=$save_LIBS
ec685c5e
DE
10528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10529$as_echo "${found_usable_python}" >&6; }
a9322a30 10530
81ecdfbb 10531 fi
ec685c5e 10532 if test ${have_libpython} = no; then
a9322a30 10533
81ecdfbb 10534 version=python2.4
a9322a30 10535
ec685c5e
DE
10536 new_CPPFLAGS=${python_includes}
10537 new_LIBS="${python_libs} -lpython2.4"
81ecdfbb
RW
10538 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10539$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 10540 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 10541 save_LIBS=$LIBS
ec685c5e
DE
10542 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10543 LIBS="$LIBS $new_LIBS"
10544 found_usable_python=no
81ecdfbb 10545 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 10546/* end confdefs.h. */
ac534cba 10547#include "Python.h"
a9322a30
TT
10548int
10549main ()
10550{
81ecdfbb 10551Py_Initialize ();
a9322a30
TT
10552 ;
10553 return 0;
10554}
436868fb 10555_ACEOF
81ecdfbb 10556if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
10557 have_libpython=${version}
10558 found_usable_python=yes
ac534cba
JB
10559 PYTHON_CPPFLAGS=$new_CPPFLAGS
10560 PYTHON_LIBS=$new_LIBS
436868fb 10561fi
81ecdfbb
RW
10562rm -f core conftest.err conftest.$ac_objext \
10563 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10564 CPPFLAGS=$save_CPPFLAGS
10565 LIBS=$save_LIBS
ec685c5e
DE
10566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10567$as_echo "${found_usable_python}" >&6; }
81ecdfbb 10568
ec685c5e
DE
10569 fi
10570 fi
9c4ea6c5 10571 if test "${have_libpython}" = python2.7 -o "${have_libpython}" = python27; then
11763c18
TT
10572
10573$as_echo "#define HAVE_LIBPYTHON2_7 1" >>confdefs.h
10574
9c4ea6c5 10575 elif test "${have_libpython}" = python2.6 -o "${have_libpython}" = python26; then
ec685c5e
DE
10576
10577$as_echo "#define HAVE_LIBPYTHON2_6 1" >>confdefs.h
10578
9c4ea6c5 10579 elif test "${have_libpython}" = python2.5 -o "${have_libpython}" = python25; then
ec685c5e
DE
10580
10581$as_echo "#define HAVE_LIBPYTHON2_5 1" >>confdefs.h
10582
9c4ea6c5 10583 elif test "${have_libpython}" = python2.4 -o "${have_libpython}" = python24; then
81ecdfbb
RW
10584
10585$as_echo "#define HAVE_LIBPYTHON2_4 1" >>confdefs.h
10586
81ecdfbb 10587 fi
ec685c5e
DE
10588
10589 if test "${have_libpython}" = no; then
81ecdfbb
RW
10590 case "${with_python}" in
10591 yes)
10592 as_fn_error "python is missing or unusable" "$LINENO" 5
10593 ;;
10594 auto)
10595 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
10596$as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
10597 ;;
10598 *)
10599 as_fn_error "no usable python found at ${with_python}" "$LINENO" 5
10600 ;;
10601 esac
0c4a4063
DE
10602 else
10603 if test -n "${python_prefix}"; then
10604
10605cat >>confdefs.h <<_ACEOF
10606#define WITH_PYTHON_PATH "${python_prefix}"
10607_ACEOF
10608
10609
10610 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
10611 if test "x$prefix" = xNONE; then
10612 test_prefix=/usr/local
10613 else
10614 test_prefix=$prefix
10615 fi
10616 else
10617 test_prefix=$exec_prefix
10618 fi
10619 value=0
10620 case ${python_prefix} in
10621 "${test_prefix}"|"${test_prefix}/"*|\
10622 '${exec_prefix}'|'${exec_prefix}/'*)
10623 value=1
10624 ;;
10625 esac
10626
10627cat >>confdefs.h <<_ACEOF
10628#define PYTHON_PATH_RELOCATABLE $value
10629_ACEOF
10630
10631
10632 fi
81ecdfbb 10633 fi
436868fb 10634fi
436868fb 10635
ec685c5e 10636if test "${have_libpython}" != no; then
436868fb 10637
81ecdfbb 10638$as_echo "#define HAVE_PYTHON 1" >>confdefs.h
436868fb 10639
81ecdfbb
RW
10640 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
10641 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
10642 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
94f7449c 10643 CONFIG_INSTALL="$CONFIG_INSTALL install-python"
81ecdfbb 10644 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
436868fb 10645
81ecdfbb
RW
10646 # Flags needed to compile Python code (taken from python-config --cflags).
10647 # We cannot call python-config directly because it will output whatever was
10648 # used when compiling the Python interpreter itself, including flags which
10649 # would make the python-related objects be compiled differently from the
10650 # rest of GDB (e.g., -O2 and -fPIC).
10651 if test "${GCC}" = yes; then
10652 tentative_python_cflags="-fno-strict-aliasing -DNDEBUG -fwrapv"
10653 fi
436868fb 10654
81ecdfbb
RW
10655 if test "x${tentative_python_cflags}" != x; then
10656 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
10657$as_echo_n "checking compiler flags for python code... " >&6; }
10658 for flag in ${tentative_python_cflags}; do
10659 # Check that the compiler accepts it
10660 saved_CFLAGS="$CFLAGS"
10661 CFLAGS="$CFLAGS $flag"
10662 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10663/* end confdefs.h. */
81ecdfbb 10664
a9322a30
TT
10665int
10666main ()
10667{
a9322a30
TT
10668
10669 ;
10670 return 0;
10671}
bec39cab 10672_ACEOF
81ecdfbb
RW
10673if ac_fn_c_try_compile "$LINENO"; then :
10674 PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
bec39cab 10675fi
81ecdfbb
RW
10676rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10677 CFLAGS="$saved_CFLAGS"
10678 done
10679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
10680$as_echo "${PYTHON_CFLAGS}" >&6; }
10681 fi
043b6510 10682
c83393b9
JB
10683 # On x64 Windows, Python's include headers, and pyconfig.h in
10684 # particular, rely on MS_WIN64 macro to detect that it's a 64bit
10685 # version of Windows. Unfortunately, MS_WIN64 is only defined if
10686 # _MSC_VER, a Microsoft-specific macro, is defined. So, when
10687 # building on x64 Windows with GCC, we define MS_WIN64 ourselves.
10688 # The issue was reported to the Python community, but still isn't
10689 # solved as of 2012-10-02 (http://bugs.python.org/issue4709).
10690
043b6510 10691 case "$gdb_host" in
c83393b9
JB
10692 mingw64)
10693 if test "${GCC}" = yes; then
10694 CPPFLAGS="$CPPFLAGS -DMS_WIN64"
10695 fi
10696 ;;
043b6510 10697 esac
a8db4212
YPK
10698
10699 # Note that "python -m threading" cannot be used to check for
10700 # threading support due to a bug in Python 2.7.3
10701 # (http://bugs.python.org/issue15567).
10702 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether python supports threads" >&5
10703$as_echo_n "checking whether python supports threads... " >&6; }
10704 saved_CPPFLAGS="${CPPFLAGS}"
10705 CPPFLAGS="${PYTHON_CPPFLAGS}"
10706 # Note that the test is reversed so that python_has_threads=yes on
10707 # unexpected failures.
10708 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10709/* end confdefs.h. */
10710
10711#include <Python.h>
10712#ifdef WITH_THREAD
10713# error
10714#endif
10715
10716_ACEOF
10717if ac_fn_c_try_cpp "$LINENO"; then :
10718 python_has_threads=no
10719else
10720 python_has_threads=yes
10721fi
10722rm -f conftest.err conftest.$ac_ext
10723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_has_threads}" >&5
10724$as_echo "${python_has_threads}" >&6; }
10725 CPPFLAGS="${saved_CPPFLAGS}"
81ecdfbb 10726else
6dddc817
DE
10727 # Even if Python support is not compiled in, we need to have this file
10728 # included so that the "python" command, et.al., still exists.
10729 CONFIG_OBS="$CONFIG_OBS python.o"
10730 CONFIG_SRCS="$CONFIG_SRCS python/python.c"
a9322a30 10731fi
9a156167 10732
a4a1c157
PA
10733# Work around Python http://bugs.python.org/issue10112. See also
10734# http://bugs.python.org/issue11410, otherwise -Wl,--dynamic-list has
10735# no effect. Note that the only test after this that uses Python is
10736# the -rdynamic/-Wl,--dynamic-list test, and we do want that one to be
10737# run without -export-dynamic too.
10738PYTHON_LIBS=`echo $PYTHON_LIBS | sed -e 's/-Xlinker -export-dynamic//'`
10739
10740
ed3ef339
DE
10741
10742
4df42755
DE
10743 if test "${have_libpython}" != no; then
10744 HAVE_PYTHON_TRUE=
10745 HAVE_PYTHON_FALSE='#'
10746else
10747 HAVE_PYTHON_TRUE='#'
10748 HAVE_PYTHON_FALSE=
10749fi
10750
ed3ef339
DE
10751
10752# -------------------- #
10753# Check for libguile. #
10754# -------------------- #
10755
10756
e1402065
DE
10757
10758
10759
10760
10761# Check whether --with-guile was given.
10762if test "${with_guile+set}" = set; then :
10763 withval=$with_guile;
10764else
10765 with_guile=auto
10766fi
10767
10768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use guile" >&5
10769$as_echo_n "checking whether to use guile... " >&6; }
10770{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_guile" >&5
10771$as_echo "$with_guile" >&6; }
10772
ed3ef339
DE
10773# Extract the first word of "pkg-config", so it can be a program name with args.
10774set dummy pkg-config; ac_word=$2
10775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10776$as_echo_n "checking for $ac_word... " >&6; }
10777if test "${ac_cv_path_pkg_config_prog_path+set}" = set; then :
10778 $as_echo_n "(cached) " >&6
10779else
10780 case $pkg_config_prog_path in
10781 [\\/]* | ?:[\\/]*)
10782 ac_cv_path_pkg_config_prog_path="$pkg_config_prog_path" # Let the user override the test with a path.
10783 ;;
10784 *)
10785 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10786for as_dir in $PATH
10787do
10788 IFS=$as_save_IFS
10789 test -z "$as_dir" && as_dir=.
10790 for ac_exec_ext in '' $ac_executable_extensions; do
10791 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10792 ac_cv_path_pkg_config_prog_path="$as_dir/$ac_word$ac_exec_ext"
10793 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10794 break 2
10795 fi
10796done
10797 done
10798IFS=$as_save_IFS
10799
10800 test -z "$ac_cv_path_pkg_config_prog_path" && ac_cv_path_pkg_config_prog_path="missing"
10801 ;;
10802esac
10803fi
10804pkg_config_prog_path=$ac_cv_path_pkg_config_prog_path
10805if test -n "$pkg_config_prog_path"; then
10806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config_prog_path" >&5
10807$as_echo "$pkg_config_prog_path" >&6; }
10808else
10809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10810$as_echo "no" >&6; }
10811fi
10812
10813
10814
6e66f753 10815try_guile_versions="guile-2.0"
ed3ef339
DE
10816have_libguile=no
10817case "${with_guile}" in
10818no)
10819 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: guile support disabled; some features will be unavailable." >&5
10820$as_echo "$as_me: WARNING: guile support disabled; some features will be unavailable." >&2;}
10821 ;;
10822auto)
e1402065
DE
10823 if test "${pkg_config_prog_path}" = "missing"; then
10824 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found, guile support disabled" >&5
10825$as_echo "$as_me: WARNING: pkg-config not found, guile support disabled" >&2;}
10826 else
ed3ef339
DE
10827
10828 pkg_config=${pkg_config_prog_path}
10829 guile_version_list=${try_guile_versions}
10830 flag_errors=no
10831
ed3ef339
DE
10832 found_usable_guile=checking
10833 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
10834$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
10835 for guile_version in ${guile_version_list}; do
10836 ${pkg_config} --exists ${guile_version} 2>/dev/null
10837 if test $? != 0; then
10838 continue
10839 fi
10840 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
10841 if test $? != 0; then
10842 as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
10843 fi
10844 new_LIBS=`${pkg_config} --libs ${guile_version}`
10845 if test $? != 0; then
10846 as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
10847 fi
10848 found_usable_guile=${guile_version}
10849 break
10850 done
10851 if test "${found_usable_guile}" = "checking"; then
10852 if test "${flag_errors}" = "yes"; then
10853 as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
10854 else
10855 found_usable_guile=no
10856 fi
10857 fi
10858 if test "${found_usable_guile}" != no; then
10859 save_CPPFLAGS=$CPPFLAGS
10860 save_LIBS=$LIBS
10861 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10862 LIBS="$LIBS $new_LIBS"
10863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10864/* end confdefs.h. */
10865#include "libguile.h"
10866int
10867main ()
10868{
10869scm_init_guile ();
10870 ;
10871 return 0;
10872}
10873_ACEOF
10874if ac_fn_c_try_link "$LINENO"; then :
10875 have_libguile=yes
10876 GUILE_CPPFLAGS=$new_CPPFLAGS
10877 GUILE_LIBS=$new_LIBS
10878else
10879 found_usable_guile=no
10880fi
10881rm -f core conftest.err conftest.$ac_objext \
10882 conftest$ac_exeext conftest.$ac_ext
92fab5a6
AW
10883 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
10884if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then :
10885
10886$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
10887
10888
10889fi
10890
ed3ef339
DE
10891 CPPFLAGS=$save_CPPFLAGS
10892 LIBS=$save_LIBS
10893 if test "${found_usable_guile}" = no; then
10894 if test "${flag_errors}" = yes; then
10895 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10896$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10897as_fn_error "linking guile version ${guile_version} test program failed
10898See \`config.log' for more details." "$LINENO" 5; }
10899 fi
10900 fi
10901 fi
10902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
10903$as_echo "${found_usable_guile}" >&6; }
10904
e1402065 10905 fi
ed3ef339
DE
10906 ;;
10907yes)
e1402065
DE
10908 if test "${pkg_config_prog_path}" = "missing"; then
10909 as_fn_error "pkg-config not found" "$LINENO" 5
10910 fi
ed3ef339
DE
10911
10912 pkg_config=${pkg_config_prog_path}
10913 guile_version_list=${try_guile_versions}
10914 flag_errors=yes
10915
ed3ef339
DE
10916 found_usable_guile=checking
10917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
10918$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
10919 for guile_version in ${guile_version_list}; do
10920 ${pkg_config} --exists ${guile_version} 2>/dev/null
10921 if test $? != 0; then
10922 continue
10923 fi
10924 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
10925 if test $? != 0; then
10926 as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
10927 fi
10928 new_LIBS=`${pkg_config} --libs ${guile_version}`
10929 if test $? != 0; then
10930 as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
10931 fi
10932 found_usable_guile=${guile_version}
10933 break
10934 done
10935 if test "${found_usable_guile}" = "checking"; then
10936 if test "${flag_errors}" = "yes"; then
10937 as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
10938 else
10939 found_usable_guile=no
10940 fi
10941 fi
10942 if test "${found_usable_guile}" != no; then
10943 save_CPPFLAGS=$CPPFLAGS
10944 save_LIBS=$LIBS
10945 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10946 LIBS="$LIBS $new_LIBS"
10947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10948/* end confdefs.h. */
10949#include "libguile.h"
10950int
10951main ()
10952{
10953scm_init_guile ();
10954 ;
10955 return 0;
10956}
10957_ACEOF
10958if ac_fn_c_try_link "$LINENO"; then :
10959 have_libguile=yes
10960 GUILE_CPPFLAGS=$new_CPPFLAGS
10961 GUILE_LIBS=$new_LIBS
10962else
10963 found_usable_guile=no
10964fi
10965rm -f core conftest.err conftest.$ac_objext \
10966 conftest$ac_exeext conftest.$ac_ext
92fab5a6
AW
10967 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
10968if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then :
10969
10970$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
10971
10972
10973fi
10974
ed3ef339
DE
10975 CPPFLAGS=$save_CPPFLAGS
10976 LIBS=$save_LIBS
10977 if test "${found_usable_guile}" = no; then
10978 if test "${flag_errors}" = yes; then
10979 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10980$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10981as_fn_error "linking guile version ${guile_version} test program failed
10982See \`config.log' for more details." "$LINENO" 5; }
10983 fi
10984 fi
10985 fi
10986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
10987$as_echo "${found_usable_guile}" >&6; }
10988
10989 ;;
10990[\\/]* | ?:[\\/]*)
e1402065 10991 if test -x "${with_guile}"; then
ed3ef339
DE
10992
10993 pkg_config=${with_guile}
10994 guile_version_list=${try_guile_versions}
10995 flag_errors=yes
10996
ed3ef339
DE
10997 found_usable_guile=checking
10998 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
10999$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11000 for guile_version in ${guile_version_list}; do
11001 ${pkg_config} --exists ${guile_version} 2>/dev/null
11002 if test $? != 0; then
11003 continue
11004 fi
11005 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11006 if test $? != 0; then
11007 as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
11008 fi
11009 new_LIBS=`${pkg_config} --libs ${guile_version}`
11010 if test $? != 0; then
11011 as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
11012 fi
11013 found_usable_guile=${guile_version}
11014 break
11015 done
11016 if test "${found_usable_guile}" = "checking"; then
11017 if test "${flag_errors}" = "yes"; then
11018 as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
11019 else
11020 found_usable_guile=no
11021 fi
11022 fi
11023 if test "${found_usable_guile}" != no; then
11024 save_CPPFLAGS=$CPPFLAGS
11025 save_LIBS=$LIBS
11026 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11027 LIBS="$LIBS $new_LIBS"
11028 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11029/* end confdefs.h. */
11030#include "libguile.h"
11031int
11032main ()
11033{
11034scm_init_guile ();
11035 ;
11036 return 0;
11037}
11038_ACEOF
11039if ac_fn_c_try_link "$LINENO"; then :
11040 have_libguile=yes
11041 GUILE_CPPFLAGS=$new_CPPFLAGS
11042 GUILE_LIBS=$new_LIBS
11043else
11044 found_usable_guile=no
11045fi
11046rm -f core conftest.err conftest.$ac_objext \
11047 conftest$ac_exeext conftest.$ac_ext
92fab5a6
AW
11048 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
11049if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then :
11050
11051$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11052
11053
11054fi
11055
ed3ef339
DE
11056 CPPFLAGS=$save_CPPFLAGS
11057 LIBS=$save_LIBS
11058 if test "${found_usable_guile}" = no; then
11059 if test "${flag_errors}" = yes; then
11060 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11061$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11062as_fn_error "linking guile version ${guile_version} test program failed
11063See \`config.log' for more details." "$LINENO" 5; }
11064 fi
11065 fi
11066 fi
11067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11068$as_echo "${found_usable_guile}" >&6; }
11069
e1402065
DE
11070 else
11071 as_fn_error "Guile config program not executable: ${with_guile}" "$LINENO" 5
11072 fi
ed3ef339
DE
11073 ;;
11074"" | */*)
11075 # Disallow --with=guile="" and --with-guile=foo/bar.
11076 as_fn_error "invalid value for --with-guile" "$LINENO" 5
11077 ;;
11078*)
11079 # A space separate list of guile versions to try, in order.
e1402065
DE
11080 if test "${pkg_config_prog_path}" = "missing"; then
11081 as_fn_error "pkg-config not found" "$LINENO" 5
11082 fi
ed3ef339
DE
11083
11084 pkg_config=${pkg_config_prog_path}
11085 guile_version_list=${with_guile}
11086 flag_errors=yes
11087
ed3ef339
DE
11088 found_usable_guile=checking
11089 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11090$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11091 for guile_version in ${guile_version_list}; do
11092 ${pkg_config} --exists ${guile_version} 2>/dev/null
11093 if test $? != 0; then
11094 continue
11095 fi
11096 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11097 if test $? != 0; then
11098 as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
11099 fi
11100 new_LIBS=`${pkg_config} --libs ${guile_version}`
11101 if test $? != 0; then
11102 as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
11103 fi
11104 found_usable_guile=${guile_version}
11105 break
11106 done
11107 if test "${found_usable_guile}" = "checking"; then
11108 if test "${flag_errors}" = "yes"; then
11109 as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
11110 else
11111 found_usable_guile=no
11112 fi
11113 fi
11114 if test "${found_usable_guile}" != no; then
11115 save_CPPFLAGS=$CPPFLAGS
11116 save_LIBS=$LIBS
11117 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11118 LIBS="$LIBS $new_LIBS"
11119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11120/* end confdefs.h. */
11121#include "libguile.h"
11122int
11123main ()
11124{
11125scm_init_guile ();
11126 ;
11127 return 0;
11128}
11129_ACEOF
11130if ac_fn_c_try_link "$LINENO"; then :
11131 have_libguile=yes
11132 GUILE_CPPFLAGS=$new_CPPFLAGS
11133 GUILE_LIBS=$new_LIBS
11134else
11135 found_usable_guile=no
11136fi
11137rm -f core conftest.err conftest.$ac_objext \
11138 conftest$ac_exeext conftest.$ac_ext
92fab5a6
AW
11139 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
11140if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then :
11141
11142$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11143
11144
11145fi
11146
ed3ef339
DE
11147 CPPFLAGS=$save_CPPFLAGS
11148 LIBS=$save_LIBS
11149 if test "${found_usable_guile}" = no; then
11150 if test "${flag_errors}" = yes; then
11151 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11152$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11153as_fn_error "linking guile version ${guile_version} test program failed
11154See \`config.log' for more details." "$LINENO" 5; }
11155 fi
11156 fi
11157 fi
11158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11159$as_echo "${found_usable_guile}" >&6; }
11160
11161 ;;
11162esac
11163
e76c5d17 11164if test "${have_libguile}" != no; then
d342a0da
DE
11165 case "${with_guile}" in
11166 [\\/]* | ?:[\\/]*)
e76c5d17
DE
11167
11168 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
11169$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
11170if test "${ac_cv_guild_program_name+set}" = set; then :
11171 $as_echo_n "(cached) " >&6
11172else
d342a0da 11173 ac_cv_guild_program_name="`"${with_guile}" --variable guild "${guile_version}"`"
e76c5d17
DE
11174
11175 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
11176 # the 'guild' and 'bindir' variables. In that case, try to guess
11177 # what the program name is, at the risk of getting it wrong if
11178 # Guile was configured with '--program-suffix' or similar.
11179 if test "x$ac_cv_guild_program_name" = "x"; then
d342a0da 11180 guile_exec_prefix="`"${with_guile}" --variable exec_prefix "${guile_version}"`"
e76c5d17
DE
11181 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
11182 fi
11183
11184fi
11185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
11186$as_echo "$ac_cv_guild_program_name" >&6; }
11187
11188 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
11189 as_fn_error "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
11190 fi
11191
11192 GUILD="$ac_cv_guild_program_name"
11193
11194
d342a0da
DE
11195 ;;
11196 *)
11197
11198 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
11199$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
11200if test "${ac_cv_guild_program_name+set}" = set; then :
11201 $as_echo_n "(cached) " >&6
11202else
11203 ac_cv_guild_program_name="`"${pkg_config_prog_path}" --variable guild "${guile_version}"`"
11204
11205 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
11206 # the 'guild' and 'bindir' variables. In that case, try to guess
11207 # what the program name is, at the risk of getting it wrong if
11208 # Guile was configured with '--program-suffix' or similar.
11209 if test "x$ac_cv_guild_program_name" = "x"; then
11210 guile_exec_prefix="`"${pkg_config_prog_path}" --variable exec_prefix "${guile_version}"`"
11211 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
11212 fi
11213
11214fi
11215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
11216$as_echo "$ac_cv_guild_program_name" >&6; }
11217
11218 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
11219 as_fn_error "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
11220 fi
11221
11222 GUILD="$ac_cv_guild_program_name"
11223
11224
11225 ;;
11226 esac
e76c5d17
DE
11227
11228
11229 if test "$cross_compiling" = no; then
11230 GUILD_TARGET_FLAG=
11231 else
11232 GUILD_TARGET_FLAG="--target=$host"
11233 fi
11234
11235
11236
11237
11238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether guild supports this host" >&5
11239$as_echo_n "checking whether guild supports this host... " >&6; }
11240if test "${ac_cv_guild_ok+set}" = set; then :
11241 $as_echo_n "(cached) " >&6
11242else
11243 echo "$ac_cv_guild_program_name compile $GUILD_TARGET_FLAG -o conftest.go $srcdir/guile/lib/gdb/support.scm" >&5
11244 if "$ac_cv_guild_program_name" compile $GUILD_TARGET_FLAG -o conftest.go "$srcdir/guile/lib/gdb/support.scm" >&5 2>&5; then
11245 ac_cv_guild_ok=yes
11246 else
11247 ac_cv_guild_ok=no
11248 fi
11249fi
11250{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_ok" >&5
11251$as_echo "$ac_cv_guild_ok" >&6; }
11252
11253 if test "$ac_cv_guild_ok" = no; then
11254 have_libguile=no
11255 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling guile support" >&5
11256$as_echo "$as_me: WARNING: disabling guile support" >&2;}
11257 fi
11258fi
11259
ed3ef339
DE
11260if test "${have_libguile}" != no; then
11261
11262$as_echo "#define HAVE_GUILE 1" >>confdefs.h
11263
11264 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_GUILE_OBS)"
11265 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_GUILE_DEPS)"
11266 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_GUILE_SRCS)"
11267 CONFIG_INSTALL="$CONFIG_INSTALL install-guile"
11268 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_GUILE_CFLAGS)"
16954d5d
LC
11269
11270 save_LIBS="$LIBS"
11271 save_CPPFLAGS="$CPPFLAGS"
11272 LIBS="$GUILE_LIBS"
11273 CPPFLAGS="$GUILE_CPPFLAGS"
11274 for ac_func in scm_new_smob
11275do :
11276 ac_fn_c_check_func "$LINENO" "scm_new_smob" "ac_cv_func_scm_new_smob"
11277if test "x$ac_cv_func_scm_new_smob" = x""yes; then :
11278 cat >>confdefs.h <<_ACEOF
11279#define HAVE_SCM_NEW_SMOB 1
11280_ACEOF
11281
11282fi
11283done
11284
11285 LIBS="$save_LIBS"
11286 CPPFLAGS="$save_CPPFLAGS"
ed3ef339
DE
11287else
11288 # Even if Guile support is not compiled in, we need to have these files
11289 # included.
11290 CONFIG_OBS="$CONFIG_OBS guile.o"
11291 CONFIG_SRCS="$CONFIG_SRCS guile/guile.c"
11292fi
9a156167 11293
ac534cba 11294
4df42755
DE
11295 if test "${have_libguile}" != no; then
11296 HAVE_GUILE_TRUE=
11297 HAVE_GUILE_FALSE='#'
11298else
11299 HAVE_GUILE_TRUE='#'
11300 HAVE_GUILE_FALSE=
11301fi
11302
ac534cba 11303
d344e670
DE
11304# --------------------- #
11305# Check for libmcheck. #
11306# --------------------- #
11307
a8db4212
YPK
11308# Enable -lmcheck by default (it provides cheap-enough memory mangling),
11309# but turn it off if Python is enabled with threads, since -lmcheck is
11310# not thread safe (http://sourceware.org/bugzilla/show_bug.cgi?id=9939),
11311# and for releases.
17ef446e
PA
11312if test \( "${have_libpython}" = "no" -o "${python_has_threads}" = "no" \) \
11313 && $development; then
11314 libmcheck_default=yes
11315else
11316 libmcheck_default=no
a8db4212
YPK
11317fi
11318
17ef446e
PA
11319 # Check whether --enable-libmcheck was given.
11320if test "${enable_libmcheck+set}" = set; then :
11321 enableval=$enable_libmcheck; case "${enableval}" in
11322 yes | y) ENABLE_LIBMCHECK="yes" ;;
11323 no | n) ENABLE_LIBMCHECK="no" ;;
11324 *) as_fn_error "bad value ${enableval} for --enable-libmcheck" "$LINENO" 5 ;;
11325 esac
11326fi
11327
11328
11329 if test -z "${ENABLE_LIBMCHECK}"; then
11330 ENABLE_LIBMCHECK=${libmcheck_default}
a8db4212 11331 fi
17ef446e
PA
11332
11333 if test "$ENABLE_LIBMCHECK" = "yes" ; then
11334 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lmcheck" >&5
a8db4212
YPK
11335$as_echo_n "checking for main in -lmcheck... " >&6; }
11336if test "${ac_cv_lib_mcheck_main+set}" = set; then :
11337 $as_echo_n "(cached) " >&6
11338else
11339 ac_check_lib_save_LIBS=$LIBS
11340LIBS="-lmcheck $LIBS"
11341cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11342/* end confdefs.h. */
11343
11344
11345int
11346main ()
11347{
11348return main ();
11349 ;
11350 return 0;
11351}
11352_ACEOF
11353if ac_fn_c_try_link "$LINENO"; then :
11354 ac_cv_lib_mcheck_main=yes
11355else
11356 ac_cv_lib_mcheck_main=no
11357fi
11358rm -f core conftest.err conftest.$ac_objext \
11359 conftest$ac_exeext conftest.$ac_ext
11360LIBS=$ac_check_lib_save_LIBS
11361fi
11362{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mcheck_main" >&5
11363$as_echo "$ac_cv_lib_mcheck_main" >&6; }
11364if test "x$ac_cv_lib_mcheck_main" = x""yes; then :
11365 cat >>confdefs.h <<_ACEOF
11366#define HAVE_LIBMCHECK 1
11367_ACEOF
11368
11369 LIBS="-lmcheck $LIBS"
11370
11371fi
11372
17ef446e
PA
11373 fi
11374
11375
11376if test "$ENABLE_LIBMCHECK" = "yes" \
11377 -a "${have_libpython}" != "no" \
11378 -a "${python_has_threads}" = "yes" ; then
11379 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&5
11380$as_echo "$as_me: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&2;}
a8db4212
YPK
11381fi
11382
58bfce93
MM
11383
11384# Check whether --with-intel_pt was given.
11385if test "${with_intel_pt+set}" = set; then :
11386 withval=$with_intel_pt;
11387else
11388 with_intel_pt=auto
11389fi
11390
11391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5
11392$as_echo_n "checking whether to use intel pt... " >&6; }
11393{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5
11394$as_echo "$with_intel_pt" >&6; }
11395
11396if test "${with_intel_pt}" = no; then
bc504a31
PA
11397 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&5
11398$as_echo "$as_me: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&2;}
58bfce93
MM
11399 HAVE_LIBIPT=no
11400else
5599c404
MM
11401 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11402/* end confdefs.h. */
11403
11404#include <linux/perf_event.h>
11405#ifndef PERF_ATTR_SIZE_VER5
11406# error
11407#endif
11408
11409_ACEOF
11410if ac_fn_c_try_cpp "$LINENO"; then :
11411 perf_event=yes
11412else
11413 perf_event=no
11414fi
11415rm -f conftest.err conftest.$ac_ext
11416 if test "$perf_event" != yes; then
11417 if test "$with_intel_pt" = yes; then
11418 as_fn_error "linux/perf_event.h missing or too old" "$LINENO" 5
11419 else
11420 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5
11421$as_echo "$as_me: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&2;}
11422 fi
11423 fi
11424
58bfce93
MM
11425
11426
11427
11428
11429
11430
11431
11432
11433 use_additional=yes
11434
11435 acl_save_prefix="$prefix"
11436 prefix="$acl_final_prefix"
11437 acl_save_exec_prefix="$exec_prefix"
11438 exec_prefix="$acl_final_exec_prefix"
11439
11440 eval additional_includedir=\"$includedir\"
11441 eval additional_libdir=\"$libdir\"
11442
11443 exec_prefix="$acl_save_exec_prefix"
11444 prefix="$acl_save_prefix"
11445
11446
11447# Check whether --with-libipt-prefix was given.
11448if test "${with_libipt_prefix+set}" = set; then :
11449 withval=$with_libipt_prefix;
11450 if test "X$withval" = "Xno"; then
11451 use_additional=no
11452 else
11453 if test "X$withval" = "X"; then
11454
11455 acl_save_prefix="$prefix"
11456 prefix="$acl_final_prefix"
11457 acl_save_exec_prefix="$exec_prefix"
11458 exec_prefix="$acl_final_exec_prefix"
11459
11460 eval additional_includedir=\"$includedir\"
11461 eval additional_libdir=\"$libdir\"
11462
11463 exec_prefix="$acl_save_exec_prefix"
11464 prefix="$acl_save_prefix"
11465
11466 else
11467 additional_includedir="$withval/include"
11468 additional_libdir="$withval/lib"
11469 fi
11470 fi
11471
11472fi
11473
11474 LIBIPT=
11475 LTLIBIPT=
11476 INCIPT=
11477 rpathdirs=
11478 ltrpathdirs=
11479 names_already_handled=
11480 names_next_round='ipt '
11481 while test -n "$names_next_round"; do
11482 names_this_round="$names_next_round"
11483 names_next_round=
11484 for name in $names_this_round; do
11485 already_handled=
11486 for n in $names_already_handled; do
11487 if test "$n" = "$name"; then
11488 already_handled=yes
11489 break
11490 fi
11491 done
11492 if test -z "$already_handled"; then
11493 names_already_handled="$names_already_handled $name"
11494 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
11495 eval value=\"\$HAVE_LIB$uppername\"
11496 if test -n "$value"; then
11497 if test "$value" = yes; then
11498 eval value=\"\$LIB$uppername\"
11499 test -z "$value" || LIBIPT="${LIBIPT}${LIBIPT:+ }$value"
11500 eval value=\"\$LTLIB$uppername\"
11501 test -z "$value" || LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$value"
11502 else
11503 :
11504 fi
11505 else
11506 found_dir=
11507 found_la=
11508 found_so=
11509 found_a=
11510 if test $use_additional = yes; then
11511 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
11512 found_dir="$additional_libdir"
11513 found_so="$additional_libdir/lib$name.$shlibext"
11514 if test -f "$additional_libdir/lib$name.la"; then
11515 found_la="$additional_libdir/lib$name.la"
11516 fi
11517 else
11518 if test -f "$additional_libdir/lib$name.$libext"; then
11519 found_dir="$additional_libdir"
11520 found_a="$additional_libdir/lib$name.$libext"
11521 if test -f "$additional_libdir/lib$name.la"; then
11522 found_la="$additional_libdir/lib$name.la"
11523 fi
11524 fi
11525 fi
11526 fi
11527 if test "X$found_dir" = "X"; then
11528 for x in $LDFLAGS $LTLIBIPT; do
11529
11530 acl_save_prefix="$prefix"
11531 prefix="$acl_final_prefix"
11532 acl_save_exec_prefix="$exec_prefix"
11533 exec_prefix="$acl_final_exec_prefix"
11534 eval x=\"$x\"
11535 exec_prefix="$acl_save_exec_prefix"
11536 prefix="$acl_save_prefix"
11537
11538 case "$x" in
11539 -L*)
11540 dir=`echo "X$x" | sed -e 's/^X-L//'`
11541 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
11542 found_dir="$dir"
11543 found_so="$dir/lib$name.$shlibext"
11544 if test -f "$dir/lib$name.la"; then
11545 found_la="$dir/lib$name.la"
11546 fi
11547 else
11548 if test -f "$dir/lib$name.$libext"; then
11549 found_dir="$dir"
11550 found_a="$dir/lib$name.$libext"
11551 if test -f "$dir/lib$name.la"; then
11552 found_la="$dir/lib$name.la"
11553 fi
11554 fi
11555 fi
11556 ;;
11557 esac
11558 if test "X$found_dir" != "X"; then
11559 break
11560 fi
11561 done
11562 fi
11563 if test "X$found_dir" != "X"; then
11564 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$found_dir -l$name"
11565 if test "X$found_so" != "X"; then
11566 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
11567 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11568 else
11569 haveit=
11570 for x in $ltrpathdirs; do
11571 if test "X$x" = "X$found_dir"; then
11572 haveit=yes
11573 break
11574 fi
11575 done
11576 if test -z "$haveit"; then
11577 ltrpathdirs="$ltrpathdirs $found_dir"
11578 fi
11579 if test "$hardcode_direct" = yes; then
11580 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11581 else
11582 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
11583 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11584 haveit=
11585 for x in $rpathdirs; do
11586 if test "X$x" = "X$found_dir"; then
11587 haveit=yes
11588 break
11589 fi
11590 done
11591 if test -z "$haveit"; then
11592 rpathdirs="$rpathdirs $found_dir"
11593 fi
11594 else
11595 haveit=
11596 for x in $LDFLAGS $LIBIPT; do
11597
11598 acl_save_prefix="$prefix"
11599 prefix="$acl_final_prefix"
11600 acl_save_exec_prefix="$exec_prefix"
11601 exec_prefix="$acl_final_exec_prefix"
11602 eval x=\"$x\"
11603 exec_prefix="$acl_save_exec_prefix"
11604 prefix="$acl_save_prefix"
11605
11606 if test "X$x" = "X-L$found_dir"; then
11607 haveit=yes
11608 break
11609 fi
11610 done
11611 if test -z "$haveit"; then
11612 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir"
11613 fi
11614 if test "$hardcode_minus_L" != no; then
11615 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11616 else
11617 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
11618 fi
11619 fi
11620 fi
11621 fi
11622 else
11623 if test "X$found_a" != "X"; then
11624 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_a"
11625 else
11626 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir -l$name"
11627 fi
11628 fi
11629 additional_includedir=
11630 case "$found_dir" in
11631 */lib | */lib/)
11632 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
11633 additional_includedir="$basedir/include"
11634 ;;
11635 esac
11636 if test "X$additional_includedir" != "X"; then
11637 if test "X$additional_includedir" != "X/usr/include"; then
11638 haveit=
11639 if test "X$additional_includedir" = "X/usr/local/include"; then
11640 if test -n "$GCC"; then
11641 case $host_os in
11642 linux*) haveit=yes;;
11643 esac
11644 fi
11645 fi
11646 if test -z "$haveit"; then
11647 for x in $CPPFLAGS $INCIPT; do
11648
11649 acl_save_prefix="$prefix"
11650 prefix="$acl_final_prefix"
11651 acl_save_exec_prefix="$exec_prefix"
11652 exec_prefix="$acl_final_exec_prefix"
11653 eval x=\"$x\"
11654 exec_prefix="$acl_save_exec_prefix"
11655 prefix="$acl_save_prefix"
11656
11657 if test "X$x" = "X-I$additional_includedir"; then
11658 haveit=yes
11659 break
11660 fi
11661 done
11662 if test -z "$haveit"; then
11663 if test -d "$additional_includedir"; then
11664 INCIPT="${INCIPT}${INCIPT:+ }-I$additional_includedir"
11665 fi
11666 fi
11667 fi
11668 fi
11669 fi
11670 if test -n "$found_la"; then
11671 save_libdir="$libdir"
11672 case "$found_la" in
11673 */* | *\\*) . "$found_la" ;;
11674 *) . "./$found_la" ;;
11675 esac
11676 libdir="$save_libdir"
11677 for dep in $dependency_libs; do
11678 case "$dep" in
11679 -L*)
11680 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
11681 if test "X$additional_libdir" != "X/usr/lib"; then
11682 haveit=
11683 if test "X$additional_libdir" = "X/usr/local/lib"; then
11684 if test -n "$GCC"; then
11685 case $host_os in
11686 linux*) haveit=yes;;
11687 esac
11688 fi
11689 fi
11690 if test -z "$haveit"; then
11691 haveit=
11692 for x in $LDFLAGS $LIBIPT; do
11693
11694 acl_save_prefix="$prefix"
11695 prefix="$acl_final_prefix"
11696 acl_save_exec_prefix="$exec_prefix"
11697 exec_prefix="$acl_final_exec_prefix"
11698 eval x=\"$x\"
11699 exec_prefix="$acl_save_exec_prefix"
11700 prefix="$acl_save_prefix"
11701
11702 if test "X$x" = "X-L$additional_libdir"; then
11703 haveit=yes
11704 break
11705 fi
11706 done
11707 if test -z "$haveit"; then
11708 if test -d "$additional_libdir"; then
11709 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$additional_libdir"
11710 fi
11711 fi
11712 haveit=
11713 for x in $LDFLAGS $LTLIBIPT; do
11714
11715 acl_save_prefix="$prefix"
11716 prefix="$acl_final_prefix"
11717 acl_save_exec_prefix="$exec_prefix"
11718 exec_prefix="$acl_final_exec_prefix"
11719 eval x=\"$x\"
11720 exec_prefix="$acl_save_exec_prefix"
11721 prefix="$acl_save_prefix"
11722
11723 if test "X$x" = "X-L$additional_libdir"; then
11724 haveit=yes
11725 break
11726 fi
11727 done
11728 if test -z "$haveit"; then
11729 if test -d "$additional_libdir"; then
11730 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$additional_libdir"
11731 fi
11732 fi
11733 fi
11734 fi
11735 ;;
11736 -R*)
11737 dir=`echo "X$dep" | sed -e 's/^X-R//'`
11738 if test "$enable_rpath" != no; then
11739 haveit=
11740 for x in $rpathdirs; do
11741 if test "X$x" = "X$dir"; then
11742 haveit=yes
11743 break
11744 fi
11745 done
11746 if test -z "$haveit"; then
11747 rpathdirs="$rpathdirs $dir"
11748 fi
11749 haveit=
11750 for x in $ltrpathdirs; do
11751 if test "X$x" = "X$dir"; then
11752 haveit=yes
11753 break
11754 fi
11755 done
11756 if test -z "$haveit"; then
11757 ltrpathdirs="$ltrpathdirs $dir"
11758 fi
11759 fi
11760 ;;
11761 -l*)
11762 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
11763 ;;
11764 *.la)
11765 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
11766 ;;
11767 *)
11768 LIBIPT="${LIBIPT}${LIBIPT:+ }$dep"
11769 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$dep"
11770 ;;
11771 esac
11772 done
11773 fi
11774 else
11775 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
11776 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l$name"
11777 fi
11778 fi
11779 fi
11780 done
11781 done
11782 if test "X$rpathdirs" != "X"; then
11783 if test -n "$hardcode_libdir_separator"; then
11784 alldirs=
11785 for found_dir in $rpathdirs; do
11786 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
11787 done
11788 acl_save_libdir="$libdir"
11789 libdir="$alldirs"
11790 eval flag=\"$hardcode_libdir_flag_spec\"
11791 libdir="$acl_save_libdir"
11792 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
11793 else
11794 for found_dir in $rpathdirs; do
11795 acl_save_libdir="$libdir"
11796 libdir="$found_dir"
11797 eval flag=\"$hardcode_libdir_flag_spec\"
11798 libdir="$acl_save_libdir"
11799 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
11800 done
11801 fi
11802 fi
11803 if test "X$ltrpathdirs" != "X"; then
11804 for found_dir in $ltrpathdirs; do
11805 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-R$found_dir"
11806 done
11807 fi
11808
11809
11810 ac_save_CPPFLAGS="$CPPFLAGS"
11811
11812 for element in $INCIPT; do
11813 haveit=
11814 for x in $CPPFLAGS; do
11815
11816 acl_save_prefix="$prefix"
11817 prefix="$acl_final_prefix"
11818 acl_save_exec_prefix="$exec_prefix"
11819 exec_prefix="$acl_final_exec_prefix"
11820 eval x=\"$x\"
11821 exec_prefix="$acl_save_exec_prefix"
11822 prefix="$acl_save_prefix"
11823
11824 if test "X$x" = "X$element"; then
11825 haveit=yes
11826 break
11827 fi
11828 done
11829 if test -z "$haveit"; then
11830 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
11831 fi
11832 done
11833
11834
11835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libipt" >&5
11836$as_echo_n "checking for libipt... " >&6; }
11837if test "${ac_cv_libipt+set}" = set; then :
11838 $as_echo_n "(cached) " >&6
11839else
11840
11841 ac_save_LIBS="$LIBS"
11842 LIBS="$LIBS $LIBIPT"
11843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11844/* end confdefs.h. */
11845#include "intel-pt.h"
11846int
11847main ()
11848{
11849pt_insn_alloc_decoder (0);
11850 ;
11851 return 0;
11852}
11853_ACEOF
11854if ac_fn_c_try_link "$LINENO"; then :
11855 ac_cv_libipt=yes
11856else
11857 ac_cv_libipt=no
11858fi
11859rm -f core conftest.err conftest.$ac_objext \
11860 conftest$ac_exeext conftest.$ac_ext
11861 LIBS="$ac_save_LIBS"
11862
11863fi
11864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libipt" >&5
11865$as_echo "$ac_cv_libipt" >&6; }
11866 if test "$ac_cv_libipt" = yes; then
11867 HAVE_LIBIPT=yes
11868
11869$as_echo "#define HAVE_LIBIPT 1" >>confdefs.h
11870
11871 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libipt" >&5
11872$as_echo_n "checking how to link with libipt... " >&6; }
11873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBIPT" >&5
11874$as_echo "$LIBIPT" >&6; }
11875 else
11876 HAVE_LIBIPT=no
11877 CPPFLAGS="$ac_save_CPPFLAGS"
11878 LIBIPT=
11879 LTLIBIPT=
11880 fi
11881
11882
11883
11884
11885
11886
11887 if test "$HAVE_LIBIPT" != yes; then
11888 if test "$with_intel_pt" = yes; then
11889 as_fn_error "libipt is missing or unusable" "$LINENO" 5
11890 else
11891 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5
11892$as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be unavailable." >&2;}
11893 fi
c56ccc05
MM
11894 else
11895 save_LIBS=$LIBS
11896 LIBS="$LIBS $LIBIPT"
11897 for ac_func in pt_insn_event
11898do :
11899 ac_fn_c_check_func "$LINENO" "pt_insn_event" "ac_cv_func_pt_insn_event"
11900if test "x$ac_cv_func_pt_insn_event" = x""yes; then :
11901 cat >>confdefs.h <<_ACEOF
11902#define HAVE_PT_INSN_EVENT 1
11903_ACEOF
11904
11905fi
11906done
11907
11908 ac_fn_c_check_member "$LINENO" "struct pt_insn" "enabled" "ac_cv_member_struct_pt_insn_enabled" "#include <intel-pt.h>
11909"
11910if test "x$ac_cv_member_struct_pt_insn_enabled" = x""yes; then :
11911
11912cat >>confdefs.h <<_ACEOF
11913#define HAVE_STRUCT_PT_INSN_ENABLED 1
11914_ACEOF
11915
11916
11917fi
11918ac_fn_c_check_member "$LINENO" "struct pt_insn" "resynced" "ac_cv_member_struct_pt_insn_resynced" "#include <intel-pt.h>
11919"
11920if test "x$ac_cv_member_struct_pt_insn_resynced" = x""yes; then :
11921
11922cat >>confdefs.h <<_ACEOF
11923#define HAVE_STRUCT_PT_INSN_RESYNCED 1
11924_ACEOF
11925
11926
11927fi
11928
11929 LIBS=$save_LIBS
58bfce93
MM
11930 fi
11931fi
11932
81ecdfbb
RW
11933# ------------------------- #
11934# Checks for header files. #
11935# ------------------------- #
c890192f 11936
81ecdfbb
RW
11937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
11938$as_echo_n "checking for ANSI C header files... " >&6; }
11939if test "${ac_cv_header_stdc+set}" = set; then :
11940 $as_echo_n "(cached) " >&6
bec39cab 11941else
81ecdfbb 11942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11943/* end confdefs.h. */
81ecdfbb
RW
11944#include <stdlib.h>
11945#include <stdarg.h>
11946#include <string.h>
11947#include <float.h>
11948
a9322a30
TT
11949int
11950main ()
11951{
a9322a30
TT
11952
11953 ;
11954 return 0;
11955}
bec39cab 11956_ACEOF
81ecdfbb
RW
11957if ac_fn_c_try_compile "$LINENO"; then :
11958 ac_cv_header_stdc=yes
bec39cab 11959else
81ecdfbb 11960 ac_cv_header_stdc=no
a9322a30 11961fi
81ecdfbb 11962rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 11963
81ecdfbb
RW
11964if test $ac_cv_header_stdc = yes; then
11965 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11966 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11967/* end confdefs.h. */
11968#include <string.h>
bec39cab 11969
81ecdfbb
RW
11970_ACEOF
11971if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11972 $EGREP "memchr" >/dev/null 2>&1; then :
bec39cab 11973
bec39cab 11974else
81ecdfbb
RW
11975 ac_cv_header_stdc=no
11976fi
11977rm -f conftest*
11978
11979fi
11980
11981if test $ac_cv_header_stdc = yes; then
11982 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11984/* end confdefs.h. */
11985#include <stdlib.h>
11986
bec39cab 11987_ACEOF
81ecdfbb
RW
11988if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11989 $EGREP "free" >/dev/null 2>&1; then :
06825bd1 11990
81ecdfbb
RW
11991else
11992 ac_cv_header_stdc=no
11993fi
11994rm -f conftest*
bec39cab 11995
bec39cab 11996fi
81ecdfbb
RW
11997
11998if test $ac_cv_header_stdc = yes; then
11999 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12000 if test "$cross_compiling" = yes; then :
12001 :
bec39cab 12002else
81ecdfbb 12003 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12004/* end confdefs.h. */
81ecdfbb
RW
12005#include <ctype.h>
12006#include <stdlib.h>
12007#if ((' ' & 0x0FF) == 0x020)
12008# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12009# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12010#else
12011# define ISLOWER(c) \
12012 (('a' <= (c) && (c) <= 'i') \
12013 || ('j' <= (c) && (c) <= 'r') \
12014 || ('s' <= (c) && (c) <= 'z'))
12015# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12016#endif
12017
12018#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
a9322a30
TT
12019int
12020main ()
12021{
81ecdfbb
RW
12022 int i;
12023 for (i = 0; i < 256; i++)
12024 if (XOR (islower (i), ISLOWER (i))
12025 || toupper (i) != TOUPPER (i))
12026 return 2;
a9322a30
TT
12027 return 0;
12028}
bec39cab 12029_ACEOF
81ecdfbb
RW
12030if ac_fn_c_try_run "$LINENO"; then :
12031
bec39cab 12032else
81ecdfbb
RW
12033 ac_cv_header_stdc=no
12034fi
12035rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12036 conftest.$ac_objext conftest.beam conftest.$ac_ext
12037fi
bec39cab 12038
bec39cab 12039fi
a9322a30 12040fi
81ecdfbb
RW
12041{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
12042$as_echo "$ac_cv_header_stdc" >&6; }
12043if test $ac_cv_header_stdc = yes; then
bec39cab 12044
81ecdfbb 12045$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5ee754fc 12046
81ecdfbb 12047fi
bec39cab 12048
81ecdfbb 12049# elf_hp.h is for HP/UX 64-bit shared library support.
9467110b 12050for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
161d1bec 12051 thread_db.h \
0080a2f6 12052 sys/fault.h \
81ecdfbb
RW
12053 sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
12054 sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
12055 sys/reg.h sys/debugreg.h sys/select.h sys/syscall.h \
726e1356 12056 termios.h elf_hp.h \
9467110b 12057 dlfcn.h
81ecdfbb
RW
12058do :
12059 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12060ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12061eval as_val=\$$as_ac_Header
12062 if test "x$as_val" = x""yes; then :
bec39cab 12063 cat >>confdefs.h <<_ACEOF
81ecdfbb 12064#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 12065_ACEOF
c906108c 12066
bec39cab 12067fi
81ecdfbb
RW
12068
12069done
12070
81ecdfbb
RW
12071for ac_header in sys/proc.h
12072do :
12073 ac_fn_c_check_header_compile "$LINENO" "sys/proc.h" "ac_cv_header_sys_proc_h" "#if HAVE_SYS_PARAM_H
12074# include <sys/param.h>
12075#endif
c906108c 12076
81ecdfbb
RW
12077"
12078if test "x$ac_cv_header_sys_proc_h" = x""yes; then :
bec39cab 12079 cat >>confdefs.h <<_ACEOF
81ecdfbb 12080#define HAVE_SYS_PROC_H 1
bec39cab 12081_ACEOF
5ee754fc 12082
bec39cab 12083fi
81ecdfbb
RW
12084
12085done
12086
12087for ac_header in sys/user.h
12088do :
12089 ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
12090# include <sys/param.h>
a9322a30
TT
12091#endif
12092
81ecdfbb
RW
12093"
12094if test "x$ac_cv_header_sys_user_h" = x""yes; then :
12095 cat >>confdefs.h <<_ACEOF
12096#define HAVE_SYS_USER_H 1
bec39cab 12097_ACEOF
bec39cab 12098
a9322a30 12099fi
bec39cab 12100
81ecdfbb 12101done
5ee754fc 12102
5ee754fc 12103
5007d765 12104for ac_header in curses.h cursesX.h ncurses.h ncursesw/ncurses.h ncurses/ncurses.h ncurses/term.h
81ecdfbb
RW
12105do :
12106 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12107ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12108eval as_val=\$$as_ac_Header
12109 if test "x$as_val" = x""yes; then :
bec39cab 12110 cat >>confdefs.h <<_ACEOF
81ecdfbb 12111#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 12112_ACEOF
5ee754fc
MK
12113
12114fi
12115
81ecdfbb 12116done
bec39cab 12117
81ecdfbb
RW
12118for ac_header in term.h
12119do :
12120 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
12121# include <curses.h>
12122#endif
bec39cab 12123
81ecdfbb
RW
12124"
12125if test "x$ac_cv_header_term_h" = x""yes; then :
12126 cat >>confdefs.h <<_ACEOF
12127#define HAVE_TERM_H 1
a8111142 12128_ACEOF
a8111142 12129
a8111142 12130fi
a8111142 12131
81ecdfbb 12132done
a8111142
TT
12133
12134
81ecdfbb
RW
12135# ------------------------- #
12136# Checks for declarations. #
12137# ------------------------- #
a9322a30 12138
07697489
PA
12139
12140 # Check for presence and size of long long.
12141 ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
12142if test "x$ac_cv_type_long_long" = x""yes; then :
12143
12144cat >>confdefs.h <<_ACEOF
12145#define HAVE_LONG_LONG 1
12146_ACEOF
12147
12148# The cast to long int works around a bug in the HP C Compiler
12149# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12150# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12151# This bug is HP SR number 8606223364.
12152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
12153$as_echo_n "checking size of long long... " >&6; }
12154if test "${ac_cv_sizeof_long_long+set}" = set; then :
12155 $as_echo_n "(cached) " >&6
12156else
12157 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
12158
12159else
12160 if test "$ac_cv_type_long_long" = yes; then
12161 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12162$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12163{ as_fn_set_status 77
12164as_fn_error "cannot compute sizeof (long long)
12165See \`config.log' for more details." "$LINENO" 5; }; }
12166 else
12167 ac_cv_sizeof_long_long=0
12168 fi
12169fi
12170
12171fi
12172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
12173$as_echo "$ac_cv_sizeof_long_long" >&6; }
12174
12175
12176
12177cat >>confdefs.h <<_ACEOF
12178#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
12179_ACEOF
12180
12181
12182fi
12183
12184
12185 ac_fn_c_check_decl "$LINENO" "basename(char *)" "ac_cv_have_decl_basename_char_p_" "$ac_includes_default"
12186if test "x$ac_cv_have_decl_basename_char_p_" = x""yes; then :
12187 ac_have_decl=1
12188else
12189 ac_have_decl=0
12190fi
12191
12192cat >>confdefs.h <<_ACEOF
12193#define HAVE_DECL_BASENAME $ac_have_decl
12194_ACEOF
12195ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default"
12196if test "x$ac_cv_have_decl_ffs" = x""yes; then :
12197 ac_have_decl=1
12198else
12199 ac_have_decl=0
12200fi
12201
12202cat >>confdefs.h <<_ACEOF
12203#define HAVE_DECL_FFS $ac_have_decl
12204_ACEOF
12205ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default"
12206if test "x$ac_cv_have_decl_asprintf" = x""yes; then :
12207 ac_have_decl=1
12208else
12209 ac_have_decl=0
12210fi
12211
12212cat >>confdefs.h <<_ACEOF
12213#define HAVE_DECL_ASPRINTF $ac_have_decl
12214_ACEOF
12215ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
12216if test "x$ac_cv_have_decl_vasprintf" = x""yes; then :
12217 ac_have_decl=1
12218else
12219 ac_have_decl=0
12220fi
12221
12222cat >>confdefs.h <<_ACEOF
12223#define HAVE_DECL_VASPRINTF $ac_have_decl
12224_ACEOF
12225ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
12226if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
12227 ac_have_decl=1
12228else
12229 ac_have_decl=0
12230fi
12231
12232cat >>confdefs.h <<_ACEOF
12233#define HAVE_DECL_SNPRINTF $ac_have_decl
12234_ACEOF
12235ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
12236if test "x$ac_cv_have_decl_vsnprintf" = x""yes; then :
12237 ac_have_decl=1
12238else
12239 ac_have_decl=0
12240fi
12241
12242cat >>confdefs.h <<_ACEOF
12243#define HAVE_DECL_VSNPRINTF $ac_have_decl
12244_ACEOF
12245
12246 ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default"
12247if test "x$ac_cv_have_decl_strtol" = x""yes; then :
12248 ac_have_decl=1
12249else
12250 ac_have_decl=0
12251fi
12252
12253cat >>confdefs.h <<_ACEOF
12254#define HAVE_DECL_STRTOL $ac_have_decl
12255_ACEOF
12256ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default"
12257if test "x$ac_cv_have_decl_strtoul" = x""yes; then :
12258 ac_have_decl=1
12259else
12260 ac_have_decl=0
12261fi
12262
12263cat >>confdefs.h <<_ACEOF
12264#define HAVE_DECL_STRTOUL $ac_have_decl
12265_ACEOF
12266ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
12267if test "x$ac_cv_have_decl_strtoll" = x""yes; then :
12268 ac_have_decl=1
12269else
12270 ac_have_decl=0
12271fi
12272
12273cat >>confdefs.h <<_ACEOF
12274#define HAVE_DECL_STRTOLL $ac_have_decl
12275_ACEOF
12276ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
12277if test "x$ac_cv_have_decl_strtoull" = x""yes; then :
12278 ac_have_decl=1
12279else
12280 ac_have_decl=0
12281fi
12282
12283cat >>confdefs.h <<_ACEOF
12284#define HAVE_DECL_STRTOULL $ac_have_decl
12285_ACEOF
12286
12287 ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default"
12288if test "x$ac_cv_have_decl_strverscmp" = x""yes; then :
12289 ac_have_decl=1
12290else
12291 ac_have_decl=0
12292fi
12293
12294cat >>confdefs.h <<_ACEOF
12295#define HAVE_DECL_STRVERSCMP $ac_have_decl
12296_ACEOF
12297
12298
12299
81ecdfbb
RW
12300ac_fn_c_check_decl "$LINENO" "free" "ac_cv_have_decl_free" "$ac_includes_default"
12301if test "x$ac_cv_have_decl_free" = x""yes; then :
12302 ac_have_decl=1
bec39cab 12303else
81ecdfbb
RW
12304 ac_have_decl=0
12305fi
12306
12307cat >>confdefs.h <<_ACEOF
12308#define HAVE_DECL_FREE $ac_have_decl
bec39cab 12309_ACEOF
81ecdfbb
RW
12310ac_fn_c_check_decl "$LINENO" "malloc" "ac_cv_have_decl_malloc" "$ac_includes_default"
12311if test "x$ac_cv_have_decl_malloc" = x""yes; then :
12312 ac_have_decl=1
12313else
12314 ac_have_decl=0
12315fi
12316
12317cat >>confdefs.h <<_ACEOF
12318#define HAVE_DECL_MALLOC $ac_have_decl
bec39cab 12319_ACEOF
81ecdfbb
RW
12320ac_fn_c_check_decl "$LINENO" "realloc" "ac_cv_have_decl_realloc" "$ac_includes_default"
12321if test "x$ac_cv_have_decl_realloc" = x""yes; then :
12322 ac_have_decl=1
bec39cab 12323else
81ecdfbb
RW
12324 ac_have_decl=0
12325fi
bec39cab 12326
81ecdfbb
RW
12327cat >>confdefs.h <<_ACEOF
12328#define HAVE_DECL_REALLOC $ac_have_decl
bec39cab 12329_ACEOF
81ecdfbb
RW
12330ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
12331if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
12332 ac_have_decl=1
12333else
12334 ac_have_decl=0
5ee754fc 12335fi
81ecdfbb
RW
12336
12337cat >>confdefs.h <<_ACEOF
12338#define HAVE_DECL_SNPRINTF $ac_have_decl
a9322a30 12339_ACEOF
5ee754fc 12340
5ee754fc 12341
81ecdfbb
RW
12342 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
12343$as_echo_n "checking for LC_MESSAGES... " >&6; }
12344if test "${am_cv_val_LC_MESSAGES+set}" = set; then :
12345 $as_echo_n "(cached) " >&6
bec39cab 12346else
81ecdfbb 12347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12348/* end confdefs.h. */
81ecdfbb 12349#include <locale.h>
a9322a30
TT
12350int
12351main ()
12352{
81ecdfbb 12353return LC_MESSAGES
a9322a30
TT
12354 ;
12355 return 0;
12356}
bec39cab 12357_ACEOF
81ecdfbb
RW
12358if ac_fn_c_try_link "$LINENO"; then :
12359 am_cv_val_LC_MESSAGES=yes
bec39cab 12360else
81ecdfbb
RW
12361 am_cv_val_LC_MESSAGES=no
12362fi
12363rm -f core conftest.err conftest.$ac_objext \
12364 conftest$ac_exeext conftest.$ac_ext
12365fi
12366{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
12367$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
12368 if test $am_cv_val_LC_MESSAGES = yes; then
bec39cab 12369
81ecdfbb
RW
12370$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
12371
12372 fi
12373
12374
12375# ----------------------- #
12376# Checks for structures. #
12377# ----------------------- #
12378
12379ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
12380if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
12381
12382cat >>confdefs.h <<_ACEOF
12383#define HAVE_STRUCT_STAT_ST_BLOCKS 1
7eb368b3 12384_ACEOF
7eb368b3 12385
81ecdfbb 12386
7eb368b3 12387fi
81ecdfbb
RW
12388ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
12389if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
7eb368b3 12390
a9322a30
TT
12391cat >>confdefs.h <<_ACEOF
12392#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
7eb368b3
NR
12393_ACEOF
12394
a9322a30 12395
7eb368b3
NR
12396fi
12397
7eb368b3 12398
a9322a30
TT
12399# ------------------ #
12400# Checks for types. #
12401# ------------------ #
7eb368b3 12402
81ecdfbb 12403ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
a9322a30
TT
12404#include <sys/socket.h>
12405
81ecdfbb
RW
12406"
12407if test "x$ac_cv_type_socklen_t" = x""yes; then :
bec39cab 12408
a9322a30
TT
12409cat >>confdefs.h <<_ACEOF
12410#define HAVE_SOCKLEN_T 1
12411_ACEOF
12412
12413
12414fi
12415
12416
12417# ------------------------------------- #
12418# Checks for compiler characteristics. #
12419# ------------------------------------- #
12420
81ecdfbb
RW
12421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12422$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
12423if test "${ac_cv_c_const+set}" = set; then :
12424 $as_echo_n "(cached) " >&6
a9322a30 12425else
81ecdfbb 12426 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12427/* end confdefs.h. */
a9322a30
TT
12428
12429int
12430main ()
12431{
12432/* FIXME: Include the comments suggested by Paul. */
12433#ifndef __cplusplus
12434 /* Ultrix mips cc rejects this. */
12435 typedef int charset[2];
81ecdfbb 12436 const charset cs;
a9322a30 12437 /* SunOS 4.1.1 cc rejects this. */
81ecdfbb
RW
12438 char const *const *pcpcc;
12439 char **ppc;
a9322a30
TT
12440 /* NEC SVR4.0.2 mips cc rejects this. */
12441 struct point {int x, y;};
12442 static struct point const zero = {0,0};
12443 /* AIX XL C 1.02.0.0 rejects this.
12444 It does not let you subtract one const X* pointer from another in
12445 an arm of an if-expression whose if-part is not a constant
12446 expression */
12447 const char *g = "string";
81ecdfbb 12448 pcpcc = &g + (g ? g-g : 0);
a9322a30 12449 /* HPUX 7.0 cc rejects these. */
81ecdfbb
RW
12450 ++pcpcc;
12451 ppc = (char**) pcpcc;
12452 pcpcc = (char const *const *) ppc;
a9322a30
TT
12453 { /* SCO 3.2v4 cc rejects this. */
12454 char *t;
12455 char const *s = 0 ? (char *) 0 : (char const *) 0;
12456
12457 *t++ = 0;
81ecdfbb 12458 if (s) return 0;
a9322a30
TT
12459 }
12460 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12461 int x[] = {25, 17};
12462 const int *foo = &x[0];
12463 ++foo;
12464 }
12465 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12466 typedef const int *iptr;
12467 iptr p = 0;
12468 ++p;
12469 }
12470 { /* AIX XL C 1.02.0.0 rejects this saying
12471 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
12472 struct s { int j; const int *ap[3]; };
12473 struct s *b; b->j = 5;
12474 }
12475 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12476 const int foo = 10;
81ecdfbb 12477 if (!foo) return 0;
a9322a30 12478 }
81ecdfbb 12479 return !cs[0] && !zero.x;
a9322a30
TT
12480#endif
12481
12482 ;
12483 return 0;
12484}
bec39cab 12485_ACEOF
81ecdfbb 12486if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12487 ac_cv_c_const=yes
5ee754fc 12488else
81ecdfbb 12489 ac_cv_c_const=no
5ee754fc 12490fi
81ecdfbb 12491rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 12492fi
81ecdfbb
RW
12493{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12494$as_echo "$ac_cv_c_const" >&6; }
a9322a30 12495if test $ac_cv_c_const = no; then
bec39cab 12496
81ecdfbb 12497$as_echo "#define const /**/" >>confdefs.h
bec39cab 12498
5ee754fc 12499fi
bec39cab 12500
81ecdfbb
RW
12501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
12502$as_echo_n "checking for inline... " >&6; }
12503if test "${ac_cv_c_inline+set}" = set; then :
12504 $as_echo_n "(cached) " >&6
bec39cab 12505else
a9322a30
TT
12506 ac_cv_c_inline=no
12507for ac_kw in inline __inline__ __inline; do
81ecdfbb 12508 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12509/* end confdefs.h. */
a9322a30
TT
12510#ifndef __cplusplus
12511typedef int foo_t;
12512static $ac_kw foo_t static_foo () {return 0; }
12513$ac_kw foo_t foo () {return 0; }
12514#endif
12515
bec39cab 12516_ACEOF
81ecdfbb
RW
12517if ac_fn_c_try_compile "$LINENO"; then :
12518 ac_cv_c_inline=$ac_kw
bec39cab 12519fi
81ecdfbb
RW
12520rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12521 test "$ac_cv_c_inline" != no && break
a9322a30 12522done
bec39cab 12523
5ee754fc 12524fi
81ecdfbb
RW
12525{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
12526$as_echo "$ac_cv_c_inline" >&6; }
5ee754fc 12527
a9322a30
TT
12528case $ac_cv_c_inline in
12529 inline | yes) ;;
12530 *)
12531 case $ac_cv_c_inline in
12532 no) ac_val=;;
12533 *) ac_val=$ac_cv_c_inline;;
12534 esac
12535 cat >>confdefs.h <<_ACEOF
12536#ifndef __cplusplus
12537#define inline $ac_val
12538#endif
12539_ACEOF
bec39cab
AC
12540 ;;
12541esac
bec39cab 12542
81ecdfbb
RW
12543 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12544$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
12545if test "${ac_cv_c_bigendian+set}" = set; then :
12546 $as_echo_n "(cached) " >&6
bec39cab 12547else
81ecdfbb
RW
12548 ac_cv_c_bigendian=unknown
12549 # See if we're dealing with a universal compiler.
12550 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12551/* end confdefs.h. */
12552#ifndef __APPLE_CC__
12553 not a universal capable compiler
12554 #endif
12555 typedef int dummy;
12556
12557_ACEOF
12558if ac_fn_c_try_compile "$LINENO"; then :
12559
12560 # Check for potential -arch flags. It is not universal unless
12561 # there are at least two -arch flags with different values.
12562 ac_arch=
12563 ac_prev=
12564 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12565 if test -n "$ac_prev"; then
12566 case $ac_word in
12567 i?86 | x86_64 | ppc | ppc64)
12568 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12569 ac_arch=$ac_word
12570 else
12571 ac_cv_c_bigendian=universal
12572 break
12573 fi
12574 ;;
12575 esac
12576 ac_prev=
12577 elif test "x$ac_word" = "x-arch"; then
12578 ac_prev=arch
12579 fi
12580 done
12581fi
12582rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12583 if test $ac_cv_c_bigendian = unknown; then
12584 # See if sys/param.h defines the BYTE_ORDER macro.
12585 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12586/* end confdefs.h. */
a9322a30 12587#include <sys/types.h>
81ecdfbb 12588 #include <sys/param.h>
a9322a30
TT
12589
12590int
12591main ()
12592{
81ecdfbb
RW
12593#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12594 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12595 && LITTLE_ENDIAN)
12596 bogus endian macros
12597 #endif
a9322a30
TT
12598
12599 ;
12600 return 0;
12601}
bec39cab 12602_ACEOF
81ecdfbb 12603if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12604 # It does; now see whether it defined to BIG_ENDIAN or not.
81ecdfbb 12605 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12606/* end confdefs.h. */
a9322a30 12607#include <sys/types.h>
81ecdfbb 12608 #include <sys/param.h>
a9322a30
TT
12609
12610int
12611main ()
12612{
12613#if BYTE_ORDER != BIG_ENDIAN
81ecdfbb
RW
12614 not big endian
12615 #endif
a9322a30
TT
12616
12617 ;
12618 return 0;
12619}
bec39cab 12620_ACEOF
81ecdfbb 12621if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12622 ac_cv_c_bigendian=yes
5ee754fc 12623else
81ecdfbb 12624 ac_cv_c_bigendian=no
5ee754fc 12625fi
81ecdfbb
RW
12626rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12627fi
12628rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12629 fi
12630 if test $ac_cv_c_bigendian = unknown; then
12631 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12632 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12633/* end confdefs.h. */
12634#include <limits.h>
bec39cab 12635
81ecdfbb
RW
12636int
12637main ()
12638{
12639#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12640 bogus endian macros
12641 #endif
12642
12643 ;
12644 return 0;
12645}
7eb368b3 12646_ACEOF
81ecdfbb
RW
12647if ac_fn_c_try_compile "$LINENO"; then :
12648 # It does; now see whether it defined to _BIG_ENDIAN or not.
12649 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7eb368b3 12650/* end confdefs.h. */
81ecdfbb
RW
12651#include <limits.h>
12652
7eb368b3
NR
12653int
12654main ()
12655{
81ecdfbb
RW
12656#ifndef _BIG_ENDIAN
12657 not big endian
12658 #endif
12659
7eb368b3
NR
12660 ;
12661 return 0;
12662}
12663_ACEOF
81ecdfbb 12664if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12665 ac_cv_c_bigendian=yes
81ecdfbb
RW
12666else
12667 ac_cv_c_bigendian=no
a9322a30 12668fi
81ecdfbb 12669rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30 12670fi
81ecdfbb
RW
12671rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12672 fi
12673 if test $ac_cv_c_bigendian = unknown; then
12674 # Compile a test program.
12675 if test "$cross_compiling" = yes; then :
12676 # Try to guess by grepping values from an object file.
12677 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12678/* end confdefs.h. */
12679short int ascii_mm[] =
12680 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12681 short int ascii_ii[] =
12682 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12683 int use_ascii (int i) {
12684 return ascii_mm[i] + ascii_ii[i];
12685 }
12686 short int ebcdic_ii[] =
12687 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12688 short int ebcdic_mm[] =
12689 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12690 int use_ebcdic (int i) {
12691 return ebcdic_mm[i] + ebcdic_ii[i];
12692 }
12693 extern int foo;
7eb368b3 12694
81ecdfbb
RW
12695int
12696main ()
12697{
12698return use_ascii (foo) == use_ebcdic (foo);
12699 ;
12700 return 0;
12701}
12702_ACEOF
12703if ac_fn_c_try_compile "$LINENO"; then :
12704 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12705 ac_cv_c_bigendian=yes
12706 fi
12707 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12708 if test "$ac_cv_c_bigendian" = unknown; then
12709 ac_cv_c_bigendian=no
12710 else
12711 # finding both strings is unlikely to happen, but who knows?
12712 ac_cv_c_bigendian=unknown
12713 fi
12714 fi
7eb368b3 12715fi
81ecdfbb 12716rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 12717else
81ecdfbb 12718 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12719/* end confdefs.h. */
81ecdfbb 12720$ac_includes_default
d3ea6809
MM
12721int
12722main ()
12723{
81ecdfbb
RW
12724
12725 /* Are we little or big endian? From Harbison&Steele. */
12726 union
12727 {
12728 long int l;
12729 char c[sizeof (long int)];
12730 } u;
12731 u.l = 1;
12732 return u.c[sizeof (long int) - 1] == 1;
12733
12734 ;
12735 return 0;
d3ea6809
MM
12736}
12737_ACEOF
81ecdfbb 12738if ac_fn_c_try_run "$LINENO"; then :
a9322a30 12739 ac_cv_c_bigendian=no
d3ea6809 12740else
81ecdfbb 12741 ac_cv_c_bigendian=yes
d3ea6809 12742fi
81ecdfbb
RW
12743rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12744 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 12745fi
a9322a30 12746
81ecdfbb
RW
12747 fi
12748fi
12749{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12750$as_echo "$ac_cv_c_bigendian" >&6; }
12751 case $ac_cv_c_bigendian in #(
12752 yes)
12753 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12754;; #(
12755 no)
12756 ;; #(
12757 universal)
12758
12759$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
12760
12761 ;; #(
12762 *)
12763 as_fn_error "unknown endianness
12764 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
12765 esac
d3ea6809
MM
12766
12767
a9322a30
TT
12768# ------------------------------ #
12769# Checks for library functions. #
12770# ------------------------------ #
d3ea6809 12771
a9322a30 12772for ac_header in stdlib.h unistd.h
81ecdfbb
RW
12773do :
12774 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12775ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12776eval as_val=\$$as_ac_Header
12777 if test "x$as_val" = x""yes; then :
bec39cab 12778 cat >>confdefs.h <<_ACEOF
81ecdfbb 12779#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 12780_ACEOF
b757528f 12781
b757528f 12782fi
bec39cab 12783
a9322a30 12784done
a3828db0 12785
a9322a30 12786for ac_func in getpagesize
81ecdfbb
RW
12787do :
12788 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
12789if test "x$ac_cv_func_getpagesize" = x""yes; then :
bec39cab 12790 cat >>confdefs.h <<_ACEOF
81ecdfbb 12791#define HAVE_GETPAGESIZE 1
bec39cab 12792_ACEOF
bcb3dc3d 12793
bcb3dc3d
MK
12794fi
12795done
12796
81ecdfbb
RW
12797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
12798$as_echo_n "checking for working mmap... " >&6; }
12799if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then :
12800 $as_echo_n "(cached) " >&6
a9322a30 12801else
81ecdfbb 12802 if test "$cross_compiling" = yes; then :
a9322a30 12803 ac_cv_func_mmap_fixed_mapped=no
bec39cab 12804else
81ecdfbb 12805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12806/* end confdefs.h. */
a9322a30
TT
12807$ac_includes_default
12808/* malloc might have been renamed as rpl_malloc. */
12809#undef malloc
bec39cab 12810
a9322a30
TT
12811/* Thanks to Mike Haertel and Jim Avera for this test.
12812 Here is a matrix of mmap possibilities:
12813 mmap private not fixed
12814 mmap private fixed at somewhere currently unmapped
12815 mmap private fixed at somewhere already mapped
12816 mmap shared not fixed
12817 mmap shared fixed at somewhere currently unmapped
12818 mmap shared fixed at somewhere already mapped
12819 For private mappings, we should verify that changes cannot be read()
12820 back from the file, nor mmap's back from the file at a different
12821 address. (There have been systems where private was not correctly
12822 implemented like the infamous i386 svr4.0, and systems where the
12823 VM page cache was not coherent with the file system buffer cache
12824 like early versions of FreeBSD and possibly contemporary NetBSD.)
12825 For shared mappings, we should conversely verify that changes get
12826 propagated back to all the places they're supposed to be.
bec39cab 12827
a9322a30
TT
12828 Grep wants private fixed already mapped.
12829 The main things grep needs to know about mmap are:
12830 * does it exist and is it safe to write into the mmap'd area
12831 * how to use it (BSD variants) */
8b9cf735 12832
a9322a30
TT
12833#include <fcntl.h>
12834#include <sys/mman.h>
8b9cf735 12835
81ecdfbb 12836#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
a9322a30 12837char *malloc ();
a3828db0
MK
12838#endif
12839
a9322a30 12840/* This mess was copied from the GNU getpagesize.h. */
81ecdfbb 12841#ifndef HAVE_GETPAGESIZE
a9322a30 12842/* Assume that all systems that can run configure have sys/param.h. */
81ecdfbb 12843# ifndef HAVE_SYS_PARAM_H
a9322a30
TT
12844# define HAVE_SYS_PARAM_H 1
12845# endif
12846
12847# ifdef _SC_PAGESIZE
12848# define getpagesize() sysconf(_SC_PAGESIZE)
12849# else /* no _SC_PAGESIZE */
81ecdfbb 12850# ifdef HAVE_SYS_PARAM_H
a9322a30
TT
12851# include <sys/param.h>
12852# ifdef EXEC_PAGESIZE
12853# define getpagesize() EXEC_PAGESIZE
12854# else /* no EXEC_PAGESIZE */
12855# ifdef NBPG
12856# define getpagesize() NBPG * CLSIZE
12857# ifndef CLSIZE
12858# define CLSIZE 1
12859# endif /* no CLSIZE */
12860# else /* no NBPG */
12861# ifdef NBPC
12862# define getpagesize() NBPC
12863# else /* no NBPC */
12864# ifdef PAGESIZE
12865# define getpagesize() PAGESIZE
12866# endif /* PAGESIZE */
12867# endif /* no NBPC */
12868# endif /* no NBPG */
12869# endif /* no EXEC_PAGESIZE */
12870# else /* no HAVE_SYS_PARAM_H */
12871# define getpagesize() 8192 /* punt totally */
12872# endif /* no HAVE_SYS_PARAM_H */
12873# endif /* no _SC_PAGESIZE */
12874
12875#endif /* no HAVE_GETPAGESIZE */
12876
bec39cab
AC
12877int
12878main ()
12879{
a9322a30
TT
12880 char *data, *data2, *data3;
12881 int i, pagesize;
12882 int fd;
12883
12884 pagesize = getpagesize ();
12885
12886 /* First, make a file with some known garbage in it. */
12887 data = (char *) malloc (pagesize);
12888 if (!data)
81ecdfbb 12889 return 1;
a9322a30
TT
12890 for (i = 0; i < pagesize; ++i)
12891 *(data + i) = rand ();
12892 umask (0);
12893 fd = creat ("conftest.mmap", 0600);
12894 if (fd < 0)
81ecdfbb 12895 return 1;
a9322a30 12896 if (write (fd, data, pagesize) != pagesize)
81ecdfbb 12897 return 1;
a9322a30
TT
12898 close (fd);
12899
12900 /* Next, try to mmap the file at a fixed address which already has
12901 something else allocated at it. If we can, also make sure that
12902 we see the same garbage. */
12903 fd = open ("conftest.mmap", O_RDWR);
12904 if (fd < 0)
81ecdfbb 12905 return 1;
a9322a30
TT
12906 data2 = (char *) malloc (2 * pagesize);
12907 if (!data2)
81ecdfbb
RW
12908 return 1;
12909 data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
a9322a30
TT
12910 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
12911 MAP_PRIVATE | MAP_FIXED, fd, 0L))
81ecdfbb 12912 return 1;
a9322a30
TT
12913 for (i = 0; i < pagesize; ++i)
12914 if (*(data + i) != *(data2 + i))
81ecdfbb 12915 return 1;
a9322a30
TT
12916
12917 /* Finally, make sure that changes to the mapped area do not
12918 percolate back to the file as seen by read(). (This is a bug on
12919 some variants of i386 svr4.0.) */
12920 for (i = 0; i < pagesize; ++i)
12921 *(data2 + i) = *(data2 + i) + 1;
12922 data3 = (char *) malloc (pagesize);
12923 if (!data3)
81ecdfbb 12924 return 1;
a9322a30 12925 if (read (fd, data3, pagesize) != pagesize)
81ecdfbb 12926 return 1;
a9322a30
TT
12927 for (i = 0; i < pagesize; ++i)
12928 if (*(data + i) != *(data3 + i))
81ecdfbb 12929 return 1;
a9322a30 12930 close (fd);
81ecdfbb 12931 return 0;
bec39cab
AC
12932}
12933_ACEOF
81ecdfbb 12934if ac_fn_c_try_run "$LINENO"; then :
a9322a30 12935 ac_cv_func_mmap_fixed_mapped=yes
086ec9eb 12936else
81ecdfbb 12937 ac_cv_func_mmap_fixed_mapped=no
a3828db0 12938fi
81ecdfbb
RW
12939rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12940 conftest.$ac_objext conftest.beam conftest.$ac_ext
a3828db0 12941fi
81ecdfbb 12942
a9322a30 12943fi
81ecdfbb
RW
12944{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
12945$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
a9322a30
TT
12946if test $ac_cv_func_mmap_fixed_mapped = yes; then
12947
81ecdfbb 12948$as_echo "#define HAVE_MMAP 1" >>confdefs.h
a3828db0 12949
086ec9eb 12950fi
a9322a30 12951rm -f conftest.mmap
a3828db0 12952
81ecdfbb
RW
12953ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
12954if test "x$ac_cv_type_pid_t" = x""yes; then :
bec39cab 12955
a9322a30
TT
12956else
12957
12958cat >>confdefs.h <<_ACEOF
12959#define pid_t int
bec39cab 12960_ACEOF
086ec9eb
MK
12961
12962fi
12963
81ecdfbb
RW
12964for ac_header in vfork.h
12965do :
12966 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
12967if test "x$ac_cv_header_vfork_h" = x""yes; then :
a3828db0 12968 cat >>confdefs.h <<_ACEOF
81ecdfbb 12969#define HAVE_VFORK_H 1
bec39cab 12970_ACEOF
c906108c
SS
12971
12972fi
a9322a30 12973
a3828db0 12974done
c906108c 12975
a9322a30 12976for ac_func in fork vfork
81ecdfbb
RW
12977do :
12978 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12979ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12980eval as_val=\$$as_ac_var
12981 if test "x$as_val" = x""yes; then :
a3828db0 12982 cat >>confdefs.h <<_ACEOF
81ecdfbb 12983#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 12984_ACEOF
b83266a0 12985
97bf5e38 12986fi
a3828db0 12987done
b83266a0 12988
a9322a30 12989if test "x$ac_cv_func_fork" = xyes; then
81ecdfbb
RW
12990 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
12991$as_echo_n "checking for working fork... " >&6; }
12992if test "${ac_cv_func_fork_works+set}" = set; then :
12993 $as_echo_n "(cached) " >&6
a9322a30 12994else
81ecdfbb 12995 if test "$cross_compiling" = yes; then :
a9322a30
TT
12996 ac_cv_func_fork_works=cross
12997else
81ecdfbb
RW
12998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12999/* end confdefs.h. */
13000$ac_includes_default
13001int
13002main ()
13003{
13004
13005 /* By Ruediger Kuhlmann. */
13006 return fork () < 0;
13007
13008 ;
13009 return 0;
13010}
a9322a30 13011_ACEOF
81ecdfbb 13012if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
13013 ac_cv_func_fork_works=yes
13014else
81ecdfbb 13015 ac_cv_func_fork_works=no
a9322a30 13016fi
81ecdfbb
RW
13017rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13018 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 13019fi
81ecdfbb 13020
a9322a30 13021fi
81ecdfbb
RW
13022{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
13023$as_echo "$ac_cv_func_fork_works" >&6; }
a9322a30
TT
13024
13025else
13026 ac_cv_func_fork_works=$ac_cv_func_fork
13027fi
13028if test "x$ac_cv_func_fork_works" = xcross; then
13029 case $host in
13030 *-*-amigaos* | *-*-msdosdjgpp*)
13031 # Override, as these systems have only a dummy fork() stub
13032 ac_cv_func_fork_works=no
13033 ;;
13034 *)
13035 ac_cv_func_fork_works=yes
13036 ;;
13037 esac
81ecdfbb
RW
13038 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
13039$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
a9322a30
TT
13040fi
13041ac_cv_func_vfork_works=$ac_cv_func_vfork
13042if test "x$ac_cv_func_vfork" = xyes; then
81ecdfbb
RW
13043 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
13044$as_echo_n "checking for working vfork... " >&6; }
13045if test "${ac_cv_func_vfork_works+set}" = set; then :
13046 $as_echo_n "(cached) " >&6
a9322a30 13047else
81ecdfbb 13048 if test "$cross_compiling" = yes; then :
a9322a30
TT
13049 ac_cv_func_vfork_works=cross
13050else
81ecdfbb 13051 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30
TT
13052/* end confdefs.h. */
13053/* Thanks to Paul Eggert for this test. */
81ecdfbb 13054$ac_includes_default
a9322a30 13055#include <sys/wait.h>
81ecdfbb 13056#ifdef HAVE_VFORK_H
a9322a30
TT
13057# include <vfork.h>
13058#endif
13059/* On some sparc systems, changes by the child to local and incoming
13060 argument registers are propagated back to the parent. The compiler
13061 is told about this with #include <vfork.h>, but some compilers
13062 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
13063 static variable whose address is put into a register that is
13064 clobbered by the vfork. */
13065static void
13066#ifdef __cplusplus
13067sparc_address_test (int arg)
13068# else
13069sparc_address_test (arg) int arg;
13070#endif
13071{
13072 static pid_t child;
13073 if (!child) {
13074 child = vfork ();
13075 if (child < 0) {
13076 perror ("vfork");
13077 _exit(2);
13078 }
13079 if (!child) {
13080 arg = getpid();
13081 write(-1, "", 0);
13082 _exit (arg);
13083 }
13084 }
13085}
13086
13087int
13088main ()
13089{
13090 pid_t parent = getpid ();
13091 pid_t child;
13092
13093 sparc_address_test (0);
13094
13095 child = vfork ();
13096
13097 if (child == 0) {
13098 /* Here is another test for sparc vfork register problems. This
13099 test uses lots of local variables, at least as many local
13100 variables as main has allocated so far including compiler
13101 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
13102 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
13103 reuse the register of parent for one of the local variables,
13104 since it will think that parent can't possibly be used any more
13105 in this routine. Assigning to the local variable will thus
13106 munge parent in the parent process. */
13107 pid_t
13108 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
13109 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
13110 /* Convince the compiler that p..p7 are live; otherwise, it might
13111 use the same hardware register for all 8 local variables. */
13112 if (p != p1 || p != p2 || p != p3 || p != p4
13113 || p != p5 || p != p6 || p != p7)
13114 _exit(1);
13115
13116 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
13117 from child file descriptors. If the child closes a descriptor
13118 before it execs or exits, this munges the parent's descriptor
13119 as well. Test for this by closing stdout in the child. */
13120 _exit(close(fileno(stdout)) != 0);
13121 } else {
13122 int status;
13123 struct stat st;
13124
13125 while (wait(&status) != child)
13126 ;
81ecdfbb 13127 return (
a9322a30
TT
13128 /* Was there some problem with vforking? */
13129 child < 0
13130
13131 /* Did the child fail? (This shouldn't happen.) */
13132 || status
13133
13134 /* Did the vfork/compiler bug occur? */
13135 || parent != getpid()
13136
13137 /* Did the file descriptor bug occur? */
13138 || fstat(fileno(stdout), &st) != 0
13139 );
13140 }
13141}
13142_ACEOF
81ecdfbb 13143if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
13144 ac_cv_func_vfork_works=yes
13145else
81ecdfbb 13146 ac_cv_func_vfork_works=no
a9322a30 13147fi
81ecdfbb
RW
13148rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13149 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 13150fi
81ecdfbb 13151
a9322a30 13152fi
81ecdfbb
RW
13153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
13154$as_echo "$ac_cv_func_vfork_works" >&6; }
a9322a30
TT
13155
13156fi;
13157if test "x$ac_cv_func_fork_works" = xcross; then
13158 ac_cv_func_vfork_works=$ac_cv_func_vfork
81ecdfbb
RW
13159 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
13160$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
a9322a30
TT
13161fi
13162
13163if test "x$ac_cv_func_vfork_works" = xyes; then
13164
81ecdfbb 13165$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
a9322a30
TT
13166
13167else
13168
81ecdfbb 13169$as_echo "#define vfork fork" >>confdefs.h
a9322a30
TT
13170
13171fi
13172if test "x$ac_cv_func_fork_works" = xyes; then
13173
81ecdfbb 13174$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
a9322a30
TT
13175
13176fi
13177
cdf43629 13178for ac_func in getauxval getrusage getuid getgid \
bdca27a2 13179 pipe poll pread pread64 pwrite resize_term \
7313baad 13180 sbrk setpgid setpgrp setsid \
9467110b 13181 sigaction sigprocmask sigsetmask socketpair \
110ed339 13182 ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
3332aaf2 13183 setrlimit getrlimit posix_madvise waitpid \
4b8b5e72 13184 ptrace64 sigaltstack mkdtemp setns
81ecdfbb
RW
13185do :
13186 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13187ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13188eval as_val=\$$as_ac_var
13189 if test "x$as_val" = x""yes; then :
6c7a06a3 13190 cat >>confdefs.h <<_ACEOF
81ecdfbb 13191#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6c7a06a3
TT
13192_ACEOF
13193
13194fi
13195done
13196
13197
81ecdfbb
RW
13198 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
13199$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
13200if test "${am_cv_langinfo_codeset+set}" = set; then :
13201 $as_echo_n "(cached) " >&6
6c7a06a3 13202else
81ecdfbb 13203 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
13204/* end confdefs.h. */
13205#include <langinfo.h>
13206int
13207main ()
13208{
13209char* cs = nl_langinfo(CODESET);
bec39cab
AC
13210 ;
13211 return 0;
13212}
13213_ACEOF
81ecdfbb 13214if ac_fn_c_try_link "$LINENO"; then :
6c7a06a3 13215 am_cv_langinfo_codeset=yes
a4db0f07 13216else
81ecdfbb 13217 am_cv_langinfo_codeset=no
a4db0f07 13218fi
81ecdfbb
RW
13219rm -f core conftest.err conftest.$ac_objext \
13220 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 13221
a4db0f07 13222fi
81ecdfbb
RW
13223{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
13224$as_echo "$am_cv_langinfo_codeset" >&6; }
6c7a06a3
TT
13225 if test $am_cv_langinfo_codeset = yes; then
13226
81ecdfbb 13227$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
a4db0f07 13228
6c7a06a3 13229 fi
c906108c 13230
06825bd1 13231
3266f10b
TT
13232 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
13233$as_echo_n "checking for ANSI C header files... " >&6; }
13234if test "${ac_cv_header_stdc+set}" = set; then :
13235 $as_echo_n "(cached) " >&6
13236else
13237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13238/* end confdefs.h. */
13239#include <stdlib.h>
13240#include <stdarg.h>
13241#include <string.h>
13242#include <float.h>
13243
13244int
13245main ()
13246{
13247
13248 ;
13249 return 0;
13250}
13251_ACEOF
13252if ac_fn_c_try_compile "$LINENO"; then :
13253 ac_cv_header_stdc=yes
13254else
13255 ac_cv_header_stdc=no
13256fi
13257rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13258
13259if test $ac_cv_header_stdc = yes; then
13260 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13262/* end confdefs.h. */
13263#include <string.h>
13264
13265_ACEOF
13266if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13267 $EGREP "memchr" >/dev/null 2>&1; then :
13268
13269else
13270 ac_cv_header_stdc=no
13271fi
13272rm -f conftest*
13273
13274fi
13275
13276if test $ac_cv_header_stdc = yes; then
13277 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13278 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13279/* end confdefs.h. */
13280#include <stdlib.h>
13281
13282_ACEOF
13283if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13284 $EGREP "free" >/dev/null 2>&1; then :
13285
13286else
13287 ac_cv_header_stdc=no
13288fi
13289rm -f conftest*
13290
13291fi
13292
13293if test $ac_cv_header_stdc = yes; then
13294 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13295 if test "$cross_compiling" = yes; then :
13296 :
13297else
13298 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13299/* end confdefs.h. */
13300#include <ctype.h>
13301#include <stdlib.h>
13302#if ((' ' & 0x0FF) == 0x020)
13303# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13304# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13305#else
13306# define ISLOWER(c) \
13307 (('a' <= (c) && (c) <= 'i') \
13308 || ('j' <= (c) && (c) <= 'r') \
13309 || ('s' <= (c) && (c) <= 'z'))
13310# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13311#endif
13312
13313#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13314int
13315main ()
13316{
13317 int i;
13318 for (i = 0; i < 256; i++)
13319 if (XOR (islower (i), ISLOWER (i))
13320 || toupper (i) != TOUPPER (i))
13321 return 2;
13322 return 0;
13323}
13324_ACEOF
13325if ac_fn_c_try_run "$LINENO"; then :
13326
13327else
13328 ac_cv_header_stdc=no
13329fi
13330rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13331 conftest.$ac_objext conftest.beam conftest.$ac_ext
13332fi
13333
13334fi
13335fi
13336{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
13337$as_echo "$ac_cv_header_stdc" >&6; }
13338if test $ac_cv_header_stdc = yes; then
13339
13340$as_echo "#define STDC_HEADERS 1" >>confdefs.h
13341
3266f10b
TT
13342fi
13343
13344 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
13345# for constant arguments. Useless!
13346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
13347$as_echo_n "checking for working alloca.h... " >&6; }
13348if test "${ac_cv_working_alloca_h+set}" = set; then :
13349 $as_echo_n "(cached) " >&6
13350else
13351 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13352/* end confdefs.h. */
13353#include <alloca.h>
13354int
13355main ()
13356{
13357char *p = (char *) alloca (2 * sizeof (int));
13358 if (p) return 0;
13359 ;
13360 return 0;
13361}
13362_ACEOF
13363if ac_fn_c_try_link "$LINENO"; then :
13364 ac_cv_working_alloca_h=yes
13365else
13366 ac_cv_working_alloca_h=no
13367fi
13368rm -f core conftest.err conftest.$ac_objext \
13369 conftest$ac_exeext conftest.$ac_ext
13370fi
13371{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
13372$as_echo "$ac_cv_working_alloca_h" >&6; }
13373if test $ac_cv_working_alloca_h = yes; then
13374
13375$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
13376
13377fi
13378
13379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
13380$as_echo_n "checking for alloca... " >&6; }
13381if test "${ac_cv_func_alloca_works+set}" = set; then :
13382 $as_echo_n "(cached) " >&6
13383else
13384 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13385/* end confdefs.h. */
13386#ifdef __GNUC__
13387# define alloca __builtin_alloca
13388#else
13389# ifdef _MSC_VER
13390# include <malloc.h>
13391# define alloca _alloca
13392# else
13393# ifdef HAVE_ALLOCA_H
13394# include <alloca.h>
13395# else
13396# ifdef _AIX
13397 #pragma alloca
13398# else
13399# ifndef alloca /* predefined by HP cc +Olibcalls */
13400char *alloca ();
13401# endif
13402# endif
13403# endif
13404# endif
13405#endif
13406
13407int
13408main ()
13409{
13410char *p = (char *) alloca (1);
13411 if (p) return 0;
13412 ;
13413 return 0;
13414}
13415_ACEOF
13416if ac_fn_c_try_link "$LINENO"; then :
13417 ac_cv_func_alloca_works=yes
13418else
13419 ac_cv_func_alloca_works=no
13420fi
13421rm -f core conftest.err conftest.$ac_objext \
13422 conftest$ac_exeext conftest.$ac_ext
13423fi
13424{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
13425$as_echo "$ac_cv_func_alloca_works" >&6; }
13426
13427if test $ac_cv_func_alloca_works = yes; then
13428
13429$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
13430
13431else
13432 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
13433# that cause trouble. Some versions do not even contain alloca or
13434# contain a buggy version. If you still want to use their alloca,
13435# use ar to extract alloca.o from them instead of compiling alloca.c.
13436
13437ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
13438
13439$as_echo "#define C_ALLOCA 1" >>confdefs.h
13440
13441
13442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
13443$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
13444if test "${ac_cv_os_cray+set}" = set; then :
13445 $as_echo_n "(cached) " >&6
13446else
13447 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13448/* end confdefs.h. */
13449#if defined CRAY && ! defined CRAY2
13450webecray
13451#else
13452wenotbecray
13453#endif
13454
13455_ACEOF
13456if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13457 $EGREP "webecray" >/dev/null 2>&1; then :
13458 ac_cv_os_cray=yes
13459else
13460 ac_cv_os_cray=no
13461fi
13462rm -f conftest*
13463
13464fi
13465{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
13466$as_echo "$ac_cv_os_cray" >&6; }
13467if test $ac_cv_os_cray = yes; then
13468 for ac_func in _getb67 GETB67 getb67; do
13469 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13470ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13471eval as_val=\$$as_ac_var
13472 if test "x$as_val" = x""yes; then :
13473
13474cat >>confdefs.h <<_ACEOF
13475#define CRAY_STACKSEG_END $ac_func
13476_ACEOF
13477
13478 break
13479fi
13480
13481 done
13482fi
13483
13484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
13485$as_echo_n "checking stack direction for C alloca... " >&6; }
13486if test "${ac_cv_c_stack_direction+set}" = set; then :
13487 $as_echo_n "(cached) " >&6
13488else
13489 if test "$cross_compiling" = yes; then :
13490 ac_cv_c_stack_direction=0
13491else
13492 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13493/* end confdefs.h. */
13494$ac_includes_default
13495int
13496find_stack_direction ()
13497{
13498 static char *addr = 0;
13499 auto char dummy;
13500 if (addr == 0)
13501 {
13502 addr = &dummy;
13503 return find_stack_direction ();
13504 }
13505 else
13506 return (&dummy > addr) ? 1 : -1;
13507}
13508
13509int
13510main ()
13511{
13512 return find_stack_direction () < 0;
13513}
13514_ACEOF
13515if ac_fn_c_try_run "$LINENO"; then :
13516 ac_cv_c_stack_direction=1
13517else
13518 ac_cv_c_stack_direction=-1
13519fi
13520rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13521 conftest.$ac_objext conftest.beam conftest.$ac_ext
13522fi
13523
13524fi
13525{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
13526$as_echo "$ac_cv_c_stack_direction" >&6; }
13527cat >>confdefs.h <<_ACEOF
13528#define STACK_DIRECTION $ac_cv_c_stack_direction
13529_ACEOF
13530
13531
13532fi
13533
13534
13535
13536 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
13537$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
13538if test "${am_cv_langinfo_codeset+set}" = set; then :
13539 $as_echo_n "(cached) " >&6
13540else
13541 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13542/* end confdefs.h. */
13543#include <langinfo.h>
13544int
13545main ()
13546{
13547char* cs = nl_langinfo(CODESET);
13548 ;
13549 return 0;
13550}
13551_ACEOF
13552if ac_fn_c_try_link "$LINENO"; then :
13553 am_cv_langinfo_codeset=yes
13554else
13555 am_cv_langinfo_codeset=no
13556fi
13557rm -f core conftest.err conftest.$ac_objext \
13558 conftest$ac_exeext conftest.$ac_ext
13559
13560fi
13561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
13562$as_echo "$am_cv_langinfo_codeset" >&6; }
13563 if test $am_cv_langinfo_codeset = yes; then
13564
13565$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
13566
13567 fi
13568
13569
d1928160 13570 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
3266f10b
TT
13571do :
13572 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13573ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13574eval as_val=\$$as_ac_Header
13575 if test "x$as_val" = x""yes; then :
13576 cat >>confdefs.h <<_ACEOF
13577#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13578_ACEOF
13579
13580fi
13581
13582done
13583
13584
f348d89a 13585 for ac_func in fdwalk getrlimit pipe pipe2 socketpair sigaction
3266f10b
TT
13586do :
13587 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13588ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13589eval as_val=\$$as_ac_var
13590 if test "x$as_val" = x""yes; then :
13591 cat >>confdefs.h <<_ACEOF
13592#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13593_ACEOF
13594
13595fi
13596done
13597
13598
13599 ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default"
13600if test "x$ac_cv_have_decl_strerror" = x""yes; then :
13601 ac_have_decl=1
13602else
13603 ac_have_decl=0
13604fi
13605
13606cat >>confdefs.h <<_ACEOF
13607#define HAVE_DECL_STRERROR $ac_have_decl
13608_ACEOF
13609ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
13610if test "x$ac_cv_have_decl_strstr" = x""yes; then :
13611 ac_have_decl=1
13612else
13613 ac_have_decl=0
13614fi
13615
13616cat >>confdefs.h <<_ACEOF
13617#define HAVE_DECL_STRSTR $ac_have_decl
13618_ACEOF
13619
13620
e9bcb658
GB
13621 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
13622$as_echo_n "checking for sigsetjmp... " >&6; }
13623if test "${gdb_cv_func_sigsetjmp+set}" = set; then :
13624 $as_echo_n "(cached) " >&6
13625else
13626 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13627/* end confdefs.h. */
13628
13629#include <setjmp.h>
13630
13631int
13632main ()
13633{
13634sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
13635 ;
13636 return 0;
13637}
13638_ACEOF
13639if ac_fn_c_try_compile "$LINENO"; then :
13640 gdb_cv_func_sigsetjmp=yes
13641else
13642 gdb_cv_func_sigsetjmp=no
13643fi
13644rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13645fi
13646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
13647$as_echo "$gdb_cv_func_sigsetjmp" >&6; }
13648if test $gdb_cv_func_sigsetjmp = yes; then
13649
13650$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
13651
13652fi
13653
3266f10b 13654
54019719
PA
13655# Check the return and argument types of ptrace.
13656
13657
54019719
PA
13658for ac_header in sys/ptrace.h ptrace.h
13659do :
13660 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13661ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13662eval as_val=\$$as_ac_Header
13663 if test "x$as_val" = x""yes; then :
13664 cat >>confdefs.h <<_ACEOF
13665#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13666_ACEOF
13667
13668fi
13669
13670done
13671
13672
a3828db0 13673gdb_ptrace_headers='
4ff70b84 13674#include <sys/types.h>
a3828db0
MK
13675#if HAVE_SYS_PTRACE_H
13676# include <sys/ptrace.h>
13677#endif
13678#if HAVE_UNISTD_H
13679# include <unistd.h>
13680#endif
13681'
13682# There is no point in checking if we don't have a prototype.
9b30624b 13683ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers
81ecdfbb
RW
13684"
13685if test "x$ac_cv_have_decl_ptrace" = x""yes; then :
13686 ac_have_decl=1
06825bd1 13687else
81ecdfbb 13688 ac_have_decl=0
06825bd1 13689fi
06825bd1 13690
a3828db0 13691cat >>confdefs.h <<_ACEOF
81ecdfbb 13692#define HAVE_DECL_PTRACE $ac_have_decl
a3828db0 13693_ACEOF
81ecdfbb 13694if test $ac_have_decl = 1; then :
bec39cab 13695
a3828db0 13696else
a3828db0
MK
13697
13698 : ${gdb_cv_func_ptrace_ret='int'}
13699 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
13700
06825bd1
MK
13701fi
13702
064ef605
DJ
13703# Check return type. Varargs (used on GNU/Linux) conflict with the
13704# empty argument list, so check for that explicitly.
81ecdfbb
RW
13705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
13706$as_echo_n "checking return type of ptrace... " >&6; }
13707if test "${gdb_cv_func_ptrace_ret+set}" = set; then :
13708 $as_echo_n "(cached) " >&6
bec39cab 13709else
81ecdfbb 13710 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13711/* end confdefs.h. */
a3828db0 13712$gdb_ptrace_headers
bec39cab
AC
13713int
13714main ()
13715{
064ef605
DJ
13716extern long ptrace (enum __ptrace_request, ...);
13717 ;
13718 return 0;
13719}
13720_ACEOF
9b30624b 13721if ac_fn_c_try_compile "$LINENO"; then :
064ef605
DJ
13722 gdb_cv_func_ptrace_ret='long'
13723else
81ecdfbb 13724 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
13725/* end confdefs.h. */
13726$gdb_ptrace_headers
13727int
13728main ()
13729{
a3828db0 13730extern int ptrace ();
bec39cab
AC
13731 ;
13732 return 0;
13733}
13734_ACEOF
9b30624b 13735if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13736 gdb_cv_func_ptrace_ret='int'
70f9f479 13737else
81ecdfbb 13738 gdb_cv_func_ptrace_ret='long'
70f9f479 13739fi
81ecdfbb 13740rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
70f9f479 13741fi
81ecdfbb 13742rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
064ef605 13743fi
81ecdfbb
RW
13744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
13745$as_echo "$gdb_cv_func_ptrace_ret" >&6; }
bec39cab 13746
a3828db0
MK
13747cat >>confdefs.h <<_ACEOF
13748#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
bec39cab 13749_ACEOF
70f9f479 13750
a3828db0 13751# Check argument types.
81ecdfbb
RW
13752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
13753$as_echo_n "checking types of arguments for ptrace... " >&6; }
13754if test "${gdb_cv_func_ptrace_args+set}" = set; then :
13755 $as_echo_n "(cached) " >&6
bec39cab 13756else
a3828db0 13757
81ecdfbb 13758 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
13759/* end confdefs.h. */
13760$gdb_ptrace_headers
13761int
13762main ()
13763{
13764extern long ptrace (enum __ptrace_request, ...);
13765 ;
13766 return 0;
13767}
13768_ACEOF
9b30624b 13769if ac_fn_c_try_compile "$LINENO"; then :
54019719 13770 gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long'
064ef605 13771else
064ef605 13772
a3828db0
MK
13773for gdb_arg1 in 'int' 'long'; do
13774 for gdb_arg2 in 'pid_t' 'int' 'long'; do
5ed10e6e 13775 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
96d7229d 13776 for gdb_arg4 in 'int' 'long' 'void *'; do
81ecdfbb 13777 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13778/* end confdefs.h. */
a3828db0 13779$gdb_ptrace_headers
bec39cab
AC
13780int
13781main ()
13782{
a3828db0
MK
13783
13784extern $gdb_cv_func_ptrace_ret
13785 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
13786
bec39cab
AC
13787 ;
13788 return 0;
13789}
13790_ACEOF
9b30624b 13791if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
13792 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
13793 break 4;
5c7f2947 13794fi
81ecdfbb 13795rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0 13796 for gdb_arg5 in 'int *' 'int' 'long'; do
81ecdfbb 13797 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13798/* end confdefs.h. */
a3828db0 13799$gdb_ptrace_headers
bec39cab
AC
13800int
13801main ()
13802{
a3828db0
MK
13803
13804extern $gdb_cv_func_ptrace_ret
13805 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
13806
bec39cab
AC
13807 ;
13808 return 0;
13809}
13810_ACEOF
9b30624b 13811if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
13812
13813gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
13814 break 5;
78434e59 13815fi
81ecdfbb 13816rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0
MK
13817 done
13818 done
13819 done
13820 done
13821done
13822# Provide a safe default value.
13823: ${gdb_cv_func_ptrace_args='int,int,long,long'}
13824
064ef605 13825fi
81ecdfbb 13826rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
78434e59 13827fi
81ecdfbb
RW
13828{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
13829$as_echo "$gdb_cv_func_ptrace_args" >&6; }
a3828db0
MK
13830ac_save_IFS=$IFS; IFS=','
13831set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
13832IFS=$ac_save_IFS
13833shift
bec39cab 13834
54019719
PA
13835cat >>confdefs.h <<_ACEOF
13836#define PTRACE_TYPE_ARG1 $1
13837_ACEOF
13838
13839
a3828db0
MK
13840cat >>confdefs.h <<_ACEOF
13841#define PTRACE_TYPE_ARG3 $3
13842_ACEOF
13843
96d7229d
LM
13844
13845cat >>confdefs.h <<_ACEOF
13846#define PTRACE_TYPE_ARG4 $4
13847_ACEOF
13848
a3828db0
MK
13849if test -n "$5"; then
13850
13851cat >>confdefs.h <<_ACEOF
13852#define PTRACE_TYPE_ARG5 $5
bec39cab 13853_ACEOF
78434e59
MK
13854
13855fi
13856
54019719 13857
a3828db0 13858if test "$cross_compiling" = no; then
81ecdfbb
RW
13859 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
13860$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
13861if test "${ac_cv_func_setpgrp_void+set}" = set; then :
13862 $as_echo_n "(cached) " >&6
a3828db0 13863else
81ecdfbb
RW
13864 if test "$cross_compiling" = yes; then :
13865 as_fn_error "cannot check setpgrp when cross compiling" "$LINENO" 5
bec39cab 13866else
81ecdfbb 13867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13868/* end confdefs.h. */
81ecdfbb 13869$ac_includes_default
bec39cab
AC
13870int
13871main ()
13872{
a3828db0
MK
13873/* If this system has a BSD-style setpgrp which takes arguments,
13874 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
13875 exit successfully. */
81ecdfbb 13876 return setpgrp (1,1) != -1;
bec39cab
AC
13877 ;
13878 return 0;
13879}
13880_ACEOF
81ecdfbb 13881if ac_fn_c_try_run "$LINENO"; then :
a3828db0 13882 ac_cv_func_setpgrp_void=no
c906108c 13883else
81ecdfbb 13884 ac_cv_func_setpgrp_void=yes
c906108c 13885fi
81ecdfbb
RW
13886rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13887 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 13888fi
81ecdfbb 13889
a3828db0 13890fi
81ecdfbb
RW
13891{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
13892$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0
MK
13893if test $ac_cv_func_setpgrp_void = yes; then
13894
81ecdfbb 13895$as_echo "#define SETPGRP_VOID 1" >>confdefs.h
97bf5e38
MK
13896
13897fi
a3828db0
MK
13898
13899else
81ecdfbb
RW
13900 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
13901$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
13902if test "${ac_cv_func_setpgrp_void+set}" = set; then :
13903 $as_echo_n "(cached) " >&6
97bf5e38 13904else
81ecdfbb 13905 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13906/* end confdefs.h. */
a3828db0
MK
13907
13908#include <unistd.h>
13909
bec39cab
AC
13910int
13911main ()
13912{
a3828db0
MK
13913
13914 if (setpgrp(1,1) == -1)
13915 exit (0);
13916 else
13917 exit (1);
13918
bec39cab
AC
13919 ;
13920 return 0;
13921}
13922_ACEOF
81ecdfbb 13923if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13924 ac_cv_func_setpgrp_void=no
c906108c 13925else
81ecdfbb 13926 ac_cv_func_setpgrp_void=yes
c906108c 13927fi
81ecdfbb 13928rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 13929fi
81ecdfbb
RW
13930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
13931$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0 13932if test $ac_cv_func_setpgrp_void = yes; then
81ecdfbb 13933 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
c3f6f71d 13934
a3828db0 13935fi
c906108c
SS
13936fi
13937
db1ff28b
JK
13938# Assume we'll default to using the included libiberty regex.
13939gdb_use_included_regex=yes
13940
13941# However, if the system regex is GNU regex, then default to *not*
13942# using the included regex.
13943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5
13944$as_echo_n "checking for GNU regex... " >&6; }
13945if test "${gdb_cv_have_gnu_regex+set}" = set; then :
13946 $as_echo_n "(cached) " >&6
13947else
13948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13949/* end confdefs.h. */
13950#include <gnu-versions.h>
13951int
13952main ()
13953{
13954#define REGEX_INTERFACE_VERSION 1
13955#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
13956# error "Version mismatch"
13957#endif
13958 ;
13959 return 0;
13960}
13961_ACEOF
13962if ac_fn_c_try_compile "$LINENO"; then :
13963 gdb_cv_have_gnu_regex=yes
13964else
13965 gdb_cv_have_gnu_regex=no
13966fi
13967rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13968fi
13969{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
13970$as_echo "$gdb_cv_have_gnu_regex" >&6; }
13971if test $gdb_cv_have_gnu_regex = yes; then
13972 gdb_use_included_regex=no
13973fi
13974
13975
13976# Check whether --with-included-regex was given.
13977if test "${with_included_regex+set}" = set; then :
13978 withval=$with_included_regex; gdb_with_regex=$withval
13979else
13980 gdb_with_regex=$gdb_use_included_regex
13981fi
13982
13983if test "$gdb_with_regex" = yes; then
13984
13985$as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h
13986
13987fi
13988
81ecdfbb
RW
13989# Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
13990ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
13991#include <sys/proc.h>
13992
13993"
13994if test "x$ac_cv_member_struct_thread_td_pcb" = x""yes; then :
c906108c 13995
5c45e068 13996cat >>confdefs.h <<_ACEOF
a3828db0 13997#define HAVE_STRUCT_THREAD_TD_PCB 1
bec39cab 13998_ACEOF
c906108c 13999
5c45e068 14000
97bf5e38 14001fi
c906108c 14002
5c45e068 14003
a3828db0 14004# See if <sys/lwp.h> defines `struct lwp`.
81ecdfbb
RW
14005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
14006$as_echo_n "checking for struct lwp... " >&6; }
14007if test "${gdb_cv_struct_lwp+set}" = set; then :
14008 $as_echo_n "(cached) " >&6
bec39cab 14009else
81ecdfbb 14010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14011/* end confdefs.h. */
a3828db0 14012#include <sys/param.h>
c49fbc6c 14013#define _KMEMUSER
a3828db0 14014#include <sys/lwp.h>
bec39cab
AC
14015int
14016main ()
14017{
a3828db0 14018struct lwp l;
bec39cab
AC
14019 ;
14020 return 0;
14021}
14022_ACEOF
81ecdfbb 14023if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14024 gdb_cv_struct_lwp=yes
c906108c 14025else
81ecdfbb 14026 gdb_cv_struct_lwp=no
c906108c 14027fi
81ecdfbb 14028rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 14029fi
81ecdfbb
RW
14030{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
14031$as_echo "$gdb_cv_struct_lwp" >&6; }
a3828db0 14032if test $gdb_cv_struct_lwp = yes; then
c906108c 14033
81ecdfbb 14034$as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
c906108c 14035
97bf5e38 14036fi
c906108c 14037
a3828db0 14038# See if <machine/reg.h> degines `struct reg'.
81ecdfbb
RW
14039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
14040$as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
14041if test "${gdb_cv_struct_reg+set}" = set; then :
14042 $as_echo_n "(cached) " >&6
bec39cab 14043else
81ecdfbb 14044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14045/* end confdefs.h. */
a3828db0
MK
14046#include <sys/types.h>
14047#include <machine/reg.h>
bec39cab
AC
14048int
14049main ()
14050{
a3828db0 14051struct reg r;
bec39cab
AC
14052 ;
14053 return 0;
14054}
14055_ACEOF
81ecdfbb 14056if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14057 gdb_cv_struct_reg=yes
27ca5dad 14058else
81ecdfbb 14059 gdb_cv_struct_reg=no
27ca5dad 14060fi
81ecdfbb 14061rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27ca5dad 14062fi
81ecdfbb
RW
14063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
14064$as_echo "$gdb_cv_struct_reg" >&6; }
a3828db0 14065if test $gdb_cv_struct_reg = yes; then
bec39cab 14066
81ecdfbb 14067$as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
27ca5dad
MC
14068
14069fi
97bf5e38 14070
a3828db0
MK
14071# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
14072# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
a6e69c1f
JB
14073ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <sys/types.h>
14074#include <machine/reg.h>
81ecdfbb
RW
14075"
14076if test "x$ac_cv_member_struct_reg_r_fs" = x""yes; then :
5c45e068
MK
14077
14078cat >>confdefs.h <<_ACEOF
a3828db0 14079#define HAVE_STRUCT_REG_R_FS 1
bec39cab 14080_ACEOF
3862412b 14081
5c45e068 14082
97bf5e38 14083fi
a6e69c1f
JB
14084ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <sys/types.h>
14085#include <machine/reg.h>
81ecdfbb
RW
14086"
14087if test "x$ac_cv_member_struct_reg_r_gs" = x""yes; then :
5c45e068
MK
14088
14089cat >>confdefs.h <<_ACEOF
a3828db0 14090#define HAVE_STRUCT_REG_R_GS 1
bec39cab 14091_ACEOF
3862412b 14092
5c45e068 14093
97bf5e38 14094fi
3862412b 14095
5c45e068 14096
6fea9e18
L
14097# See if <sys/user.h> supports the %fs_base and %gs_bas amd64 segment registers.
14098# Older amd64 Linux's don't have the fs_base and gs_base members of
14099# `struct user_regs_struct'.
14100ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "fs_base" "ac_cv_member_struct_user_regs_struct_fs_base" "#include <sys/user.h>
14101"
14102if test "x$ac_cv_member_struct_user_regs_struct_fs_base" = x""yes; then :
14103
14104cat >>confdefs.h <<_ACEOF
14105#define HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE 1
14106_ACEOF
14107
14108
14109fi
14110ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "gs_base" "ac_cv_member_struct_user_regs_struct_gs_base" "#include <sys/user.h>
14111"
14112if test "x$ac_cv_member_struct_user_regs_struct_gs_base" = x""yes; then :
14113
14114cat >>confdefs.h <<_ACEOF
14115#define HAVE_STRUCT_USER_REGS_STRUCT_GS_BASE 1
14116_ACEOF
14117
14118
14119fi
14120
14121
a3828db0 14122# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
81ecdfbb
RW
14123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
14124$as_echo_n "checking for PTRACE_GETREGS... " >&6; }
14125if test "${gdb_cv_have_ptrace_getregs+set}" = set; then :
14126 $as_echo_n "(cached) " >&6
451928c5 14127else
81ecdfbb 14128 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14129/* end confdefs.h. */
a3828db0 14130#include <sys/ptrace.h>
bec39cab
AC
14131int
14132main ()
14133{
a3828db0 14134PTRACE_GETREGS;
bec39cab
AC
14135 ;
14136 return 0;
14137}
14138_ACEOF
81ecdfbb 14139if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14140 gdb_cv_have_ptrace_getregs=yes
451928c5 14141else
81ecdfbb 14142 gdb_cv_have_ptrace_getregs=no
451928c5 14143fi
81ecdfbb 14144rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
14145fi
14146
81ecdfbb
RW
14147{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
14148$as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
a3828db0 14149if test $gdb_cv_have_ptrace_getregs = yes; then
60ca704f 14150
81ecdfbb 14151$as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
451928c5 14152
97bf5e38 14153fi
451928c5 14154
a3828db0 14155# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
81ecdfbb
RW
14156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
14157$as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
14158if test "${gdb_cv_have_ptrace_getfpxregs+set}" = set; then :
14159 $as_echo_n "(cached) " >&6
451928c5 14160else
81ecdfbb 14161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14162/* end confdefs.h. */
a3828db0 14163#include <sys/ptrace.h>
bec39cab
AC
14164int
14165main ()
14166{
a3828db0 14167PTRACE_GETFPXREGS;
bec39cab
AC
14168 ;
14169 return 0;
14170}
14171_ACEOF
81ecdfbb 14172if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14173 gdb_cv_have_ptrace_getfpxregs=yes
451928c5 14174else
81ecdfbb 14175 gdb_cv_have_ptrace_getfpxregs=no
451928c5 14176fi
81ecdfbb 14177rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
14178fi
14179
81ecdfbb
RW
14180{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
14181$as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
a3828db0 14182if test $gdb_cv_have_ptrace_getfpxregs = yes; then
60ca704f 14183
81ecdfbb 14184$as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
451928c5 14185
97bf5e38 14186fi
451928c5 14187
a3828db0 14188# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
81ecdfbb
RW
14189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
14190$as_echo_n "checking for PT_GETDBREGS... " >&6; }
14191if test "${gdb_cv_have_pt_getdbregs+set}" = set; then :
14192 $as_echo_n "(cached) " >&6
3862412b 14193else
81ecdfbb 14194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14195/* end confdefs.h. */
a3828db0
MK
14196#include <sys/types.h>
14197#include <sys/ptrace.h>
bec39cab
AC
14198int
14199main ()
14200{
a3828db0 14201PT_GETDBREGS;
bec39cab
AC
14202 ;
14203 return 0;
14204}
14205_ACEOF
81ecdfbb 14206if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14207 gdb_cv_have_pt_getdbregs=yes
3862412b 14208else
81ecdfbb 14209 gdb_cv_have_pt_getdbregs=no
3862412b 14210fi
81ecdfbb 14211rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
14212fi
14213
81ecdfbb
RW
14214{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
14215$as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
a3828db0 14216if test $gdb_cv_have_pt_getdbregs = yes; then
60ca704f 14217
81ecdfbb 14218$as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
3862412b 14219
97bf5e38 14220fi
3862412b 14221
a3828db0 14222# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
81ecdfbb
RW
14223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
14224$as_echo_n "checking for PT_GETXMMREGS... " >&6; }
14225if test "${gdb_cv_have_pt_getxmmregs+set}" = set; then :
14226 $as_echo_n "(cached) " >&6
3862412b 14227else
81ecdfbb 14228 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14229/* end confdefs.h. */
a3828db0
MK
14230#include <sys/types.h>
14231#include <sys/ptrace.h>
bec39cab
AC
14232int
14233main ()
14234{
a3828db0 14235PT_GETXMMREGS;
bec39cab
AC
14236 ;
14237 return 0;
14238}
14239_ACEOF
81ecdfbb 14240if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14241 gdb_cv_have_pt_getxmmregs=yes
3862412b 14242else
81ecdfbb 14243 gdb_cv_have_pt_getxmmregs=no
3862412b 14244fi
81ecdfbb 14245rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
14246fi
14247
81ecdfbb
RW
14248{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
14249$as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
a3828db0 14250if test $gdb_cv_have_pt_getxmmregs = yes; then
60ca704f 14251
81ecdfbb 14252$as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
3862412b 14253
97bf5e38 14254fi
3862412b 14255
6e9567fe
JB
14256# See if <sys/ptrace.h> supports LWP names on FreeBSD
14257# Older FreeBSD versions don't have the pl_tdname member of
14258# `struct ptrace_lwpinfo'.
14259ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_tdname" "ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" "#include <sys/ptrace.h>
14260"
14261if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" = x""yes; then :
14262
14263cat >>confdefs.h <<_ACEOF
14264#define HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME 1
14265_ACEOF
14266
14267
14268fi
14269
14270
e6cdd38e
JB
14271# See if <sys/ptrace.h> supports syscall fields on FreeBSD. The
14272# pl_syscall_code member of `struct ptrace_lwpinfo' was added in
14273# FreeBSD 10.3.
14274ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_syscall_code" "ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" "#include <sys/ptrace.h>
14275"
14276if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" = x""yes; then :
14277
14278cat >>confdefs.h <<_ACEOF
14279#define HAVE_STRUCT_PTRACE_LWPINFO_PL_SYSCALL_CODE 1
14280_ACEOF
14281
14282
14283fi
14284
6e9567fe 14285
05b4bd79 14286# Detect which type of /proc is in use, such as for Solaris.
97bf5e38
MK
14287
14288if test "${target}" = "${host}"; then
14289 case "${host}" in
7b00db47 14290 *-*-sysv4.2* | *-*-sysv5* )
60ca704f 14291
81ecdfbb 14292$as_echo "#define NEW_PROC_API 1" >>confdefs.h
97bf5e38
MK
14293
14294 ;;
c162e8c9 14295 *-*-solaris2.[6789] | *-*-solaris2.1[0-9]*)
60ca704f 14296
81ecdfbb 14297$as_echo "#define NEW_PROC_API 1" >>confdefs.h
c960c18f 14298
97bf5e38
MK
14299 ;;
14300 esac
14301fi
14302
14303if test "$ac_cv_header_sys_procfs_h" = yes; then
81ecdfbb
RW
14304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
14305$as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
14306 if test "${bfd_cv_have_sys_procfs_type_gregset_t+set}" = set; then :
14307 $as_echo_n "(cached) " >&6
596c9d4b 14308else
81ecdfbb 14309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14310/* end confdefs.h. */
596c9d4b
KB
14311
14312#define _SYSCALL32
d30c5336
JK
14313/* Needed for new procfs interface on sparc-solaris. */
14314#define _STRUCTURED_PROC 1
596c9d4b 14315#include <sys/procfs.h>
bec39cab
AC
14316int
14317main ()
14318{
97bf5e38 14319gregset_t avar
bec39cab
AC
14320 ;
14321 return 0;
14322}
14323_ACEOF
81ecdfbb 14324if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14325 bfd_cv_have_sys_procfs_type_gregset_t=yes
596c9d4b 14326else
81ecdfbb 14327 bfd_cv_have_sys_procfs_type_gregset_t=no
bec39cab 14328
596c9d4b 14329fi
81ecdfbb 14330rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
14331fi
14332
97bf5e38 14333 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
bec39cab 14334
81ecdfbb 14335$as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
596c9d4b
KB
14336
14337 fi
81ecdfbb
RW
14338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
14339$as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
451928c5 14340
81ecdfbb
RW
14341 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
14342$as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
14343 if test "${bfd_cv_have_sys_procfs_type_fpregset_t+set}" = set; then :
14344 $as_echo_n "(cached) " >&6
d84dd0c5 14345else
81ecdfbb 14346 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14347/* end confdefs.h. */
97bf5e38
MK
14348
14349#define _SYSCALL32
d30c5336
JK
14350/* Needed for new procfs interface on sparc-solaris. */
14351#define _STRUCTURED_PROC 1
d84dd0c5 14352#include <sys/procfs.h>
bec39cab
AC
14353int
14354main ()
14355{
97bf5e38 14356fpregset_t avar
bec39cab
AC
14357 ;
14358 return 0;
14359}
14360_ACEOF
81ecdfbb 14361if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14362 bfd_cv_have_sys_procfs_type_fpregset_t=yes
d84dd0c5 14363else
81ecdfbb 14364 bfd_cv_have_sys_procfs_type_fpregset_t=no
bec39cab 14365
d84dd0c5 14366fi
81ecdfbb 14367rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d84dd0c5
MK
14368fi
14369
97bf5e38 14370 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
bec39cab 14371
81ecdfbb 14372$as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
d84dd0c5 14373
97bf5e38 14374 fi
81ecdfbb
RW
14375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
14376$as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
d84dd0c5 14377
81ecdfbb
RW
14378 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
14379$as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
14380 if test "${bfd_cv_have_sys_procfs_type_prgregset_t+set}" = set; then :
14381 $as_echo_n "(cached) " >&6
c906108c 14382else
81ecdfbb 14383 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14384/* end confdefs.h. */
c906108c 14385
97bf5e38 14386#define _SYSCALL32
d30c5336
JK
14387/* Needed for new procfs interface on sparc-solaris. */
14388#define _STRUCTURED_PROC 1
97bf5e38 14389#include <sys/procfs.h>
bec39cab
AC
14390int
14391main ()
14392{
97bf5e38 14393prgregset_t avar
bec39cab
AC
14394 ;
14395 return 0;
14396}
14397_ACEOF
81ecdfbb 14398if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14399 bfd_cv_have_sys_procfs_type_prgregset_t=yes
c906108c 14400else
81ecdfbb 14401 bfd_cv_have_sys_procfs_type_prgregset_t=no
bec39cab 14402
c906108c 14403fi
81ecdfbb 14404rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
14405fi
14406
97bf5e38 14407 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
bec39cab 14408
81ecdfbb 14409$as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
c906108c 14410
97bf5e38 14411 fi
81ecdfbb
RW
14412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
14413$as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
c906108c 14414
81ecdfbb
RW
14415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
14416$as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
14417 if test "${bfd_cv_have_sys_procfs_type_prfpregset_t+set}" = set; then :
14418 $as_echo_n "(cached) " >&6
d45fe813 14419else
81ecdfbb 14420 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14421/* end confdefs.h. */
97bf5e38
MK
14422
14423#define _SYSCALL32
d30c5336
JK
14424/* Needed for new procfs interface on sparc-solaris. */
14425#define _STRUCTURED_PROC 1
97bf5e38 14426#include <sys/procfs.h>
bec39cab
AC
14427int
14428main ()
14429{
97bf5e38 14430prfpregset_t avar
bec39cab
AC
14431 ;
14432 return 0;
14433}
14434_ACEOF
81ecdfbb 14435if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14436 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
d45fe813 14437else
81ecdfbb 14438 bfd_cv_have_sys_procfs_type_prfpregset_t=no
bec39cab 14439
d45fe813 14440fi
81ecdfbb 14441rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
14442fi
14443
97bf5e38 14444 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
bec39cab 14445
81ecdfbb 14446$as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
d45fe813 14447
97bf5e38 14448 fi
81ecdfbb
RW
14449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
14450$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
d45fe813 14451
81ecdfbb
RW
14452 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
14453$as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
14454 if test "${bfd_cv_have_sys_procfs_type_prgregset32_t+set}" = set; then :
14455 $as_echo_n "(cached) " >&6
d45fe813 14456else
81ecdfbb 14457 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14458/* end confdefs.h. */
97bf5e38
MK
14459
14460#define _SYSCALL32
d30c5336
JK
14461/* Needed for new procfs interface on sparc-solaris. */
14462#define _STRUCTURED_PROC 1
97bf5e38 14463#include <sys/procfs.h>
bec39cab
AC
14464int
14465main ()
14466{
97bf5e38 14467prgregset32_t avar
bec39cab
AC
14468 ;
14469 return 0;
14470}
14471_ACEOF
81ecdfbb 14472if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14473 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
d45fe813 14474else
81ecdfbb 14475 bfd_cv_have_sys_procfs_type_prgregset32_t=no
bec39cab 14476
d45fe813 14477fi
81ecdfbb 14478rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
14479fi
14480
97bf5e38 14481 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
bec39cab 14482
81ecdfbb 14483$as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
d45fe813 14484
97bf5e38 14485 fi
81ecdfbb
RW
14486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
14487$as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
d45fe813 14488
81ecdfbb
RW
14489 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
14490$as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
14491 if test "${bfd_cv_have_sys_procfs_type_lwpid_t+set}" = set; then :
14492 $as_echo_n "(cached) " >&6
d45fe813 14493else
81ecdfbb 14494 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14495/* end confdefs.h. */
97bf5e38 14496
d45fe813 14497#define _SYSCALL32
d30c5336
JK
14498/* Needed for new procfs interface on sparc-solaris. */
14499#define _STRUCTURED_PROC 1
97bf5e38 14500#include <sys/procfs.h>
bec39cab
AC
14501int
14502main ()
14503{
97bf5e38 14504lwpid_t avar
bec39cab
AC
14505 ;
14506 return 0;
14507}
14508_ACEOF
81ecdfbb 14509if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14510 bfd_cv_have_sys_procfs_type_lwpid_t=yes
d45fe813 14511else
81ecdfbb 14512 bfd_cv_have_sys_procfs_type_lwpid_t=no
bec39cab 14513
d45fe813 14514fi
81ecdfbb 14515rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
14516fi
14517
97bf5e38 14518 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
bec39cab 14519
81ecdfbb 14520$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
d45fe813 14521
97bf5e38 14522 fi
81ecdfbb
RW
14523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
14524$as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
c906108c 14525
81ecdfbb
RW
14526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
14527$as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
14528 if test "${bfd_cv_have_sys_procfs_type_psaddr_t+set}" = set; then :
14529 $as_echo_n "(cached) " >&6
c906108c 14530else
81ecdfbb 14531 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14532/* end confdefs.h. */
c906108c 14533
97bf5e38 14534#define _SYSCALL32
d30c5336
JK
14535/* Needed for new procfs interface on sparc-solaris. */
14536#define _STRUCTURED_PROC 1
97bf5e38 14537#include <sys/procfs.h>
bec39cab
AC
14538int
14539main ()
14540{
97bf5e38 14541psaddr_t avar
bec39cab
AC
14542 ;
14543 return 0;
14544}
14545_ACEOF
81ecdfbb 14546if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14547 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c 14548else
81ecdfbb 14549 bfd_cv_have_sys_procfs_type_psaddr_t=no
bec39cab 14550
c906108c 14551fi
81ecdfbb 14552rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
14553fi
14554
97bf5e38 14555 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
bec39cab 14556
81ecdfbb 14557$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
c906108c 14558
97bf5e38 14559 fi
81ecdfbb
RW
14560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
14561$as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
c906108c 14562
81ecdfbb
RW
14563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prsysent_t in sys/procfs.h" >&5
14564$as_echo_n "checking for prsysent_t in sys/procfs.h... " >&6; }
14565 if test "${bfd_cv_have_sys_procfs_type_prsysent_t+set}" = set; then :
14566 $as_echo_n "(cached) " >&6
c906108c 14567else
81ecdfbb 14568 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14569/* end confdefs.h. */
c906108c 14570
97bf5e38 14571#define _SYSCALL32
d30c5336
JK
14572/* Needed for new procfs interface on sparc-solaris. */
14573#define _STRUCTURED_PROC 1
97bf5e38 14574#include <sys/procfs.h>
bec39cab
AC
14575int
14576main ()
14577{
97bf5e38 14578prsysent_t avar
bec39cab
AC
14579 ;
14580 return 0;
14581}
14582_ACEOF
81ecdfbb 14583if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14584 bfd_cv_have_sys_procfs_type_prsysent_t=yes
c906108c 14585else
81ecdfbb 14586 bfd_cv_have_sys_procfs_type_prsysent_t=no
bec39cab 14587
c906108c 14588fi
81ecdfbb 14589rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
14590fi
14591
97bf5e38 14592 if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
bec39cab 14593
81ecdfbb 14594$as_echo "#define HAVE_PRSYSENT_T 1" >>confdefs.h
c906108c 14595
97bf5e38 14596 fi
81ecdfbb
RW
14597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prsysent_t" >&5
14598$as_echo "$bfd_cv_have_sys_procfs_type_prsysent_t" >&6; }
c906108c 14599
81ecdfbb
RW
14600 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigset_t in sys/procfs.h" >&5
14601$as_echo_n "checking for pr_sigset_t in sys/procfs.h... " >&6; }
14602 if test "${bfd_cv_have_sys_procfs_type_pr_sigset_t+set}" = set; then :
14603 $as_echo_n "(cached) " >&6
c906108c 14604else
81ecdfbb 14605 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14606/* end confdefs.h. */
c906108c 14607
97bf5e38 14608#define _SYSCALL32
d30c5336
JK
14609/* Needed for new procfs interface on sparc-solaris. */
14610#define _STRUCTURED_PROC 1
97bf5e38 14611#include <sys/procfs.h>
bec39cab
AC
14612int
14613main ()
14614{
97bf5e38 14615pr_sigset_t avar
bec39cab
AC
14616 ;
14617 return 0;
14618}
14619_ACEOF
81ecdfbb 14620if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14621 bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
c906108c 14622else
81ecdfbb 14623 bfd_cv_have_sys_procfs_type_pr_sigset_t=no
bec39cab 14624
c906108c 14625fi
81ecdfbb 14626rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
14627fi
14628
97bf5e38 14629 if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
bec39cab 14630
81ecdfbb 14631$as_echo "#define HAVE_PR_SIGSET_T 1" >>confdefs.h
c906108c 14632
97bf5e38 14633 fi
81ecdfbb
RW
14634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigset_t" >&5
14635$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigset_t" >&6; }
c906108c 14636
81ecdfbb
RW
14637 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigaction64_t in sys/procfs.h" >&5
14638$as_echo_n "checking for pr_sigaction64_t in sys/procfs.h... " >&6; }
14639 if test "${bfd_cv_have_sys_procfs_type_pr_sigaction64_t+set}" = set; then :
14640 $as_echo_n "(cached) " >&6
c906108c 14641else
81ecdfbb 14642 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14643/* end confdefs.h. */
c906108c 14644
97bf5e38 14645#define _SYSCALL32
d30c5336
JK
14646/* Needed for new procfs interface on sparc-solaris. */
14647#define _STRUCTURED_PROC 1
97bf5e38 14648#include <sys/procfs.h>
bec39cab
AC
14649int
14650main ()
14651{
97bf5e38 14652pr_sigaction64_t avar
bec39cab
AC
14653 ;
14654 return 0;
14655}
14656_ACEOF
81ecdfbb 14657if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14658 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
c906108c 14659else
81ecdfbb 14660 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
bec39cab 14661
c906108c 14662fi
81ecdfbb 14663rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
14664fi
14665
97bf5e38 14666 if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
bec39cab 14667
81ecdfbb 14668$as_echo "#define HAVE_PR_SIGACTION64_T 1" >>confdefs.h
c906108c 14669
97bf5e38 14670 fi
81ecdfbb
RW
14671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&5
14672$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&6; }
97bf5e38 14673
81ecdfbb
RW
14674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_siginfo64_t in sys/procfs.h" >&5
14675$as_echo_n "checking for pr_siginfo64_t in sys/procfs.h... " >&6; }
14676 if test "${bfd_cv_have_sys_procfs_type_pr_siginfo64_t+set}" = set; then :
14677 $as_echo_n "(cached) " >&6
97bf5e38 14678else
81ecdfbb 14679 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14680/* end confdefs.h. */
97bf5e38
MK
14681
14682#define _SYSCALL32
d30c5336
JK
14683/* Needed for new procfs interface on sparc-solaris. */
14684#define _STRUCTURED_PROC 1
97bf5e38 14685#include <sys/procfs.h>
bec39cab
AC
14686int
14687main ()
14688{
97bf5e38 14689pr_siginfo64_t avar
bec39cab
AC
14690 ;
14691 return 0;
14692}
14693_ACEOF
81ecdfbb 14694if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
14695 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
14696else
81ecdfbb 14697 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
bec39cab 14698
97bf5e38 14699fi
81ecdfbb 14700rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 14701fi
c906108c 14702
97bf5e38 14703 if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
bec39cab 14704
81ecdfbb 14705$as_echo "#define HAVE_PR_SIGINFO64_T 1" >>confdefs.h
c906108c 14706
97bf5e38 14707 fi
81ecdfbb
RW
14708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&5
14709$as_echo "$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&6; }
bec39cab
AC
14710
14711
97bf5e38
MK
14712
14713
14714
97bf5e38 14715 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
81ecdfbb
RW
14716 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether prfpregset_t type is broken" >&5
14717$as_echo_n "checking whether prfpregset_t type is broken... " >&6; }
14718 if test "${gdb_cv_prfpregset_t_broken+set}" = set; then :
14719 $as_echo_n "(cached) " >&6
c906108c 14720else
81ecdfbb 14721 if test "$cross_compiling" = yes; then :
97bf5e38 14722 gdb_cv_prfpregset_t_broken=yes
c906108c 14723else
81ecdfbb 14724 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14725/* end confdefs.h. */
97bf5e38
MK
14726#include <sys/procfs.h>
14727 int main ()
14728 {
14729 if (sizeof (prfpregset_t) == sizeof (void *))
14730 return 1;
14731 return 0;
14732 }
bec39cab 14733_ACEOF
81ecdfbb 14734if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 14735 gdb_cv_prfpregset_t_broken=no
81ecdfbb
RW
14736else
14737 gdb_cv_prfpregset_t_broken=yes
c906108c 14738fi
81ecdfbb
RW
14739rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14740 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 14741fi
81ecdfbb 14742
c906108c
SS
14743fi
14744
81ecdfbb
RW
14745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_prfpregset_t_broken" >&5
14746$as_echo "$gdb_cv_prfpregset_t_broken" >&6; }
97bf5e38 14747 if test $gdb_cv_prfpregset_t_broken = yes; then
60ca704f 14748
81ecdfbb 14749$as_echo "#define PRFPREGSET_T_BROKEN 1" >>confdefs.h
c906108c 14750
97bf5e38
MK
14751 fi
14752 fi
c906108c 14753fi
c906108c 14754
bc8bcb4b 14755# Check if the compiler supports the `long long' type.
c906108c 14756
81ecdfbb
RW
14757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
14758$as_echo_n "checking for long long support in compiler... " >&6; }
14759if test "${gdb_cv_c_long_long+set}" = set; then :
14760 $as_echo_n "(cached) " >&6
97bf5e38 14761else
81ecdfbb 14762 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14763/* end confdefs.h. */
bc8bcb4b 14764extern long long foo;
bec39cab
AC
14765int
14766main ()
14767{
bc8bcb4b 14768switch (foo & 2) { case 0: return 1; }
bec39cab
AC
14769 ;
14770 return 0;
14771}
14772_ACEOF
81ecdfbb 14773if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
14774 gdb_cv_c_long_long=yes
14775else
81ecdfbb 14776 gdb_cv_c_long_long=no
97bf5e38 14777fi
81ecdfbb 14778rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 14779fi
81ecdfbb
RW
14780{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
14781$as_echo "$gdb_cv_c_long_long" >&6; }
74a0d9f6
JK
14782if test $gdb_cv_c_long_long != yes; then
14783 # libdecnumber requires long long.
14784 as_fn_error "Compiler must support long long for GDB." "$LINENO" 5
97bf5e38
MK
14785fi
14786
bc8bcb4b 14787# Check if the compiler and runtime support printing long longs.
97bf5e38 14788
81ecdfbb
RW
14789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
14790$as_echo_n "checking for long long support in printf... " >&6; }
14791if test "${gdb_cv_printf_has_long_long+set}" = set; then :
14792 $as_echo_n "(cached) " >&6
97bf5e38 14793else
81ecdfbb 14794 if test "$cross_compiling" = yes; then :
97bf5e38
MK
14795 gdb_cv_printf_has_long_long=no
14796else
81ecdfbb 14797 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14798/* end confdefs.h. */
bc8bcb4b
MK
14799$ac_includes_default
14800int
14801main ()
14802{
14803char buf[32];
97bf5e38
MK
14804 long long l = 0;
14805 l = (l << 16) + 0x0123;
14806 l = (l << 16) + 0x4567;
14807 l = (l << 16) + 0x89ab;
14808 l = (l << 16) + 0xcdef;
14809 sprintf (buf, "0x%016llx", l);
14810 return (strcmp ("0x0123456789abcdef", buf));
bc8bcb4b
MK
14811 ;
14812 return 0;
c906108c 14813}
bec39cab 14814_ACEOF
81ecdfbb 14815if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
14816 gdb_cv_printf_has_long_long=yes
14817else
81ecdfbb 14818 gdb_cv_printf_has_long_long=no
97bf5e38 14819fi
81ecdfbb
RW
14820rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14821 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 14822fi
81ecdfbb 14823
97bf5e38 14824fi
81ecdfbb
RW
14825{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
14826$as_echo "$gdb_cv_printf_has_long_long" >&6; }
97bf5e38 14827if test $gdb_cv_printf_has_long_long = yes; then
bc8bcb4b 14828
81ecdfbb 14829$as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
97bf5e38
MK
14830
14831fi
97bf5e38 14832
1a619819
LM
14833# Check if the compiler and runtime support printing decfloats.
14834
81ecdfbb
RW
14835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
14836$as_echo_n "checking for decfloat support in printf... " >&6; }
14837if test "${gdb_cv_printf_has_decfloat+set}" = set; then :
14838 $as_echo_n "(cached) " >&6
1a619819 14839else
81ecdfbb 14840 if test "$cross_compiling" = yes; then :
1a619819
LM
14841 gdb_cv_printf_has_decfloat=no
14842else
81ecdfbb 14843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1a619819
LM
14844/* end confdefs.h. */
14845$ac_includes_default
14846int
14847main ()
14848{
14849char buf[64];
14850 _Decimal32 d32 = 1.2345df;
14851 _Decimal64 d64 = 1.2345dd;
14852 _Decimal128 d128 = 1.2345dl;
14853 sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
14854 return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
14855 ;
14856 return 0;
14857}
14858_ACEOF
81ecdfbb 14859if ac_fn_c_try_run "$LINENO"; then :
1a619819
LM
14860 gdb_cv_printf_has_decfloat=yes
14861else
81ecdfbb 14862 gdb_cv_printf_has_decfloat=no
1a619819 14863fi
81ecdfbb
RW
14864rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14865 conftest.$ac_objext conftest.beam conftest.$ac_ext
1a619819 14866fi
81ecdfbb 14867
1a619819 14868fi
81ecdfbb
RW
14869{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
14870$as_echo "$gdb_cv_printf_has_decfloat" >&6; }
1a619819
LM
14871if test $gdb_cv_printf_has_decfloat = yes; then
14872
81ecdfbb 14873$as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
1a619819
LM
14874
14875fi
14876
bc8bcb4b
MK
14877# Check if the compiler supports the `long double' type. We can't use
14878# AC_C_LONG_DOUBLE because that one does additional checks on the
14879# constants defined in <float.h> that fail on some systems,
14880# e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
97bf5e38 14881
81ecdfbb
RW
14882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
14883$as_echo_n "checking for long double support in compiler... " >&6; }
14884if test "${gdb_cv_c_long_double+set}" = set; then :
14885 $as_echo_n "(cached) " >&6
97bf5e38 14886else
81ecdfbb 14887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14888/* end confdefs.h. */
97bf5e38 14889long double foo;
bec39cab 14890_ACEOF
81ecdfbb 14891if ac_fn_c_try_compile "$LINENO"; then :
bc8bcb4b 14892 gdb_cv_c_long_double=yes
97bf5e38 14893else
81ecdfbb 14894 gdb_cv_c_long_double=no
97bf5e38 14895fi
81ecdfbb 14896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 14897fi
81ecdfbb
RW
14898{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
14899$as_echo "$gdb_cv_c_long_double" >&6; }
bc8bcb4b 14900if test $gdb_cv_c_long_double = yes; then
c906108c 14901
81ecdfbb 14902$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
14903
14904fi
14905
bc8bcb4b 14906# Check if the compiler and runtime support printing long doubles.
97bf5e38 14907
81ecdfbb
RW
14908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
14909$as_echo_n "checking for long double support in printf... " >&6; }
14910if test "${gdb_cv_printf_has_long_double+set}" = set; then :
14911 $as_echo_n "(cached) " >&6
97bf5e38 14912else
81ecdfbb 14913 if test "$cross_compiling" = yes; then :
97bf5e38
MK
14914 gdb_cv_printf_has_long_double=no
14915else
81ecdfbb 14916 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14917/* end confdefs.h. */
bc8bcb4b
MK
14918$ac_includes_default
14919int
14920main ()
14921{
14922char buf[16];
97bf5e38
MK
14923 long double f = 3.141592653;
14924 sprintf (buf, "%Lg", f);
14925 return (strncmp ("3.14159", buf, 7));
bc8bcb4b
MK
14926 ;
14927 return 0;
97bf5e38 14928}
bec39cab 14929_ACEOF
81ecdfbb 14930if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 14931 gdb_cv_printf_has_long_double=yes
c906108c 14932else
81ecdfbb 14933 gdb_cv_printf_has_long_double=no
c906108c 14934fi
81ecdfbb
RW
14935rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14936 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 14937fi
81ecdfbb 14938
c906108c 14939fi
81ecdfbb
RW
14940{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
14941$as_echo "$gdb_cv_printf_has_long_double" >&6; }
97bf5e38 14942if test $gdb_cv_printf_has_long_double = yes; then
bc8bcb4b 14943
81ecdfbb 14944$as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
14945
14946fi
97bf5e38 14947
bc8bcb4b 14948# Check if the compiler and runtime support scanning long doubles.
97bf5e38 14949
81ecdfbb
RW
14950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
14951$as_echo_n "checking for long double support in scanf... " >&6; }
14952if test "${gdb_cv_scanf_has_long_double+set}" = set; then :
14953 $as_echo_n "(cached) " >&6
97bf5e38 14954else
81ecdfbb 14955 if test "$cross_compiling" = yes; then :
97bf5e38
MK
14956 gdb_cv_scanf_has_long_double=no
14957else
81ecdfbb 14958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14959/* end confdefs.h. */
bc8bcb4b
MK
14960#include <stdio.h>
14961int
14962main ()
14963{
14964char *buf = "3.141592653";
97bf5e38
MK
14965 long double f = 0;
14966 sscanf (buf, "%Lg", &f);
14967 return !(f > 3.14159 && f < 3.14160);
bc8bcb4b
MK
14968 ;
14969 return 0;
97bf5e38 14970}
bec39cab 14971_ACEOF
81ecdfbb 14972if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
14973 gdb_cv_scanf_has_long_double=yes
14974else
81ecdfbb 14975 gdb_cv_scanf_has_long_double=no
97bf5e38 14976fi
81ecdfbb
RW
14977rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14978 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 14979fi
81ecdfbb 14980
c906108c 14981fi
81ecdfbb
RW
14982{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
14983$as_echo "$gdb_cv_scanf_has_long_double" >&6; }
97bf5e38 14984if test $gdb_cv_scanf_has_long_double = yes; then
bc8bcb4b 14985
81ecdfbb 14986$as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
14987
14988fi
c906108c 14989
438013df
AO
14990case ${host_os} in
14991aix*)
81ecdfbb
RW
14992 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
14993$as_echo_n "checking for -bbigtoc option... " >&6; }
14994if test "${gdb_cv_bigtoc+set}" = set; then :
14995 $as_echo_n "(cached) " >&6
438013df 14996else
bec39cab 14997
438013df
AO
14998 SAVE_LDFLAGS=$LDFLAGS
14999
15000 case $GCC in
15001 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
15002 *) gdb_cv_bigtoc=-bbigtoc ;;
15003 esac
15004
15005 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
81ecdfbb 15006 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15007/* end confdefs.h. */
438013df 15008
bec39cab
AC
15009int
15010main ()
15011{
438013df 15012int i;
bec39cab
AC
15013 ;
15014 return 0;
15015}
15016_ACEOF
81ecdfbb 15017if ac_fn_c_try_link "$LINENO"; then :
bec39cab 15018
81ecdfbb
RW
15019else
15020 gdb_cv_bigtoc=
438013df 15021fi
81ecdfbb
RW
15022rm -f core conftest.err conftest.$ac_objext \
15023 conftest$ac_exeext conftest.$ac_ext
ec76baa5 15024 LDFLAGS="${SAVE_LDFLAGS}"
438013df 15025
bec39cab 15026fi
81ecdfbb
RW
15027{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
15028$as_echo "$gdb_cv_bigtoc" >&6; }
438013df
AO
15029 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
15030 ;;
15031esac
15032
38f6b338 15033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
f6528abd 15034$as_echo_n "checking for the dynamic export flag... " >&6; }
38f6b338
JK
15035dynamic_list=false
15036if test "${gdb_native}" = yes; then
15037 # The dynamically loaded libthread_db needs access to symbols in the gdb
15038 # executable. Older GNU ld supports --export-dynamic but --dynamic-list
15039 # may not be supported there.
15040 old_LDFLAGS="$LDFLAGS"
15041 # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
15042 RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
15043 LDFLAGS="$LDFLAGS $RDYNAMIC"
15044 if test "${have_libpython}" = no; then
15045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f6528abd
JK
15046/* end confdefs.h. */
15047
15048int
15049main ()
15050{
15051
15052 ;
15053 return 0;
15054}
15055_ACEOF
15056if ac_fn_c_try_link "$LINENO"; then :
3bebe2f2
JK
15057 dynamic_list=true
15058fi
15059rm -f core conftest.err conftest.$ac_objext \
15060 conftest$ac_exeext conftest.$ac_ext
38f6b338
JK
15061 else
15062 # Workaround http://bugs.python.org/issue4434 where static
15063 # libpythonX.Y.a would get its symbols required for
15064 # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
15065 # Problem does not happen for the recommended libpythonX.Y.so linkage.
a4a1c157
PA
15066
15067 # Note the workaround for Python
15068 # http://bugs.python.org/issue10112 earlier has removed
15069 # -export-dynamic from PYTHON_LIBS. That's exactly what we want
15070 # here too, as otherwise it'd make this -Wl,--dynamic-list test
15071 # always pass.
38f6b338
JK
15072 old_CFLAGS="$CFLAGS"
15073 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
8c1fb155
JK
15074 old_LIBS="$LIBS"
15075 LIBS="$LIBS $PYTHON_LIBS"
1b4f615e
PA
15076 old_CPPFLAGS="$CPPFLAGS"
15077 CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
38f6b338 15078 if test "$cross_compiling" = yes; then :
3bebe2f2 15079 true
f6528abd 15080else
3bebe2f2
JK
15081 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15082/* end confdefs.h. */
1b4f615e 15083#include "Python.h"
3bebe2f2
JK
15084int
15085main ()
15086{
15087int err;
38f6b338
JK
15088 Py_Initialize ();
15089 err = PyRun_SimpleString ("import itertools\n");
15090 Py_Finalize ();
15091 return err == 0 ? 0 : 1;
3bebe2f2
JK
15092 ;
15093 return 0;
15094}
15095_ACEOF
15096if ac_fn_c_try_run "$LINENO"; then :
15097 dynamic_list=true
15098fi
15099rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15100 conftest.$ac_objext conftest.beam conftest.$ac_ext
15101fi
15102
8c1fb155 15103 LIBS="$old_LIBS"
38f6b338 15104 CFLAGS="$old_CFLAGS"
1b4f615e 15105 CPPFLAGS="$old_CPPFLAGS"
38f6b338
JK
15106 fi
15107 LDFLAGS="$old_LDFLAGS"
15108fi
15109if $dynamic_list; then
15110 found="-Wl,--dynamic-list"
15111 RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
f6528abd 15112else
38f6b338
JK
15113 found="-rdynamic"
15114 RDYNAMIC="-rdynamic"
f6528abd 15115fi
f6528abd 15116
38f6b338 15117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
f6528abd 15118$as_echo "$found" >&6; }
0407b3f1 15119
f6528abd 15120
0407b3f1 15121if test ${build} = ${host} -a ${host} = ${target} ; then
c906108c 15122 case ${host_os} in
d92419e5 15123 aix*)
81ecdfbb
RW
15124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
15125$as_echo_n "checking for AiX thread debugging library... " >&6; }
15126 if test "${gdb_cv_have_aix_thread_debug+set}" = set; then :
15127 $as_echo_n "(cached) " >&6
bec39cab 15128else
81ecdfbb 15129 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15130/* end confdefs.h. */
d92419e5 15131#include <sys/pthdebug.h>
bec39cab
AC
15132int
15133main ()
15134{
d92419e5
JB
15135#ifndef PTHDB_VERSION_3
15136 #error
15137 #endif
bec39cab
AC
15138 ;
15139 return 0;
15140}
15141_ACEOF
81ecdfbb 15142if ac_fn_c_try_compile "$LINENO"; then :
d92419e5
JB
15143 gdb_cv_have_aix_thread_debug=yes
15144else
81ecdfbb 15145 gdb_cv_have_aix_thread_debug=no
d92419e5 15146fi
81ecdfbb 15147rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d92419e5
JB
15148fi
15149
81ecdfbb
RW
15150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
15151$as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
d92419e5
JB
15152 if test $gdb_cv_have_aix_thread_debug = yes; then
15153 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
3483b318 15154 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
7f533142 15155 LIBS="$LIBS -lpthdebug"
d645e32e
JB
15156
15157 # Older versions of AIX do not provide the declaration for
15158 # the getthrds function (it appears that it was introduced
15159 # with AIX 6.x).
15160 ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h>
15161"
15162if test "x$ac_cv_have_decl_getthrds" = x""yes; then :
15163 ac_have_decl=1
15164else
15165 ac_have_decl=0
15166fi
15167
15168cat >>confdefs.h <<_ACEOF
15169#define HAVE_DECL_GETTHRDS $ac_have_decl
15170_ACEOF
15171
d92419e5
JB
15172 fi
15173 ;;
c906108c 15174 esac
bec39cab 15175
c906108c
SS
15176fi
15177
3f47be5c 15178if test "x$ac_cv_header_thread_db_h" = "xyes"; then
81ecdfbb
RW
15179 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
15180$as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
15181if test "${gdb_cv_thread_db_h_has_td_notalloc+set}" = set; then :
15182 $as_echo_n "(cached) " >&6
bec39cab 15183else
81ecdfbb 15184 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15185/* end confdefs.h. */
3f47be5c 15186#include <thread_db.h>
bec39cab
AC
15187int
15188main ()
15189{
3f47be5c 15190int i = TD_NOTALLOC;
bec39cab
AC
15191 ;
15192 return 0;
15193}
15194_ACEOF
81ecdfbb 15195if ac_fn_c_try_compile "$LINENO"; then :
3f47be5c
EZ
15196 gdb_cv_thread_db_h_has_td_notalloc=yes
15197else
81ecdfbb 15198 gdb_cv_thread_db_h_has_td_notalloc=no
bec39cab 15199
3f47be5c 15200fi
81ecdfbb 15201rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3f47be5c 15202
bec39cab 15203fi
81ecdfbb
RW
15204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
15205$as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
15206 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
15207$as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
15208if test "${gdb_cv_thread_db_h_has_td_version+set}" = set; then :
15209 $as_echo_n "(cached) " >&6
59f80f10 15210else
81ecdfbb 15211 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
15212/* end confdefs.h. */
15213#include <thread_db.h>
15214int
15215main ()
15216{
15217int i = TD_VERSION;
15218 ;
15219 return 0;
15220}
15221_ACEOF
81ecdfbb 15222if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
15223 gdb_cv_thread_db_h_has_td_version=yes
15224else
81ecdfbb 15225 gdb_cv_thread_db_h_has_td_version=no
59f80f10
DJ
15226
15227fi
81ecdfbb 15228rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
15229
15230fi
81ecdfbb
RW
15231{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
15232$as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
15233 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
15234$as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
15235if test "${gdb_cv_thread_db_h_has_td_notls+set}" = set; then :
15236 $as_echo_n "(cached) " >&6
59f80f10 15237else
81ecdfbb 15238 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
15239/* end confdefs.h. */
15240#include <thread_db.h>
15241int
15242main ()
15243{
15244int i = TD_NOTLS;
15245 ;
15246 return 0;
15247}
15248_ACEOF
81ecdfbb 15249if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
15250 gdb_cv_thread_db_h_has_td_notls=yes
15251else
81ecdfbb 15252 gdb_cv_thread_db_h_has_td_notls=no
59f80f10
DJ
15253
15254fi
81ecdfbb 15255rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
15256
15257fi
81ecdfbb
RW
15258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
15259$as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
3f47be5c
EZ
15260fi
15261if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
bec39cab 15262
81ecdfbb 15263$as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
3f47be5c 15264
59f80f10
DJ
15265fi
15266if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
15267
81ecdfbb 15268$as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
59f80f10
DJ
15269
15270fi
15271if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
15272
81ecdfbb 15273$as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
59f80f10 15274
3f47be5c
EZ
15275fi
15276
81ecdfbb
RW
15277ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
15278"
15279if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = x""yes; then :
15280 ac_have_decl=1
10568435 15281else
81ecdfbb 15282 ac_have_decl=0
10568435 15283fi
10568435
JK
15284
15285cat >>confdefs.h <<_ACEOF
81ecdfbb 15286#define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
10568435
JK
15287_ACEOF
15288
15289
81ecdfbb
RW
15290if test "$cross_compiling" = yes; then :
15291 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
15292/* end confdefs.h. */
15293#include <sys/personality.h>
15294int
15295main ()
15296{
15297
15298# if !HAVE_DECL_ADDR_NO_RANDOMIZE
15299# define ADDR_NO_RANDOMIZE 0x0040000
15300# endif
15301 /* Test the flag could be set and stays set. */
15302 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
15303 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
15304 return 1
15305 ;
15306 return 0;
15307}
15308_ACEOF
81ecdfbb 15309if ac_fn_c_try_link "$LINENO"; then :
10568435
JK
15310 have_personality=true
15311else
81ecdfbb 15312 have_personality=false
10568435 15313fi
81ecdfbb
RW
15314rm -f core conftest.err conftest.$ac_objext \
15315 conftest$ac_exeext conftest.$ac_ext
10568435 15316else
81ecdfbb 15317 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
15318/* end confdefs.h. */
15319#include <sys/personality.h>
15320int
15321main ()
15322{
15323
15324# if !HAVE_DECL_ADDR_NO_RANDOMIZE
15325# define ADDR_NO_RANDOMIZE 0x0040000
15326# endif
15327 /* Test the flag could be set and stays set. */
15328 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
15329 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
15330 return 1
15331 ;
15332 return 0;
15333}
15334_ACEOF
81ecdfbb 15335if ac_fn_c_try_run "$LINENO"; then :
10568435
JK
15336 have_personality=true
15337else
81ecdfbb 15338 have_personality=false
10568435 15339fi
81ecdfbb
RW
15340rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15341 conftest.$ac_objext conftest.beam conftest.$ac_ext
10568435 15342fi
81ecdfbb 15343
10568435
JK
15344if $have_personality
15345then
15346
81ecdfbb 15347$as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
10568435
JK
15348
15349fi
15350
e655c1a2
PA
15351case $host_os in
15352 go32* | *djgpp*)
15353 gdbinit=gdb.ini
15354 ;;
15355 *)
15356 gdbinit=.gdbinit
15357 ;;
15358esac
15359
15360cat >>confdefs.h <<_ACEOF
15361#define GDBINIT "$gdbinit"
15362_ACEOF
15363
15364
fb40c209 15365
f83d8a90
DE
15366# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
15367# except that the argument to --with-sysroot is optional.
15368# --with-sysroot (or --with-sysroot=yes) sets the default sysroot path.
15369if test "x$with_sysroot" = xyes; then
15370 with_sysroot="${exec_prefix}/${target_alias}/sys-root"
15371fi
bec39cab 15372
81ecdfbb
RW
15373# Check whether --with-sysroot was given.
15374if test "${with_sysroot+set}" = set; then :
f83d8a90
DE
15375 withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval
15376else
15377 TARGET_SYSTEM_ROOT=
15378fi
030292b7 15379
030292b7 15380
f83d8a90
DE
15381 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
15382 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15383 ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT`
15384 ac_define_dir=`eval echo $ac_define_dir`
030292b7 15385
f83d8a90
DE
15386cat >>confdefs.h <<_ACEOF
15387#define TARGET_SYSTEM_ROOT "$ac_define_dir"
15388_ACEOF
bec39cab 15389
030292b7 15390
b14b1491 15391
f83d8a90
DE
15392
15393 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
15394 if test "x$prefix" = xNONE; then
15395 test_prefix=/usr/local
15396 else
15397 test_prefix=$prefix
15398 fi
15399 else
15400 test_prefix=$exec_prefix
15401 fi
15402 value=0
15403 case ${ac_define_dir} in
15404 "${test_prefix}"|"${test_prefix}/"*|\
15405 '${exec_prefix}'|'${exec_prefix}/'*)
15406 value=1
15407 ;;
15408 esac
15409
15410cat >>confdefs.h <<_ACEOF
15411#define TARGET_SYSTEM_ROOT_RELOCATABLE $value
15412_ACEOF
030292b7
DJ
15413
15414
15415
16e7150e 15416
16e7150e 15417
81ecdfbb
RW
15418# Check whether --with-system-gdbinit was given.
15419if test "${with_system_gdbinit+set}" = set; then :
15420 withval=$with_system_gdbinit;
b14b1491
TT
15421 SYSTEM_GDBINIT=$withval
15422else
15423 SYSTEM_GDBINIT=
81ecdfbb
RW
15424fi
15425
16e7150e
JG
15426
15427 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
15428 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 15429 ac_define_dir=`eval echo $SYSTEM_GDBINIT`
16e7150e
JG
15430 ac_define_dir=`eval echo $ac_define_dir`
15431
15432cat >>confdefs.h <<_ACEOF
15433#define SYSTEM_GDBINIT "$ac_define_dir"
15434_ACEOF
15435
15436
15437
0c4a4063 15438
b14b1491
TT
15439 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
15440 if test "x$prefix" = xNONE; then
15441 test_prefix=/usr/local
15442 else
15443 test_prefix=$prefix
15444 fi
15445 else
15446 test_prefix=$exec_prefix
15447 fi
15448 value=0
15449 case ${ac_define_dir} in
15450 "${test_prefix}"|"${test_prefix}/"*|\
15451 '${exec_prefix}'|'${exec_prefix}/'*)
15452 value=1
15453 ;;
15454 esac
16e7150e 15455
b14b1491
TT
15456cat >>confdefs.h <<_ACEOF
15457#define SYSTEM_GDBINIT_RELOCATABLE $value
16e7150e
JG
15458_ACEOF
15459
b14b1491 15460
16e7150e 15461
0c4a4063 15462
b835bb52 15463
81ecdfbb
RW
15464# Check whether --enable-werror was given.
15465if test "${enable_werror+set}" = set; then :
15466 enableval=$enable_werror; case "${enableval}" in
094a342e
MK
15467 yes | y) ERROR_ON_WARNING="yes" ;;
15468 no | n) ERROR_ON_WARNING="no" ;;
81ecdfbb 15469 *) as_fn_error "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
094a342e 15470 esac
81ecdfbb
RW
15471fi
15472
094a342e 15473
9a084706
PA
15474# Enable -Werror by default when using gcc. Turn it off for releases.
15475if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
094a342e
MK
15476 ERROR_ON_WARNING=yes
15477fi
15478
15479WERROR_CFLAGS=""
15480if test "${ERROR_ON_WARNING}" = yes ; then
15481 WERROR_CFLAGS="-Werror"
15482fi
15483
cf6de44d 15484# The options we'll try to enable.
aac331e4 15485build_warnings="-Wall -Wpointer-arith \
1cb5e2a4 15486-Wno-unused -Wunused-value -Wunused-function \
aac331e4 15487-Wno-switch -Wno-char-subscripts \
cf6de44d 15488-Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \
8465943a
SM
15489-Wno-sign-compare -Wno-narrowing -Wno-error=maybe-uninitialized \
15490-Wno-mismatched-tags"
3bc3d82a 15491
3526781e 15492case "${host}" in
4fa7574e
RO
15493 *-*-mingw32*)
15494 # Enable -Wno-format by default when using gcc on mingw since many
15495 # GCC versions complain about %I64.
15496 build_warnings="$build_warnings -Wno-format" ;;
15497 *-*-solaris*)
15498 # Solaris 11.4 <python2.7/ceval.h> uses #pragma no_inline that GCC
15499 # doesn't understand.
15500 build_warnings="$build_warnings -Wno-unknown-pragmas"
15501 # Solaris 11 <unistd.h> marks vfork deprecated.
15502 build_warnings="$build_warnings -Wno-deprecated-declarations" ;;
d3685d60 15503 *) build_warnings="$build_warnings -Wformat-nonliteral" ;;
3526781e
DJ
15504esac
15505
81ecdfbb
RW
15506# Check whether --enable-build-warnings was given.
15507if test "${enable_build_warnings+set}" = set; then :
15508 enableval=$enable_build_warnings; case "${enableval}" in
c906108c
SS
15509 yes) ;;
15510 no) build_warnings="-w";;
15511 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15512 build_warnings="${build_warnings} ${t}";;
15513 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15514 build_warnings="${t} ${build_warnings}";;
15515 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
15516esac
d4f3574e 15517if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 15518 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 15519fi
81ecdfbb
RW
15520fi
15521# Check whether --enable-gdb-build-warnings was given.
15522if test "${enable_gdb_build_warnings+set}" = set; then :
15523 enableval=$enable_gdb_build_warnings; case "${enableval}" in
3b851bce
AC
15524 yes) ;;
15525 no) build_warnings="-w";;
15526 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15527 build_warnings="${build_warnings} ${t}";;
15528 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15529 build_warnings="${t} ${build_warnings}";;
15530 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
15531esac
15532if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
15533 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
15534fi
81ecdfbb 15535fi
3bc3d82a
PA
15536
15537# The set of warnings supported by a C++ compiler is not the same as
15538# of the C compiler.
cf6de44d 15539ac_ext=cpp
3bc3d82a
PA
15540ac_cpp='$CXXCPP $CPPFLAGS'
15541ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15542ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15543ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15544
3bc3d82a 15545
81ecdfbb 15546WARN_CFLAGS=""
c906108c
SS
15547if test "x${build_warnings}" != x -a "x$GCC" = xyes
15548then
81ecdfbb
RW
15549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
15550$as_echo_n "checking compiler warning flags... " >&6; }
746a987d
AC
15551 # Separate out the -Werror flag as some files just cannot be
15552 # compiled with it enabled.
15553 for w in ${build_warnings}; do
7544db95
PA
15554 # GCC does not complain about -Wno-unknown-warning. Invert
15555 # and test -Wunknown-warning instead.
15556 case $w in
15557 -Wno-*)
15558 wtest=`echo $w | sed 's/-Wno-/-W/g'` ;;
15559 *)
15560 wtest=$w ;;
15561 esac
15562
746a987d
AC
15563 case $w in
15564 -Werr*) WERROR_CFLAGS=-Werror ;;
3bc3d82a
PA
15565 *)
15566 # Check whether GCC accepts it.
4536bbc6 15567 saved_CFLAGS="$CFLAGS"
3e019bdc 15568 CFLAGS="$CFLAGS -Werror $wtest"
3bc3d82a 15569 saved_CXXFLAGS="$CXXFLAGS"
3e019bdc 15570 CXXFLAGS="$CXXFLAGS -Werror $wtest"
54019719 15571 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15572/* end confdefs.h. */
4536bbc6 15573
bec39cab
AC
15574int
15575main ()
15576{
4536bbc6 15577
bec39cab
AC
15578 ;
15579 return 0;
15580}
15581_ACEOF
3bc3d82a 15582if ac_fn_cxx_try_compile "$LINENO"; then :
4536bbc6 15583 WARN_CFLAGS="${WARN_CFLAGS} $w"
4536bbc6 15584fi
81ecdfbb 15585rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4536bbc6 15586 CFLAGS="$saved_CFLAGS"
3bc3d82a 15587 CXXFLAGS="$saved_CXXFLAGS"
746a987d
AC
15588 esac
15589 done
81ecdfbb
RW
15590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
15591$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
c906108c
SS
15592fi
15593
15594
104c1213 15595
cf6de44d 15596ac_ext=c
3bc3d82a
PA
15597ac_cpp='$CPP $CPPFLAGS'
15598ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15599ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15600ac_compiler_gnu=$ac_cv_c_compiler_gnu
15601
3bc3d82a 15602
b835bb52 15603
7a292a7a 15604# In the Cygwin environment, we need some additional flags.
81ecdfbb
RW
15605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
15606$as_echo_n "checking for cygwin... " >&6; }
15607if test "${gdb_cv_os_cygwin+set}" = set; then :
15608 $as_echo_n "(cached) " >&6
bec39cab 15609else
81ecdfbb 15610 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15611/* end confdefs.h. */
7a292a7a
SS
15612
15613#if defined (__CYGWIN__) || defined (__CYGWIN32__)
15614lose
15615#endif
bec39cab 15616_ACEOF
7a292a7a 15617if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
92a021de 15618 $EGREP "^lose$" >/dev/null 2>&1; then :
7a292a7a
SS
15619 gdb_cv_os_cygwin=yes
15620else
7a292a7a
SS
15621 gdb_cv_os_cygwin=no
15622fi
15623rm -f conftest*
15624
15625fi
81ecdfbb
RW
15626{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
15627$as_echo "$gdb_cv_os_cygwin" >&6; }
7a292a7a 15628
aff38e61 15629
3eb25fda 15630SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
aff38e61 15631case ${host} in
95cbc983
AC
15632 *go32* ) SER_HARDWIRE=ser-go32.o ;;
15633 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
0ea3f30e 15634 *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
aff38e61
AC
15635esac
15636
15637
cd0fc7c3
SS
15638# libreadline needs libuser32.a in a cygwin environment
15639WIN32LIBS=
15640if test x$gdb_cv_os_cygwin = xyes; then
c5394b80
JM
15641 WIN32LIBS="-luser32"
15642 case "${target}" in
15643 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
15644 ;;
15645 esac
cd0fc7c3 15646fi
c906108c 15647
b4505029
MM
15648# The ser-tcp.c module requires sockets.
15649case ${host} in
15650 *mingw32*)
15651
81ecdfbb 15652$as_echo "#define USE_WIN32API 1" >>confdefs.h
b4505029
MM
15653
15654 WIN32LIBS="$WIN32LIBS -lws2_32"
15655 ;;
15656esac
15657
7a292a7a 15658
31d99776 15659# Add ELF support to GDB, but only if BFD includes ELF support.
def63ff0
TT
15660
15661 OLD_CFLAGS=$CFLAGS
15662 OLD_LDFLAGS=$LDFLAGS
15663 OLD_LIBS=$LIBS
15664 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
15665 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
15666 # always want our bfd.
15667 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
5a2d4533
L
15668 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
15669 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
def63ff0 15670 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
711a72d3 15671 LIBS="-lbfd -liberty -lz $intl $LIBS"
def63ff0 15672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
81ecdfbb
RW
15673$as_echo_n "checking for ELF support in BFD... " >&6; }
15674if test "${gdb_cv_var_elf+set}" = set; then :
15675 $as_echo_n "(cached) " >&6
31d99776 15676else
81ecdfbb 15677 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31d99776
DJ
15678/* end confdefs.h. */
15679#include <stdlib.h>
def63ff0
TT
15680 #include "bfd.h"
15681 #include "elf-bfd.h"
31d99776
DJ
15682
15683int
15684main ()
15685{
def63ff0 15686return bfd_get_elf_phdr_upper_bound (NULL);
31d99776
DJ
15687 ;
15688 return 0;
15689}
15690_ACEOF
81ecdfbb 15691if ac_fn_c_try_link "$LINENO"; then :
31d99776
DJ
15692 gdb_cv_var_elf=yes
15693else
81ecdfbb 15694 gdb_cv_var_elf=no
31d99776 15695fi
81ecdfbb
RW
15696rm -f core conftest.err conftest.$ac_objext \
15697 conftest$ac_exeext conftest.$ac_ext
31d99776 15698fi
81ecdfbb
RW
15699{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
15700$as_echo "$gdb_cv_var_elf" >&6; }
def63ff0
TT
15701 CFLAGS=$OLD_CFLAGS
15702 LDFLAGS=$OLD_LDFLAGS
15703 LIBS=$OLD_LIBS
31d99776 15704if test $gdb_cv_var_elf = yes; then
d4777acb 15705 CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o dtrace-probe.o"
31d99776 15706
81ecdfbb 15707$as_echo "#define HAVE_ELF 1" >>confdefs.h
31d99776 15708
075ff26d
JK
15709 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
15710 if test "$plugins" = "yes"; then
a48b32c0
L
15711 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
15712$as_echo_n "checking for library containing dlopen... " >&6; }
15713if test "${ac_cv_search_dlopen+set}" = set; then :
15714 $as_echo_n "(cached) " >&6
15715else
15716 ac_func_search_save_LIBS=$LIBS
15717cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15718/* end confdefs.h. */
15719
15720/* Override any GCC internal prototype to avoid an error.
15721 Use char because int might match the return type of a GCC
15722 builtin and then its argument prototype would still apply. */
15723#ifdef __cplusplus
15724extern "C"
15725#endif
15726char dlopen ();
15727int
15728main ()
15729{
15730return dlopen ();
15731 ;
15732 return 0;
15733}
15734_ACEOF
15735for ac_lib in '' dl; do
15736 if test -z "$ac_lib"; then
15737 ac_res="none required"
15738 else
15739 ac_res=-l$ac_lib
15740 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
15741 fi
15742 if ac_fn_c_try_link "$LINENO"; then :
15743 ac_cv_search_dlopen=$ac_res
15744fi
15745rm -f core conftest.err conftest.$ac_objext \
15746 conftest$ac_exeext
15747 if test "${ac_cv_search_dlopen+set}" = set; then :
15748 break
15749fi
15750done
15751if test "${ac_cv_search_dlopen+set}" = set; then :
15752
15753else
15754 ac_cv_search_dlopen=no
15755fi
15756rm conftest.$ac_ext
15757LIBS=$ac_func_search_save_LIBS
15758fi
15759{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
15760$as_echo "$ac_cv_search_dlopen" >&6; }
15761ac_res=$ac_cv_search_dlopen
15762if test "$ac_res" != no; then :
15763 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15764
15765fi
15766
075ff26d 15767 fi
31d99776 15768fi
31d99776 15769
4f05add4
TT
15770# Add macho support to GDB, but only if BFD includes it.
15771
15772 OLD_CFLAGS=$CFLAGS
15773 OLD_LDFLAGS=$LDFLAGS
15774 OLD_LIBS=$LIBS
15775 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
15776 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
15777 # always want our bfd.
15778 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
5a2d4533
L
15779 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
15780 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
4f05add4 15781 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
711a72d3 15782 LIBS="-lbfd -liberty -lz $intl $LIBS"
4f05add4
TT
15783 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5
15784$as_echo_n "checking for Mach-O support in BFD... " >&6; }
15785if test "${gdb_cv_var_macho+set}" = set; then :
15786 $as_echo_n "(cached) " >&6
15787else
15788 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15789/* end confdefs.h. */
15790#include <stdlib.h>
15791 #include "bfd.h"
15792 #include "mach-o.h"
15793
15794int
15795main ()
15796{
15797return bfd_mach_o_lookup_command (NULL, 0, NULL);
15798 ;
15799 return 0;
15800}
15801_ACEOF
15802if ac_fn_c_try_link "$LINENO"; then :
15803 gdb_cv_var_macho=yes
15804else
15805 gdb_cv_var_macho=no
15806fi
15807rm -f core conftest.err conftest.$ac_objext \
15808 conftest$ac_exeext conftest.$ac_ext
15809fi
15810{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5
15811$as_echo "$gdb_cv_var_macho" >&6; }
15812 CFLAGS=$OLD_CFLAGS
15813 LDFLAGS=$OLD_LDFLAGS
15814 LIBS=$OLD_LIBS
15815if test $gdb_cv_var_macho = yes; then
15816 CONFIG_OBS="$CONFIG_OBS machoread.o"
15817fi
15818
121ce6e5
DJ
15819# Add any host-specific objects to GDB.
15820CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
15821
608e2dbb
TT
15822# If building on ELF, look for lzma support for embedded compressed debug info.
15823if test $gdb_cv_var_elf = yes; then
15824
15825# Check whether --with-lzma was given.
15826if test "${with_lzma+set}" = set; then :
15827 withval=$with_lzma;
15828else
15829 with_lzma=auto
15830fi
15831
15832 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5
15833$as_echo_n "checking whether to use lzma... " >&6; }
15834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5
15835$as_echo "$with_lzma" >&6; }
15836
15837 if test "${with_lzma}" != no; then
15838
15839
15840
15841
15842
15843
15844
15845
15846 use_additional=yes
15847
15848 acl_save_prefix="$prefix"
15849 prefix="$acl_final_prefix"
15850 acl_save_exec_prefix="$exec_prefix"
15851 exec_prefix="$acl_final_exec_prefix"
15852
15853 eval additional_includedir=\"$includedir\"
15854 eval additional_libdir=\"$libdir\"
15855
15856 exec_prefix="$acl_save_exec_prefix"
15857 prefix="$acl_save_prefix"
15858
15859
15860# Check whether --with-liblzma-prefix was given.
15861if test "${with_liblzma_prefix+set}" = set; then :
15862 withval=$with_liblzma_prefix;
15863 if test "X$withval" = "Xno"; then
15864 use_additional=no
15865 else
15866 if test "X$withval" = "X"; then
15867
15868 acl_save_prefix="$prefix"
15869 prefix="$acl_final_prefix"
15870 acl_save_exec_prefix="$exec_prefix"
15871 exec_prefix="$acl_final_exec_prefix"
15872
15873 eval additional_includedir=\"$includedir\"
15874 eval additional_libdir=\"$libdir\"
15875
15876 exec_prefix="$acl_save_exec_prefix"
15877 prefix="$acl_save_prefix"
15878
15879 else
15880 additional_includedir="$withval/include"
15881 additional_libdir="$withval/lib"
15882 fi
15883 fi
15884
15885fi
15886
15887 LIBLZMA=
15888 LTLIBLZMA=
15889 INCLZMA=
15890 rpathdirs=
15891 ltrpathdirs=
15892 names_already_handled=
15893 names_next_round='lzma '
15894 while test -n "$names_next_round"; do
15895 names_this_round="$names_next_round"
15896 names_next_round=
15897 for name in $names_this_round; do
15898 already_handled=
15899 for n in $names_already_handled; do
15900 if test "$n" = "$name"; then
15901 already_handled=yes
15902 break
15903 fi
15904 done
15905 if test -z "$already_handled"; then
15906 names_already_handled="$names_already_handled $name"
15907 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
15908 eval value=\"\$HAVE_LIB$uppername\"
15909 if test -n "$value"; then
15910 if test "$value" = yes; then
15911 eval value=\"\$LIB$uppername\"
15912 test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value"
15913 eval value=\"\$LTLIB$uppername\"
15914 test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value"
15915 else
15916 :
15917 fi
15918 else
15919 found_dir=
15920 found_la=
15921 found_so=
15922 found_a=
15923 if test $use_additional = yes; then
15924 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
15925 found_dir="$additional_libdir"
15926 found_so="$additional_libdir/lib$name.$shlibext"
15927 if test -f "$additional_libdir/lib$name.la"; then
15928 found_la="$additional_libdir/lib$name.la"
15929 fi
15930 else
15931 if test -f "$additional_libdir/lib$name.$libext"; then
15932 found_dir="$additional_libdir"
15933 found_a="$additional_libdir/lib$name.$libext"
15934 if test -f "$additional_libdir/lib$name.la"; then
15935 found_la="$additional_libdir/lib$name.la"
15936 fi
15937 fi
15938 fi
15939 fi
15940 if test "X$found_dir" = "X"; then
15941 for x in $LDFLAGS $LTLIBLZMA; do
15942
15943 acl_save_prefix="$prefix"
15944 prefix="$acl_final_prefix"
15945 acl_save_exec_prefix="$exec_prefix"
15946 exec_prefix="$acl_final_exec_prefix"
15947 eval x=\"$x\"
15948 exec_prefix="$acl_save_exec_prefix"
15949 prefix="$acl_save_prefix"
15950
15951 case "$x" in
15952 -L*)
15953 dir=`echo "X$x" | sed -e 's/^X-L//'`
15954 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
15955 found_dir="$dir"
15956 found_so="$dir/lib$name.$shlibext"
15957 if test -f "$dir/lib$name.la"; then
15958 found_la="$dir/lib$name.la"
15959 fi
15960 else
15961 if test -f "$dir/lib$name.$libext"; then
15962 found_dir="$dir"
15963 found_a="$dir/lib$name.$libext"
15964 if test -f "$dir/lib$name.la"; then
15965 found_la="$dir/lib$name.la"
15966 fi
15967 fi
15968 fi
15969 ;;
15970 esac
15971 if test "X$found_dir" != "X"; then
15972 break
15973 fi
15974 done
15975 fi
15976 if test "X$found_dir" != "X"; then
15977 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name"
15978 if test "X$found_so" != "X"; then
15979 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
15980 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
15981 else
15982 haveit=
15983 for x in $ltrpathdirs; do
15984 if test "X$x" = "X$found_dir"; then
15985 haveit=yes
15986 break
15987 fi
15988 done
15989 if test -z "$haveit"; then
15990 ltrpathdirs="$ltrpathdirs $found_dir"
15991 fi
15992 if test "$hardcode_direct" = yes; then
15993 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
15994 else
15995 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
15996 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
15997 haveit=
15998 for x in $rpathdirs; do
15999 if test "X$x" = "X$found_dir"; then
16000 haveit=yes
16001 break
16002 fi
16003 done
16004 if test -z "$haveit"; then
16005 rpathdirs="$rpathdirs $found_dir"
16006 fi
16007 else
16008 haveit=
16009 for x in $LDFLAGS $LIBLZMA; do
16010
16011 acl_save_prefix="$prefix"
16012 prefix="$acl_final_prefix"
16013 acl_save_exec_prefix="$exec_prefix"
16014 exec_prefix="$acl_final_exec_prefix"
16015 eval x=\"$x\"
16016 exec_prefix="$acl_save_exec_prefix"
16017 prefix="$acl_save_prefix"
16018
16019 if test "X$x" = "X-L$found_dir"; then
16020 haveit=yes
16021 break
16022 fi
16023 done
16024 if test -z "$haveit"; then
16025 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir"
16026 fi
16027 if test "$hardcode_minus_L" != no; then
16028 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
16029 else
16030 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
16031 fi
16032 fi
16033 fi
16034 fi
16035 else
16036 if test "X$found_a" != "X"; then
16037 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a"
16038 else
16039 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name"
16040 fi
16041 fi
16042 additional_includedir=
16043 case "$found_dir" in
16044 */lib | */lib/)
16045 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
16046 additional_includedir="$basedir/include"
16047 ;;
16048 esac
16049 if test "X$additional_includedir" != "X"; then
16050 if test "X$additional_includedir" != "X/usr/include"; then
16051 haveit=
16052 if test "X$additional_includedir" = "X/usr/local/include"; then
16053 if test -n "$GCC"; then
16054 case $host_os in
16055 linux*) haveit=yes;;
16056 esac
16057 fi
16058 fi
16059 if test -z "$haveit"; then
16060 for x in $CPPFLAGS $INCLZMA; do
16061
16062 acl_save_prefix="$prefix"
16063 prefix="$acl_final_prefix"
16064 acl_save_exec_prefix="$exec_prefix"
16065 exec_prefix="$acl_final_exec_prefix"
16066 eval x=\"$x\"
16067 exec_prefix="$acl_save_exec_prefix"
16068 prefix="$acl_save_prefix"
16069
16070 if test "X$x" = "X-I$additional_includedir"; then
16071 haveit=yes
16072 break
16073 fi
16074 done
16075 if test -z "$haveit"; then
16076 if test -d "$additional_includedir"; then
16077 INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir"
16078 fi
16079 fi
16080 fi
16081 fi
16082 fi
16083 if test -n "$found_la"; then
16084 save_libdir="$libdir"
16085 case "$found_la" in
16086 */* | *\\*) . "$found_la" ;;
16087 *) . "./$found_la" ;;
16088 esac
16089 libdir="$save_libdir"
16090 for dep in $dependency_libs; do
16091 case "$dep" in
16092 -L*)
16093 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
16094 if test "X$additional_libdir" != "X/usr/lib"; then
16095 haveit=
16096 if test "X$additional_libdir" = "X/usr/local/lib"; then
16097 if test -n "$GCC"; then
16098 case $host_os in
16099 linux*) haveit=yes;;
16100 esac
16101 fi
16102 fi
16103 if test -z "$haveit"; then
16104 haveit=
16105 for x in $LDFLAGS $LIBLZMA; do
16106
16107 acl_save_prefix="$prefix"
16108 prefix="$acl_final_prefix"
16109 acl_save_exec_prefix="$exec_prefix"
16110 exec_prefix="$acl_final_exec_prefix"
16111 eval x=\"$x\"
16112 exec_prefix="$acl_save_exec_prefix"
16113 prefix="$acl_save_prefix"
16114
16115 if test "X$x" = "X-L$additional_libdir"; then
16116 haveit=yes
16117 break
16118 fi
16119 done
16120 if test -z "$haveit"; then
16121 if test -d "$additional_libdir"; then
16122 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir"
16123 fi
16124 fi
16125 haveit=
16126 for x in $LDFLAGS $LTLIBLZMA; do
16127
16128 acl_save_prefix="$prefix"
16129 prefix="$acl_final_prefix"
16130 acl_save_exec_prefix="$exec_prefix"
16131 exec_prefix="$acl_final_exec_prefix"
16132 eval x=\"$x\"
16133 exec_prefix="$acl_save_exec_prefix"
16134 prefix="$acl_save_prefix"
16135
16136 if test "X$x" = "X-L$additional_libdir"; then
16137 haveit=yes
16138 break
16139 fi
16140 done
16141 if test -z "$haveit"; then
16142 if test -d "$additional_libdir"; then
16143 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir"
16144 fi
16145 fi
16146 fi
16147 fi
16148 ;;
16149 -R*)
16150 dir=`echo "X$dep" | sed -e 's/^X-R//'`
16151 if test "$enable_rpath" != no; then
16152 haveit=
16153 for x in $rpathdirs; do
16154 if test "X$x" = "X$dir"; then
16155 haveit=yes
16156 break
16157 fi
16158 done
16159 if test -z "$haveit"; then
16160 rpathdirs="$rpathdirs $dir"
16161 fi
16162 haveit=
16163 for x in $ltrpathdirs; do
16164 if test "X$x" = "X$dir"; then
16165 haveit=yes
16166 break
16167 fi
16168 done
16169 if test -z "$haveit"; then
16170 ltrpathdirs="$ltrpathdirs $dir"
16171 fi
16172 fi
16173 ;;
16174 -l*)
16175 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
16176 ;;
16177 *.la)
16178 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
16179 ;;
16180 *)
16181 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep"
16182 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep"
16183 ;;
16184 esac
16185 done
16186 fi
16187 else
16188 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
16189 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name"
16190 fi
16191 fi
16192 fi
16193 done
16194 done
16195 if test "X$rpathdirs" != "X"; then
16196 if test -n "$hardcode_libdir_separator"; then
16197 alldirs=
16198 for found_dir in $rpathdirs; do
16199 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
16200 done
16201 acl_save_libdir="$libdir"
16202 libdir="$alldirs"
16203 eval flag=\"$hardcode_libdir_flag_spec\"
16204 libdir="$acl_save_libdir"
16205 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
16206 else
16207 for found_dir in $rpathdirs; do
16208 acl_save_libdir="$libdir"
16209 libdir="$found_dir"
16210 eval flag=\"$hardcode_libdir_flag_spec\"
16211 libdir="$acl_save_libdir"
16212 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
16213 done
16214 fi
16215 fi
16216 if test "X$ltrpathdirs" != "X"; then
16217 for found_dir in $ltrpathdirs; do
16218 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir"
16219 done
16220 fi
16221
16222
16223 ac_save_CPPFLAGS="$CPPFLAGS"
16224
16225 for element in $INCLZMA; do
16226 haveit=
16227 for x in $CPPFLAGS; do
16228
16229 acl_save_prefix="$prefix"
16230 prefix="$acl_final_prefix"
16231 acl_save_exec_prefix="$exec_prefix"
16232 exec_prefix="$acl_final_exec_prefix"
16233 eval x=\"$x\"
16234 exec_prefix="$acl_save_exec_prefix"
16235 prefix="$acl_save_prefix"
16236
16237 if test "X$x" = "X$element"; then
16238 haveit=yes
16239 break
16240 fi
16241 done
16242 if test -z "$haveit"; then
16243 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
16244 fi
16245 done
16246
16247
16248 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5
16249$as_echo_n "checking for liblzma... " >&6; }
16250if test "${ac_cv_liblzma+set}" = set; then :
16251 $as_echo_n "(cached) " >&6
16252else
16253
16254 ac_save_LIBS="$LIBS"
16255 LIBS="$LIBS $LIBLZMA"
16256 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16257/* end confdefs.h. */
16258#include "lzma.h"
16259int
16260main ()
16261{
16262lzma_index_iter iter;
16263 lzma_index_iter_init (&iter, 0);
16264 lzma_mf_is_supported (LZMA_MF_HC3);
16265 ;
16266 return 0;
16267}
16268_ACEOF
16269if ac_fn_c_try_link "$LINENO"; then :
16270 ac_cv_liblzma=yes
16271else
16272 ac_cv_liblzma=no
16273fi
16274rm -f core conftest.err conftest.$ac_objext \
16275 conftest$ac_exeext conftest.$ac_ext
16276 LIBS="$ac_save_LIBS"
16277
16278fi
16279{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5
16280$as_echo "$ac_cv_liblzma" >&6; }
16281 if test "$ac_cv_liblzma" = yes; then
16282 HAVE_LIBLZMA=yes
16283
16284$as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h
16285
16286 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5
16287$as_echo_n "checking how to link with liblzma... " >&6; }
16288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5
16289$as_echo "$LIBLZMA" >&6; }
16290 else
16291 HAVE_LIBLZMA=no
16292 CPPFLAGS="$ac_save_CPPFLAGS"
16293 LIBLZMA=
16294 LTLIBLZMA=
16295 fi
16296
16297
16298
16299
16300
16301
16302 if test "$HAVE_LIBLZMA" != yes; then
16303 if test "$with_lzma" = yes; then
16304 as_fn_error "missing liblzma for --with-lzma" "$LINENO" 5
16305 fi
16306 fi
16307 fi
16308fi
16309
3fc11d3e
JM
16310LIBGUI="../libgui/src/libgui.a"
16311GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
16312
16313
7a292a7a 16314
3fc11d3e
JM
16315WIN32LDAPP=
16316
16317
16318
d91670b9 16319case "${host}" in
686a5eed 16320*-*-cygwin* | *-*-mingw* )
d91670b9
CV
16321 configdir="win"
16322 ;;
16323*)
16324 configdir="unix"
16325 ;;
16326esac
3fc11d3e
JM
16327
16328GDBTKLIBS=
16329if test "${enable_gdbtk}" = "yes"; then
16330
d1c3b63a
KS
16331 # Gdbtk must have an absolute path to srcdir in order to run
16332 # properly when not installed.
16333 here=`pwd`
16334 cd ${srcdir}
16335 GDBTK_SRC_DIR=`pwd`
16336 cd $here
16337
bec39cab 16338
5062cc19
KS
16339 #
16340 # Ok, lets find the tcl configuration
16341 # First, look for one uninstalled.
16342 # the alternative search directory is invoked by --with-tcl
16343 #
3fc11d3e 16344
5062cc19
KS
16345 if test x"${no_tcl}" = x ; then
16346 # we reset no_tcl in case something fails here
16347 no_tcl=true
bec39cab 16348
81ecdfbb
RW
16349# Check whether --with-tcl was given.
16350if test "${with_tcl+set}" = set; then :
16351 withval=$with_tcl; with_tclconfig=${withval}
16352fi
16353
16354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
16355$as_echo_n "checking for Tcl configuration... " >&6; }
16356 if test "${ac_cv_c_tclconfig+set}" = set; then :
16357 $as_echo_n "(cached) " >&6
3fc11d3e 16358else
bec39cab 16359
3fc11d3e 16360
5062cc19
KS
16361 # First check to see if --with-tcl was specified.
16362 case "${host}" in
16363 *-*-cygwin*) platDir="win" ;;
16364 *) platDir="unix" ;;
16365 esac
16366 if test x"${with_tclconfig}" != x ; then
16367 if test -f "${with_tclconfig}/tclConfig.sh" ; then
16368 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
16369 else
81ecdfbb 16370 as_fn_error "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
5062cc19
KS
16371 fi
16372 fi
16373
16374 # then check for a private Tcl installation
16375 if test x"${ac_cv_c_tclconfig}" = x ; then
16376 for i in \
16377 ../tcl \
16378 `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16379 `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
16380 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
16381 ../../tcl \
16382 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16383 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
16384 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
16385 ../../../tcl \
16386 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16387 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
16388 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
16389 if test -f "$i/$platDir/tclConfig.sh" ; then
16390 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
16391 break
16392 fi
16393 done
16394 fi
16395
16396 # on Darwin, check in Framework installation locations
16397 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
16398 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
16399 `ls -d /Library/Frameworks 2>/dev/null` \
16400 `ls -d /Network/Library/Frameworks 2>/dev/null` \
16401 `ls -d /System/Library/Frameworks 2>/dev/null` \
16402 ; do
16403 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
16404 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
16405 break
16406 fi
16407 done
16408 fi
16409
16410 # check in a few common install locations
16411 if test x"${ac_cv_c_tclconfig}" = x ; then
16412 for i in `ls -d ${libdir} 2>/dev/null` \
16413 `ls -d ${exec_prefix}/lib 2>/dev/null` \
16414 `ls -d ${prefix}/lib 2>/dev/null` \
16415 `ls -d /usr/local/lib 2>/dev/null` \
16416 `ls -d /usr/contrib/lib 2>/dev/null` \
16417 `ls -d /usr/lib 2>/dev/null` \
16418 ; do
16419 if test -f "$i/tclConfig.sh" ; then
16420 ac_cv_c_tclconfig=`(cd $i; pwd)`
16421 break
16422 fi
16423 done
16424 fi
3fc11d3e 16425
5062cc19
KS
16426 # check in a few other private locations
16427 if test x"${ac_cv_c_tclconfig}" = x ; then
16428 for i in \
16429 ${srcdir}/../tcl \
16430 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16431 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
16432 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
16433 if test -f "$i/$platDir/tclConfig.sh" ; then
16434 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
16435 break
16436 fi
16437 done
16438 fi
bec39cab 16439
3fc11d3e
JM
16440fi
16441
5062cc19
KS
16442
16443 if test x"${ac_cv_c_tclconfig}" = x ; then
16444 TCL_BIN_DIR="# no Tcl configs found"
81ecdfbb
RW
16445 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
16446$as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
5062cc19
KS
16447 else
16448 no_tcl=
16449 TCL_BIN_DIR=${ac_cv_c_tclconfig}
81ecdfbb
RW
16450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
16451$as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
5062cc19
KS
16452 fi
16453 fi
3fc11d3e 16454
bec39cab 16455
85541719
DE
16456 # If $no_tk is nonempty, then we can't do Tk, and there is no
16457 # point to doing Tcl.
bec39cab 16458
5062cc19
KS
16459 #
16460 # Ok, lets find the tk configuration
16461 # First, look for one uninstalled.
16462 # the alternative search directory is invoked by --with-tk
16463 #
3fc11d3e 16464
5062cc19
KS
16465 if test x"${no_tk}" = x ; then
16466 # we reset no_tk in case something fails here
16467 no_tk=true
bec39cab 16468
81ecdfbb
RW
16469# Check whether --with-tk was given.
16470if test "${with_tk+set}" = set; then :
16471 withval=$with_tk; with_tkconfig=${withval}
16472fi
16473
16474 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
16475$as_echo_n "checking for Tk configuration... " >&6; }
16476 if test "${ac_cv_c_tkconfig+set}" = set; then :
16477 $as_echo_n "(cached) " >&6
bec39cab 16478else
3fc11d3e
JM
16479
16480
5062cc19
KS
16481 # First check to see if --with-tkconfig was specified.
16482 if test x"${with_tkconfig}" != x ; then
16483 if test -f "${with_tkconfig}/tkConfig.sh" ; then
16484 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
16485 else
81ecdfbb 16486 as_fn_error "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
5062cc19
KS
16487 fi
16488 fi
3fc11d3e 16489
5062cc19
KS
16490 # then check for a private Tk library
16491 case "${host}" in
16492 *-*-cygwin*) platDir="win" ;;
16493 *) platDir="unix" ;;
16494 esac
16495 if test x"${ac_cv_c_tkconfig}" = x ; then
16496 for i in \
16497 ../tk \
16498 `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16499 `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
16500 `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
16501 ../../tk \
16502 `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16503 `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
16504 `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
16505 ../../../tk \
16506 `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16507 `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
16508 `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
16509 if test -f "$i/$platDir/tkConfig.sh" ; then
16510 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
16511 break
16512 fi
16513 done
16514 fi
16515
16516 # on Darwin, check in Framework installation locations
16517 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
16518 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
16519 `ls -d /Library/Frameworks 2>/dev/null` \
16520 `ls -d /Network/Library/Frameworks 2>/dev/null` \
16521 `ls -d /System/Library/Frameworks 2>/dev/null` \
16522 ; do
16523 if test -f "$i/Tk.framework/tkConfig.sh" ; then
16524 ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
16525 break
16526 fi
16527 done
16528 fi
16529
16530 # check in a few common install locations
16531 if test x"${ac_cv_c_tkconfig}" = x ; then
16532 for i in `ls -d ${libdir} 2>/dev/null` \
16533 `ls -d ${exec_prefix}/lib 2>/dev/null` \
16534 `ls -d ${prefix}/lib 2>/dev/null` \
16535 `ls -d /usr/local/lib 2>/dev/null` \
16536 `ls -d /usr/contrib/lib 2>/dev/null` \
16537 `ls -d /usr/lib 2>/dev/null` \
16538 ; do
16539 if test -f "$i/tkConfig.sh" ; then
16540 ac_cv_c_tkconfig=`(cd $i; pwd)`
16541 break
16542 fi
16543 done
16544 fi
16545 # check in a few other private locations
16546 if test x"${ac_cv_c_tkconfig}" = x ; then
16547 for i in \
16548 ${srcdir}/../tk \
16549 `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16550 `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
16551 `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
16552 if test -f "$i/$platDir/tkConfig.sh" ; then
16553 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
16554 break
16555 fi
16556 done
16557 fi
3fc11d3e 16558
3fc11d3e
JM
16559fi
16560
16561
5062cc19
KS
16562 if test x"${ac_cv_c_tkconfig}" = x ; then
16563 TK_BIN_DIR="# no Tk configs found"
81ecdfbb
RW
16564 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
16565$as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
5062cc19
KS
16566 else
16567 no_tk=
16568 TK_BIN_DIR=${ac_cv_c_tkconfig}
81ecdfbb
RW
16569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
16570$as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
5062cc19 16571 fi
3fc11d3e 16572 fi
dd2504ab 16573
dd2504ab 16574
85541719
DE
16575 if test -z "${no_tcl}" -a -z "${no_tk}"; then
16576
81ecdfbb
RW
16577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
16578$as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
85541719
DE
16579
16580 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
81ecdfbb
RW
16581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
16582$as_echo "loading" >&6; }
85541719
DE
16583 . ${TCL_BIN_DIR}/tclConfig.sh
16584 else
81ecdfbb
RW
16585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
16586$as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
85541719
DE
16587 fi
16588
16589 # eval is required to do the TCL_DBGX substitution
16590 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
16591 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
16592
16593 # If the TCL_BIN_DIR is the build directory (not the install directory),
16594 # then set the common variable name to the value of the build variables.
16595 # For example, the variable TCL_LIB_SPEC will be set to the value
16596 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
16597 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
16598 # installed and uninstalled version of Tcl.
16599 if test -f "${TCL_BIN_DIR}/Makefile" ; then
16600 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
16601 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
16602 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
16603 elif test "`uname -s`" = "Darwin"; then
16604 # If Tcl was built as a framework, attempt to use the libraries
16605 # from the framework at the given location so that linking works
a68ffae9 16606 # against Tcl.framework installed in an arbitrary location.
85541719
DE
16607 case ${TCL_DEFS} in
16608 *TCL_FRAMEWORK*)
16609 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
16610 for i in "`cd ${TCL_BIN_DIR}; pwd`" \
16611 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
16612 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
16613 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
16614 break
16615 fi
16616 done
16617 fi
16618 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
16619 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
16620 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
16621 fi
16622 ;;
16623 esac
16624 fi
16625
16626 # eval is required to do the TCL_DBGX substitution
16627 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
16628 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
16629 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
16630 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
16631
16632
16633
16634
16635
16636
16637
16638
16639
16640
16641
16642
16643
16644
16645
16646 # Check for in-tree tcl
16647 here=`pwd`
16648 cd ${srcdir}/..
16649 topdir=`pwd`
16650 cd ${here}
16651
16652 intree="no"
16653 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
16654 intree="yes"
16655 fi
16656
16657 # Find Tcl private headers
16658 if test x"${intree}" = xno; then
16659
81ecdfbb
RW
16660 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
16661$as_echo_n "checking for Tcl private headers... " >&6; }
85541719
DE
16662 private_dir=""
16663 dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
16664 if test -f ${dir}/tclInt.h ; then
16665 private_dir=${dir}
16666 fi
16667
16668 if test x"${private_dir}" = x; then
81ecdfbb 16669 as_fn_error "could not find private Tcl headers" "$LINENO" 5
85541719
DE
16670 else
16671 TCL_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
16672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
16673$as_echo "${private_dir}" >&6; }
85541719
DE
16674 fi
16675
16676 TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
16677 TCL_LIBRARY="${TCL_LIB_SPEC}"
16678 TCL_DEPS=""
16679 else
16680 # If building tcl in the same src tree, private headers
16681 # are not needed, but we need to be sure to use the right
16682 # headers library
16683 TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
16684 TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
16685 TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
16686 fi
16687
16688
16689
16690
16691
81ecdfbb
RW
16692 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
16693$as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
dd2504ab 16694
5062cc19 16695 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
81ecdfbb
RW
16696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
16697$as_echo "loading" >&6; }
5062cc19 16698 . ${TK_BIN_DIR}/tkConfig.sh
3fc11d3e 16699 else
81ecdfbb
RW
16700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
16701$as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
3fc11d3e 16702 fi
bec39cab 16703
5062cc19
KS
16704 # eval is required to do the TK_DBGX substitution
16705 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
16706 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
16707
16708 # If the TK_BIN_DIR is the build directory (not the install directory),
16709 # then set the common variable name to the value of the build variables.
16710 # For example, the variable TK_LIB_SPEC will be set to the value
16711 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
16712 # instead of TK_BUILD_LIB_SPEC since it will work with both an
16713 # installed and uninstalled version of Tcl.
85541719 16714 if test -f "${TK_BIN_DIR}/Makefile" ; then
5062cc19
KS
16715 TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
16716 TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
16717 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
16718 elif test "`uname -s`" = "Darwin"; then
16719 # If Tk was built as a framework, attempt to use the libraries
16720 # from the framework at the given location so that linking works
a68ffae9 16721 # against Tk.framework installed in an arbitrary location.
5062cc19
KS
16722 case ${TK_DEFS} in
16723 *TK_FRAMEWORK*)
85541719 16724 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
5062cc19
KS
16725 for i in "`cd ${TK_BIN_DIR}; pwd`" \
16726 "`cd ${TK_BIN_DIR}/../..; pwd`"; do
16727 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
16728 TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
16729 break
16730 fi
16731 done
16732 fi
85541719 16733 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
5062cc19
KS
16734 TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
16735 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
16736 fi
16737 ;;
16738 esac
3fc11d3e
JM
16739 fi
16740
5062cc19
KS
16741 # eval is required to do the TK_DBGX substitution
16742 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
16743 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
16744 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
16745 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
3fc11d3e 16746
3fc11d3e
JM
16747
16748
bec39cab
AC
16749
16750
16751
16752
16753
16754
16755
3fc11d3e 16756
3fc11d3e 16757
bec39cab 16758
bec39cab 16759
85541719
DE
16760 # Check for in-tree Tk
16761 intree="no"
16762 if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
16763 intree="yes"
16764 fi
3fc11d3e 16765
85541719
DE
16766 # Find Tk private headers
16767 if test x"${intree}" = xno; then
3fc11d3e 16768
81ecdfbb
RW
16769 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
16770$as_echo_n "checking for Tk private headers... " >&6; }
5062cc19
KS
16771 private_dir=""
16772 dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
16773 if test -f ${dir}/tkInt.h; then
16774 private_dir=${dir}
3fc11d3e 16775 fi
bec39cab 16776
5062cc19 16777 if test x"${private_dir}" = x; then
81ecdfbb 16778 as_fn_error "could not find Tk private headers" "$LINENO" 5
3fc11d3e 16779 else
5062cc19 16780 TK_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
16781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
16782$as_echo "${private_dir}" >&6; }
3fc11d3e 16783 fi
3fc11d3e 16784
85541719
DE
16785 TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
16786 TK_LIBRARY=${TK_LIB_SPEC}
16787 TK_DEPS=""
16788 else
16789 TK_INCLUDE="-I${TK_SRC_DIR}/generic"
16790 TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
16791 TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
16792 fi
3fc11d3e
JM
16793
16794
3fc11d3e
JM
16795
16796
3fc11d3e 16797
85541719 16798 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e 16799
85541719
DE
16800 # Include some libraries that Tcl and Tk want.
16801 TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
16802 # Yes, the ordering seems wrong here. But it isn't.
16803 # TK_LIBS is the list of libraries that need to be linked
16804 # after Tcl/Tk. Note that this isn't put into LIBS. If it
16805 # were in LIBS then any link tests after this point would
16806 # try to include things like `$(LIBGUI)', which wouldn't work.
16807 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5 16808
85541719
DE
16809 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
16810 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
16811 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
16812 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
16813 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
16814 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
16815 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
3fc11d3e 16816
85541719
DE
16817 if test x$gdb_cv_os_cygwin = xyes; then
16818 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
16819 WIN32LDAPP="-Wl,--subsystem,console"
16820 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
3fc11d3e 16821 fi
ffc6a242 16822
81ecdfbb 16823 subdirs="$subdirs gdbtk"
3ace7edb 16824
85541719 16825 fi
3fc11d3e
JM
16826fi
16827
16828
16829
16830
16831
16832
16833
16834
81ecdfbb
RW
16835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
16836$as_echo_n "checking for X... " >&6; }
bec39cab 16837
c906108c 16838
81ecdfbb
RW
16839# Check whether --with-x was given.
16840if test "${with_x+set}" = set; then :
16841 withval=$with_x;
16842fi
c906108c
SS
16843
16844# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
16845if test "x$with_x" = xno; then
16846 # The user explicitly disabled X.
16847 have_x=disabled
16848else
81ecdfbb
RW
16849 case $x_includes,$x_libraries in #(
16850 *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
16851 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
16852 $as_echo_n "(cached) " >&6
c906108c
SS
16853else
16854 # One or both of the vars are not set, and there is no cached value.
bec39cab 16855ac_x_includes=no ac_x_libraries=no
81ecdfbb 16856rm -f -r conftest.dir
bec39cab
AC
16857if mkdir conftest.dir; then
16858 cd conftest.dir
bec39cab 16859 cat >Imakefile <<'_ACEOF'
81ecdfbb
RW
16860incroot:
16861 @echo incroot='${INCROOT}'
16862usrlibdir:
16863 @echo usrlibdir='${USRLIBDIR}'
16864libdir:
16865 @echo libdir='${LIBDIR}'
16866_ACEOF
16867 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
c906108c 16868 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
81ecdfbb
RW
16869 for ac_var in incroot usrlibdir libdir; do
16870 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
16871 done
c906108c 16872 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
81ecdfbb
RW
16873 for ac_extension in a so sl dylib la dll; do
16874 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
16875 test -f "$ac_im_libdir/libX11.$ac_extension"; then
bec39cab 16876 ac_im_usrlibdir=$ac_im_libdir; break
c906108c
SS
16877 fi
16878 done
16879 # Screen out bogus values from the imake configuration. They are
16880 # bogus both because they are the default anyway, and because
16881 # using them would break gcc on systems where it needs fixed includes.
bec39cab 16882 case $ac_im_incroot in
81ecdfbb 16883 /usr/include) ac_x_includes= ;;
bec39cab 16884 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
c906108c 16885 esac
bec39cab 16886 case $ac_im_usrlibdir in
81ecdfbb 16887 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
bec39cab 16888 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
c906108c
SS
16889 esac
16890 fi
16891 cd ..
81ecdfbb 16892 rm -f -r conftest.dir
c906108c
SS
16893fi
16894
bec39cab
AC
16895# Standard set of common directories for X headers.
16896# Check X11 before X11Rn because it is often a symlink to the current release.
16897ac_x_header_dirs='
16898/usr/X11/include
81ecdfbb 16899/usr/X11R7/include
bec39cab
AC
16900/usr/X11R6/include
16901/usr/X11R5/include
16902/usr/X11R4/include
16903
16904/usr/include/X11
81ecdfbb 16905/usr/include/X11R7
bec39cab
AC
16906/usr/include/X11R6
16907/usr/include/X11R5
16908/usr/include/X11R4
16909
16910/usr/local/X11/include
81ecdfbb 16911/usr/local/X11R7/include
bec39cab
AC
16912/usr/local/X11R6/include
16913/usr/local/X11R5/include
16914/usr/local/X11R4/include
16915
16916/usr/local/include/X11
81ecdfbb 16917/usr/local/include/X11R7
bec39cab
AC
16918/usr/local/include/X11R6
16919/usr/local/include/X11R5
16920/usr/local/include/X11R4
16921
16922/usr/X386/include
16923/usr/x386/include
16924/usr/XFree86/include/X11
16925
16926/usr/include
16927/usr/local/include
16928/usr/unsupported/include
16929/usr/athena/include
16930/usr/local/x11r5/include
16931/usr/lpp/Xamples/include
16932
16933/usr/openwin/include
16934/usr/openwin/share/include'
16935
16936if test "$ac_x_includes" = no; then
81ecdfbb 16937 # Guess where to find include files, by looking for Xlib.h.
c906108c 16938 # First, try using that file with no special directory specified.
81ecdfbb 16939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 16940/* end confdefs.h. */
81ecdfbb 16941#include <X11/Xlib.h>
bec39cab 16942_ACEOF
81ecdfbb 16943if ac_fn_c_try_cpp "$LINENO"; then :
c906108c
SS
16944 # We can compile using X headers with no special include directory.
16945ac_x_includes=
16946else
bec39cab 16947 for ac_dir in $ac_x_header_dirs; do
81ecdfbb 16948 if test -r "$ac_dir/X11/Xlib.h"; then
bec39cab
AC
16949 ac_x_includes=$ac_dir
16950 break
16951 fi
16952done
c906108c 16953fi
bec39cab
AC
16954rm -f conftest.err conftest.$ac_ext
16955fi # $ac_x_includes = no
c906108c 16956
bec39cab 16957if test "$ac_x_libraries" = no; then
c906108c 16958 # Check for the libraries.
c906108c
SS
16959 # See if we find them without any special options.
16960 # Don't add to $LIBS permanently.
bec39cab 16961 ac_save_LIBS=$LIBS
81ecdfbb
RW
16962 LIBS="-lX11 $LIBS"
16963 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 16964/* end confdefs.h. */
81ecdfbb 16965#include <X11/Xlib.h>
bec39cab
AC
16966int
16967main ()
16968{
81ecdfbb 16969XrmInitialize ()
bec39cab
AC
16970 ;
16971 return 0;
16972}
16973_ACEOF
81ecdfbb 16974if ac_fn_c_try_link "$LINENO"; then :
bec39cab 16975 LIBS=$ac_save_LIBS
c906108c
SS
16976# We can link X programs with no special library path.
16977ac_x_libraries=
16978else
81ecdfbb
RW
16979 LIBS=$ac_save_LIBS
16980for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
c906108c 16981do
bec39cab 16982 # Don't even attempt the hair of trying to link an X program!
81ecdfbb
RW
16983 for ac_extension in a so sl dylib la dll; do
16984 if test -r "$ac_dir/libX11.$ac_extension"; then
c906108c
SS
16985 ac_x_libraries=$ac_dir
16986 break 2
16987 fi
16988 done
16989done
16990fi
81ecdfbb
RW
16991rm -f core conftest.err conftest.$ac_objext \
16992 conftest$ac_exeext conftest.$ac_ext
bec39cab 16993fi # $ac_x_libraries = no
c906108c 16994
81ecdfbb
RW
16995case $ac_x_includes,$ac_x_libraries in #(
16996 no,* | *,no | *\'*)
16997 # Didn't find X, or a directory has "'" in its name.
16998 ac_cv_have_x="have_x=no";; #(
16999 *)
17000 # Record where we found X for the cache.
17001 ac_cv_have_x="have_x=yes\
17002 ac_x_includes='$ac_x_includes'\
17003 ac_x_libraries='$ac_x_libraries'"
17004esac
c906108c 17005fi
81ecdfbb
RW
17006;; #(
17007 *) have_x=yes;;
17008 esac
c906108c
SS
17009 eval "$ac_cv_have_x"
17010fi # $with_x != no
17011
17012if test "$have_x" != yes; then
81ecdfbb
RW
17013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
17014$as_echo "$have_x" >&6; }
c906108c
SS
17015 no_x=yes
17016else
17017 # If each of the values was on the command line, it overrides each guess.
17018 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
17019 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
17020 # Update the cache value to reflect the command line values.
81ecdfbb
RW
17021 ac_cv_have_x="have_x=yes\
17022 ac_x_includes='$x_includes'\
17023 ac_x_libraries='$x_libraries'"
17024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
17025$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
c906108c
SS
17026fi
17027
17028
bec39cab 17029# Unlike the sim directory, whether a simulator is linked is controlled by
9b624dbe 17030# presence of a gdb_sim definition in the target configure.tgt entry.
7a292a7a
SS
17031# This code just checks for a few cases where we'd like to ignore those
17032# definitions, even when they're present in the '.mt' file. These cases
17033# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 17034# not part of the source tree.
7a292a7a 17035#
81ecdfbb
RW
17036# Check whether --enable-sim was given.
17037if test "${enable_sim+set}" = set; then :
17038 enableval=$enable_sim; echo "enable_sim = $enable_sim";
7a292a7a
SS
17039 echo "enableval = ${enableval}";
17040 case "${enableval}" in
17041 yes) ignore_sim=false ;;
17042 no) ignore_sim=true ;;
17043 *) ignore_sim=false ;;
17044 esac
17045else
17046 ignore_sim=false
81ecdfbb
RW
17047fi
17048
7a292a7a
SS
17049
17050if test ! -d "${srcdir}/../sim"; then
17051 ignore_sim=true
17052fi
17053
9b624dbe
UW
17054SIM=
17055SIM_OBS=
17056if test "${ignore_sim}" = "false"; then
17057 if test x"${gdb_sim}" != x ; then
17058 SIM="${gdb_sim}"
17059 SIM_OBS="remote-sim.o"
60ca704f 17060
81ecdfbb 17061$as_echo "#define WITH_SIM 1" >>confdefs.h
7a292a7a 17062
976102cd
PA
17063
17064 # Some tdep code should only be compiled in when the ppc sim is
17065 # built. PR sim/13418.
17066 case $target in
17067 powerpc*-*-*)
17068
17069$as_echo "#define WITH_PPC_SIM 1" >>confdefs.h
17070
17071 ;;
17072 esac
9b624dbe 17073 fi
7a292a7a
SS
17074fi
17075
17076
17077
c906108c
SS
17078
17079
17080
17081
17082
17083
dfcd3bfb 17084
e56ac5c3
AC
17085
17086
b3a90332
AC
17087
17088
c35f4ffc 17089# List of host floatformats.
bec39cab
AC
17090
17091cat >>confdefs.h <<_ACEOF
c35f4ffc 17092#define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
bec39cab 17093_ACEOF
c35f4ffc 17094
bec39cab
AC
17095
17096cat >>confdefs.h <<_ACEOF
c35f4ffc 17097#define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
bec39cab
AC
17098_ACEOF
17099
c35f4ffc 17100
bec39cab 17101cat >>confdefs.h <<_ACEOF
c35f4ffc 17102#define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
bec39cab 17103_ACEOF
c35f4ffc
AC
17104
17105
c906108c
SS
17106# target_subdir is used by the testsuite to find the target libraries.
17107target_subdir=
17108if test "${host}" != "${target}"; then
17109 target_subdir="${target_alias}/"
17110fi
17111
17112
21ea5acd 17113# Import nat definitions.
2b351b19 17114nat_makefile_frag=/dev/null
771b4502 17115if test "${gdb_native}" = "yes"; then
21ea5acd
SDJ
17116 . ${srcdir}/configure.nat
17117 nativefile=$NAT_FILE
c906108c 17118fi
c906108c 17119
c906108c
SS
17120
17121
17122
21ea5acd
SDJ
17123
17124
17125
17126
17127
c906108c
SS
17128
17129
b00a8037 17130if test x"${gdb_osabi}" != x ; then
bec39cab
AC
17131
17132cat >>confdefs.h <<_ACEOF
b00a8037 17133#define GDB_OSABI_DEFAULT $gdb_osabi
bec39cab 17134_ACEOF
b00a8037
DJ
17135
17136fi
17137
8dcde887 17138# Enable multi-ice-gdb-server.
81ecdfbb
RW
17139# Check whether --enable-multi-ice was given.
17140if test "${enable_multi_ice+set}" = set; then :
17141 enableval=$enable_multi_ice; case $enableval in
8dcde887
MK
17142 yes | no)
17143 ;;
81ecdfbb 17144 *) as_fn_error "bad value $enableval for --enable-multi-ice" "$LINENO" 5 ;;
8dcde887 17145 esac
81ecdfbb 17146fi
b4e70030 17147
81ecdfbb
RW
17148if test "x$enable_multi_ice" = xyes; then
17149 subdirs="$subdirs multi-ice"
3ace7edb 17150
a85f51e7
DJ
17151fi
17152
496c0e1b
JB
17153# Check whether --enable-gdbserver was given.
17154if test "${enable_gdbserver+set}" = set; then :
17155 enableval=$enable_gdbserver; case "${enableval}" in
17156 yes| no|auto) ;;
17157 *) as_fn_error "bad value ${enableval} for --enable-gdbserver option" "$LINENO" 5 ;;
17158esac
17159else
17160 enable_gdbserver=auto
17161fi
17162
17163
17164# We only build gdbserver automatically in a native configuration, and
17165# only if the user did not explicitly disable its build.
17166if test "$gdb_native" = "yes" -a "$enable_gdbserver" != "no"; then
81ecdfbb
RW
17167 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5
17168$as_echo_n "checking whether gdbserver is supported on this host... " >&6; }
8dcde887 17169 if test "x$build_gdbserver" = xyes; then
81ecdfbb
RW
17170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17171$as_echo "yes" >&6; }
17172 subdirs="$subdirs gdbserver"
3ace7edb 17173
496c0e1b 17174 gdbserver_build_enabled=yes
8dcde887 17175 else
81ecdfbb
RW
17176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17177$as_echo "no" >&6; }
8dcde887
MK
17178 fi
17179fi
17180
496c0e1b
JB
17181# If the user explicitly request the gdbserver to be built, verify that
17182# we were in fact able to enable it.
17183if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then
17184 as_fn_error "Automatic gdbserver build is not supported for this configuration" "$LINENO" 5
17185fi
17186
393fd4c3
YQ
17187# Check for babeltrace and babeltrace-ctf
17188
17189# Check whether --with-babeltrace was given.
17190if test "${with_babeltrace+set}" = set; then :
17191 withval=$with_babeltrace;
17192else
17193 with_babeltrace=auto
17194fi
17195
17196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltrace" >&5
17197$as_echo_n "checking whether to use babeltrace... " >&6; }
17198{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5
17199$as_echo "$with_babeltrace" >&6; }
17200
17201if test "x$with_babeltrace" = "xno"; then
17202 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&5
17203$as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&2;}
17204else
17205 # Append -Werror to CFLAGS so that configure can catch the warning
17206 # "assignment from incompatible pointer type", which is related to
17207 # the babeltrace change from 1.0.3 to 1.1.0. Babeltrace 1.1.0 works
17208 # in GDB, while babeltrace 1.0.3 is broken.
17209 # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be
17210 # safe to save and restore CFLAGS here.
17211 saved_CFLAGS=$CFLAGS
17212 CFLAGS="$CFLAGS -Werror"
17213
17214
17215
17216
17217
17218
17219
17220
17221 use_additional=yes
17222
17223 acl_save_prefix="$prefix"
17224 prefix="$acl_final_prefix"
17225 acl_save_exec_prefix="$exec_prefix"
17226 exec_prefix="$acl_final_exec_prefix"
17227
17228 eval additional_includedir=\"$includedir\"
17229 eval additional_libdir=\"$libdir\"
17230
17231 exec_prefix="$acl_save_exec_prefix"
17232 prefix="$acl_save_prefix"
17233
17234
17235# Check whether --with-libbabeltrace-prefix was given.
17236if test "${with_libbabeltrace_prefix+set}" = set; then :
17237 withval=$with_libbabeltrace_prefix;
17238 if test "X$withval" = "Xno"; then
17239 use_additional=no
17240 else
17241 if test "X$withval" = "X"; then
17242
17243 acl_save_prefix="$prefix"
17244 prefix="$acl_final_prefix"
17245 acl_save_exec_prefix="$exec_prefix"
17246 exec_prefix="$acl_final_exec_prefix"
17247
17248 eval additional_includedir=\"$includedir\"
17249 eval additional_libdir=\"$libdir\"
17250
17251 exec_prefix="$acl_save_exec_prefix"
17252 prefix="$acl_save_prefix"
17253
17254 else
17255 additional_includedir="$withval/include"
17256 additional_libdir="$withval/lib"
17257 fi
17258 fi
17259
17260fi
17261
17262 LIBBABELTRACE=
17263 LTLIBBABELTRACE=
17264 INCBABELTRACE=
17265 rpathdirs=
17266 ltrpathdirs=
17267 names_already_handled=
17268 names_next_round='babeltrace babeltrace-ctf'
17269 while test -n "$names_next_round"; do
17270 names_this_round="$names_next_round"
17271 names_next_round=
17272 for name in $names_this_round; do
17273 already_handled=
17274 for n in $names_already_handled; do
17275 if test "$n" = "$name"; then
17276 already_handled=yes
17277 break
17278 fi
17279 done
17280 if test -z "$already_handled"; then
17281 names_already_handled="$names_already_handled $name"
17282 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
17283 eval value=\"\$HAVE_LIB$uppername\"
17284 if test -n "$value"; then
17285 if test "$value" = yes; then
17286 eval value=\"\$LIB$uppername\"
17287 test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value"
17288 eval value=\"\$LTLIB$uppername\"
17289 test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value"
17290 else
17291 :
17292 fi
17293 else
17294 found_dir=
17295 found_la=
17296 found_so=
17297 found_a=
17298 if test $use_additional = yes; then
17299 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
17300 found_dir="$additional_libdir"
17301 found_so="$additional_libdir/lib$name.$shlibext"
17302 if test -f "$additional_libdir/lib$name.la"; then
17303 found_la="$additional_libdir/lib$name.la"
17304 fi
17305 else
17306 if test -f "$additional_libdir/lib$name.$libext"; then
17307 found_dir="$additional_libdir"
17308 found_a="$additional_libdir/lib$name.$libext"
17309 if test -f "$additional_libdir/lib$name.la"; then
17310 found_la="$additional_libdir/lib$name.la"
17311 fi
17312 fi
17313 fi
17314 fi
17315 if test "X$found_dir" = "X"; then
17316 for x in $LDFLAGS $LTLIBBABELTRACE; do
17317
17318 acl_save_prefix="$prefix"
17319 prefix="$acl_final_prefix"
17320 acl_save_exec_prefix="$exec_prefix"
17321 exec_prefix="$acl_final_exec_prefix"
17322 eval x=\"$x\"
17323 exec_prefix="$acl_save_exec_prefix"
17324 prefix="$acl_save_prefix"
17325
17326 case "$x" in
17327 -L*)
17328 dir=`echo "X$x" | sed -e 's/^X-L//'`
17329 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
17330 found_dir="$dir"
17331 found_so="$dir/lib$name.$shlibext"
17332 if test -f "$dir/lib$name.la"; then
17333 found_la="$dir/lib$name.la"
17334 fi
17335 else
17336 if test -f "$dir/lib$name.$libext"; then
17337 found_dir="$dir"
17338 found_a="$dir/lib$name.$libext"
17339 if test -f "$dir/lib$name.la"; then
17340 found_la="$dir/lib$name.la"
17341 fi
17342 fi
17343 fi
17344 ;;
17345 esac
17346 if test "X$found_dir" != "X"; then
17347 break
17348 fi
17349 done
17350 fi
17351 if test "X$found_dir" != "X"; then
17352 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name"
17353 if test "X$found_so" != "X"; then
17354 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
17355 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
17356 else
17357 haveit=
17358 for x in $ltrpathdirs; do
17359 if test "X$x" = "X$found_dir"; then
17360 haveit=yes
17361 break
17362 fi
17363 done
17364 if test -z "$haveit"; then
17365 ltrpathdirs="$ltrpathdirs $found_dir"
17366 fi
17367 if test "$hardcode_direct" = yes; then
17368 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
17369 else
17370 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
17371 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
17372 haveit=
17373 for x in $rpathdirs; do
17374 if test "X$x" = "X$found_dir"; then
17375 haveit=yes
17376 break
17377 fi
17378 done
17379 if test -z "$haveit"; then
17380 rpathdirs="$rpathdirs $found_dir"
17381 fi
17382 else
17383 haveit=
17384 for x in $LDFLAGS $LIBBABELTRACE; do
17385
17386 acl_save_prefix="$prefix"
17387 prefix="$acl_final_prefix"
17388 acl_save_exec_prefix="$exec_prefix"
17389 exec_prefix="$acl_final_exec_prefix"
17390 eval x=\"$x\"
17391 exec_prefix="$acl_save_exec_prefix"
17392 prefix="$acl_save_prefix"
17393
17394 if test "X$x" = "X-L$found_dir"; then
17395 haveit=yes
17396 break
17397 fi
17398 done
17399 if test -z "$haveit"; then
17400 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir"
17401 fi
17402 if test "$hardcode_minus_L" != no; then
17403 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
17404 else
17405 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
17406 fi
17407 fi
17408 fi
17409 fi
17410 else
17411 if test "X$found_a" != "X"; then
17412 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a"
17413 else
17414 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name"
17415 fi
17416 fi
17417 additional_includedir=
17418 case "$found_dir" in
17419 */lib | */lib/)
17420 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
17421 additional_includedir="$basedir/include"
17422 ;;
17423 esac
17424 if test "X$additional_includedir" != "X"; then
17425 if test "X$additional_includedir" != "X/usr/include"; then
17426 haveit=
17427 if test "X$additional_includedir" = "X/usr/local/include"; then
17428 if test -n "$GCC"; then
17429 case $host_os in
17430 linux*) haveit=yes;;
17431 esac
17432 fi
17433 fi
17434 if test -z "$haveit"; then
17435 for x in $CPPFLAGS $INCBABELTRACE; do
17436
17437 acl_save_prefix="$prefix"
17438 prefix="$acl_final_prefix"
17439 acl_save_exec_prefix="$exec_prefix"
17440 exec_prefix="$acl_final_exec_prefix"
17441 eval x=\"$x\"
17442 exec_prefix="$acl_save_exec_prefix"
17443 prefix="$acl_save_prefix"
17444
17445 if test "X$x" = "X-I$additional_includedir"; then
17446 haveit=yes
17447 break
17448 fi
17449 done
17450 if test -z "$haveit"; then
17451 if test -d "$additional_includedir"; then
17452 INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir"
17453 fi
17454 fi
17455 fi
17456 fi
17457 fi
17458 if test -n "$found_la"; then
17459 save_libdir="$libdir"
17460 case "$found_la" in
17461 */* | *\\*) . "$found_la" ;;
17462 *) . "./$found_la" ;;
17463 esac
17464 libdir="$save_libdir"
17465 for dep in $dependency_libs; do
17466 case "$dep" in
17467 -L*)
17468 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
17469 if test "X$additional_libdir" != "X/usr/lib"; then
17470 haveit=
17471 if test "X$additional_libdir" = "X/usr/local/lib"; then
17472 if test -n "$GCC"; then
17473 case $host_os in
17474 linux*) haveit=yes;;
17475 esac
17476 fi
17477 fi
17478 if test -z "$haveit"; then
17479 haveit=
17480 for x in $LDFLAGS $LIBBABELTRACE; do
17481
17482 acl_save_prefix="$prefix"
17483 prefix="$acl_final_prefix"
17484 acl_save_exec_prefix="$exec_prefix"
17485 exec_prefix="$acl_final_exec_prefix"
17486 eval x=\"$x\"
17487 exec_prefix="$acl_save_exec_prefix"
17488 prefix="$acl_save_prefix"
17489
17490 if test "X$x" = "X-L$additional_libdir"; then
17491 haveit=yes
17492 break
17493 fi
17494 done
17495 if test -z "$haveit"; then
17496 if test -d "$additional_libdir"; then
17497 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir"
17498 fi
17499 fi
17500 haveit=
17501 for x in $LDFLAGS $LTLIBBABELTRACE; do
17502
17503 acl_save_prefix="$prefix"
17504 prefix="$acl_final_prefix"
17505 acl_save_exec_prefix="$exec_prefix"
17506 exec_prefix="$acl_final_exec_prefix"
17507 eval x=\"$x\"
17508 exec_prefix="$acl_save_exec_prefix"
17509 prefix="$acl_save_prefix"
17510
17511 if test "X$x" = "X-L$additional_libdir"; then
17512 haveit=yes
17513 break
17514 fi
17515 done
17516 if test -z "$haveit"; then
17517 if test -d "$additional_libdir"; then
17518 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir"
17519 fi
17520 fi
17521 fi
17522 fi
17523 ;;
17524 -R*)
17525 dir=`echo "X$dep" | sed -e 's/^X-R//'`
17526 if test "$enable_rpath" != no; then
17527 haveit=
17528 for x in $rpathdirs; do
17529 if test "X$x" = "X$dir"; then
17530 haveit=yes
17531 break
17532 fi
17533 done
17534 if test -z "$haveit"; then
17535 rpathdirs="$rpathdirs $dir"
17536 fi
17537 haveit=
17538 for x in $ltrpathdirs; do
17539 if test "X$x" = "X$dir"; then
17540 haveit=yes
17541 break
17542 fi
17543 done
17544 if test -z "$haveit"; then
17545 ltrpathdirs="$ltrpathdirs $dir"
17546 fi
17547 fi
17548 ;;
17549 -l*)
17550 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
17551 ;;
17552 *.la)
17553 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
17554 ;;
17555 *)
17556 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$dep"
17557 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$dep"
17558 ;;
17559 esac
17560 done
17561 fi
17562 else
17563 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
17564 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name"
17565 fi
17566 fi
17567 fi
17568 done
17569 done
17570 if test "X$rpathdirs" != "X"; then
17571 if test -n "$hardcode_libdir_separator"; then
17572 alldirs=
17573 for found_dir in $rpathdirs; do
17574 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
17575 done
17576 acl_save_libdir="$libdir"
17577 libdir="$alldirs"
17578 eval flag=\"$hardcode_libdir_flag_spec\"
17579 libdir="$acl_save_libdir"
17580 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
17581 else
17582 for found_dir in $rpathdirs; do
17583 acl_save_libdir="$libdir"
17584 libdir="$found_dir"
17585 eval flag=\"$hardcode_libdir_flag_spec\"
17586 libdir="$acl_save_libdir"
17587 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
17588 done
17589 fi
17590 fi
17591 if test "X$ltrpathdirs" != "X"; then
17592 for found_dir in $ltrpathdirs; do
17593 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir"
17594 done
17595 fi
17596
17597
17598 ac_save_CPPFLAGS="$CPPFLAGS"
17599
17600 for element in $INCBABELTRACE; do
17601 haveit=
17602 for x in $CPPFLAGS; do
17603
17604 acl_save_prefix="$prefix"
17605 prefix="$acl_final_prefix"
17606 acl_save_exec_prefix="$exec_prefix"
17607 exec_prefix="$acl_final_exec_prefix"
17608 eval x=\"$x\"
17609 exec_prefix="$acl_save_exec_prefix"
17610 prefix="$acl_save_prefix"
17611
17612 if test "X$x" = "X$element"; then
17613 haveit=yes
17614 break
17615 fi
17616 done
17617 if test -z "$haveit"; then
17618 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
17619 fi
17620 done
17621
17622
17623 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5
17624$as_echo_n "checking for libbabeltrace... " >&6; }
17625if test "${ac_cv_libbabeltrace+set}" = set; then :
17626 $as_echo_n "(cached) " >&6
17627else
17628
17629 ac_save_LIBS="$LIBS"
17630 LIBS="$LIBS $LIBBABELTRACE"
17631 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17632/* end confdefs.h. */
17633#include <babeltrace/babeltrace.h>
17634 #include <babeltrace/ctf/events.h>
17635 #include <babeltrace/ctf/iterator.h>
17636int
17637main ()
17638{
17639struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL));
17640 struct bt_ctf_event *event = NULL;
17641 const struct bt_definition *scope;
17642
13cdc2af 17643 pos->type = BT_SEEK_BEGIN;
65c749e7 17644 bt_iter_set_pos (bt_ctf_get_iter (NULL), pos);
393fd4c3
YQ
17645 scope = bt_ctf_get_top_level_scope (event,
17646 BT_STREAM_EVENT_HEADER);
17647 bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id"));
17648
17649 ;
17650 return 0;
17651}
17652_ACEOF
17653if ac_fn_c_try_link "$LINENO"; then :
17654 ac_cv_libbabeltrace=yes
17655else
17656 ac_cv_libbabeltrace=no
17657fi
17658rm -f core conftest.err conftest.$ac_objext \
17659 conftest$ac_exeext conftest.$ac_ext
17660 LIBS="$ac_save_LIBS"
17661
17662fi
17663{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5
17664$as_echo "$ac_cv_libbabeltrace" >&6; }
17665 if test "$ac_cv_libbabeltrace" = yes; then
17666 HAVE_LIBBABELTRACE=yes
17667
17668$as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h
17669
17670 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libbabeltrace" >&5
17671$as_echo_n "checking how to link with libbabeltrace... " >&6; }
17672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5
17673$as_echo "$LIBBABELTRACE" >&6; }
17674 else
17675 HAVE_LIBBABELTRACE=no
17676 CPPFLAGS="$ac_save_CPPFLAGS"
17677 LIBBABELTRACE=
17678 LTLIBBABELTRACE=
17679 fi
17680
17681
17682
17683
17684
17685
17686 CFLAGS=$saved_CFLAGS
17687
17688 if test "$HAVE_LIBBABELTRACE" != yes; then
17689 if test "$with_babeltrace" = yes; then
17690 as_fn_error "babeltrace is missing or unusable" "$LINENO" 5
17691 else
17692 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&5
17693$as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&2;}
17694 fi
17695 fi
17696fi
17697
21ea5acd
SDJ
17698# If nativefile (NAT_FILE) is not set in configure.nat, we link to an
17699# empty version.
c906108c
SS
17700
17701files=
17702links=
5a2402b8 17703
c906108c
SS
17704rm -f nm.h
17705if test "${nativefile}" != ""; then
0f475e27
AC
17706 case "${nativefile}" in
17707 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
17708 * ) GDB_NM_FILE="${nativefile}"
17709 esac
5a2402b8
AC
17710 files="${files} ${GDB_NM_FILE}"
17711 links="${links} nm.h"
60ca704f
SE
17712
17713cat >>confdefs.h <<_ACEOF
b78960be 17714#define GDB_NM_FILE "${GDB_NM_FILE}"
bec39cab 17715_ACEOF
5a2402b8 17716
c906108c 17717fi
5a2402b8
AC
17718
17719
e3487908
GKB
17720for ac_prog in xsltproc
17721do
17722 # Extract the first word of "$ac_prog", so it can be a program name with args.
17723set dummy $ac_prog; ac_word=$2
17724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17725$as_echo_n "checking for $ac_word... " >&6; }
17726if test "${ac_cv_path_XSLTPROC+set}" = set; then :
17727 $as_echo_n "(cached) " >&6
17728else
17729 case $XSLTPROC in
17730 [\\/]* | ?:[\\/]*)
17731 ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
17732 ;;
17733 *)
17734 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17735for as_dir in $PATH
17736do
17737 IFS=$as_save_IFS
17738 test -z "$as_dir" && as_dir=.
17739 for ac_exec_ext in '' $ac_executable_extensions; do
17740 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17741 ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
17742 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17743 break 2
17744 fi
17745done
17746 done
17747IFS=$as_save_IFS
17748
17749 ;;
17750esac
17751fi
17752XSLTPROC=$ac_cv_path_XSLTPROC
17753if test -n "$XSLTPROC"; then
17754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
17755$as_echo "$XSLTPROC" >&6; }
17756else
17757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17758$as_echo "no" >&6; }
17759fi
17760
17761
17762 test -n "$XSLTPROC" && break
17763done
17764test -n "$XSLTPROC" || XSLTPROC="missing"
17765
17766if test "x$USE_MAINTAINER_MODE" = xyes; then
17767 if test "${XSLTPROC}" = missing; then
17768 as_fn_error "unable to find xsltproc. maintainer-mode requires xsltproc." "$LINENO" 5
17769 fi
17770fi
17771
17772
bec39cab
AC
17773ac_sources="$files"
17774ac_dests="$links"
17775while test -n "$ac_sources"; do
17776 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
17777 set $ac_sources; ac_source=$1; shift; ac_sources=$*
17778 ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source"
17779done
81ecdfbb 17780ac_config_links="$ac_config_links $ac_config_links_1"
c906108c
SS
17781
17782
c906108c
SS
17783
17784
c906108c 17785
81ecdfbb 17786$as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
bec39cab 17787
bec39cab 17788
dcd1f979
TT
17789if $development; then
17790
17791$as_echo "#define GDB_SELF_TEST 1" >>confdefs.h
17792
07e253aa
PA
17793 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_UNITTESTS_OBS)"
17794 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_UNITTESTS_SRCS)"
dcd1f979
TT
17795fi
17796
b292c783 17797
f6a88844
JM
17798 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
17799 GDB_TRANSFORM_NAME=`echo gdb | sed -e "$gdb_ac_transform"`
17800 if test "x$GDB_TRANSFORM_NAME" = x; then
17801 GDB_TRANSFORM_NAME=gdb
17802 fi
17803
17804
17805
17806 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
17807 GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$gdb_ac_transform"`
17808 if test "x$GCORE_TRANSFORM_NAME" = x; then
17809 GCORE_TRANSFORM_NAME=gcore
17810 fi
17811
b292c783
JK
17812
17813ac_config_files="$ac_config_files gcore"
17814
c971b7fa 17815ac_config_files="$ac_config_files Makefile gdb-gdb.gdb doc/Makefile data-directory/Makefile"
81ecdfbb 17816
89a34d1b 17817
bec39cab
AC
17818cat >confcache <<\_ACEOF
17819# This file is a shell script that caches the results of configure
17820# tests run on this system so they can be shared between configure
17821# scripts and configure runs, see configure's option --config-cache.
17822# It is not useful on other systems. If it contains results you don't
17823# want to keep, you may remove or edit it.
17824#
17825# config.status only pays attention to the cache file if you give it
17826# the --recheck option to rerun configure.
17827#
17828# `ac_cv_env_foo' variables (set or unset) will be overridden when
17829# loading this file, other *unset* `ac_cv_foo' will be assigned the
17830# following values.
17831
17832_ACEOF
17833
17834# The following way of writing the cache mishandles newlines in values,
17835# but we know of no workaround that is simple, portable, and efficient.
81ecdfbb 17836# So, we kill variables containing newlines.
bec39cab
AC
17837# Ultrix sh set writes to stderr and can't be redirected directly,
17838# and sets the high bit in the cache file unless we assign to the vars.
81ecdfbb
RW
17839(
17840 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17841 eval ac_val=\$$ac_var
17842 case $ac_val in #(
17843 *${as_nl}*)
17844 case $ac_var in #(
17845 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17846$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
17847 esac
17848 case $ac_var in #(
17849 _ | IFS | as_nl) ;; #(
17850 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
17851 *) { eval $ac_var=; unset $ac_var;} ;;
17852 esac ;;
17853 esac
17854 done
17855
bec39cab 17856 (set) 2>&1 |
81ecdfbb
RW
17857 case $as_nl`(ac_space=' '; set) 2>&1` in #(
17858 *${as_nl}ac_space=\ *)
17859 # `set' does not quote correctly, so add quotes: double-quote
17860 # substitution turns \\\\ into \\, and sed turns \\ into \.
bec39cab
AC
17861 sed -n \
17862 "s/'/'\\\\''/g;
17863 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
81ecdfbb 17864 ;; #(
bec39cab
AC
17865 *)
17866 # `set' quotes correctly as required by POSIX, so do not add quotes.
81ecdfbb 17867 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
bec39cab 17868 ;;
81ecdfbb
RW
17869 esac |
17870 sort
17871) |
bec39cab 17872 sed '
81ecdfbb 17873 /^ac_cv_env_/b end
bec39cab 17874 t clear
81ecdfbb 17875 :clear
bec39cab
AC
17876 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17877 t end
81ecdfbb
RW
17878 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17879 :end' >>confcache
17880if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17881 if test -w "$cache_file"; then
17882 test "x$cache_file" != "x/dev/null" &&
17883 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17884$as_echo "$as_me: updating cache $cache_file" >&6;}
bec39cab
AC
17885 cat confcache >$cache_file
17886 else
81ecdfbb
RW
17887 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17888$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
bec39cab
AC
17889 fi
17890fi
17891rm -f confcache
17892
17893test "x$prefix" = xNONE && prefix=$ac_default_prefix
17894# Let make expand exec_prefix.
17895test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
17896
bec39cab
AC
17897DEFS=-DHAVE_CONFIG_H
17898
17899ac_libobjs=
17900ac_ltlibobjs=
17901for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17902 # 1. Remove the extension, and $U if already installed.
81ecdfbb
RW
17903 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
17904 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
17905 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
17906 # will be set to the directory where LIBOBJS objects are built.
17907 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17908 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
bec39cab
AC
17909done
17910LIBOBJS=$ac_libobjs
17911
17912LTLIBOBJS=$ac_ltlibobjs
17913
17914
85981d60 17915if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
81ecdfbb
RW
17916 as_fn_error "conditional \"MAINTAINER_MODE\" was never defined.
17917Usually this means the macro was only invoked conditionally." "$LINENO" 5
85981d60 17918fi
4df42755
DE
17919if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then
17920 as_fn_error "conditional \"HAVE_PYTHON\" was never defined.
17921Usually this means the macro was only invoked conditionally." "$LINENO" 5
17922fi
17923if test -z "${HAVE_GUILE_TRUE}" && test -z "${HAVE_GUILE_FALSE}"; then
17924 as_fn_error "conditional \"HAVE_GUILE\" was never defined.
17925Usually this means the macro was only invoked conditionally." "$LINENO" 5
17926fi
81ecdfbb
RW
17927
17928
bec39cab 17929: ${CONFIG_STATUS=./config.status}
81ecdfbb 17930ac_write_fail=0
bec39cab
AC
17931ac_clean_files_save=$ac_clean_files
17932ac_clean_files="$ac_clean_files $CONFIG_STATUS"
81ecdfbb
RW
17933{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17934$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
17935as_write_fail=0
17936cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
bec39cab
AC
17937#! $SHELL
17938# Generated by $as_me.
17939# Run this file to recreate the current configuration.
17940# Compiler output produced by configure, useful for debugging
17941# configure, is in config.log if it exists.
17942
17943debug=false
17944ac_cs_recheck=false
17945ac_cs_silent=false
bec39cab 17946
81ecdfbb
RW
17947SHELL=\${CONFIG_SHELL-$SHELL}
17948export SHELL
17949_ASEOF
17950cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17951## -------------------- ##
17952## M4sh Initialization. ##
17953## -------------------- ##
17954
17955# Be more Bourne compatible
17956DUALCASE=1; export DUALCASE # for MKS sh
17957if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
17958 emulate sh
17959 NULLCMD=:
81ecdfbb 17960 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
17961 # is contrary to our usage. Disable this feature.
17962 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
17963 setopt NO_GLOB_SUBST
17964else
17965 case `(set -o) 2>/dev/null` in #(
17966 *posix*) :
17967 set -o posix ;; #(
17968 *) :
17969 ;;
17970esac
bec39cab 17971fi
bec39cab 17972
81ecdfbb
RW
17973
17974as_nl='
17975'
17976export as_nl
17977# Printing a long string crashes Solaris 7 /usr/bin/printf.
17978as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
17979as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
17980as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
17981# Prefer a ksh shell builtin over an external printf program on Solaris,
17982# but without wasting forks for bash or zsh.
17983if test -z "$BASH_VERSION$ZSH_VERSION" \
17984 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
17985 as_echo='print -r --'
17986 as_echo_n='print -rn --'
17987elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
17988 as_echo='printf %s\n'
17989 as_echo_n='printf %s'
17990else
17991 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
17992 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
17993 as_echo_n='/usr/ucb/echo -n'
17994 else
17995 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
17996 as_echo_n_body='eval
17997 arg=$1;
17998 case $arg in #(
17999 *"$as_nl"*)
18000 expr "X$arg" : "X\\(.*\\)$as_nl";
18001 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
18002 esac;
18003 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
18004 '
18005 export as_echo_n_body
18006 as_echo_n='sh -c $as_echo_n_body as_echo'
18007 fi
18008 export as_echo_body
18009 as_echo='sh -c $as_echo_body as_echo'
18010fi
18011
18012# The user is always right.
18013if test "${PATH_SEPARATOR+set}" != set; then
18014 PATH_SEPARATOR=:
18015 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
18016 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
18017 PATH_SEPARATOR=';'
18018 }
bec39cab
AC
18019fi
18020
18021
81ecdfbb
RW
18022# IFS
18023# We need space, tab and new line, in precisely that order. Quoting is
18024# there to prevent editors from complaining about space-tab.
18025# (If _AS_PATH_WALK were called with IFS unset, it would disable word
18026# splitting by setting IFS to empty value.)
18027IFS=" "" $as_nl"
18028
18029# Find who we are. Look in the path if we contain no directory separator.
18030case $0 in #((
18031 *[\\/]* ) as_myself=$0 ;;
18032 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18033for as_dir in $PATH
18034do
18035 IFS=$as_save_IFS
18036 test -z "$as_dir" && as_dir=.
18037 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
18038 done
18039IFS=$as_save_IFS
18040
18041 ;;
18042esac
18043# We did not find ourselves, most probably we were run as `sh COMMAND'
18044# in which case we are not to be found in the path.
18045if test "x$as_myself" = x; then
18046 as_myself=$0
18047fi
18048if test ! -f "$as_myself"; then
18049 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
18050 exit 1
18051fi
18052
18053# Unset variables that we do not need and which cause bugs (e.g. in
18054# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
18055# suppresses any "Segmentation fault" message there. '((' could
18056# trigger a bug in pdksh 5.2.14.
18057for as_var in BASH_ENV ENV MAIL MAILPATH
18058do eval test x\${$as_var+set} = xset \
18059 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
18060done
bec39cab
AC
18061PS1='$ '
18062PS2='> '
18063PS4='+ '
18064
18065# NLS nuisances.
81ecdfbb
RW
18066LC_ALL=C
18067export LC_ALL
18068LANGUAGE=C
18069export LANGUAGE
18070
18071# CDPATH.
18072(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
18073
18074
18075# as_fn_error ERROR [LINENO LOG_FD]
18076# ---------------------------------
18077# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
18078# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
18079# script with status $?, using 1 if that was 0.
18080as_fn_error ()
18081{
18082 as_status=$?; test $as_status -eq 0 && as_status=1
18083 if test "$3"; then
18084 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
18085 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
18086 fi
18087 $as_echo "$as_me: error: $1" >&2
18088 as_fn_exit $as_status
18089} # as_fn_error
18090
18091
18092# as_fn_set_status STATUS
18093# -----------------------
18094# Set $? to STATUS, without forking.
18095as_fn_set_status ()
18096{
18097 return $1
18098} # as_fn_set_status
18099
18100# as_fn_exit STATUS
18101# -----------------
18102# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
18103as_fn_exit ()
18104{
18105 set +e
18106 as_fn_set_status $1
18107 exit $1
18108} # as_fn_exit
18109
18110# as_fn_unset VAR
18111# ---------------
18112# Portably unset VAR.
18113as_fn_unset ()
18114{
18115 { eval $1=; unset $1;}
18116}
18117as_unset=as_fn_unset
18118# as_fn_append VAR VALUE
18119# ----------------------
18120# Append the text in VALUE to the end of the definition contained in VAR. Take
18121# advantage of any shell optimizations that allow amortized linear growth over
18122# repeated appends, instead of the typical quadratic growth present in naive
18123# implementations.
18124if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
18125 eval 'as_fn_append ()
18126 {
18127 eval $1+=\$2
18128 }'
18129else
18130 as_fn_append ()
18131 {
18132 eval $1=\$$1\$2
18133 }
18134fi # as_fn_append
18135
18136# as_fn_arith ARG...
18137# ------------------
18138# Perform arithmetic evaluation on the ARGs, and store the result in the
18139# global $as_val. Take advantage of shells that can avoid forks. The arguments
18140# must be portable across $(()) and expr.
18141if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
18142 eval 'as_fn_arith ()
18143 {
18144 as_val=$(( $* ))
18145 }'
18146else
18147 as_fn_arith ()
18148 {
18149 as_val=`expr "$@" || test $? -eq 1`
18150 }
18151fi # as_fn_arith
bec39cab 18152
81ecdfbb
RW
18153
18154if expr a : '\(a\)' >/dev/null 2>&1 &&
18155 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
18156 as_expr=expr
18157else
18158 as_expr=false
18159fi
18160
81ecdfbb 18161if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
18162 as_basename=basename
18163else
18164 as_basename=false
18165fi
18166
81ecdfbb
RW
18167if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
18168 as_dirname=dirname
18169else
18170 as_dirname=false
18171fi
bec39cab 18172
81ecdfbb 18173as_me=`$as_basename -- "$0" ||
bec39cab
AC
18174$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
18175 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
18176 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
18177$as_echo X/"$0" |
18178 sed '/^.*\/\([^/][^/]*\)\/*$/{
18179 s//\1/
18180 q
18181 }
18182 /^X\/\(\/\/\)$/{
18183 s//\1/
18184 q
18185 }
18186 /^X\/\(\/\).*/{
18187 s//\1/
18188 q
18189 }
18190 s/.*/./; q'`
b4e70030 18191
b4e70030
JB
18192# Avoid depending upon Character Ranges.
18193as_cr_letters='abcdefghijklmnopqrstuvwxyz'
18194as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
18195as_cr_Letters=$as_cr_letters$as_cr_LETTERS
18196as_cr_digits='0123456789'
18197as_cr_alnum=$as_cr_Letters$as_cr_digits
18198
81ecdfbb
RW
18199ECHO_C= ECHO_N= ECHO_T=
18200case `echo -n x` in #(((((
18201-n*)
18202 case `echo 'xy\c'` in
18203 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
18204 xy) ECHO_C='\c';;
18205 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
18206 ECHO_T=' ';;
18207 esac;;
18208*)
18209 ECHO_N='-n';;
bec39cab
AC
18210esac
18211
81ecdfbb
RW
18212rm -f conf$$ conf$$.exe conf$$.file
18213if test -d conf$$.dir; then
18214 rm -f conf$$.dir/conf$$.file
bec39cab 18215else
81ecdfbb
RW
18216 rm -f conf$$.dir
18217 mkdir conf$$.dir 2>/dev/null
bec39cab 18218fi
81ecdfbb
RW
18219if (echo >conf$$.file) 2>/dev/null; then
18220 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 18221 as_ln_s='ln -s'
81ecdfbb
RW
18222 # ... but there are two gotchas:
18223 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
18224 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
18225 # In both cases, we have to default to `cp -p'.
18226 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
18227 as_ln_s='cp -p'
18228 elif ln conf$$.file conf$$ 2>/dev/null; then
18229 as_ln_s=ln
18230 else
18231 as_ln_s='cp -p'
b4e70030 18232 fi
bec39cab
AC
18233else
18234 as_ln_s='cp -p'
18235fi
81ecdfbb
RW
18236rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
18237rmdir conf$$.dir 2>/dev/null
18238
18239
18240# as_fn_mkdir_p
18241# -------------
18242# Create "$as_dir" as a directory, including parents if necessary.
18243as_fn_mkdir_p ()
18244{
18245
18246 case $as_dir in #(
18247 -*) as_dir=./$as_dir;;
18248 esac
18249 test -d "$as_dir" || eval $as_mkdir_p || {
18250 as_dirs=
18251 while :; do
18252 case $as_dir in #(
18253 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
18254 *) as_qdir=$as_dir;;
18255 esac
18256 as_dirs="'$as_qdir' $as_dirs"
18257 as_dir=`$as_dirname -- "$as_dir" ||
18258$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18259 X"$as_dir" : 'X\(//\)[^/]' \| \
18260 X"$as_dir" : 'X\(//\)$' \| \
18261 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
18262$as_echo X"$as_dir" |
18263 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18264 s//\1/
18265 q
18266 }
18267 /^X\(\/\/\)[^/].*/{
18268 s//\1/
18269 q
18270 }
18271 /^X\(\/\/\)$/{
18272 s//\1/
18273 q
18274 }
18275 /^X\(\/\).*/{
18276 s//\1/
18277 q
18278 }
18279 s/.*/./; q'`
18280 test -d "$as_dir" && break
18281 done
18282 test -z "$as_dirs" || eval "mkdir $as_dirs"
18283 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
18284
bec39cab 18285
81ecdfbb 18286} # as_fn_mkdir_p
bec39cab 18287if mkdir -p . 2>/dev/null; then
81ecdfbb 18288 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
18289else
18290 test -d ./-p && rmdir ./-p
18291 as_mkdir_p=false
18292fi
18293
81ecdfbb
RW
18294if test -x / >/dev/null 2>&1; then
18295 as_test_x='test -x'
18296else
18297 if ls -dL / >/dev/null 2>&1; then
18298 as_ls_L_option=L
18299 else
18300 as_ls_L_option=
18301 fi
18302 as_test_x='
18303 eval sh -c '\''
18304 if test -d "$1"; then
18305 test -d "$1/.";
18306 else
18307 case $1 in #(
18308 -*)set "./$1";;
18309 esac;
18310 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
18311 ???[sx]*):;;*)false;;esac;fi
18312 '\'' sh
18313 '
18314fi
18315as_executable_p=$as_test_x
bec39cab
AC
18316
18317# Sed expression to map a string onto a valid CPP name.
18318as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
18319
18320# Sed expression to map a string onto a valid variable name.
18321as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
18322
18323
bec39cab 18324exec 6>&1
81ecdfbb
RW
18325## ----------------------------------- ##
18326## Main body of $CONFIG_STATUS script. ##
18327## ----------------------------------- ##
18328_ASEOF
18329test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
18330
18331cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18332# Save the log message, to keep $0 and so on meaningful, and to
bec39cab 18333# report actual input values of CONFIG_FILES etc. instead of their
81ecdfbb
RW
18334# values after options handling.
18335ac_log="
bec39cab 18336This file was extended by $as_me, which was
81ecdfbb 18337generated by GNU Autoconf 2.64. Invocation command line was
bec39cab
AC
18338
18339 CONFIG_FILES = $CONFIG_FILES
18340 CONFIG_HEADERS = $CONFIG_HEADERS
18341 CONFIG_LINKS = $CONFIG_LINKS
18342 CONFIG_COMMANDS = $CONFIG_COMMANDS
18343 $ $0 $@
18344
81ecdfbb
RW
18345on `(hostname || uname -n) 2>/dev/null | sed 1q`
18346"
18347
bec39cab
AC
18348_ACEOF
18349
81ecdfbb
RW
18350case $ac_config_files in *"
18351"*) set x $ac_config_files; shift; ac_config_files=$*;;
18352esac
234b45d4 18353
81ecdfbb
RW
18354case $ac_config_headers in *"
18355"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
18356esac
b4e70030 18357
b4e70030 18358
81ecdfbb
RW
18359cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18360# Files that config.status was made for.
18361config_files="$ac_config_files"
18362config_headers="$ac_config_headers"
18363config_links="$ac_config_links"
18364config_commands="$ac_config_commands"
234b45d4 18365
81ecdfbb 18366_ACEOF
b4e70030 18367
81ecdfbb 18368cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab 18369ac_cs_usage="\
81ecdfbb
RW
18370\`$as_me' instantiates files and other configuration actions
18371from templates according to the current configuration. Unless the files
18372and actions are specified as TAGs, all are instantiated by default.
234b45d4 18373
81ecdfbb 18374Usage: $0 [OPTION]... [TAG]...
234b45d4 18375
bec39cab 18376 -h, --help print this help, then exit
81ecdfbb
RW
18377 -V, --version print version number and configuration settings, then exit
18378 -q, --quiet, --silent
18379 do not print progress messages
bec39cab
AC
18380 -d, --debug don't remove temporary files
18381 --recheck update $as_me by reconfiguring in the same conditions
81ecdfbb
RW
18382 --file=FILE[:TEMPLATE]
18383 instantiate the configuration file FILE
18384 --header=FILE[:TEMPLATE]
18385 instantiate the configuration header FILE
234b45d4 18386
bec39cab
AC
18387Configuration files:
18388$config_files
234b45d4 18389
bec39cab
AC
18390Configuration headers:
18391$config_headers
234b45d4 18392
bec39cab
AC
18393Configuration links:
18394$config_links
234b45d4 18395
bec39cab
AC
18396Configuration commands:
18397$config_commands
18398
81ecdfbb 18399Report bugs to the package provider."
b4e70030 18400
81ecdfbb
RW
18401_ACEOF
18402cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab
AC
18403ac_cs_version="\\
18404config.status
81ecdfbb
RW
18405configured by $0, generated by GNU Autoconf 2.64,
18406 with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
bec39cab 18407
81ecdfbb 18408Copyright (C) 2009 Free Software Foundation, Inc.
bec39cab
AC
18409This config.status script is free software; the Free Software Foundation
18410gives unlimited permission to copy, distribute and modify it."
81ecdfbb
RW
18411
18412ac_pwd='$ac_pwd'
18413srcdir='$srcdir'
18414INSTALL='$INSTALL'
81ecdfbb
RW
18415AWK='$AWK'
18416test -n "\$AWK" || AWK=awk
bec39cab
AC
18417_ACEOF
18418
81ecdfbb
RW
18419cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18420# The default lists apply if the user does not specify any file.
bec39cab
AC
18421ac_need_defaults=:
18422while test $# != 0
18423do
18424 case $1 in
18425 --*=*)
81ecdfbb
RW
18426 ac_option=`expr "X$1" : 'X\([^=]*\)='`
18427 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
bec39cab 18428 ac_shift=:
c906108c 18429 ;;
81ecdfbb 18430 *)
bec39cab
AC
18431 ac_option=$1
18432 ac_optarg=$2
18433 ac_shift=shift
c906108c 18434 ;;
bec39cab 18435 esac
c906108c 18436
bec39cab
AC
18437 case $ac_option in
18438 # Handling of the options.
bec39cab
AC
18439 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18440 ac_cs_recheck=: ;;
81ecdfbb
RW
18441 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
18442 $as_echo "$ac_cs_version"; exit ;;
18443 --debug | --debu | --deb | --de | --d | -d )
bec39cab
AC
18444 debug=: ;;
18445 --file | --fil | --fi | --f )
18446 $ac_shift
81ecdfbb
RW
18447 case $ac_optarg in
18448 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
18449 esac
18450 as_fn_append CONFIG_FILES " '$ac_optarg'"
bec39cab
AC
18451 ac_need_defaults=false;;
18452 --header | --heade | --head | --hea )
18453 $ac_shift
81ecdfbb
RW
18454 case $ac_optarg in
18455 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
18456 esac
18457 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
bec39cab 18458 ac_need_defaults=false;;
81ecdfbb
RW
18459 --he | --h)
18460 # Conflict between --help and --header
18461 as_fn_error "ambiguous option: \`$1'
18462Try \`$0 --help' for more information.";;
18463 --help | --hel | -h )
18464 $as_echo "$ac_cs_usage"; exit ;;
bec39cab
AC
18465 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
18466 | -silent | --silent | --silen | --sile | --sil | --si | --s)
18467 ac_cs_silent=: ;;
c906108c 18468
bec39cab 18469 # This is an error.
81ecdfbb
RW
18470 -*) as_fn_error "unrecognized option: \`$1'
18471Try \`$0 --help' for more information." ;;
c906108c 18472
81ecdfbb
RW
18473 *) as_fn_append ac_config_targets " $1"
18474 ac_need_defaults=false ;;
c906108c 18475
bec39cab
AC
18476 esac
18477 shift
18478done
c906108c 18479
bec39cab 18480ac_configure_extra_args=
c906108c 18481
bec39cab
AC
18482if $ac_cs_silent; then
18483 exec 6>/dev/null
18484 ac_configure_extra_args="$ac_configure_extra_args --silent"
18485fi
c906108c 18486
bec39cab 18487_ACEOF
81ecdfbb 18488cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab 18489if \$ac_cs_recheck; then
81ecdfbb
RW
18490 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
18491 shift
18492 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
18493 CONFIG_SHELL='$SHELL'
18494 export CONFIG_SHELL
18495 exec "\$@"
bec39cab
AC
18496fi
18497
18498_ACEOF
81ecdfbb
RW
18499cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18500exec 5>>config.log
18501{
18502 echo
18503 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18504## Running $as_me. ##
18505_ASBOX
18506 $as_echo "$ac_log"
18507} >&5
bec39cab 18508
81ecdfbb
RW
18509_ACEOF
18510cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
c906108c 18511#
81ecdfbb 18512# INIT-COMMANDS
c906108c 18513#
a417dc56 18514ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
f38307f5 18515ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR CONFIG_SRC_SUBDIR="$CONFIG_SRC_SUBDIR"
b4e70030 18516
bec39cab
AC
18517_ACEOF
18518
81ecdfbb 18519cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
4e8d927d 18520
81ecdfbb 18521# Handling of arguments.
bec39cab 18522for ac_config_target in $ac_config_targets
c906108c 18523do
81ecdfbb
RW
18524 case $ac_config_target in
18525 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
18526 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
f38307f5 18527 "gdbdepdir") CONFIG_COMMANDS="$CONFIG_COMMANDS gdbdepdir" ;;
f997c383 18528 "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
81ecdfbb 18529 "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;;
b292c783 18530 "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;;
81ecdfbb 18531 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
e2207b9a 18532 "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;;
5ae98d25 18533 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
aa2e2d8d 18534 "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
81ecdfbb
RW
18535
18536 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
c906108c
SS
18537 esac
18538done
18539
81ecdfbb 18540
bec39cab
AC
18541# If the user did not use the arguments to specify the items to instantiate,
18542# then the envvar interface is used. Set only those that are not.
18543# We use the long form for the default assignment because of an extremely
18544# bizarre bug on SunOS 4.1.3.
18545if $ac_need_defaults; then
18546 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18547 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18548 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
18549 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
18550fi
18551
b4e70030 18552# Have a temporary directory for convenience. Make it in the build tree
81ecdfbb 18553# simply because there is no reason against having it here, and in addition,
b4e70030 18554# creating and moving files from /tmp can sometimes cause problems.
81ecdfbb
RW
18555# Hook for its removal unless debugging.
18556# Note that there is a small window in which the directory will not be cleaned:
18557# after its creation but before its name has been assigned to `$tmp'.
b4e70030
JB
18558$debug ||
18559{
81ecdfbb
RW
18560 tmp=
18561 trap 'exit_status=$?
18562 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
18563' 0
18564 trap 'as_fn_exit 1' 1 2 13 15
18565}
18566# Create a (secure) tmp directory for tmp files.
18567
18568{
18569 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
18570 test -n "$tmp" && test -d "$tmp"
18571} ||
18572{
18573 tmp=./conf$$-$RANDOM
18574 (umask 077 && mkdir "$tmp")
18575} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
18576
18577# Set up the scripts for CONFIG_FILES section.
18578# No need to generate them if there are no CONFIG_FILES.
18579# This happens for instance with `./config.status config.h'.
18580if test -n "$CONFIG_FILES"; then
18581
18582if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
18583 ac_cs_awk_getline=:
18584 ac_cs_awk_pipe_init=
18585 ac_cs_awk_read_file='
18586 while ((getline aline < (F[key])) > 0)
18587 print(aline)
18588 close(F[key])'
18589 ac_cs_awk_pipe_fini=
18590else
18591 ac_cs_awk_getline=false
18592 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
18593 ac_cs_awk_read_file='
18594 print "|#_!!_#|"
18595 print "cat " F[key] " &&"
18596 '$ac_cs_awk_pipe_init
18597 # The final `:' finishes the AND list.
18598 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
18599fi
18600ac_cr=`echo X | tr X '\015'`
18601# On cygwin, bash can eat \r inside `` if the user requested igncr.
18602# But we know of no other shell where ac_cr would be empty at this
18603# point, so we can use a bashism as a fallback.
18604if test "x$ac_cr" = x; then
18605 eval ac_cr=\$\'\\r\'
18606fi
18607ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
18608if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
18609 ac_cs_awk_cr='\r'
18610else
18611 ac_cs_awk_cr=$ac_cr
18612fi
18613
18614echo 'BEGIN {' >"$tmp/subs1.awk" &&
18615_ACEOF
18616
18617# Create commands to substitute file output variables.
18618{
18619 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
18620 echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' &&
18621 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
18622 echo "_ACAWK" &&
18623 echo "_ACEOF"
18624} >conf$$files.sh &&
18625. ./conf$$files.sh ||
18626 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
18627rm -f conf$$files.sh
18628
18629{
18630 echo "cat >conf$$subs.awk <<_ACEOF" &&
18631 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
18632 echo "_ACEOF"
18633} >conf$$subs.sh ||
18634 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
18635ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
18636ac_delim='%!_!# '
18637for ac_last_try in false false false false false :; do
18638 . ./conf$$subs.sh ||
18639 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
18640
18641 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
18642 if test $ac_delim_n = $ac_delim_num; then
18643 break
18644 elif $ac_last_try; then
18645 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
18646 else
18647 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18648 fi
18649done
18650rm -f conf$$subs.sh
18651
18652cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18653cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
18654_ACEOF
18655sed -n '
18656h
18657s/^/S["/; s/!.*/"]=/
18658p
18659g
18660s/^[^!]*!//
18661:repl
18662t repl
18663s/'"$ac_delim"'$//
18664t delim
18665:nl
18666h
18667s/\(.\{148\}\).*/\1/
18668t more1
18669s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
18670p
18671n
18672b repl
18673:more1
18674s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18675p
18676g
18677s/.\{148\}//
18678t nl
18679:delim
18680h
18681s/\(.\{148\}\).*/\1/
18682t more2
18683s/["\\]/\\&/g; s/^/"/; s/$/"/
18684p
18685b
18686:more2
18687s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18688p
18689g
18690s/.\{148\}//
18691t delim
18692' <conf$$subs.awk | sed '
18693/^[^""]/{
18694 N
18695 s/\n//
18696}
18697' >>$CONFIG_STATUS || ac_write_fail=1
18698rm -f conf$$subs.awk
18699cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18700_ACAWK
18701cat >>"\$tmp/subs1.awk" <<_ACAWK &&
18702 for (key in S) S_is_set[key] = 1
18703 FS = "\a"
18704 \$ac_cs_awk_pipe_init
18705}
18706{
18707 line = $ 0
18708 nfields = split(line, field, "@")
18709 substed = 0
18710 len = length(field[1])
18711 for (i = 2; i < nfields; i++) {
18712 key = field[i]
18713 keylen = length(key)
18714 if (S_is_set[key]) {
18715 value = S[key]
18716 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
18717 len += length(value) + length(field[++i])
18718 substed = 1
18719 } else
18720 len += 1 + keylen
18721 }
18722 if (nfields == 3 && !substed) {
18723 key = field[2]
18724 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
18725 \$ac_cs_awk_read_file
18726 next
18727 }
18728 }
18729 print line
b4e70030 18730}
81ecdfbb
RW
18731\$ac_cs_awk_pipe_fini
18732_ACAWK
18733_ACEOF
18734cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18735if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
18736 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
18737else
18738 cat
18739fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
18740 || as_fn_error "could not setup config files machinery" "$LINENO" 5
18741_ACEOF
18742
18743# VPATH may cause trouble with some makes, so we remove $(srcdir),
18744# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
18745# trailing colons and then remove the whole line if VPATH becomes empty
18746# (actually we leave an empty line to preserve line numbers).
18747if test "x$srcdir" = x.; then
18748 ac_vpsub='/^[ ]*VPATH[ ]*=/{
18749s/:*\$(srcdir):*/:/
18750s/:*\${srcdir}:*/:/
18751s/:*@srcdir@:*/:/
18752s/^\([^=]*=[ ]*\):*/\1/
18753s/:*$//
18754s/^[^=]*=[ ]*$//
18755}'
18756fi
18757
18758cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18759fi # test -n "$CONFIG_FILES"
18760
18761# Set up the scripts for CONFIG_HEADERS section.
18762# No need to generate them if there are no CONFIG_HEADERS.
18763# This happens for instance with `./config.status Makefile'.
18764if test -n "$CONFIG_HEADERS"; then
18765cat >"$tmp/defines.awk" <<\_ACAWK ||
18766BEGIN {
18767_ACEOF
18768
18769# Transform confdefs.h into an awk script `defines.awk', embedded as
18770# here-document in config.status, that substitutes the proper values into
18771# config.h.in to produce config.h.
4e8d927d 18772
81ecdfbb
RW
18773# Create a delimiter string that does not exist in confdefs.h, to ease
18774# handling of long lines.
18775ac_delim='%!_!# '
18776for ac_last_try in false false :; do
18777 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
18778 if test -z "$ac_t"; then
18779 break
18780 elif $ac_last_try; then
18781 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
18782 else
18783 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18784 fi
18785done
4e8d927d 18786
81ecdfbb
RW
18787# For the awk script, D is an array of macro values keyed by name,
18788# likewise P contains macro parameters if any. Preserve backslash
18789# newline sequences.
18790
18791ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
18792sed -n '
18793s/.\{148\}/&'"$ac_delim"'/g
18794t rset
18795:rset
18796s/^[ ]*#[ ]*define[ ][ ]*/ /
18797t def
18798d
18799:def
18800s/\\$//
18801t bsnl
18802s/["\\]/\\&/g
18803s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18804D["\1"]=" \3"/p
18805s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
18806d
18807:bsnl
18808s/["\\]/\\&/g
18809s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18810D["\1"]=" \3\\\\\\n"\\/p
18811t cont
18812s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
18813t cont
18814d
18815:cont
18816n
18817s/.\{148\}/&'"$ac_delim"'/g
18818t clear
18819:clear
18820s/\\$//
18821t bsnlc
18822s/["\\]/\\&/g; s/^/"/; s/$/"/p
18823d
18824:bsnlc
18825s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
18826b cont
18827' <confdefs.h | sed '
18828s/'"$ac_delim"'/"\\\
18829"/g' >>$CONFIG_STATUS || ac_write_fail=1
18830
18831cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18832 for (key in D) D_is_set[key] = 1
18833 FS = "\a"
18834}
18835/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18836 line = \$ 0
18837 split(line, arg, " ")
18838 if (arg[1] == "#") {
18839 defundef = arg[2]
18840 mac1 = arg[3]
18841 } else {
18842 defundef = substr(arg[1], 2)
18843 mac1 = arg[2]
18844 }
18845 split(mac1, mac2, "(") #)
18846 macro = mac2[1]
18847 prefix = substr(line, 1, index(line, defundef) - 1)
18848 if (D_is_set[macro]) {
18849 # Preserve the white space surrounding the "#".
18850 print prefix "define", macro P[macro] D[macro]
18851 next
18852 } else {
18853 # Replace #undef with comments. This is necessary, for example,
18854 # in the case of _POSIX_SOURCE, which is predefined and required
18855 # on some systems where configure will not decide to define it.
18856 if (defundef == "undef") {
18857 print "/*", prefix defundef, macro, "*/"
18858 next
18859 }
18860 }
b4e70030 18861}
81ecdfbb
RW
18862{ print }
18863_ACAWK
b4e70030 18864_ACEOF
81ecdfbb
RW
18865cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18866 as_fn_error "could not setup config headers machinery" "$LINENO" 5
18867fi # test -n "$CONFIG_HEADERS"
4e8d927d 18868
4e8d927d 18869
81ecdfbb
RW
18870eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
18871shift
18872for ac_tag
18873do
18874 case $ac_tag in
18875 :[FHLC]) ac_mode=$ac_tag; continue;;
18876 esac
18877 case $ac_mode$ac_tag in
18878 :[FHL]*:*);;
18879 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
18880 :[FH]-) ac_tag=-:-;;
18881 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18882 esac
18883 ac_save_IFS=$IFS
18884 IFS=:
18885 set x $ac_tag
18886 IFS=$ac_save_IFS
18887 shift
18888 ac_file=$1
18889 shift
4e8d927d 18890
81ecdfbb
RW
18891 case $ac_mode in
18892 :L) ac_source=$1;;
18893 :[FH])
18894 ac_file_inputs=
18895 for ac_f
18896 do
18897 case $ac_f in
18898 -) ac_f="$tmp/stdin";;
18899 *) # Look for the file first in the build tree, then in the source tree
18900 # (if the path is not absolute). The absolute path cannot be DOS-style,
18901 # because $ac_f cannot contain `:'.
18902 test -f "$ac_f" ||
18903 case $ac_f in
18904 [\\/$]*) false;;
18905 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18906 esac ||
18907 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
18908 esac
18909 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
18910 as_fn_append ac_file_inputs " '$ac_f'"
18911 done
18912
18913 # Let's still pretend it is `configure' which instantiates (i.e., don't
18914 # use $as_me), people would be surprised to read:
18915 # /* config.h. Generated by config.status. */
18916 configure_input='Generated from '`
18917 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
18918 `' by configure.'
18919 if test x"$ac_file" != x-; then
18920 configure_input="$ac_file. $configure_input"
18921 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18922$as_echo "$as_me: creating $ac_file" >&6;}
b4e70030 18923 fi
81ecdfbb
RW
18924 # Neutralize special characters interpreted by sed in replacement strings.
18925 case $configure_input in #(
18926 *\&* | *\|* | *\\* )
18927 ac_sed_conf_input=`$as_echo "$configure_input" |
18928 sed 's/[\\\\&|]/\\\\&/g'`;; #(
18929 *) ac_sed_conf_input=$configure_input;;
18930 esac
4e8d927d 18931
81ecdfbb
RW
18932 case $ac_tag in
18933 *:-:* | *:-) cat >"$tmp/stdin" \
18934 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
18935 esac
18936 ;;
c906108c
SS
18937 esac
18938
81ecdfbb 18939 ac_dir=`$as_dirname -- "$ac_file" ||
bec39cab
AC
18940$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18941 X"$ac_file" : 'X\(//\)[^/]' \| \
18942 X"$ac_file" : 'X\(//\)$' \| \
81ecdfbb
RW
18943 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
18944$as_echo X"$ac_file" |
18945 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18946 s//\1/
18947 q
18948 }
18949 /^X\(\/\/\)[^/].*/{
18950 s//\1/
18951 q
18952 }
18953 /^X\(\/\/\)$/{
18954 s//\1/
18955 q
18956 }
18957 /^X\(\/\).*/{
18958 s//\1/
18959 q
18960 }
18961 s/.*/./; q'`
18962 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
18963 ac_builddir=.
18964
81ecdfbb
RW
18965case "$ac_dir" in
18966.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18967*)
18968 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
18969 # A ".." for each directory in $ac_dir_suffix.
18970 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
18971 case $ac_top_builddir_sub in
18972 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18973 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18974 esac ;;
18975esac
18976ac_abs_top_builddir=$ac_pwd
18977ac_abs_builddir=$ac_pwd$ac_dir_suffix
18978# for backward compatibility:
18979ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
18980
18981case $srcdir in
81ecdfbb 18982 .) # We are building in place.
bec39cab 18983 ac_srcdir=.
81ecdfbb
RW
18984 ac_top_srcdir=$ac_top_builddir_sub
18985 ac_abs_top_srcdir=$ac_pwd ;;
18986 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 18987 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
18988 ac_top_srcdir=$srcdir
18989 ac_abs_top_srcdir=$srcdir ;;
18990 *) # Relative name.
18991 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18992 ac_top_srcdir=$ac_top_build_prefix$srcdir
18993 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 18994esac
81ecdfbb 18995ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 18996
c906108c 18997
81ecdfbb
RW
18998 case $ac_mode in
18999 :F)
19000 #
19001 # CONFIG_FILE
19002 #
c906108c 19003
bec39cab
AC
19004 case $INSTALL in
19005 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
81ecdfbb 19006 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
c906108c 19007 esac
81ecdfbb 19008_ACEOF
121ce6e5 19009
81ecdfbb
RW
19010cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19011# If the template does not know about datarootdir, expand it.
19012# FIXME: This hack should be removed a few years after 2.60.
19013ac_datarootdir_hack=; ac_datarootdir_seen=
19014ac_sed_dataroot='
19015/datarootdir/ {
19016 p
19017 q
19018}
19019/@datadir@/p
19020/@docdir@/p
19021/@infodir@/p
19022/@localedir@/p
19023/@mandir@/p'
19024case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
19025*datarootdir*) ac_datarootdir_seen=yes;;
19026*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
19027 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
19028$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
19029_ACEOF
19030cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19031 ac_datarootdir_hack='
19032 s&@datadir@&$datadir&g
19033 s&@docdir@&$docdir&g
19034 s&@infodir@&$infodir&g
19035 s&@localedir@&$localedir&g
19036 s&@mandir@&$mandir&g
19037 s&\\\${datarootdir}&$datarootdir&g' ;;
19038esac
4e8d927d 19039_ACEOF
81ecdfbb
RW
19040
19041# Neutralize VPATH when `$srcdir' = `.'.
19042# Shell code in configure.ac might set extrasub.
19043# FIXME: do we really want to maintain this feature?
19044cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19045ac_sed_extra="$ac_vpsub
bec39cab
AC
19046$extrasub
19047_ACEOF
81ecdfbb 19048cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab
AC
19049:t
19050/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
81ecdfbb
RW
19051s|@configure_input@|$ac_sed_conf_input|;t t
19052s&@top_builddir@&$ac_top_builddir_sub&;t t
19053s&@top_build_prefix@&$ac_top_build_prefix&;t t
19054s&@srcdir@&$ac_srcdir&;t t
19055s&@abs_srcdir@&$ac_abs_srcdir&;t t
19056s&@top_srcdir@&$ac_top_srcdir&;t t
19057s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
19058s&@builddir@&$ac_builddir&;t t
19059s&@abs_builddir@&$ac_abs_builddir&;t t
19060s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
19061s&@INSTALL@&$ac_INSTALL&;t t
81ecdfbb
RW
19062$ac_datarootdir_hack
19063"
19064eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
19065if $ac_cs_awk_getline; then
19066 $AWK -f "$tmp/subs.awk"
19067else
19068 $AWK -f "$tmp/subs.awk" | $SHELL
19069fi >$tmp/out \
19070 || as_fn_error "could not create $ac_file" "$LINENO" 5
19071
19072test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
19073 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
19074 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
19075 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
19076which seems to be undefined. Please make sure it is defined." >&5
19077$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
19078which seems to be undefined. Please make sure it is defined." >&2;}
19079
19080 rm -f "$tmp/stdin"
bec39cab 19081 case $ac_file in
81ecdfbb
RW
19082 -) cat "$tmp/out" && rm -f "$tmp/out";;
19083 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
19084 esac \
19085 || as_fn_error "could not create $ac_file" "$LINENO" 5
19086 ;;
19087 :H)
19088 #
19089 # CONFIG_HEADER
19090 #
bec39cab 19091 if test x"$ac_file" != x-; then
81ecdfbb
RW
19092 {
19093 $as_echo "/* $configure_input */" \
19094 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
19095 } >"$tmp/config.h" \
19096 || as_fn_error "could not create $ac_file" "$LINENO" 5
19097 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
19098 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
19099$as_echo "$as_me: $ac_file is unchanged" >&6;}
bec39cab 19100 else
81ecdfbb
RW
19101 rm -f "$ac_file"
19102 mv "$tmp/config.h" "$ac_file" \
19103 || as_fn_error "could not create $ac_file" "$LINENO" 5
bec39cab
AC
19104 fi
19105 else
81ecdfbb
RW
19106 $as_echo "/* $configure_input */" \
19107 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
19108 || as_fn_error "could not create -" "$LINENO" 5
bec39cab 19109 fi
81ecdfbb
RW
19110 ;;
19111 :L)
19112 #
19113 # CONFIG_LINK
19114 #
c906108c 19115
81ecdfbb
RW
19116 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
19117 :
b4e70030 19118 else
81ecdfbb
RW
19119 # Prefer the file from the source tree if names are identical.
19120 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
19121 ac_source=$srcdir/$ac_source
19122 fi
b4e70030 19123
81ecdfbb
RW
19124 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
19125$as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
b4e70030 19126
81ecdfbb
RW
19127 if test ! -r "$ac_source"; then
19128 as_fn_error "$ac_source: file not found" "$LINENO" 5
19129 fi
19130 rm -f "$ac_file"
bec39cab 19131
81ecdfbb
RW
19132 # Try a relative symlink, then a hard link, then a copy.
19133 case $srcdir in
19134 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
19135 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
19136 esac
19137 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
19138 ln "$ac_source" "$ac_file" 2>/dev/null ||
19139 cp -p "$ac_source" "$ac_file" ||
19140 as_fn_error "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
19141 fi
19142 ;;
19143 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
19144$as_echo "$as_me: executing $ac_file commands" >&6;}
19145 ;;
c906108c 19146 esac
b4e70030 19147
bec39cab 19148
81ecdfbb
RW
19149 case $ac_file$ac_mode in
19150 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
f38307f5
YQ
19151 "gdbdepdir":C)
19152 for subdir in ${CONFIG_SRC_SUBDIR}
19153 do
19154 $SHELL $ac_aux_dir/mkinstalldirs $subdir/$DEPDIR
19155 done ;;
b292c783 19156 "gcore":F) chmod +x gcore ;;
1e94266c
SM
19157 "Makefile":F)
19158case x$CONFIG_HEADERS in
19159xconfig.h:config.in)
19160echo > stamp-h ;;
19161esac
19162 ;;
19163 "gdb-gdb.gdb":F)
19164case x$CONFIG_HEADERS in
19165xconfig.h:config.in)
19166echo > stamp-h ;;
19167esac
19168 ;;
19169 "doc/Makefile":F)
19170case x$CONFIG_HEADERS in
19171xconfig.h:config.in)
19172echo > stamp-h ;;
19173esac
19174 ;;
19175 "data-directory/Makefile":F)
c906108c
SS
19176case x$CONFIG_HEADERS in
19177xconfig.h:config.in)
19178echo > stamp-h ;;
19179esac
bec39cab 19180 ;;
81ecdfbb 19181
bec39cab 19182 esac
81ecdfbb 19183done # for ac_tag
c906108c 19184
bec39cab 19185
81ecdfbb 19186as_fn_exit 0
bec39cab 19187_ACEOF
bec39cab
AC
19188ac_clean_files=$ac_clean_files_save
19189
81ecdfbb
RW
19190test $ac_write_fail = 0 ||
19191 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
19192
bec39cab
AC
19193
19194# configure is writing to config.log, and then calls config.status.
19195# config.status does its own redirection, appending to config.log.
19196# Unfortunately, on DOS this fails, as config.log is still kept open
19197# by configure, so config.status won't be able to write to it; its
19198# output is simply discarded. So we exec the FD to /dev/null,
19199# effectively closing config.log, so it can be properly (re)opened and
19200# appended to by config.status. When coming back to configure, we
19201# need to make the FD available again.
19202if test "$no_create" != yes; then
19203 ac_cs_success=:
19204 ac_config_status_args=
19205 test "$silent" = yes &&
19206 ac_config_status_args="$ac_config_status_args --quiet"
19207 exec 5>/dev/null
19208 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
19209 exec 5>>config.log
19210 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
19211 # would make configure fail if this is the last instruction.
81ecdfbb 19212 $ac_cs_success || as_fn_exit $?
bec39cab 19213fi
c906108c 19214
bec39cab 19215#
81ecdfbb 19216# CONFIG_SUBDIRS section.
bec39cab 19217#
c906108c
SS
19218if test "$no_recursion" != yes; then
19219
81ecdfbb
RW
19220 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
19221 # so they do not pile up.
c906108c
SS
19222 ac_sub_configure_args=
19223 ac_prev=
fdc59709
PB
19224 eval "set x $ac_configure_args"
19225 shift
19226 for ac_arg
19227 do
c906108c
SS
19228 if test -n "$ac_prev"; then
19229 ac_prev=
19230 continue
19231 fi
bec39cab 19232 case $ac_arg in
c906108c
SS
19233 -cache-file | --cache-file | --cache-fil | --cache-fi \
19234 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
19235 ac_prev=cache_file ;;
19236 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
bec39cab
AC
19237 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
19238 | --c=*)
19239 ;;
19240 --config-cache | -C)
c906108c
SS
19241 ;;
19242 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
19243 ac_prev=srcdir ;;
19244 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
19245 ;;
bec39cab
AC
19246 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
19247 ac_prev=prefix ;;
19248 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
19249 ;;
81ecdfbb
RW
19250 --disable-option-checking)
19251 ;;
fdc59709
PB
19252 *)
19253 case $ac_arg in
81ecdfbb 19254 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 19255 esac
81ecdfbb 19256 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
c906108c
SS
19257 esac
19258 done
19259
bec39cab
AC
19260 # Always prepend --prefix to ensure using the same prefix
19261 # in subdir configurations.
fdc59709
PB
19262 ac_arg="--prefix=$prefix"
19263 case $ac_arg in
81ecdfbb 19264 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 19265 esac
81ecdfbb
RW
19266 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
19267
19268 # Pass --silent
19269 if test "$silent" = yes; then
19270 ac_sub_configure_args="--silent $ac_sub_configure_args"
19271 fi
19272
19273 # Always prepend --disable-option-checking to silence warnings, since
19274 # different subdirs can have different --enable and --with options.
19275 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
bec39cab 19276
b4e70030 19277 ac_popdir=`pwd`
bec39cab 19278 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
c906108c
SS
19279
19280 # Do not complain, so a configure script can configure whichever
19281 # parts of a large source tree are present.
fdc59709 19282 test -d "$srcdir/$ac_dir" || continue
c906108c 19283
81ecdfbb
RW
19284 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
19285 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
19286 $as_echo "$ac_msg" >&6
19287 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
19288 ac_builddir=.
19289
81ecdfbb
RW
19290case "$ac_dir" in
19291.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
19292*)
19293 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
19294 # A ".." for each directory in $ac_dir_suffix.
19295 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
19296 case $ac_top_builddir_sub in
19297 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
19298 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
19299 esac ;;
19300esac
19301ac_abs_top_builddir=$ac_pwd
19302ac_abs_builddir=$ac_pwd$ac_dir_suffix
19303# for backward compatibility:
19304ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
19305
19306case $srcdir in
81ecdfbb 19307 .) # We are building in place.
bec39cab 19308 ac_srcdir=.
81ecdfbb
RW
19309 ac_top_srcdir=$ac_top_builddir_sub
19310 ac_abs_top_srcdir=$ac_pwd ;;
19311 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 19312 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
19313 ac_top_srcdir=$srcdir
19314 ac_abs_top_srcdir=$srcdir ;;
19315 *) # Relative name.
19316 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
19317 ac_top_srcdir=$ac_top_build_prefix$srcdir
19318 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 19319esac
81ecdfbb 19320ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
c906108c 19321
c906108c 19322
fdc59709 19323 cd "$ac_dir"
c906108c
SS
19324
19325 # Check for guested configure; otherwise get Cygnus style configure.
fdc59709
PB
19326 if test -f "$ac_srcdir/configure.gnu"; then
19327 ac_sub_configure=$ac_srcdir/configure.gnu
19328 elif test -f "$ac_srcdir/configure"; then
19329 ac_sub_configure=$ac_srcdir/configure
19330 elif test -f "$ac_srcdir/configure.in"; then
19331 # This should be Cygnus configure.
19332 ac_sub_configure=$ac_aux_dir/configure
c906108c 19333 else
81ecdfbb
RW
19334 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
19335$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
c906108c
SS
19336 ac_sub_configure=
19337 fi
19338
19339 # The recursion is here.
19340 if test -n "$ac_sub_configure"; then
c906108c 19341 # Make the cache file name correct relative to the subdirectory.
bec39cab
AC
19342 case $cache_file in
19343 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
81ecdfbb
RW
19344 *) # Relative name.
19345 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
c906108c 19346 esac
c906108c 19347
81ecdfbb
RW
19348 { $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
19349$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
c906108c 19350 # The eval makes quoting arguments work.
fdc59709
PB
19351 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
19352 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
81ecdfbb 19353 as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
c906108c
SS
19354 fi
19355
fdc59709 19356 cd "$ac_popdir"
c906108c
SS
19357 done
19358fi
81ecdfbb
RW
19359if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
19360 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
19361$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
19362fi
c906108c 19363
This page took 2.948232 seconds and 4 git commands to generate.