S/390: Sync with latest POP - 3 new instructions
[deliverable/binutils-gdb.git] / gdb / configure
CommitLineData
c906108c 1#! /bin/sh
c906108c 2# Guess values for system-dependent variables and create Makefiles.
81ecdfbb
RW
3# Generated by GNU Autoconf 2.64.
4#
5# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
6# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
7# Foundation, Inc.
c906108c
SS
8#
9# This configure script is free software; the Free Software Foundation
10# gives unlimited permission to copy, distribute and modify it.
81ecdfbb
RW
11## -------------------- ##
12## M4sh Initialization. ##
13## -------------------- ##
bec39cab 14
81ecdfbb
RW
15# Be more Bourne compatible
16DUALCASE=1; export DUALCASE # for MKS sh
17if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
18 emulate sh
19 NULLCMD=:
81ecdfbb 20 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
21 # is contrary to our usage. Disable this feature.
22 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
23 setopt NO_GLOB_SUBST
24else
25 case `(set -o) 2>/dev/null` in #(
26 *posix*) :
27 set -o posix ;; #(
28 *) :
29 ;;
30esac
bec39cab 31fi
bec39cab 32
81ecdfbb
RW
33
34as_nl='
35'
36export as_nl
37# Printing a long string crashes Solaris 7 /usr/bin/printf.
38as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
39as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
40as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
41# Prefer a ksh shell builtin over an external printf program on Solaris,
42# but without wasting forks for bash or zsh.
43if test -z "$BASH_VERSION$ZSH_VERSION" \
44 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
45 as_echo='print -r --'
46 as_echo_n='print -rn --'
47elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
48 as_echo='printf %s\n'
49 as_echo_n='printf %s'
50else
51 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
52 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53 as_echo_n='/usr/ucb/echo -n'
54 else
55 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
56 as_echo_n_body='eval
57 arg=$1;
58 case $arg in #(
59 *"$as_nl"*)
60 expr "X$arg" : "X\\(.*\\)$as_nl";
61 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
62 esac;
63 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
64 '
65 export as_echo_n_body
66 as_echo_n='sh -c $as_echo_n_body as_echo'
67 fi
68 export as_echo_body
69 as_echo='sh -c $as_echo_body as_echo'
70fi
71
72# The user is always right.
73if test "${PATH_SEPARATOR+set}" != set; then
74 PATH_SEPARATOR=:
75 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
76 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
77 PATH_SEPARATOR=';'
78 }
bec39cab
AC
79fi
80
81
81ecdfbb
RW
82# IFS
83# We need space, tab and new line, in precisely that order. Quoting is
84# there to prevent editors from complaining about space-tab.
85# (If _AS_PATH_WALK were called with IFS unset, it would disable word
86# splitting by setting IFS to empty value.)
87IFS=" "" $as_nl"
88
89# Find who we are. Look in the path if we contain no directory separator.
90case $0 in #((
91 *[\\/]* ) as_myself=$0 ;;
92 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
93for as_dir in $PATH
94do
95 IFS=$as_save_IFS
96 test -z "$as_dir" && as_dir=.
97 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
98 done
99IFS=$as_save_IFS
100
101 ;;
102esac
103# We did not find ourselves, most probably we were run as `sh COMMAND'
104# in which case we are not to be found in the path.
105if test "x$as_myself" = x; then
106 as_myself=$0
107fi
108if test ! -f "$as_myself"; then
109 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
110 exit 1
111fi
112
113# Unset variables that we do not need and which cause bugs (e.g. in
114# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
115# suppresses any "Segmentation fault" message there. '((' could
116# trigger a bug in pdksh 5.2.14.
117for as_var in BASH_ENV ENV MAIL MAILPATH
118do eval test x\${$as_var+set} = xset \
119 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
120done
bec39cab
AC
121PS1='$ '
122PS2='> '
123PS4='+ '
124
125# NLS nuisances.
81ecdfbb
RW
126LC_ALL=C
127export LC_ALL
128LANGUAGE=C
129export LANGUAGE
130
131# CDPATH.
132(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
133
134if test "x$CONFIG_SHELL" = x; then
135 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
136 emulate sh
137 NULLCMD=:
138 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
139 # is contrary to our usage. Disable this feature.
140 alias -g '\${1+\"\$@\"}'='\"\$@\"'
141 setopt NO_GLOB_SUBST
142else
143 case \`(set -o) 2>/dev/null\` in #(
144 *posix*) :
145 set -o posix ;; #(
146 *) :
147 ;;
148esac
149fi
150"
151 as_required="as_fn_return () { (exit \$1); }
152as_fn_success () { as_fn_return 0; }
153as_fn_failure () { as_fn_return 1; }
154as_fn_ret_success () { return 0; }
155as_fn_ret_failure () { return 1; }
156
157exitcode=0
158as_fn_success || { exitcode=1; echo as_fn_success failed.; }
159as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
160as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
161as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
162if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
163
164else
165 exitcode=1; echo positional parameters were not saved.
166fi
167test x\$exitcode = x0 || exit 1"
168 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
169 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
170 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
171 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
172test \$(( 1 + 1 )) = 2 || exit 1"
173 if (eval "$as_required") 2>/dev/null; then :
174 as_have_required=yes
175else
176 as_have_required=no
177fi
178 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
179
180else
181 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
182as_found=false
183for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
bec39cab 184do
81ecdfbb
RW
185 IFS=$as_save_IFS
186 test -z "$as_dir" && as_dir=.
187 as_found=:
188 case $as_dir in #(
189 /*)
190 for as_base in sh bash ksh sh5; do
191 # Try only shells that exist, to save several forks.
192 as_shell=$as_dir/$as_base
193 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
194 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
195 CONFIG_SHELL=$as_shell as_have_required=yes
196 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
197 break 2
198fi
199fi
200 done;;
201 esac
202 as_found=false
203done
204$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
205 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
206 CONFIG_SHELL=$SHELL as_have_required=yes
207fi; }
208IFS=$as_save_IFS
209
210
211 if test "x$CONFIG_SHELL" != x; then :
212 # We cannot yet assume a decent shell, so we have to provide a
213 # neutralization value for shells without unset; and this also
214 # works around shells that cannot unset nonexistent variables.
215 BASH_ENV=/dev/null
216 ENV=/dev/null
217 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
218 export CONFIG_SHELL
219 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
220fi
221
222 if test x$as_have_required = xno; then :
223 $as_echo "$0: This script requires a shell more modern than all"
224 $as_echo "$0: the shells that I found on your system."
225 if test x${ZSH_VERSION+set} = xset ; then
226 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
227 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
bec39cab 228 else
81ecdfbb
RW
229 $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
230$0: including any error possibly output before this
231$0: message. Then install a modern shell, or manually run
232$0: the script under such a shell if you do have one."
bec39cab 233 fi
81ecdfbb
RW
234 exit 1
235fi
236fi
237fi
238SHELL=${CONFIG_SHELL-/bin/sh}
239export SHELL
240# Unset more variables known to interfere with behavior of common tools.
241CLICOLOR_FORCE= GREP_OPTIONS=
242unset CLICOLOR_FORCE GREP_OPTIONS
243
244## --------------------- ##
245## M4sh Shell Functions. ##
246## --------------------- ##
247# as_fn_unset VAR
248# ---------------
249# Portably unset VAR.
250as_fn_unset ()
251{
252 { eval $1=; unset $1;}
253}
254as_unset=as_fn_unset
255
256# as_fn_set_status STATUS
257# -----------------------
258# Set $? to STATUS, without forking.
259as_fn_set_status ()
260{
261 return $1
262} # as_fn_set_status
bec39cab 263
81ecdfbb
RW
264# as_fn_exit STATUS
265# -----------------
266# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
267as_fn_exit ()
268{
269 set +e
270 as_fn_set_status $1
271 exit $1
272} # as_fn_exit
273
274# as_fn_mkdir_p
275# -------------
276# Create "$as_dir" as a directory, including parents if necessary.
277as_fn_mkdir_p ()
278{
279
280 case $as_dir in #(
281 -*) as_dir=./$as_dir;;
282 esac
283 test -d "$as_dir" || eval $as_mkdir_p || {
284 as_dirs=
285 while :; do
286 case $as_dir in #(
287 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
288 *) as_qdir=$as_dir;;
289 esac
290 as_dirs="'$as_qdir' $as_dirs"
291 as_dir=`$as_dirname -- "$as_dir" ||
292$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
293 X"$as_dir" : 'X\(//\)[^/]' \| \
294 X"$as_dir" : 'X\(//\)$' \| \
295 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
296$as_echo X"$as_dir" |
297 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
298 s//\1/
299 q
300 }
301 /^X\(\/\/\)[^/].*/{
302 s//\1/
303 q
304 }
305 /^X\(\/\/\)$/{
306 s//\1/
307 q
308 }
309 /^X\(\/\).*/{
310 s//\1/
311 q
312 }
313 s/.*/./; q'`
314 test -d "$as_dir" && break
315 done
316 test -z "$as_dirs" || eval "mkdir $as_dirs"
317 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
318
319
320} # as_fn_mkdir_p
321# as_fn_append VAR VALUE
322# ----------------------
323# Append the text in VALUE to the end of the definition contained in VAR. Take
324# advantage of any shell optimizations that allow amortized linear growth over
325# repeated appends, instead of the typical quadratic growth present in naive
326# implementations.
327if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
328 eval 'as_fn_append ()
329 {
330 eval $1+=\$2
331 }'
332else
333 as_fn_append ()
334 {
335 eval $1=\$$1\$2
336 }
337fi # as_fn_append
338
339# as_fn_arith ARG...
340# ------------------
341# Perform arithmetic evaluation on the ARGs, and store the result in the
342# global $as_val. Take advantage of shells that can avoid forks. The arguments
343# must be portable across $(()) and expr.
344if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
345 eval 'as_fn_arith ()
346 {
347 as_val=$(( $* ))
348 }'
349else
350 as_fn_arith ()
351 {
352 as_val=`expr "$@" || test $? -eq 1`
353 }
354fi # as_fn_arith
355
356
357# as_fn_error ERROR [LINENO LOG_FD]
358# ---------------------------------
359# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
360# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
361# script with status $?, using 1 if that was 0.
362as_fn_error ()
363{
364 as_status=$?; test $as_status -eq 0 && as_status=1
365 if test "$3"; then
366 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
367 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
368 fi
369 $as_echo "$as_me: error: $1" >&2
370 as_fn_exit $as_status
371} # as_fn_error
372
373if expr a : '\(a\)' >/dev/null 2>&1 &&
374 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
375 as_expr=expr
376else
377 as_expr=false
378fi
379
81ecdfbb 380if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
381 as_basename=basename
382else
383 as_basename=false
384fi
385
81ecdfbb
RW
386if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
387 as_dirname=dirname
388else
389 as_dirname=false
390fi
bec39cab 391
81ecdfbb 392as_me=`$as_basename -- "$0" ||
bec39cab
AC
393$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
394 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
395 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
396$as_echo X/"$0" |
397 sed '/^.*\/\([^/][^/]*\)\/*$/{
398 s//\1/
399 q
400 }
401 /^X\/\(\/\/\)$/{
402 s//\1/
403 q
404 }
405 /^X\/\(\/\).*/{
406 s//\1/
407 q
408 }
409 s/.*/./; q'`
bec39cab 410
b4e70030
JB
411# Avoid depending upon Character Ranges.
412as_cr_letters='abcdefghijklmnopqrstuvwxyz'
413as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
414as_cr_Letters=$as_cr_letters$as_cr_LETTERS
415as_cr_digits='0123456789'
416as_cr_alnum=$as_cr_Letters$as_cr_digits
4e8d927d 417
bec39cab 418
81ecdfbb
RW
419 as_lineno_1=$LINENO as_lineno_1a=$LINENO
420 as_lineno_2=$LINENO as_lineno_2a=$LINENO
421 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
422 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
423 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
424 sed -n '
425 p
426 /[$]LINENO/=
427 ' <$as_myself |
bec39cab 428 sed '
81ecdfbb
RW
429 s/[$]LINENO.*/&-/
430 t lineno
431 b
432 :lineno
bec39cab 433 N
81ecdfbb
RW
434 :loop
435 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
bec39cab 436 t loop
81ecdfbb 437 s/-\n.*//
bec39cab 438 ' >$as_me.lineno &&
81ecdfbb
RW
439 chmod +x "$as_me.lineno" ||
440 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
bec39cab
AC
441
442 # Don't try to exec as it changes $[0], causing all sort of problems
443 # (the dirname of $[0] is not the place where we might find the
81ecdfbb
RW
444 # original and so on. Autoconf is especially sensitive to this).
445 . "./$as_me.lineno"
bec39cab
AC
446 # Exit status is that of the last command.
447 exit
448}
449
81ecdfbb
RW
450ECHO_C= ECHO_N= ECHO_T=
451case `echo -n x` in #(((((
452-n*)
453 case `echo 'xy\c'` in
454 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
455 xy) ECHO_C='\c';;
456 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
457 ECHO_T=' ';;
458 esac;;
459*)
460 ECHO_N='-n';;
bec39cab
AC
461esac
462
81ecdfbb
RW
463rm -f conf$$ conf$$.exe conf$$.file
464if test -d conf$$.dir; then
465 rm -f conf$$.dir/conf$$.file
bec39cab 466else
81ecdfbb
RW
467 rm -f conf$$.dir
468 mkdir conf$$.dir 2>/dev/null
bec39cab 469fi
81ecdfbb
RW
470if (echo >conf$$.file) 2>/dev/null; then
471 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 472 as_ln_s='ln -s'
81ecdfbb
RW
473 # ... but there are two gotchas:
474 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
475 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
476 # In both cases, we have to default to `cp -p'.
477 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
478 as_ln_s='cp -p'
479 elif ln conf$$.file conf$$ 2>/dev/null; then
480 as_ln_s=ln
481 else
482 as_ln_s='cp -p'
b4e70030 483 fi
bec39cab
AC
484else
485 as_ln_s='cp -p'
486fi
81ecdfbb
RW
487rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
488rmdir conf$$.dir 2>/dev/null
bec39cab
AC
489
490if mkdir -p . 2>/dev/null; then
81ecdfbb 491 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
492else
493 test -d ./-p && rmdir ./-p
494 as_mkdir_p=false
495fi
496
81ecdfbb
RW
497if test -x / >/dev/null 2>&1; then
498 as_test_x='test -x'
499else
500 if ls -dL / >/dev/null 2>&1; then
501 as_ls_L_option=L
502 else
503 as_ls_L_option=
504 fi
505 as_test_x='
506 eval sh -c '\''
507 if test -d "$1"; then
508 test -d "$1/.";
509 else
510 case $1 in #(
511 -*)set "./$1";;
512 esac;
513 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
514 ???[sx]*):;;*)false;;esac;fi
515 '\'' sh
516 '
517fi
518as_executable_p=$as_test_x
bec39cab
AC
519
520# Sed expression to map a string onto a valid CPP name.
521as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
522
523# Sed expression to map a string onto a valid variable name.
524as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
525
526
81ecdfbb 527exec 7<&0 </dev/null 6>&1
c906108c 528
bec39cab
AC
529# Name of the host.
530# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
531# so uname gets run too.
532ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
533
bec39cab
AC
534#
535# Initializations.
536#
c906108c 537ac_default_prefix=/usr/local
81ecdfbb 538ac_clean_files=
bec39cab 539ac_config_libobj_dir=.
81ecdfbb 540LIBOBJS=
bec39cab
AC
541cross_compiling=no
542subdirs=
543MFLAGS=
544MAKEFLAGS=
b4e70030 545
bec39cab
AC
546# Identity of this package.
547PACKAGE_NAME=
548PACKAGE_TARNAME=
549PACKAGE_VERSION=
550PACKAGE_STRING=
551PACKAGE_BUGREPORT=
81ecdfbb 552PACKAGE_URL=
bec39cab
AC
553
554ac_unique_file="main.c"
555# Factoring default headers for most tests.
556ac_includes_default="\
557#include <stdio.h>
81ecdfbb 558#ifdef HAVE_SYS_TYPES_H
bec39cab
AC
559# include <sys/types.h>
560#endif
81ecdfbb 561#ifdef HAVE_SYS_STAT_H
bec39cab
AC
562# include <sys/stat.h>
563#endif
81ecdfbb 564#ifdef STDC_HEADERS
bec39cab
AC
565# include <stdlib.h>
566# include <stddef.h>
567#else
81ecdfbb 568# ifdef HAVE_STDLIB_H
bec39cab
AC
569# include <stdlib.h>
570# endif
571#endif
81ecdfbb
RW
572#ifdef HAVE_STRING_H
573# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
bec39cab
AC
574# include <memory.h>
575# endif
576# include <string.h>
577#endif
81ecdfbb 578#ifdef HAVE_STRINGS_H
bec39cab
AC
579# include <strings.h>
580#endif
81ecdfbb 581#ifdef HAVE_INTTYPES_H
bec39cab 582# include <inttypes.h>
bec39cab 583#endif
81ecdfbb
RW
584#ifdef HAVE_STDINT_H
585# include <stdint.h>
586#endif
587#ifdef HAVE_UNISTD_H
bec39cab
AC
588# include <unistd.h>
589#endif"
590
81ecdfbb 591enable_option_checking=no
c971b7fa 592ac_subst_vars='LTLIBOBJS
81ecdfbb 593LIBOBJS
b292c783
JK
594GCORE_TRANSFORM_NAME
595GDB_TRANSFORM_NAME
e3487908 596XSLTPROC
81ecdfbb 597GDB_NM_FILE
393fd4c3
YQ
598LTLIBBABELTRACE
599LIBBABELTRACE
600HAVE_LIBBABELTRACE
21ea5acd
SDJ
601HAVE_NATIVE_GCORE_HOST
602NAT_GENERATED_FILES
603XM_CLIBS
604MH_CFLAGS
605LOADLIBES
606NAT_CDEPS
607NATDEPFILES
608NAT_FILE
81ecdfbb
RW
609target_subdir
610CONFIG_UNINSTALL
611CONFIG_INSTALL
612CONFIG_CLEAN
613CONFIG_ALL
614CONFIG_SRCS
615CONFIG_DEPS
616CONFIG_OBS
617PROFILE_CFLAGS
618ENABLE_CFLAGS
619SIM_OBS
620SIM
621XMKMF
622GDBTK_SRC_DIR
623GDBTK_CFLAGS
624GDBTKLIBS
625X_LIBS
626X_LDFLAGS
627X_CFLAGS
628TK_XINCLUDES
629TK_DEPS
630TK_LIBRARY
631TK_INCLUDE
632TK_STUB_LIB_SPEC
633TK_STUB_LIB_FLAG
634TK_STUB_LIB_FILE
635TK_LIB_SPEC
636TK_LIB_FLAG
637TK_LIB_FILE
638TK_SRC_DIR
639TK_BIN_DIR
640TK_VERSION
641TCL_DEPS
642TCL_LIBRARY
643TCL_INCLUDE
644TCL_STUB_LIB_SPEC
645TCL_STUB_LIB_FLAG
646TCL_STUB_LIB_FILE
647TCL_LIB_SPEC
648TCL_LIB_FLAG
649TCL_LIB_FILE
650TCL_SRC_DIR
651TCL_BIN_DIR
652TCL_PATCH_LEVEL
653TCL_VERSION
654WIN32LDAPP
655GUI_CFLAGS_X
656LIBGUI
608e2dbb
TT
657LTLIBLZMA
658LIBLZMA
659HAVE_LIBLZMA
81ecdfbb
RW
660WIN32LIBS
661SER_HARDWIRE
662WERROR_CFLAGS
663WARN_CFLAGS
664SYSTEM_GDBINIT
81ecdfbb
RW
665TARGET_SYSTEM_ROOT
666CONFIG_LDFLAGS
f6528abd 667RDYNAMIC
81ecdfbb 668ALLOCA
58bfce93
MM
669LTLIBIPT
670LIBIPT
671HAVE_LIBIPT
4df42755
DE
672HAVE_GUILE_FALSE
673HAVE_GUILE_TRUE
ed3ef339
DE
674GUILE_LIBS
675GUILE_CPPFLAGS
e76c5d17
DE
676GUILD_TARGET_FLAG
677GUILD
ed3ef339 678pkg_config_prog_path
4df42755
DE
679HAVE_PYTHON_FALSE
680HAVE_PYTHON_TRUE
ac534cba
JB
681PYTHON_LIBS
682PYTHON_CPPFLAGS
81ecdfbb 683PYTHON_CFLAGS
ec685c5e 684python_prog_path
81ecdfbb
RW
685LTLIBEXPAT
686LIBEXPAT
687HAVE_LIBEXPAT
b8e0a31c 688JIT_READER_DIR
f997c383 689TARGET_PTR
39037522 690READLINE_TEXI_INCFLAG
81ecdfbb
RW
691READLINE_CFLAGS
692READLINE_DEPS
693READLINE
016a3251
DD
694LTLIBICONV
695LIBICONV
711a72d3
L
696zlibinc
697zlibdir
81ecdfbb
RW
698MIG
699WINDRES
700DLLTOOL
c971b7fa 701AR
81ecdfbb
RW
702YFLAGS
703YACC
c971b7fa 704RANLIB
81ecdfbb 705LN_S
c971b7fa
PA
706INSTALL_DATA
707INSTALL_SCRIPT
708INSTALL_PROGRAM
709AWK
81ecdfbb
RW
710REPORT_BUGS_TEXI
711REPORT_BUGS_TO
712PKGVERSION
b292c783 713HAVE_NATIVE_GCORE_TARGET
81ecdfbb
RW
714TARGET_OBS
715subdirs
716GDB_DATADIR
717DEBUGDIR
5048e516
JK
718MAKEINFO_EXTRA_FLAGS
719MAKEINFOFLAGS
720MAKEINFO
81ecdfbb
RW
721PACKAGE
722GNULIB_STDINT_H
81ecdfbb
RW
723CATOBJEXT
724GENCAT
725INSTOBJEXT
726DATADIRNAME
727CATALOGS
728POSUB
729GMSGFMT
730XGETTEXT
731INCINTL
732LIBINTL_DEP
733LIBINTL
734USE_NLS
81ecdfbb 735CCDEPMODE
f38307f5 736CONFIG_SRC_SUBDIR
81ecdfbb
RW
737DEPDIR
738am__leading_dot
0bcda685
PA
739CXX_DIALECT
740HAVE_CXX11
4869db5e
RM
741INSTALL_STRIP_PROGRAM
742STRIP
743install_sh
81ecdfbb
RW
744target_os
745target_vendor
746target_cpu
747target
748host_os
749host_vendor
750host_cpu
751host
752build_os
753build_vendor
754build_cpu
755build
c971b7fa
PA
756EGREP
757GREP
758CPP
3bc3d82a
PA
759ac_ct_CXX
760CXXFLAGS
761CXX
81ecdfbb
RW
762OBJEXT
763EXEEXT
764ac_ct_CC
765CPPFLAGS
766LDFLAGS
767CFLAGS
768CC
769MAINT
770MAINTAINER_MODE_FALSE
771MAINTAINER_MODE_TRUE
772target_alias
773host_alias
774build_alias
775LIBS
776ECHO_T
777ECHO_N
778ECHO_C
779DEFS
780mandir
781localedir
782libdir
783psdir
784pdfdir
785dvidir
786htmldir
787infodir
788docdir
789oldincludedir
790includedir
791localstatedir
792sharedstatedir
793sysconfdir
794datadir
795datarootdir
796libexecdir
797sbindir
798bindir
799program_transform_name
800prefix
801exec_prefix
802PACKAGE_URL
803PACKAGE_BUGREPORT
804PACKAGE_STRING
805PACKAGE_VERSION
806PACKAGE_TARNAME
807PACKAGE_NAME
808PATH_SEPARATOR
809SHELL'
2b351b19 810ac_subst_files='nat_makefile_frag'
81ecdfbb
RW
811ac_user_opts='
812enable_option_checking
813enable_maintainer_mode
da2f07f1
JK
814enable_plugins
815enable_largefile
81ecdfbb
RW
816with_separate_debug_dir
817with_gdb_datadir
818with_relocated_sources
7349ff92 819with_auto_load_dir
bccbefd2 820with_auto_load_safe_path
81ecdfbb
RW
821enable_targets
822enable_64_bit_bfd
823enable_gdbcli
824enable_gdbmi
825enable_tui
826enable_gdbtk
05e7c244 827with_libunwind_ia64
81ecdfbb
RW
828with_curses
829enable_profiling
830with_pkgversion
831with_bugurl
711a72d3 832with_system_zlib
016a3251
DD
833with_gnu_ld
834enable_rpath
81ecdfbb 835with_libiconv_prefix
478aac75 836with_iconv_bin
81ecdfbb 837with_system_readline
b8e0a31c 838with_jit_reader_dir
81ecdfbb 839with_expat
81ecdfbb
RW
840with_libexpat_prefix
841with_python
ed3ef339 842with_guile
a8db4212 843enable_libmcheck
58bfce93
MM
844with_intel_pt
845with_libipt_prefix
81ecdfbb
RW
846with_included_regex
847with_sysroot
848with_system_gdbinit
849enable_werror
850enable_build_warnings
851enable_gdb_build_warnings
608e2dbb
TT
852with_lzma
853with_liblzma_prefix
81ecdfbb
RW
854with_tcl
855with_tk
856with_x
857enable_sim
858enable_multi_ice
496c0e1b 859enable_gdbserver
393fd4c3
YQ
860with_babeltrace
861with_libbabeltrace_prefix
81ecdfbb
RW
862'
863 ac_precious_vars='build_alias
864host_alias
865target_alias
866CC
867CFLAGS
868LDFLAGS
869LIBS
870CPPFLAGS
3bc3d82a
PA
871CXX
872CXXFLAGS
873CCC
81ecdfbb 874CPP
f06e05e0
JK
875MAKEINFO
876MAKEINFOFLAGS
81ecdfbb
RW
877YACC
878YFLAGS
879XMKMF'
5ae98d25 880ac_subdirs_all='testsuite
81ecdfbb
RW
881gdbtk
882multi-ice
883gdbserver'
c906108c
SS
884
885# Initialize some variables set by options.
bec39cab
AC
886ac_init_help=
887ac_init_version=false
81ecdfbb
RW
888ac_unrecognized_opts=
889ac_unrecognized_sep=
c906108c
SS
890# The variables have the same names as the options, with
891# dashes changed to underlines.
bec39cab 892cache_file=/dev/null
c906108c 893exec_prefix=NONE
c906108c 894no_create=
c906108c
SS
895no_recursion=
896prefix=NONE
897program_prefix=NONE
898program_suffix=NONE
899program_transform_name=s,x,x,
900silent=
901site=
902srcdir=
c906108c
SS
903verbose=
904x_includes=NONE
905x_libraries=NONE
bec39cab
AC
906
907# Installation directory options.
908# These are left unexpanded so users can "make install exec_prefix=/foo"
909# and all the variables that are supposed to be based on exec_prefix
910# by default will actually change.
911# Use braces instead of parens because sh, perl, etc. also accept them.
81ecdfbb 912# (The list follows the same order as the GNU Coding Standards.)
c906108c
SS
913bindir='${exec_prefix}/bin'
914sbindir='${exec_prefix}/sbin'
915libexecdir='${exec_prefix}/libexec'
81ecdfbb
RW
916datarootdir='${prefix}/share'
917datadir='${datarootdir}'
c906108c
SS
918sysconfdir='${prefix}/etc'
919sharedstatedir='${prefix}/com'
920localstatedir='${prefix}/var'
c906108c
SS
921includedir='${prefix}/include'
922oldincludedir='/usr/include'
81ecdfbb
RW
923docdir='${datarootdir}/doc/${PACKAGE}'
924infodir='${datarootdir}/info'
925htmldir='${docdir}'
926dvidir='${docdir}'
927pdfdir='${docdir}'
928psdir='${docdir}'
929libdir='${exec_prefix}/lib'
930localedir='${datarootdir}/locale'
931mandir='${datarootdir}/man'
c906108c 932
c906108c 933ac_prev=
81ecdfbb 934ac_dashdash=
c906108c
SS
935for ac_option
936do
c906108c
SS
937 # If the previous option needs an argument, assign it.
938 if test -n "$ac_prev"; then
81ecdfbb 939 eval $ac_prev=\$ac_option
c906108c
SS
940 ac_prev=
941 continue
942 fi
943
81ecdfbb
RW
944 case $ac_option in
945 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
946 *) ac_optarg=yes ;;
947 esac
c906108c
SS
948
949 # Accept the important Cygnus configure options, so we can diagnose typos.
950
81ecdfbb
RW
951 case $ac_dashdash$ac_option in
952 --)
953 ac_dashdash=yes ;;
c906108c
SS
954
955 -bindir | --bindir | --bindi | --bind | --bin | --bi)
956 ac_prev=bindir ;;
957 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
bec39cab 958 bindir=$ac_optarg ;;
c906108c
SS
959
960 -build | --build | --buil | --bui | --bu)
bec39cab 961 ac_prev=build_alias ;;
c906108c 962 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
bec39cab 963 build_alias=$ac_optarg ;;
c906108c
SS
964
965 -cache-file | --cache-file | --cache-fil | --cache-fi \
966 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
967 ac_prev=cache_file ;;
968 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
969 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
bec39cab
AC
970 cache_file=$ac_optarg ;;
971
972 --config-cache | -C)
973 cache_file=config.cache ;;
c906108c 974
81ecdfbb 975 -datadir | --datadir | --datadi | --datad)
c906108c 976 ac_prev=datadir ;;
81ecdfbb 977 -datadir=* | --datadir=* | --datadi=* | --datad=*)
bec39cab 978 datadir=$ac_optarg ;;
c906108c 979
81ecdfbb
RW
980 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
981 | --dataroo | --dataro | --datar)
982 ac_prev=datarootdir ;;
983 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
984 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
985 datarootdir=$ac_optarg ;;
986
c906108c 987 -disable-* | --disable-*)
81ecdfbb 988 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
c906108c 989 # Reject names that are not valid shell variable names.
81ecdfbb
RW
990 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
991 as_fn_error "invalid feature name: $ac_useropt"
992 ac_useropt_orig=$ac_useropt
993 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
994 case $ac_user_opts in
995 *"
996"enable_$ac_useropt"
997"*) ;;
998 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
999 ac_unrecognized_sep=', ';;
1000 esac
1001 eval enable_$ac_useropt=no ;;
1002
1003 -docdir | --docdir | --docdi | --doc | --do)
1004 ac_prev=docdir ;;
1005 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1006 docdir=$ac_optarg ;;
1007
1008 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1009 ac_prev=dvidir ;;
1010 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1011 dvidir=$ac_optarg ;;
c906108c
SS
1012
1013 -enable-* | --enable-*)
81ecdfbb 1014 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
c906108c 1015 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1016 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1017 as_fn_error "invalid feature name: $ac_useropt"
1018 ac_useropt_orig=$ac_useropt
1019 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1020 case $ac_user_opts in
1021 *"
1022"enable_$ac_useropt"
1023"*) ;;
1024 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1025 ac_unrecognized_sep=', ';;
b4e70030 1026 esac
81ecdfbb 1027 eval enable_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1028
1029 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1030 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1031 | --exec | --exe | --ex)
1032 ac_prev=exec_prefix ;;
1033 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1034 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1035 | --exec=* | --exe=* | --ex=*)
bec39cab 1036 exec_prefix=$ac_optarg ;;
c906108c
SS
1037
1038 -gas | --gas | --ga | --g)
1039 # Obsolete; use --with-gas.
1040 with_gas=yes ;;
1041
bec39cab
AC
1042 -help | --help | --hel | --he | -h)
1043 ac_init_help=long ;;
1044 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1045 ac_init_help=recursive ;;
1046 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1047 ac_init_help=short ;;
c906108c
SS
1048
1049 -host | --host | --hos | --ho)
bec39cab 1050 ac_prev=host_alias ;;
c906108c 1051 -host=* | --host=* | --hos=* | --ho=*)
bec39cab 1052 host_alias=$ac_optarg ;;
c906108c 1053
81ecdfbb
RW
1054 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1055 ac_prev=htmldir ;;
1056 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1057 | --ht=*)
1058 htmldir=$ac_optarg ;;
1059
c906108c
SS
1060 -includedir | --includedir | --includedi | --included | --include \
1061 | --includ | --inclu | --incl | --inc)
1062 ac_prev=includedir ;;
1063 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1064 | --includ=* | --inclu=* | --incl=* | --inc=*)
bec39cab 1065 includedir=$ac_optarg ;;
c906108c
SS
1066
1067 -infodir | --infodir | --infodi | --infod | --info | --inf)
1068 ac_prev=infodir ;;
1069 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
bec39cab 1070 infodir=$ac_optarg ;;
c906108c
SS
1071
1072 -libdir | --libdir | --libdi | --libd)
1073 ac_prev=libdir ;;
1074 -libdir=* | --libdir=* | --libdi=* | --libd=*)
bec39cab 1075 libdir=$ac_optarg ;;
c906108c
SS
1076
1077 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1078 | --libexe | --libex | --libe)
1079 ac_prev=libexecdir ;;
1080 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1081 | --libexe=* | --libex=* | --libe=*)
bec39cab 1082 libexecdir=$ac_optarg ;;
c906108c 1083
81ecdfbb
RW
1084 -localedir | --localedir | --localedi | --localed | --locale)
1085 ac_prev=localedir ;;
1086 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1087 localedir=$ac_optarg ;;
1088
c906108c 1089 -localstatedir | --localstatedir | --localstatedi | --localstated \
81ecdfbb 1090 | --localstate | --localstat | --localsta | --localst | --locals)
c906108c
SS
1091 ac_prev=localstatedir ;;
1092 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
81ecdfbb 1093 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
bec39cab 1094 localstatedir=$ac_optarg ;;
c906108c
SS
1095
1096 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1097 ac_prev=mandir ;;
1098 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
bec39cab 1099 mandir=$ac_optarg ;;
c906108c
SS
1100
1101 -nfp | --nfp | --nf)
1102 # Obsolete; use --without-fp.
1103 with_fp=no ;;
1104
1105 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
bec39cab 1106 | --no-cr | --no-c | -n)
c906108c
SS
1107 no_create=yes ;;
1108
1109 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1110 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1111 no_recursion=yes ;;
1112
1113 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1114 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1115 | --oldin | --oldi | --old | --ol | --o)
1116 ac_prev=oldincludedir ;;
1117 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1118 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1119 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
bec39cab 1120 oldincludedir=$ac_optarg ;;
c906108c
SS
1121
1122 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1123 ac_prev=prefix ;;
1124 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
bec39cab 1125 prefix=$ac_optarg ;;
c906108c
SS
1126
1127 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1128 | --program-pre | --program-pr | --program-p)
1129 ac_prev=program_prefix ;;
1130 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1131 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
bec39cab 1132 program_prefix=$ac_optarg ;;
c906108c
SS
1133
1134 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1135 | --program-suf | --program-su | --program-s)
1136 ac_prev=program_suffix ;;
1137 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1138 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
bec39cab 1139 program_suffix=$ac_optarg ;;
c906108c
SS
1140
1141 -program-transform-name | --program-transform-name \
1142 | --program-transform-nam | --program-transform-na \
1143 | --program-transform-n | --program-transform- \
1144 | --program-transform | --program-transfor \
1145 | --program-transfo | --program-transf \
1146 | --program-trans | --program-tran \
1147 | --progr-tra | --program-tr | --program-t)
1148 ac_prev=program_transform_name ;;
1149 -program-transform-name=* | --program-transform-name=* \
1150 | --program-transform-nam=* | --program-transform-na=* \
1151 | --program-transform-n=* | --program-transform-=* \
1152 | --program-transform=* | --program-transfor=* \
1153 | --program-transfo=* | --program-transf=* \
1154 | --program-trans=* | --program-tran=* \
1155 | --progr-tra=* | --program-tr=* | --program-t=*)
bec39cab 1156 program_transform_name=$ac_optarg ;;
c906108c 1157
81ecdfbb
RW
1158 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1159 ac_prev=pdfdir ;;
1160 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1161 pdfdir=$ac_optarg ;;
1162
1163 -psdir | --psdir | --psdi | --psd | --ps)
1164 ac_prev=psdir ;;
1165 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1166 psdir=$ac_optarg ;;
1167
c906108c
SS
1168 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1169 | -silent | --silent | --silen | --sile | --sil)
1170 silent=yes ;;
1171
1172 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1173 ac_prev=sbindir ;;
1174 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1175 | --sbi=* | --sb=*)
bec39cab 1176 sbindir=$ac_optarg ;;
c906108c
SS
1177
1178 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1179 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1180 | --sharedst | --shareds | --shared | --share | --shar \
1181 | --sha | --sh)
1182 ac_prev=sharedstatedir ;;
1183 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1184 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1185 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1186 | --sha=* | --sh=*)
bec39cab 1187 sharedstatedir=$ac_optarg ;;
c906108c
SS
1188
1189 -site | --site | --sit)
1190 ac_prev=site ;;
1191 -site=* | --site=* | --sit=*)
bec39cab 1192 site=$ac_optarg ;;
3ace7edb 1193
c906108c
SS
1194 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1195 ac_prev=srcdir ;;
1196 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
bec39cab 1197 srcdir=$ac_optarg ;;
c906108c
SS
1198
1199 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1200 | --syscon | --sysco | --sysc | --sys | --sy)
1201 ac_prev=sysconfdir ;;
1202 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1203 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
bec39cab 1204 sysconfdir=$ac_optarg ;;
c906108c
SS
1205
1206 -target | --target | --targe | --targ | --tar | --ta | --t)
bec39cab 1207 ac_prev=target_alias ;;
c906108c 1208 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
bec39cab 1209 target_alias=$ac_optarg ;;
c906108c
SS
1210
1211 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1212 verbose=yes ;;
1213
bec39cab
AC
1214 -version | --version | --versio | --versi | --vers | -V)
1215 ac_init_version=: ;;
c906108c
SS
1216
1217 -with-* | --with-*)
81ecdfbb 1218 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
c906108c 1219 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1220 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1221 as_fn_error "invalid package name: $ac_useropt"
1222 ac_useropt_orig=$ac_useropt
1223 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1224 case $ac_user_opts in
1225 *"
1226"with_$ac_useropt"
1227"*) ;;
1228 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1229 ac_unrecognized_sep=', ';;
b4e70030 1230 esac
81ecdfbb 1231 eval with_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1232
1233 -without-* | --without-*)
81ecdfbb 1234 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
c906108c 1235 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1236 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1237 as_fn_error "invalid package name: $ac_useropt"
1238 ac_useropt_orig=$ac_useropt
1239 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1240 case $ac_user_opts in
1241 *"
1242"with_$ac_useropt"
1243"*) ;;
1244 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1245 ac_unrecognized_sep=', ';;
1246 esac
1247 eval with_$ac_useropt=no ;;
c906108c
SS
1248
1249 --x)
1250 # Obsolete; use --with-x.
1251 with_x=yes ;;
1252
1253 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1254 | --x-incl | --x-inc | --x-in | --x-i)
1255 ac_prev=x_includes ;;
1256 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1257 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
bec39cab 1258 x_includes=$ac_optarg ;;
c906108c
SS
1259
1260 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1261 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1262 ac_prev=x_libraries ;;
1263 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1264 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
bec39cab 1265 x_libraries=$ac_optarg ;;
c906108c 1266
81ecdfbb
RW
1267 -*) as_fn_error "unrecognized option: \`$ac_option'
1268Try \`$0 --help' for more information."
c906108c
SS
1269 ;;
1270
bec39cab
AC
1271 *=*)
1272 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1273 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1274 case $ac_envvar in #(
1275 '' | [0-9]* | *[!_$as_cr_alnum]* )
1276 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1277 esac
1278 eval $ac_envvar=\$ac_optarg
bec39cab
AC
1279 export $ac_envvar ;;
1280
c906108c 1281 *)
bec39cab 1282 # FIXME: should be removed in autoconf 3.0.
81ecdfbb 1283 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
bec39cab 1284 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
81ecdfbb 1285 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
bec39cab 1286 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
c906108c
SS
1287 ;;
1288
1289 esac
1290done
1291
1292if test -n "$ac_prev"; then
bec39cab 1293 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
81ecdfbb 1294 as_fn_error "missing argument to $ac_option"
c906108c 1295fi
c906108c 1296
81ecdfbb
RW
1297if test -n "$ac_unrecognized_opts"; then
1298 case $enable_option_checking in
1299 no) ;;
1300 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
1301 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
b4e70030 1302 esac
81ecdfbb 1303fi
b4e70030 1304
81ecdfbb
RW
1305# Check all directory arguments for consistency.
1306for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1307 datadir sysconfdir sharedstatedir localstatedir includedir \
1308 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1309 libdir localedir mandir
b4e70030 1310do
81ecdfbb
RW
1311 eval ac_val=\$$ac_var
1312 # Remove trailing slashes.
1313 case $ac_val in
1314 */ )
1315 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1316 eval $ac_var=\$ac_val;;
1317 esac
1318 # Be sure to have absolute directory names.
b4e70030 1319 case $ac_val in
81ecdfbb
RW
1320 [\\/$]* | ?:[\\/]* ) continue;;
1321 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
c906108c 1322 esac
81ecdfbb 1323 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
c906108c
SS
1324done
1325
bec39cab
AC
1326# There might be people who depend on the old broken behavior: `$host'
1327# used to hold the argument of --host etc.
1328# FIXME: To remove some day.
1329build=$build_alias
1330host=$host_alias
1331target=$target_alias
1332
1333# FIXME: To remove some day.
1334if test "x$host_alias" != x; then
1335 if test "x$build_alias" = x; then
1336 cross_compiling=maybe
81ecdfbb 1337 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
bec39cab
AC
1338 If a cross compiler is detected then cross compile mode will be used." >&2
1339 elif test "x$build_alias" != "x$host_alias"; then
1340 cross_compiling=yes
1341 fi
1342fi
c906108c 1343
bec39cab
AC
1344ac_tool_prefix=
1345test -n "$host_alias" && ac_tool_prefix=$host_alias-
1346
1347test "$silent" = yes && exec 6>/dev/null
c906108c 1348
c906108c 1349
81ecdfbb
RW
1350ac_pwd=`pwd` && test -n "$ac_pwd" &&
1351ac_ls_di=`ls -di .` &&
1352ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1353 as_fn_error "working directory cannot be determined"
1354test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1355 as_fn_error "pwd does not report name of working directory"
1356
1357
c906108c
SS
1358# Find the source files, if location was not specified.
1359if test -z "$srcdir"; then
1360 ac_srcdir_defaulted=yes
81ecdfbb
RW
1361 # Try the directory containing this script, then the parent directory.
1362 ac_confdir=`$as_dirname -- "$as_myself" ||
1363$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1364 X"$as_myself" : 'X\(//\)[^/]' \| \
1365 X"$as_myself" : 'X\(//\)$' \| \
1366 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1367$as_echo X"$as_myself" |
1368 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1369 s//\1/
1370 q
1371 }
1372 /^X\(\/\/\)[^/].*/{
1373 s//\1/
1374 q
1375 }
1376 /^X\(\/\/\)$/{
1377 s//\1/
1378 q
1379 }
1380 /^X\(\/\).*/{
1381 s//\1/
1382 q
1383 }
1384 s/.*/./; q'`
c906108c 1385 srcdir=$ac_confdir
81ecdfbb 1386 if test ! -r "$srcdir/$ac_unique_file"; then
c906108c
SS
1387 srcdir=..
1388 fi
1389else
1390 ac_srcdir_defaulted=no
1391fi
81ecdfbb
RW
1392if test ! -r "$srcdir/$ac_unique_file"; then
1393 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1394 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
1395fi
1396ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1397ac_abs_confdir=`(
1398 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
1399 pwd)`
1400# When building in place, set srcdir=.
1401if test "$ac_abs_confdir" = "$ac_pwd"; then
1402 srcdir=.
1403fi
1404# Remove unnecessary trailing slashes from srcdir.
1405# Double slashes in file names in object file debugging info
1406# mess up M-x gdb in Emacs.
1407case $srcdir in
1408*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1409esac
1410for ac_var in $ac_precious_vars; do
1411 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1412 eval ac_env_${ac_var}_value=\$${ac_var}
1413 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1414 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1415done
c906108c 1416
bec39cab
AC
1417#
1418# Report the --help message.
1419#
1420if test "$ac_init_help" = "long"; then
1421 # Omit some internal or obsolete options to make the list less imposing.
1422 # This message is too long to be a string in the A/UX 3.1 sh.
1423 cat <<_ACEOF
1424\`configure' configures this package to adapt to many kinds of systems.
1425
1426Usage: $0 [OPTION]... [VAR=VALUE]...
1427
1428To assign environment variables (e.g., CC, CFLAGS...), specify them as
1429VAR=VALUE. See below for descriptions of some of the useful variables.
1430
1431Defaults for the options are specified in brackets.
1432
1433Configuration:
1434 -h, --help display this help and exit
1435 --help=short display options specific to this package
1436 --help=recursive display the short help of all the included packages
1437 -V, --version display version information and exit
1438 -q, --quiet, --silent do not print \`checking...' messages
1439 --cache-file=FILE cache test results in FILE [disabled]
1440 -C, --config-cache alias for \`--cache-file=config.cache'
1441 -n, --no-create do not create output files
1442 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1443
bec39cab
AC
1444Installation directories:
1445 --prefix=PREFIX install architecture-independent files in PREFIX
81ecdfbb 1446 [$ac_default_prefix]
bec39cab 1447 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
81ecdfbb 1448 [PREFIX]
bec39cab
AC
1449
1450By default, \`make install' will install all the files in
1451\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1452an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1453for instance \`--prefix=\$HOME'.
1454
1455For better control, use the options below.
1456
1457Fine tuning of the installation directories:
81ecdfbb
RW
1458 --bindir=DIR user executables [EPREFIX/bin]
1459 --sbindir=DIR system admin executables [EPREFIX/sbin]
1460 --libexecdir=DIR program executables [EPREFIX/libexec]
1461 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1462 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1463 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1464 --libdir=DIR object code libraries [EPREFIX/lib]
1465 --includedir=DIR C header files [PREFIX/include]
1466 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1467 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1468 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1469 --infodir=DIR info documentation [DATAROOTDIR/info]
1470 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1471 --mandir=DIR man documentation [DATAROOTDIR/man]
1472 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1473 --htmldir=DIR html documentation [DOCDIR]
1474 --dvidir=DIR dvi documentation [DOCDIR]
1475 --pdfdir=DIR pdf documentation [DOCDIR]
1476 --psdir=DIR ps documentation [DOCDIR]
bec39cab
AC
1477_ACEOF
1478
1479 cat <<\_ACEOF
1480
9009e1ae
MR
1481Program names:
1482 --program-prefix=PREFIX prepend PREFIX to installed program names
1483 --program-suffix=SUFFIX append SUFFIX to installed program names
1484 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1485
bec39cab
AC
1486X features:
1487 --x-includes=DIR X include files are in DIR
1488 --x-libraries=DIR X library files are in DIR
1489
1490System types:
1491 --build=BUILD configure for building on BUILD [guessed]
1492 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1493 --target=TARGET configure for building compilers for TARGET [HOST]
1494_ACEOF
1495fi
1496
1497if test -n "$ac_init_help"; then
1498
1499 cat <<\_ACEOF
1500
1501Optional Features:
81ecdfbb 1502 --disable-option-checking ignore unrecognized --enable/--with options
bec39cab
AC
1503 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1504 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
85981d60
AC
1505 --enable-maintainer-mode enable make rules and dependencies not useful
1506 (and sometimes confusing) to the casual installer
2974be62 1507 --enable-plugins Enable support for plugins
da2f07f1 1508 --disable-largefile omit support for large files
a1220294
TT
1509 --enable-targets=TARGETS
1510 alternative target configurations
c0993dbe 1511 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
bec39cab
AC
1512 --disable-gdbcli disable command-line interface (CLI)
1513 --disable-gdbmi disable machine-interface (MI)
1514 --enable-tui enable full-screen terminal user interface (TUI)
1515 --enable-gdbtk enable gdbtk graphical user interface (GUI)
1516 --enable-profiling enable profiling of GDB
3841debe 1517 --disable-rpath do not hardcode runtime library paths
17ef446e 1518 --enable-libmcheck Try linking with -lmcheck if available
a1220294 1519 --enable-werror treat compile warnings as errors
32c1c914 1520 --enable-build-warnings enable build-time compiler warnings if gcc is used
a1220294 1521 --enable-gdb-build-warnings
32c1c914 1522 enable GDB specific build-time compiler warnings if
a1220294 1523 gcc is used
32c1c914 1524 --enable-sim link gdb with simulator
bec39cab 1525 --enable-multi-ice build the multi-ice-gdb-server
496c0e1b
JB
1526 --enable-gdbserver automatically build gdbserver (yes/no/auto, default
1527 is auto)
bec39cab
AC
1528
1529Optional Packages:
1530 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1531 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
a1220294 1532 --with-separate-debug-dir=PATH
32c1c914 1533 look for global separate debug info in this path
62e4f60c 1534 [LIBDIR/debug]
b14b1491
TT
1535 --with-gdb-datadir=PATH look for global separate data files in this path
1536 [DATADIR/gdb]
29b0e8a2 1537 --with-relocated-sources=PATH
32c1c914 1538 automatically relocate this path for source files
7349ff92 1539 --with-auto-load-dir=PATH
aff139ff 1540 directories from which to load auto-loaded scripts
1564a261 1541 [$debugdir:$datadir/auto-load]
bccbefd2 1542 --with-auto-load-safe-path=PATH
aff139ff 1543 directories safe to hold auto-loaded files
7349ff92 1544 [--with-auto-load-dir]
bccbefd2
JK
1545 --without-auto-load-safe-path
1546 do not restrict auto-loaded files locations
05e7c244 1547 --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets
cb01cfba
JB
1548 --with-curses use the curses library instead of the termcap
1549 library
c16158bc
JM
1550 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
1551 --with-bugurl=URL Direct users to URL to report a bug
711a72d3 1552 --with-system-zlib use installed libz
016a3251
DD
1553 --with-gnu-ld assume the C compiler uses GNU ld default=no
1554 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
1555 --without-libiconv-prefix don't search for libiconv in includedir and libdir
478aac75 1556 --with-iconv-bin=PATH specify where to find the iconv program
6a30b0a5 1557 --with-system-readline use installed readline library
b8e0a31c
SD
1558 --with-jit-reader-dir=PATH
1559 directory to load the JIT readers from
5c39566f 1560 --with-expat include expat support (auto/yes/no)
3841debe
DJ
1561 --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib
1562 --without-libexpat-prefix don't search for libexpat in includedir and libdir
0c4a4063
DE
1563 --with-python[=PYTHON] include python support
1564 (auto/yes/no/<python-program>)
ed3ef339
DE
1565 --with-guile[=GUILE] include guile support
1566 (auto/yes/no/<guile-version>/<pkg-config-program>)
bc504a31 1567 --with-intel-pt include Intel Processor Trace support (auto/yes/no)
58bfce93
MM
1568 --with-libipt-prefix[=DIR] search for libipt in DIR/include and DIR/lib
1569 --without-libipt-prefix don't search for libipt in includedir and libdir
a1220294
TT
1570 --without-included-regex
1571 don't use included regex; this is the default on
1572 systems with version 2 of the GNU C library (use
1573 with caution on other system)
81ecdfbb 1574 --with-sysroot[=DIR] search for usr/lib et al within DIR
b14b1491 1575 --with-system-gdbinit=PATH
32c1c914 1576 automatically load a system-wide gdbinit file
608e2dbb
TT
1577 --with-lzma support lzma compression (auto/yes/no)
1578 --with-liblzma-prefix[=DIR] search for liblzma in DIR/include and DIR/lib
1579 --without-liblzma-prefix don't search for liblzma in includedir and libdir
5062cc19
KS
1580 --with-tcl directory containing tcl configuration (tclConfig.sh)
1581 --with-tk directory containing tk configuration (tkConfig.sh)
bec39cab 1582 --with-x use the X Window System
393fd4c3
YQ
1583 --with-babeltrace include babeltrace support (auto/yes/no)
1584 --with-libbabeltrace-prefix[=DIR] search for libbabeltrace in DIR/include and DIR/lib
1585 --without-libbabeltrace-prefix don't search for libbabeltrace in includedir and libdir
bec39cab
AC
1586
1587Some influential environment variables:
1588 CC C compiler command
1589 CFLAGS C compiler flags
1590 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1591 nonstandard directory <lib dir>
81ecdfbb
RW
1592 LIBS libraries to pass to the linker, e.g. -l<library>
1593 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1594 you have headers in a nonstandard directory <include dir>
3bc3d82a
PA
1595 CXX C++ compiler command
1596 CXXFLAGS C++ compiler flags
bec39cab 1597 CPP C preprocessor
f06e05e0
JK
1598 MAKEINFO Parent configure detects if it is of sufficient version.
1599 MAKEINFOFLAGS
1600 Parameters for MAKEINFO.
81ecdfbb
RW
1601 YACC The `Yet Another C Compiler' implementation to use. Defaults to
1602 the first program found out of: `bison -y', `byacc', `yacc'.
1603 YFLAGS The list of arguments that will be passed by default to $YACC.
1604 This script will default YFLAGS to the empty string to avoid a
1605 default value of `-d' given by some make applications.
1606 XMKMF Path to xmkmf, Makefile generator for X Window System
bec39cab
AC
1607
1608Use these variables to override the choices made by `configure' or to help
1609it to find libraries and programs with nonstandard names/locations.
1610
81ecdfbb 1611Report bugs to the package provider.
bec39cab 1612_ACEOF
81ecdfbb 1613ac_status=$?
bec39cab
AC
1614fi
1615
1616if test "$ac_init_help" = "recursive"; then
1617 # If there are subdirs, report their specific --help.
bec39cab 1618 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
81ecdfbb
RW
1619 test -d "$ac_dir" ||
1620 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1621 continue
bec39cab
AC
1622 ac_builddir=.
1623
81ecdfbb
RW
1624case "$ac_dir" in
1625.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1626*)
1627 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1628 # A ".." for each directory in $ac_dir_suffix.
1629 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1630 case $ac_top_builddir_sub in
1631 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1632 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1633 esac ;;
1634esac
1635ac_abs_top_builddir=$ac_pwd
1636ac_abs_builddir=$ac_pwd$ac_dir_suffix
1637# for backward compatibility:
1638ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
1639
1640case $srcdir in
81ecdfbb 1641 .) # We are building in place.
bec39cab 1642 ac_srcdir=.
81ecdfbb
RW
1643 ac_top_srcdir=$ac_top_builddir_sub
1644 ac_abs_top_srcdir=$ac_pwd ;;
1645 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 1646 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
1647 ac_top_srcdir=$srcdir
1648 ac_abs_top_srcdir=$srcdir ;;
1649 *) # Relative name.
1650 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1651 ac_top_srcdir=$ac_top_build_prefix$srcdir
1652 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 1653esac
81ecdfbb 1654ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 1655
81ecdfbb
RW
1656 cd "$ac_dir" || { ac_status=$?; continue; }
1657 # Check for guested configure.
1658 if test -f "$ac_srcdir/configure.gnu"; then
1659 echo &&
1660 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1661 elif test -f "$ac_srcdir/configure"; then
1662 echo &&
1663 $SHELL "$ac_srcdir/configure" --help=recursive
3ace7edb 1664 else
81ecdfbb
RW
1665 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1666 fi || ac_status=$?
1667 cd "$ac_pwd" || { ac_status=$?; break; }
bec39cab
AC
1668 done
1669fi
1670
81ecdfbb 1671test -n "$ac_init_help" && exit $ac_status
bec39cab
AC
1672if $ac_init_version; then
1673 cat <<\_ACEOF
81ecdfbb
RW
1674configure
1675generated by GNU Autoconf 2.64
bec39cab 1676
81ecdfbb 1677Copyright (C) 2009 Free Software Foundation, Inc.
bec39cab
AC
1678This configure script is free software; the Free Software Foundation
1679gives unlimited permission to copy, distribute and modify it.
1680_ACEOF
81ecdfbb 1681 exit
bec39cab 1682fi
bec39cab 1683
81ecdfbb
RW
1684## ------------------------ ##
1685## Autoconf initialization. ##
1686## ------------------------ ##
bec39cab 1687
81ecdfbb
RW
1688# ac_fn_c_try_compile LINENO
1689# --------------------------
1690# Try to compile conftest.$ac_ext, and return whether this succeeded.
1691ac_fn_c_try_compile ()
1692{
1693 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1694 rm -f conftest.$ac_objext
1695 if { { ac_try="$ac_compile"
1696case "(($ac_try" in
1697 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1698 *) ac_try_echo=$ac_try;;
1699esac
1700eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1701$as_echo "$ac_try_echo"; } >&5
1702 (eval "$ac_compile") 2>conftest.err
1703 ac_status=$?
1704 if test -s conftest.err; then
1705 grep -v '^ *+' conftest.err >conftest.er1
1706 cat conftest.er1 >&5
1707 mv -f conftest.er1 conftest.err
1708 fi
1709 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1710 test $ac_status = 0; } && {
1711 test -z "$ac_c_werror_flag" ||
1712 test ! -s conftest.err
1713 } && test -s conftest.$ac_objext; then :
1714 ac_retval=0
1715else
1716 $as_echo "$as_me: failed program was:" >&5
1717sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1718
81ecdfbb
RW
1719 ac_retval=1
1720fi
1721 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1722 return $ac_retval
1723
1724} # ac_fn_c_try_compile
1725
3bc3d82a
PA
1726# ac_fn_cxx_try_compile LINENO
1727# ----------------------------
1728# Try to compile conftest.$ac_ext, and return whether this succeeded.
1729ac_fn_cxx_try_compile ()
1730{
1731 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1732 rm -f conftest.$ac_objext
1733 if { { ac_try="$ac_compile"
1734case "(($ac_try" in
1735 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1736 *) ac_try_echo=$ac_try;;
1737esac
1738eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1739$as_echo "$ac_try_echo"; } >&5
1740 (eval "$ac_compile") 2>conftest.err
1741 ac_status=$?
1742 if test -s conftest.err; then
1743 grep -v '^ *+' conftest.err >conftest.er1
1744 cat conftest.er1 >&5
1745 mv -f conftest.er1 conftest.err
1746 fi
1747 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1748 test $ac_status = 0; } && {
1749 test -z "$ac_cxx_werror_flag" ||
1750 test ! -s conftest.err
1751 } && test -s conftest.$ac_objext; then :
1752 ac_retval=0
1753else
1754 $as_echo "$as_me: failed program was:" >&5
1755sed 's/^/| /' conftest.$ac_ext >&5
1756
1757 ac_retval=1
1758fi
1759 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1760 return $ac_retval
1761
1762} # ac_fn_cxx_try_compile
1763
81ecdfbb
RW
1764# ac_fn_c_try_cpp LINENO
1765# ----------------------
1766# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1767ac_fn_c_try_cpp ()
bec39cab 1768{
81ecdfbb
RW
1769 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1770 if { { ac_try="$ac_cpp conftest.$ac_ext"
1771case "(($ac_try" in
1772 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1773 *) ac_try_echo=$ac_try;;
1774esac
1775eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1776$as_echo "$ac_try_echo"; } >&5
1777 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1778 ac_status=$?
1779 if test -s conftest.err; then
1780 grep -v '^ *+' conftest.err >conftest.er1
1781 cat conftest.er1 >&5
1782 mv -f conftest.er1 conftest.err
1783 fi
1784 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1785 test $ac_status = 0; } >/dev/null && {
1786 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1787 test ! -s conftest.err
1788 }; then :
1789 ac_retval=0
1790else
1791 $as_echo "$as_me: failed program was:" >&5
1792sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1793
81ecdfbb
RW
1794 ac_retval=1
1795fi
1796 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1797 return $ac_retval
bec39cab 1798
81ecdfbb 1799} # ac_fn_c_try_cpp
bec39cab 1800
81ecdfbb
RW
1801# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1802# -------------------------------------------------------
1803# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1804# the include files in INCLUDES and setting the cache variable VAR
1805# accordingly.
1806ac_fn_c_check_header_mongrel ()
1807{
1808 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1809 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1810 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1811$as_echo_n "checking for $2... " >&6; }
1812if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1813 $as_echo_n "(cached) " >&6
1814fi
1815eval ac_res=\$$3
1816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1817$as_echo "$ac_res" >&6; }
1818else
1819 # Is the header compilable?
1820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1821$as_echo_n "checking $2 usability... " >&6; }
1822cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1823/* end confdefs.h. */
1824$4
1825#include <$2>
1826_ACEOF
1827if ac_fn_c_try_compile "$LINENO"; then :
1828 ac_header_compiler=yes
1829else
1830 ac_header_compiler=no
1831fi
1832rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1833{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1834$as_echo "$ac_header_compiler" >&6; }
bec39cab 1835
81ecdfbb
RW
1836# Is the header present?
1837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1838$as_echo_n "checking $2 presence... " >&6; }
1839cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1840/* end confdefs.h. */
1841#include <$2>
1842_ACEOF
1843if ac_fn_c_try_cpp "$LINENO"; then :
1844 ac_header_preproc=yes
1845else
1846 ac_header_preproc=no
1847fi
1848rm -f conftest.err conftest.$ac_ext
1849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1850$as_echo "$ac_header_preproc" >&6; }
bec39cab 1851
81ecdfbb
RW
1852# So? What about this header?
1853case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1854 yes:no: )
1855 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1856$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1857 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1858$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1859 ;;
1860 no:yes:* )
1861 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1862$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1863 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1864$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1865 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1866$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1867 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1868$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1869 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1870$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1871 ;;
1872esac
1873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1874$as_echo_n "checking for $2... " >&6; }
1875if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1876 $as_echo_n "(cached) " >&6
1877else
1878 eval "$3=\$ac_header_compiler"
1879fi
1880eval ac_res=\$$3
1881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1882$as_echo "$ac_res" >&6; }
1883fi
1884 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 1885
81ecdfbb 1886} # ac_fn_c_check_header_mongrel
bec39cab 1887
81ecdfbb
RW
1888# ac_fn_c_try_run LINENO
1889# ----------------------
1890# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1891# that executables *can* be run.
1892ac_fn_c_try_run ()
1893{
1894 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1895 if { { ac_try="$ac_link"
1896case "(($ac_try" in
1897 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1898 *) ac_try_echo=$ac_try;;
1899esac
1900eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1901$as_echo "$ac_try_echo"; } >&5
1902 (eval "$ac_link") 2>&5
1903 ac_status=$?
1904 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1905 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1906 { { case "(($ac_try" in
1907 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1908 *) ac_try_echo=$ac_try;;
1909esac
1910eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1911$as_echo "$ac_try_echo"; } >&5
1912 (eval "$ac_try") 2>&5
1913 ac_status=$?
1914 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1915 test $ac_status = 0; }; }; then :
1916 ac_retval=0
1917else
1918 $as_echo "$as_me: program exited with status $ac_status" >&5
1919 $as_echo "$as_me: failed program was:" >&5
1920sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1921
81ecdfbb
RW
1922 ac_retval=$ac_status
1923fi
1924 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1925 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1926 return $ac_retval
bec39cab 1927
81ecdfbb 1928} # ac_fn_c_try_run
bec39cab 1929
81ecdfbb
RW
1930# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1931# -------------------------------------------------------
1932# Tests whether HEADER exists and can be compiled using the include files in
1933# INCLUDES, setting the cache variable VAR accordingly.
1934ac_fn_c_check_header_compile ()
1935{
1936 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1937 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1938$as_echo_n "checking for $2... " >&6; }
1939if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1940 $as_echo_n "(cached) " >&6
1941else
1942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1943/* end confdefs.h. */
1944$4
1945#include <$2>
bec39cab 1946_ACEOF
81ecdfbb
RW
1947if ac_fn_c_try_compile "$LINENO"; then :
1948 eval "$3=yes"
1949else
1950 eval "$3=no"
1951fi
1952rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1953fi
1954eval ac_res=\$$3
1955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1956$as_echo "$ac_res" >&6; }
1957 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 1958
81ecdfbb 1959} # ac_fn_c_check_header_compile
bec39cab 1960
2974be62
AM
1961# ac_fn_c_try_link LINENO
1962# -----------------------
1963# Try to link conftest.$ac_ext, and return whether this succeeded.
1964ac_fn_c_try_link ()
1965{
1966 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1967 rm -f conftest.$ac_objext conftest$ac_exeext
1968 if { { ac_try="$ac_link"
1969case "(($ac_try" in
1970 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1971 *) ac_try_echo=$ac_try;;
1972esac
1973eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1974$as_echo "$ac_try_echo"; } >&5
1975 (eval "$ac_link") 2>conftest.err
1976 ac_status=$?
1977 if test -s conftest.err; then
1978 grep -v '^ *+' conftest.err >conftest.er1
1979 cat conftest.er1 >&5
1980 mv -f conftest.er1 conftest.err
1981 fi
1982 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1983 test $ac_status = 0; } && {
1984 test -z "$ac_c_werror_flag" ||
1985 test ! -s conftest.err
1986 } && test -s conftest$ac_exeext && {
1987 test "$cross_compiling" = yes ||
1988 $as_test_x conftest$ac_exeext
1989 }; then :
1990 ac_retval=0
1991else
1992 $as_echo "$as_me: failed program was:" >&5
1993sed 's/^/| /' conftest.$ac_ext >&5
1994
1995 ac_retval=1
1996fi
1997 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1998 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1999 # interfere with the next link command; also delete a directory that is
2000 # left behind by Apple's compiler. We do this before executing the actions.
2001 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2002 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2003 return $ac_retval
2004
2005} # ac_fn_c_try_link
2006
81ecdfbb
RW
2007# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2008# --------------------------------------------
2009# Tries to find the compile-time value of EXPR in a program that includes
2010# INCLUDES, setting VAR accordingly. Returns whether the value could be
2011# computed
2012ac_fn_c_compute_int ()
2013{
2014 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2015 if test "$cross_compiling" = yes; then
2016 # Depending upon the size, compute the lo and hi bounds.
2017cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2018/* end confdefs.h. */
2019$4
2020int
2021main ()
2022{
2023static int test_array [1 - 2 * !(($2) >= 0)];
2024test_array [0] = 0
bec39cab 2025
81ecdfbb
RW
2026 ;
2027 return 0;
2028}
2029_ACEOF
2030if ac_fn_c_try_compile "$LINENO"; then :
2031 ac_lo=0 ac_mid=0
2032 while :; do
2033 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2034/* end confdefs.h. */
2035$4
2036int
2037main ()
2038{
2039static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2040test_array [0] = 0
bec39cab 2041
81ecdfbb
RW
2042 ;
2043 return 0;
2044}
2045_ACEOF
2046if ac_fn_c_try_compile "$LINENO"; then :
2047 ac_hi=$ac_mid; break
2048else
2049 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2050 if test $ac_lo -le $ac_mid; then
2051 ac_lo= ac_hi=
2052 break
2053 fi
2054 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
c906108c 2055fi
81ecdfbb
RW
2056rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2057 done
c906108c 2058else
81ecdfbb
RW
2059 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2060/* end confdefs.h. */
2061$4
2062int
2063main ()
2064{
2065static int test_array [1 - 2 * !(($2) < 0)];
2066test_array [0] = 0
bec39cab 2067
81ecdfbb
RW
2068 ;
2069 return 0;
2070}
2071_ACEOF
2072if ac_fn_c_try_compile "$LINENO"; then :
2073 ac_hi=-1 ac_mid=-1
2074 while :; do
2075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2076/* end confdefs.h. */
2077$4
2078int
2079main ()
2080{
2081static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2082test_array [0] = 0
bec39cab 2083
81ecdfbb
RW
2084 ;
2085 return 0;
2086}
2087_ACEOF
2088if ac_fn_c_try_compile "$LINENO"; then :
2089 ac_lo=$ac_mid; break
2090else
2091 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2092 if test $ac_mid -le $ac_hi; then
2093 ac_lo= ac_hi=
2094 break
2095 fi
2096 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2097fi
2098rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2099 done
2100else
2101 ac_lo= ac_hi=
2102fi
2103rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2104fi
2105rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2106# Binary search between lo and hi bounds.
2107while test "x$ac_lo" != "x$ac_hi"; do
2108 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2110/* end confdefs.h. */
2111$4
2112int
2113main ()
2114{
2115static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2116test_array [0] = 0
bec39cab 2117
81ecdfbb
RW
2118 ;
2119 return 0;
2120}
2121_ACEOF
2122if ac_fn_c_try_compile "$LINENO"; then :
2123 ac_hi=$ac_mid
2124else
2125 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2126fi
2127rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2128done
2129case $ac_lo in #((
2130?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2131'') ac_retval=1 ;;
2132esac
2133 else
2134 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2135/* end confdefs.h. */
2136$4
2137static long int longval () { return $2; }
2138static unsigned long int ulongval () { return $2; }
2139#include <stdio.h>
2140#include <stdlib.h>
2141int
2142main ()
2143{
bec39cab 2144
81ecdfbb
RW
2145 FILE *f = fopen ("conftest.val", "w");
2146 if (! f)
2147 return 1;
2148 if (($2) < 0)
2149 {
2150 long int i = longval ();
2151 if (i != ($2))
2152 return 1;
2153 fprintf (f, "%ld", i);
2154 }
2155 else
2156 {
2157 unsigned long int i = ulongval ();
2158 if (i != ($2))
2159 return 1;
2160 fprintf (f, "%lu", i);
2161 }
2162 /* Do not output a trailing newline, as this causes \r\n confusion
2163 on some platforms. */
2164 return ferror (f) || fclose (f) != 0;
bec39cab 2165
81ecdfbb
RW
2166 ;
2167 return 0;
2168}
2169_ACEOF
2170if ac_fn_c_try_run "$LINENO"; then :
2171 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2172else
2173 ac_retval=1
2174fi
2175rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2176 conftest.$ac_objext conftest.beam conftest.$ac_ext
2177rm -f conftest.val
bec39cab 2178
81ecdfbb
RW
2179 fi
2180 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2181 return $ac_retval
bec39cab 2182
81ecdfbb 2183} # ac_fn_c_compute_int
bec39cab 2184
55a8c076
YQ
2185# ac_fn_c_check_func LINENO FUNC VAR
2186# ----------------------------------
2187# Tests whether FUNC exists, setting the cache variable VAR accordingly
2188ac_fn_c_check_func ()
81ecdfbb
RW
2189{
2190 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2191 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2192$as_echo_n "checking for $2... " >&6; }
2193if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2194 $as_echo_n "(cached) " >&6
2195else
81ecdfbb
RW
2196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2197/* end confdefs.h. */
55a8c076
YQ
2198/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2199 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2200#define $2 innocuous_$2
2201
2202/* System header to define __stub macros and hopefully few prototypes,
2203 which can conflict with char $2 (); below.
2204 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2205 <limits.h> exists even on freestanding compilers. */
2206
2207#ifdef __STDC__
2208# include <limits.h>
2209#else
2210# include <assert.h>
2211#endif
2212
2213#undef $2
2214
2215/* Override any GCC internal prototype to avoid an error.
2216 Use char because int might match the return type of a GCC
2217 builtin and then its argument prototype would still apply. */
2218#ifdef __cplusplus
2219extern "C"
2220#endif
2221char $2 ();
2222/* The GNU C library defines this for functions which it implements
2223 to always fail with ENOSYS. Some functions are actually named
2224 something starting with __ and the normal name is an alias. */
2225#if defined __stub_$2 || defined __stub___$2
2226choke me
2227#endif
2228
2229int
2230main ()
2231{
2232return $2 ();
2233 ;
2234 return 0;
2235}
2236_ACEOF
2237if ac_fn_c_try_link "$LINENO"; then :
2238 eval "$3=yes"
2239else
2240 eval "$3=no"
2241fi
2242rm -f core conftest.err conftest.$ac_objext \
2243 conftest$ac_exeext conftest.$ac_ext
2244fi
2245eval ac_res=\$$3
2246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2247$as_echo "$ac_res" >&6; }
2248 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2249
2250} # ac_fn_c_check_func
2251
c56ccc05
MM
2252# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2253# ----------------------------------------------------
2254# Tries to find if the field MEMBER exists in type AGGR, after including
2255# INCLUDES, setting cache variable VAR accordingly.
2256ac_fn_c_check_member ()
2257{
2258 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2259 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2260$as_echo_n "checking for $2.$3... " >&6; }
2261if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
2262 $as_echo_n "(cached) " >&6
2263else
2264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2265/* end confdefs.h. */
2266$5
2267int
2268main ()
2269{
2270static $2 ac_aggr;
2271if (ac_aggr.$3)
2272return 0;
2273 ;
2274 return 0;
2275}
2276_ACEOF
2277if ac_fn_c_try_compile "$LINENO"; then :
2278 eval "$4=yes"
2279else
2280 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2281/* end confdefs.h. */
2282$5
2283int
2284main ()
2285{
2286static $2 ac_aggr;
2287if (sizeof ac_aggr.$3)
2288return 0;
2289 ;
2290 return 0;
2291}
2292_ACEOF
2293if ac_fn_c_try_compile "$LINENO"; then :
2294 eval "$4=yes"
2295else
2296 eval "$4=no"
2297fi
2298rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2299fi
2300rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2301fi
2302eval ac_res=\$$4
2303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2304$as_echo "$ac_res" >&6; }
2305 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2306
2307} # ac_fn_c_check_member
2308
07697489
PA
2309# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2310# -------------------------------------------
2311# Tests whether TYPE exists after having included INCLUDES, setting cache
2312# variable VAR accordingly.
2313ac_fn_c_check_type ()
2314{
2315 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2316 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2317$as_echo_n "checking for $2... " >&6; }
2318if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2319 $as_echo_n "(cached) " >&6
2320else
2321 eval "$3=no"
2322 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2323/* end confdefs.h. */
2324$4
2325int
2326main ()
2327{
2328if (sizeof ($2))
2329 return 0;
2330 ;
2331 return 0;
2332}
2333_ACEOF
2334if ac_fn_c_try_compile "$LINENO"; then :
2335 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2336/* end confdefs.h. */
2337$4
2338int
2339main ()
2340{
2341if (sizeof (($2)))
2342 return 0;
2343 ;
2344 return 0;
2345}
2346_ACEOF
2347if ac_fn_c_try_compile "$LINENO"; then :
2348
2349else
2350 eval "$3=yes"
2351fi
2352rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2353fi
2354rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2355fi
2356eval ac_res=\$$3
2357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2358$as_echo "$ac_res" >&6; }
2359 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2360
2361} # ac_fn_c_check_type
2362
770d76d7
PA
2363# ac_fn_c_check_decl LINENO SYMBOL VAR
2364# ------------------------------------
2365# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2366ac_fn_c_check_decl ()
2367{
2368 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2369 as_decl_name=`echo $2|sed 's/ *(.*//'`
2370 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2371 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2372$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2373if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2374 $as_echo_n "(cached) " >&6
2375else
2376 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2377/* end confdefs.h. */
2378$4
2379int
2380main ()
2381{
2382#ifndef $as_decl_name
2383#ifdef __cplusplus
2384 (void) $as_decl_use;
2385#else
2386 (void) $as_decl_name;
2387#endif
2388#endif
2389
2390 ;
2391 return 0;
2392}
2393_ACEOF
2394if ac_fn_c_try_compile "$LINENO"; then :
2395 eval "$3=yes"
2396else
2397 eval "$3=no"
2398fi
2399rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2400fi
2401eval ac_res=\$$3
2402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2403$as_echo "$ac_res" >&6; }
2404 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2405
2406} # ac_fn_c_check_decl
81ecdfbb
RW
2407cat >config.log <<_ACEOF
2408This file contains any messages produced by compilers while
2409running configure, to aid debugging if configure makes a mistake.
d5af19ba 2410
81ecdfbb
RW
2411It was created by $as_me, which was
2412generated by GNU Autoconf 2.64. Invocation command line was
b4e70030 2413
81ecdfbb 2414 $ $0 $@
413ccac7 2415
81ecdfbb
RW
2416_ACEOF
2417exec 5>>config.log
2418{
2419cat <<_ASUNAME
2420## --------- ##
2421## Platform. ##
2422## --------- ##
413ccac7 2423
81ecdfbb
RW
2424hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2425uname -m = `(uname -m) 2>/dev/null || echo unknown`
2426uname -r = `(uname -r) 2>/dev/null || echo unknown`
2427uname -s = `(uname -s) 2>/dev/null || echo unknown`
2428uname -v = `(uname -v) 2>/dev/null || echo unknown`
85981d60 2429
81ecdfbb
RW
2430/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2431/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
413ccac7 2432
81ecdfbb
RW
2433/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2434/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2435/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2436/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2437/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2438/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2439/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
c906108c 2440
81ecdfbb 2441_ASUNAME
bec39cab 2442
bec39cab
AC
2443as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2444for as_dir in $PATH
2445do
2446 IFS=$as_save_IFS
2447 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2448 $as_echo "PATH: $as_dir"
2449 done
2450IFS=$as_save_IFS
bec39cab 2451
81ecdfbb 2452} >&5
bec39cab 2453
81ecdfbb 2454cat >&5 <<_ACEOF
bec39cab 2455
bec39cab 2456
81ecdfbb
RW
2457## ----------- ##
2458## Core tests. ##
2459## ----------- ##
2460
2461_ACEOF
2462
2463
2464# Keep a trace of the command line.
2465# Strip out --no-create and --no-recursion so they do not pile up.
2466# Strip out --silent because we don't want to record it for future runs.
2467# Also quote any args containing shell meta-characters.
2468# Make two passes to allow for proper duplicate-argument suppression.
2469ac_configure_args=
2470ac_configure_args0=
2471ac_configure_args1=
2472ac_must_keep_next=false
2473for ac_pass in 1 2
2474do
2475 for ac_arg
2476 do
2477 case $ac_arg in
2478 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2479 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2480 | -silent | --silent | --silen | --sile | --sil)
2481 continue ;;
2482 *\'*)
2483 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2484 esac
2485 case $ac_pass in
2486 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2487 2)
2488 as_fn_append ac_configure_args1 " '$ac_arg'"
2489 if test $ac_must_keep_next = true; then
2490 ac_must_keep_next=false # Got value, back to normal.
2491 else
2492 case $ac_arg in
2493 *=* | --config-cache | -C | -disable-* | --disable-* \
2494 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2495 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2496 | -with-* | --with-* | -without-* | --without-* | --x)
2497 case "$ac_configure_args0 " in
2498 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2499 esac
2500 ;;
2501 -* ) ac_must_keep_next=true ;;
2502 esac
2503 fi
2504 as_fn_append ac_configure_args " '$ac_arg'"
2505 ;;
2506 esac
2507 done
2508done
2509{ ac_configure_args0=; unset ac_configure_args0;}
2510{ ac_configure_args1=; unset ac_configure_args1;}
2511
2512# When interrupted or exit'd, cleanup temporary files, and complete
2513# config.log. We remove comments because anyway the quotes in there
2514# would cause problems or look ugly.
2515# WARNING: Use '\'' to represent an apostrophe within the trap.
2516# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2517trap 'exit_status=$?
2518 # Save into config.log some information that might help in debugging.
2519 {
2520 echo
2521
2522 cat <<\_ASBOX
2523## ---------------- ##
2524## Cache variables. ##
2525## ---------------- ##
2526_ASBOX
2527 echo
2528 # The following way of writing the cache mishandles newlines in values,
2529(
2530 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2531 eval ac_val=\$$ac_var
2532 case $ac_val in #(
2533 *${as_nl}*)
2534 case $ac_var in #(
2535 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2536$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2537 esac
2538 case $ac_var in #(
2539 _ | IFS | as_nl) ;; #(
2540 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2541 *) { eval $ac_var=; unset $ac_var;} ;;
2542 esac ;;
2543 esac
2544 done
2545 (set) 2>&1 |
2546 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2547 *${as_nl}ac_space=\ *)
2548 sed -n \
2549 "s/'\''/'\''\\\\'\'''\''/g;
2550 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2551 ;; #(
2552 *)
2553 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2554 ;;
2555 esac |
2556 sort
2557)
2558 echo
2559
2560 cat <<\_ASBOX
2561## ----------------- ##
2562## Output variables. ##
2563## ----------------- ##
2564_ASBOX
2565 echo
2566 for ac_var in $ac_subst_vars
2567 do
2568 eval ac_val=\$$ac_var
2569 case $ac_val in
2570 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2571 esac
2572 $as_echo "$ac_var='\''$ac_val'\''"
2573 done | sort
2574 echo
2575
2576 if test -n "$ac_subst_files"; then
2577 cat <<\_ASBOX
2578## ------------------- ##
2579## File substitutions. ##
2580## ------------------- ##
2581_ASBOX
2582 echo
2583 for ac_var in $ac_subst_files
2584 do
2585 eval ac_val=\$$ac_var
2586 case $ac_val in
2587 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2588 esac
2589 $as_echo "$ac_var='\''$ac_val'\''"
2590 done | sort
2591 echo
2592 fi
2593
2594 if test -s confdefs.h; then
2595 cat <<\_ASBOX
2596## ----------- ##
2597## confdefs.h. ##
2598## ----------- ##
2599_ASBOX
2600 echo
2601 cat confdefs.h
2602 echo
2603 fi
2604 test "$ac_signal" != 0 &&
2605 $as_echo "$as_me: caught signal $ac_signal"
2606 $as_echo "$as_me: exit $exit_status"
2607 } >&5
2608 rm -f core *.core core.conftest.* &&
2609 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2610 exit $exit_status
2611' 0
2612for ac_signal in 1 2 13 15; do
2613 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2614done
2615ac_signal=0
2616
2617# confdefs.h avoids OS command line length limits that DEFS can exceed.
2618rm -f -r conftest* confdefs.h
2619
2620$as_echo "/* confdefs.h */" > confdefs.h
2621
2622# Predefined preprocessor variables.
2623
2624cat >>confdefs.h <<_ACEOF
2625#define PACKAGE_NAME "$PACKAGE_NAME"
2626_ACEOF
2627
2628cat >>confdefs.h <<_ACEOF
2629#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2630_ACEOF
2631
2632cat >>confdefs.h <<_ACEOF
2633#define PACKAGE_VERSION "$PACKAGE_VERSION"
2634_ACEOF
2635
2636cat >>confdefs.h <<_ACEOF
2637#define PACKAGE_STRING "$PACKAGE_STRING"
2638_ACEOF
2639
2640cat >>confdefs.h <<_ACEOF
2641#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2642_ACEOF
2643
2644cat >>confdefs.h <<_ACEOF
2645#define PACKAGE_URL "$PACKAGE_URL"
2646_ACEOF
2647
2648
2649# Let the site file select an alternate cache file if it wants to.
2650# Prefer an explicitly selected file to automatically selected ones.
2651ac_site_file1=NONE
2652ac_site_file2=NONE
2653if test -n "$CONFIG_SITE"; then
2654 ac_site_file1=$CONFIG_SITE
2655elif test "x$prefix" != xNONE; then
2656 ac_site_file1=$prefix/share/config.site
2657 ac_site_file2=$prefix/etc/config.site
2658else
2659 ac_site_file1=$ac_default_prefix/share/config.site
2660 ac_site_file2=$ac_default_prefix/etc/config.site
2661fi
2662for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2663do
2664 test "x$ac_site_file" = xNONE && continue
2665 if test -r "$ac_site_file"; then
2666 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2667$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2668 sed 's/^/| /' "$ac_site_file" >&5
2669 . "$ac_site_file"
2670 fi
2671done
2672
2673if test -r "$cache_file"; then
2674 # Some versions of bash will fail to source /dev/null (special
2675 # files actually), so we avoid doing that.
2676 if test -f "$cache_file"; then
2677 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2678$as_echo "$as_me: loading cache $cache_file" >&6;}
2679 case $cache_file in
2680 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2681 *) . "./$cache_file";;
2682 esac
2683 fi
2684else
2685 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2686$as_echo "$as_me: creating cache $cache_file" >&6;}
2687 >$cache_file
bec39cab
AC
2688fi
2689
81ecdfbb
RW
2690# Check that the precious variables saved in the cache have kept the same
2691# value.
2692ac_cache_corrupted=false
2693for ac_var in $ac_precious_vars; do
2694 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2695 eval ac_new_set=\$ac_env_${ac_var}_set
2696 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2697 eval ac_new_val=\$ac_env_${ac_var}_value
2698 case $ac_old_set,$ac_new_set in
2699 set,)
2700 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2701$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2702 ac_cache_corrupted=: ;;
2703 ,set)
2704 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2705$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2706 ac_cache_corrupted=: ;;
2707 ,);;
2708 *)
2709 if test "x$ac_old_val" != "x$ac_new_val"; then
2710 # differences in whitespace do not lead to failure.
2711 ac_old_val_w=`echo x $ac_old_val`
2712 ac_new_val_w=`echo x $ac_new_val`
2713 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2714 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2715$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2716 ac_cache_corrupted=:
2717 else
2718 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2719$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2720 eval $ac_var=\$ac_old_val
2721 fi
2722 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2723$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2724 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2725$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2726 fi;;
2727 esac
2728 # Pass precious variables to config.status.
2729 if test "$ac_new_set" = set; then
2730 case $ac_new_val in
2731 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2732 *) ac_arg=$ac_var=$ac_new_val ;;
2733 esac
2734 case " $ac_configure_args " in
2735 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2736 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2737 esac
2738 fi
2739done
2740if $ac_cache_corrupted; then
2741 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2742$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2743 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2744$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2745 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2746fi
2747## -------------------- ##
2748## Main body of script. ##
2749## -------------------- ##
2750
2751ac_ext=c
2752ac_cpp='$CPP $CPPFLAGS'
2753ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2754ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2755ac_compiler_gnu=$ac_cv_c_compiler_gnu
2756
2757
2758
2759
2760
2761ac_config_headers="$ac_config_headers config.h:config.in"
2762
2763
2764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2765$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2766 # Check whether --enable-maintainer-mode was given.
2767if test "${enable_maintainer_mode+set}" = set; then :
2768 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2769else
2770 USE_MAINTAINER_MODE=no
2771fi
2772
2773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
2774$as_echo "$USE_MAINTAINER_MODE" >&6; }
2775 if test $USE_MAINTAINER_MODE = yes; then
2776 MAINTAINER_MODE_TRUE=
2777 MAINTAINER_MODE_FALSE='#'
2778else
2779 MAINTAINER_MODE_TRUE='#'
2780 MAINTAINER_MODE_FALSE=
2781fi
2782
2783 MAINT=$MAINTAINER_MODE_TRUE
2784
2785
2786
17ef446e 2787# Set the 'development' global.
270c9937 2788. $srcdir/../bfd/development.sh
f5f1cdb6 2789
81ecdfbb
RW
2790ac_ext=c
2791ac_cpp='$CPP $CPPFLAGS'
2792ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2793ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2794ac_compiler_gnu=$ac_cv_c_compiler_gnu
2795if test -n "$ac_tool_prefix"; then
2796 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2797set dummy ${ac_tool_prefix}gcc; ac_word=$2
2798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2799$as_echo_n "checking for $ac_word... " >&6; }
2800if test "${ac_cv_prog_CC+set}" = set; then :
2801 $as_echo_n "(cached) " >&6
c906108c
SS
2802else
2803 if test -n "$CC"; then
2804 ac_cv_prog_CC="$CC" # Let the user override the test.
2805else
bec39cab
AC
2806as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2807for as_dir in $PATH
2808do
2809 IFS=$as_save_IFS
2810 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2811 for ac_exec_ext in '' $ac_executable_extensions; do
2812 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2813 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2814 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2815 break 2
2816 fi
2817done
81ecdfbb
RW
2818 done
2819IFS=$as_save_IFS
bec39cab 2820
c906108c
SS
2821fi
2822fi
bec39cab 2823CC=$ac_cv_prog_CC
c906108c 2824if test -n "$CC"; then
81ecdfbb
RW
2825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2826$as_echo "$CC" >&6; }
c906108c 2827else
81ecdfbb
RW
2828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2829$as_echo "no" >&6; }
c906108c
SS
2830fi
2831
81ecdfbb 2832
b4e70030
JB
2833fi
2834if test -z "$ac_cv_prog_CC"; then
2835 ac_ct_CC=$CC
81ecdfbb
RW
2836 # Extract the first word of "gcc", so it can be a program name with args.
2837set dummy gcc; ac_word=$2
2838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2839$as_echo_n "checking for $ac_word... " >&6; }
2840if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
2841 $as_echo_n "(cached) " >&6
b4e70030
JB
2842else
2843 if test -n "$ac_ct_CC"; then
2844 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2845else
2846as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2847for as_dir in $PATH
2848do
2849 IFS=$as_save_IFS
2850 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2851 for ac_exec_ext in '' $ac_executable_extensions; do
2852 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2853 ac_cv_prog_ac_ct_CC="gcc"
2854 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b4e70030 2855 break 2
4e8d927d 2856 fi
b4e70030 2857done
81ecdfbb
RW
2858 done
2859IFS=$as_save_IFS
b4e70030
JB
2860
2861fi
2862fi
2863ac_ct_CC=$ac_cv_prog_ac_ct_CC
2864if test -n "$ac_ct_CC"; then
81ecdfbb
RW
2865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2866$as_echo "$ac_ct_CC" >&6; }
b4e70030 2867else
81ecdfbb
RW
2868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2869$as_echo "no" >&6; }
b4e70030
JB
2870fi
2871
81ecdfbb
RW
2872 if test "x$ac_ct_CC" = x; then
2873 CC=""
2874 else
2875 case $cross_compiling:$ac_tool_warned in
2876yes:)
2877{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2878$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2879ac_tool_warned=yes ;;
2880esac
2881 CC=$ac_ct_CC
2882 fi
b4e70030
JB
2883else
2884 CC="$ac_cv_prog_CC"
2885fi
2886
c906108c 2887if test -z "$CC"; then
81ecdfbb
RW
2888 if test -n "$ac_tool_prefix"; then
2889 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2890set dummy ${ac_tool_prefix}cc; ac_word=$2
2891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2892$as_echo_n "checking for $ac_word... " >&6; }
2893if test "${ac_cv_prog_CC+set}" = set; then :
2894 $as_echo_n "(cached) " >&6
c906108c
SS
2895else
2896 if test -n "$CC"; then
2897 ac_cv_prog_CC="$CC" # Let the user override the test.
2898else
bec39cab
AC
2899as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2900for as_dir in $PATH
2901do
2902 IFS=$as_save_IFS
2903 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2904 for ac_exec_ext in '' $ac_executable_extensions; do
2905 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2906 ac_cv_prog_CC="${ac_tool_prefix}cc"
2907 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2908 break 2
2909 fi
2910done
81ecdfbb
RW
2911 done
2912IFS=$as_save_IFS
2913
2914fi
2915fi
2916CC=$ac_cv_prog_CC
2917if test -n "$CC"; then
2918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2919$as_echo "$CC" >&6; }
2920else
2921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2922$as_echo "no" >&6; }
2923fi
2924
2925
2926 fi
2927fi
2928if test -z "$CC"; then
2929 # Extract the first word of "cc", so it can be a program name with args.
2930set dummy cc; ac_word=$2
2931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2932$as_echo_n "checking for $ac_word... " >&6; }
2933if test "${ac_cv_prog_CC+set}" = set; then :
2934 $as_echo_n "(cached) " >&6
2935else
2936 if test -n "$CC"; then
2937 ac_cv_prog_CC="$CC" # Let the user override the test.
2938else
2939 ac_prog_rejected=no
2940as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2941for as_dir in $PATH
2942do
2943 IFS=$as_save_IFS
2944 test -z "$as_dir" && as_dir=.
2945 for ac_exec_ext in '' $ac_executable_extensions; do
2946 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2947 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2948 ac_prog_rejected=yes
2949 continue
2950 fi
2951 ac_cv_prog_CC="cc"
2952 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2953 break 2
2954 fi
2955done
2956 done
2957IFS=$as_save_IFS
bec39cab 2958
c906108c
SS
2959if test $ac_prog_rejected = yes; then
2960 # We found a bogon in the path, so make sure we never use it.
2961 set dummy $ac_cv_prog_CC
2962 shift
bec39cab 2963 if test $# != 0; then
c906108c
SS
2964 # We chose a different compiler from the bogus one.
2965 # However, it has the same basename, so the bogon will be chosen
2966 # first if we set CC to just the basename; use the full file name.
2967 shift
bec39cab 2968 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
c906108c
SS
2969 fi
2970fi
2971fi
2972fi
bec39cab 2973CC=$ac_cv_prog_CC
c906108c 2974if test -n "$CC"; then
81ecdfbb
RW
2975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2976$as_echo "$CC" >&6; }
c906108c 2977else
81ecdfbb
RW
2978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2979$as_echo "no" >&6; }
c906108c
SS
2980fi
2981
81ecdfbb 2982
bec39cab
AC
2983fi
2984if test -z "$CC"; then
2985 if test -n "$ac_tool_prefix"; then
81ecdfbb 2986 for ac_prog in cl.exe
bec39cab
AC
2987 do
2988 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2989set dummy $ac_tool_prefix$ac_prog; ac_word=$2
81ecdfbb
RW
2990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2991$as_echo_n "checking for $ac_word... " >&6; }
2992if test "${ac_cv_prog_CC+set}" = set; then :
2993 $as_echo_n "(cached) " >&6
c906108c
SS
2994else
2995 if test -n "$CC"; then
2996 ac_cv_prog_CC="$CC" # Let the user override the test.
2997else
bec39cab
AC
2998as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2999for as_dir in $PATH
3000do
3001 IFS=$as_save_IFS
3002 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
3003 for ac_exec_ext in '' $ac_executable_extensions; do
3004 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 3005 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
81ecdfbb 3006 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
3007 break 2
3008 fi
3009done
81ecdfbb
RW
3010 done
3011IFS=$as_save_IFS
bec39cab 3012
c906108c
SS
3013fi
3014fi
bec39cab 3015CC=$ac_cv_prog_CC
c906108c 3016if test -n "$CC"; then
81ecdfbb
RW
3017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3018$as_echo "$CC" >&6; }
c906108c 3019else
81ecdfbb
RW
3020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3021$as_echo "no" >&6; }
c906108c 3022fi
bec39cab 3023
81ecdfbb 3024
bec39cab
AC
3025 test -n "$CC" && break
3026 done
3027fi
3028if test -z "$CC"; then
3029 ac_ct_CC=$CC
81ecdfbb 3030 for ac_prog in cl.exe
bec39cab
AC
3031do
3032 # Extract the first word of "$ac_prog", so it can be a program name with args.
3033set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
3034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3035$as_echo_n "checking for $ac_word... " >&6; }
3036if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3037 $as_echo_n "(cached) " >&6
bec39cab
AC
3038else
3039 if test -n "$ac_ct_CC"; then
3040 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3041else
3042as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3043for as_dir in $PATH
3044do
3045 IFS=$as_save_IFS
3046 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
3047 for ac_exec_ext in '' $ac_executable_extensions; do
3048 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 3049 ac_cv_prog_ac_ct_CC="$ac_prog"
81ecdfbb 3050 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab 3051 break 2
c906108c 3052 fi
bec39cab 3053done
81ecdfbb
RW
3054 done
3055IFS=$as_save_IFS
bec39cab
AC
3056
3057fi
3058fi
3059ac_ct_CC=$ac_cv_prog_ac_ct_CC
3060if test -n "$ac_ct_CC"; then
81ecdfbb
RW
3061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3062$as_echo "$ac_ct_CC" >&6; }
bec39cab 3063else
81ecdfbb
RW
3064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3065$as_echo "no" >&6; }
c906108c
SS
3066fi
3067
81ecdfbb 3068
bec39cab
AC
3069 test -n "$ac_ct_CC" && break
3070done
c906108c 3071
81ecdfbb
RW
3072 if test "x$ac_ct_CC" = x; then
3073 CC=""
3074 else
3075 case $cross_compiling:$ac_tool_warned in
3076yes:)
3077{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3078$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3079ac_tool_warned=yes ;;
3080esac
3081 CC=$ac_ct_CC
3082 fi
bec39cab
AC
3083fi
3084
3085fi
3086
3087
81ecdfbb
RW
3088test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3089$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3090as_fn_error "no acceptable C compiler found in \$PATH
3091See \`config.log' for more details." "$LINENO" 5; }
bec39cab
AC
3092
3093# Provide some information about the compiler.
81ecdfbb
RW
3094$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3095set X $ac_compile
3096ac_compiler=$2
3097for ac_option in --version -v -V -qversion; do
3098 { { ac_try="$ac_compiler $ac_option >&5"
3099case "(($ac_try" in
3100 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3101 *) ac_try_echo=$ac_try;;
3102esac
3103eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3104$as_echo "$ac_try_echo"; } >&5
3105 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
bec39cab 3106 ac_status=$?
81ecdfbb
RW
3107 if test -s conftest.err; then
3108 sed '10a\
3109... rest of stderr output deleted ...
3110 10q' conftest.err >conftest.er1
3111 cat conftest.er1 >&5
3112 rm -f conftest.er1 conftest.err
3113 fi
3114 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3115 test $ac_status = 0; }
3116done
bec39cab 3117
81ecdfbb 3118cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3119/* end confdefs.h. */
3120
3121int
3122main ()
3123{
3124
3125 ;
3126 return 0;
3127}
3128_ACEOF
3129ac_clean_files_save=$ac_clean_files
81ecdfbb 3130ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out"
bec39cab
AC
3131# Try to create an executable without -o first, disregard a.out.
3132# It will help us diagnose broken compilers, and finding out an intuition
3133# of exeext.
81ecdfbb
RW
3134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3135$as_echo_n "checking for C compiler default output file name... " >&6; }
3136ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3137
3138# The possible output files:
3139ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3140
3141ac_rmfiles=
3142for ac_file in $ac_files
3143do
3144 case $ac_file in
3145 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3146 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3147 esac
3148done
3149rm -f $ac_rmfiles
3150
3151if { { ac_try="$ac_link_default"
3152case "(($ac_try" in
3153 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3154 *) ac_try_echo=$ac_try;;
3155esac
3156eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3157$as_echo "$ac_try_echo"; } >&5
3158 (eval "$ac_link_default") 2>&5
3159 ac_status=$?
3160 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3161 test $ac_status = 0; }; then :
3162 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3163# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3164# in a Makefile. We should not override ac_cv_exeext if it was cached,
3165# so that the user can short-circuit this test for compilers unknown to
3166# Autoconf.
3167for ac_file in $ac_files ''
bec39cab
AC
3168do
3169 test -f "$ac_file" || continue
3170 case $ac_file in
81ecdfbb 3171 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
b4e70030
JB
3172 ;;
3173 [ab].out )
3174 # We found the default executable, but exeext='' is most
3175 # certainly right.
3176 break;;
3177 *.* )
81ecdfbb
RW
3178 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3179 then :; else
3180 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3181 fi
3182 # We set ac_cv_exeext here because the later test for it is not
3183 # safe: cross compilers may not add the suffix if given an `-o'
3184 # argument, so we may need to know it at that point already.
3185 # Even if this section looks crufty: it has the advantage of
3186 # actually working.
b4e70030
JB
3187 break;;
3188 * )
3189 break;;
bec39cab
AC
3190 esac
3191done
81ecdfbb
RW
3192test "$ac_cv_exeext" = no && ac_cv_exeext=
3193
bec39cab 3194else
81ecdfbb
RW
3195 ac_file=''
3196fi
3197{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3198$as_echo "$ac_file" >&6; }
3199if test -z "$ac_file"; then :
3200 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3201sed 's/^/| /' conftest.$ac_ext >&5
3202
81ecdfbb
RW
3203{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3204$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3205{ as_fn_set_status 77
3206as_fn_error "C compiler cannot create executables
3207See \`config.log' for more details." "$LINENO" 5; }; }
bec39cab 3208fi
b4e70030 3209ac_exeext=$ac_cv_exeext
b4e70030 3210
81ecdfbb 3211# Check that the compiler produces executables we can run. If not, either
bec39cab 3212# the compiler is broken, or we cross compile.
81ecdfbb
RW
3213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3214$as_echo_n "checking whether the C compiler works... " >&6; }
bec39cab
AC
3215# If not cross compiling, check that we can run a simple program.
3216if test "$cross_compiling" != yes; then
3217 if { ac_try='./$ac_file'
81ecdfbb
RW
3218 { { case "(($ac_try" in
3219 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3220 *) ac_try_echo=$ac_try;;
3221esac
3222eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3223$as_echo "$ac_try_echo"; } >&5
3224 (eval "$ac_try") 2>&5
bec39cab 3225 ac_status=$?
81ecdfbb
RW
3226 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3227 test $ac_status = 0; }; }; then
bec39cab 3228 cross_compiling=no
c906108c 3229 else
bec39cab
AC
3230 if test "$cross_compiling" = maybe; then
3231 cross_compiling=yes
3232 else
81ecdfbb
RW
3233 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3234$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3235as_fn_error "cannot run C compiled programs.
bec39cab 3236If you meant to cross compile, use \`--host'.
81ecdfbb 3237See \`config.log' for more details." "$LINENO" 5; }
bec39cab 3238 fi
c906108c 3239 fi
bec39cab 3240fi
81ecdfbb
RW
3241{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3242$as_echo "yes" >&6; }
bec39cab 3243
81ecdfbb 3244rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out
b4e70030 3245ac_clean_files=$ac_clean_files_save
81ecdfbb 3246# Check that the compiler produces executables we can run. If not, either
b4e70030 3247# the compiler is broken, or we cross compile.
81ecdfbb
RW
3248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3249$as_echo_n "checking whether we are cross compiling... " >&6; }
3250{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3251$as_echo "$cross_compiling" >&6; }
3252
3253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3254$as_echo_n "checking for suffix of executables... " >&6; }
3255if { { ac_try="$ac_link"
3256case "(($ac_try" in
3257 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3258 *) ac_try_echo=$ac_try;;
3259esac
3260eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3261$as_echo "$ac_try_echo"; } >&5
3262 (eval "$ac_link") 2>&5
bec39cab 3263 ac_status=$?
81ecdfbb
RW
3264 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3265 test $ac_status = 0; }; then :
b4e70030
JB
3266 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3267# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3268# work properly (i.e., refer to `conftest.exe'), while it won't with
3269# `rm'.
3270for ac_file in conftest.exe conftest conftest.*; do
3271 test -f "$ac_file" || continue
3272 case $ac_file in
81ecdfbb 3273 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
b4e70030 3274 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
b4e70030
JB
3275 break;;
3276 * ) break;;
3277 esac
3278done
c906108c 3279else
81ecdfbb
RW
3280 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3281$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3282as_fn_error "cannot compute suffix of executables: cannot compile and link
3283See \`config.log' for more details." "$LINENO" 5; }
c906108c 3284fi
b4e70030 3285rm -f conftest$ac_cv_exeext
81ecdfbb
RW
3286{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3287$as_echo "$ac_cv_exeext" >&6; }
c906108c 3288
b4e70030 3289rm -f conftest.$ac_ext
bec39cab
AC
3290EXEEXT=$ac_cv_exeext
3291ac_exeext=$EXEEXT
81ecdfbb
RW
3292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3293$as_echo_n "checking for suffix of object files... " >&6; }
3294if test "${ac_cv_objext+set}" = set; then :
3295 $as_echo_n "(cached) " >&6
bec39cab 3296else
81ecdfbb 3297 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
3298/* end confdefs.h. */
3299
3300int
3301main ()
3302{
3303
3304 ;
3305 return 0;
3306}
3307_ACEOF
3308rm -f conftest.o conftest.obj
81ecdfbb
RW
3309if { { ac_try="$ac_compile"
3310case "(($ac_try" in
3311 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3312 *) ac_try_echo=$ac_try;;
3313esac
3314eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3315$as_echo "$ac_try_echo"; } >&5
3316 (eval "$ac_compile") 2>&5
3317 ac_status=$?
3318 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3319 test $ac_status = 0; }; then :
3320 for ac_file in conftest.o conftest.obj conftest.*; do
3321 test -f "$ac_file" || continue;
bec39cab 3322 case $ac_file in
81ecdfbb 3323 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
bec39cab
AC
3324 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3325 break;;
3326 esac
3327done
c906108c 3328else
81ecdfbb 3329 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3330sed 's/^/| /' conftest.$ac_ext >&5
3331
81ecdfbb
RW
3332{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3333$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3334as_fn_error "cannot compute suffix of object files: cannot compile
3335See \`config.log' for more details." "$LINENO" 5; }
c906108c 3336fi
b4e70030 3337rm -f conftest.$ac_cv_objext conftest.$ac_ext
bec39cab 3338fi
81ecdfbb
RW
3339{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3340$as_echo "$ac_cv_objext" >&6; }
bec39cab
AC
3341OBJEXT=$ac_cv_objext
3342ac_objext=$OBJEXT
81ecdfbb
RW
3343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3344$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3345if test "${ac_cv_c_compiler_gnu+set}" = set; then :
3346 $as_echo_n "(cached) " >&6
c906108c 3347else
81ecdfbb 3348 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3349/* end confdefs.h. */
3350
3351int
3352main ()
3353{
3354#ifndef __GNUC__
3355 choke me
3356#endif
3357
3358 ;
3359 return 0;
3360}
3361_ACEOF
81ecdfbb 3362if ac_fn_c_try_compile "$LINENO"; then :
bec39cab
AC
3363 ac_compiler_gnu=yes
3364else
81ecdfbb 3365 ac_compiler_gnu=no
bec39cab 3366fi
81ecdfbb 3367rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab
AC
3368ac_cv_c_compiler_gnu=$ac_compiler_gnu
3369
3370fi
81ecdfbb
RW
3371{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3372$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3373if test $ac_compiler_gnu = yes; then
3374 GCC=yes
3375else
3376 GCC=
3377fi
bec39cab
AC
3378ac_test_CFLAGS=${CFLAGS+set}
3379ac_save_CFLAGS=$CFLAGS
81ecdfbb
RW
3380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3381$as_echo_n "checking whether $CC accepts -g... " >&6; }
3382if test "${ac_cv_prog_cc_g+set}" = set; then :
3383 $as_echo_n "(cached) " >&6
bec39cab 3384else
81ecdfbb
RW
3385 ac_save_c_werror_flag=$ac_c_werror_flag
3386 ac_c_werror_flag=yes
3387 ac_cv_prog_cc_g=no
3388 CFLAGS="-g"
3389 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3390/* end confdefs.h. */
3391
3392int
3393main ()
3394{
3395
3396 ;
3397 return 0;
3398}
3399_ACEOF
81ecdfbb 3400if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
3401 ac_cv_prog_cc_g=yes
3402else
81ecdfbb
RW
3403 CFLAGS=""
3404 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3405/* end confdefs.h. */
3406
3407int
3408main ()
3409{
3410
3411 ;
3412 return 0;
3413}
3414_ACEOF
3415if ac_fn_c_try_compile "$LINENO"; then :
3416
3417else
3418 ac_c_werror_flag=$ac_save_c_werror_flag
3419 CFLAGS="-g"
3420 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3421/* end confdefs.h. */
3422
3423int
3424main ()
3425{
c906108c 3426
81ecdfbb
RW
3427 ;
3428 return 0;
3429}
3430_ACEOF
3431if ac_fn_c_try_compile "$LINENO"; then :
3432 ac_cv_prog_cc_g=yes
3433fi
3434rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3435fi
3436rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4e8d927d 3437fi
81ecdfbb
RW
3438rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3439 ac_c_werror_flag=$ac_save_c_werror_flag
bec39cab 3440fi
81ecdfbb
RW
3441{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3442$as_echo "$ac_cv_prog_cc_g" >&6; }
c906108c 3443if test "$ac_test_CFLAGS" = set; then
bec39cab 3444 CFLAGS=$ac_save_CFLAGS
c906108c
SS
3445elif test $ac_cv_prog_cc_g = yes; then
3446 if test "$GCC" = yes; then
3447 CFLAGS="-g -O2"
3448 else
3449 CFLAGS="-g"
3450 fi
3451else
3452 if test "$GCC" = yes; then
3453 CFLAGS="-O2"
3454 else
3455 CFLAGS=
3456 fi
3457fi
81ecdfbb
RW
3458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3459$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3460if test "${ac_cv_prog_cc_c89+set}" = set; then :
3461 $as_echo_n "(cached) " >&6
bec39cab 3462else
81ecdfbb 3463 ac_cv_prog_cc_c89=no
bec39cab 3464ac_save_CC=$CC
81ecdfbb 3465cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3466/* end confdefs.h. */
c906108c
SS
3467#include <stdarg.h>
3468#include <stdio.h>
3469#include <sys/types.h>
3470#include <sys/stat.h>
3471/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3472struct buf { int x; };
3473FILE * (*rcsopen) (struct buf *, struct stat *, int);
3474static char *e (p, i)
3475 char **p;
3476 int i;
3477{
3478 return p[i];
3479}
3480static char *f (char * (*g) (char **, int), char **p, ...)
3481{
3482 char *s;
3483 va_list v;
3484 va_start (v,p);
3485 s = g (p, va_arg (v,int));
3486 va_end (v);
3487 return s;
3488}
bec39cab
AC
3489
3490/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3491 function prototypes and stuff, but not '\xHH' hex character constants.
3492 These don't provoke an error unfortunately, instead are silently treated
81ecdfbb 3493 as 'x'. The following induces an error, until -std is added to get
bec39cab
AC
3494 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3495 array size at least. It's necessary to write '\x00'==0 to get something
81ecdfbb 3496 that's true only with -std. */
bec39cab
AC
3497int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3498
81ecdfbb
RW
3499/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3500 inside strings and character constants. */
3501#define FOO(x) 'x'
3502int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3503
c906108c
SS
3504int test (int i, double x);
3505struct s1 {int (*f) (int a);};
3506struct s2 {int (*f) (double a);};
3507int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3508int argc;
3509char **argv;
bec39cab
AC
3510int
3511main ()
3512{
c906108c 3513return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
bec39cab
AC
3514 ;
3515 return 0;
3516}
3517_ACEOF
81ecdfbb
RW
3518for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3519 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
bec39cab
AC
3520do
3521 CC="$ac_save_CC $ac_arg"
81ecdfbb
RW
3522 if ac_fn_c_try_compile "$LINENO"; then :
3523 ac_cv_prog_cc_c89=$ac_arg
c906108c 3524fi
81ecdfbb
RW
3525rm -f core conftest.err conftest.$ac_objext
3526 test "x$ac_cv_prog_cc_c89" != "xno" && break
c906108c 3527done
81ecdfbb 3528rm -f conftest.$ac_ext
bec39cab 3529CC=$ac_save_CC
c906108c
SS
3530
3531fi
81ecdfbb
RW
3532# AC_CACHE_VAL
3533case "x$ac_cv_prog_cc_c89" in
3534 x)
3535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3536$as_echo "none needed" >&6; } ;;
3537 xno)
3538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3539$as_echo "unsupported" >&6; } ;;
bec39cab 3540 *)
81ecdfbb
RW
3541 CC="$CC $ac_cv_prog_cc_c89"
3542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3543$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
c906108c 3544esac
81ecdfbb 3545if test "x$ac_cv_prog_cc_c89" != xno; then :
c906108c 3546
b4e70030
JB
3547fi
3548
bec39cab
AC
3549ac_ext=c
3550ac_cpp='$CPP $CPPFLAGS'
3551ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3552ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3553ac_compiler_gnu=$ac_cv_c_compiler_gnu
c906108c 3554
3bc3d82a
PA
3555ac_ext=cpp
3556ac_cpp='$CXXCPP $CPPFLAGS'
3557ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3558ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3559ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3560if test -z "$CXX"; then
3561 if test -n "$CCC"; then
3562 CXX=$CCC
3563 else
3564 if test -n "$ac_tool_prefix"; then
3565 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3566 do
3567 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3568set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3570$as_echo_n "checking for $ac_word... " >&6; }
3571if test "${ac_cv_prog_CXX+set}" = set; then :
3572 $as_echo_n "(cached) " >&6
3573else
3574 if test -n "$CXX"; then
3575 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3576else
3577as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3578for as_dir in $PATH
3579do
3580 IFS=$as_save_IFS
3581 test -z "$as_dir" && as_dir=.
3582 for ac_exec_ext in '' $ac_executable_extensions; do
3583 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3584 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3585 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3586 break 2
3587 fi
3588done
3589 done
3590IFS=$as_save_IFS
3591
3592fi
3593fi
3594CXX=$ac_cv_prog_CXX
3595if test -n "$CXX"; then
3596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
3597$as_echo "$CXX" >&6; }
3598else
3599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3600$as_echo "no" >&6; }
3601fi
3602
3603
3604 test -n "$CXX" && break
3605 done
3606fi
3607if test -z "$CXX"; then
3608 ac_ct_CXX=$CXX
3609 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3610do
3611 # Extract the first word of "$ac_prog", so it can be a program name with args.
3612set dummy $ac_prog; ac_word=$2
3613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3614$as_echo_n "checking for $ac_word... " >&6; }
3615if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
3616 $as_echo_n "(cached) " >&6
3617else
3618 if test -n "$ac_ct_CXX"; then
3619 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3620else
3621as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3622for as_dir in $PATH
3623do
3624 IFS=$as_save_IFS
3625 test -z "$as_dir" && as_dir=.
3626 for ac_exec_ext in '' $ac_executable_extensions; do
3627 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3628 ac_cv_prog_ac_ct_CXX="$ac_prog"
3629 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3630 break 2
3631 fi
3632done
3633 done
3634IFS=$as_save_IFS
3635
3636fi
3637fi
3638ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3639if test -n "$ac_ct_CXX"; then
3640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
3641$as_echo "$ac_ct_CXX" >&6; }
3642else
3643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3644$as_echo "no" >&6; }
3645fi
3646
3647
3648 test -n "$ac_ct_CXX" && break
3649done
3650
3651 if test "x$ac_ct_CXX" = x; then
3652 CXX="g++"
3653 else
3654 case $cross_compiling:$ac_tool_warned in
3655yes:)
3656{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3657$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3658ac_tool_warned=yes ;;
3659esac
3660 CXX=$ac_ct_CXX
3661 fi
3662fi
3663
3664 fi
3665fi
3666# Provide some information about the compiler.
3667$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
3668set X $ac_compile
3669ac_compiler=$2
3670for ac_option in --version -v -V -qversion; do
3671 { { ac_try="$ac_compiler $ac_option >&5"
3672case "(($ac_try" in
3673 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3674 *) ac_try_echo=$ac_try;;
3675esac
3676eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3677$as_echo "$ac_try_echo"; } >&5
3678 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3679 ac_status=$?
3680 if test -s conftest.err; then
3681 sed '10a\
3682... rest of stderr output deleted ...
3683 10q' conftest.err >conftest.er1
3684 cat conftest.er1 >&5
3685 rm -f conftest.er1 conftest.err
3686 fi
3687 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3688 test $ac_status = 0; }
3689done
3690
3691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
3692$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
3693if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
3694 $as_echo_n "(cached) " >&6
3695else
3696 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3697/* end confdefs.h. */
3698
3699int
3700main ()
3701{
3702#ifndef __GNUC__
3703 choke me
3704#endif
3705
3706 ;
3707 return 0;
3708}
3709_ACEOF
3710if ac_fn_cxx_try_compile "$LINENO"; then :
3711 ac_compiler_gnu=yes
3712else
3713 ac_compiler_gnu=no
3714fi
3715rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3716ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3717
3718fi
3719{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
3720$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
3721if test $ac_compiler_gnu = yes; then
3722 GXX=yes
3723else
3724 GXX=
3725fi
3726ac_test_CXXFLAGS=${CXXFLAGS+set}
3727ac_save_CXXFLAGS=$CXXFLAGS
3728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
3729$as_echo_n "checking whether $CXX accepts -g... " >&6; }
3730if test "${ac_cv_prog_cxx_g+set}" = set; then :
3731 $as_echo_n "(cached) " >&6
3732else
3733 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
3734 ac_cxx_werror_flag=yes
3735 ac_cv_prog_cxx_g=no
3736 CXXFLAGS="-g"
3737 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3738/* end confdefs.h. */
3739
3740int
3741main ()
3742{
3743
3744 ;
3745 return 0;
3746}
3747_ACEOF
3748if ac_fn_cxx_try_compile "$LINENO"; then :
3749 ac_cv_prog_cxx_g=yes
3750else
3751 CXXFLAGS=""
3752 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3753/* end confdefs.h. */
3754
3755int
3756main ()
3757{
3758
3759 ;
3760 return 0;
3761}
3762_ACEOF
3763if ac_fn_cxx_try_compile "$LINENO"; then :
3764
3765else
3766 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3767 CXXFLAGS="-g"
3768 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3769/* end confdefs.h. */
3770
3771int
3772main ()
3773{
3774
3775 ;
3776 return 0;
3777}
3778_ACEOF
3779if ac_fn_cxx_try_compile "$LINENO"; then :
3780 ac_cv_prog_cxx_g=yes
3781fi
3782rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3783fi
3784rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3785fi
3786rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3787 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3788fi
3789{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
3790$as_echo "$ac_cv_prog_cxx_g" >&6; }
3791if test "$ac_test_CXXFLAGS" = set; then
3792 CXXFLAGS=$ac_save_CXXFLAGS
3793elif test $ac_cv_prog_cxx_g = yes; then
3794 if test "$GXX" = yes; then
3795 CXXFLAGS="-g -O2"
3796 else
3797 CXXFLAGS="-g"
3798 fi
3799else
3800 if test "$GXX" = yes; then
3801 CXXFLAGS="-O2"
3802 else
3803 CXXFLAGS=
3804 fi
3805fi
3806ac_ext=c
3807ac_cpp='$CPP $CPPFLAGS'
3808ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3809ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3810ac_compiler_gnu=$ac_cv_c_compiler_gnu
3811
3812
60ca704f 3813
bec39cab
AC
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
81ecdfbb
RW
3819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3820$as_echo_n "checking how to run the C preprocessor... " >&6; }
bec39cab
AC
3821# On Suns, sometimes $CPP names a directory.
3822if test -n "$CPP" && test -d "$CPP"; then
3823 CPP=
8bb2c122 3824fi
bec39cab 3825if test -z "$CPP"; then
81ecdfbb
RW
3826 if test "${ac_cv_prog_CPP+set}" = set; then :
3827 $as_echo_n "(cached) " >&6
bec39cab
AC
3828else
3829 # Double quotes because CPP needs to be expanded
3830 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3831 do
3832 ac_preproc_ok=false
3833for ac_c_preproc_warn_flag in '' yes
3834do
3835 # Use a header file that comes with gcc, so configuring glibc
3836 # with a fresh cross-compiler works.
3837 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3838 # <limits.h> exists even on freestanding compilers.
3839 # On the NeXT, cc -E runs the code through the compiler's parser,
3840 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3841 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3842/* end confdefs.h. */
3843#ifdef __STDC__
3844# include <limits.h>
3845#else
3846# include <assert.h>
3847#endif
3848 Syntax error
3849_ACEOF
81ecdfbb 3850if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3851
81ecdfbb 3852else
bec39cab
AC
3853 # Broken: fails on valid input.
3854continue
3855fi
3856rm -f conftest.err conftest.$ac_ext
3857
81ecdfbb 3858 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3859 # can be detected and how.
81ecdfbb 3860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3861/* end confdefs.h. */
3862#include <ac_nonexistent.h>
3863_ACEOF
81ecdfbb 3864if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3865 # Broken: success on invalid input.
3866continue
8bb2c122 3867else
bec39cab
AC
3868 # Passes both tests.
3869ac_preproc_ok=:
3870break
8bb2c122 3871fi
bec39cab 3872rm -f conftest.err conftest.$ac_ext
8bb2c122 3873
bec39cab
AC
3874done
3875# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3876rm -f conftest.err conftest.$ac_ext
81ecdfbb 3877if $ac_preproc_ok; then :
bec39cab
AC
3878 break
3879fi
8bb2c122 3880
bec39cab
AC
3881 done
3882 ac_cv_prog_CPP=$CPP
ddc9cd0f 3883
c906108c 3884fi
bec39cab
AC
3885 CPP=$ac_cv_prog_CPP
3886else
3887 ac_cv_prog_CPP=$CPP
c906108c 3888fi
81ecdfbb
RW
3889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3890$as_echo "$CPP" >&6; }
bec39cab
AC
3891ac_preproc_ok=false
3892for ac_c_preproc_warn_flag in '' yes
3893do
3894 # Use a header file that comes with gcc, so configuring glibc
3895 # with a fresh cross-compiler works.
3896 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3897 # <limits.h> exists even on freestanding compilers.
3898 # On the NeXT, cc -E runs the code through the compiler's parser,
3899 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3900 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3901/* end confdefs.h. */
3902#ifdef __STDC__
3903# include <limits.h>
3904#else
3905# include <assert.h>
3906#endif
3907 Syntax error
3908_ACEOF
81ecdfbb 3909if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3910
81ecdfbb 3911else
bec39cab
AC
3912 # Broken: fails on valid input.
3913continue
3914fi
3915rm -f conftest.err conftest.$ac_ext
3916
81ecdfbb 3917 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3918 # can be detected and how.
81ecdfbb 3919 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3920/* end confdefs.h. */
3921#include <ac_nonexistent.h>
3922_ACEOF
81ecdfbb 3923if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3924 # Broken: success on invalid input.
3925continue
c906108c 3926else
bec39cab
AC
3927 # Passes both tests.
3928ac_preproc_ok=:
3929break
c906108c 3930fi
bec39cab 3931rm -f conftest.err conftest.$ac_ext
c906108c 3932
bec39cab
AC
3933done
3934# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3935rm -f conftest.err conftest.$ac_ext
81ecdfbb
RW
3936if $ac_preproc_ok; then :
3937
c906108c 3938else
81ecdfbb
RW
3939 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3940$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3941as_fn_error "C preprocessor \"$CPP\" fails sanity check
3942See \`config.log' for more details." "$LINENO" 5; }
c906108c 3943fi
c906108c 3944
bec39cab
AC
3945ac_ext=c
3946ac_cpp='$CPP $CPPFLAGS'
3947ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3948ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3949ac_compiler_gnu=$ac_cv_c_compiler_gnu
3950
3951
81ecdfbb
RW
3952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3953$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3954if test "${ac_cv_path_GREP+set}" = set; then :
3955 $as_echo_n "(cached) " >&6
4e8d927d 3956else
81ecdfbb
RW
3957 if test -z "$GREP"; then
3958 ac_path_GREP_found=false
3959 # Loop through the user's path and test for each of PROGNAME-LIST
3960 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3961for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3962do
3963 IFS=$as_save_IFS
3964 test -z "$as_dir" && as_dir=.
3965 for ac_prog in grep ggrep; do
3966 for ac_exec_ext in '' $ac_executable_extensions; do
3967 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3968 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3969# Check for GNU ac_path_GREP and select it if it is found.
3970 # Check for GNU $ac_path_GREP
3971case `"$ac_path_GREP" --version 2>&1` in
3972*GNU*)
3973 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3974*)
3975 ac_count=0
3976 $as_echo_n 0123456789 >"conftest.in"
3977 while :
3978 do
3979 cat "conftest.in" "conftest.in" >"conftest.tmp"
3980 mv "conftest.tmp" "conftest.in"
3981 cp "conftest.in" "conftest.nl"
3982 $as_echo 'GREP' >> "conftest.nl"
3983 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3984 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3985 as_fn_arith $ac_count + 1 && ac_count=$as_val
3986 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3987 # Best one so far, save it but keep looking for a better one
3988 ac_cv_path_GREP="$ac_path_GREP"
3989 ac_path_GREP_max=$ac_count
bec39cab 3990 fi
81ecdfbb
RW
3991 # 10*(2^10) chars as input seems more than enough
3992 test $ac_count -gt 10 && break
3993 done
3994 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3995esac
bec39cab 3996
81ecdfbb
RW
3997 $ac_path_GREP_found && break 3
3998 done
3999 done
4000 done
4001IFS=$as_save_IFS
4002 if test -z "$ac_cv_path_GREP"; then
4003 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4004 fi
c906108c 4005else
81ecdfbb 4006 ac_cv_path_GREP=$GREP
c906108c 4007fi
c906108c 4008
81ecdfbb
RW
4009fi
4010{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4011$as_echo "$ac_cv_path_GREP" >&6; }
4012 GREP="$ac_cv_path_GREP"
c906108c 4013
c906108c 4014
81ecdfbb
RW
4015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4016$as_echo_n "checking for egrep... " >&6; }
4017if test "${ac_cv_path_EGREP+set}" = set; then :
4018 $as_echo_n "(cached) " >&6
783e057b 4019else
81ecdfbb
RW
4020 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4021 then ac_cv_path_EGREP="$GREP -E"
4022 else
4023 if test -z "$EGREP"; then
4024 ac_path_EGREP_found=false
4025 # Loop through the user's path and test for each of PROGNAME-LIST
4026 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4027for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
783e057b
DJ
4028do
4029 IFS=$as_save_IFS
4030 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
4031 for ac_prog in egrep; do
4032 for ac_exec_ext in '' $ac_executable_extensions; do
4033 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4034 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4035# Check for GNU ac_path_EGREP and select it if it is found.
4036 # Check for GNU $ac_path_EGREP
4037case `"$ac_path_EGREP" --version 2>&1` in
4038*GNU*)
4039 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4040*)
4041 ac_count=0
4042 $as_echo_n 0123456789 >"conftest.in"
4043 while :
4044 do
4045 cat "conftest.in" "conftest.in" >"conftest.tmp"
4046 mv "conftest.tmp" "conftest.in"
4047 cp "conftest.in" "conftest.nl"
4048 $as_echo 'EGREP' >> "conftest.nl"
4049 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4050 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4051 as_fn_arith $ac_count + 1 && ac_count=$as_val
4052 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4053 # Best one so far, save it but keep looking for a better one
4054 ac_cv_path_EGREP="$ac_path_EGREP"
4055 ac_path_EGREP_max=$ac_count
4056 fi
4057 # 10*(2^10) chars as input seems more than enough
4058 test $ac_count -gt 10 && break
4059 done
4060 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4061esac
bec39cab 4062
81ecdfbb
RW
4063 $ac_path_EGREP_found && break 3
4064 done
4065 done
4066 done
4067IFS=$as_save_IFS
4068 if test -z "$ac_cv_path_EGREP"; then
4069 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
783e057b 4070 fi
783e057b 4071else
81ecdfbb 4072 ac_cv_path_EGREP=$EGREP
783e057b
DJ
4073fi
4074
81ecdfbb 4075 fi
783e057b 4076fi
81ecdfbb
RW
4077{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4078$as_echo "$ac_cv_path_EGREP" >&6; }
4079 EGREP="$ac_cv_path_EGREP"
4080
783e057b 4081
81ecdfbb
RW
4082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4083$as_echo_n "checking for ANSI C header files... " >&6; }
4084if test "${ac_cv_header_stdc+set}" = set; then :
4085 $as_echo_n "(cached) " >&6
783e057b 4086else
81ecdfbb 4087 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 4088/* end confdefs.h. */
783e057b 4089#include <stdlib.h>
bec39cab 4090#include <stdarg.h>
783e057b
DJ
4091#include <string.h>
4092#include <float.h>
c906108c 4093
bec39cab
AC
4094int
4095main ()
4096{
c906108c 4097
bec39cab
AC
4098 ;
4099 return 0;
4100}
4101_ACEOF
81ecdfbb 4102if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4103 ac_cv_header_stdc=yes
c906108c 4104else
81ecdfbb 4105 ac_cv_header_stdc=no
c906108c 4106fi
81ecdfbb 4107rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 4108
783e057b
DJ
4109if test $ac_cv_header_stdc = yes; then
4110 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
81ecdfbb 4111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4112/* end confdefs.h. */
4113#include <string.h>
c906108c 4114
783e057b
DJ
4115_ACEOF
4116if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4117 $EGREP "memchr" >/dev/null 2>&1; then :
4118
c906108c 4119else
783e057b 4120 ac_cv_header_stdc=no
c906108c 4121fi
783e057b 4122rm -f conftest*
c906108c
SS
4123
4124fi
4125
783e057b
DJ
4126if test $ac_cv_header_stdc = yes; then
4127 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
81ecdfbb 4128 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4129/* end confdefs.h. */
4130#include <stdlib.h>
bec39cab 4131
783e057b
DJ
4132_ACEOF
4133if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4134 $EGREP "free" >/dev/null 2>&1; then :
4135
bec39cab 4136else
783e057b 4137 ac_cv_header_stdc=no
bec39cab 4138fi
783e057b 4139rm -f conftest*
bec39cab
AC
4140
4141fi
bec39cab 4142
783e057b
DJ
4143if test $ac_cv_header_stdc = yes; then
4144 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
81ecdfbb 4145 if test "$cross_compiling" = yes; then :
783e057b 4146 :
bec39cab 4147else
81ecdfbb 4148 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4149/* end confdefs.h. */
4150#include <ctype.h>
81ecdfbb 4151#include <stdlib.h>
783e057b
DJ
4152#if ((' ' & 0x0FF) == 0x020)
4153# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4154# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4155#else
4156# define ISLOWER(c) \
4157 (('a' <= (c) && (c) <= 'i') \
4158 || ('j' <= (c) && (c) <= 'r') \
4159 || ('s' <= (c) && (c) <= 'z'))
4160# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4161#endif
4162
4163#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4164int
4165main ()
4166{
4167 int i;
4168 for (i = 0; i < 256; i++)
4169 if (XOR (islower (i), ISLOWER (i))
4170 || toupper (i) != TOUPPER (i))
81ecdfbb
RW
4171 return 2;
4172 return 0;
783e057b
DJ
4173}
4174_ACEOF
81ecdfbb 4175if ac_fn_c_try_run "$LINENO"; then :
783e057b 4176
81ecdfbb
RW
4177else
4178 ac_cv_header_stdc=no
783e057b 4179fi
81ecdfbb
RW
4180rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4181 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 4182fi
81ecdfbb 4183
783e057b
DJ
4184fi
4185fi
81ecdfbb
RW
4186{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4187$as_echo "$ac_cv_header_stdc" >&6; }
783e057b
DJ
4188if test $ac_cv_header_stdc = yes; then
4189
81ecdfbb 4190$as_echo "#define STDC_HEADERS 1" >>confdefs.h
783e057b
DJ
4191
4192fi
4193
4194# On IRIX 5.3, sys/types and inttypes.h are conflicting.
783e057b
DJ
4195for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4196 inttypes.h stdint.h unistd.h
81ecdfbb
RW
4197do :
4198 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4199ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4200"
4201eval as_val=\$$as_ac_Header
4202 if test "x$as_val" = x""yes; then :
783e057b 4203 cat >>confdefs.h <<_ACEOF
81ecdfbb 4204#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
783e057b
DJ
4205_ACEOF
4206
4207fi
4208
4209done
4210
4211
4212
81ecdfbb
RW
4213 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4214if test "x$ac_cv_header_minix_config_h" = x""yes; then :
783e057b
DJ
4215 MINIX=yes
4216else
4217 MINIX=
4218fi
4219
4220
4221 if test "$MINIX" = yes; then
4222
81ecdfbb 4223$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
783e057b
DJ
4224
4225
81ecdfbb 4226$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
783e057b
DJ
4227
4228
81ecdfbb 4229$as_echo "#define _MINIX 1" >>confdefs.h
783e057b
DJ
4230
4231 fi
4232
4233
81ecdfbb
RW
4234 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4235$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4236if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
4237 $as_echo_n "(cached) " >&6
783e057b 4238else
81ecdfbb 4239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4240/* end confdefs.h. */
4241
c971b7fa
PA
4242# define __EXTENSIONS__ 1
4243 $ac_includes_default
783e057b
DJ
4244int
4245main ()
4246{
4247
4248 ;
4249 return 0;
4250}
4251_ACEOF
81ecdfbb 4252if ac_fn_c_try_compile "$LINENO"; then :
783e057b
DJ
4253 ac_cv_safe_to_define___extensions__=yes
4254else
81ecdfbb 4255 ac_cv_safe_to_define___extensions__=no
783e057b 4256fi
81ecdfbb 4257rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b 4258fi
81ecdfbb
RW
4259{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4260$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
783e057b 4261 test $ac_cv_safe_to_define___extensions__ = yes &&
81ecdfbb 4262 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
783e057b 4263
81ecdfbb 4264 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
783e057b 4265
81ecdfbb 4266 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
783e057b 4267
81ecdfbb 4268 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
783e057b 4269
81ecdfbb 4270 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
783e057b
DJ
4271
4272
c971b7fa
PA
4273ac_aux_dir=
4274for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4275 for ac_t in install-sh install.sh shtool; do
4276 if test -f "$ac_dir/$ac_t"; then
4277 ac_aux_dir=$ac_dir
4278 ac_install_sh="$ac_aux_dir/$ac_t -c"
4279 break 2
4280 fi
4281 done
4282done
4283if test -z "$ac_aux_dir"; then
4284 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
4285fi
770d76d7 4286
c971b7fa
PA
4287# These three variables are undocumented and unsupported,
4288# and are intended to be withdrawn in a future Autoconf release.
4289# They can cause serious problems if a builder's source tree is in a directory
4290# whose full name contains unusual characters.
4291ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4292ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4293ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
770d76d7 4294
770d76d7 4295
c971b7fa
PA
4296# Make sure we can run config.sub.
4297$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
4298 as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
770d76d7 4299
c971b7fa
PA
4300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4301$as_echo_n "checking build system type... " >&6; }
4302if test "${ac_cv_build+set}" = set; then :
4303 $as_echo_n "(cached) " >&6
770d76d7 4304else
c971b7fa
PA
4305 ac_build_alias=$build_alias
4306test "x$ac_build_alias" = x &&
4307 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4308test "x$ac_build_alias" = x &&
4309 as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
4310ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
4311 as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
4312
770d76d7 4313fi
c971b7fa
PA
4314{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4315$as_echo "$ac_cv_build" >&6; }
4316case $ac_cv_build in
4317*-*-*) ;;
4318*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
770d76d7 4319esac
c971b7fa
PA
4320build=$ac_cv_build
4321ac_save_IFS=$IFS; IFS='-'
4322set x $ac_cv_build
4323shift
4324build_cpu=$1
4325build_vendor=$2
4326shift; shift
4327# Remember, the first character of IFS is used to create $*,
4328# except with old shells:
4329build_os=$*
4330IFS=$ac_save_IFS
4331case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
770d76d7
PA
4332
4333
c971b7fa
PA
4334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4335$as_echo_n "checking host system type... " >&6; }
4336if test "${ac_cv_host+set}" = set; then :
81ecdfbb
RW
4337 $as_echo_n "(cached) " >&6
4338else
c971b7fa
PA
4339 if test "x$host_alias" = x; then
4340 ac_cv_host=$ac_cv_build
81ecdfbb 4341else
c971b7fa
PA
4342 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
4343 as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
81ecdfbb 4344fi
81ecdfbb
RW
4345
4346fi
c971b7fa
PA
4347{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4348$as_echo "$ac_cv_host" >&6; }
4349case $ac_cv_host in
4350*-*-*) ;;
4351*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
81ecdfbb 4352esac
c971b7fa
PA
4353host=$ac_cv_host
4354ac_save_IFS=$IFS; IFS='-'
4355set x $ac_cv_host
4356shift
4357host_cpu=$1
4358host_vendor=$2
4359shift; shift
4360# Remember, the first character of IFS is used to create $*,
4361# except with old shells:
4362host_os=$*
4363IFS=$ac_save_IFS
4364case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3388710e
JM
4365
4366
4367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4368$as_echo_n "checking target system type... " >&6; }
4369if test "${ac_cv_target+set}" = set; then :
4370 $as_echo_n "(cached) " >&6
4371else
4372 if test "x$target_alias" = x; then
4373 ac_cv_target=$ac_cv_host
4374else
4375 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
4376 as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
4377fi
4378
4379fi
4380{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4381$as_echo "$ac_cv_target" >&6; }
4382case $ac_cv_target in
4383*-*-*) ;;
4384*) as_fn_error "invalid value of canonical target" "$LINENO" 5;;
4385esac
4386target=$ac_cv_target
4387ac_save_IFS=$IFS; IFS='-'
4388set x $ac_cv_target
4389shift
4390target_cpu=$1
4391target_vendor=$2
4392shift; shift
4393# Remember, the first character of IFS is used to create $*,
4394# except with old shells:
4395target_os=$*
4396IFS=$ac_save_IFS
4397case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4398
4399
4400# The aliases save the names the user supplied, while $host etc.
4401# will get canonicalized.
4402test -n "$target_alias" &&
4403 test "$program_prefix$program_suffix$program_transform_name" = \
4404 NONENONEs,x,x, &&
4405 program_prefix=${target_alias}-
4406
4407# The tests for host and target for $enable_largefile require
4408# canonical names.
4409
4410
81ecdfbb 4411
da2f07f1
JK
4412# As the $enable_largefile decision depends on --enable-plugins we must set it
4413# even in directories otherwise not depending on the $plugins option.
4414
4415
2974be62
AM
4416 maybe_plugins=no
4417 for ac_header in dlfcn.h
4418do :
4419 ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
4420"
4421if test "x$ac_cv_header_dlfcn_h" = x""yes; then :
4422 cat >>confdefs.h <<_ACEOF
4423#define HAVE_DLFCN_H 1
4424_ACEOF
4425 maybe_plugins=yes
4426fi
4427
4428done
4429
4430 for ac_header in windows.h
4431do :
4432 ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
4433"
4434if test "x$ac_cv_header_windows_h" = x""yes; then :
4435 cat >>confdefs.h <<_ACEOF
4436#define HAVE_WINDOWS_H 1
4437_ACEOF
4438 maybe_plugins=yes
4439fi
4440
4441done
4442
4443
4444 # Check whether --enable-plugins was given.
da2f07f1
JK
4445if test "${enable_plugins+set}" = set; then :
4446 enableval=$enable_plugins; case "${enableval}" in
2974be62
AM
4447 no) plugins=no ;;
4448 *) plugins=yes
4449 if test "$maybe_plugins" != "yes" ; then
4450 as_fn_error "Building with plugin support requires a host that supports dlopen." "$LINENO" 5
4451 fi ;;
4452 esac
da2f07f1 4453else
2974be62
AM
4454 plugins=$maybe_plugins
4455
da2f07f1
JK
4456fi
4457
2974be62
AM
4458 if test "$plugins" = "yes"; then
4459 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
4460$as_echo_n "checking for library containing dlopen... " >&6; }
4461if test "${ac_cv_search_dlopen+set}" = set; then :
4462 $as_echo_n "(cached) " >&6
4463else
4464 ac_func_search_save_LIBS=$LIBS
4465cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4466/* end confdefs.h. */
4467
4468/* Override any GCC internal prototype to avoid an error.
4469 Use char because int might match the return type of a GCC
4470 builtin and then its argument prototype would still apply. */
4471#ifdef __cplusplus
4472extern "C"
4473#endif
4474char dlopen ();
4475int
4476main ()
4477{
4478return dlopen ();
4479 ;
4480 return 0;
4481}
4482_ACEOF
4483for ac_lib in '' dl; do
4484 if test -z "$ac_lib"; then
4485 ac_res="none required"
4486 else
4487 ac_res=-l$ac_lib
4488 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4489 fi
4490 if ac_fn_c_try_link "$LINENO"; then :
4491 ac_cv_search_dlopen=$ac_res
4492fi
4493rm -f core conftest.err conftest.$ac_objext \
4494 conftest$ac_exeext
4495 if test "${ac_cv_search_dlopen+set}" = set; then :
4496 break
4497fi
4498done
4499if test "${ac_cv_search_dlopen+set}" = set; then :
4500
4501else
4502 ac_cv_search_dlopen=no
4503fi
4504rm conftest.$ac_ext
4505LIBS=$ac_func_search_save_LIBS
4506fi
4507{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
4508$as_echo "$ac_cv_search_dlopen" >&6; }
4509ac_res=$ac_cv_search_dlopen
4510if test "$ac_res" != no; then :
4511 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4512
4513fi
4514
4515 fi
da2f07f1
JK
4516
4517
4518case "${host}" in
4519 sparc-*-solaris*|i[3-7]86-*-solaris*)
4520 # On native 32bit sparc and ia32 solaris, large-file and procfs support
4521 # are mutually exclusive; and without procfs support, the bfd/ elf module
4522 # cannot provide certain routines such as elfcore_write_prpsinfo
4523 # or elfcore_write_prstatus. So unless the user explicitly requested
4524 # large-file support through the --enable-largefile switch, disable
4525 # large-file support in favor of procfs support.
4526 test "${target}" = "${host}" -a "x$plugins" = xno \
4527 && : ${enable_largefile="no"}
4528 ;;
4529esac
4530
4531# Check whether --enable-largefile was given.
4532if test "${enable_largefile+set}" = set; then :
4533 enableval=$enable_largefile;
4534fi
4535
4536if test "$enable_largefile" != no; then
4537
4538 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4539$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
4540if test "${ac_cv_sys_largefile_CC+set}" = set; then :
4541 $as_echo_n "(cached) " >&6
4542else
4543 ac_cv_sys_largefile_CC=no
4544 if test "$GCC" != yes; then
4545 ac_save_CC=$CC
4546 while :; do
4547 # IRIX 6.2 and later do not support large files by default,
4548 # so use the C compiler's -n32 option if that helps.
4549 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4550/* end confdefs.h. */
4551#include <sys/types.h>
4552 /* Check that off_t can represent 2**63 - 1 correctly.
4553 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4554 since some C++ compilers masquerading as C compilers
4555 incorrectly reject 9223372036854775807. */
4556#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4557 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4558 && LARGE_OFF_T % 2147483647 == 1)
4559 ? 1 : -1];
4560int
4561main ()
4562{
4563
4564 ;
4565 return 0;
4566}
4567_ACEOF
4568 if ac_fn_c_try_compile "$LINENO"; then :
4569 break
4570fi
4571rm -f core conftest.err conftest.$ac_objext
4572 CC="$CC -n32"
4573 if ac_fn_c_try_compile "$LINENO"; then :
4574 ac_cv_sys_largefile_CC=' -n32'; break
4575fi
4576rm -f core conftest.err conftest.$ac_objext
4577 break
4578 done
4579 CC=$ac_save_CC
4580 rm -f conftest.$ac_ext
4581 fi
4582fi
4583{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4584$as_echo "$ac_cv_sys_largefile_CC" >&6; }
4585 if test "$ac_cv_sys_largefile_CC" != no; then
4586 CC=$CC$ac_cv_sys_largefile_CC
4587 fi
4588
4589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4590$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
4591if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
4592 $as_echo_n "(cached) " >&6
4593else
4594 while :; do
4595 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4596/* end confdefs.h. */
4597#include <sys/types.h>
4598 /* Check that off_t can represent 2**63 - 1 correctly.
4599 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4600 since some C++ compilers masquerading as C compilers
4601 incorrectly reject 9223372036854775807. */
4602#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4603 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4604 && LARGE_OFF_T % 2147483647 == 1)
4605 ? 1 : -1];
4606int
4607main ()
4608{
4609
4610 ;
4611 return 0;
4612}
4613_ACEOF
4614if ac_fn_c_try_compile "$LINENO"; then :
4615 ac_cv_sys_file_offset_bits=no; break
4616fi
4617rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4618 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4619/* end confdefs.h. */
4620#define _FILE_OFFSET_BITS 64
4621#include <sys/types.h>
4622 /* Check that off_t can represent 2**63 - 1 correctly.
4623 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4624 since some C++ compilers masquerading as C compilers
4625 incorrectly reject 9223372036854775807. */
4626#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4627 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4628 && LARGE_OFF_T % 2147483647 == 1)
4629 ? 1 : -1];
4630int
4631main ()
4632{
4633
4634 ;
4635 return 0;
4636}
4637_ACEOF
4638if ac_fn_c_try_compile "$LINENO"; then :
4639 ac_cv_sys_file_offset_bits=64; break
4640fi
4641rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4642 ac_cv_sys_file_offset_bits=unknown
4643 break
4644done
4645fi
4646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4647$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4648case $ac_cv_sys_file_offset_bits in #(
4649 no | unknown) ;;
4650 *)
4651cat >>confdefs.h <<_ACEOF
4652#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4653_ACEOF
4654;;
4655esac
4656rm -rf conftest*
4657 if test $ac_cv_sys_file_offset_bits = unknown; then
4658 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4659$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
4660if test "${ac_cv_sys_large_files+set}" = set; then :
4661 $as_echo_n "(cached) " >&6
4662else
4663 while :; do
4664 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4665/* end confdefs.h. */
4666#include <sys/types.h>
4667 /* Check that off_t can represent 2**63 - 1 correctly.
4668 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4669 since some C++ compilers masquerading as C compilers
4670 incorrectly reject 9223372036854775807. */
4671#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4672 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4673 && LARGE_OFF_T % 2147483647 == 1)
4674 ? 1 : -1];
4675int
4676main ()
4677{
4678
4679 ;
4680 return 0;
4681}
4682_ACEOF
4683if ac_fn_c_try_compile "$LINENO"; then :
4684 ac_cv_sys_large_files=no; break
4685fi
4686rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4687 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4688/* end confdefs.h. */
4689#define _LARGE_FILES 1
4690#include <sys/types.h>
4691 /* Check that off_t can represent 2**63 - 1 correctly.
4692 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4693 since some C++ compilers masquerading as C compilers
4694 incorrectly reject 9223372036854775807. */
4695#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4696 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4697 && LARGE_OFF_T % 2147483647 == 1)
4698 ? 1 : -1];
4699int
4700main ()
4701{
4702
4703 ;
4704 return 0;
4705}
4706_ACEOF
4707if ac_fn_c_try_compile "$LINENO"; then :
4708 ac_cv_sys_large_files=1; break
4709fi
4710rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4711 ac_cv_sys_large_files=unknown
4712 break
4713done
4714fi
4715{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4716$as_echo "$ac_cv_sys_large_files" >&6; }
4717case $ac_cv_sys_large_files in #(
4718 no | unknown) ;;
4719 *)
4720cat >>confdefs.h <<_ACEOF
4721#define _LARGE_FILES $ac_cv_sys_large_files
4722_ACEOF
4723;;
4724esac
4725rm -rf conftest*
4726 fi
4727fi
4728
4729
4730
81ecdfbb
RW
4731
4732
4733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5
4734$as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; }
4735if test "${am_cv_prog_cc_stdc+set}" = set; then :
4736 $as_echo_n "(cached) " >&6
4737else
4738 am_cv_prog_cc_stdc=no
4739ac_save_CC="$CC"
4740# Don't try gcc -ansi; that turns off useful extensions and
4741# breaks some systems' header files.
4742# AIX -qlanglvl=ansi
4743# Ultrix and OSF/1 -std1
4744# HP-UX 10.20 and later -Ae
4745# HP-UX older versions -Aa -D_HPUX_SOURCE
4746# SVR4 -Xc -D__EXTENSIONS__
4747for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4748do
783e057b 4749 CC="$ac_save_CC $ac_arg"
81ecdfbb 4750 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4751/* end confdefs.h. */
4752#include <stdarg.h>
4753#include <stdio.h>
4754#include <sys/types.h>
4755#include <sys/stat.h>
4756/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4757struct buf { int x; };
4758FILE * (*rcsopen) (struct buf *, struct stat *, int);
4759static char *e (p, i)
4760 char **p;
4761 int i;
4762{
4763 return p[i];
4764}
4765static char *f (char * (*g) (char **, int), char **p, ...)
4766{
4767 char *s;
4768 va_list v;
4769 va_start (v,p);
4770 s = g (p, va_arg (v,int));
4771 va_end (v);
4772 return s;
4773}
4774int test (int i, double x);
4775struct s1 {int (*f) (int a);};
4776struct s2 {int (*f) (double a);};
4777int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4778int argc;
4779char **argv;
4780
4781int
4782main ()
4783{
4784
4785return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4786
4787 ;
4788 return 0;
4789}
4790_ACEOF
81ecdfbb 4791if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4792 am_cv_prog_cc_stdc="$ac_arg"; break
783e057b 4793fi
81ecdfbb 4794rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
4795done
4796CC="$ac_save_CC"
4797
4798fi
4799
4800if test -z "$am_cv_prog_cc_stdc"; then
81ecdfbb
RW
4801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4802$as_echo "none needed" >&6; }
783e057b 4803else
81ecdfbb
RW
4804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5
4805$as_echo "$am_cv_prog_cc_stdc" >&6; }
783e057b
DJ
4806fi
4807case "x$am_cv_prog_cc_stdc" in
4808 x|xno) ;;
4809 *) CC="$CC $am_cv_prog_cc_stdc" ;;
4810esac
4811
4869db5e
RM
4812# expand $ac_aux_dir to an absolute path
4813am_aux_dir=`cd $ac_aux_dir && pwd`
4814
4815if test x"${install_sh}" != xset; then
4816 case $am_aux_dir in
4817 *\ * | *\ *)
4818 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
4819 *)
4820 install_sh="\${SHELL} $am_aux_dir/install-sh"
4821 esac
4822fi
4823
4824# Installed binaries are usually stripped using `strip' when the user
4825# run `make install-strip'. However `strip' might not be the right
4826# tool to use in cross-compilation environments, therefore Automake
4827# will honor the `STRIP' environment variable to overrule this program.
4828if test "$cross_compiling" != no; then
4829 if test -n "$ac_tool_prefix"; then
4830 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4831set dummy ${ac_tool_prefix}strip; ac_word=$2
4832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4833$as_echo_n "checking for $ac_word... " >&6; }
4834if test "${ac_cv_prog_STRIP+set}" = set; then :
4835 $as_echo_n "(cached) " >&6
4836else
4837 if test -n "$STRIP"; then
4838 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4839else
4840as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4841for as_dir in $PATH
4842do
4843 IFS=$as_save_IFS
4844 test -z "$as_dir" && as_dir=.
4845 for ac_exec_ext in '' $ac_executable_extensions; do
4846 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4847 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4848 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4849 break 2
4850 fi
4851done
4852 done
4853IFS=$as_save_IFS
4854
4855fi
4856fi
4857STRIP=$ac_cv_prog_STRIP
4858if test -n "$STRIP"; then
4859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
4860$as_echo "$STRIP" >&6; }
4861else
4862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4863$as_echo "no" >&6; }
4864fi
4865
4866
4867fi
4868if test -z "$ac_cv_prog_STRIP"; then
4869 ac_ct_STRIP=$STRIP
4870 # Extract the first word of "strip", so it can be a program name with args.
4871set dummy strip; ac_word=$2
4872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4873$as_echo_n "checking for $ac_word... " >&6; }
4874if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
4875 $as_echo_n "(cached) " >&6
4876else
4877 if test -n "$ac_ct_STRIP"; then
4878 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
4879else
4880as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4881for as_dir in $PATH
4882do
4883 IFS=$as_save_IFS
4884 test -z "$as_dir" && as_dir=.
4885 for ac_exec_ext in '' $ac_executable_extensions; do
4886 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4887 ac_cv_prog_ac_ct_STRIP="strip"
4888 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4889 break 2
4890 fi
4891done
4892 done
4893IFS=$as_save_IFS
4894
4895fi
4896fi
4897ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
4898if test -n "$ac_ct_STRIP"; then
4899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
4900$as_echo "$ac_ct_STRIP" >&6; }
4901else
4902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4903$as_echo "no" >&6; }
4904fi
4905
4906 if test "x$ac_ct_STRIP" = x; then
4907 STRIP=":"
4908 else
4909 case $cross_compiling:$ac_tool_warned in
4910yes:)
4911{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4912$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4913ac_tool_warned=yes ;;
4914esac
4915 STRIP=$ac_ct_STRIP
4916 fi
4917else
4918 STRIP="$ac_cv_prog_STRIP"
4919fi
4920
4921fi
4922INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
4923
783e057b
DJ
4924
4925ac_aux_dir=
81ecdfbb
RW
4926for ac_dir in .. "$srcdir"/..; do
4927 for ac_t in install-sh install.sh shtool; do
4928 if test -f "$ac_dir/$ac_t"; then
4929 ac_aux_dir=$ac_dir
4930 ac_install_sh="$ac_aux_dir/$ac_t -c"
4931 break 2
4932 fi
4933 done
783e057b
DJ
4934done
4935if test -z "$ac_aux_dir"; then
81ecdfbb 4936 as_fn_error "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
783e057b 4937fi
81ecdfbb
RW
4938
4939# These three variables are undocumented and unsupported,
4940# and are intended to be withdrawn in a future Autoconf release.
4941# They can cause serious problems if a builder's source tree is in a directory
4942# whose full name contains unusual characters.
4943ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4944ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4945ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4946
783e057b 4947
783e057b 4948
9009e1ae
MR
4949test "$program_prefix" != NONE &&
4950 program_transform_name="s&^&$program_prefix&;$program_transform_name"
4951# Use a double $ so make ignores it.
4952test "$program_suffix" != NONE &&
4953 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
4954# Double any \ or $.
4955# By default was `s,x,x', remove it if useless.
4956ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
4957program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
4958
81ecdfbb 4959
0bcda685
PA
4960# We require a C++11 compiler. Check if one is available, and if
4961# necessary, set CXX_DIALECT to some -std=xxx switch.
4962
4963 ax_cxx_compile_cxx11_required=true
4964 ac_ext=cpp
4965ac_cpp='$CXXCPP $CPPFLAGS'
4966ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4967ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4968ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
4969 CXX_DIALECT=""
4970 ac_success=no
4971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5
4972$as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; }
4973if test "${ax_cv_cxx_compile_cxx11+set}" = set; then :
4974 $as_echo_n "(cached) " >&6
4975else
4976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4977/* end confdefs.h. */
4978
4979
4980// If the compiler admits that it is not ready for C++11, why torture it?
4981// Hopefully, this will speed up the test.
4982
4983#ifndef __cplusplus
4984
4985#error "This is not a C++ compiler"
4986
4987#elif __cplusplus < 201103L
4988
4989#error "This is not a C++11 compiler"
4990
4991#else
4992
4993namespace cxx11
4994{
4995
4996 namespace test_static_assert
4997 {
4998
4999 template <typename T>
5000 struct check
5001 {
5002 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5003 };
5004
5005 }
5006
5007 namespace test_final_override
5008 {
5009
5010 struct Base
5011 {
5012 virtual void f() {}
5013 };
5014
5015 struct Derived : public Base
5016 {
5017 virtual void f() override {}
5018 };
5019
5020 }
5021
5022 namespace test_double_right_angle_brackets
5023 {
5024
5025 template < typename T >
5026 struct check {};
5027
5028 typedef check<void> single_type;
5029 typedef check<check<void>> double_type;
5030 typedef check<check<check<void>>> triple_type;
5031 typedef check<check<check<check<void>>>> quadruple_type;
5032
5033 }
5034
5035 namespace test_decltype
5036 {
5037
5038 int
5039 f()
5040 {
5041 int a = 1;
5042 decltype(a) b = 2;
5043 return a + b;
5044 }
5045
5046 }
5047
5048 namespace test_type_deduction
5049 {
5050
5051 template < typename T1, typename T2 >
5052 struct is_same
5053 {
5054 static const bool value = false;
5055 };
5056
5057 template < typename T >
5058 struct is_same<T, T>
5059 {
5060 static const bool value = true;
5061 };
5062
5063 template < typename T1, typename T2 >
5064 auto
5065 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5066 {
5067 return a1 + a2;
5068 }
5069
5070 int
5071 test(const int c, volatile int v)
5072 {
5073 static_assert(is_same<int, decltype(0)>::value == true, "");
5074 static_assert(is_same<int, decltype(c)>::value == false, "");
5075 static_assert(is_same<int, decltype(v)>::value == false, "");
5076 auto ac = c;
5077 auto av = v;
5078 auto sumi = ac + av + 'x';
5079 auto sumf = ac + av + 1.0;
5080 static_assert(is_same<int, decltype(ac)>::value == true, "");
5081 static_assert(is_same<int, decltype(av)>::value == true, "");
5082 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5083 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5084 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5085 return (sumf > 0.0) ? sumi : add(c, v);
5086 }
5087
5088 }
5089
5090 namespace test_noexcept
5091 {
5092
5093 int f() { return 0; }
5094 int g() noexcept { return 0; }
5095
5096 static_assert(noexcept(f()) == false, "");
5097 static_assert(noexcept(g()) == true, "");
5098
5099 }
5100
5101 namespace test_constexpr
5102 {
5103
5104 template < typename CharT >
5105 unsigned long constexpr
5106 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5107 {
5108 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5109 }
5110
5111 template < typename CharT >
5112 unsigned long constexpr
5113 strlen_c(const CharT *const s) noexcept
5114 {
5115 return strlen_c_r(s, 0UL);
5116 }
5117
5118 static_assert(strlen_c("") == 0UL, "");
5119 static_assert(strlen_c("1") == 1UL, "");
5120 static_assert(strlen_c("example") == 7UL, "");
5121 static_assert(strlen_c("another\0example") == 7UL, "");
5122
5123 }
5124
5125 namespace test_rvalue_references
5126 {
5127
5128 template < int N >
5129 struct answer
5130 {
5131 static constexpr int value = N;
5132 };
5133
5134 answer<1> f(int&) { return answer<1>(); }
5135 answer<2> f(const int&) { return answer<2>(); }
5136 answer<3> f(int&&) { return answer<3>(); }
5137
5138 void
5139 test()
5140 {
5141 int i = 0;
5142 const int c = 0;
5143 static_assert(decltype(f(i))::value == 1, "");
5144 static_assert(decltype(f(c))::value == 2, "");
5145 static_assert(decltype(f(0))::value == 3, "");
5146 }
5147
5148 }
5149
5150 namespace test_uniform_initialization
5151 {
5152
5153 struct test
5154 {
5155 static const int zero {};
5156 static const int one {1};
5157 };
5158
5159 static_assert(test::zero == 0, "");
5160 static_assert(test::one == 1, "");
5161
5162 }
5163
5164 namespace test_lambdas
5165 {
5166
5167 void
5168 test1()
5169 {
5170 auto lambda1 = [](){};
5171 auto lambda2 = lambda1;
5172 lambda1();
5173 lambda2();
5174 }
5175
5176 int
5177 test2()
5178 {
5179 auto a = [](int i, int j){ return i + j; }(1, 2);
5180 auto b = []() -> int { return '0'; }();
5181 auto c = [=](){ return a + b; }();
5182 auto d = [&](){ return c; }();
5183 auto e = [a, &b](int x) mutable {
5184 const auto identity = [](int y){ return y; };
5185 for (auto i = 0; i < a; ++i)
5186 a += b--;
5187 return x + identity(a + b);
5188 }(0);
5189 return a + b + c + d + e;
5190 }
5191
5192 int
5193 test3()
5194 {
5195 const auto nullary = [](){ return 0; };
5196 const auto unary = [](int x){ return x; };
5197 using nullary_t = decltype(nullary);
5198 using unary_t = decltype(unary);
5199 const auto higher1st = [](nullary_t f){ return f(); };
5200 const auto higher2nd = [unary](nullary_t f1){
5201 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5202 };
5203 return higher1st(nullary) + higher2nd(nullary)(unary);
5204 }
5205
5206 }
5207
5208 namespace test_variadic_templates
5209 {
5210
5211 template <int...>
5212 struct sum;
5213
5214 template <int N0, int... N1toN>
5215 struct sum<N0, N1toN...>
5216 {
5217 static constexpr auto value = N0 + sum<N1toN...>::value;
5218 };
5219
5220 template <>
5221 struct sum<>
5222 {
5223 static constexpr auto value = 0;
5224 };
5225
5226 static_assert(sum<>::value == 0, "");
5227 static_assert(sum<1>::value == 1, "");
5228 static_assert(sum<23>::value == 23, "");
5229 static_assert(sum<1, 2>::value == 3, "");
5230 static_assert(sum<5, 5, 11>::value == 21, "");
5231 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5232
5233 }
5234
5235 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5236 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5237 // because of this.
5238 namespace test_template_alias_sfinae
5239 {
5240
5241 struct foo {};
5242
5243 template<typename T>
5244 using member = typename T::member_type;
5245
5246 template<typename T>
5247 void func(...) {}
5248
5249 template<typename T>
5250 void func(member<T>*) {}
5251
5252 void test();
5253
5254 void test() { func<foo>(0); }
5255
5256 }
5257
5258} // namespace cxx11
5259
5260#endif // __cplusplus >= 201103L
5261
5262
5263
5264_ACEOF
5265if ac_fn_cxx_try_compile "$LINENO"; then :
5266 ax_cv_cxx_compile_cxx11=yes
5267else
5268 ax_cv_cxx_compile_cxx11=no
5269fi
5270rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5271fi
5272{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5
5273$as_echo "$ax_cv_cxx_compile_cxx11" >&6; }
5274 if test x$ax_cv_cxx_compile_cxx11 = xyes; then
5275 ac_success=yes
5276 fi
5277
5278 if test x$ac_success = xno; then
5279 for switch in -std=gnu++11 -std=gnu++0x; do
5280 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5281 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
5282$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
5283if { as_var=$cachevar; eval "test \"\${$as_var+set}\" = set"; }; then :
5284 $as_echo_n "(cached) " >&6
5285else
5286 ac_save_CXX="$CXX"
5287 CXX="$CXX $switch"
5288 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5289/* end confdefs.h. */
5290
5291
5292// If the compiler admits that it is not ready for C++11, why torture it?
5293// Hopefully, this will speed up the test.
5294
5295#ifndef __cplusplus
5296
5297#error "This is not a C++ compiler"
5298
5299#elif __cplusplus < 201103L
5300
5301#error "This is not a C++11 compiler"
5302
5303#else
5304
5305namespace cxx11
5306{
5307
5308 namespace test_static_assert
5309 {
5310
5311 template <typename T>
5312 struct check
5313 {
5314 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5315 };
5316
5317 }
5318
5319 namespace test_final_override
5320 {
5321
5322 struct Base
5323 {
5324 virtual void f() {}
5325 };
5326
5327 struct Derived : public Base
5328 {
5329 virtual void f() override {}
5330 };
5331
5332 }
5333
5334 namespace test_double_right_angle_brackets
5335 {
5336
5337 template < typename T >
5338 struct check {};
5339
5340 typedef check<void> single_type;
5341 typedef check<check<void>> double_type;
5342 typedef check<check<check<void>>> triple_type;
5343 typedef check<check<check<check<void>>>> quadruple_type;
5344
5345 }
5346
5347 namespace test_decltype
5348 {
5349
5350 int
5351 f()
5352 {
5353 int a = 1;
5354 decltype(a) b = 2;
5355 return a + b;
5356 }
5357
5358 }
5359
5360 namespace test_type_deduction
5361 {
5362
5363 template < typename T1, typename T2 >
5364 struct is_same
5365 {
5366 static const bool value = false;
5367 };
5368
5369 template < typename T >
5370 struct is_same<T, T>
5371 {
5372 static const bool value = true;
5373 };
5374
5375 template < typename T1, typename T2 >
5376 auto
5377 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5378 {
5379 return a1 + a2;
5380 }
5381
5382 int
5383 test(const int c, volatile int v)
5384 {
5385 static_assert(is_same<int, decltype(0)>::value == true, "");
5386 static_assert(is_same<int, decltype(c)>::value == false, "");
5387 static_assert(is_same<int, decltype(v)>::value == false, "");
5388 auto ac = c;
5389 auto av = v;
5390 auto sumi = ac + av + 'x';
5391 auto sumf = ac + av + 1.0;
5392 static_assert(is_same<int, decltype(ac)>::value == true, "");
5393 static_assert(is_same<int, decltype(av)>::value == true, "");
5394 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5395 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5396 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5397 return (sumf > 0.0) ? sumi : add(c, v);
5398 }
5399
5400 }
5401
5402 namespace test_noexcept
5403 {
5404
5405 int f() { return 0; }
5406 int g() noexcept { return 0; }
5407
5408 static_assert(noexcept(f()) == false, "");
5409 static_assert(noexcept(g()) == true, "");
5410
5411 }
5412
5413 namespace test_constexpr
5414 {
5415
5416 template < typename CharT >
5417 unsigned long constexpr
5418 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5419 {
5420 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5421 }
5422
5423 template < typename CharT >
5424 unsigned long constexpr
5425 strlen_c(const CharT *const s) noexcept
5426 {
5427 return strlen_c_r(s, 0UL);
5428 }
5429
5430 static_assert(strlen_c("") == 0UL, "");
5431 static_assert(strlen_c("1") == 1UL, "");
5432 static_assert(strlen_c("example") == 7UL, "");
5433 static_assert(strlen_c("another\0example") == 7UL, "");
5434
5435 }
5436
5437 namespace test_rvalue_references
5438 {
5439
5440 template < int N >
5441 struct answer
5442 {
5443 static constexpr int value = N;
5444 };
5445
5446 answer<1> f(int&) { return answer<1>(); }
5447 answer<2> f(const int&) { return answer<2>(); }
5448 answer<3> f(int&&) { return answer<3>(); }
5449
5450 void
5451 test()
5452 {
5453 int i = 0;
5454 const int c = 0;
5455 static_assert(decltype(f(i))::value == 1, "");
5456 static_assert(decltype(f(c))::value == 2, "");
5457 static_assert(decltype(f(0))::value == 3, "");
5458 }
5459
5460 }
5461
5462 namespace test_uniform_initialization
5463 {
5464
5465 struct test
5466 {
5467 static const int zero {};
5468 static const int one {1};
5469 };
5470
5471 static_assert(test::zero == 0, "");
5472 static_assert(test::one == 1, "");
5473
5474 }
5475
5476 namespace test_lambdas
5477 {
5478
5479 void
5480 test1()
5481 {
5482 auto lambda1 = [](){};
5483 auto lambda2 = lambda1;
5484 lambda1();
5485 lambda2();
5486 }
5487
5488 int
5489 test2()
5490 {
5491 auto a = [](int i, int j){ return i + j; }(1, 2);
5492 auto b = []() -> int { return '0'; }();
5493 auto c = [=](){ return a + b; }();
5494 auto d = [&](){ return c; }();
5495 auto e = [a, &b](int x) mutable {
5496 const auto identity = [](int y){ return y; };
5497 for (auto i = 0; i < a; ++i)
5498 a += b--;
5499 return x + identity(a + b);
5500 }(0);
5501 return a + b + c + d + e;
5502 }
5503
5504 int
5505 test3()
5506 {
5507 const auto nullary = [](){ return 0; };
5508 const auto unary = [](int x){ return x; };
5509 using nullary_t = decltype(nullary);
5510 using unary_t = decltype(unary);
5511 const auto higher1st = [](nullary_t f){ return f(); };
5512 const auto higher2nd = [unary](nullary_t f1){
5513 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5514 };
5515 return higher1st(nullary) + higher2nd(nullary)(unary);
5516 }
5517
5518 }
5519
5520 namespace test_variadic_templates
5521 {
5522
5523 template <int...>
5524 struct sum;
5525
5526 template <int N0, int... N1toN>
5527 struct sum<N0, N1toN...>
5528 {
5529 static constexpr auto value = N0 + sum<N1toN...>::value;
5530 };
5531
5532 template <>
5533 struct sum<>
5534 {
5535 static constexpr auto value = 0;
5536 };
5537
5538 static_assert(sum<>::value == 0, "");
5539 static_assert(sum<1>::value == 1, "");
5540 static_assert(sum<23>::value == 23, "");
5541 static_assert(sum<1, 2>::value == 3, "");
5542 static_assert(sum<5, 5, 11>::value == 21, "");
5543 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5544
5545 }
5546
5547 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5548 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5549 // because of this.
5550 namespace test_template_alias_sfinae
5551 {
5552
5553 struct foo {};
5554
5555 template<typename T>
5556 using member = typename T::member_type;
5557
5558 template<typename T>
5559 void func(...) {}
5560
5561 template<typename T>
5562 void func(member<T>*) {}
5563
5564 void test();
5565
5566 void test() { func<foo>(0); }
5567
5568 }
5569
5570} // namespace cxx11
5571
5572#endif // __cplusplus >= 201103L
5573
5574
5575
5576_ACEOF
5577if ac_fn_cxx_try_compile "$LINENO"; then :
5578 eval $cachevar=yes
5579else
5580 eval $cachevar=no
5581fi
5582rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5583 CXX="$ac_save_CXX"
5584fi
5585eval ac_res=\$$cachevar
5586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5587$as_echo "$ac_res" >&6; }
5588 if eval test x\$$cachevar = xyes; then
5589 CXX_DIALECT="$switch"
5590 ac_success=yes
5591 break
5592 fi
5593 done
5594 fi
5595
5596 if test x$ac_success = xno; then
5597 for switch in -std=c++11 -std=c++0x +std=c++11 "-h std=c++11"; do
5598 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5599 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
5600$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
5601if { as_var=$cachevar; eval "test \"\${$as_var+set}\" = set"; }; then :
5602 $as_echo_n "(cached) " >&6
5603else
5604 ac_save_CXX="$CXX"
5605 CXX="$CXX $switch"
5606 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5607/* end confdefs.h. */
5608
5609
5610// If the compiler admits that it is not ready for C++11, why torture it?
5611// Hopefully, this will speed up the test.
5612
5613#ifndef __cplusplus
5614
5615#error "This is not a C++ compiler"
5616
5617#elif __cplusplus < 201103L
5618
5619#error "This is not a C++11 compiler"
5620
5621#else
5622
5623namespace cxx11
5624{
5625
5626 namespace test_static_assert
5627 {
5628
5629 template <typename T>
5630 struct check
5631 {
5632 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5633 };
5634
5635 }
5636
5637 namespace test_final_override
5638 {
5639
5640 struct Base
5641 {
5642 virtual void f() {}
5643 };
5644
5645 struct Derived : public Base
5646 {
5647 virtual void f() override {}
5648 };
5649
5650 }
5651
5652 namespace test_double_right_angle_brackets
5653 {
5654
5655 template < typename T >
5656 struct check {};
5657
5658 typedef check<void> single_type;
5659 typedef check<check<void>> double_type;
5660 typedef check<check<check<void>>> triple_type;
5661 typedef check<check<check<check<void>>>> quadruple_type;
5662
5663 }
5664
5665 namespace test_decltype
5666 {
5667
5668 int
5669 f()
5670 {
5671 int a = 1;
5672 decltype(a) b = 2;
5673 return a + b;
5674 }
5675
5676 }
5677
5678 namespace test_type_deduction
5679 {
5680
5681 template < typename T1, typename T2 >
5682 struct is_same
5683 {
5684 static const bool value = false;
5685 };
5686
5687 template < typename T >
5688 struct is_same<T, T>
5689 {
5690 static const bool value = true;
5691 };
5692
5693 template < typename T1, typename T2 >
5694 auto
5695 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5696 {
5697 return a1 + a2;
5698 }
5699
5700 int
5701 test(const int c, volatile int v)
5702 {
5703 static_assert(is_same<int, decltype(0)>::value == true, "");
5704 static_assert(is_same<int, decltype(c)>::value == false, "");
5705 static_assert(is_same<int, decltype(v)>::value == false, "");
5706 auto ac = c;
5707 auto av = v;
5708 auto sumi = ac + av + 'x';
5709 auto sumf = ac + av + 1.0;
5710 static_assert(is_same<int, decltype(ac)>::value == true, "");
5711 static_assert(is_same<int, decltype(av)>::value == true, "");
5712 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5713 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5714 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5715 return (sumf > 0.0) ? sumi : add(c, v);
5716 }
5717
5718 }
5719
5720 namespace test_noexcept
5721 {
5722
5723 int f() { return 0; }
5724 int g() noexcept { return 0; }
5725
5726 static_assert(noexcept(f()) == false, "");
5727 static_assert(noexcept(g()) == true, "");
5728
5729 }
5730
5731 namespace test_constexpr
5732 {
5733
5734 template < typename CharT >
5735 unsigned long constexpr
5736 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5737 {
5738 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5739 }
5740
5741 template < typename CharT >
5742 unsigned long constexpr
5743 strlen_c(const CharT *const s) noexcept
5744 {
5745 return strlen_c_r(s, 0UL);
5746 }
5747
5748 static_assert(strlen_c("") == 0UL, "");
5749 static_assert(strlen_c("1") == 1UL, "");
5750 static_assert(strlen_c("example") == 7UL, "");
5751 static_assert(strlen_c("another\0example") == 7UL, "");
5752
5753 }
5754
5755 namespace test_rvalue_references
5756 {
5757
5758 template < int N >
5759 struct answer
5760 {
5761 static constexpr int value = N;
5762 };
5763
5764 answer<1> f(int&) { return answer<1>(); }
5765 answer<2> f(const int&) { return answer<2>(); }
5766 answer<3> f(int&&) { return answer<3>(); }
5767
5768 void
5769 test()
5770 {
5771 int i = 0;
5772 const int c = 0;
5773 static_assert(decltype(f(i))::value == 1, "");
5774 static_assert(decltype(f(c))::value == 2, "");
5775 static_assert(decltype(f(0))::value == 3, "");
5776 }
5777
5778 }
5779
5780 namespace test_uniform_initialization
5781 {
5782
5783 struct test
5784 {
5785 static const int zero {};
5786 static const int one {1};
5787 };
5788
5789 static_assert(test::zero == 0, "");
5790 static_assert(test::one == 1, "");
5791
5792 }
5793
5794 namespace test_lambdas
5795 {
5796
5797 void
5798 test1()
5799 {
5800 auto lambda1 = [](){};
5801 auto lambda2 = lambda1;
5802 lambda1();
5803 lambda2();
5804 }
5805
5806 int
5807 test2()
5808 {
5809 auto a = [](int i, int j){ return i + j; }(1, 2);
5810 auto b = []() -> int { return '0'; }();
5811 auto c = [=](){ return a + b; }();
5812 auto d = [&](){ return c; }();
5813 auto e = [a, &b](int x) mutable {
5814 const auto identity = [](int y){ return y; };
5815 for (auto i = 0; i < a; ++i)
5816 a += b--;
5817 return x + identity(a + b);
5818 }(0);
5819 return a + b + c + d + e;
5820 }
5821
5822 int
5823 test3()
5824 {
5825 const auto nullary = [](){ return 0; };
5826 const auto unary = [](int x){ return x; };
5827 using nullary_t = decltype(nullary);
5828 using unary_t = decltype(unary);
5829 const auto higher1st = [](nullary_t f){ return f(); };
5830 const auto higher2nd = [unary](nullary_t f1){
5831 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5832 };
5833 return higher1st(nullary) + higher2nd(nullary)(unary);
5834 }
5835
5836 }
5837
5838 namespace test_variadic_templates
5839 {
5840
5841 template <int...>
5842 struct sum;
5843
5844 template <int N0, int... N1toN>
5845 struct sum<N0, N1toN...>
5846 {
5847 static constexpr auto value = N0 + sum<N1toN...>::value;
5848 };
5849
5850 template <>
5851 struct sum<>
5852 {
5853 static constexpr auto value = 0;
5854 };
5855
5856 static_assert(sum<>::value == 0, "");
5857 static_assert(sum<1>::value == 1, "");
5858 static_assert(sum<23>::value == 23, "");
5859 static_assert(sum<1, 2>::value == 3, "");
5860 static_assert(sum<5, 5, 11>::value == 21, "");
5861 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5862
5863 }
5864
5865 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5866 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5867 // because of this.
5868 namespace test_template_alias_sfinae
5869 {
5870
5871 struct foo {};
5872
5873 template<typename T>
5874 using member = typename T::member_type;
5875
5876 template<typename T>
5877 void func(...) {}
5878
5879 template<typename T>
5880 void func(member<T>*) {}
5881
5882 void test();
5883
5884 void test() { func<foo>(0); }
5885
5886 }
5887
5888} // namespace cxx11
5889
5890#endif // __cplusplus >= 201103L
5891
5892
5893
5894_ACEOF
5895if ac_fn_cxx_try_compile "$LINENO"; then :
5896 eval $cachevar=yes
5897else
5898 eval $cachevar=no
5899fi
5900rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5901 CXX="$ac_save_CXX"
5902fi
5903eval ac_res=\$$cachevar
5904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5905$as_echo "$ac_res" >&6; }
5906 if eval test x\$$cachevar = xyes; then
5907 CXX_DIALECT="$switch"
5908 ac_success=yes
5909 break
5910 fi
5911 done
5912 fi
5913 ac_ext=c
5914ac_cpp='$CPP $CPPFLAGS'
5915ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5916ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5917ac_compiler_gnu=$ac_cv_c_compiler_gnu
5918
5919 if test x$ax_cxx_compile_cxx11_required = xtrue; then
5920 if test x$ac_success = xno; then
5921 as_fn_error "*** A compiler with support for C++11 language features is required." "$LINENO" 5
5922 fi
5923 fi
5924 if test x$ac_success = xno; then
5925 HAVE_CXX11=0
5926 { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5
5927$as_echo "$as_me: No compiler with C++11 support was found" >&6;}
5928 else
5929 HAVE_CXX11=1
5930
5931$as_echo "#define HAVE_CXX11 1" >>confdefs.h
5932
5933 fi
5934
5935
5936
5937
a417dc56
RW
5938# Dependency checking.
5939rm -rf .tst 2>/dev/null
5940mkdir .tst 2>/dev/null
5941if test -d .tst; then
5942 am__leading_dot=.
5943else
5944 am__leading_dot=_
5945fi
5946rmdir .tst 2>/dev/null
5947
5948DEPDIR="${am__leading_dot}deps"
5949
81ecdfbb 5950ac_config_commands="$ac_config_commands depdir"
a417dc56
RW
5951
5952
f38307f5
YQ
5953# Create sub-directories for objects and depedencies.
5954CONFIG_SRC_SUBDIR="arch"
5955
5956
5957ac_config_commands="$ac_config_commands gdbdepdir"
5958
5959
a417dc56
RW
5960depcc="$CC" am_compiler_list=
5961
5962am_depcomp=$ac_aux_dir/depcomp
81ecdfbb
RW
5963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
5964$as_echo_n "checking dependency style of $depcc... " >&6; }
5965if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
5966 $as_echo_n "(cached) " >&6
a417dc56
RW
5967else
5968 if test -f "$am_depcomp"; then
5969 # We make a subdir and do the tests there. Otherwise we can end up
5970 # making bogus files that we don't know about and never remove. For
5971 # instance it was reported that on HP-UX the gcc test will end up
5972 # making a dummy file named `D' -- because `-MD' means `put the output
5973 # in D'.
5974 mkdir conftest.dir
5975 # Copy depcomp to subdir because otherwise we won't find it if we're
5976 # using a relative directory.
5977 cp "$am_depcomp" conftest.dir
5978 cd conftest.dir
5979 # We will build objects and dependencies in a subdirectory because
5980 # it helps to detect inapplicable dependency modes. For instance
5981 # both Tru64's cc and ICC support -MD to output dependencies as a
5982 # side effect of compilation, but ICC will put the dependencies in
5983 # the current directory while Tru64 will put them in the object
5984 # directory.
5985 mkdir sub
5986
5987 am_cv_CC_dependencies_compiler_type=none
5988 if test "$am_compiler_list" = ""; then
5989 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
5990 fi
5991 for depmode in $am_compiler_list; do
5992 if test $depmode = none; then break; fi
5993
81ecdfbb 5994 $as_echo "$as_me:$LINENO: trying $depmode" >&5
a417dc56
RW
5995 # Setup a source with many dependencies, because some compilers
5996 # like to wrap large dependency lists on column 80 (with \), and
5997 # we should not choose a depcomp mode which is confused by this.
5998 #
5999 # We need to recreate these files for each test, as the compiler may
6000 # overwrite some of them when testing with obscure command lines.
6001 # This happens at least with the AIX C compiler.
6002 : > sub/conftest.c
6003 for i in 1 2 3 4 5 6; do
6004 echo '#include "conftst'$i'.h"' >> sub/conftest.c
6005 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
6006 # Solaris 8's {/usr,}/bin/sh.
6007 touch sub/conftst$i.h
6008 done
6009 echo "include sub/conftest.Po" > confmf
6010
6011 # We check with `-c' and `-o' for the sake of the "dashmstdout"
6012 # mode. It turns out that the SunPro C++ compiler does not properly
6013 # handle `-M -o', and we need to detect this.
6014 depcmd="depmode=$depmode \
6015 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
6016 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6017 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
6018 echo "| $depcmd" | sed -e 's/ */ /g' >&5
6019 if env $depcmd > conftest.err 2>&1 &&
6020 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
6021 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
6022 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
6023 # icc doesn't choke on unknown options, it will just issue warnings
6024 # or remarks (even with -Werror). So we grep stderr for any message
6025 # that says an option was ignored or not supported.
6026 # When given -MP, icc 7.0 and 7.1 complain thusly:
6027 # icc: Command line warning: ignoring option '-M'; no argument required
6028 # The diagnosis changed in icc 8.0:
6029 # icc: Command line remark: option '-MP' not supported
6030 if (grep 'ignoring option' conftest.err ||
6031 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6032 am_cv_CC_dependencies_compiler_type=$depmode
81ecdfbb 6033 $as_echo "$as_me:$LINENO: success" >&5
a417dc56
RW
6034 break
6035 fi
6036 fi
81ecdfbb 6037 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
a417dc56
RW
6038 sed -e 's/^/| /' < conftest.err >&5
6039 done
6040
6041 cd ..
6042 rm -rf conftest.dir
6043else
6044 am_cv_CC_dependencies_compiler_type=none
6045fi
6046
6047fi
81ecdfbb
RW
6048{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
6049$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
a417dc56 6050if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
81ecdfbb 6051then as_fn_error "no usable dependency style found" "$LINENO" 5
a417dc56
RW
6052else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
6053
6054fi
6055
6056
648d586d
JB
6057gnulib_extra_configure_args=
6058# If large-file support is disabled, make sure gnulib does the same.
6059if test "$enable_largefile" = no; then
6060gnulib_extra_configure_args="$gnulib_extra_configure_args --disable-largefile"
6061fi
6062
c971b7fa
PA
6063# Configure gnulib. We need to build gnulib under some other
6064# directory not "gnulib", to avoid the problem of both GDB and
6065# GDBserver wanting to build it in the same directory, when building
6066# in the source dir.
783e057b 6067
c971b7fa
PA
6068 in_src="gnulib"
6069 in_build="build-gnulib"
648d586d 6070 in_extra_args="$gnulib_extra_configure_args"
c971b7fa
PA
6071
6072 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
6073 # so they do not pile up.
6074 ac_sub_configure_args=
6075 ac_prev=
6076 eval "set x $ac_configure_args"
6077 shift
6078 for ac_arg
6079 do
6080 if test -n "$ac_prev"; then
6081 ac_prev=
6082 continue
6083 fi
6084 case $ac_arg in
6085 -cache-file | --cache-file | --cache-fil | --cache-fi \
6086 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
6087 ac_prev=cache_file ;;
6088 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
6089 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
6090 | --c=*)
6091 ;;
6092 --config-cache | -C)
6093 ;;
6094 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
6095 ac_prev=srcdir ;;
6096 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
6097 ;;
6098 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
6099 ac_prev=prefix ;;
6100 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
6101 ;;
6102 --disable-option-checking)
6103 ;;
6104 *)
6105 case $ac_arg in
6106 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
6107 esac
6108 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
6109 esac
6110 done
6111
6112 # Always prepend --prefix to ensure using the same prefix
6113 # in subdir configurations.
6114 ac_arg="--prefix=$prefix"
6115 case $ac_arg in
6116 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
6117 esac
6118 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
6119
6120 # Pass --silent
6121 if test "$silent" = yes; then
6122 ac_sub_configure_args="--silent $ac_sub_configure_args"
6123 fi
6124
6125 # Always prepend --disable-option-checking to silence warnings, since
6126 # different subdirs can have different --enable and --with options.
6127 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
6128
6129 ac_popdir=`pwd`
6130 ac_dir=$in_build
6131
6132 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
6133 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
6134 $as_echo "$ac_msg" >&6
6135 as_dir="$ac_dir"; as_fn_mkdir_p
6136
38ea300a
PA
6137 case $srcdir in
6138 [\\/]* | ?:[\\/]* )
6139 ac_srcdir=$srcdir/$in_src ;;
6140 *) # Relative name.
6141 ac_srcdir=../$srcdir/$in_src ;;
6142 esac
c971b7fa
PA
6143
6144 cd "$ac_dir"
6145
6146 ac_sub_configure=$ac_srcdir/configure
6147
6148 # Make the cache file name correct relative to the subdirectory.
6149 case $cache_file in
6150 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
6151 *) # Relative name.
6152 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
6153 esac
6154
648d586d
JB
6155 if test -n "$in_extra_args"; then
6156 # Add the extra args at the end.
6157 ac_sub_configure_args="$ac_sub_configure_args $in_extra_args"
6158 fi
6159
c971b7fa
PA
6160 { $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
6161$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
6162 # The eval makes quoting arguments work.
6163 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
6164 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
6165 as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
6166
6167 cd "$ac_popdir"
783e057b 6168
c971b7fa
PA
6169
6170
6171CONFIG_OBS=
6172CONFIG_DEPS=
6173CONFIG_SRCS=
6174ENABLE_CFLAGS=
6175
6176CONFIG_ALL=
6177CONFIG_CLEAN=
6178CONFIG_INSTALL=
6179CONFIG_UNINSTALL=
6180
6181# If we haven't got the data from the intl directory,
6182# assume NLS is disabled.
6183USE_NLS=no
6184LIBINTL=
6185LIBINTL_DEP=
6186INCINTL=
6187XGETTEXT=
6188GMSGFMT=
6189POSUB=
783e057b
DJ
6190
6191if test -f ../intl/config.intl; then
6192 . ../intl/config.intl
6193fi
81ecdfbb
RW
6194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
6195$as_echo_n "checking whether NLS is requested... " >&6; }
783e057b 6196if test x"$USE_NLS" != xyes; then
81ecdfbb
RW
6197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6198$as_echo "no" >&6; }
783e057b 6199else
81ecdfbb
RW
6200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6201$as_echo "yes" >&6; }
783e057b 6202
81ecdfbb 6203$as_echo "#define ENABLE_NLS 1" >>confdefs.h
783e057b
DJ
6204
6205
81ecdfbb
RW
6206 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
6207$as_echo_n "checking for catalogs to be installed... " >&6; }
783e057b
DJ
6208 # Look for .po and .gmo files in the source directory.
6209 CATALOGS=
6210 XLINGUAS=
6211 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
6212 # If there aren't any .gmo files the shell will give us the
6213 # literal string "../path/to/srcdir/po/*.gmo" which has to be
6214 # weeded out.
6215 case "$cat" in *\**)
6216 continue;;
6217 esac
6218 # The quadruple backslash is collapsed to a double backslash
6219 # by the backticks, then collapsed again by the double quotes,
6220 # leaving us with one backslash in the sed expression (right
6221 # before the dot that mustn't act as a wildcard).
c971b7fa
PA
6222 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
6223 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
6224 # The user is allowed to set LINGUAS to a list of languages to
6225 # install catalogs for. If it's empty that means "all of them."
6226 if test "x$LINGUAS" = x; then
6227 CATALOGS="$CATALOGS $cat"
6228 XLINGUAS="$XLINGUAS $lang"
6229 else
6230 case "$LINGUAS" in *$lang*)
6231 CATALOGS="$CATALOGS $cat"
6232 XLINGUAS="$XLINGUAS $lang"
6233 ;;
6234 esac
e28b3332
DJ
6235 fi
6236 done
c971b7fa
PA
6237 LINGUAS="$XLINGUAS"
6238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
6239$as_echo "$LINGUAS" >&6; }
6240
6241
6242 DATADIRNAME=share
6243
6244 INSTOBJEXT=.mo
6245
6246 GENCAT=gencat
6247
6248 CATOBJEXT=.gmo
e28b3332 6249
e28b3332
DJ
6250fi
6251
c971b7fa
PA
6252localedir='${datadir}/locale'
6253
6254
6255if test x"$USE_NLS" = xyes; then
6256 CONFIG_ALL="$CONFIG_ALL all-po"
6257 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
6258 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
6259 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
e28b3332 6260fi
e28b3332 6261
c971b7fa
PA
6262GNULIB=build-gnulib/import
6263
6264# For Makefile dependencies.
6265GNULIB_STDINT_H=
6266if test x"$STDINT_H" != x; then
6267 GNULIB_STDINT_H=$GNULIB/$STDINT_H
e28b3332
DJ
6268fi
6269
6270
c971b7fa
PA
6271PACKAGE=gdb
6272
6273cat >>confdefs.h <<_ACEOF
6274#define PACKAGE "$PACKAGE"
6275_ACEOF
6276
6277
6278
6279# We never need to detect it in this sub-configure.
6280# But preserve it for config.status --recheck.
6281
6282
6283
6284MAKEINFO_EXTRA_FLAGS=""
6285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5
6286$as_echo_n "checking whether $MAKEINFO supports @click... " >&6; }
6287if test "${gdb_cv_have_makeinfo_click+set}" = set; then :
6288 $as_echo_n "(cached) " >&6
6289else
6290 echo '@clicksequence{a @click{} b}' >conftest.texinfo
6291 if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then
6292 gdb_cv_have_makeinfo_click=yes
6293 else
6294 gdb_cv_have_makeinfo_click=no
6295 fi
6296fi
6297{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5
6298$as_echo "$gdb_cv_have_makeinfo_click" >&6; }
6299if test x"$gdb_cv_have_makeinfo_click" = xyes; then
6300 MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK"
6301fi
e28b3332
DJ
6302
6303
bec39cab
AC
6304
6305
81ecdfbb
RW
6306# Check whether --with-separate-debug-dir was given.
6307if test "${with_separate_debug_dir+set}" = set; then :
6308 withval=$with_separate_debug_dir;
b14b1491
TT
6309 DEBUGDIR=$withval
6310else
6311 DEBUGDIR=${libdir}/debug
81ecdfbb
RW
6312fi
6313
20e95c23 6314
783e057b
DJ
6315 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6316 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 6317 ac_define_dir=`eval echo $DEBUGDIR`
783e057b 6318 ac_define_dir=`eval echo $ac_define_dir`
20e95c23 6319
783e057b
DJ
6320cat >>confdefs.h <<_ACEOF
6321#define DEBUGDIR "$ac_define_dir"
20e95c23 6322_ACEOF
20e95c23 6323
20e95c23 6324
20e95c23 6325
0c4a4063 6326
b14b1491
TT
6327 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6328 if test "x$prefix" = xNONE; then
6329 test_prefix=/usr/local
6330 else
6331 test_prefix=$prefix
6332 fi
783e057b 6333 else
b14b1491 6334 test_prefix=$exec_prefix
783e057b 6335 fi
b14b1491
TT
6336 value=0
6337 case ${ac_define_dir} in
6338 "${test_prefix}"|"${test_prefix}/"*|\
6339 '${exec_prefix}'|'${exec_prefix}/'*)
6340 value=1
6341 ;;
6342 esac
6343
6344cat >>confdefs.h <<_ACEOF
6345#define DEBUGDIR_RELOCATABLE $value
6346_ACEOF
6347
6348
6349
0c4a4063 6350
f83d8a90
DE
6351# We can't pass paths as command line arguments.
6352# Mingw32 tries to be clever and will convert the paths for us.
6353# For example -DBINDIR="/usr/local/bin" passed on the command line may get
6354# converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin".
6355# This breaks GDB's relocatable path conversions since paths passed in
6356# config.h would not get so translated, the path prefixes no longer match.
6357
6358 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6359 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6360 ac_define_dir=`eval echo $bindir`
6361 ac_define_dir=`eval echo $ac_define_dir`
6362
6363cat >>confdefs.h <<_ACEOF
6364#define BINDIR "$ac_define_dir"
6365_ACEOF
6366
6367
6368
b14b1491
TT
6369# GDB's datadir relocation
6370
6371
6372
81ecdfbb
RW
6373# Check whether --with-gdb-datadir was given.
6374if test "${with_gdb_datadir+set}" = set; then :
6375 withval=$with_gdb_datadir;
b14b1491 6376 GDB_DATADIR=$withval
20e95c23 6377else
b14b1491 6378 GDB_DATADIR=${datadir}/gdb
81ecdfbb
RW
6379fi
6380
20e95c23 6381
b14b1491
TT
6382 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6383 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6384 ac_define_dir=`eval echo $GDB_DATADIR`
6385 ac_define_dir=`eval echo $ac_define_dir`
6386
6387cat >>confdefs.h <<_ACEOF
6388#define GDB_DATADIR "$ac_define_dir"
20e95c23
DJ
6389_ACEOF
6390
b14b1491
TT
6391
6392
0c4a4063 6393
b14b1491
TT
6394 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6395 if test "x$prefix" = xNONE; then
6396 test_prefix=/usr/local
6397 else
6398 test_prefix=$prefix
6399 fi
6400 else
6401 test_prefix=$exec_prefix
6402 fi
6403 value=0
6404 case ${ac_define_dir} in
6405 "${test_prefix}"|"${test_prefix}/"*|\
6406 '${exec_prefix}'|'${exec_prefix}/'*)
6407 value=1
6408 ;;
6409 esac
6410
6411cat >>confdefs.h <<_ACEOF
6412#define GDB_DATADIR_RELOCATABLE $value
6413_ACEOF
6414
6415
783e057b 6416
20e95c23 6417
0c4a4063 6418
81ecdfbb
RW
6419# Check whether --with-relocated-sources was given.
6420if test "${with_relocated_sources+set}" = set; then :
6421 withval=$with_relocated_sources; reloc_srcdir="${withval}"
29b0e8a2
JM
6422
6423 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6424 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6425 ac_define_dir=`eval echo $reloc_srcdir`
6426 ac_define_dir=`eval echo $ac_define_dir`
6427
6428cat >>confdefs.h <<_ACEOF
6429#define RELOC_SRCDIR "$ac_define_dir"
6430_ACEOF
6431
6432
6433
81ecdfbb
RW
6434fi
6435
29b0e8a2 6436
7349ff92
JK
6437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5
6438$as_echo_n "checking for default auto-load directory... " >&6; }
6439
6440# Check whether --with-auto-load-dir was given.
6441if test "${with_auto_load_dir+set}" = set; then :
6442 withval=$with_auto_load_dir;
6443else
1564a261 6444 with_auto_load_dir='$debugdir:$datadir/auto-load'
7349ff92
JK
6445fi
6446
1564a261 6447escape_dir=`echo $with_auto_load_dir | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'`
7349ff92
JK
6448
6449 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6450 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6451 ac_define_dir=`eval echo $escape_dir`
6452 ac_define_dir=`eval echo $ac_define_dir`
6453
6454cat >>confdefs.h <<_ACEOF
6455#define AUTO_LOAD_DIR "$ac_define_dir"
6456_ACEOF
6457
6458
6459{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5
6460$as_echo "$with_auto_load_dir" >&6; }
6461
bccbefd2
JK
6462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5
6463$as_echo_n "checking for default auto-load safe-path... " >&6; }
6464
6465# Check whether --with-auto-load-safe-path was given.
6466if test "${with_auto_load_safe_path+set}" = set; then :
6467 withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then
6dea1fbd
JK
6468 with_auto_load_safe_path="/"
6469 fi
bccbefd2 6470else
7349ff92 6471 with_auto_load_safe_path="$with_auto_load_dir"
bccbefd2
JK
6472fi
6473
1564a261 6474escape_dir=`echo $with_auto_load_safe_path | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'`
bccbefd2
JK
6475
6476 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6477 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6dea1fbd 6478 ac_define_dir=`eval echo $escape_dir`
bccbefd2
JK
6479 ac_define_dir=`eval echo $ac_define_dir`
6480
6481cat >>confdefs.h <<_ACEOF
6dea1fbd 6482#define AUTO_LOAD_SAFE_PATH "$ac_define_dir"
bccbefd2
JK
6483_ACEOF
6484
6485
6486{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
6487$as_echo "$with_auto_load_safe_path" >&6; }
6488
29b0e8a2 6489
20e95c23 6490
5ae98d25 6491subdirs="$subdirs testsuite"
20e95c23
DJ
6492
6493
783e057b 6494# Check whether to support alternative target configurations
81ecdfbb
RW
6495# Check whether --enable-targets was given.
6496if test "${enable_targets+set}" = set; then :
6497 enableval=$enable_targets; case "${enableval}" in
6498 yes | "") as_fn_error "enable-targets option must specify target names or 'all'" "$LINENO" 5
783e057b
DJ
6499 ;;
6500 no) enable_targets= ;;
6501 *) enable_targets=$enableval ;;
6502esac
81ecdfbb
RW
6503fi
6504
20e95c23 6505
783e057b 6506# Check whether to enable 64-bit support on 32-bit hosts
81ecdfbb
RW
6507# Check whether --enable-64-bit-bfd was given.
6508if test "${enable_64_bit_bfd+set}" = set; then :
6509 enableval=$enable_64_bit_bfd; case "${enableval}" in
783e057b
DJ
6510 yes) want64=true ;;
6511 no) want64=false ;;
81ecdfbb 6512 *) as_fn_error "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
783e057b
DJ
6513esac
6514else
6515 want64=false
81ecdfbb
RW
6516fi
6517
783e057b
DJ
6518# Provide defaults for some variables set by the per-host and per-target
6519# configuration.
6520gdb_host_obs=posix-hdep.o
20e95c23 6521
783e057b
DJ
6522if test "${target}" = "${host}"; then
6523 gdb_native=yes
6524else
6525 gdb_native=no
6526fi
20e95c23 6527
783e057b 6528. $srcdir/configure.host
20e95c23 6529
fb23d554
SDJ
6530# Add in the common host objects.
6531. $srcdir/common/common.host
6532gdb_host_obs="$gdb_host_obs $common_host_obs"
6533
783e057b 6534# Accumulate some settings from configure.tgt over all enabled targets
20e95c23 6535
783e057b
DJ
6536TARGET_OBS=
6537all_targets=
b292c783 6538HAVE_NATIVE_GCORE_TARGET=
20e95c23 6539
783e057b 6540for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
20e95c23 6541do
783e057b
DJ
6542 if test "$targ_alias" = "all"; then
6543 all_targets=true
6544 else
6545 # Canonicalize the secondary target names.
6546 result=`$ac_config_sub $targ_alias 2>/dev/null`
6547 if test -n "$result"; then
6548 targ=$result
6549 else
6550 targ=$targ_alias
6551 fi
20e95c23 6552
783e057b 6553 . ${srcdir}/configure.tgt
20e95c23 6554
bf307134
JB
6555 if test -z "${gdb_target_obs}"; then :
6556 as_fn_error "configuration ${targ} is unsupported." "$LINENO" 5
6557fi
6558
783e057b
DJ
6559 # Target-specific object files
6560 for i in ${gdb_target_obs}; do
6561 case " $TARGET_OBS " in
6562 *" ${i} "*) ;;
6563 *)
6564 TARGET_OBS="$TARGET_OBS ${i}"
6565 ;;
6566 esac
6567 done
20e95c23 6568
783e057b
DJ
6569 # Check whether this target needs 64-bit CORE_ADDR
6570 if test x${want64} = xfalse; then
6571 . ${srcdir}/../bfd/config.bfd
6572 fi
b292c783
JK
6573
6574 # Check whether this target is native and supports gcore.
6575 if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \
6576 && $gdb_have_gcore; then
6577 HAVE_NATIVE_GCORE_TARGET=1
6578 fi
783e057b 6579 fi
20e95c23
DJ
6580done
6581
783e057b
DJ
6582if test x${all_targets} = xtrue; then
6583
6584 # We want all 64-bit targets if we either:
6585 # - run on a 64-bit host or
6586 # - already require 64-bit support for some other target or
6587 # - the --enable-64-bit-bfd option was supplied
6588 # Otherwise we only support all 32-bit targets.
6589 #
6590 # NOTE: This test must be in sync with the corresponding
6591 # tests in BFD!
20e95c23 6592
783e057b 6593 if test x${want64} = xfalse; then
81ecdfbb
RW
6594 # The cast to long int works around a bug in the HP C Compiler
6595# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6596# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6597# This bug is HP SR number 8606223364.
6598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6599$as_echo_n "checking size of long... " >&6; }
6600if test "${ac_cv_sizeof_long+set}" = set; then :
6601 $as_echo_n "(cached) " >&6
c0993dbe 6602else
81ecdfbb 6603 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
c0993dbe 6604
81ecdfbb
RW
6605else
6606 if test "$ac_cv_type_long" = yes; then
6607 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6608$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6609{ as_fn_set_status 77
6610as_fn_error "cannot compute sizeof (long)
6611See \`config.log' for more details." "$LINENO" 5; }; }
6612 else
6613 ac_cv_sizeof_long=0
6614 fi
c0993dbe 6615fi
81ecdfbb 6616
c0993dbe 6617fi
81ecdfbb
RW
6618{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6619$as_echo "$ac_cv_sizeof_long" >&6; }
c0993dbe 6620
c0993dbe 6621
c0993dbe 6622
c0993dbe
UW
6623cat >>confdefs.h <<_ACEOF
6624#define SIZEOF_LONG $ac_cv_sizeof_long
6625_ACEOF
6626
6627
6628 if test "x${ac_cv_sizeof_long}" = "x8"; then
6629 want64=true
6630 fi
6631 fi
6632 if test x${want64} = xtrue; then
6633 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
6634 else
6635 TARGET_OBS='$(ALL_TARGET_OBS)'
6636 fi
6637fi
6638
6639
6640
b292c783 6641
c0993dbe
UW
6642# For other settings, only the main target counts.
6643gdb_sim=
6644gdb_osabi=
6645build_gdbserver=
6646targ=$target; . ${srcdir}/configure.tgt
6647
6648# Fetch the default architecture and default target vector from BFD.
6649targ=$target; . $srcdir/../bfd/config.bfd
6650
6651# We only want the first architecture, so strip off the others if
6652# there is more than one.
6653targ_archs=`echo $targ_archs | sed 's/ .*//'`
6654
6655if test "x$targ_archs" != x; then
6656
6657cat >>confdefs.h <<_ACEOF
6658#define DEFAULT_BFD_ARCH $targ_archs
6659_ACEOF
6660
6661fi
6662if test "x$targ_defvec" != x; then
6663
6664cat >>confdefs.h <<_ACEOF
6665#define DEFAULT_BFD_VEC $targ_defvec
6666_ACEOF
6667
6668fi
6669
c0993dbe
UW
6670# The CLI cannot be disabled yet, but may be in the future.
6671
6672# Enable CLI.
81ecdfbb
RW
6673# Check whether --enable-gdbcli was given.
6674if test "${enable_gdbcli+set}" = set; then :
6675 enableval=$enable_gdbcli; case $enableval in
c0993dbe
UW
6676 yes)
6677 ;;
6678 no)
81ecdfbb 6679 as_fn_error "the command-line interface cannot be disabled yet" "$LINENO" 5 ;;
c0993dbe 6680 *)
81ecdfbb 6681 as_fn_error "bad value $enableval for --enable-gdbcli" "$LINENO" 5 ;;
c0993dbe
UW
6682 esac
6683else
6684 enable_gdbcli=yes
81ecdfbb
RW
6685fi
6686
c0993dbe
UW
6687if test x"$enable_gdbcli" = xyes; then
6688 if test -d $srcdir/cli; then
6689 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
6690 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
6691 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
6692 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
6693 fi
6694fi
6695
6696# Enable MI.
81ecdfbb
RW
6697# Check whether --enable-gdbmi was given.
6698if test "${enable_gdbmi+set}" = set; then :
6699 enableval=$enable_gdbmi; case $enableval in
c0993dbe
UW
6700 yes | no)
6701 ;;
6702 *)
81ecdfbb 6703 as_fn_error "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
c0993dbe
UW
6704 esac
6705else
6706 enable_gdbmi=yes
81ecdfbb
RW
6707fi
6708
c0993dbe
UW
6709if test x"$enable_gdbmi" = xyes; then
6710 if test -d $srcdir/mi; then
6711 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
6712 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
6713 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
6714 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
6715 fi
6716fi
6717
6718# Enable TUI.
81ecdfbb
RW
6719# Check whether --enable-tui was given.
6720if test "${enable_tui+set}" = set; then :
6721 enableval=$enable_tui; case $enableval in
3ca64bd3 6722 yes | no | auto)
c0993dbe
UW
6723 ;;
6724 *)
81ecdfbb 6725 as_fn_error "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
c0993dbe
UW
6726 esac
6727else
3ca64bd3 6728 enable_tui=auto
81ecdfbb
RW
6729fi
6730
c0993dbe
UW
6731
6732# Enable gdbtk.
81ecdfbb
RW
6733# Check whether --enable-gdbtk was given.
6734if test "${enable_gdbtk+set}" = set; then :
6735 enableval=$enable_gdbtk; case $enableval in
c0993dbe
UW
6736 yes | no)
6737 ;;
6738 *)
81ecdfbb 6739 as_fn_error "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
c0993dbe
UW
6740 esac
6741else
5062cc19 6742 if test -d $srcdir/gdbtk; then
c0993dbe
UW
6743 enable_gdbtk=yes
6744 else
6745 enable_gdbtk=no
6746 fi
81ecdfbb
RW
6747fi
6748
c0993dbe
UW
6749# We unconditionally disable gdbtk tests on selected platforms.
6750case $host_os in
6751 go32* | windows*)
81ecdfbb
RW
6752 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
6753$as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
c0993dbe
UW
6754 enable_gdbtk=no ;;
6755esac
6756
05e7c244 6757# Libunwind support for ia64.
bec39cab 6758
05e7c244
JK
6759
6760# Check whether --with-libunwind-ia64 was given.
6761if test "${with_libunwind_ia64+set}" = set; then :
6762 withval=$with_libunwind_ia64;
bec39cab 6763else
05e7c244
JK
6764 with_libunwind_ia64=auto
6765fi
bec39cab 6766
05e7c244
JK
6767
6768# Backward compatibility option.
6769if test "${with_libunwind+set}" = set; then
6770 if test x"$with_libunwind_ia64" != xauto; then
6771 as_fn_error "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5
6772 fi
6773 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5
6774$as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;}
6775 with_libunwind_ia64="$with_libunwind"
6776fi
6777
6778case "$with_libunwind_ia64" in
6779 yes | no)
6780 ;;
6781 auto)
6782 for ac_header in libunwind-ia64.h
81ecdfbb 6783do :
b54a8fd7
PA
6784 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
6785if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
bec39cab 6786 cat >>confdefs.h <<_ACEOF
b54a8fd7 6787#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
6788_ACEOF
6789
6790fi
6791
6792done
6793
05e7c244
JK
6794 with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h
6795 ;;
6796 *)
6797 as_fn_error "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5
6798 ;;
6799esac
bec39cab 6800
05e7c244 6801if test x"$with_libunwind_ia64" = xyes; then
b54a8fd7 6802 for ac_header in libunwind-ia64.h
81ecdfbb 6803do :
b54a8fd7
PA
6804 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
6805if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
bec39cab 6806 cat >>confdefs.h <<_ACEOF
b54a8fd7 6807#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
6808_ACEOF
6809
6810fi
6811
6812done
6813
05e7c244
JK
6814 if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then
6815 as_fn_error "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5
6816 fi
6817 CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o"
6818 CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o"
6819 CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c"
a9322a30
TT
6820fi
6821
cb01cfba
JB
6822opt_curses=no
6823
81ecdfbb
RW
6824# Check whether --with-curses was given.
6825if test "${with_curses+set}" = set; then :
6826 withval=$with_curses; opt_curses=$withval
6827fi
6828
cb01cfba 6829
76a39ba7 6830prefer_curses=no
cb01cfba 6831if test "$opt_curses" = "yes"; then
76a39ba7 6832 prefer_curses=yes
cb01cfba
JB
6833fi
6834
a9322a30 6835# Profiling support.
81ecdfbb
RW
6836# Check whether --enable-profiling was given.
6837if test "${enable_profiling+set}" = set; then :
6838 enableval=$enable_profiling; case $enableval in
a9322a30
TT
6839 yes | no)
6840 ;;
6841 *)
81ecdfbb 6842 as_fn_error "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
a9322a30
TT
6843 esac
6844else
6845 enable_profiling=no
81ecdfbb 6846fi
bec39cab 6847
a9322a30
TT
6848
6849for ac_func in monstartup _mcleanup
81ecdfbb
RW
6850do :
6851 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6852ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
6853eval as_val=\$$as_ac_var
6854 if test "x$as_val" = x""yes; then :
6855 cat >>confdefs.h <<_ACEOF
6856#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 6857_ACEOF
a9322a30 6858
81ecdfbb
RW
6859fi
6860done
a9322a30 6861
81ecdfbb
RW
6862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
6863$as_echo_n "checking for _etext... " >&6; }
6864if test "${ac_cv_var__etext+set}" = set; then :
6865 $as_echo_n "(cached) " >&6
6866else
6867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6868/* end confdefs.h. */
6869#include <stdlib.h>
6870extern char _etext;
a9322a30
TT
6871
6872int
6873main ()
6874{
6875free (&_etext);
6876 ;
6877 return 0;
6878}
bec39cab 6879_ACEOF
81ecdfbb 6880if ac_fn_c_try_link "$LINENO"; then :
a9322a30 6881 ac_cv_var__etext=yes
bec39cab 6882else
81ecdfbb 6883 ac_cv_var__etext=no
bec39cab 6884fi
81ecdfbb
RW
6885rm -f core conftest.err conftest.$ac_objext \
6886 conftest$ac_exeext conftest.$ac_ext
bec39cab 6887fi
81ecdfbb
RW
6888{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
6889$as_echo "$ac_cv_var__etext" >&6; }
a9322a30 6890if test $ac_cv_var__etext = yes; then
60ca704f 6891
81ecdfbb 6892$as_echo "#define HAVE__ETEXT 1" >>confdefs.h
bec39cab 6893
bec39cab 6894fi
81ecdfbb
RW
6895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
6896$as_echo_n "checking for etext... " >&6; }
6897if test "${ac_cv_var_etext+set}" = set; then :
6898 $as_echo_n "(cached) " >&6
bec39cab 6899else
81ecdfbb 6900 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6901/* end confdefs.h. */
a9322a30
TT
6902#include <stdlib.h>
6903extern char etext;
bec39cab
AC
6904
6905int
6906main ()
6907{
a9322a30 6908free (&etext);
bec39cab
AC
6909 ;
6910 return 0;
6911}
6912_ACEOF
81ecdfbb 6913if ac_fn_c_try_link "$LINENO"; then :
a9322a30 6914 ac_cv_var_etext=yes
bec39cab 6915else
81ecdfbb 6916 ac_cv_var_etext=no
bec39cab 6917fi
81ecdfbb
RW
6918rm -f core conftest.err conftest.$ac_objext \
6919 conftest$ac_exeext conftest.$ac_ext
bec39cab 6920fi
81ecdfbb
RW
6921{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
6922$as_echo "$ac_cv_var_etext" >&6; }
a9322a30
TT
6923if test $ac_cv_var_etext = yes; then
6924
81ecdfbb 6925$as_echo "#define HAVE_ETEXT 1" >>confdefs.h
bec39cab
AC
6926
6927fi
a9322a30
TT
6928if test "$enable_profiling" = yes ; then
6929 if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
81ecdfbb 6930 as_fn_error "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
a9322a30
TT
6931 fi
6932 PROFILE_CFLAGS=-pg
6933 OLD_CFLAGS="$CFLAGS"
6934 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
bec39cab 6935
81ecdfbb
RW
6936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
6937$as_echo_n "checking whether $CC supports -pg... " >&6; }
6938if test "${ac_cv_cc_supports_pg+set}" = set; then :
6939 $as_echo_n "(cached) " >&6
bec39cab 6940else
81ecdfbb 6941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6942/* end confdefs.h. */
bec39cab
AC
6943
6944int
6945main ()
6946{
a9322a30 6947int x;
bec39cab
AC
6948 ;
6949 return 0;
6950}
6951_ACEOF
81ecdfbb 6952if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 6953 ac_cv_cc_supports_pg=yes
bec39cab 6954else
81ecdfbb 6955 ac_cv_cc_supports_pg=no
bec39cab 6956fi
81ecdfbb 6957rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 6958fi
81ecdfbb
RW
6959{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
6960$as_echo "$ac_cv_cc_supports_pg" >&6; }
bec39cab 6961
a9322a30 6962 if test $ac_cv_cc_supports_pg = no; then
81ecdfbb 6963 as_fn_error "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
a9322a30 6964 fi
bec39cab 6965
a9322a30 6966 CFLAGS="$OLD_CFLAGS"
bec39cab
AC
6967fi
6968
c16158bc
JM
6969
6970
81ecdfbb
RW
6971# Check whether --with-pkgversion was given.
6972if test "${with_pkgversion+set}" = set; then :
6973 withval=$with_pkgversion; case "$withval" in
6974 yes) as_fn_error "package version not specified" "$LINENO" 5 ;;
c16158bc
JM
6975 no) PKGVERSION= ;;
6976 *) PKGVERSION="($withval) " ;;
6977 esac
6978else
6979 PKGVERSION="(GDB) "
6980
81ecdfbb 6981fi
c16158bc
JM
6982
6983
6984
6985
81ecdfbb
RW
6986
6987# Check whether --with-bugurl was given.
6988if test "${with_bugurl+set}" = set; then :
6989 withval=$with_bugurl; case "$withval" in
6990 yes) as_fn_error "bug URL not specified" "$LINENO" 5 ;;
c16158bc
JM
6991 no) BUGURL=
6992 ;;
6993 *) BUGURL="$withval"
6994 ;;
6995 esac
6996else
6997 BUGURL="http://www.gnu.org/software/gdb/bugs/"
6998
81ecdfbb
RW
6999fi
7000
c16158bc
JM
7001 case ${BUGURL} in
7002 "")
7003 REPORT_BUGS_TO=
7004 REPORT_BUGS_TEXI=
7005 ;;
7006 *)
7007 REPORT_BUGS_TO="<$BUGURL>"
7008 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
7009 ;;
7010 esac;
7011
7012
7013
7014
7015cat >>confdefs.h <<_ACEOF
7016#define PKGVERSION "$PKGVERSION"
7017_ACEOF
7018
7019
7020cat >>confdefs.h <<_ACEOF
7021#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
7022_ACEOF
7023
7024
bec39cab
AC
7025# --------------------- #
7026# Checks for programs. #
7027# --------------------- #
7028
7029for ac_prog in gawk mawk nawk awk
7030do
7031 # Extract the first word of "$ac_prog", so it can be a program name with args.
7032set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
7033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7034$as_echo_n "checking for $ac_word... " >&6; }
7035if test "${ac_cv_prog_AWK+set}" = set; then :
7036 $as_echo_n "(cached) " >&6
bec39cab
AC
7037else
7038 if test -n "$AWK"; then
7039 ac_cv_prog_AWK="$AWK" # Let the user override the test.
7040else
7041as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7042for as_dir in $PATH
7043do
7044 IFS=$as_save_IFS
7045 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7046 for ac_exec_ext in '' $ac_executable_extensions; do
7047 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7048 ac_cv_prog_AWK="$ac_prog"
81ecdfbb 7049 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7050 break 2
7051 fi
7052done
81ecdfbb
RW
7053 done
7054IFS=$as_save_IFS
bec39cab
AC
7055
7056fi
7057fi
7058AWK=$ac_cv_prog_AWK
7059if test -n "$AWK"; then
81ecdfbb
RW
7060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
7061$as_echo "$AWK" >&6; }
bec39cab 7062else
81ecdfbb
RW
7063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7064$as_echo "no" >&6; }
bec39cab
AC
7065fi
7066
bec39cab 7067
81ecdfbb 7068 test -n "$AWK" && break
bec39cab
AC
7069done
7070
c971b7fa
PA
7071# Find a good install program. We prefer a C program (faster),
7072# so one script is as good as another. But avoid the broken or
7073# incompatible versions:
7074# SysV /etc/install, /usr/sbin/install
7075# SunOS /usr/etc/install
7076# IRIX /sbin/install
7077# AIX /bin/install
7078# AmigaOS /C/install, which installs bootblocks on floppy discs
7079# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
7080# AFS /usr/afsws/bin/install, which mishandles nonexistent args
7081# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
7082# OS/2's system install, which has a completely different semantic
7083# ./install, which can be erroneously created by make from ./install.sh.
7084# Reject install programs that cannot install multiple files.
7085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
7086$as_echo_n "checking for a BSD-compatible install... " >&6; }
7087if test -z "$INSTALL"; then
7088if test "${ac_cv_path_install+set}" = set; then :
7089 $as_echo_n "(cached) " >&6
7090else
7091 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7092for as_dir in $PATH
7093do
7094 IFS=$as_save_IFS
7095 test -z "$as_dir" && as_dir=.
7096 # Account for people who put trailing slashes in PATH elements.
7097case $as_dir/ in #((
7098 ./ | .// | /[cC]/* | \
7099 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
7100 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
7101 /usr/ucb/* ) ;;
7102 *)
7103 # OSF1 and SCO ODT 3.0 have their own names for install.
7104 # Don't use installbsd from OSF since it installs stuff as root
7105 # by default.
7106 for ac_prog in ginstall scoinst install; do
7107 for ac_exec_ext in '' $ac_executable_extensions; do
7108 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
7109 if test $ac_prog = install &&
7110 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7111 # AIX install. It has an incompatible calling convention.
7112 :
7113 elif test $ac_prog = install &&
7114 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7115 # program-specific install script used by HP pwplus--don't use.
7116 :
7117 else
7118 rm -rf conftest.one conftest.two conftest.dir
7119 echo one > conftest.one
7120 echo two > conftest.two
7121 mkdir conftest.dir
7122 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
7123 test -s conftest.one && test -s conftest.two &&
7124 test -s conftest.dir/conftest.one &&
7125 test -s conftest.dir/conftest.two
7126 then
7127 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
7128 break 3
7129 fi
7130 fi
7131 fi
7132 done
7133 done
7134 ;;
7135esac
7136
7137 done
7138IFS=$as_save_IFS
7139
7140rm -rf conftest.one conftest.two conftest.dir
7141
7142fi
7143 if test "${ac_cv_path_install+set}" = set; then
7144 INSTALL=$ac_cv_path_install
7145 else
7146 # As a last resort, use the slow shell script. Don't cache a
7147 # value for INSTALL within a source directory, because that will
7148 # break other packages using the cache if that directory is
7149 # removed, or if the value is a relative name.
7150 INSTALL=$ac_install_sh
7151 fi
7152fi
7153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
7154$as_echo "$INSTALL" >&6; }
7155
7156# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7157# It thinks the first close brace ends the variable substitution.
7158test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7159
7160test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
7161
7162test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
bec39cab 7163
81ecdfbb
RW
7164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7165$as_echo_n "checking whether ln -s works... " >&6; }
bec39cab
AC
7166LN_S=$as_ln_s
7167if test "$LN_S" = "ln -s"; then
81ecdfbb
RW
7168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7169$as_echo "yes" >&6; }
bec39cab 7170else
81ecdfbb
RW
7171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
7172$as_echo "no, using $LN_S" >&6; }
bec39cab
AC
7173fi
7174
7175if test -n "$ac_tool_prefix"; then
7176 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7177set dummy ${ac_tool_prefix}ranlib; ac_word=$2
81ecdfbb
RW
7178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7179$as_echo_n "checking for $ac_word... " >&6; }
7180if test "${ac_cv_prog_RANLIB+set}" = set; then :
7181 $as_echo_n "(cached) " >&6
bec39cab
AC
7182else
7183 if test -n "$RANLIB"; then
7184 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7185else
7186as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7187for as_dir in $PATH
7188do
7189 IFS=$as_save_IFS
7190 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7191 for ac_exec_ext in '' $ac_executable_extensions; do
7192 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7193 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
81ecdfbb 7194 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7195 break 2
7196 fi
7197done
81ecdfbb
RW
7198 done
7199IFS=$as_save_IFS
bec39cab
AC
7200
7201fi
7202fi
7203RANLIB=$ac_cv_prog_RANLIB
7204if test -n "$RANLIB"; then
81ecdfbb
RW
7205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
7206$as_echo "$RANLIB" >&6; }
bec39cab 7207else
81ecdfbb
RW
7208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7209$as_echo "no" >&6; }
bec39cab
AC
7210fi
7211
81ecdfbb 7212
bec39cab
AC
7213fi
7214if test -z "$ac_cv_prog_RANLIB"; then
7215 ac_ct_RANLIB=$RANLIB
7216 # Extract the first word of "ranlib", so it can be a program name with args.
7217set dummy ranlib; ac_word=$2
81ecdfbb
RW
7218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7219$as_echo_n "checking for $ac_word... " >&6; }
7220if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
7221 $as_echo_n "(cached) " >&6
bec39cab
AC
7222else
7223 if test -n "$ac_ct_RANLIB"; then
7224 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7225else
7226as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7227for as_dir in $PATH
7228do
7229 IFS=$as_save_IFS
7230 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7231 for ac_exec_ext in '' $ac_executable_extensions; do
7232 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7233 ac_cv_prog_ac_ct_RANLIB="ranlib"
81ecdfbb 7234 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7235 break 2
7236 fi
7237done
81ecdfbb
RW
7238 done
7239IFS=$as_save_IFS
bec39cab 7240
bec39cab
AC
7241fi
7242fi
7243ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7244if test -n "$ac_ct_RANLIB"; then
81ecdfbb
RW
7245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
7246$as_echo "$ac_ct_RANLIB" >&6; }
bec39cab 7247else
81ecdfbb
RW
7248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7249$as_echo "no" >&6; }
bec39cab
AC
7250fi
7251
81ecdfbb
RW
7252 if test "x$ac_ct_RANLIB" = x; then
7253 RANLIB=":"
7254 else
7255 case $cross_compiling:$ac_tool_warned in
7256yes:)
7257{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7258$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7259ac_tool_warned=yes ;;
7260esac
7261 RANLIB=$ac_ct_RANLIB
7262 fi
bec39cab
AC
7263else
7264 RANLIB="$ac_cv_prog_RANLIB"
7265fi
7266
7267for ac_prog in 'bison -y' byacc
7268do
7269 # Extract the first word of "$ac_prog", so it can be a program name with args.
7270set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
7271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7272$as_echo_n "checking for $ac_word... " >&6; }
7273if test "${ac_cv_prog_YACC+set}" = set; then :
7274 $as_echo_n "(cached) " >&6
bec39cab
AC
7275else
7276 if test -n "$YACC"; then
7277 ac_cv_prog_YACC="$YACC" # Let the user override the test.
7278else
7279as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7280for as_dir in $PATH
7281do
7282 IFS=$as_save_IFS
7283 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7284 for ac_exec_ext in '' $ac_executable_extensions; do
7285 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7286 ac_cv_prog_YACC="$ac_prog"
81ecdfbb 7287 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7288 break 2
7289 fi
7290done
81ecdfbb
RW
7291 done
7292IFS=$as_save_IFS
bec39cab
AC
7293
7294fi
7295fi
7296YACC=$ac_cv_prog_YACC
7297if test -n "$YACC"; then
81ecdfbb
RW
7298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
7299$as_echo "$YACC" >&6; }
bec39cab 7300else
81ecdfbb
RW
7301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7302$as_echo "no" >&6; }
bec39cab
AC
7303fi
7304
81ecdfbb 7305
bec39cab
AC
7306 test -n "$YACC" && break
7307done
7308test -n "$YACC" || YACC="yacc"
7309
7310
7311if test -n "$ac_tool_prefix"; then
7312 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
7313set dummy ${ac_tool_prefix}ar; ac_word=$2
81ecdfbb
RW
7314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7315$as_echo_n "checking for $ac_word... " >&6; }
7316if test "${ac_cv_prog_AR+set}" = set; then :
7317 $as_echo_n "(cached) " >&6
bec39cab
AC
7318else
7319 if test -n "$AR"; then
7320 ac_cv_prog_AR="$AR" # Let the user override the test.
7321else
7322as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7323for as_dir in $PATH
7324do
7325 IFS=$as_save_IFS
7326 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7327 for ac_exec_ext in '' $ac_executable_extensions; do
7328 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7329 ac_cv_prog_AR="${ac_tool_prefix}ar"
81ecdfbb 7330 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7331 break 2
7332 fi
7333done
81ecdfbb
RW
7334 done
7335IFS=$as_save_IFS
bec39cab
AC
7336
7337fi
7338fi
7339AR=$ac_cv_prog_AR
7340if test -n "$AR"; then
81ecdfbb
RW
7341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
7342$as_echo "$AR" >&6; }
bec39cab 7343else
81ecdfbb
RW
7344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7345$as_echo "no" >&6; }
bec39cab
AC
7346fi
7347
81ecdfbb 7348
bec39cab
AC
7349fi
7350if test -z "$ac_cv_prog_AR"; then
7351 ac_ct_AR=$AR
7352 # Extract the first word of "ar", so it can be a program name with args.
7353set dummy ar; ac_word=$2
81ecdfbb
RW
7354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7355$as_echo_n "checking for $ac_word... " >&6; }
7356if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
7357 $as_echo_n "(cached) " >&6
bec39cab
AC
7358else
7359 if test -n "$ac_ct_AR"; then
7360 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
7361else
7362as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7363for as_dir in $PATH
7364do
7365 IFS=$as_save_IFS
7366 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7367 for ac_exec_ext in '' $ac_executable_extensions; do
7368 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7369 ac_cv_prog_ac_ct_AR="ar"
81ecdfbb 7370 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7371 break 2
7372 fi
7373done
81ecdfbb
RW
7374 done
7375IFS=$as_save_IFS
bec39cab
AC
7376
7377fi
7378fi
7379ac_ct_AR=$ac_cv_prog_ac_ct_AR
7380if test -n "$ac_ct_AR"; then
81ecdfbb
RW
7381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
7382$as_echo "$ac_ct_AR" >&6; }
bec39cab 7383else
81ecdfbb
RW
7384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7385$as_echo "no" >&6; }
bec39cab
AC
7386fi
7387
81ecdfbb
RW
7388 if test "x$ac_ct_AR" = x; then
7389 AR=""
7390 else
7391 case $cross_compiling:$ac_tool_warned in
7392yes:)
7393{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7394$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7395ac_tool_warned=yes ;;
7396esac
7397 AR=$ac_ct_AR
7398 fi
bec39cab
AC
7399else
7400 AR="$ac_cv_prog_AR"
7401fi
7402
7403if test -n "$ac_tool_prefix"; then
7404 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
7405set dummy ${ac_tool_prefix}dlltool; ac_word=$2
81ecdfbb
RW
7406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7407$as_echo_n "checking for $ac_word... " >&6; }
7408if test "${ac_cv_prog_DLLTOOL+set}" = set; then :
7409 $as_echo_n "(cached) " >&6
bec39cab
AC
7410else
7411 if test -n "$DLLTOOL"; then
7412 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
7413else
7414as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7415for as_dir in $PATH
7416do
7417 IFS=$as_save_IFS
7418 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7419 for ac_exec_ext in '' $ac_executable_extensions; do
7420 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7421 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
81ecdfbb 7422 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7423 break 2
7424 fi
7425done
81ecdfbb
RW
7426 done
7427IFS=$as_save_IFS
bec39cab
AC
7428
7429fi
7430fi
7431DLLTOOL=$ac_cv_prog_DLLTOOL
7432if test -n "$DLLTOOL"; then
81ecdfbb
RW
7433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
7434$as_echo "$DLLTOOL" >&6; }
bec39cab 7435else
81ecdfbb
RW
7436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7437$as_echo "no" >&6; }
bec39cab
AC
7438fi
7439
81ecdfbb 7440
bec39cab
AC
7441fi
7442if test -z "$ac_cv_prog_DLLTOOL"; then
7443 ac_ct_DLLTOOL=$DLLTOOL
7444 # Extract the first word of "dlltool", so it can be a program name with args.
7445set dummy dlltool; ac_word=$2
81ecdfbb
RW
7446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7447$as_echo_n "checking for $ac_word... " >&6; }
7448if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then :
7449 $as_echo_n "(cached) " >&6
bec39cab
AC
7450else
7451 if test -n "$ac_ct_DLLTOOL"; then
7452 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
7453else
7454as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7455for as_dir in $PATH
7456do
7457 IFS=$as_save_IFS
7458 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7459 for ac_exec_ext in '' $ac_executable_extensions; do
7460 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7461 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
81ecdfbb 7462 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7463 break 2
7464 fi
7465done
81ecdfbb
RW
7466 done
7467IFS=$as_save_IFS
bec39cab
AC
7468
7469fi
7470fi
7471ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
7472if test -n "$ac_ct_DLLTOOL"; then
81ecdfbb
RW
7473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
7474$as_echo "$ac_ct_DLLTOOL" >&6; }
bec39cab 7475else
81ecdfbb
RW
7476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7477$as_echo "no" >&6; }
bec39cab
AC
7478fi
7479
81ecdfbb
RW
7480 if test "x$ac_ct_DLLTOOL" = x; then
7481 DLLTOOL=""
7482 else
7483 case $cross_compiling:$ac_tool_warned in
7484yes:)
7485{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7486$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7487ac_tool_warned=yes ;;
7488esac
7489 DLLTOOL=$ac_ct_DLLTOOL
7490 fi
bec39cab
AC
7491else
7492 DLLTOOL="$ac_cv_prog_DLLTOOL"
7493fi
7494
7495if test -n "$ac_tool_prefix"; then
7496 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
7497set dummy ${ac_tool_prefix}windres; ac_word=$2
81ecdfbb
RW
7498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7499$as_echo_n "checking for $ac_word... " >&6; }
7500if test "${ac_cv_prog_WINDRES+set}" = set; then :
7501 $as_echo_n "(cached) " >&6
bec39cab
AC
7502else
7503 if test -n "$WINDRES"; then
7504 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
7505else
7506as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7507for as_dir in $PATH
7508do
7509 IFS=$as_save_IFS
7510 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7511 for ac_exec_ext in '' $ac_executable_extensions; do
7512 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7513 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
81ecdfbb 7514 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7515 break 2
7516 fi
7517done
81ecdfbb
RW
7518 done
7519IFS=$as_save_IFS
bec39cab
AC
7520
7521fi
7522fi
7523WINDRES=$ac_cv_prog_WINDRES
7524if test -n "$WINDRES"; then
81ecdfbb
RW
7525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
7526$as_echo "$WINDRES" >&6; }
bec39cab 7527else
81ecdfbb
RW
7528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7529$as_echo "no" >&6; }
bec39cab
AC
7530fi
7531
81ecdfbb 7532
bec39cab
AC
7533fi
7534if test -z "$ac_cv_prog_WINDRES"; then
7535 ac_ct_WINDRES=$WINDRES
7536 # Extract the first word of "windres", so it can be a program name with args.
7537set dummy windres; ac_word=$2
81ecdfbb
RW
7538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7539$as_echo_n "checking for $ac_word... " >&6; }
7540if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then :
7541 $as_echo_n "(cached) " >&6
bec39cab
AC
7542else
7543 if test -n "$ac_ct_WINDRES"; then
7544 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
7545else
7546as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7547for as_dir in $PATH
7548do
7549 IFS=$as_save_IFS
7550 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7551 for ac_exec_ext in '' $ac_executable_extensions; do
7552 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7553 ac_cv_prog_ac_ct_WINDRES="windres"
81ecdfbb 7554 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7555 break 2
7556 fi
7557done
81ecdfbb
RW
7558 done
7559IFS=$as_save_IFS
bec39cab
AC
7560
7561fi
7562fi
7563ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
7564if test -n "$ac_ct_WINDRES"; then
81ecdfbb
RW
7565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
7566$as_echo "$ac_ct_WINDRES" >&6; }
bec39cab 7567else
81ecdfbb
RW
7568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7569$as_echo "no" >&6; }
c906108c 7570fi
bec39cab 7571
81ecdfbb
RW
7572 if test "x$ac_ct_WINDRES" = x; then
7573 WINDRES=""
7574 else
7575 case $cross_compiling:$ac_tool_warned in
7576yes:)
7577{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7578$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7579ac_tool_warned=yes ;;
7580esac
7581 WINDRES=$ac_ct_WINDRES
7582 fi
c906108c 7583else
bec39cab 7584 WINDRES="$ac_cv_prog_WINDRES"
c906108c
SS
7585fi
7586
bec39cab 7587
036c3acb
TS
7588case $host_os in
7589 gnu*)
7590 # Needed for GNU Hurd hosts.
7591 if test -n "$ac_tool_prefix"; then
bec39cab
AC
7592 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
7593set dummy ${ac_tool_prefix}mig; ac_word=$2
81ecdfbb
RW
7594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7595$as_echo_n "checking for $ac_word... " >&6; }
7596if test "${ac_cv_prog_MIG+set}" = set; then :
7597 $as_echo_n "(cached) " >&6
c906108c 7598else
bec39cab
AC
7599 if test -n "$MIG"; then
7600 ac_cv_prog_MIG="$MIG" # Let the user override the test.
7601else
7602as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7603for as_dir in $PATH
7604do
7605 IFS=$as_save_IFS
7606 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7607 for ac_exec_ext in '' $ac_executable_extensions; do
7608 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7609 ac_cv_prog_MIG="${ac_tool_prefix}mig"
81ecdfbb 7610 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7611 break 2
7612 fi
7613done
81ecdfbb
RW
7614 done
7615IFS=$as_save_IFS
bec39cab 7616
c906108c 7617fi
bec39cab
AC
7618fi
7619MIG=$ac_cv_prog_MIG
7620if test -n "$MIG"; then
81ecdfbb
RW
7621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
7622$as_echo "$MIG" >&6; }
c906108c 7623else
81ecdfbb
RW
7624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7625$as_echo "no" >&6; }
c906108c
SS
7626fi
7627
81ecdfbb 7628
bec39cab
AC
7629fi
7630if test -z "$ac_cv_prog_MIG"; then
7631 ac_ct_MIG=$MIG
7632 # Extract the first word of "mig", so it can be a program name with args.
7633set dummy mig; ac_word=$2
81ecdfbb
RW
7634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7635$as_echo_n "checking for $ac_word... " >&6; }
7636if test "${ac_cv_prog_ac_ct_MIG+set}" = set; then :
7637 $as_echo_n "(cached) " >&6
bec39cab
AC
7638else
7639 if test -n "$ac_ct_MIG"; then
7640 ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
7641else
7642as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7643for as_dir in $PATH
7644do
7645 IFS=$as_save_IFS
7646 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7647 for ac_exec_ext in '' $ac_executable_extensions; do
7648 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7649 ac_cv_prog_ac_ct_MIG="mig"
81ecdfbb 7650 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7651 break 2
7652 fi
7653done
81ecdfbb
RW
7654 done
7655IFS=$as_save_IFS
c906108c 7656
bec39cab
AC
7657fi
7658fi
7659ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
7660if test -n "$ac_ct_MIG"; then
81ecdfbb
RW
7661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
7662$as_echo "$ac_ct_MIG" >&6; }
bec39cab 7663else
81ecdfbb
RW
7664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7665$as_echo "no" >&6; }
bec39cab 7666fi
c906108c 7667
81ecdfbb
RW
7668 if test "x$ac_ct_MIG" = x; then
7669 MIG=""
7670 else
7671 case $cross_compiling:$ac_tool_warned in
7672yes:)
7673{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7674$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7675ac_tool_warned=yes ;;
7676esac
7677 MIG=$ac_ct_MIG
7678 fi
bec39cab
AC
7679else
7680 MIG="$ac_cv_prog_MIG"
7681fi
c906108c 7682
036c3acb
TS
7683 if test x"$MIG" = x; then
7684 as_fn_error "MIG not found but required for $host hosts" "$LINENO" 5
7685 fi
7686 ;;
7687esac
c906108c 7688
bec39cab
AC
7689# ---------------------- #
7690# Checks for libraries. #
7691# ---------------------- #
c906108c 7692
bec39cab 7693# We might need to link with -lm; most simulators need it.
81ecdfbb
RW
7694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
7695$as_echo_n "checking for main in -lm... " >&6; }
7696if test "${ac_cv_lib_m_main+set}" = set; then :
7697 $as_echo_n "(cached) " >&6
bec39cab
AC
7698else
7699 ac_check_lib_save_LIBS=$LIBS
7700LIBS="-lm $LIBS"
81ecdfbb 7701cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7702/* end confdefs.h. */
c906108c 7703
c906108c 7704
bec39cab
AC
7705int
7706main ()
7707{
81ecdfbb 7708return main ();
bec39cab
AC
7709 ;
7710 return 0;
7711}
7712_ACEOF
81ecdfbb 7713if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
7714 ac_cv_lib_m_main=yes
7715else
81ecdfbb 7716 ac_cv_lib_m_main=no
bec39cab 7717fi
81ecdfbb
RW
7718rm -f core conftest.err conftest.$ac_objext \
7719 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
7720LIBS=$ac_check_lib_save_LIBS
7721fi
81ecdfbb
RW
7722{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
7723$as_echo "$ac_cv_lib_m_main" >&6; }
7724if test "x$ac_cv_lib_m_main" = x""yes; then :
bec39cab
AC
7725 cat >>confdefs.h <<_ACEOF
7726#define HAVE_LIBM 1
7727_ACEOF
7728
7729 LIBS="-lm $LIBS"
c906108c 7730
c906108c 7731fi
bec39cab
AC
7732
7733
bec39cab 7734# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
81ecdfbb
RW
7735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
7736$as_echo_n "checking for library containing gethostbyname... " >&6; }
7737if test "${ac_cv_search_gethostbyname+set}" = set; then :
7738 $as_echo_n "(cached) " >&6
bec39cab
AC
7739else
7740 ac_func_search_save_LIBS=$LIBS
81ecdfbb 7741cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7742/* end confdefs.h. */
ddc9cd0f 7743
81ecdfbb
RW
7744/* Override any GCC internal prototype to avoid an error.
7745 Use char because int might match the return type of a GCC
7746 builtin and then its argument prototype would still apply. */
bec39cab
AC
7747#ifdef __cplusplus
7748extern "C"
7749#endif
bec39cab
AC
7750char gethostbyname ();
7751int
7752main ()
7753{
81ecdfbb 7754return gethostbyname ();
bec39cab
AC
7755 ;
7756 return 0;
7757}
7758_ACEOF
81ecdfbb
RW
7759for ac_lib in '' nsl; do
7760 if test -z "$ac_lib"; then
7761 ac_res="none required"
7762 else
7763 ac_res=-l$ac_lib
b4e70030 7764 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
7765 fi
7766 if ac_fn_c_try_link "$LINENO"; then :
7767 ac_cv_search_gethostbyname=$ac_res
7768fi
7769rm -f core conftest.err conftest.$ac_objext \
7770 conftest$ac_exeext
7771 if test "${ac_cv_search_gethostbyname+set}" = set; then :
7772 break
7773fi
7774done
7775if test "${ac_cv_search_gethostbyname+set}" = set; then :
ddc9cd0f 7776
bec39cab 7777else
81ecdfbb 7778 ac_cv_search_gethostbyname=no
bec39cab 7779fi
81ecdfbb 7780rm conftest.$ac_ext
bec39cab
AC
7781LIBS=$ac_func_search_save_LIBS
7782fi
81ecdfbb
RW
7783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
7784$as_echo "$ac_cv_search_gethostbyname" >&6; }
7785ac_res=$ac_cv_search_gethostbyname
7786if test "$ac_res" != no; then :
7787 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
96baa820 7788
bec39cab 7789fi
96baa820 7790
c906108c 7791
b4e70030 7792# Some systems (e.g. Solaris) have `socketpair' in libsocket.
81ecdfbb
RW
7793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
7794$as_echo_n "checking for library containing socketpair... " >&6; }
7795if test "${ac_cv_search_socketpair+set}" = set; then :
7796 $as_echo_n "(cached) " >&6
b4e70030
JB
7797else
7798 ac_func_search_save_LIBS=$LIBS
81ecdfbb 7799cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
7800/* end confdefs.h. */
7801
81ecdfbb
RW
7802/* Override any GCC internal prototype to avoid an error.
7803 Use char because int might match the return type of a GCC
7804 builtin and then its argument prototype would still apply. */
b4e70030
JB
7805#ifdef __cplusplus
7806extern "C"
7807#endif
b4e70030
JB
7808char socketpair ();
7809int
7810main ()
7811{
81ecdfbb 7812return socketpair ();
b4e70030
JB
7813 ;
7814 return 0;
7815}
7816_ACEOF
81ecdfbb
RW
7817for ac_lib in '' socket; do
7818 if test -z "$ac_lib"; then
7819 ac_res="none required"
7820 else
7821 ac_res=-l$ac_lib
b4e70030 7822 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
7823 fi
7824 if ac_fn_c_try_link "$LINENO"; then :
7825 ac_cv_search_socketpair=$ac_res
7826fi
7827rm -f core conftest.err conftest.$ac_objext \
7828 conftest$ac_exeext
7829 if test "${ac_cv_search_socketpair+set}" = set; then :
7830 break
7831fi
7832done
7833if test "${ac_cv_search_socketpair+set}" = set; then :
b4e70030 7834
b4e70030 7835else
81ecdfbb 7836 ac_cv_search_socketpair=no
b4e70030 7837fi
81ecdfbb 7838rm conftest.$ac_ext
b4e70030
JB
7839LIBS=$ac_func_search_save_LIBS
7840fi
81ecdfbb
RW
7841{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
7842$as_echo "$ac_cv_search_socketpair" >&6; }
7843ac_res=$ac_cv_search_socketpair
7844if test "$ac_res" != no; then :
7845 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
b4e70030
JB
7846
7847fi
7848
7849
233a11ab 7850# Link in zlib if we can. This allows us to read compressed debug sections.
b040ad30 7851
711a72d3 7852 # Use the system's zlib library.
39f3de7c
L
7853 zlibdir="-L\$(top_builddir)/../zlib"
7854 zlibinc="-I\$(top_srcdir)/../zlib"
b040ad30 7855
711a72d3
L
7856# Check whether --with-system-zlib was given.
7857if test "${with_system_zlib+set}" = set; then :
afa59b79
L
7858 withval=$with_system_zlib; if test x$with_system_zlib = xyes ; then
7859 zlibdir=
7860 zlibinc=
7861 fi
b040ad30 7862
233a11ab 7863fi
233a11ab 7864
233a11ab 7865
233a11ab 7866
b040ad30 7867
233a11ab 7868
25268153 7869# On FreeBSD we may need libutil for kinfo_getvmmap (used by fbsd-nat.c).
37773e78 7870# On GNU/kFreeBSD systems, FreeBSD libutil is renamed to libutil-freebsd.
25268153
JB
7871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getvmmap" >&5
7872$as_echo_n "checking for library containing kinfo_getvmmap... " >&6; }
7873if test "${ac_cv_search_kinfo_getvmmap+set}" = set; then :
7874 $as_echo_n "(cached) " >&6
7875else
7876 ac_func_search_save_LIBS=$LIBS
7877cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7878/* end confdefs.h. */
7879
7880/* Override any GCC internal prototype to avoid an error.
7881 Use char because int might match the return type of a GCC
7882 builtin and then its argument prototype would still apply. */
7883#ifdef __cplusplus
7884extern "C"
7885#endif
7886char kinfo_getvmmap ();
7887int
7888main ()
7889{
7890return kinfo_getvmmap ();
7891 ;
7892 return 0;
7893}
7894_ACEOF
37773e78 7895for ac_lib in '' util util-freebsd; do
25268153
JB
7896 if test -z "$ac_lib"; then
7897 ac_res="none required"
7898 else
7899 ac_res=-l$ac_lib
7900 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7901 fi
7902 if ac_fn_c_try_link "$LINENO"; then :
7903 ac_cv_search_kinfo_getvmmap=$ac_res
7904fi
7905rm -f core conftest.err conftest.$ac_objext \
7906 conftest$ac_exeext
7907 if test "${ac_cv_search_kinfo_getvmmap+set}" = set; then :
7908 break
7909fi
7910done
7911if test "${ac_cv_search_kinfo_getvmmap+set}" = set; then :
7912
7913else
7914 ac_cv_search_kinfo_getvmmap=no
7915fi
7916rm conftest.$ac_ext
7917LIBS=$ac_func_search_save_LIBS
7918fi
7919{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getvmmap" >&5
7920$as_echo "$ac_cv_search_kinfo_getvmmap" >&6; }
7921ac_res=$ac_cv_search_kinfo_getvmmap
7922if test "$ac_res" != no; then :
7923 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7924
7925$as_echo "#define HAVE_KINFO_GETVMMAP 1" >>confdefs.h
7926
7927fi
7928
7929
77f120bf 7930
016a3251
DD
7931 if test "X$prefix" = "XNONE"; then
7932 acl_final_prefix="$ac_default_prefix"
7933 else
7934 acl_final_prefix="$prefix"
7935 fi
7936 if test "X$exec_prefix" = "XNONE"; then
7937 acl_final_exec_prefix='${prefix}'
7938 else
7939 acl_final_exec_prefix="$exec_prefix"
7940 fi
7941 acl_save_prefix="$prefix"
7942 prefix="$acl_final_prefix"
7943 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
7944 prefix="$acl_save_prefix"
7945
7946
7947# Check whether --with-gnu-ld was given.
7948if test "${with_gnu_ld+set}" = set; then :
7949 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
7950else
7951 with_gnu_ld=no
7952fi
7953
7954# Prepare PATH_SEPARATOR.
7955# The user is always right.
7956if test "${PATH_SEPARATOR+set}" != set; then
7957 echo "#! /bin/sh" >conf$$.sh
7958 echo "exit 0" >>conf$$.sh
7959 chmod +x conf$$.sh
7960 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
7961 PATH_SEPARATOR=';'
7962 else
7963 PATH_SEPARATOR=:
7964 fi
7965 rm -f conf$$.sh
7966fi
7967ac_prog=ld
7968if test "$GCC" = yes; then
7969 # Check if gcc -print-prog-name=ld gives a path.
7970 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
7971$as_echo_n "checking for ld used by GCC... " >&6; }
7972 case $host in
7973 *-*-mingw*)
7974 # gcc leaves a trailing carriage return which upsets mingw
7975 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
7976 *)
7977 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
7978 esac
7979 case $ac_prog in
7980 # Accept absolute paths.
7981 [\\/]* | [A-Za-z]:[\\/]*)
7982 re_direlt='/[^/][^/]*/\.\./'
7983 # Canonicalize the path of ld
7984 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
7985 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
7986 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
7987 done
7988 test -z "$LD" && LD="$ac_prog"
7989 ;;
7990 "")
7991 # If it fails, then pretend we aren't using GCC.
7992 ac_prog=ld
7993 ;;
7994 *)
7995 # If it is relative, then search for the first ld in PATH.
7996 with_gnu_ld=unknown
7997 ;;
7998 esac
7999elif test "$with_gnu_ld" = yes; then
8000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8001$as_echo_n "checking for GNU ld... " >&6; }
8002else
8003 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8004$as_echo_n "checking for non-GNU ld... " >&6; }
8005fi
8006if test "${acl_cv_path_LD+set}" = set; then :
8007 $as_echo_n "(cached) " >&6
8008else
8009 if test -z "$LD"; then
8010 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
8011 for ac_dir in $PATH; do
8012 test -z "$ac_dir" && ac_dir=.
8013 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8014 acl_cv_path_LD="$ac_dir/$ac_prog"
8015 # Check to see if the program is GNU ld. I'd rather use --version,
8016 # but apparently some GNU ld's only accept -v.
8017 # Break only if it was the GNU/non-GNU ld that we prefer.
8018 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
8019 test "$with_gnu_ld" != no && break
8020 else
8021 test "$with_gnu_ld" != yes && break
8022 fi
8023 fi
8024 done
8025 IFS="$ac_save_ifs"
8026else
8027 acl_cv_path_LD="$LD" # Let the user override the test with a path.
8028fi
8029fi
8030
8031LD="$acl_cv_path_LD"
8032if test -n "$LD"; then
8033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8034$as_echo "$LD" >&6; }
8035else
8036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8037$as_echo "no" >&6; }
8038fi
8039test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
8040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8041$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
8042if test "${acl_cv_prog_gnu_ld+set}" = set; then :
8043 $as_echo_n "(cached) " >&6
8044else
8045 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
8046if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
8047 acl_cv_prog_gnu_ld=yes
8048else
8049 acl_cv_prog_gnu_ld=no
8050fi
8051fi
8052{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
8053$as_echo "$acl_cv_prog_gnu_ld" >&6; }
8054with_gnu_ld=$acl_cv_prog_gnu_ld
8055
8056
8057
8058 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
8059$as_echo_n "checking for shared library run path origin... " >&6; }
8060if test "${acl_cv_rpath+set}" = set; then :
8061 $as_echo_n "(cached) " >&6
8062else
8063
8064 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
8065 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
8066 . ./conftest.sh
8067 rm -f ./conftest.sh
8068 acl_cv_rpath=done
8069
8070fi
8071{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
8072$as_echo "$acl_cv_rpath" >&6; }
8073 wl="$acl_cv_wl"
8074 libext="$acl_cv_libext"
8075 shlibext="$acl_cv_shlibext"
8076 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
8077 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
8078 hardcode_direct="$acl_cv_hardcode_direct"
8079 hardcode_minus_L="$acl_cv_hardcode_minus_L"
8080 # Check whether --enable-rpath was given.
8081if test "${enable_rpath+set}" = set; then :
8082 enableval=$enable_rpath; :
8083else
8084 enable_rpath=yes
8085fi
8086
8087
8088
8089
8090
8091
8092
8093
8094 use_additional=yes
8095
8096 acl_save_prefix="$prefix"
8097 prefix="$acl_final_prefix"
8098 acl_save_exec_prefix="$exec_prefix"
8099 exec_prefix="$acl_final_exec_prefix"
8100
8101 eval additional_includedir=\"$includedir\"
8102 eval additional_libdir=\"$libdir\"
8103
8104 exec_prefix="$acl_save_exec_prefix"
8105 prefix="$acl_save_prefix"
77f120bf 8106
6c7a06a3 8107
81ecdfbb
RW
8108# Check whether --with-libiconv-prefix was given.
8109if test "${with_libiconv_prefix+set}" = set; then :
8110 withval=$with_libiconv_prefix;
016a3251
DD
8111 if test "X$withval" = "Xno"; then
8112 use_additional=no
8113 else
8114 if test "X$withval" = "X"; then
8115
8116 acl_save_prefix="$prefix"
8117 prefix="$acl_final_prefix"
8118 acl_save_exec_prefix="$exec_prefix"
8119 exec_prefix="$acl_final_exec_prefix"
8120
8121 eval additional_includedir=\"$includedir\"
8122 eval additional_libdir=\"$libdir\"
8123
8124 exec_prefix="$acl_save_exec_prefix"
8125 prefix="$acl_save_prefix"
8126
8127 else
8128 additional_includedir="$withval/include"
8129 additional_libdir="$withval/lib"
8130 fi
8131 fi
6c7a06a3 8132
81ecdfbb
RW
8133fi
8134
016a3251
DD
8135 LIBICONV=
8136 LTLIBICONV=
8137 INCICONV=
8138 rpathdirs=
8139 ltrpathdirs=
8140 names_already_handled=
8141 names_next_round='iconv '
8142 while test -n "$names_next_round"; do
8143 names_this_round="$names_next_round"
8144 names_next_round=
8145 for name in $names_this_round; do
8146 already_handled=
8147 for n in $names_already_handled; do
8148 if test "$n" = "$name"; then
8149 already_handled=yes
8150 break
8151 fi
8152 done
8153 if test -z "$already_handled"; then
8154 names_already_handled="$names_already_handled $name"
8155 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
8156 eval value=\"\$HAVE_LIB$uppername\"
8157 if test -n "$value"; then
8158 if test "$value" = yes; then
8159 eval value=\"\$LIB$uppername\"
8160 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
8161 eval value=\"\$LTLIB$uppername\"
8162 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
8163 else
8164 :
8165 fi
8166 else
8167 found_dir=
8168 found_la=
8169 found_so=
8170 found_a=
8171 if test $use_additional = yes; then
8172 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
8173 found_dir="$additional_libdir"
8174 found_so="$additional_libdir/lib$name.$shlibext"
8175 if test -f "$additional_libdir/lib$name.la"; then
8176 found_la="$additional_libdir/lib$name.la"
8177 fi
8178 else
8179 if test -f "$additional_libdir/lib$name.$libext"; then
8180 found_dir="$additional_libdir"
8181 found_a="$additional_libdir/lib$name.$libext"
8182 if test -f "$additional_libdir/lib$name.la"; then
8183 found_la="$additional_libdir/lib$name.la"
8184 fi
8185 fi
8186 fi
8187 fi
8188 if test "X$found_dir" = "X"; then
8189 for x in $LDFLAGS $LTLIBICONV; do
8190
8191 acl_save_prefix="$prefix"
8192 prefix="$acl_final_prefix"
8193 acl_save_exec_prefix="$exec_prefix"
8194 exec_prefix="$acl_final_exec_prefix"
8195 eval x=\"$x\"
8196 exec_prefix="$acl_save_exec_prefix"
8197 prefix="$acl_save_prefix"
8198
8199 case "$x" in
8200 -L*)
8201 dir=`echo "X$x" | sed -e 's/^X-L//'`
8202 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
8203 found_dir="$dir"
8204 found_so="$dir/lib$name.$shlibext"
8205 if test -f "$dir/lib$name.la"; then
8206 found_la="$dir/lib$name.la"
8207 fi
8208 else
8209 if test -f "$dir/lib$name.$libext"; then
8210 found_dir="$dir"
8211 found_a="$dir/lib$name.$libext"
8212 if test -f "$dir/lib$name.la"; then
8213 found_la="$dir/lib$name.la"
8214 fi
8215 fi
8216 fi
8217 ;;
8218 esac
8219 if test "X$found_dir" != "X"; then
8220 break
8221 fi
8222 done
8223 fi
8224 if test "X$found_dir" != "X"; then
8225 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
8226 if test "X$found_so" != "X"; then
8227 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
8228 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8229 else
8230 haveit=
8231 for x in $ltrpathdirs; do
8232 if test "X$x" = "X$found_dir"; then
8233 haveit=yes
8234 break
8235 fi
8236 done
8237 if test -z "$haveit"; then
8238 ltrpathdirs="$ltrpathdirs $found_dir"
8239 fi
8240 if test "$hardcode_direct" = yes; then
8241 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8242 else
8243 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
8244 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8245 haveit=
8246 for x in $rpathdirs; do
8247 if test "X$x" = "X$found_dir"; then
8248 haveit=yes
8249 break
8250 fi
8251 done
8252 if test -z "$haveit"; then
8253 rpathdirs="$rpathdirs $found_dir"
8254 fi
8255 else
8256 haveit=
8257 for x in $LDFLAGS $LIBICONV; do
8258
8259 acl_save_prefix="$prefix"
8260 prefix="$acl_final_prefix"
8261 acl_save_exec_prefix="$exec_prefix"
8262 exec_prefix="$acl_final_exec_prefix"
8263 eval x=\"$x\"
8264 exec_prefix="$acl_save_exec_prefix"
8265 prefix="$acl_save_prefix"
8266
8267 if test "X$x" = "X-L$found_dir"; then
8268 haveit=yes
8269 break
8270 fi
8271 done
8272 if test -z "$haveit"; then
8273 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
8274 fi
8275 if test "$hardcode_minus_L" != no; then
8276 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8277 else
8278 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8279 fi
8280 fi
8281 fi
8282 fi
8283 else
8284 if test "X$found_a" != "X"; then
8285 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
8286 else
8287 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
8288 fi
8289 fi
8290 additional_includedir=
8291 case "$found_dir" in
8292 */lib | */lib/)
8293 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
8294 additional_includedir="$basedir/include"
8295 ;;
8296 esac
8297 if test "X$additional_includedir" != "X"; then
8298 if test "X$additional_includedir" != "X/usr/include"; then
8299 haveit=
8300 if test "X$additional_includedir" = "X/usr/local/include"; then
8301 if test -n "$GCC"; then
8302 case $host_os in
8303 linux*) haveit=yes;;
8304 esac
8305 fi
8306 fi
8307 if test -z "$haveit"; then
8308 for x in $CPPFLAGS $INCICONV; do
8309
8310 acl_save_prefix="$prefix"
8311 prefix="$acl_final_prefix"
8312 acl_save_exec_prefix="$exec_prefix"
8313 exec_prefix="$acl_final_exec_prefix"
8314 eval x=\"$x\"
8315 exec_prefix="$acl_save_exec_prefix"
8316 prefix="$acl_save_prefix"
8317
8318 if test "X$x" = "X-I$additional_includedir"; then
8319 haveit=yes
8320 break
8321 fi
8322 done
8323 if test -z "$haveit"; then
8324 if test -d "$additional_includedir"; then
8325 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
8326 fi
8327 fi
8328 fi
8329 fi
8330 fi
8331 if test -n "$found_la"; then
8332 save_libdir="$libdir"
8333 case "$found_la" in
8334 */* | *\\*) . "$found_la" ;;
8335 *) . "./$found_la" ;;
8336 esac
8337 libdir="$save_libdir"
8338 for dep in $dependency_libs; do
8339 case "$dep" in
8340 -L*)
8341 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
8342 if test "X$additional_libdir" != "X/usr/lib"; then
8343 haveit=
8344 if test "X$additional_libdir" = "X/usr/local/lib"; then
8345 if test -n "$GCC"; then
8346 case $host_os in
8347 linux*) haveit=yes;;
8348 esac
8349 fi
8350 fi
8351 if test -z "$haveit"; then
8352 haveit=
8353 for x in $LDFLAGS $LIBICONV; do
8354
8355 acl_save_prefix="$prefix"
8356 prefix="$acl_final_prefix"
8357 acl_save_exec_prefix="$exec_prefix"
8358 exec_prefix="$acl_final_exec_prefix"
8359 eval x=\"$x\"
8360 exec_prefix="$acl_save_exec_prefix"
8361 prefix="$acl_save_prefix"
8362
8363 if test "X$x" = "X-L$additional_libdir"; then
8364 haveit=yes
8365 break
8366 fi
8367 done
8368 if test -z "$haveit"; then
8369 if test -d "$additional_libdir"; then
8370 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
8371 fi
8372 fi
8373 haveit=
8374 for x in $LDFLAGS $LTLIBICONV; do
8375
8376 acl_save_prefix="$prefix"
8377 prefix="$acl_final_prefix"
8378 acl_save_exec_prefix="$exec_prefix"
8379 exec_prefix="$acl_final_exec_prefix"
8380 eval x=\"$x\"
8381 exec_prefix="$acl_save_exec_prefix"
8382 prefix="$acl_save_prefix"
8383
8384 if test "X$x" = "X-L$additional_libdir"; then
8385 haveit=yes
8386 break
8387 fi
8388 done
8389 if test -z "$haveit"; then
8390 if test -d "$additional_libdir"; then
8391 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
8392 fi
8393 fi
8394 fi
8395 fi
8396 ;;
8397 -R*)
8398 dir=`echo "X$dep" | sed -e 's/^X-R//'`
8399 if test "$enable_rpath" != no; then
8400 haveit=
8401 for x in $rpathdirs; do
8402 if test "X$x" = "X$dir"; then
8403 haveit=yes
8404 break
8405 fi
8406 done
8407 if test -z "$haveit"; then
8408 rpathdirs="$rpathdirs $dir"
8409 fi
8410 haveit=
8411 for x in $ltrpathdirs; do
8412 if test "X$x" = "X$dir"; then
8413 haveit=yes
8414 break
8415 fi
8416 done
8417 if test -z "$haveit"; then
8418 ltrpathdirs="$ltrpathdirs $dir"
8419 fi
8420 fi
8421 ;;
8422 -l*)
8423 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
8424 ;;
8425 *.la)
8426 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
8427 ;;
8428 *)
8429 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
8430 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
8431 ;;
8432 esac
8433 done
8434 fi
8435 else
8436 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8437 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
8438 fi
8439 fi
8440 fi
8441 done
8442 done
8443 if test "X$rpathdirs" != "X"; then
8444 if test -n "$hardcode_libdir_separator"; then
8445 alldirs=
8446 for found_dir in $rpathdirs; do
8447 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
8448 done
8449 acl_save_libdir="$libdir"
8450 libdir="$alldirs"
8451 eval flag=\"$hardcode_libdir_flag_spec\"
8452 libdir="$acl_save_libdir"
8453 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8454 else
8455 for found_dir in $rpathdirs; do
8456 acl_save_libdir="$libdir"
8457 libdir="$found_dir"
8458 eval flag=\"$hardcode_libdir_flag_spec\"
8459 libdir="$acl_save_libdir"
8460 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8461 done
8462 fi
8463 fi
8464 if test "X$ltrpathdirs" != "X"; then
8465 for found_dir in $ltrpathdirs; do
8466 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
8467 done
8468 fi
8469
8470
8471
8472
8473
6c7a06a3 8474
6c7a06a3 8475
81ecdfbb
RW
8476 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
8477$as_echo_n "checking for iconv... " >&6; }
8478if test "${am_cv_func_iconv+set}" = set; then :
8479 $as_echo_n "(cached) " >&6
d542061a 8480else
6c7a06a3
TT
8481
8482 am_cv_func_iconv="no, consider installing GNU libiconv"
8483 am_cv_lib_iconv=no
016a3251
DD
8484 am_save_CPPFLAGS="$CPPFLAGS"
8485 CPPFLAGS="$CPPFLAGS $INCICONV"
8486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 8487/* end confdefs.h. */
6c7a06a3
TT
8488#include <stdlib.h>
8489#include <iconv.h>
d542061a
UW
8490int
8491main ()
8492{
6c7a06a3 8493iconv_t cd = iconv_open("","");
016a3251
DD
8494 iconv(cd,NULL,NULL,NULL,NULL);
8495 iconv_close(cd);
d542061a
UW
8496 ;
8497 return 0;
8498}
8499_ACEOF
81ecdfbb 8500if ac_fn_c_try_link "$LINENO"; then :
016a3251 8501 am_cv_func_iconv=yes
d542061a 8502fi
81ecdfbb
RW
8503rm -f core conftest.err conftest.$ac_objext \
8504 conftest$ac_exeext conftest.$ac_ext
016a3251 8505 CPPFLAGS="$am_save_CPPFLAGS"
94ae1714 8506
016a3251
DD
8507 if test "$am_cv_func_iconv" != yes && test -d ../libiconv; then
8508 for _libs in .libs _libs; do
8509 am_save_CPPFLAGS="$CPPFLAGS"
8510 am_save_LIBS="$LIBS"
8511 CPPFLAGS="$CPPFLAGS -I../libiconv/include"
8512 LIBS="$LIBS ../libiconv/lib/$_libs/libiconv.a"
8513 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 8514/* end confdefs.h. */
6c7a06a3
TT
8515#include <stdlib.h>
8516#include <iconv.h>
d542061a
UW
8517int
8518main ()
8519{
6c7a06a3 8520iconv_t cd = iconv_open("","");
016a3251
DD
8521 iconv(cd,NULL,NULL,NULL,NULL);
8522 iconv_close(cd);
d542061a
UW
8523 ;
8524 return 0;
8525}
8526_ACEOF
81ecdfbb 8527if ac_fn_c_try_link "$LINENO"; then :
016a3251
DD
8528 INCICONV="-I../libiconv/include"
8529 LIBICONV='${top_builddir}'/../libiconv/lib/$_libs/libiconv.a
8530 LTLIBICONV='${top_builddir}'/../libiconv/lib/libiconv.la
8531 am_cv_lib_iconv=yes
8532 am_cv_func_iconv=yes
d542061a 8533fi
81ecdfbb
RW
8534rm -f core conftest.err conftest.$ac_objext \
8535 conftest$ac_exeext conftest.$ac_ext
016a3251
DD
8536 CPPFLAGS="$am_save_CPPFLAGS"
8537 LIBS="$am_save_LIBS"
8538 if test "$am_cv_func_iconv" = "yes"; then
8539 break
8540 fi
8541 done
77f120bf 8542 fi
94ae1714 8543
4edb1e84 8544 if test "$am_cv_func_iconv" != yes; then
6c7a06a3 8545 am_save_CPPFLAGS="$CPPFLAGS"
4edb1e84 8546 am_save_LIBS="$LIBS"
016a3251
DD
8547 CPPFLAGS="$LIBS $INCICONV"
8548 LIBS="$LIBS $LIBICONV"
81ecdfbb 8549 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8550/* end confdefs.h. */
6c7a06a3
TT
8551#include <stdlib.h>
8552#include <iconv.h>
bec39cab
AC
8553int
8554main ()
8555{
6c7a06a3
TT
8556iconv_t cd = iconv_open("","");
8557 iconv(cd,NULL,NULL,NULL,NULL);
8558 iconv_close(cd);
bec39cab
AC
8559 ;
8560 return 0;
8561}
8562_ACEOF
81ecdfbb 8563if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 8564 am_cv_lib_iconv=yes
6c7a06a3 8565 am_cv_func_iconv=yes
627af7ea 8566fi
81ecdfbb
RW
8567rm -f core conftest.err conftest.$ac_objext \
8568 conftest$ac_exeext conftest.$ac_ext
fc3b640d 8569 CPPFLAGS="$am_save_CPPFLAGS"
016a3251 8570 LIBS="$am_save_LIBS"
6c7a06a3
TT
8571 fi
8572
8573fi
81ecdfbb
RW
8574{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
8575$as_echo "$am_cv_func_iconv" >&6; }
016a3251
DD
8576 if test "$am_cv_func_iconv" = yes; then
8577
8578$as_echo "#define HAVE_ICONV 1" >>confdefs.h
94ae1714 8579
016a3251 8580 fi
fc3b640d 8581 if test "$am_cv_lib_iconv" = yes; then
016a3251
DD
8582
8583 for element in $INCICONV; do
8584 haveit=
8585 for x in $CPPFLAGS; do
8586
8587 acl_save_prefix="$prefix"
8588 prefix="$acl_final_prefix"
8589 acl_save_exec_prefix="$exec_prefix"
8590 exec_prefix="$acl_final_exec_prefix"
8591 eval x=\"$x\"
8592 exec_prefix="$acl_save_exec_prefix"
8593 prefix="$acl_save_prefix"
8594
8595 if test "X$x" = "X$element"; then
8596 haveit=yes
8597 break
8598 fi
8599 done
8600 if test -z "$haveit"; then
8601 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
8602 fi
8603 done
8604
8605 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
8606$as_echo_n "checking how to link with libiconv... " >&6; }
8607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
8608$as_echo "$LIBICONV" >&6; }
94ae1714 8609 else
016a3251
DD
8610 LIBICONV=
8611 LTLIBICONV=
fc3b640d 8612 fi
94ae1714 8613
6c7a06a3 8614
6c7a06a3 8615
016a3251 8616 if test "$am_cv_func_iconv" = yes; then
81ecdfbb
RW
8617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
8618$as_echo_n "checking for iconv declaration... " >&6; }
8619 if test "${am_cv_proto_iconv+set}" = set; then :
8620 $as_echo_n "(cached) " >&6
6c7a06a3
TT
8621else
8622
81ecdfbb 8623 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
8624/* end confdefs.h. */
8625
6c7a06a3
TT
8626#include <stdlib.h>
8627#include <iconv.h>
8628extern
b4e70030 8629#ifdef __cplusplus
6c7a06a3 8630"C"
b4e70030 8631#endif
6c7a06a3
TT
8632#if defined(__STDC__) || defined(__cplusplus)
8633size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
8634#else
8635size_t iconv();
8636#endif
8637
b4e70030
JB
8638int
8639main ()
8640{
6c7a06a3 8641
b4e70030
JB
8642 ;
8643 return 0;
8644}
8645_ACEOF
81ecdfbb 8646if ac_fn_c_try_compile "$LINENO"; then :
6c7a06a3 8647 am_cv_proto_iconv_arg1=""
4e8d927d 8648else
81ecdfbb 8649 am_cv_proto_iconv_arg1="const"
b4e70030 8650fi
81ecdfbb 8651rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6c7a06a3
TT
8652 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);"
8653fi
8654
8655 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
81ecdfbb 8656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
6c7a06a3 8657 }$am_cv_proto_iconv" >&5
81ecdfbb
RW
8658$as_echo "${ac_t:-
8659 }$am_cv_proto_iconv" >&6; }
6c7a06a3
TT
8660
8661cat >>confdefs.h <<_ACEOF
8662#define ICONV_CONST $am_cv_proto_iconv_arg1
8663_ACEOF
8664
8665 fi
6c7a06a3
TT
8666
8667
478aac75
DE
8668# GDB may fork/exec the iconv program to get the list of supported character
8669# sets. Allow the user to specify where to find it.
8670# There are several factors affecting the choice of option name:
8671# - There is already --with-libiconv-prefix but we can't use it, it specifies
8672# the build-time location of libiconv files.
8673# - The program we need to find is iconv, which comes with glibc. The user
8674# doesn't necessarily have libiconv installed. Therefore naming this
8675# --with-libiconv-foo feels wrong.
8676# - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is
8677# defined to work on directories not files (though it really doesn't know
8678# the difference).
8679# - Calling this --with-iconv-prefix is perceived to cause too much confusion
8680# with --with-libiconv-prefix.
8681# Putting these together is why the option name is --with-iconv-bin.
8682
8683
8684# Check whether --with-iconv-bin was given.
8685if test "${with_iconv_bin+set}" = set; then :
8686 withval=$with_iconv_bin; iconv_bin="${withval}"
8687
8688cat >>confdefs.h <<_ACEOF
8689#define ICONV_BIN "${iconv_bin}"
8690_ACEOF
8691
8692
8693 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
8694 if test "x$prefix" = xNONE; then
8695 test_prefix=/usr/local
8696 else
8697 test_prefix=$prefix
8698 fi
8699 else
8700 test_prefix=$exec_prefix
8701 fi
8702 value=0
8703 case ${iconv_bin} in
8704 "${test_prefix}"|"${test_prefix}/"*|\
8705 '${exec_prefix}'|'${exec_prefix}/'*)
8706 value=1
8707 ;;
8708 esac
8709
8710cat >>confdefs.h <<_ACEOF
8711#define ICONV_BIN_RELOCATABLE $value
8712_ACEOF
8713
8714
8715
8716fi
8717
8718
cb01cfba 8719# For the TUI, we need enhanced curses functionality.
bd8a8e1b 8720if test x"$enable_tui" != xno; then
cb01cfba
JB
8721 prefer_curses=yes
8722fi
8723
8724curses_found=no
8725if test x"$prefer_curses" = xyes; then
8726 # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
8727 # curses library because the latter might not provide all the
8728 # functionality we need. However, this leads to problems on systems
8729 # where the linker searches /usr/local/lib, but the compiler doesn't
8730 # search /usr/local/include, if ncurses is installed in /usr/local. A
8731 # default installation of ncurses on alpha*-dec-osf* will lead to such
8732 # a situation.
81ecdfbb
RW
8733 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
8734$as_echo_n "checking for library containing waddstr... " >&6; }
8735if test "${ac_cv_search_waddstr+set}" = set; then :
8736 $as_echo_n "(cached) " >&6
6c7a06a3
TT
8737else
8738 ac_func_search_save_LIBS=$LIBS
81ecdfbb 8739cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
8740/* end confdefs.h. */
8741
81ecdfbb
RW
8742/* Override any GCC internal prototype to avoid an error.
8743 Use char because int might match the return type of a GCC
8744 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
8745#ifdef __cplusplus
8746extern "C"
8747#endif
6c7a06a3
TT
8748char waddstr ();
8749int
8750main ()
8751{
81ecdfbb 8752return waddstr ();
6c7a06a3
TT
8753 ;
8754 return 0;
8755}
8756_ACEOF
5007d765 8757for ac_lib in '' ncursesw ncurses cursesX curses; do
81ecdfbb
RW
8758 if test -z "$ac_lib"; then
8759 ac_res="none required"
8760 else
8761 ac_res=-l$ac_lib
8762 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8763 fi
8764 if ac_fn_c_try_link "$LINENO"; then :
8765 ac_cv_search_waddstr=$ac_res
8766fi
8767rm -f core conftest.err conftest.$ac_objext \
8768 conftest$ac_exeext
8769 if test "${ac_cv_search_waddstr+set}" = set; then :
8770 break
8771fi
8772done
8773if test "${ac_cv_search_waddstr+set}" = set; then :
8774
6c7a06a3 8775else
81ecdfbb
RW
8776 ac_cv_search_waddstr=no
8777fi
8778rm conftest.$ac_ext
8779LIBS=$ac_func_search_save_LIBS
8780fi
8781{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
8782$as_echo "$ac_cv_search_waddstr" >&6; }
8783ac_res=$ac_cv_search_waddstr
8784if test "$ac_res" != no; then :
8785 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3
TT
8786
8787fi
8788
8789
cb01cfba
JB
8790 if test "$ac_cv_search_waddstr" != no; then
8791 curses_found=yes
8792 fi
8793fi
8794
8795# Check whether we should enable the TUI, but only do so if we really
8796# can.
8797if test x"$enable_tui" != xno; then
8798 if test -d $srcdir/tui; then
8799 if test "$curses_found" != no; then
6c7a06a3
TT
8800 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
8801 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
8802 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
8803 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
6c7a06a3
TT
8804 else
8805 if test x"$enable_tui" = xyes; then
81ecdfbb 8806 as_fn_error "no enhanced curses library found; disable TUI" "$LINENO" 5
6c7a06a3 8807 else
81ecdfbb
RW
8808 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
8809$as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
6c7a06a3
TT
8810 fi
8811 fi
8812 fi
8813fi
8814
8815# Since GDB uses Readline, we need termcap functionality. In many
8816# cases this will be provided by the curses library, but some systems
96fe4562 8817# have a separate termcap library, or no curses library at all.
6c7a06a3
TT
8818
8819case $host_os in
8820 cygwin*)
8821 if test -d $srcdir/libtermcap; then
8822 LIBS="../libtermcap/libtermcap.a $LIBS"
8823 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
8824 fi ;;
8825 go32* | *djgpp*)
8826 ac_cv_search_tgetent="none required"
8827 ;;
6c7a06a3
TT
8828esac
8829
8830# These are the libraries checked by Readline.
81ecdfbb
RW
8831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
8832$as_echo_n "checking for library containing tgetent... " >&6; }
8833if test "${ac_cv_search_tgetent+set}" = set; then :
8834 $as_echo_n "(cached) " >&6
6c7a06a3
TT
8835else
8836 ac_func_search_save_LIBS=$LIBS
81ecdfbb 8837cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
8838/* end confdefs.h. */
8839
81ecdfbb
RW
8840/* Override any GCC internal prototype to avoid an error.
8841 Use char because int might match the return type of a GCC
8842 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
8843#ifdef __cplusplus
8844extern "C"
8845#endif
6c7a06a3
TT
8846char tgetent ();
8847int
8848main ()
8849{
81ecdfbb 8850return tgetent ();
6c7a06a3
TT
8851 ;
8852 return 0;
8853}
8854_ACEOF
5007d765 8855for ac_lib in '' termcap tinfo curses ncursesw ncurses; do
81ecdfbb
RW
8856 if test -z "$ac_lib"; then
8857 ac_res="none required"
8858 else
8859 ac_res=-l$ac_lib
6c7a06a3 8860 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
8861 fi
8862 if ac_fn_c_try_link "$LINENO"; then :
8863 ac_cv_search_tgetent=$ac_res
8864fi
8865rm -f core conftest.err conftest.$ac_objext \
8866 conftest$ac_exeext
8867 if test "${ac_cv_search_tgetent+set}" = set; then :
8868 break
8869fi
8870done
8871if test "${ac_cv_search_tgetent+set}" = set; then :
6c7a06a3 8872
6c7a06a3 8873else
81ecdfbb 8874 ac_cv_search_tgetent=no
6c7a06a3 8875fi
81ecdfbb 8876rm conftest.$ac_ext
6c7a06a3
TT
8877LIBS=$ac_func_search_save_LIBS
8878fi
81ecdfbb
RW
8879{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
8880$as_echo "$ac_cv_search_tgetent" >&6; }
8881ac_res=$ac_cv_search_tgetent
8882if test "$ac_res" != no; then :
8883 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3 8884
06825bd1
MK
8885fi
8886
06825bd1 8887
bec39cab 8888if test "$ac_cv_search_tgetent" = no; then
7a85168d 8889 CONFIG_OBS="$CONFIG_OBS stub-termcap.o"
8ee53726
MK
8890fi
8891
3841debe 8892
81ecdfbb
RW
8893# Check whether --with-system-readline was given.
8894if test "${with_system_readline+set}" = set; then :
8895 withval=$with_system_readline;
8896fi
6a30b0a5 8897
6a30b0a5
AS
8898
8899if test "$with_system_readline" = yes; then
8900 READLINE=-lreadline
8901 READLINE_DEPS=
8902 READLINE_CFLAGS=
39037522 8903 READLINE_TEXI_INCFLAG=
6a30b0a5
AS
8904else
8905 READLINE='$(READLINE_DIR)/libreadline.a'
8906 READLINE_DEPS='$(READLINE)'
8907 READLINE_CFLAGS='-I$(READLINE_SRC)/..'
39037522 8908 READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
6a30b0a5
AS
8909fi
8910
8911
8912
8913
8914
f997c383
SD
8915# Generate jit-reader.h
8916
8917# This is typedeffed to GDB_CORE_ADDR in jit-reader.h
8918TARGET_PTR=
8919
8920# The cast to long int works around a bug in the HP C Compiler
8921# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8922# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8923# This bug is HP SR number 8606223364.
8924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5
8925$as_echo_n "checking size of unsigned long long... " >&6; }
8926if test "${ac_cv_sizeof_unsigned_long_long+set}" = set; then :
8927 $as_echo_n "(cached) " >&6
8928else
8929 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then :
8930
8931else
8932 if test "$ac_cv_type_unsigned_long_long" = yes; then
8933 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8934$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8935{ as_fn_set_status 77
8936as_fn_error "cannot compute sizeof (unsigned long long)
8937See \`config.log' for more details." "$LINENO" 5; }; }
8938 else
8939 ac_cv_sizeof_unsigned_long_long=0
8940 fi
8941fi
8942
8943fi
8944{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5
8945$as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; }
8946
8947
8948
8949cat >>confdefs.h <<_ACEOF
8950#define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
8951_ACEOF
8952
8953
8954# The cast to long int works around a bug in the HP C Compiler
8955# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8956# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8957# This bug is HP SR number 8606223364.
8958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
8959$as_echo_n "checking size of unsigned long... " >&6; }
8960if test "${ac_cv_sizeof_unsigned_long+set}" = set; then :
8961 $as_echo_n "(cached) " >&6
8962else
8963 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then :
8964
8965else
8966 if test "$ac_cv_type_unsigned_long" = yes; then
8967 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8968$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8969{ as_fn_set_status 77
8970as_fn_error "cannot compute sizeof (unsigned long)
8971See \`config.log' for more details." "$LINENO" 5; }; }
8972 else
8973 ac_cv_sizeof_unsigned_long=0
8974 fi
8975fi
8976
8977fi
8978{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
8979$as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
8980
8981
8982
8983cat >>confdefs.h <<_ACEOF
8984#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
8985_ACEOF
8986
8987
8988# The cast to long int works around a bug in the HP C Compiler
8989# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8990# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8991# This bug is HP SR number 8606223364.
8992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5
8993$as_echo_n "checking size of unsigned __int128... " >&6; }
8994if test "${ac_cv_sizeof_unsigned___int128+set}" = set; then :
8995 $as_echo_n "(cached) " >&6
8996else
8997 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then :
8998
8999else
9000 if test "$ac_cv_type_unsigned___int128" = yes; then
9001 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9002$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9003{ as_fn_set_status 77
9004as_fn_error "cannot compute sizeof (unsigned __int128)
9005See \`config.log' for more details." "$LINENO" 5; }; }
9006 else
9007 ac_cv_sizeof_unsigned___int128=0
9008 fi
9009fi
9010
9011fi
9012{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5
9013$as_echo "$ac_cv_sizeof_unsigned___int128" >&6; }
9014
9015
9016
9017cat >>confdefs.h <<_ACEOF
9018#define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128
9019_ACEOF
9020
9021
9022
9023if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
9024 TARGET_PTR="unsigned long"
9025elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
9026 TARGET_PTR="unsigned long long"
9027elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
9028 TARGET_PTR="unsigned __int128"
9029else
9030 TARGET_PTR="unsigned long"
9031fi
9032
9033
9034ac_config_files="$ac_config_files jit-reader.h:jit-reader.in"
9035
9036
a2d08b9e
SD
9037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
9038$as_echo_n "checking for library containing dlopen... " >&6; }
9039if test "${ac_cv_search_dlopen+set}" = set; then :
9040 $as_echo_n "(cached) " >&6
9041else
9042 ac_func_search_save_LIBS=$LIBS
9043cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9044/* end confdefs.h. */
9045
9046/* Override any GCC internal prototype to avoid an error.
9047 Use char because int might match the return type of a GCC
9048 builtin and then its argument prototype would still apply. */
9049#ifdef __cplusplus
9050extern "C"
9051#endif
9052char dlopen ();
9053int
9054main ()
9055{
9056return dlopen ();
9057 ;
9058 return 0;
9059}
9060_ACEOF
9061for ac_lib in '' dl; do
9062 if test -z "$ac_lib"; then
9063 ac_res="none required"
9064 else
9065 ac_res=-l$ac_lib
9066 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9067 fi
9068 if ac_fn_c_try_link "$LINENO"; then :
9069 ac_cv_search_dlopen=$ac_res
9070fi
9071rm -f core conftest.err conftest.$ac_objext \
9072 conftest$ac_exeext
9073 if test "${ac_cv_search_dlopen+set}" = set; then :
9074 break
9075fi
9076done
9077if test "${ac_cv_search_dlopen+set}" = set; then :
9078
9079else
9080 ac_cv_search_dlopen=no
9081fi
9082rm conftest.$ac_ext
9083LIBS=$ac_func_search_save_LIBS
9084fi
9085{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
9086$as_echo "$ac_cv_search_dlopen" >&6; }
9087ac_res=$ac_cv_search_dlopen
9088if test "$ac_res" != no; then :
9089 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9090
9091fi
9092
9093
39037522 9094
b8e0a31c
SD
9095
9096# Check whether --with-jit-reader-dir was given.
9097if test "${with_jit_reader_dir+set}" = set; then :
9098 withval=$with_jit_reader_dir;
9099 JIT_READER_DIR=$withval
9100else
9101 JIT_READER_DIR=${libdir}/gdb
9102fi
9103
9104
9105 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
9106 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9107 ac_define_dir=`eval echo $JIT_READER_DIR`
9108 ac_define_dir=`eval echo $ac_define_dir`
9109
9110cat >>confdefs.h <<_ACEOF
9111#define JIT_READER_DIR "$ac_define_dir"
9112_ACEOF
9113
9114
9115
9116
9117 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
9118 if test "x$prefix" = xNONE; then
9119 test_prefix=/usr/local
9120 else
9121 test_prefix=$prefix
9122 fi
9123 else
9124 test_prefix=$exec_prefix
9125 fi
9126 value=0
9127 case ${ac_define_dir} in
9128 "${test_prefix}"|"${test_prefix}/"*|\
9129 '${exec_prefix}'|'${exec_prefix}/'*)
9130 value=1
9131 ;;
9132 esac
9133
9134cat >>confdefs.h <<_ACEOF
9135#define JIT_READER_DIR_RELOCATABLE $value
9136_ACEOF
9137
9138
9139
9140
9141
81ecdfbb
RW
9142# Check whether --with-expat was given.
9143if test "${with_expat+set}" = set; then :
9144 withval=$with_expat;
5c39566f
DJ
9145else
9146 with_expat=auto
81ecdfbb
RW
9147fi
9148
9149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
9150$as_echo_n "checking whether to use expat... " >&6; }
9151{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
9152$as_echo "$with_expat" >&6; }
5c39566f
DJ
9153
9154if test "${with_expat}" = no; then
81ecdfbb
RW
9155 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
9156$as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
5c39566f
DJ
9157 HAVE_LIBEXPAT=no
9158else
9159
3841debe
DJ
9160
9161
9162
9163
9164
9165
9166
9167 use_additional=yes
9168
9169 acl_save_prefix="$prefix"
9170 prefix="$acl_final_prefix"
9171 acl_save_exec_prefix="$exec_prefix"
9172 exec_prefix="$acl_final_exec_prefix"
9173
9174 eval additional_includedir=\"$includedir\"
9175 eval additional_libdir=\"$libdir\"
9176
9177 exec_prefix="$acl_save_exec_prefix"
9178 prefix="$acl_save_prefix"
9179
9180
81ecdfbb
RW
9181# Check whether --with-libexpat-prefix was given.
9182if test "${with_libexpat_prefix+set}" = set; then :
9183 withval=$with_libexpat_prefix;
3841debe
DJ
9184 if test "X$withval" = "Xno"; then
9185 use_additional=no
9186 else
9187 if test "X$withval" = "X"; then
9188
9189 acl_save_prefix="$prefix"
9190 prefix="$acl_final_prefix"
9191 acl_save_exec_prefix="$exec_prefix"
9192 exec_prefix="$acl_final_exec_prefix"
9193
9194 eval additional_includedir=\"$includedir\"
9195 eval additional_libdir=\"$libdir\"
9196
9197 exec_prefix="$acl_save_exec_prefix"
9198 prefix="$acl_save_prefix"
9199
9200 else
9201 additional_includedir="$withval/include"
9202 additional_libdir="$withval/lib"
9203 fi
9204 fi
9205
81ecdfbb
RW
9206fi
9207
3841debe
DJ
9208 LIBEXPAT=
9209 LTLIBEXPAT=
9210 INCEXPAT=
9211 rpathdirs=
9212 ltrpathdirs=
9213 names_already_handled=
9214 names_next_round='expat '
9215 while test -n "$names_next_round"; do
9216 names_this_round="$names_next_round"
9217 names_next_round=
9218 for name in $names_this_round; do
9219 already_handled=
9220 for n in $names_already_handled; do
9221 if test "$n" = "$name"; then
9222 already_handled=yes
9223 break
9224 fi
9225 done
9226 if test -z "$already_handled"; then
9227 names_already_handled="$names_already_handled $name"
9228 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
9229 eval value=\"\$HAVE_LIB$uppername\"
9230 if test -n "$value"; then
9231 if test "$value" = yes; then
9232 eval value=\"\$LIB$uppername\"
9233 test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
9234 eval value=\"\$LTLIB$uppername\"
9235 test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
9236 else
9237 :
9238 fi
9239 else
9240 found_dir=
9241 found_la=
9242 found_so=
9243 found_a=
9244 if test $use_additional = yes; then
9245 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
9246 found_dir="$additional_libdir"
9247 found_so="$additional_libdir/lib$name.$shlibext"
9248 if test -f "$additional_libdir/lib$name.la"; then
9249 found_la="$additional_libdir/lib$name.la"
9250 fi
9251 else
9252 if test -f "$additional_libdir/lib$name.$libext"; then
9253 found_dir="$additional_libdir"
9254 found_a="$additional_libdir/lib$name.$libext"
9255 if test -f "$additional_libdir/lib$name.la"; then
9256 found_la="$additional_libdir/lib$name.la"
9257 fi
9258 fi
9259 fi
9260 fi
9261 if test "X$found_dir" = "X"; then
9262 for x in $LDFLAGS $LTLIBEXPAT; do
9263
9264 acl_save_prefix="$prefix"
9265 prefix="$acl_final_prefix"
9266 acl_save_exec_prefix="$exec_prefix"
9267 exec_prefix="$acl_final_exec_prefix"
9268 eval x=\"$x\"
9269 exec_prefix="$acl_save_exec_prefix"
9270 prefix="$acl_save_prefix"
9271
9272 case "$x" in
9273 -L*)
9274 dir=`echo "X$x" | sed -e 's/^X-L//'`
9275 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
9276 found_dir="$dir"
9277 found_so="$dir/lib$name.$shlibext"
9278 if test -f "$dir/lib$name.la"; then
9279 found_la="$dir/lib$name.la"
9280 fi
9281 else
9282 if test -f "$dir/lib$name.$libext"; then
9283 found_dir="$dir"
9284 found_a="$dir/lib$name.$libext"
9285 if test -f "$dir/lib$name.la"; then
9286 found_la="$dir/lib$name.la"
9287 fi
9288 fi
9289 fi
9290 ;;
9291 esac
9292 if test "X$found_dir" != "X"; then
9293 break
9294 fi
9295 done
9296 fi
9297 if test "X$found_dir" != "X"; then
9298 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
9299 if test "X$found_so" != "X"; then
9300 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
9301 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9302 else
9303 haveit=
9304 for x in $ltrpathdirs; do
9305 if test "X$x" = "X$found_dir"; then
9306 haveit=yes
9307 break
9308 fi
9309 done
9310 if test -z "$haveit"; then
9311 ltrpathdirs="$ltrpathdirs $found_dir"
9312 fi
9313 if test "$hardcode_direct" = yes; then
9314 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9315 else
9316 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
9317 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9318 haveit=
9319 for x in $rpathdirs; do
9320 if test "X$x" = "X$found_dir"; then
9321 haveit=yes
9322 break
9323 fi
9324 done
9325 if test -z "$haveit"; then
9326 rpathdirs="$rpathdirs $found_dir"
9327 fi
9328 else
9329 haveit=
9330 for x in $LDFLAGS $LIBEXPAT; do
9331
9332 acl_save_prefix="$prefix"
9333 prefix="$acl_final_prefix"
9334 acl_save_exec_prefix="$exec_prefix"
9335 exec_prefix="$acl_final_exec_prefix"
9336 eval x=\"$x\"
9337 exec_prefix="$acl_save_exec_prefix"
9338 prefix="$acl_save_prefix"
9339
9340 if test "X$x" = "X-L$found_dir"; then
9341 haveit=yes
9342 break
9343 fi
9344 done
9345 if test -z "$haveit"; then
9346 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
9347 fi
9348 if test "$hardcode_minus_L" != no; then
9349 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9350 else
9351 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9352 fi
9353 fi
9354 fi
9355 fi
9356 else
9357 if test "X$found_a" != "X"; then
9358 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
9359 else
9360 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
9361 fi
9362 fi
9363 additional_includedir=
9364 case "$found_dir" in
9365 */lib | */lib/)
9366 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
9367 additional_includedir="$basedir/include"
9368 ;;
9369 esac
9370 if test "X$additional_includedir" != "X"; then
9371 if test "X$additional_includedir" != "X/usr/include"; then
9372 haveit=
9373 if test "X$additional_includedir" = "X/usr/local/include"; then
9374 if test -n "$GCC"; then
9375 case $host_os in
9376 linux*) haveit=yes;;
9377 esac
9378 fi
9379 fi
9380 if test -z "$haveit"; then
9381 for x in $CPPFLAGS $INCEXPAT; do
9382
9383 acl_save_prefix="$prefix"
9384 prefix="$acl_final_prefix"
9385 acl_save_exec_prefix="$exec_prefix"
9386 exec_prefix="$acl_final_exec_prefix"
9387 eval x=\"$x\"
9388 exec_prefix="$acl_save_exec_prefix"
9389 prefix="$acl_save_prefix"
9390
9391 if test "X$x" = "X-I$additional_includedir"; then
9392 haveit=yes
9393 break
9394 fi
9395 done
9396 if test -z "$haveit"; then
9397 if test -d "$additional_includedir"; then
9398 INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
9399 fi
9400 fi
9401 fi
9402 fi
9403 fi
9404 if test -n "$found_la"; then
9405 save_libdir="$libdir"
9406 case "$found_la" in
9407 */* | *\\*) . "$found_la" ;;
9408 *) . "./$found_la" ;;
9409 esac
9410 libdir="$save_libdir"
9411 for dep in $dependency_libs; do
9412 case "$dep" in
9413 -L*)
9414 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
9415 if test "X$additional_libdir" != "X/usr/lib"; then
9416 haveit=
9417 if test "X$additional_libdir" = "X/usr/local/lib"; then
9418 if test -n "$GCC"; then
9419 case $host_os in
9420 linux*) haveit=yes;;
9421 esac
9422 fi
9423 fi
9424 if test -z "$haveit"; then
9425 haveit=
9426 for x in $LDFLAGS $LIBEXPAT; do
9427
9428 acl_save_prefix="$prefix"
9429 prefix="$acl_final_prefix"
9430 acl_save_exec_prefix="$exec_prefix"
9431 exec_prefix="$acl_final_exec_prefix"
9432 eval x=\"$x\"
9433 exec_prefix="$acl_save_exec_prefix"
9434 prefix="$acl_save_prefix"
9435
9436 if test "X$x" = "X-L$additional_libdir"; then
9437 haveit=yes
9438 break
9439 fi
9440 done
9441 if test -z "$haveit"; then
9442 if test -d "$additional_libdir"; then
9443 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
9444 fi
9445 fi
9446 haveit=
9447 for x in $LDFLAGS $LTLIBEXPAT; do
9448
9449 acl_save_prefix="$prefix"
9450 prefix="$acl_final_prefix"
9451 acl_save_exec_prefix="$exec_prefix"
9452 exec_prefix="$acl_final_exec_prefix"
9453 eval x=\"$x\"
9454 exec_prefix="$acl_save_exec_prefix"
9455 prefix="$acl_save_prefix"
9456
9457 if test "X$x" = "X-L$additional_libdir"; then
9458 haveit=yes
9459 break
9460 fi
9461 done
9462 if test -z "$haveit"; then
9463 if test -d "$additional_libdir"; then
9464 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
9465 fi
9466 fi
9467 fi
9468 fi
9469 ;;
9470 -R*)
9471 dir=`echo "X$dep" | sed -e 's/^X-R//'`
9472 if test "$enable_rpath" != no; then
9473 haveit=
9474 for x in $rpathdirs; do
9475 if test "X$x" = "X$dir"; then
9476 haveit=yes
9477 break
9478 fi
9479 done
9480 if test -z "$haveit"; then
9481 rpathdirs="$rpathdirs $dir"
9482 fi
9483 haveit=
9484 for x in $ltrpathdirs; do
9485 if test "X$x" = "X$dir"; then
9486 haveit=yes
9487 break
9488 fi
9489 done
9490 if test -z "$haveit"; then
9491 ltrpathdirs="$ltrpathdirs $dir"
9492 fi
9493 fi
9494 ;;
9495 -l*)
9496 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
9497 ;;
9498 *.la)
9499 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
9500 ;;
9501 *)
9502 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
9503 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
9504 ;;
81ecdfbb
RW
9505 esac
9506 done
9507 fi
9508 else
9509 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9510 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
9511 fi
9512 fi
9513 fi
9514 done
9515 done
9516 if test "X$rpathdirs" != "X"; then
9517 if test -n "$hardcode_libdir_separator"; then
9518 alldirs=
9519 for found_dir in $rpathdirs; do
9520 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
9521 done
9522 acl_save_libdir="$libdir"
9523 libdir="$alldirs"
9524 eval flag=\"$hardcode_libdir_flag_spec\"
9525 libdir="$acl_save_libdir"
9526 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9527 else
9528 for found_dir in $rpathdirs; do
9529 acl_save_libdir="$libdir"
9530 libdir="$found_dir"
9531 eval flag=\"$hardcode_libdir_flag_spec\"
9532 libdir="$acl_save_libdir"
9533 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9534 done
9535 fi
9536 fi
9537 if test "X$ltrpathdirs" != "X"; then
9538 for found_dir in $ltrpathdirs; do
9539 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
9540 done
9541 fi
a9322a30
TT
9542
9543
81ecdfbb 9544 ac_save_CPPFLAGS="$CPPFLAGS"
a9322a30 9545
81ecdfbb
RW
9546 for element in $INCEXPAT; do
9547 haveit=
9548 for x in $CPPFLAGS; do
a9322a30 9549
81ecdfbb
RW
9550 acl_save_prefix="$prefix"
9551 prefix="$acl_final_prefix"
9552 acl_save_exec_prefix="$exec_prefix"
9553 exec_prefix="$acl_final_exec_prefix"
9554 eval x=\"$x\"
9555 exec_prefix="$acl_save_exec_prefix"
9556 prefix="$acl_save_prefix"
a8111142 9557
81ecdfbb
RW
9558 if test "X$x" = "X$element"; then
9559 haveit=yes
9560 break
9561 fi
9562 done
9563 if test -z "$haveit"; then
9564 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
9565 fi
9566 done
a9322a30
TT
9567
9568
81ecdfbb
RW
9569 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
9570$as_echo_n "checking for libexpat... " >&6; }
9571if test "${ac_cv_libexpat+set}" = set; then :
9572 $as_echo_n "(cached) " >&6
bec39cab 9573else
bec39cab 9574
81ecdfbb
RW
9575 ac_save_LIBS="$LIBS"
9576 LIBS="$LIBS $LIBEXPAT"
9577 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9578/* end confdefs.h. */
81ecdfbb
RW
9579#include "expat.h"
9580int
9581main ()
9582{
9583XML_Parser p = XML_ParserCreate (0);
9584 ;
9585 return 0;
9586}
bec39cab 9587_ACEOF
81ecdfbb
RW
9588if ac_fn_c_try_link "$LINENO"; then :
9589 ac_cv_libexpat=yes
c906108c 9590else
81ecdfbb 9591 ac_cv_libexpat=no
bec39cab 9592fi
81ecdfbb
RW
9593rm -f core conftest.err conftest.$ac_objext \
9594 conftest$ac_exeext conftest.$ac_ext
9595 LIBS="$ac_save_LIBS"
c906108c 9596
95ca63c4 9597fi
81ecdfbb
RW
9598{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
9599$as_echo "$ac_cv_libexpat" >&6; }
9600 if test "$ac_cv_libexpat" = yes; then
9601 HAVE_LIBEXPAT=yes
bec39cab 9602
81ecdfbb 9603$as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
bec39cab 9604
81ecdfbb
RW
9605 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
9606$as_echo_n "checking how to link with libexpat... " >&6; }
9607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
9608$as_echo "$LIBEXPAT" >&6; }
9609 else
9610 HAVE_LIBEXPAT=no
9611 CPPFLAGS="$ac_save_CPPFLAGS"
9612 LIBEXPAT=
9613 LTLIBEXPAT=
9614 fi
95ca63c4
CF
9615
9616
9617
7cb9022a
MK
9618
9619
bec39cab 9620
81ecdfbb
RW
9621 if test "$HAVE_LIBEXPAT" != yes; then
9622 if test "$with_expat" = yes; then
9623 as_fn_error "expat is missing or unusable" "$LINENO" 5
9624 else
9625 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
9626$as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
9627 fi
9628 else
9629 save_LIBS=$LIBS
9630 LIBS="$LIBS $LIBEXPAT"
9631 for ac_func in XML_StopParser
9632do :
9633 ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
9634if test "x$ac_cv_func_XML_StopParser" = x""yes; then :
bec39cab 9635 cat >>confdefs.h <<_ACEOF
81ecdfbb 9636#define HAVE_XML_STOPPARSER 1
bec39cab 9637_ACEOF
95ca63c4 9638
bec39cab 9639fi
bec39cab 9640done
95ca63c4 9641
81ecdfbb
RW
9642 LIBS=$save_LIBS
9643 fi
a9322a30
TT
9644fi
9645
d344e670
DE
9646# --------------------- #
9647# Check for libpython. #
9648# --------------------- #
9649
a9322a30 9650
a9322a30
TT
9651
9652
ec685c5e 9653
0c4a4063 9654
81ecdfbb
RW
9655# Check whether --with-python was given.
9656if test "${with_python+set}" = set; then :
9657 withval=$with_python;
bec39cab 9658else
81ecdfbb 9659 with_python=auto
bec39cab 9660fi
bec39cab 9661
81ecdfbb
RW
9662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
9663$as_echo_n "checking whether to use python... " >&6; }
9664{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
9665$as_echo "$with_python" >&6; }
9a156167 9666
81ecdfbb
RW
9667if test "${with_python}" = no; then
9668 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
9669$as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
9670 have_libpython=no
bec39cab 9671else
81ecdfbb 9672 case "${with_python}" in
8c85a4e2 9673 [\\/]* | ?:[\\/]*)
ec685c5e
DE
9674 if test -d ${with_python}; then
9675 # Assume the python binary is ${with_python}/bin/python.
ec685c5e 9676 python_prog="${with_python}/bin/python"
0c4a4063 9677 python_prefix=
9c4ea6c5
JB
9678 # If python does not exit ${with_python}/bin, then try in
9679 # ${with_python}. On Windows/MinGW, this is where the Python
9680 # executable is.
9681 if test ! -x "${python_prog}"; then
9682 python_prog="${with_python}/python"
9683 python_prefix=
9684 fi
e7a30f46 9685 if test ! -x "${python_prog}"; then
ec685c5e
DE
9686 # Fall back to gdb 7.0/7.1 behaviour.
9687 python_prog=missing
0c4a4063 9688 python_prefix=${with_python}
ec685c5e 9689 fi
e7a30f46 9690 elif test -x "${with_python}"; then
ec685c5e
DE
9691 # While we can't run python compiled for $host (unless host == build),
9692 # the user could write a script that provides the needed information,
9693 # so we support that.
ec685c5e 9694 python_prog=${with_python}
0c4a4063 9695 python_prefix=
ec685c5e
DE
9696 else
9697 as_fn_error "invalid value for --with-python" "$LINENO" 5
9698 fi
81ecdfbb 9699 ;;
ec685c5e
DE
9700 */*)
9701 # Disallow --with-python=foo/bar.
81ecdfbb
RW
9702 as_fn_error "invalid value for --with-python" "$LINENO" 5
9703 ;;
ec685c5e
DE
9704 *)
9705 # The user has either specified auto, yes, or the name of the python
9706 # program assumed to be in $PATH.
9707 python_prefix=
9708 case "${with_python}" in
9709 yes | auto)
9710 if test ${build} = ${host}; then
9711 # Extract the first word of "python", so it can be a program name with args.
9712set dummy python; ac_word=$2
9713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9714$as_echo_n "checking for $ac_word... " >&6; }
9715if test "${ac_cv_path_python_prog_path+set}" = set; then :
9716 $as_echo_n "(cached) " >&6
9717else
9718 case $python_prog_path in
9719 [\\/]* | ?:[\\/]*)
9720 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
9721 ;;
9722 *)
9723 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9724for as_dir in $PATH
9725do
9726 IFS=$as_save_IFS
9727 test -z "$as_dir" && as_dir=.
9728 for ac_exec_ext in '' $ac_executable_extensions; do
9729 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9730 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
9731 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9732 break 2
9733 fi
9734done
9735 done
9736IFS=$as_save_IFS
9737
9738 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
9739 ;;
9740esac
9741fi
9742python_prog_path=$ac_cv_path_python_prog_path
9743if test -n "$python_prog_path"; then
9744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
9745$as_echo "$python_prog_path" >&6; }
9746else
9747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9748$as_echo "no" >&6; }
9749fi
9750
9751
9752 if test "${python_prog_path}" = missing; then
9753 python_prog=missing
9754 else
9755 python_prog=${python_prog_path}
9756 fi
9757 else
9758 # Not much we can do except assume the cross-compiler will find the
9759 # right files.
9760 python_prog=missing
9761 fi
9762 ;;
9763 *)
9764 # While we can't run python compiled for $host (unless host == build),
9765 # the user could write a script that provides the needed information,
9766 # so we support that.
9767 python_prog="${with_python}"
9768 # Extract the first word of "${python_prog}", so it can be a program name with args.
9769set dummy ${python_prog}; ac_word=$2
9770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9771$as_echo_n "checking for $ac_word... " >&6; }
9772if test "${ac_cv_path_python_prog_path+set}" = set; then :
9773 $as_echo_n "(cached) " >&6
9774else
9775 case $python_prog_path in
9776 [\\/]* | ?:[\\/]*)
9777 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
9778 ;;
9779 *)
9780 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9781for as_dir in $PATH
9782do
9783 IFS=$as_save_IFS
9784 test -z "$as_dir" && as_dir=.
9785 for ac_exec_ext in '' $ac_executable_extensions; do
9786 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9787 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
9788 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9789 break 2
9790 fi
9791done
9792 done
9793IFS=$as_save_IFS
9794
9795 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
9796 ;;
9797esac
9798fi
9799python_prog_path=$ac_cv_path_python_prog_path
9800if test -n "$python_prog_path"; then
9801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
9802$as_echo "$python_prog_path" >&6; }
9803else
9804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9805$as_echo "no" >&6; }
9806fi
9807
9808
9809 if test "${python_prog_path}" = missing; then
9810 as_fn_error "unable to find python program ${python_prog}" "$LINENO" 5
9811 fi
9812 ;;
9813 esac
81ecdfbb
RW
9814 esac
9815
ec685c5e 9816 if test "${python_prog}" != missing; then
e7a30f46
DE
9817 # We have a python program to use, but it may be too old.
9818 # Don't flag an error for --with-python=auto (the default).
9819 have_python_config=yes
ec685c5e
DE
9820 python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
9821 if test $? != 0; then
e7a30f46
DE
9822 have_python_config=failed
9823 if test "${with_python}" != auto; then
9824 as_fn_error "failure running python-config --includes" "$LINENO" 5
9825 fi
ec685c5e
DE
9826 fi
9827 python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
9828 if test $? != 0; then
e7a30f46
DE
9829 have_python_config=failed
9830 if test "${with_python}" != auto; then
9831 as_fn_error "failure running python-config --ldflags" "$LINENO" 5
9832 fi
ec685c5e 9833 fi
0c4a4063
DE
9834 python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
9835 if test $? != 0; then
e7a30f46
DE
9836 have_python_config=failed
9837 if test "${with_python}" != auto; then
9838 as_fn_error "failure running python-config --exec-prefix" "$LINENO" 5
9839 fi
0c4a4063 9840 fi
ec685c5e 9841 else
ac534cba
JB
9842 # We do not have a python executable we can use to determine where
9843 # to find the Python headers and libs. We cannot guess the include
9844 # path from the python_prefix either, because that include path
9845 # depends on the Python version. So, there is nothing much we can
9846 # do except assume that the compiler will be able to find those files.
9847 python_includes=
9848 python_libs=
0c4a4063 9849 have_python_config=no
ec685c5e 9850 fi
bec39cab 9851
ec685c5e
DE
9852 # If we have python-config, only try the configuration it provides.
9853 # Otherwise fallback on the old way of trying different versions of
9854 # python in turn.
81ecdfbb 9855
ec685c5e
DE
9856 have_libpython=no
9857 if test "${have_python_config}" = yes; then
c1039e3c
JB
9858 # Determine the Python version by extracting "-lpython<version>"
9859 # part of the python_libs. <version> is usually X.Y with X and Y
9860 # being decimal numbers, but can also be XY (seen on Windows).
9861 #
9862 # The extraction is performed using sed with a regular expression.
9863 # Initially, the regexp used was using the '?' quantifier to make
9864 # the dot in the version number optional. Unfortunately, this
9865 # does not work with non-GNU versions of sed because, because of
9866 # what looks like a limitation (the '?' quantifier does not work
9867 # with back-references). We work around this limitation by using
9868 # the '*' quantifier instead. It means that, in theory, we might
9869 # match unexpected version strings such as "-lpython2..7", but
9870 # this seems unlikely in practice. And even if that happens,
9871 # an error will be triggered later on, when checking that version
9872 # number.
ec685c5e 9873 python_version=`echo " ${python_libs} " \
c1039e3c 9874 | sed -e 's,^.* -l\(python[0-9]*[.]*[0-9]*\).*$,\1,'`
0c4a4063
DE
9875 case "${python_version}" in
9876 python*)
ec685c5e
DE
9877
9878 version=${python_version}
9879
9880 new_CPPFLAGS=${python_includes}
9881 new_LIBS=${python_libs}
81ecdfbb
RW
9882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
9883$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 9884 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 9885 save_LIBS=$LIBS
ec685c5e
DE
9886 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9887 LIBS="$LIBS $new_LIBS"
9888 found_usable_python=no
81ecdfbb 9889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9890/* end confdefs.h. */
ac534cba 9891#include "Python.h"
81ecdfbb
RW
9892int
9893main ()
9894{
9895Py_Initialize ();
9896 ;
9897 return 0;
9898}
bec39cab 9899_ACEOF
81ecdfbb 9900if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
9901 have_libpython=${version}
9902 found_usable_python=yes
ac534cba
JB
9903 PYTHON_CPPFLAGS=$new_CPPFLAGS
9904 PYTHON_LIBS=$new_LIBS
9a156167 9905fi
81ecdfbb
RW
9906rm -f core conftest.err conftest.$ac_objext \
9907 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
9908 CPPFLAGS=$save_CPPFLAGS
9909 LIBS=$save_LIBS
ec685c5e
DE
9910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
9911$as_echo "${found_usable_python}" >&6; }
9a156167 9912
0c4a4063
DE
9913 ;;
9914 *)
ec685c5e 9915 as_fn_error "unable to determine python version from ${python_libs}" "$LINENO" 5
0c4a4063
DE
9916 ;;
9917 esac
e7a30f46 9918 elif test "${have_python_config}" != failed; then
ec685c5e 9919 if test "${have_libpython}" = no; then
9a156167 9920
420697bb
TT
9921 version=python2.7
9922
9923 new_CPPFLAGS=${python_includes}
9924 new_LIBS="${python_libs} -lpython2.7"
9925 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
9926$as_echo_n "checking for ${version}... " >&6; }
9927 save_CPPFLAGS=$CPPFLAGS
9928 save_LIBS=$LIBS
9929 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9930 LIBS="$LIBS $new_LIBS"
9931 found_usable_python=no
9932 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9933/* end confdefs.h. */
ac534cba 9934#include "Python.h"
420697bb
TT
9935int
9936main ()
9937{
9938Py_Initialize ();
9939 ;
9940 return 0;
9941}
9942_ACEOF
9943if ac_fn_c_try_link "$LINENO"; then :
9944 have_libpython=${version}
9945 found_usable_python=yes
ac534cba
JB
9946 PYTHON_CPPFLAGS=$new_CPPFLAGS
9947 PYTHON_LIBS=$new_LIBS
420697bb
TT
9948fi
9949rm -f core conftest.err conftest.$ac_objext \
9950 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
9951 CPPFLAGS=$save_CPPFLAGS
9952 LIBS=$save_LIBS
420697bb
TT
9953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
9954$as_echo "${found_usable_python}" >&6; }
9955
9956 fi
9957 if test "${have_libpython}" = no; then
9958
ec685c5e
DE
9959 version=python2.6
9960
9961 new_CPPFLAGS=${python_includes}
9962 new_LIBS="${python_libs} -lpython2.6"
9963 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
9964$as_echo_n "checking for ${version}... " >&6; }
9965 save_CPPFLAGS=$CPPFLAGS
9966 save_LIBS=$LIBS
9967 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9968 LIBS="$LIBS $new_LIBS"
9969 found_usable_python=no
9970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9971/* end confdefs.h. */
ac534cba 9972#include "Python.h"
ec685c5e
DE
9973int
9974main ()
9975{
9976Py_Initialize ();
9977 ;
9978 return 0;
9979}
9980_ACEOF
9981if ac_fn_c_try_link "$LINENO"; then :
9982 have_libpython=${version}
9983 found_usable_python=yes
ac534cba
JB
9984 PYTHON_CPPFLAGS=$new_CPPFLAGS
9985 PYTHON_LIBS=$new_LIBS
ec685c5e
DE
9986fi
9987rm -f core conftest.err conftest.$ac_objext \
9988 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
9989 CPPFLAGS=$save_CPPFLAGS
9990 LIBS=$save_LIBS
ec685c5e
DE
9991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
9992$as_echo "${found_usable_python}" >&6; }
9a156167 9993
81ecdfbb 9994 fi
ec685c5e 9995 if test ${have_libpython} = no; then
9a156167 9996
81ecdfbb 9997 version=python2.5
9a156167 9998
ec685c5e
DE
9999 new_CPPFLAGS=${python_includes}
10000 new_LIBS="${python_libs} -lpython2.5"
81ecdfbb
RW
10001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10002$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 10003 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 10004 save_LIBS=$LIBS
ec685c5e
DE
10005 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10006 LIBS="$LIBS $new_LIBS"
10007 found_usable_python=no
81ecdfbb 10008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 10009/* end confdefs.h. */
ac534cba 10010#include "Python.h"
81ecdfbb
RW
10011int
10012main ()
10013{
10014Py_Initialize ();
10015 ;
10016 return 0;
10017}
436868fb 10018_ACEOF
81ecdfbb 10019if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
10020 have_libpython=${version}
10021 found_usable_python=yes
ac534cba
JB
10022 PYTHON_CPPFLAGS=$new_CPPFLAGS
10023 PYTHON_LIBS=$new_LIBS
436868fb 10024fi
81ecdfbb
RW
10025rm -f core conftest.err conftest.$ac_objext \
10026 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10027 CPPFLAGS=$save_CPPFLAGS
10028 LIBS=$save_LIBS
ec685c5e
DE
10029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10030$as_echo "${found_usable_python}" >&6; }
a9322a30 10031
81ecdfbb 10032 fi
ec685c5e 10033 if test ${have_libpython} = no; then
a9322a30 10034
81ecdfbb 10035 version=python2.4
a9322a30 10036
ec685c5e
DE
10037 new_CPPFLAGS=${python_includes}
10038 new_LIBS="${python_libs} -lpython2.4"
81ecdfbb
RW
10039 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10040$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 10041 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 10042 save_LIBS=$LIBS
ec685c5e
DE
10043 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10044 LIBS="$LIBS $new_LIBS"
10045 found_usable_python=no
81ecdfbb 10046 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 10047/* end confdefs.h. */
ac534cba 10048#include "Python.h"
a9322a30
TT
10049int
10050main ()
10051{
81ecdfbb 10052Py_Initialize ();
a9322a30
TT
10053 ;
10054 return 0;
10055}
436868fb 10056_ACEOF
81ecdfbb 10057if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
10058 have_libpython=${version}
10059 found_usable_python=yes
ac534cba
JB
10060 PYTHON_CPPFLAGS=$new_CPPFLAGS
10061 PYTHON_LIBS=$new_LIBS
436868fb 10062fi
81ecdfbb
RW
10063rm -f core conftest.err conftest.$ac_objext \
10064 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10065 CPPFLAGS=$save_CPPFLAGS
10066 LIBS=$save_LIBS
ec685c5e
DE
10067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10068$as_echo "${found_usable_python}" >&6; }
81ecdfbb 10069
ec685c5e
DE
10070 fi
10071 fi
9c4ea6c5 10072 if test "${have_libpython}" = python2.7 -o "${have_libpython}" = python27; then
11763c18
TT
10073
10074$as_echo "#define HAVE_LIBPYTHON2_7 1" >>confdefs.h
10075
9c4ea6c5 10076 elif test "${have_libpython}" = python2.6 -o "${have_libpython}" = python26; then
ec685c5e
DE
10077
10078$as_echo "#define HAVE_LIBPYTHON2_6 1" >>confdefs.h
10079
9c4ea6c5 10080 elif test "${have_libpython}" = python2.5 -o "${have_libpython}" = python25; then
ec685c5e
DE
10081
10082$as_echo "#define HAVE_LIBPYTHON2_5 1" >>confdefs.h
10083
9c4ea6c5 10084 elif test "${have_libpython}" = python2.4 -o "${have_libpython}" = python24; then
81ecdfbb
RW
10085
10086$as_echo "#define HAVE_LIBPYTHON2_4 1" >>confdefs.h
10087
81ecdfbb 10088 fi
ec685c5e
DE
10089
10090 if test "${have_libpython}" = no; then
81ecdfbb
RW
10091 case "${with_python}" in
10092 yes)
10093 as_fn_error "python is missing or unusable" "$LINENO" 5
10094 ;;
10095 auto)
10096 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
10097$as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
10098 ;;
10099 *)
10100 as_fn_error "no usable python found at ${with_python}" "$LINENO" 5
10101 ;;
10102 esac
0c4a4063
DE
10103 else
10104 if test -n "${python_prefix}"; then
10105
10106cat >>confdefs.h <<_ACEOF
10107#define WITH_PYTHON_PATH "${python_prefix}"
10108_ACEOF
10109
10110
10111 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
10112 if test "x$prefix" = xNONE; then
10113 test_prefix=/usr/local
10114 else
10115 test_prefix=$prefix
10116 fi
10117 else
10118 test_prefix=$exec_prefix
10119 fi
10120 value=0
10121 case ${python_prefix} in
10122 "${test_prefix}"|"${test_prefix}/"*|\
10123 '${exec_prefix}'|'${exec_prefix}/'*)
10124 value=1
10125 ;;
10126 esac
10127
10128cat >>confdefs.h <<_ACEOF
10129#define PYTHON_PATH_RELOCATABLE $value
10130_ACEOF
10131
10132
10133 fi
81ecdfbb 10134 fi
436868fb 10135fi
436868fb 10136
ec685c5e 10137if test "${have_libpython}" != no; then
436868fb 10138
81ecdfbb 10139$as_echo "#define HAVE_PYTHON 1" >>confdefs.h
436868fb 10140
81ecdfbb
RW
10141 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
10142 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
10143 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
94f7449c 10144 CONFIG_INSTALL="$CONFIG_INSTALL install-python"
81ecdfbb 10145 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
436868fb 10146
81ecdfbb
RW
10147 # Flags needed to compile Python code (taken from python-config --cflags).
10148 # We cannot call python-config directly because it will output whatever was
10149 # used when compiling the Python interpreter itself, including flags which
10150 # would make the python-related objects be compiled differently from the
10151 # rest of GDB (e.g., -O2 and -fPIC).
10152 if test "${GCC}" = yes; then
10153 tentative_python_cflags="-fno-strict-aliasing -DNDEBUG -fwrapv"
10154 fi
436868fb 10155
81ecdfbb
RW
10156 if test "x${tentative_python_cflags}" != x; then
10157 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
10158$as_echo_n "checking compiler flags for python code... " >&6; }
10159 for flag in ${tentative_python_cflags}; do
10160 # Check that the compiler accepts it
10161 saved_CFLAGS="$CFLAGS"
10162 CFLAGS="$CFLAGS $flag"
10163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10164/* end confdefs.h. */
81ecdfbb 10165
a9322a30
TT
10166int
10167main ()
10168{
a9322a30
TT
10169
10170 ;
10171 return 0;
10172}
bec39cab 10173_ACEOF
81ecdfbb
RW
10174if ac_fn_c_try_compile "$LINENO"; then :
10175 PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
bec39cab 10176fi
81ecdfbb
RW
10177rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10178 CFLAGS="$saved_CFLAGS"
10179 done
10180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
10181$as_echo "${PYTHON_CFLAGS}" >&6; }
10182 fi
043b6510 10183
c83393b9
JB
10184 # On x64 Windows, Python's include headers, and pyconfig.h in
10185 # particular, rely on MS_WIN64 macro to detect that it's a 64bit
10186 # version of Windows. Unfortunately, MS_WIN64 is only defined if
10187 # _MSC_VER, a Microsoft-specific macro, is defined. So, when
10188 # building on x64 Windows with GCC, we define MS_WIN64 ourselves.
10189 # The issue was reported to the Python community, but still isn't
10190 # solved as of 2012-10-02 (http://bugs.python.org/issue4709).
10191
043b6510 10192 case "$gdb_host" in
c83393b9
JB
10193 mingw64)
10194 if test "${GCC}" = yes; then
10195 CPPFLAGS="$CPPFLAGS -DMS_WIN64"
10196 fi
10197 ;;
043b6510 10198 esac
a8db4212
YPK
10199
10200 # Note that "python -m threading" cannot be used to check for
10201 # threading support due to a bug in Python 2.7.3
10202 # (http://bugs.python.org/issue15567).
10203 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether python supports threads" >&5
10204$as_echo_n "checking whether python supports threads... " >&6; }
10205 saved_CPPFLAGS="${CPPFLAGS}"
10206 CPPFLAGS="${PYTHON_CPPFLAGS}"
10207 # Note that the test is reversed so that python_has_threads=yes on
10208 # unexpected failures.
10209 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10210/* end confdefs.h. */
10211
10212#include <Python.h>
10213#ifdef WITH_THREAD
10214# error
10215#endif
10216
10217_ACEOF
10218if ac_fn_c_try_cpp "$LINENO"; then :
10219 python_has_threads=no
10220else
10221 python_has_threads=yes
10222fi
10223rm -f conftest.err conftest.$ac_ext
10224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_has_threads}" >&5
10225$as_echo "${python_has_threads}" >&6; }
10226 CPPFLAGS="${saved_CPPFLAGS}"
81ecdfbb 10227else
6dddc817
DE
10228 # Even if Python support is not compiled in, we need to have this file
10229 # included so that the "python" command, et.al., still exists.
10230 CONFIG_OBS="$CONFIG_OBS python.o"
10231 CONFIG_SRCS="$CONFIG_SRCS python/python.c"
a9322a30 10232fi
9a156167 10233
a4a1c157
PA
10234# Work around Python http://bugs.python.org/issue10112. See also
10235# http://bugs.python.org/issue11410, otherwise -Wl,--dynamic-list has
10236# no effect. Note that the only test after this that uses Python is
10237# the -rdynamic/-Wl,--dynamic-list test, and we do want that one to be
10238# run without -export-dynamic too.
10239PYTHON_LIBS=`echo $PYTHON_LIBS | sed -e 's/-Xlinker -export-dynamic//'`
10240
10241
ed3ef339
DE
10242
10243
4df42755
DE
10244 if test "${have_libpython}" != no; then
10245 HAVE_PYTHON_TRUE=
10246 HAVE_PYTHON_FALSE='#'
10247else
10248 HAVE_PYTHON_TRUE='#'
10249 HAVE_PYTHON_FALSE=
10250fi
10251
ed3ef339
DE
10252
10253# -------------------- #
10254# Check for libguile. #
10255# -------------------- #
10256
10257
e1402065
DE
10258
10259
10260
10261
10262# Check whether --with-guile was given.
10263if test "${with_guile+set}" = set; then :
10264 withval=$with_guile;
10265else
10266 with_guile=auto
10267fi
10268
10269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use guile" >&5
10270$as_echo_n "checking whether to use guile... " >&6; }
10271{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_guile" >&5
10272$as_echo "$with_guile" >&6; }
10273
ed3ef339
DE
10274# Extract the first word of "pkg-config", so it can be a program name with args.
10275set dummy pkg-config; ac_word=$2
10276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10277$as_echo_n "checking for $ac_word... " >&6; }
10278if test "${ac_cv_path_pkg_config_prog_path+set}" = set; then :
10279 $as_echo_n "(cached) " >&6
10280else
10281 case $pkg_config_prog_path in
10282 [\\/]* | ?:[\\/]*)
10283 ac_cv_path_pkg_config_prog_path="$pkg_config_prog_path" # Let the user override the test with a path.
10284 ;;
10285 *)
10286 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10287for as_dir in $PATH
10288do
10289 IFS=$as_save_IFS
10290 test -z "$as_dir" && as_dir=.
10291 for ac_exec_ext in '' $ac_executable_extensions; do
10292 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10293 ac_cv_path_pkg_config_prog_path="$as_dir/$ac_word$ac_exec_ext"
10294 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10295 break 2
10296 fi
10297done
10298 done
10299IFS=$as_save_IFS
10300
10301 test -z "$ac_cv_path_pkg_config_prog_path" && ac_cv_path_pkg_config_prog_path="missing"
10302 ;;
10303esac
10304fi
10305pkg_config_prog_path=$ac_cv_path_pkg_config_prog_path
10306if test -n "$pkg_config_prog_path"; then
10307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config_prog_path" >&5
10308$as_echo "$pkg_config_prog_path" >&6; }
10309else
10310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10311$as_echo "no" >&6; }
10312fi
10313
10314
10315
214ab2da 10316try_guile_versions="guile-2.2 guile-2.0"
ed3ef339
DE
10317have_libguile=no
10318case "${with_guile}" in
10319no)
10320 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: guile support disabled; some features will be unavailable." >&5
10321$as_echo "$as_me: WARNING: guile support disabled; some features will be unavailable." >&2;}
10322 ;;
10323auto)
e1402065
DE
10324 if test "${pkg_config_prog_path}" = "missing"; then
10325 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found, guile support disabled" >&5
10326$as_echo "$as_me: WARNING: pkg-config not found, guile support disabled" >&2;}
10327 else
ed3ef339
DE
10328
10329 pkg_config=${pkg_config_prog_path}
10330 guile_version_list=${try_guile_versions}
10331 flag_errors=no
10332
ed3ef339
DE
10333 found_usable_guile=checking
10334 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
10335$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
10336 for guile_version in ${guile_version_list}; do
10337 ${pkg_config} --exists ${guile_version} 2>/dev/null
10338 if test $? != 0; then
10339 continue
10340 fi
10341 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
10342 if test $? != 0; then
10343 as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
10344 fi
10345 new_LIBS=`${pkg_config} --libs ${guile_version}`
10346 if test $? != 0; then
10347 as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
10348 fi
10349 found_usable_guile=${guile_version}
10350 break
10351 done
10352 if test "${found_usable_guile}" = "checking"; then
10353 if test "${flag_errors}" = "yes"; then
10354 as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
10355 else
10356 found_usable_guile=no
10357 fi
10358 fi
10359 if test "${found_usable_guile}" != no; then
10360 save_CPPFLAGS=$CPPFLAGS
10361 save_LIBS=$LIBS
10362 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10363 LIBS="$LIBS $new_LIBS"
10364 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10365/* end confdefs.h. */
10366#include "libguile.h"
10367int
10368main ()
10369{
10370scm_init_guile ();
10371 ;
10372 return 0;
10373}
10374_ACEOF
10375if ac_fn_c_try_link "$LINENO"; then :
10376 have_libguile=yes
10377 GUILE_CPPFLAGS=$new_CPPFLAGS
10378 GUILE_LIBS=$new_LIBS
10379else
10380 found_usable_guile=no
10381fi
10382rm -f core conftest.err conftest.$ac_objext \
10383 conftest$ac_exeext conftest.$ac_ext
92fab5a6
AW
10384 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
10385if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then :
10386
10387$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
10388
10389
10390fi
10391
ed3ef339
DE
10392 CPPFLAGS=$save_CPPFLAGS
10393 LIBS=$save_LIBS
10394 if test "${found_usable_guile}" = no; then
10395 if test "${flag_errors}" = yes; then
10396 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10397$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10398as_fn_error "linking guile version ${guile_version} test program failed
10399See \`config.log' for more details." "$LINENO" 5; }
10400 fi
10401 fi
10402 fi
10403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
10404$as_echo "${found_usable_guile}" >&6; }
10405
e1402065 10406 fi
ed3ef339
DE
10407 ;;
10408yes)
e1402065
DE
10409 if test "${pkg_config_prog_path}" = "missing"; then
10410 as_fn_error "pkg-config not found" "$LINENO" 5
10411 fi
ed3ef339
DE
10412
10413 pkg_config=${pkg_config_prog_path}
10414 guile_version_list=${try_guile_versions}
10415 flag_errors=yes
10416
ed3ef339
DE
10417 found_usable_guile=checking
10418 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
10419$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
10420 for guile_version in ${guile_version_list}; do
10421 ${pkg_config} --exists ${guile_version} 2>/dev/null
10422 if test $? != 0; then
10423 continue
10424 fi
10425 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
10426 if test $? != 0; then
10427 as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
10428 fi
10429 new_LIBS=`${pkg_config} --libs ${guile_version}`
10430 if test $? != 0; then
10431 as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
10432 fi
10433 found_usable_guile=${guile_version}
10434 break
10435 done
10436 if test "${found_usable_guile}" = "checking"; then
10437 if test "${flag_errors}" = "yes"; then
10438 as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
10439 else
10440 found_usable_guile=no
10441 fi
10442 fi
10443 if test "${found_usable_guile}" != no; then
10444 save_CPPFLAGS=$CPPFLAGS
10445 save_LIBS=$LIBS
10446 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10447 LIBS="$LIBS $new_LIBS"
10448 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10449/* end confdefs.h. */
10450#include "libguile.h"
10451int
10452main ()
10453{
10454scm_init_guile ();
10455 ;
10456 return 0;
10457}
10458_ACEOF
10459if ac_fn_c_try_link "$LINENO"; then :
10460 have_libguile=yes
10461 GUILE_CPPFLAGS=$new_CPPFLAGS
10462 GUILE_LIBS=$new_LIBS
10463else
10464 found_usable_guile=no
10465fi
10466rm -f core conftest.err conftest.$ac_objext \
10467 conftest$ac_exeext conftest.$ac_ext
92fab5a6
AW
10468 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
10469if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then :
10470
10471$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
10472
10473
10474fi
10475
ed3ef339
DE
10476 CPPFLAGS=$save_CPPFLAGS
10477 LIBS=$save_LIBS
10478 if test "${found_usable_guile}" = no; then
10479 if test "${flag_errors}" = yes; then
10480 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10481$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10482as_fn_error "linking guile version ${guile_version} test program failed
10483See \`config.log' for more details." "$LINENO" 5; }
10484 fi
10485 fi
10486 fi
10487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
10488$as_echo "${found_usable_guile}" >&6; }
10489
10490 ;;
10491[\\/]* | ?:[\\/]*)
e1402065 10492 if test -x "${with_guile}"; then
ed3ef339
DE
10493
10494 pkg_config=${with_guile}
10495 guile_version_list=${try_guile_versions}
10496 flag_errors=yes
10497
ed3ef339
DE
10498 found_usable_guile=checking
10499 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
10500$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
10501 for guile_version in ${guile_version_list}; do
10502 ${pkg_config} --exists ${guile_version} 2>/dev/null
10503 if test $? != 0; then
10504 continue
10505 fi
10506 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
10507 if test $? != 0; then
10508 as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
10509 fi
10510 new_LIBS=`${pkg_config} --libs ${guile_version}`
10511 if test $? != 0; then
10512 as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
10513 fi
10514 found_usable_guile=${guile_version}
10515 break
10516 done
10517 if test "${found_usable_guile}" = "checking"; then
10518 if test "${flag_errors}" = "yes"; then
10519 as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
10520 else
10521 found_usable_guile=no
10522 fi
10523 fi
10524 if test "${found_usable_guile}" != no; then
10525 save_CPPFLAGS=$CPPFLAGS
10526 save_LIBS=$LIBS
10527 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10528 LIBS="$LIBS $new_LIBS"
10529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10530/* end confdefs.h. */
10531#include "libguile.h"
10532int
10533main ()
10534{
10535scm_init_guile ();
10536 ;
10537 return 0;
10538}
10539_ACEOF
10540if ac_fn_c_try_link "$LINENO"; then :
10541 have_libguile=yes
10542 GUILE_CPPFLAGS=$new_CPPFLAGS
10543 GUILE_LIBS=$new_LIBS
10544else
10545 found_usable_guile=no
10546fi
10547rm -f core conftest.err conftest.$ac_objext \
10548 conftest$ac_exeext conftest.$ac_ext
92fab5a6
AW
10549 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
10550if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then :
10551
10552$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
10553
10554
10555fi
10556
ed3ef339
DE
10557 CPPFLAGS=$save_CPPFLAGS
10558 LIBS=$save_LIBS
10559 if test "${found_usable_guile}" = no; then
10560 if test "${flag_errors}" = yes; then
10561 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10562$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10563as_fn_error "linking guile version ${guile_version} test program failed
10564See \`config.log' for more details." "$LINENO" 5; }
10565 fi
10566 fi
10567 fi
10568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
10569$as_echo "${found_usable_guile}" >&6; }
10570
e1402065
DE
10571 else
10572 as_fn_error "Guile config program not executable: ${with_guile}" "$LINENO" 5
10573 fi
ed3ef339
DE
10574 ;;
10575"" | */*)
10576 # Disallow --with=guile="" and --with-guile=foo/bar.
10577 as_fn_error "invalid value for --with-guile" "$LINENO" 5
10578 ;;
10579*)
10580 # A space separate list of guile versions to try, in order.
e1402065
DE
10581 if test "${pkg_config_prog_path}" = "missing"; then
10582 as_fn_error "pkg-config not found" "$LINENO" 5
10583 fi
ed3ef339
DE
10584
10585 pkg_config=${pkg_config_prog_path}
10586 guile_version_list=${with_guile}
10587 flag_errors=yes
10588
ed3ef339
DE
10589 found_usable_guile=checking
10590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
10591$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
10592 for guile_version in ${guile_version_list}; do
10593 ${pkg_config} --exists ${guile_version} 2>/dev/null
10594 if test $? != 0; then
10595 continue
10596 fi
10597 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
10598 if test $? != 0; then
10599 as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
10600 fi
10601 new_LIBS=`${pkg_config} --libs ${guile_version}`
10602 if test $? != 0; then
10603 as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
10604 fi
10605 found_usable_guile=${guile_version}
10606 break
10607 done
10608 if test "${found_usable_guile}" = "checking"; then
10609 if test "${flag_errors}" = "yes"; then
10610 as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
10611 else
10612 found_usable_guile=no
10613 fi
10614 fi
10615 if test "${found_usable_guile}" != no; then
10616 save_CPPFLAGS=$CPPFLAGS
10617 save_LIBS=$LIBS
10618 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10619 LIBS="$LIBS $new_LIBS"
10620 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10621/* end confdefs.h. */
10622#include "libguile.h"
10623int
10624main ()
10625{
10626scm_init_guile ();
10627 ;
10628 return 0;
10629}
10630_ACEOF
10631if ac_fn_c_try_link "$LINENO"; then :
10632 have_libguile=yes
10633 GUILE_CPPFLAGS=$new_CPPFLAGS
10634 GUILE_LIBS=$new_LIBS
10635else
10636 found_usable_guile=no
10637fi
10638rm -f core conftest.err conftest.$ac_objext \
10639 conftest$ac_exeext conftest.$ac_ext
92fab5a6
AW
10640 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
10641if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then :
10642
10643$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
10644
10645
10646fi
10647
ed3ef339
DE
10648 CPPFLAGS=$save_CPPFLAGS
10649 LIBS=$save_LIBS
10650 if test "${found_usable_guile}" = no; then
10651 if test "${flag_errors}" = yes; then
10652 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10653$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10654as_fn_error "linking guile version ${guile_version} test program failed
10655See \`config.log' for more details." "$LINENO" 5; }
10656 fi
10657 fi
10658 fi
10659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
10660$as_echo "${found_usable_guile}" >&6; }
10661
10662 ;;
10663esac
10664
e76c5d17 10665if test "${have_libguile}" != no; then
d342a0da
DE
10666 case "${with_guile}" in
10667 [\\/]* | ?:[\\/]*)
e76c5d17
DE
10668
10669 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
10670$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
10671if test "${ac_cv_guild_program_name+set}" = set; then :
10672 $as_echo_n "(cached) " >&6
10673else
d342a0da 10674 ac_cv_guild_program_name="`"${with_guile}" --variable guild "${guile_version}"`"
e76c5d17
DE
10675
10676 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
10677 # the 'guild' and 'bindir' variables. In that case, try to guess
10678 # what the program name is, at the risk of getting it wrong if
10679 # Guile was configured with '--program-suffix' or similar.
10680 if test "x$ac_cv_guild_program_name" = "x"; then
d342a0da 10681 guile_exec_prefix="`"${with_guile}" --variable exec_prefix "${guile_version}"`"
e76c5d17
DE
10682 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
10683 fi
10684
10685fi
10686{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
10687$as_echo "$ac_cv_guild_program_name" >&6; }
10688
10689 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
10690 as_fn_error "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
10691 fi
10692
10693 GUILD="$ac_cv_guild_program_name"
10694
10695
d342a0da
DE
10696 ;;
10697 *)
10698
10699 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
10700$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
10701if test "${ac_cv_guild_program_name+set}" = set; then :
10702 $as_echo_n "(cached) " >&6
10703else
10704 ac_cv_guild_program_name="`"${pkg_config_prog_path}" --variable guild "${guile_version}"`"
10705
10706 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
10707 # the 'guild' and 'bindir' variables. In that case, try to guess
10708 # what the program name is, at the risk of getting it wrong if
10709 # Guile was configured with '--program-suffix' or similar.
10710 if test "x$ac_cv_guild_program_name" = "x"; then
10711 guile_exec_prefix="`"${pkg_config_prog_path}" --variable exec_prefix "${guile_version}"`"
10712 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
10713 fi
10714
10715fi
10716{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
10717$as_echo "$ac_cv_guild_program_name" >&6; }
10718
10719 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
10720 as_fn_error "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
10721 fi
10722
10723 GUILD="$ac_cv_guild_program_name"
10724
10725
10726 ;;
10727 esac
e76c5d17
DE
10728
10729
10730 if test "$cross_compiling" = no; then
10731 GUILD_TARGET_FLAG=
10732 else
10733 GUILD_TARGET_FLAG="--target=$host"
10734 fi
10735
10736
10737
10738
10739 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether guild supports this host" >&5
10740$as_echo_n "checking whether guild supports this host... " >&6; }
10741if test "${ac_cv_guild_ok+set}" = set; then :
10742 $as_echo_n "(cached) " >&6
10743else
10744 echo "$ac_cv_guild_program_name compile $GUILD_TARGET_FLAG -o conftest.go $srcdir/guile/lib/gdb/support.scm" >&5
10745 if "$ac_cv_guild_program_name" compile $GUILD_TARGET_FLAG -o conftest.go "$srcdir/guile/lib/gdb/support.scm" >&5 2>&5; then
10746 ac_cv_guild_ok=yes
10747 else
10748 ac_cv_guild_ok=no
10749 fi
10750fi
10751{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_ok" >&5
10752$as_echo "$ac_cv_guild_ok" >&6; }
10753
10754 if test "$ac_cv_guild_ok" = no; then
10755 have_libguile=no
10756 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling guile support" >&5
10757$as_echo "$as_me: WARNING: disabling guile support" >&2;}
10758 fi
10759fi
10760
ed3ef339
DE
10761if test "${have_libguile}" != no; then
10762
10763$as_echo "#define HAVE_GUILE 1" >>confdefs.h
10764
10765 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_GUILE_OBS)"
10766 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_GUILE_DEPS)"
10767 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_GUILE_SRCS)"
10768 CONFIG_INSTALL="$CONFIG_INSTALL install-guile"
10769 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_GUILE_CFLAGS)"
16954d5d
LC
10770
10771 save_LIBS="$LIBS"
10772 save_CPPFLAGS="$CPPFLAGS"
10773 LIBS="$GUILE_LIBS"
10774 CPPFLAGS="$GUILE_CPPFLAGS"
10775 for ac_func in scm_new_smob
10776do :
10777 ac_fn_c_check_func "$LINENO" "scm_new_smob" "ac_cv_func_scm_new_smob"
10778if test "x$ac_cv_func_scm_new_smob" = x""yes; then :
10779 cat >>confdefs.h <<_ACEOF
10780#define HAVE_SCM_NEW_SMOB 1
10781_ACEOF
10782
10783fi
10784done
10785
10786 LIBS="$save_LIBS"
10787 CPPFLAGS="$save_CPPFLAGS"
ed3ef339
DE
10788else
10789 # Even if Guile support is not compiled in, we need to have these files
10790 # included.
10791 CONFIG_OBS="$CONFIG_OBS guile.o"
10792 CONFIG_SRCS="$CONFIG_SRCS guile/guile.c"
10793fi
9a156167 10794
ac534cba 10795
4df42755
DE
10796 if test "${have_libguile}" != no; then
10797 HAVE_GUILE_TRUE=
10798 HAVE_GUILE_FALSE='#'
10799else
10800 HAVE_GUILE_TRUE='#'
10801 HAVE_GUILE_FALSE=
10802fi
10803
ac534cba 10804
d344e670
DE
10805# --------------------- #
10806# Check for libmcheck. #
10807# --------------------- #
10808
a8db4212
YPK
10809# Enable -lmcheck by default (it provides cheap-enough memory mangling),
10810# but turn it off if Python is enabled with threads, since -lmcheck is
10811# not thread safe (http://sourceware.org/bugzilla/show_bug.cgi?id=9939),
10812# and for releases.
17ef446e
PA
10813if test \( "${have_libpython}" = "no" -o "${python_has_threads}" = "no" \) \
10814 && $development; then
10815 libmcheck_default=yes
10816else
10817 libmcheck_default=no
a8db4212
YPK
10818fi
10819
17ef446e
PA
10820 # Check whether --enable-libmcheck was given.
10821if test "${enable_libmcheck+set}" = set; then :
10822 enableval=$enable_libmcheck; case "${enableval}" in
10823 yes | y) ENABLE_LIBMCHECK="yes" ;;
10824 no | n) ENABLE_LIBMCHECK="no" ;;
10825 *) as_fn_error "bad value ${enableval} for --enable-libmcheck" "$LINENO" 5 ;;
10826 esac
10827fi
10828
10829
10830 if test -z "${ENABLE_LIBMCHECK}"; then
10831 ENABLE_LIBMCHECK=${libmcheck_default}
a8db4212 10832 fi
17ef446e
PA
10833
10834 if test "$ENABLE_LIBMCHECK" = "yes" ; then
10835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lmcheck" >&5
a8db4212
YPK
10836$as_echo_n "checking for main in -lmcheck... " >&6; }
10837if test "${ac_cv_lib_mcheck_main+set}" = set; then :
10838 $as_echo_n "(cached) " >&6
10839else
10840 ac_check_lib_save_LIBS=$LIBS
10841LIBS="-lmcheck $LIBS"
10842cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10843/* end confdefs.h. */
10844
10845
10846int
10847main ()
10848{
10849return main ();
10850 ;
10851 return 0;
10852}
10853_ACEOF
10854if ac_fn_c_try_link "$LINENO"; then :
10855 ac_cv_lib_mcheck_main=yes
10856else
10857 ac_cv_lib_mcheck_main=no
10858fi
10859rm -f core conftest.err conftest.$ac_objext \
10860 conftest$ac_exeext conftest.$ac_ext
10861LIBS=$ac_check_lib_save_LIBS
10862fi
10863{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mcheck_main" >&5
10864$as_echo "$ac_cv_lib_mcheck_main" >&6; }
10865if test "x$ac_cv_lib_mcheck_main" = x""yes; then :
10866 cat >>confdefs.h <<_ACEOF
10867#define HAVE_LIBMCHECK 1
10868_ACEOF
10869
10870 LIBS="-lmcheck $LIBS"
10871
10872fi
10873
17ef446e
PA
10874 fi
10875
10876
10877if test "$ENABLE_LIBMCHECK" = "yes" \
10878 -a "${have_libpython}" != "no" \
10879 -a "${python_has_threads}" = "yes" ; then
10880 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&5
10881$as_echo "$as_me: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&2;}
a8db4212
YPK
10882fi
10883
58bfce93
MM
10884
10885# Check whether --with-intel_pt was given.
10886if test "${with_intel_pt+set}" = set; then :
10887 withval=$with_intel_pt;
10888else
10889 with_intel_pt=auto
10890fi
10891
10892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5
10893$as_echo_n "checking whether to use intel pt... " >&6; }
10894{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5
10895$as_echo "$with_intel_pt" >&6; }
10896
10897if test "${with_intel_pt}" = no; then
bc504a31
PA
10898 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&5
10899$as_echo "$as_me: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&2;}
58bfce93
MM
10900 HAVE_LIBIPT=no
10901else
5599c404
MM
10902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10903/* end confdefs.h. */
10904
10905#include <linux/perf_event.h>
10906#ifndef PERF_ATTR_SIZE_VER5
10907# error
10908#endif
10909
10910_ACEOF
10911if ac_fn_c_try_cpp "$LINENO"; then :
10912 perf_event=yes
10913else
10914 perf_event=no
10915fi
10916rm -f conftest.err conftest.$ac_ext
10917 if test "$perf_event" != yes; then
10918 if test "$with_intel_pt" = yes; then
10919 as_fn_error "linux/perf_event.h missing or too old" "$LINENO" 5
10920 else
10921 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5
10922$as_echo "$as_me: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&2;}
10923 fi
10924 fi
10925
58bfce93
MM
10926
10927
10928
10929
10930
10931
10932
10933
10934 use_additional=yes
10935
10936 acl_save_prefix="$prefix"
10937 prefix="$acl_final_prefix"
10938 acl_save_exec_prefix="$exec_prefix"
10939 exec_prefix="$acl_final_exec_prefix"
10940
10941 eval additional_includedir=\"$includedir\"
10942 eval additional_libdir=\"$libdir\"
10943
10944 exec_prefix="$acl_save_exec_prefix"
10945 prefix="$acl_save_prefix"
10946
10947
10948# Check whether --with-libipt-prefix was given.
10949if test "${with_libipt_prefix+set}" = set; then :
10950 withval=$with_libipt_prefix;
10951 if test "X$withval" = "Xno"; then
10952 use_additional=no
10953 else
10954 if test "X$withval" = "X"; then
10955
10956 acl_save_prefix="$prefix"
10957 prefix="$acl_final_prefix"
10958 acl_save_exec_prefix="$exec_prefix"
10959 exec_prefix="$acl_final_exec_prefix"
10960
10961 eval additional_includedir=\"$includedir\"
10962 eval additional_libdir=\"$libdir\"
10963
10964 exec_prefix="$acl_save_exec_prefix"
10965 prefix="$acl_save_prefix"
10966
10967 else
10968 additional_includedir="$withval/include"
10969 additional_libdir="$withval/lib"
10970 fi
10971 fi
10972
10973fi
10974
10975 LIBIPT=
10976 LTLIBIPT=
10977 INCIPT=
10978 rpathdirs=
10979 ltrpathdirs=
10980 names_already_handled=
10981 names_next_round='ipt '
10982 while test -n "$names_next_round"; do
10983 names_this_round="$names_next_round"
10984 names_next_round=
10985 for name in $names_this_round; do
10986 already_handled=
10987 for n in $names_already_handled; do
10988 if test "$n" = "$name"; then
10989 already_handled=yes
10990 break
10991 fi
10992 done
10993 if test -z "$already_handled"; then
10994 names_already_handled="$names_already_handled $name"
10995 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
10996 eval value=\"\$HAVE_LIB$uppername\"
10997 if test -n "$value"; then
10998 if test "$value" = yes; then
10999 eval value=\"\$LIB$uppername\"
11000 test -z "$value" || LIBIPT="${LIBIPT}${LIBIPT:+ }$value"
11001 eval value=\"\$LTLIB$uppername\"
11002 test -z "$value" || LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$value"
11003 else
11004 :
11005 fi
11006 else
11007 found_dir=
11008 found_la=
11009 found_so=
11010 found_a=
11011 if test $use_additional = yes; then
11012 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
11013 found_dir="$additional_libdir"
11014 found_so="$additional_libdir/lib$name.$shlibext"
11015 if test -f "$additional_libdir/lib$name.la"; then
11016 found_la="$additional_libdir/lib$name.la"
11017 fi
11018 else
11019 if test -f "$additional_libdir/lib$name.$libext"; then
11020 found_dir="$additional_libdir"
11021 found_a="$additional_libdir/lib$name.$libext"
11022 if test -f "$additional_libdir/lib$name.la"; then
11023 found_la="$additional_libdir/lib$name.la"
11024 fi
11025 fi
11026 fi
11027 fi
11028 if test "X$found_dir" = "X"; then
11029 for x in $LDFLAGS $LTLIBIPT; do
11030
11031 acl_save_prefix="$prefix"
11032 prefix="$acl_final_prefix"
11033 acl_save_exec_prefix="$exec_prefix"
11034 exec_prefix="$acl_final_exec_prefix"
11035 eval x=\"$x\"
11036 exec_prefix="$acl_save_exec_prefix"
11037 prefix="$acl_save_prefix"
11038
11039 case "$x" in
11040 -L*)
11041 dir=`echo "X$x" | sed -e 's/^X-L//'`
11042 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
11043 found_dir="$dir"
11044 found_so="$dir/lib$name.$shlibext"
11045 if test -f "$dir/lib$name.la"; then
11046 found_la="$dir/lib$name.la"
11047 fi
11048 else
11049 if test -f "$dir/lib$name.$libext"; then
11050 found_dir="$dir"
11051 found_a="$dir/lib$name.$libext"
11052 if test -f "$dir/lib$name.la"; then
11053 found_la="$dir/lib$name.la"
11054 fi
11055 fi
11056 fi
11057 ;;
11058 esac
11059 if test "X$found_dir" != "X"; then
11060 break
11061 fi
11062 done
11063 fi
11064 if test "X$found_dir" != "X"; then
11065 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$found_dir -l$name"
11066 if test "X$found_so" != "X"; then
11067 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
11068 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11069 else
11070 haveit=
11071 for x in $ltrpathdirs; do
11072 if test "X$x" = "X$found_dir"; then
11073 haveit=yes
11074 break
11075 fi
11076 done
11077 if test -z "$haveit"; then
11078 ltrpathdirs="$ltrpathdirs $found_dir"
11079 fi
11080 if test "$hardcode_direct" = yes; then
11081 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11082 else
11083 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
11084 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11085 haveit=
11086 for x in $rpathdirs; do
11087 if test "X$x" = "X$found_dir"; then
11088 haveit=yes
11089 break
11090 fi
11091 done
11092 if test -z "$haveit"; then
11093 rpathdirs="$rpathdirs $found_dir"
11094 fi
11095 else
11096 haveit=
11097 for x in $LDFLAGS $LIBIPT; do
11098
11099 acl_save_prefix="$prefix"
11100 prefix="$acl_final_prefix"
11101 acl_save_exec_prefix="$exec_prefix"
11102 exec_prefix="$acl_final_exec_prefix"
11103 eval x=\"$x\"
11104 exec_prefix="$acl_save_exec_prefix"
11105 prefix="$acl_save_prefix"
11106
11107 if test "X$x" = "X-L$found_dir"; then
11108 haveit=yes
11109 break
11110 fi
11111 done
11112 if test -z "$haveit"; then
11113 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir"
11114 fi
11115 if test "$hardcode_minus_L" != no; then
11116 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11117 else
11118 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
11119 fi
11120 fi
11121 fi
11122 fi
11123 else
11124 if test "X$found_a" != "X"; then
11125 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_a"
11126 else
11127 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir -l$name"
11128 fi
11129 fi
11130 additional_includedir=
11131 case "$found_dir" in
11132 */lib | */lib/)
11133 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
11134 additional_includedir="$basedir/include"
11135 ;;
11136 esac
11137 if test "X$additional_includedir" != "X"; then
11138 if test "X$additional_includedir" != "X/usr/include"; then
11139 haveit=
11140 if test "X$additional_includedir" = "X/usr/local/include"; then
11141 if test -n "$GCC"; then
11142 case $host_os in
11143 linux*) haveit=yes;;
11144 esac
11145 fi
11146 fi
11147 if test -z "$haveit"; then
11148 for x in $CPPFLAGS $INCIPT; do
11149
11150 acl_save_prefix="$prefix"
11151 prefix="$acl_final_prefix"
11152 acl_save_exec_prefix="$exec_prefix"
11153 exec_prefix="$acl_final_exec_prefix"
11154 eval x=\"$x\"
11155 exec_prefix="$acl_save_exec_prefix"
11156 prefix="$acl_save_prefix"
11157
11158 if test "X$x" = "X-I$additional_includedir"; then
11159 haveit=yes
11160 break
11161 fi
11162 done
11163 if test -z "$haveit"; then
11164 if test -d "$additional_includedir"; then
11165 INCIPT="${INCIPT}${INCIPT:+ }-I$additional_includedir"
11166 fi
11167 fi
11168 fi
11169 fi
11170 fi
11171 if test -n "$found_la"; then
11172 save_libdir="$libdir"
11173 case "$found_la" in
11174 */* | *\\*) . "$found_la" ;;
11175 *) . "./$found_la" ;;
11176 esac
11177 libdir="$save_libdir"
11178 for dep in $dependency_libs; do
11179 case "$dep" in
11180 -L*)
11181 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
11182 if test "X$additional_libdir" != "X/usr/lib"; then
11183 haveit=
11184 if test "X$additional_libdir" = "X/usr/local/lib"; then
11185 if test -n "$GCC"; then
11186 case $host_os in
11187 linux*) haveit=yes;;
11188 esac
11189 fi
11190 fi
11191 if test -z "$haveit"; then
11192 haveit=
11193 for x in $LDFLAGS $LIBIPT; do
11194
11195 acl_save_prefix="$prefix"
11196 prefix="$acl_final_prefix"
11197 acl_save_exec_prefix="$exec_prefix"
11198 exec_prefix="$acl_final_exec_prefix"
11199 eval x=\"$x\"
11200 exec_prefix="$acl_save_exec_prefix"
11201 prefix="$acl_save_prefix"
11202
11203 if test "X$x" = "X-L$additional_libdir"; then
11204 haveit=yes
11205 break
11206 fi
11207 done
11208 if test -z "$haveit"; then
11209 if test -d "$additional_libdir"; then
11210 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$additional_libdir"
11211 fi
11212 fi
11213 haveit=
11214 for x in $LDFLAGS $LTLIBIPT; do
11215
11216 acl_save_prefix="$prefix"
11217 prefix="$acl_final_prefix"
11218 acl_save_exec_prefix="$exec_prefix"
11219 exec_prefix="$acl_final_exec_prefix"
11220 eval x=\"$x\"
11221 exec_prefix="$acl_save_exec_prefix"
11222 prefix="$acl_save_prefix"
11223
11224 if test "X$x" = "X-L$additional_libdir"; then
11225 haveit=yes
11226 break
11227 fi
11228 done
11229 if test -z "$haveit"; then
11230 if test -d "$additional_libdir"; then
11231 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$additional_libdir"
11232 fi
11233 fi
11234 fi
11235 fi
11236 ;;
11237 -R*)
11238 dir=`echo "X$dep" | sed -e 's/^X-R//'`
11239 if test "$enable_rpath" != no; then
11240 haveit=
11241 for x in $rpathdirs; do
11242 if test "X$x" = "X$dir"; then
11243 haveit=yes
11244 break
11245 fi
11246 done
11247 if test -z "$haveit"; then
11248 rpathdirs="$rpathdirs $dir"
11249 fi
11250 haveit=
11251 for x in $ltrpathdirs; do
11252 if test "X$x" = "X$dir"; then
11253 haveit=yes
11254 break
11255 fi
11256 done
11257 if test -z "$haveit"; then
11258 ltrpathdirs="$ltrpathdirs $dir"
11259 fi
11260 fi
11261 ;;
11262 -l*)
11263 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
11264 ;;
11265 *.la)
11266 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
11267 ;;
11268 *)
11269 LIBIPT="${LIBIPT}${LIBIPT:+ }$dep"
11270 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$dep"
11271 ;;
11272 esac
11273 done
11274 fi
11275 else
11276 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
11277 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l$name"
11278 fi
11279 fi
11280 fi
11281 done
11282 done
11283 if test "X$rpathdirs" != "X"; then
11284 if test -n "$hardcode_libdir_separator"; then
11285 alldirs=
11286 for found_dir in $rpathdirs; do
11287 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
11288 done
11289 acl_save_libdir="$libdir"
11290 libdir="$alldirs"
11291 eval flag=\"$hardcode_libdir_flag_spec\"
11292 libdir="$acl_save_libdir"
11293 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
11294 else
11295 for found_dir in $rpathdirs; do
11296 acl_save_libdir="$libdir"
11297 libdir="$found_dir"
11298 eval flag=\"$hardcode_libdir_flag_spec\"
11299 libdir="$acl_save_libdir"
11300 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
11301 done
11302 fi
11303 fi
11304 if test "X$ltrpathdirs" != "X"; then
11305 for found_dir in $ltrpathdirs; do
11306 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-R$found_dir"
11307 done
11308 fi
11309
11310
11311 ac_save_CPPFLAGS="$CPPFLAGS"
11312
11313 for element in $INCIPT; do
11314 haveit=
11315 for x in $CPPFLAGS; do
11316
11317 acl_save_prefix="$prefix"
11318 prefix="$acl_final_prefix"
11319 acl_save_exec_prefix="$exec_prefix"
11320 exec_prefix="$acl_final_exec_prefix"
11321 eval x=\"$x\"
11322 exec_prefix="$acl_save_exec_prefix"
11323 prefix="$acl_save_prefix"
11324
11325 if test "X$x" = "X$element"; then
11326 haveit=yes
11327 break
11328 fi
11329 done
11330 if test -z "$haveit"; then
11331 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
11332 fi
11333 done
11334
11335
11336 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libipt" >&5
11337$as_echo_n "checking for libipt... " >&6; }
11338if test "${ac_cv_libipt+set}" = set; then :
11339 $as_echo_n "(cached) " >&6
11340else
11341
11342 ac_save_LIBS="$LIBS"
11343 LIBS="$LIBS $LIBIPT"
11344 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11345/* end confdefs.h. */
11346#include "intel-pt.h"
11347int
11348main ()
11349{
11350pt_insn_alloc_decoder (0);
11351 ;
11352 return 0;
11353}
11354_ACEOF
11355if ac_fn_c_try_link "$LINENO"; then :
11356 ac_cv_libipt=yes
11357else
11358 ac_cv_libipt=no
11359fi
11360rm -f core conftest.err conftest.$ac_objext \
11361 conftest$ac_exeext conftest.$ac_ext
11362 LIBS="$ac_save_LIBS"
11363
11364fi
11365{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libipt" >&5
11366$as_echo "$ac_cv_libipt" >&6; }
11367 if test "$ac_cv_libipt" = yes; then
11368 HAVE_LIBIPT=yes
11369
11370$as_echo "#define HAVE_LIBIPT 1" >>confdefs.h
11371
11372 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libipt" >&5
11373$as_echo_n "checking how to link with libipt... " >&6; }
11374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBIPT" >&5
11375$as_echo "$LIBIPT" >&6; }
11376 else
11377 HAVE_LIBIPT=no
11378 CPPFLAGS="$ac_save_CPPFLAGS"
11379 LIBIPT=
11380 LTLIBIPT=
11381 fi
11382
11383
11384
11385
11386
11387
11388 if test "$HAVE_LIBIPT" != yes; then
11389 if test "$with_intel_pt" = yes; then
11390 as_fn_error "libipt is missing or unusable" "$LINENO" 5
11391 else
11392 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5
11393$as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be unavailable." >&2;}
11394 fi
c56ccc05
MM
11395 else
11396 save_LIBS=$LIBS
11397 LIBS="$LIBS $LIBIPT"
11398 for ac_func in pt_insn_event
11399do :
11400 ac_fn_c_check_func "$LINENO" "pt_insn_event" "ac_cv_func_pt_insn_event"
11401if test "x$ac_cv_func_pt_insn_event" = x""yes; then :
11402 cat >>confdefs.h <<_ACEOF
11403#define HAVE_PT_INSN_EVENT 1
11404_ACEOF
11405
11406fi
11407done
11408
11409 ac_fn_c_check_member "$LINENO" "struct pt_insn" "enabled" "ac_cv_member_struct_pt_insn_enabled" "#include <intel-pt.h>
11410"
11411if test "x$ac_cv_member_struct_pt_insn_enabled" = x""yes; then :
11412
11413cat >>confdefs.h <<_ACEOF
11414#define HAVE_STRUCT_PT_INSN_ENABLED 1
11415_ACEOF
11416
11417
11418fi
11419ac_fn_c_check_member "$LINENO" "struct pt_insn" "resynced" "ac_cv_member_struct_pt_insn_resynced" "#include <intel-pt.h>
11420"
11421if test "x$ac_cv_member_struct_pt_insn_resynced" = x""yes; then :
11422
11423cat >>confdefs.h <<_ACEOF
11424#define HAVE_STRUCT_PT_INSN_RESYNCED 1
11425_ACEOF
11426
11427
11428fi
11429
11430 LIBS=$save_LIBS
58bfce93
MM
11431 fi
11432fi
11433
81ecdfbb
RW
11434# ------------------------- #
11435# Checks for header files. #
11436# ------------------------- #
c890192f 11437
81ecdfbb
RW
11438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
11439$as_echo_n "checking for ANSI C header files... " >&6; }
11440if test "${ac_cv_header_stdc+set}" = set; then :
11441 $as_echo_n "(cached) " >&6
bec39cab 11442else
81ecdfbb 11443 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11444/* end confdefs.h. */
81ecdfbb
RW
11445#include <stdlib.h>
11446#include <stdarg.h>
11447#include <string.h>
11448#include <float.h>
11449
a9322a30
TT
11450int
11451main ()
11452{
a9322a30
TT
11453
11454 ;
11455 return 0;
11456}
bec39cab 11457_ACEOF
81ecdfbb
RW
11458if ac_fn_c_try_compile "$LINENO"; then :
11459 ac_cv_header_stdc=yes
bec39cab 11460else
81ecdfbb 11461 ac_cv_header_stdc=no
a9322a30 11462fi
81ecdfbb 11463rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 11464
81ecdfbb
RW
11465if test $ac_cv_header_stdc = yes; then
11466 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11468/* end confdefs.h. */
11469#include <string.h>
bec39cab 11470
81ecdfbb
RW
11471_ACEOF
11472if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11473 $EGREP "memchr" >/dev/null 2>&1; then :
bec39cab 11474
bec39cab 11475else
81ecdfbb
RW
11476 ac_cv_header_stdc=no
11477fi
11478rm -f conftest*
11479
11480fi
11481
11482if test $ac_cv_header_stdc = yes; then
11483 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11485/* end confdefs.h. */
11486#include <stdlib.h>
11487
bec39cab 11488_ACEOF
81ecdfbb
RW
11489if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11490 $EGREP "free" >/dev/null 2>&1; then :
06825bd1 11491
81ecdfbb
RW
11492else
11493 ac_cv_header_stdc=no
11494fi
11495rm -f conftest*
bec39cab 11496
bec39cab 11497fi
81ecdfbb
RW
11498
11499if test $ac_cv_header_stdc = yes; then
11500 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11501 if test "$cross_compiling" = yes; then :
11502 :
bec39cab 11503else
81ecdfbb 11504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11505/* end confdefs.h. */
81ecdfbb
RW
11506#include <ctype.h>
11507#include <stdlib.h>
11508#if ((' ' & 0x0FF) == 0x020)
11509# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11510# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11511#else
11512# define ISLOWER(c) \
11513 (('a' <= (c) && (c) <= 'i') \
11514 || ('j' <= (c) && (c) <= 'r') \
11515 || ('s' <= (c) && (c) <= 'z'))
11516# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11517#endif
11518
11519#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
a9322a30
TT
11520int
11521main ()
11522{
81ecdfbb
RW
11523 int i;
11524 for (i = 0; i < 256; i++)
11525 if (XOR (islower (i), ISLOWER (i))
11526 || toupper (i) != TOUPPER (i))
11527 return 2;
a9322a30
TT
11528 return 0;
11529}
bec39cab 11530_ACEOF
81ecdfbb
RW
11531if ac_fn_c_try_run "$LINENO"; then :
11532
bec39cab 11533else
81ecdfbb
RW
11534 ac_cv_header_stdc=no
11535fi
11536rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11537 conftest.$ac_objext conftest.beam conftest.$ac_ext
11538fi
bec39cab 11539
bec39cab 11540fi
a9322a30 11541fi
81ecdfbb
RW
11542{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
11543$as_echo "$ac_cv_header_stdc" >&6; }
11544if test $ac_cv_header_stdc = yes; then
bec39cab 11545
81ecdfbb 11546$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5ee754fc 11547
81ecdfbb 11548fi
bec39cab 11549
81ecdfbb 11550# elf_hp.h is for HP/UX 64-bit shared library support.
9467110b 11551for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
161d1bec 11552 thread_db.h \
0080a2f6 11553 sys/fault.h \
81ecdfbb
RW
11554 sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
11555 sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
11556 sys/reg.h sys/debugreg.h sys/select.h sys/syscall.h \
9467110b 11557 termios.h termio.h \
3447c057 11558 sgtty.h elf_hp.h \
9467110b 11559 dlfcn.h
81ecdfbb
RW
11560do :
11561 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11562ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
11563eval as_val=\$$as_ac_Header
11564 if test "x$as_val" = x""yes; then :
bec39cab 11565 cat >>confdefs.h <<_ACEOF
81ecdfbb 11566#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 11567_ACEOF
c906108c 11568
bec39cab 11569fi
81ecdfbb
RW
11570
11571done
11572
81ecdfbb
RW
11573for ac_header in sys/proc.h
11574do :
11575 ac_fn_c_check_header_compile "$LINENO" "sys/proc.h" "ac_cv_header_sys_proc_h" "#if HAVE_SYS_PARAM_H
11576# include <sys/param.h>
11577#endif
c906108c 11578
81ecdfbb
RW
11579"
11580if test "x$ac_cv_header_sys_proc_h" = x""yes; then :
bec39cab 11581 cat >>confdefs.h <<_ACEOF
81ecdfbb 11582#define HAVE_SYS_PROC_H 1
bec39cab 11583_ACEOF
5ee754fc 11584
bec39cab 11585fi
81ecdfbb
RW
11586
11587done
11588
11589for ac_header in sys/user.h
11590do :
11591 ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
11592# include <sys/param.h>
a9322a30
TT
11593#endif
11594
81ecdfbb
RW
11595"
11596if test "x$ac_cv_header_sys_user_h" = x""yes; then :
11597 cat >>confdefs.h <<_ACEOF
11598#define HAVE_SYS_USER_H 1
bec39cab 11599_ACEOF
bec39cab 11600
a9322a30 11601fi
bec39cab 11602
81ecdfbb 11603done
5ee754fc 11604
5ee754fc 11605
5007d765 11606for ac_header in curses.h cursesX.h ncurses.h ncursesw/ncurses.h ncurses/ncurses.h ncurses/term.h
81ecdfbb
RW
11607do :
11608 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11609ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
11610eval as_val=\$$as_ac_Header
11611 if test "x$as_val" = x""yes; then :
bec39cab 11612 cat >>confdefs.h <<_ACEOF
81ecdfbb 11613#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 11614_ACEOF
5ee754fc
MK
11615
11616fi
11617
81ecdfbb 11618done
bec39cab 11619
81ecdfbb
RW
11620for ac_header in term.h
11621do :
11622 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
11623# include <curses.h>
11624#endif
bec39cab 11625
81ecdfbb
RW
11626"
11627if test "x$ac_cv_header_term_h" = x""yes; then :
11628 cat >>confdefs.h <<_ACEOF
11629#define HAVE_TERM_H 1
a8111142 11630_ACEOF
a8111142 11631
a8111142 11632fi
a8111142 11633
81ecdfbb 11634done
a8111142
TT
11635
11636
81ecdfbb
RW
11637# ------------------------- #
11638# Checks for declarations. #
11639# ------------------------- #
a9322a30 11640
07697489
PA
11641
11642 # Check for presence and size of long long.
11643 ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
11644if test "x$ac_cv_type_long_long" = x""yes; then :
11645
11646cat >>confdefs.h <<_ACEOF
11647#define HAVE_LONG_LONG 1
11648_ACEOF
11649
11650# The cast to long int works around a bug in the HP C Compiler
11651# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11652# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11653# This bug is HP SR number 8606223364.
11654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
11655$as_echo_n "checking size of long long... " >&6; }
11656if test "${ac_cv_sizeof_long_long+set}" = set; then :
11657 $as_echo_n "(cached) " >&6
11658else
11659 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
11660
11661else
11662 if test "$ac_cv_type_long_long" = yes; then
11663 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11664$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11665{ as_fn_set_status 77
11666as_fn_error "cannot compute sizeof (long long)
11667See \`config.log' for more details." "$LINENO" 5; }; }
11668 else
11669 ac_cv_sizeof_long_long=0
11670 fi
11671fi
11672
11673fi
11674{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
11675$as_echo "$ac_cv_sizeof_long_long" >&6; }
11676
11677
11678
11679cat >>confdefs.h <<_ACEOF
11680#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
11681_ACEOF
11682
11683
11684fi
11685
11686
11687 ac_fn_c_check_decl "$LINENO" "basename(char *)" "ac_cv_have_decl_basename_char_p_" "$ac_includes_default"
11688if test "x$ac_cv_have_decl_basename_char_p_" = x""yes; then :
11689 ac_have_decl=1
11690else
11691 ac_have_decl=0
11692fi
11693
11694cat >>confdefs.h <<_ACEOF
11695#define HAVE_DECL_BASENAME $ac_have_decl
11696_ACEOF
11697ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default"
11698if test "x$ac_cv_have_decl_ffs" = x""yes; then :
11699 ac_have_decl=1
11700else
11701 ac_have_decl=0
11702fi
11703
11704cat >>confdefs.h <<_ACEOF
11705#define HAVE_DECL_FFS $ac_have_decl
11706_ACEOF
11707ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default"
11708if test "x$ac_cv_have_decl_asprintf" = x""yes; then :
11709 ac_have_decl=1
11710else
11711 ac_have_decl=0
11712fi
11713
11714cat >>confdefs.h <<_ACEOF
11715#define HAVE_DECL_ASPRINTF $ac_have_decl
11716_ACEOF
11717ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
11718if test "x$ac_cv_have_decl_vasprintf" = x""yes; then :
11719 ac_have_decl=1
11720else
11721 ac_have_decl=0
11722fi
11723
11724cat >>confdefs.h <<_ACEOF
11725#define HAVE_DECL_VASPRINTF $ac_have_decl
11726_ACEOF
11727ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
11728if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
11729 ac_have_decl=1
11730else
11731 ac_have_decl=0
11732fi
11733
11734cat >>confdefs.h <<_ACEOF
11735#define HAVE_DECL_SNPRINTF $ac_have_decl
11736_ACEOF
11737ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
11738if test "x$ac_cv_have_decl_vsnprintf" = x""yes; then :
11739 ac_have_decl=1
11740else
11741 ac_have_decl=0
11742fi
11743
11744cat >>confdefs.h <<_ACEOF
11745#define HAVE_DECL_VSNPRINTF $ac_have_decl
11746_ACEOF
11747
11748 ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default"
11749if test "x$ac_cv_have_decl_strtol" = x""yes; then :
11750 ac_have_decl=1
11751else
11752 ac_have_decl=0
11753fi
11754
11755cat >>confdefs.h <<_ACEOF
11756#define HAVE_DECL_STRTOL $ac_have_decl
11757_ACEOF
11758ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default"
11759if test "x$ac_cv_have_decl_strtoul" = x""yes; then :
11760 ac_have_decl=1
11761else
11762 ac_have_decl=0
11763fi
11764
11765cat >>confdefs.h <<_ACEOF
11766#define HAVE_DECL_STRTOUL $ac_have_decl
11767_ACEOF
11768ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
11769if test "x$ac_cv_have_decl_strtoll" = x""yes; then :
11770 ac_have_decl=1
11771else
11772 ac_have_decl=0
11773fi
11774
11775cat >>confdefs.h <<_ACEOF
11776#define HAVE_DECL_STRTOLL $ac_have_decl
11777_ACEOF
11778ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
11779if test "x$ac_cv_have_decl_strtoull" = x""yes; then :
11780 ac_have_decl=1
11781else
11782 ac_have_decl=0
11783fi
11784
11785cat >>confdefs.h <<_ACEOF
11786#define HAVE_DECL_STRTOULL $ac_have_decl
11787_ACEOF
11788
11789 ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default"
11790if test "x$ac_cv_have_decl_strverscmp" = x""yes; then :
11791 ac_have_decl=1
11792else
11793 ac_have_decl=0
11794fi
11795
11796cat >>confdefs.h <<_ACEOF
11797#define HAVE_DECL_STRVERSCMP $ac_have_decl
11798_ACEOF
11799
11800
11801
81ecdfbb
RW
11802ac_fn_c_check_decl "$LINENO" "free" "ac_cv_have_decl_free" "$ac_includes_default"
11803if test "x$ac_cv_have_decl_free" = x""yes; then :
11804 ac_have_decl=1
bec39cab 11805else
81ecdfbb
RW
11806 ac_have_decl=0
11807fi
11808
11809cat >>confdefs.h <<_ACEOF
11810#define HAVE_DECL_FREE $ac_have_decl
bec39cab 11811_ACEOF
81ecdfbb
RW
11812ac_fn_c_check_decl "$LINENO" "malloc" "ac_cv_have_decl_malloc" "$ac_includes_default"
11813if test "x$ac_cv_have_decl_malloc" = x""yes; then :
11814 ac_have_decl=1
11815else
11816 ac_have_decl=0
11817fi
11818
11819cat >>confdefs.h <<_ACEOF
11820#define HAVE_DECL_MALLOC $ac_have_decl
bec39cab 11821_ACEOF
81ecdfbb
RW
11822ac_fn_c_check_decl "$LINENO" "realloc" "ac_cv_have_decl_realloc" "$ac_includes_default"
11823if test "x$ac_cv_have_decl_realloc" = x""yes; then :
11824 ac_have_decl=1
bec39cab 11825else
81ecdfbb
RW
11826 ac_have_decl=0
11827fi
bec39cab 11828
81ecdfbb
RW
11829cat >>confdefs.h <<_ACEOF
11830#define HAVE_DECL_REALLOC $ac_have_decl
bec39cab 11831_ACEOF
81ecdfbb
RW
11832ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
11833if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
11834 ac_have_decl=1
11835else
11836 ac_have_decl=0
5ee754fc 11837fi
81ecdfbb
RW
11838
11839cat >>confdefs.h <<_ACEOF
11840#define HAVE_DECL_SNPRINTF $ac_have_decl
a9322a30 11841_ACEOF
5ee754fc 11842
5ee754fc 11843
81ecdfbb
RW
11844 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
11845$as_echo_n "checking for LC_MESSAGES... " >&6; }
11846if test "${am_cv_val_LC_MESSAGES+set}" = set; then :
11847 $as_echo_n "(cached) " >&6
bec39cab 11848else
81ecdfbb 11849 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11850/* end confdefs.h. */
81ecdfbb 11851#include <locale.h>
a9322a30
TT
11852int
11853main ()
11854{
81ecdfbb 11855return LC_MESSAGES
a9322a30
TT
11856 ;
11857 return 0;
11858}
bec39cab 11859_ACEOF
81ecdfbb
RW
11860if ac_fn_c_try_link "$LINENO"; then :
11861 am_cv_val_LC_MESSAGES=yes
bec39cab 11862else
81ecdfbb
RW
11863 am_cv_val_LC_MESSAGES=no
11864fi
11865rm -f core conftest.err conftest.$ac_objext \
11866 conftest$ac_exeext conftest.$ac_ext
11867fi
11868{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
11869$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
11870 if test $am_cv_val_LC_MESSAGES = yes; then
bec39cab 11871
81ecdfbb
RW
11872$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
11873
11874 fi
11875
11876
11877# ----------------------- #
11878# Checks for structures. #
11879# ----------------------- #
11880
11881ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
11882if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
11883
11884cat >>confdefs.h <<_ACEOF
11885#define HAVE_STRUCT_STAT_ST_BLOCKS 1
7eb368b3 11886_ACEOF
7eb368b3 11887
81ecdfbb 11888
7eb368b3 11889fi
81ecdfbb
RW
11890ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
11891if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
7eb368b3 11892
a9322a30
TT
11893cat >>confdefs.h <<_ACEOF
11894#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
7eb368b3
NR
11895_ACEOF
11896
a9322a30 11897
7eb368b3
NR
11898fi
11899
7eb368b3 11900
a9322a30
TT
11901# ------------------ #
11902# Checks for types. #
11903# ------------------ #
7eb368b3 11904
81ecdfbb 11905ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
a9322a30
TT
11906#include <sys/socket.h>
11907
81ecdfbb
RW
11908"
11909if test "x$ac_cv_type_socklen_t" = x""yes; then :
bec39cab 11910
a9322a30
TT
11911cat >>confdefs.h <<_ACEOF
11912#define HAVE_SOCKLEN_T 1
11913_ACEOF
11914
11915
11916fi
11917
11918
11919# ------------------------------------- #
11920# Checks for compiler characteristics. #
11921# ------------------------------------- #
11922
81ecdfbb
RW
11923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11924$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
11925if test "${ac_cv_c_const+set}" = set; then :
11926 $as_echo_n "(cached) " >&6
a9322a30 11927else
81ecdfbb 11928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11929/* end confdefs.h. */
a9322a30
TT
11930
11931int
11932main ()
11933{
11934/* FIXME: Include the comments suggested by Paul. */
11935#ifndef __cplusplus
11936 /* Ultrix mips cc rejects this. */
11937 typedef int charset[2];
81ecdfbb 11938 const charset cs;
a9322a30 11939 /* SunOS 4.1.1 cc rejects this. */
81ecdfbb
RW
11940 char const *const *pcpcc;
11941 char **ppc;
a9322a30
TT
11942 /* NEC SVR4.0.2 mips cc rejects this. */
11943 struct point {int x, y;};
11944 static struct point const zero = {0,0};
11945 /* AIX XL C 1.02.0.0 rejects this.
11946 It does not let you subtract one const X* pointer from another in
11947 an arm of an if-expression whose if-part is not a constant
11948 expression */
11949 const char *g = "string";
81ecdfbb 11950 pcpcc = &g + (g ? g-g : 0);
a9322a30 11951 /* HPUX 7.0 cc rejects these. */
81ecdfbb
RW
11952 ++pcpcc;
11953 ppc = (char**) pcpcc;
11954 pcpcc = (char const *const *) ppc;
a9322a30
TT
11955 { /* SCO 3.2v4 cc rejects this. */
11956 char *t;
11957 char const *s = 0 ? (char *) 0 : (char const *) 0;
11958
11959 *t++ = 0;
81ecdfbb 11960 if (s) return 0;
a9322a30
TT
11961 }
11962 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11963 int x[] = {25, 17};
11964 const int *foo = &x[0];
11965 ++foo;
11966 }
11967 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11968 typedef const int *iptr;
11969 iptr p = 0;
11970 ++p;
11971 }
11972 { /* AIX XL C 1.02.0.0 rejects this saying
11973 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11974 struct s { int j; const int *ap[3]; };
11975 struct s *b; b->j = 5;
11976 }
11977 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11978 const int foo = 10;
81ecdfbb 11979 if (!foo) return 0;
a9322a30 11980 }
81ecdfbb 11981 return !cs[0] && !zero.x;
a9322a30
TT
11982#endif
11983
11984 ;
11985 return 0;
11986}
bec39cab 11987_ACEOF
81ecdfbb 11988if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 11989 ac_cv_c_const=yes
5ee754fc 11990else
81ecdfbb 11991 ac_cv_c_const=no
5ee754fc 11992fi
81ecdfbb 11993rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 11994fi
81ecdfbb
RW
11995{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11996$as_echo "$ac_cv_c_const" >&6; }
a9322a30 11997if test $ac_cv_c_const = no; then
bec39cab 11998
81ecdfbb 11999$as_echo "#define const /**/" >>confdefs.h
bec39cab 12000
5ee754fc 12001fi
bec39cab 12002
81ecdfbb
RW
12003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
12004$as_echo_n "checking for inline... " >&6; }
12005if test "${ac_cv_c_inline+set}" = set; then :
12006 $as_echo_n "(cached) " >&6
bec39cab 12007else
a9322a30
TT
12008 ac_cv_c_inline=no
12009for ac_kw in inline __inline__ __inline; do
81ecdfbb 12010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12011/* end confdefs.h. */
a9322a30
TT
12012#ifndef __cplusplus
12013typedef int foo_t;
12014static $ac_kw foo_t static_foo () {return 0; }
12015$ac_kw foo_t foo () {return 0; }
12016#endif
12017
bec39cab 12018_ACEOF
81ecdfbb
RW
12019if ac_fn_c_try_compile "$LINENO"; then :
12020 ac_cv_c_inline=$ac_kw
bec39cab 12021fi
81ecdfbb
RW
12022rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12023 test "$ac_cv_c_inline" != no && break
a9322a30 12024done
bec39cab 12025
5ee754fc 12026fi
81ecdfbb
RW
12027{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
12028$as_echo "$ac_cv_c_inline" >&6; }
5ee754fc 12029
a9322a30
TT
12030case $ac_cv_c_inline in
12031 inline | yes) ;;
12032 *)
12033 case $ac_cv_c_inline in
12034 no) ac_val=;;
12035 *) ac_val=$ac_cv_c_inline;;
12036 esac
12037 cat >>confdefs.h <<_ACEOF
12038#ifndef __cplusplus
12039#define inline $ac_val
12040#endif
12041_ACEOF
bec39cab
AC
12042 ;;
12043esac
bec39cab 12044
81ecdfbb
RW
12045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12046$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
12047if test "${ac_cv_c_bigendian+set}" = set; then :
12048 $as_echo_n "(cached) " >&6
bec39cab 12049else
81ecdfbb
RW
12050 ac_cv_c_bigendian=unknown
12051 # See if we're dealing with a universal compiler.
12052 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12053/* end confdefs.h. */
12054#ifndef __APPLE_CC__
12055 not a universal capable compiler
12056 #endif
12057 typedef int dummy;
12058
12059_ACEOF
12060if ac_fn_c_try_compile "$LINENO"; then :
12061
12062 # Check for potential -arch flags. It is not universal unless
12063 # there are at least two -arch flags with different values.
12064 ac_arch=
12065 ac_prev=
12066 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12067 if test -n "$ac_prev"; then
12068 case $ac_word in
12069 i?86 | x86_64 | ppc | ppc64)
12070 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12071 ac_arch=$ac_word
12072 else
12073 ac_cv_c_bigendian=universal
12074 break
12075 fi
12076 ;;
12077 esac
12078 ac_prev=
12079 elif test "x$ac_word" = "x-arch"; then
12080 ac_prev=arch
12081 fi
12082 done
12083fi
12084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12085 if test $ac_cv_c_bigendian = unknown; then
12086 # See if sys/param.h defines the BYTE_ORDER macro.
12087 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12088/* end confdefs.h. */
a9322a30 12089#include <sys/types.h>
81ecdfbb 12090 #include <sys/param.h>
a9322a30
TT
12091
12092int
12093main ()
12094{
81ecdfbb
RW
12095#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12096 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12097 && LITTLE_ENDIAN)
12098 bogus endian macros
12099 #endif
a9322a30
TT
12100
12101 ;
12102 return 0;
12103}
bec39cab 12104_ACEOF
81ecdfbb 12105if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12106 # It does; now see whether it defined to BIG_ENDIAN or not.
81ecdfbb 12107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12108/* end confdefs.h. */
a9322a30 12109#include <sys/types.h>
81ecdfbb 12110 #include <sys/param.h>
a9322a30
TT
12111
12112int
12113main ()
12114{
12115#if BYTE_ORDER != BIG_ENDIAN
81ecdfbb
RW
12116 not big endian
12117 #endif
a9322a30
TT
12118
12119 ;
12120 return 0;
12121}
bec39cab 12122_ACEOF
81ecdfbb 12123if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12124 ac_cv_c_bigendian=yes
5ee754fc 12125else
81ecdfbb 12126 ac_cv_c_bigendian=no
5ee754fc 12127fi
81ecdfbb
RW
12128rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12129fi
12130rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12131 fi
12132 if test $ac_cv_c_bigendian = unknown; then
12133 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12134 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12135/* end confdefs.h. */
12136#include <limits.h>
bec39cab 12137
81ecdfbb
RW
12138int
12139main ()
12140{
12141#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12142 bogus endian macros
12143 #endif
12144
12145 ;
12146 return 0;
12147}
7eb368b3 12148_ACEOF
81ecdfbb
RW
12149if ac_fn_c_try_compile "$LINENO"; then :
12150 # It does; now see whether it defined to _BIG_ENDIAN or not.
12151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7eb368b3 12152/* end confdefs.h. */
81ecdfbb
RW
12153#include <limits.h>
12154
7eb368b3
NR
12155int
12156main ()
12157{
81ecdfbb
RW
12158#ifndef _BIG_ENDIAN
12159 not big endian
12160 #endif
12161
7eb368b3
NR
12162 ;
12163 return 0;
12164}
12165_ACEOF
81ecdfbb 12166if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12167 ac_cv_c_bigendian=yes
81ecdfbb
RW
12168else
12169 ac_cv_c_bigendian=no
a9322a30 12170fi
81ecdfbb 12171rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30 12172fi
81ecdfbb
RW
12173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12174 fi
12175 if test $ac_cv_c_bigendian = unknown; then
12176 # Compile a test program.
12177 if test "$cross_compiling" = yes; then :
12178 # Try to guess by grepping values from an object file.
12179 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12180/* end confdefs.h. */
12181short int ascii_mm[] =
12182 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12183 short int ascii_ii[] =
12184 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12185 int use_ascii (int i) {
12186 return ascii_mm[i] + ascii_ii[i];
12187 }
12188 short int ebcdic_ii[] =
12189 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12190 short int ebcdic_mm[] =
12191 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12192 int use_ebcdic (int i) {
12193 return ebcdic_mm[i] + ebcdic_ii[i];
12194 }
12195 extern int foo;
7eb368b3 12196
81ecdfbb
RW
12197int
12198main ()
12199{
12200return use_ascii (foo) == use_ebcdic (foo);
12201 ;
12202 return 0;
12203}
12204_ACEOF
12205if ac_fn_c_try_compile "$LINENO"; then :
12206 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12207 ac_cv_c_bigendian=yes
12208 fi
12209 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12210 if test "$ac_cv_c_bigendian" = unknown; then
12211 ac_cv_c_bigendian=no
12212 else
12213 # finding both strings is unlikely to happen, but who knows?
12214 ac_cv_c_bigendian=unknown
12215 fi
12216 fi
7eb368b3 12217fi
81ecdfbb 12218rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 12219else
81ecdfbb 12220 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12221/* end confdefs.h. */
81ecdfbb 12222$ac_includes_default
d3ea6809
MM
12223int
12224main ()
12225{
81ecdfbb
RW
12226
12227 /* Are we little or big endian? From Harbison&Steele. */
12228 union
12229 {
12230 long int l;
12231 char c[sizeof (long int)];
12232 } u;
12233 u.l = 1;
12234 return u.c[sizeof (long int) - 1] == 1;
12235
12236 ;
12237 return 0;
d3ea6809
MM
12238}
12239_ACEOF
81ecdfbb 12240if ac_fn_c_try_run "$LINENO"; then :
a9322a30 12241 ac_cv_c_bigendian=no
d3ea6809 12242else
81ecdfbb 12243 ac_cv_c_bigendian=yes
d3ea6809 12244fi
81ecdfbb
RW
12245rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12246 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 12247fi
a9322a30 12248
81ecdfbb
RW
12249 fi
12250fi
12251{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12252$as_echo "$ac_cv_c_bigendian" >&6; }
12253 case $ac_cv_c_bigendian in #(
12254 yes)
12255 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12256;; #(
12257 no)
12258 ;; #(
12259 universal)
12260
12261$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
12262
12263 ;; #(
12264 *)
12265 as_fn_error "unknown endianness
12266 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
12267 esac
d3ea6809
MM
12268
12269
a9322a30
TT
12270# ------------------------------ #
12271# Checks for library functions. #
12272# ------------------------------ #
d3ea6809 12273
a9322a30 12274for ac_header in stdlib.h unistd.h
81ecdfbb
RW
12275do :
12276 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12277ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12278eval as_val=\$$as_ac_Header
12279 if test "x$as_val" = x""yes; then :
bec39cab 12280 cat >>confdefs.h <<_ACEOF
81ecdfbb 12281#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 12282_ACEOF
b757528f 12283
b757528f 12284fi
bec39cab 12285
a9322a30 12286done
a3828db0 12287
a9322a30 12288for ac_func in getpagesize
81ecdfbb
RW
12289do :
12290 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
12291if test "x$ac_cv_func_getpagesize" = x""yes; then :
bec39cab 12292 cat >>confdefs.h <<_ACEOF
81ecdfbb 12293#define HAVE_GETPAGESIZE 1
bec39cab 12294_ACEOF
bcb3dc3d 12295
bcb3dc3d
MK
12296fi
12297done
12298
81ecdfbb
RW
12299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
12300$as_echo_n "checking for working mmap... " >&6; }
12301if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then :
12302 $as_echo_n "(cached) " >&6
a9322a30 12303else
81ecdfbb 12304 if test "$cross_compiling" = yes; then :
a9322a30 12305 ac_cv_func_mmap_fixed_mapped=no
bec39cab 12306else
81ecdfbb 12307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12308/* end confdefs.h. */
a9322a30
TT
12309$ac_includes_default
12310/* malloc might have been renamed as rpl_malloc. */
12311#undef malloc
bec39cab 12312
a9322a30
TT
12313/* Thanks to Mike Haertel and Jim Avera for this test.
12314 Here is a matrix of mmap possibilities:
12315 mmap private not fixed
12316 mmap private fixed at somewhere currently unmapped
12317 mmap private fixed at somewhere already mapped
12318 mmap shared not fixed
12319 mmap shared fixed at somewhere currently unmapped
12320 mmap shared fixed at somewhere already mapped
12321 For private mappings, we should verify that changes cannot be read()
12322 back from the file, nor mmap's back from the file at a different
12323 address. (There have been systems where private was not correctly
12324 implemented like the infamous i386 svr4.0, and systems where the
12325 VM page cache was not coherent with the file system buffer cache
12326 like early versions of FreeBSD and possibly contemporary NetBSD.)
12327 For shared mappings, we should conversely verify that changes get
12328 propagated back to all the places they're supposed to be.
bec39cab 12329
a9322a30
TT
12330 Grep wants private fixed already mapped.
12331 The main things grep needs to know about mmap are:
12332 * does it exist and is it safe to write into the mmap'd area
12333 * how to use it (BSD variants) */
8b9cf735 12334
a9322a30
TT
12335#include <fcntl.h>
12336#include <sys/mman.h>
8b9cf735 12337
81ecdfbb 12338#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
a9322a30 12339char *malloc ();
a3828db0
MK
12340#endif
12341
a9322a30 12342/* This mess was copied from the GNU getpagesize.h. */
81ecdfbb 12343#ifndef HAVE_GETPAGESIZE
a9322a30 12344/* Assume that all systems that can run configure have sys/param.h. */
81ecdfbb 12345# ifndef HAVE_SYS_PARAM_H
a9322a30
TT
12346# define HAVE_SYS_PARAM_H 1
12347# endif
12348
12349# ifdef _SC_PAGESIZE
12350# define getpagesize() sysconf(_SC_PAGESIZE)
12351# else /* no _SC_PAGESIZE */
81ecdfbb 12352# ifdef HAVE_SYS_PARAM_H
a9322a30
TT
12353# include <sys/param.h>
12354# ifdef EXEC_PAGESIZE
12355# define getpagesize() EXEC_PAGESIZE
12356# else /* no EXEC_PAGESIZE */
12357# ifdef NBPG
12358# define getpagesize() NBPG * CLSIZE
12359# ifndef CLSIZE
12360# define CLSIZE 1
12361# endif /* no CLSIZE */
12362# else /* no NBPG */
12363# ifdef NBPC
12364# define getpagesize() NBPC
12365# else /* no NBPC */
12366# ifdef PAGESIZE
12367# define getpagesize() PAGESIZE
12368# endif /* PAGESIZE */
12369# endif /* no NBPC */
12370# endif /* no NBPG */
12371# endif /* no EXEC_PAGESIZE */
12372# else /* no HAVE_SYS_PARAM_H */
12373# define getpagesize() 8192 /* punt totally */
12374# endif /* no HAVE_SYS_PARAM_H */
12375# endif /* no _SC_PAGESIZE */
12376
12377#endif /* no HAVE_GETPAGESIZE */
12378
bec39cab
AC
12379int
12380main ()
12381{
a9322a30
TT
12382 char *data, *data2, *data3;
12383 int i, pagesize;
12384 int fd;
12385
12386 pagesize = getpagesize ();
12387
12388 /* First, make a file with some known garbage in it. */
12389 data = (char *) malloc (pagesize);
12390 if (!data)
81ecdfbb 12391 return 1;
a9322a30
TT
12392 for (i = 0; i < pagesize; ++i)
12393 *(data + i) = rand ();
12394 umask (0);
12395 fd = creat ("conftest.mmap", 0600);
12396 if (fd < 0)
81ecdfbb 12397 return 1;
a9322a30 12398 if (write (fd, data, pagesize) != pagesize)
81ecdfbb 12399 return 1;
a9322a30
TT
12400 close (fd);
12401
12402 /* Next, try to mmap the file at a fixed address which already has
12403 something else allocated at it. If we can, also make sure that
12404 we see the same garbage. */
12405 fd = open ("conftest.mmap", O_RDWR);
12406 if (fd < 0)
81ecdfbb 12407 return 1;
a9322a30
TT
12408 data2 = (char *) malloc (2 * pagesize);
12409 if (!data2)
81ecdfbb
RW
12410 return 1;
12411 data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
a9322a30
TT
12412 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
12413 MAP_PRIVATE | MAP_FIXED, fd, 0L))
81ecdfbb 12414 return 1;
a9322a30
TT
12415 for (i = 0; i < pagesize; ++i)
12416 if (*(data + i) != *(data2 + i))
81ecdfbb 12417 return 1;
a9322a30
TT
12418
12419 /* Finally, make sure that changes to the mapped area do not
12420 percolate back to the file as seen by read(). (This is a bug on
12421 some variants of i386 svr4.0.) */
12422 for (i = 0; i < pagesize; ++i)
12423 *(data2 + i) = *(data2 + i) + 1;
12424 data3 = (char *) malloc (pagesize);
12425 if (!data3)
81ecdfbb 12426 return 1;
a9322a30 12427 if (read (fd, data3, pagesize) != pagesize)
81ecdfbb 12428 return 1;
a9322a30
TT
12429 for (i = 0; i < pagesize; ++i)
12430 if (*(data + i) != *(data3 + i))
81ecdfbb 12431 return 1;
a9322a30 12432 close (fd);
81ecdfbb 12433 return 0;
bec39cab
AC
12434}
12435_ACEOF
81ecdfbb 12436if ac_fn_c_try_run "$LINENO"; then :
a9322a30 12437 ac_cv_func_mmap_fixed_mapped=yes
086ec9eb 12438else
81ecdfbb 12439 ac_cv_func_mmap_fixed_mapped=no
a3828db0 12440fi
81ecdfbb
RW
12441rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12442 conftest.$ac_objext conftest.beam conftest.$ac_ext
a3828db0 12443fi
81ecdfbb 12444
a9322a30 12445fi
81ecdfbb
RW
12446{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
12447$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
a9322a30
TT
12448if test $ac_cv_func_mmap_fixed_mapped = yes; then
12449
81ecdfbb 12450$as_echo "#define HAVE_MMAP 1" >>confdefs.h
a3828db0 12451
086ec9eb 12452fi
a9322a30 12453rm -f conftest.mmap
a3828db0 12454
81ecdfbb
RW
12455ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
12456if test "x$ac_cv_type_pid_t" = x""yes; then :
bec39cab 12457
a9322a30
TT
12458else
12459
12460cat >>confdefs.h <<_ACEOF
12461#define pid_t int
bec39cab 12462_ACEOF
086ec9eb
MK
12463
12464fi
12465
81ecdfbb
RW
12466for ac_header in vfork.h
12467do :
12468 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
12469if test "x$ac_cv_header_vfork_h" = x""yes; then :
a3828db0 12470 cat >>confdefs.h <<_ACEOF
81ecdfbb 12471#define HAVE_VFORK_H 1
bec39cab 12472_ACEOF
c906108c
SS
12473
12474fi
a9322a30 12475
a3828db0 12476done
c906108c 12477
a9322a30 12478for ac_func in fork vfork
81ecdfbb
RW
12479do :
12480 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12481ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12482eval as_val=\$$as_ac_var
12483 if test "x$as_val" = x""yes; then :
a3828db0 12484 cat >>confdefs.h <<_ACEOF
81ecdfbb 12485#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 12486_ACEOF
b83266a0 12487
97bf5e38 12488fi
a3828db0 12489done
b83266a0 12490
a9322a30 12491if test "x$ac_cv_func_fork" = xyes; then
81ecdfbb
RW
12492 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
12493$as_echo_n "checking for working fork... " >&6; }
12494if test "${ac_cv_func_fork_works+set}" = set; then :
12495 $as_echo_n "(cached) " >&6
a9322a30 12496else
81ecdfbb 12497 if test "$cross_compiling" = yes; then :
a9322a30
TT
12498 ac_cv_func_fork_works=cross
12499else
81ecdfbb
RW
12500 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12501/* end confdefs.h. */
12502$ac_includes_default
12503int
12504main ()
12505{
12506
12507 /* By Ruediger Kuhlmann. */
12508 return fork () < 0;
12509
12510 ;
12511 return 0;
12512}
a9322a30 12513_ACEOF
81ecdfbb 12514if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
12515 ac_cv_func_fork_works=yes
12516else
81ecdfbb 12517 ac_cv_func_fork_works=no
a9322a30 12518fi
81ecdfbb
RW
12519rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12520 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 12521fi
81ecdfbb 12522
a9322a30 12523fi
81ecdfbb
RW
12524{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
12525$as_echo "$ac_cv_func_fork_works" >&6; }
a9322a30
TT
12526
12527else
12528 ac_cv_func_fork_works=$ac_cv_func_fork
12529fi
12530if test "x$ac_cv_func_fork_works" = xcross; then
12531 case $host in
12532 *-*-amigaos* | *-*-msdosdjgpp*)
12533 # Override, as these systems have only a dummy fork() stub
12534 ac_cv_func_fork_works=no
12535 ;;
12536 *)
12537 ac_cv_func_fork_works=yes
12538 ;;
12539 esac
81ecdfbb
RW
12540 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
12541$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
a9322a30
TT
12542fi
12543ac_cv_func_vfork_works=$ac_cv_func_vfork
12544if test "x$ac_cv_func_vfork" = xyes; then
81ecdfbb
RW
12545 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
12546$as_echo_n "checking for working vfork... " >&6; }
12547if test "${ac_cv_func_vfork_works+set}" = set; then :
12548 $as_echo_n "(cached) " >&6
a9322a30 12549else
81ecdfbb 12550 if test "$cross_compiling" = yes; then :
a9322a30
TT
12551 ac_cv_func_vfork_works=cross
12552else
81ecdfbb 12553 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30
TT
12554/* end confdefs.h. */
12555/* Thanks to Paul Eggert for this test. */
81ecdfbb 12556$ac_includes_default
a9322a30 12557#include <sys/wait.h>
81ecdfbb 12558#ifdef HAVE_VFORK_H
a9322a30
TT
12559# include <vfork.h>
12560#endif
12561/* On some sparc systems, changes by the child to local and incoming
12562 argument registers are propagated back to the parent. The compiler
12563 is told about this with #include <vfork.h>, but some compilers
12564 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
12565 static variable whose address is put into a register that is
12566 clobbered by the vfork. */
12567static void
12568#ifdef __cplusplus
12569sparc_address_test (int arg)
12570# else
12571sparc_address_test (arg) int arg;
12572#endif
12573{
12574 static pid_t child;
12575 if (!child) {
12576 child = vfork ();
12577 if (child < 0) {
12578 perror ("vfork");
12579 _exit(2);
12580 }
12581 if (!child) {
12582 arg = getpid();
12583 write(-1, "", 0);
12584 _exit (arg);
12585 }
12586 }
12587}
12588
12589int
12590main ()
12591{
12592 pid_t parent = getpid ();
12593 pid_t child;
12594
12595 sparc_address_test (0);
12596
12597 child = vfork ();
12598
12599 if (child == 0) {
12600 /* Here is another test for sparc vfork register problems. This
12601 test uses lots of local variables, at least as many local
12602 variables as main has allocated so far including compiler
12603 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
12604 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
12605 reuse the register of parent for one of the local variables,
12606 since it will think that parent can't possibly be used any more
12607 in this routine. Assigning to the local variable will thus
12608 munge parent in the parent process. */
12609 pid_t
12610 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
12611 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
12612 /* Convince the compiler that p..p7 are live; otherwise, it might
12613 use the same hardware register for all 8 local variables. */
12614 if (p != p1 || p != p2 || p != p3 || p != p4
12615 || p != p5 || p != p6 || p != p7)
12616 _exit(1);
12617
12618 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
12619 from child file descriptors. If the child closes a descriptor
12620 before it execs or exits, this munges the parent's descriptor
12621 as well. Test for this by closing stdout in the child. */
12622 _exit(close(fileno(stdout)) != 0);
12623 } else {
12624 int status;
12625 struct stat st;
12626
12627 while (wait(&status) != child)
12628 ;
81ecdfbb 12629 return (
a9322a30
TT
12630 /* Was there some problem with vforking? */
12631 child < 0
12632
12633 /* Did the child fail? (This shouldn't happen.) */
12634 || status
12635
12636 /* Did the vfork/compiler bug occur? */
12637 || parent != getpid()
12638
12639 /* Did the file descriptor bug occur? */
12640 || fstat(fileno(stdout), &st) != 0
12641 );
12642 }
12643}
12644_ACEOF
81ecdfbb 12645if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
12646 ac_cv_func_vfork_works=yes
12647else
81ecdfbb 12648 ac_cv_func_vfork_works=no
a9322a30 12649fi
81ecdfbb
RW
12650rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12651 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 12652fi
81ecdfbb 12653
a9322a30 12654fi
81ecdfbb
RW
12655{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
12656$as_echo "$ac_cv_func_vfork_works" >&6; }
a9322a30
TT
12657
12658fi;
12659if test "x$ac_cv_func_fork_works" = xcross; then
12660 ac_cv_func_vfork_works=$ac_cv_func_vfork
81ecdfbb
RW
12661 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
12662$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
a9322a30
TT
12663fi
12664
12665if test "x$ac_cv_func_vfork_works" = xyes; then
12666
81ecdfbb 12667$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
a9322a30
TT
12668
12669else
12670
81ecdfbb 12671$as_echo "#define vfork fork" >>confdefs.h
a9322a30
TT
12672
12673fi
12674if test "x$ac_cv_func_fork_works" = xyes; then
12675
81ecdfbb 12676$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
a9322a30
TT
12677
12678fi
12679
cdf43629 12680for ac_func in getauxval getrusage getuid getgid \
bdca27a2 12681 pipe poll pread pread64 pwrite resize_term \
7313baad 12682 sbrk setpgid setpgrp setsid \
9467110b 12683 sigaction sigprocmask sigsetmask socketpair \
110ed339 12684 ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
3332aaf2 12685 setrlimit getrlimit posix_madvise waitpid \
4b8b5e72 12686 ptrace64 sigaltstack mkdtemp setns
81ecdfbb
RW
12687do :
12688 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12689ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12690eval as_val=\$$as_ac_var
12691 if test "x$as_val" = x""yes; then :
6c7a06a3 12692 cat >>confdefs.h <<_ACEOF
81ecdfbb 12693#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6c7a06a3
TT
12694_ACEOF
12695
12696fi
12697done
12698
12699
81ecdfbb
RW
12700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
12701$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
12702if test "${am_cv_langinfo_codeset+set}" = set; then :
12703 $as_echo_n "(cached) " >&6
6c7a06a3 12704else
81ecdfbb 12705 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
12706/* end confdefs.h. */
12707#include <langinfo.h>
12708int
12709main ()
12710{
12711char* cs = nl_langinfo(CODESET);
bec39cab
AC
12712 ;
12713 return 0;
12714}
12715_ACEOF
81ecdfbb 12716if ac_fn_c_try_link "$LINENO"; then :
6c7a06a3 12717 am_cv_langinfo_codeset=yes
a4db0f07 12718else
81ecdfbb 12719 am_cv_langinfo_codeset=no
a4db0f07 12720fi
81ecdfbb
RW
12721rm -f core conftest.err conftest.$ac_objext \
12722 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 12723
a4db0f07 12724fi
81ecdfbb
RW
12725{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
12726$as_echo "$am_cv_langinfo_codeset" >&6; }
6c7a06a3
TT
12727 if test $am_cv_langinfo_codeset = yes; then
12728
81ecdfbb 12729$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
a4db0f07 12730
6c7a06a3 12731 fi
c906108c 12732
06825bd1 12733
3266f10b
TT
12734 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
12735$as_echo_n "checking for ANSI C header files... " >&6; }
12736if test "${ac_cv_header_stdc+set}" = set; then :
12737 $as_echo_n "(cached) " >&6
12738else
12739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12740/* end confdefs.h. */
12741#include <stdlib.h>
12742#include <stdarg.h>
12743#include <string.h>
12744#include <float.h>
12745
12746int
12747main ()
12748{
12749
12750 ;
12751 return 0;
12752}
12753_ACEOF
12754if ac_fn_c_try_compile "$LINENO"; then :
12755 ac_cv_header_stdc=yes
12756else
12757 ac_cv_header_stdc=no
12758fi
12759rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12760
12761if test $ac_cv_header_stdc = yes; then
12762 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12763 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12764/* end confdefs.h. */
12765#include <string.h>
12766
12767_ACEOF
12768if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12769 $EGREP "memchr" >/dev/null 2>&1; then :
12770
12771else
12772 ac_cv_header_stdc=no
12773fi
12774rm -f conftest*
12775
12776fi
12777
12778if test $ac_cv_header_stdc = yes; then
12779 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12781/* end confdefs.h. */
12782#include <stdlib.h>
12783
12784_ACEOF
12785if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12786 $EGREP "free" >/dev/null 2>&1; then :
12787
12788else
12789 ac_cv_header_stdc=no
12790fi
12791rm -f conftest*
12792
12793fi
12794
12795if test $ac_cv_header_stdc = yes; then
12796 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12797 if test "$cross_compiling" = yes; then :
12798 :
12799else
12800 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12801/* end confdefs.h. */
12802#include <ctype.h>
12803#include <stdlib.h>
12804#if ((' ' & 0x0FF) == 0x020)
12805# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12806# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12807#else
12808# define ISLOWER(c) \
12809 (('a' <= (c) && (c) <= 'i') \
12810 || ('j' <= (c) && (c) <= 'r') \
12811 || ('s' <= (c) && (c) <= 'z'))
12812# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12813#endif
12814
12815#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12816int
12817main ()
12818{
12819 int i;
12820 for (i = 0; i < 256; i++)
12821 if (XOR (islower (i), ISLOWER (i))
12822 || toupper (i) != TOUPPER (i))
12823 return 2;
12824 return 0;
12825}
12826_ACEOF
12827if ac_fn_c_try_run "$LINENO"; then :
12828
12829else
12830 ac_cv_header_stdc=no
12831fi
12832rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12833 conftest.$ac_objext conftest.beam conftest.$ac_ext
12834fi
12835
12836fi
12837fi
12838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
12839$as_echo "$ac_cv_header_stdc" >&6; }
12840if test $ac_cv_header_stdc = yes; then
12841
12842$as_echo "#define STDC_HEADERS 1" >>confdefs.h
12843
3266f10b
TT
12844fi
12845
12846 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
12847# for constant arguments. Useless!
12848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
12849$as_echo_n "checking for working alloca.h... " >&6; }
12850if test "${ac_cv_working_alloca_h+set}" = set; then :
12851 $as_echo_n "(cached) " >&6
12852else
12853 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12854/* end confdefs.h. */
12855#include <alloca.h>
12856int
12857main ()
12858{
12859char *p = (char *) alloca (2 * sizeof (int));
12860 if (p) return 0;
12861 ;
12862 return 0;
12863}
12864_ACEOF
12865if ac_fn_c_try_link "$LINENO"; then :
12866 ac_cv_working_alloca_h=yes
12867else
12868 ac_cv_working_alloca_h=no
12869fi
12870rm -f core conftest.err conftest.$ac_objext \
12871 conftest$ac_exeext conftest.$ac_ext
12872fi
12873{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
12874$as_echo "$ac_cv_working_alloca_h" >&6; }
12875if test $ac_cv_working_alloca_h = yes; then
12876
12877$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
12878
12879fi
12880
12881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
12882$as_echo_n "checking for alloca... " >&6; }
12883if test "${ac_cv_func_alloca_works+set}" = set; then :
12884 $as_echo_n "(cached) " >&6
12885else
12886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12887/* end confdefs.h. */
12888#ifdef __GNUC__
12889# define alloca __builtin_alloca
12890#else
12891# ifdef _MSC_VER
12892# include <malloc.h>
12893# define alloca _alloca
12894# else
12895# ifdef HAVE_ALLOCA_H
12896# include <alloca.h>
12897# else
12898# ifdef _AIX
12899 #pragma alloca
12900# else
12901# ifndef alloca /* predefined by HP cc +Olibcalls */
12902char *alloca ();
12903# endif
12904# endif
12905# endif
12906# endif
12907#endif
12908
12909int
12910main ()
12911{
12912char *p = (char *) alloca (1);
12913 if (p) return 0;
12914 ;
12915 return 0;
12916}
12917_ACEOF
12918if ac_fn_c_try_link "$LINENO"; then :
12919 ac_cv_func_alloca_works=yes
12920else
12921 ac_cv_func_alloca_works=no
12922fi
12923rm -f core conftest.err conftest.$ac_objext \
12924 conftest$ac_exeext conftest.$ac_ext
12925fi
12926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
12927$as_echo "$ac_cv_func_alloca_works" >&6; }
12928
12929if test $ac_cv_func_alloca_works = yes; then
12930
12931$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
12932
12933else
12934 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
12935# that cause trouble. Some versions do not even contain alloca or
12936# contain a buggy version. If you still want to use their alloca,
12937# use ar to extract alloca.o from them instead of compiling alloca.c.
12938
12939ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
12940
12941$as_echo "#define C_ALLOCA 1" >>confdefs.h
12942
12943
12944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
12945$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
12946if test "${ac_cv_os_cray+set}" = set; then :
12947 $as_echo_n "(cached) " >&6
12948else
12949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12950/* end confdefs.h. */
12951#if defined CRAY && ! defined CRAY2
12952webecray
12953#else
12954wenotbecray
12955#endif
12956
12957_ACEOF
12958if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12959 $EGREP "webecray" >/dev/null 2>&1; then :
12960 ac_cv_os_cray=yes
12961else
12962 ac_cv_os_cray=no
12963fi
12964rm -f conftest*
12965
12966fi
12967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
12968$as_echo "$ac_cv_os_cray" >&6; }
12969if test $ac_cv_os_cray = yes; then
12970 for ac_func in _getb67 GETB67 getb67; do
12971 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12972ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12973eval as_val=\$$as_ac_var
12974 if test "x$as_val" = x""yes; then :
12975
12976cat >>confdefs.h <<_ACEOF
12977#define CRAY_STACKSEG_END $ac_func
12978_ACEOF
12979
12980 break
12981fi
12982
12983 done
12984fi
12985
12986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
12987$as_echo_n "checking stack direction for C alloca... " >&6; }
12988if test "${ac_cv_c_stack_direction+set}" = set; then :
12989 $as_echo_n "(cached) " >&6
12990else
12991 if test "$cross_compiling" = yes; then :
12992 ac_cv_c_stack_direction=0
12993else
12994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12995/* end confdefs.h. */
12996$ac_includes_default
12997int
12998find_stack_direction ()
12999{
13000 static char *addr = 0;
13001 auto char dummy;
13002 if (addr == 0)
13003 {
13004 addr = &dummy;
13005 return find_stack_direction ();
13006 }
13007 else
13008 return (&dummy > addr) ? 1 : -1;
13009}
13010
13011int
13012main ()
13013{
13014 return find_stack_direction () < 0;
13015}
13016_ACEOF
13017if ac_fn_c_try_run "$LINENO"; then :
13018 ac_cv_c_stack_direction=1
13019else
13020 ac_cv_c_stack_direction=-1
13021fi
13022rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13023 conftest.$ac_objext conftest.beam conftest.$ac_ext
13024fi
13025
13026fi
13027{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
13028$as_echo "$ac_cv_c_stack_direction" >&6; }
13029cat >>confdefs.h <<_ACEOF
13030#define STACK_DIRECTION $ac_cv_c_stack_direction
13031_ACEOF
13032
13033
13034fi
13035
13036
13037
13038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
13039$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
13040if test "${am_cv_langinfo_codeset+set}" = set; then :
13041 $as_echo_n "(cached) " >&6
13042else
13043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13044/* end confdefs.h. */
13045#include <langinfo.h>
13046int
13047main ()
13048{
13049char* cs = nl_langinfo(CODESET);
13050 ;
13051 return 0;
13052}
13053_ACEOF
13054if ac_fn_c_try_link "$LINENO"; then :
13055 am_cv_langinfo_codeset=yes
13056else
13057 am_cv_langinfo_codeset=no
13058fi
13059rm -f core conftest.err conftest.$ac_objext \
13060 conftest$ac_exeext conftest.$ac_ext
13061
13062fi
13063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
13064$as_echo "$am_cv_langinfo_codeset" >&6; }
13065 if test $am_cv_langinfo_codeset = yes; then
13066
13067$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
13068
13069 fi
13070
13071
c94fee56 13072 for ac_header in linux/perf_event.h locale.h memory.h signal.h sys/resource.h sys/socket.h sys/syscall.h sys/un.h sys/wait.h thread_db.h wait.h termios.h termio.h sgtty.h
3266f10b
TT
13073do :
13074 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13075ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13076eval as_val=\$$as_ac_Header
13077 if test "x$as_val" = x""yes; then :
13078 cat >>confdefs.h <<_ACEOF
13079#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13080_ACEOF
13081
13082fi
13083
13084done
13085
13086
f348d89a 13087 for ac_func in fdwalk getrlimit pipe pipe2 socketpair sigaction
3266f10b
TT
13088do :
13089 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13090ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13091eval as_val=\$$as_ac_var
13092 if test "x$as_val" = x""yes; then :
13093 cat >>confdefs.h <<_ACEOF
13094#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13095_ACEOF
13096
13097fi
13098done
13099
13100
13101 ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default"
13102if test "x$ac_cv_have_decl_strerror" = x""yes; then :
13103 ac_have_decl=1
13104else
13105 ac_have_decl=0
13106fi
13107
13108cat >>confdefs.h <<_ACEOF
13109#define HAVE_DECL_STRERROR $ac_have_decl
13110_ACEOF
13111ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
13112if test "x$ac_cv_have_decl_strstr" = x""yes; then :
13113 ac_have_decl=1
13114else
13115 ac_have_decl=0
13116fi
13117
13118cat >>confdefs.h <<_ACEOF
13119#define HAVE_DECL_STRSTR $ac_have_decl
13120_ACEOF
13121
13122
e9bcb658
GB
13123 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
13124$as_echo_n "checking for sigsetjmp... " >&6; }
13125if test "${gdb_cv_func_sigsetjmp+set}" = set; then :
13126 $as_echo_n "(cached) " >&6
13127else
13128 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13129/* end confdefs.h. */
13130
13131#include <setjmp.h>
13132
13133int
13134main ()
13135{
13136sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
13137 ;
13138 return 0;
13139}
13140_ACEOF
13141if ac_fn_c_try_compile "$LINENO"; then :
13142 gdb_cv_func_sigsetjmp=yes
13143else
13144 gdb_cv_func_sigsetjmp=no
13145fi
13146rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13147fi
13148{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
13149$as_echo "$gdb_cv_func_sigsetjmp" >&6; }
13150if test $gdb_cv_func_sigsetjmp = yes; then
13151
13152$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
13153
13154fi
13155
3266f10b 13156
54019719
PA
13157# Check the return and argument types of ptrace.
13158
13159
54019719
PA
13160for ac_header in sys/ptrace.h ptrace.h
13161do :
13162 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13163ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13164eval as_val=\$$as_ac_Header
13165 if test "x$as_val" = x""yes; then :
13166 cat >>confdefs.h <<_ACEOF
13167#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13168_ACEOF
13169
13170fi
13171
13172done
13173
13174
a3828db0 13175gdb_ptrace_headers='
4ff70b84 13176#include <sys/types.h>
a3828db0
MK
13177#if HAVE_SYS_PTRACE_H
13178# include <sys/ptrace.h>
13179#endif
13180#if HAVE_UNISTD_H
13181# include <unistd.h>
13182#endif
13183'
13184# There is no point in checking if we don't have a prototype.
9b30624b 13185ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers
81ecdfbb
RW
13186"
13187if test "x$ac_cv_have_decl_ptrace" = x""yes; then :
13188 ac_have_decl=1
06825bd1 13189else
81ecdfbb 13190 ac_have_decl=0
06825bd1 13191fi
06825bd1 13192
a3828db0 13193cat >>confdefs.h <<_ACEOF
81ecdfbb 13194#define HAVE_DECL_PTRACE $ac_have_decl
a3828db0 13195_ACEOF
81ecdfbb 13196if test $ac_have_decl = 1; then :
bec39cab 13197
a3828db0 13198else
a3828db0
MK
13199
13200 : ${gdb_cv_func_ptrace_ret='int'}
13201 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
13202
06825bd1
MK
13203fi
13204
064ef605
DJ
13205# Check return type. Varargs (used on GNU/Linux) conflict with the
13206# empty argument list, so check for that explicitly.
81ecdfbb
RW
13207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
13208$as_echo_n "checking return type of ptrace... " >&6; }
13209if test "${gdb_cv_func_ptrace_ret+set}" = set; then :
13210 $as_echo_n "(cached) " >&6
bec39cab 13211else
81ecdfbb 13212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13213/* end confdefs.h. */
a3828db0 13214$gdb_ptrace_headers
bec39cab
AC
13215int
13216main ()
13217{
064ef605
DJ
13218extern long ptrace (enum __ptrace_request, ...);
13219 ;
13220 return 0;
13221}
13222_ACEOF
9b30624b 13223if ac_fn_c_try_compile "$LINENO"; then :
064ef605
DJ
13224 gdb_cv_func_ptrace_ret='long'
13225else
81ecdfbb 13226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
13227/* end confdefs.h. */
13228$gdb_ptrace_headers
13229int
13230main ()
13231{
a3828db0 13232extern int ptrace ();
bec39cab
AC
13233 ;
13234 return 0;
13235}
13236_ACEOF
9b30624b 13237if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13238 gdb_cv_func_ptrace_ret='int'
70f9f479 13239else
81ecdfbb 13240 gdb_cv_func_ptrace_ret='long'
70f9f479 13241fi
81ecdfbb 13242rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
70f9f479 13243fi
81ecdfbb 13244rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
064ef605 13245fi
81ecdfbb
RW
13246{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
13247$as_echo "$gdb_cv_func_ptrace_ret" >&6; }
bec39cab 13248
a3828db0
MK
13249cat >>confdefs.h <<_ACEOF
13250#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
bec39cab 13251_ACEOF
70f9f479 13252
a3828db0 13253# Check argument types.
81ecdfbb
RW
13254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
13255$as_echo_n "checking types of arguments for ptrace... " >&6; }
13256if test "${gdb_cv_func_ptrace_args+set}" = set; then :
13257 $as_echo_n "(cached) " >&6
bec39cab 13258else
a3828db0 13259
81ecdfbb 13260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
13261/* end confdefs.h. */
13262$gdb_ptrace_headers
13263int
13264main ()
13265{
13266extern long ptrace (enum __ptrace_request, ...);
13267 ;
13268 return 0;
13269}
13270_ACEOF
9b30624b 13271if ac_fn_c_try_compile "$LINENO"; then :
54019719 13272 gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long'
064ef605 13273else
064ef605 13274
a3828db0
MK
13275for gdb_arg1 in 'int' 'long'; do
13276 for gdb_arg2 in 'pid_t' 'int' 'long'; do
5ed10e6e 13277 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
96d7229d 13278 for gdb_arg4 in 'int' 'long' 'void *'; do
81ecdfbb 13279 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13280/* end confdefs.h. */
a3828db0 13281$gdb_ptrace_headers
bec39cab
AC
13282int
13283main ()
13284{
a3828db0
MK
13285
13286extern $gdb_cv_func_ptrace_ret
13287 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
13288
bec39cab
AC
13289 ;
13290 return 0;
13291}
13292_ACEOF
9b30624b 13293if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
13294 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
13295 break 4;
5c7f2947 13296fi
81ecdfbb 13297rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0 13298 for gdb_arg5 in 'int *' 'int' 'long'; do
81ecdfbb 13299 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13300/* end confdefs.h. */
a3828db0 13301$gdb_ptrace_headers
bec39cab
AC
13302int
13303main ()
13304{
a3828db0
MK
13305
13306extern $gdb_cv_func_ptrace_ret
13307 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
13308
bec39cab
AC
13309 ;
13310 return 0;
13311}
13312_ACEOF
9b30624b 13313if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
13314
13315gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
13316 break 5;
78434e59 13317fi
81ecdfbb 13318rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0
MK
13319 done
13320 done
13321 done
13322 done
13323done
13324# Provide a safe default value.
13325: ${gdb_cv_func_ptrace_args='int,int,long,long'}
13326
064ef605 13327fi
81ecdfbb 13328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
78434e59 13329fi
81ecdfbb
RW
13330{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
13331$as_echo "$gdb_cv_func_ptrace_args" >&6; }
a3828db0
MK
13332ac_save_IFS=$IFS; IFS=','
13333set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
13334IFS=$ac_save_IFS
13335shift
bec39cab 13336
54019719
PA
13337cat >>confdefs.h <<_ACEOF
13338#define PTRACE_TYPE_ARG1 $1
13339_ACEOF
13340
13341
a3828db0
MK
13342cat >>confdefs.h <<_ACEOF
13343#define PTRACE_TYPE_ARG3 $3
13344_ACEOF
13345
96d7229d
LM
13346
13347cat >>confdefs.h <<_ACEOF
13348#define PTRACE_TYPE_ARG4 $4
13349_ACEOF
13350
a3828db0
MK
13351if test -n "$5"; then
13352
13353cat >>confdefs.h <<_ACEOF
13354#define PTRACE_TYPE_ARG5 $5
bec39cab 13355_ACEOF
78434e59
MK
13356
13357fi
13358
54019719 13359
a3828db0 13360if test "$cross_compiling" = no; then
81ecdfbb
RW
13361 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
13362$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
13363if test "${ac_cv_func_setpgrp_void+set}" = set; then :
13364 $as_echo_n "(cached) " >&6
a3828db0 13365else
81ecdfbb
RW
13366 if test "$cross_compiling" = yes; then :
13367 as_fn_error "cannot check setpgrp when cross compiling" "$LINENO" 5
bec39cab 13368else
81ecdfbb 13369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13370/* end confdefs.h. */
81ecdfbb 13371$ac_includes_default
bec39cab
AC
13372int
13373main ()
13374{
a3828db0
MK
13375/* If this system has a BSD-style setpgrp which takes arguments,
13376 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
13377 exit successfully. */
81ecdfbb 13378 return setpgrp (1,1) != -1;
bec39cab
AC
13379 ;
13380 return 0;
13381}
13382_ACEOF
81ecdfbb 13383if ac_fn_c_try_run "$LINENO"; then :
a3828db0 13384 ac_cv_func_setpgrp_void=no
c906108c 13385else
81ecdfbb 13386 ac_cv_func_setpgrp_void=yes
c906108c 13387fi
81ecdfbb
RW
13388rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13389 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 13390fi
81ecdfbb 13391
a3828db0 13392fi
81ecdfbb
RW
13393{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
13394$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0
MK
13395if test $ac_cv_func_setpgrp_void = yes; then
13396
81ecdfbb 13397$as_echo "#define SETPGRP_VOID 1" >>confdefs.h
97bf5e38
MK
13398
13399fi
a3828db0
MK
13400
13401else
81ecdfbb
RW
13402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
13403$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
13404if test "${ac_cv_func_setpgrp_void+set}" = set; then :
13405 $as_echo_n "(cached) " >&6
97bf5e38 13406else
81ecdfbb 13407 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13408/* end confdefs.h. */
a3828db0
MK
13409
13410#include <unistd.h>
13411
bec39cab
AC
13412int
13413main ()
13414{
a3828db0
MK
13415
13416 if (setpgrp(1,1) == -1)
13417 exit (0);
13418 else
13419 exit (1);
13420
bec39cab
AC
13421 ;
13422 return 0;
13423}
13424_ACEOF
81ecdfbb 13425if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13426 ac_cv_func_setpgrp_void=no
c906108c 13427else
81ecdfbb 13428 ac_cv_func_setpgrp_void=yes
c906108c 13429fi
81ecdfbb 13430rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 13431fi
81ecdfbb
RW
13432{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
13433$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0 13434if test $ac_cv_func_setpgrp_void = yes; then
81ecdfbb 13435 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
c3f6f71d 13436
a3828db0 13437fi
c906108c
SS
13438fi
13439
db1ff28b
JK
13440# Assume we'll default to using the included libiberty regex.
13441gdb_use_included_regex=yes
13442
13443# However, if the system regex is GNU regex, then default to *not*
13444# using the included regex.
13445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5
13446$as_echo_n "checking for GNU regex... " >&6; }
13447if test "${gdb_cv_have_gnu_regex+set}" = set; then :
13448 $as_echo_n "(cached) " >&6
13449else
13450 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13451/* end confdefs.h. */
13452#include <gnu-versions.h>
13453int
13454main ()
13455{
13456#define REGEX_INTERFACE_VERSION 1
13457#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
13458# error "Version mismatch"
13459#endif
13460 ;
13461 return 0;
13462}
13463_ACEOF
13464if ac_fn_c_try_compile "$LINENO"; then :
13465 gdb_cv_have_gnu_regex=yes
13466else
13467 gdb_cv_have_gnu_regex=no
13468fi
13469rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13470fi
13471{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
13472$as_echo "$gdb_cv_have_gnu_regex" >&6; }
13473if test $gdb_cv_have_gnu_regex = yes; then
13474 gdb_use_included_regex=no
13475fi
13476
13477
13478# Check whether --with-included-regex was given.
13479if test "${with_included_regex+set}" = set; then :
13480 withval=$with_included_regex; gdb_with_regex=$withval
13481else
13482 gdb_with_regex=$gdb_use_included_regex
13483fi
13484
13485if test "$gdb_with_regex" = yes; then
13486
13487$as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h
13488
13489fi
13490
81ecdfbb
RW
13491# Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
13492ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
13493#include <sys/proc.h>
13494
13495"
13496if test "x$ac_cv_member_struct_thread_td_pcb" = x""yes; then :
c906108c 13497
5c45e068 13498cat >>confdefs.h <<_ACEOF
a3828db0 13499#define HAVE_STRUCT_THREAD_TD_PCB 1
bec39cab 13500_ACEOF
c906108c 13501
5c45e068 13502
97bf5e38 13503fi
c906108c 13504
5c45e068 13505
a3828db0 13506# See if <sys/lwp.h> defines `struct lwp`.
81ecdfbb
RW
13507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
13508$as_echo_n "checking for struct lwp... " >&6; }
13509if test "${gdb_cv_struct_lwp+set}" = set; then :
13510 $as_echo_n "(cached) " >&6
bec39cab 13511else
81ecdfbb 13512 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13513/* end confdefs.h. */
a3828db0 13514#include <sys/param.h>
c49fbc6c 13515#define _KMEMUSER
a3828db0 13516#include <sys/lwp.h>
bec39cab
AC
13517int
13518main ()
13519{
a3828db0 13520struct lwp l;
bec39cab
AC
13521 ;
13522 return 0;
13523}
13524_ACEOF
81ecdfbb 13525if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13526 gdb_cv_struct_lwp=yes
c906108c 13527else
81ecdfbb 13528 gdb_cv_struct_lwp=no
c906108c 13529fi
81ecdfbb 13530rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 13531fi
81ecdfbb
RW
13532{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
13533$as_echo "$gdb_cv_struct_lwp" >&6; }
a3828db0 13534if test $gdb_cv_struct_lwp = yes; then
c906108c 13535
81ecdfbb 13536$as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
c906108c 13537
97bf5e38 13538fi
c906108c 13539
a3828db0 13540# See if <machine/reg.h> degines `struct reg'.
81ecdfbb
RW
13541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
13542$as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
13543if test "${gdb_cv_struct_reg+set}" = set; then :
13544 $as_echo_n "(cached) " >&6
bec39cab 13545else
81ecdfbb 13546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13547/* end confdefs.h. */
a3828db0
MK
13548#include <sys/types.h>
13549#include <machine/reg.h>
bec39cab
AC
13550int
13551main ()
13552{
a3828db0 13553struct reg r;
bec39cab
AC
13554 ;
13555 return 0;
13556}
13557_ACEOF
81ecdfbb 13558if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13559 gdb_cv_struct_reg=yes
27ca5dad 13560else
81ecdfbb 13561 gdb_cv_struct_reg=no
27ca5dad 13562fi
81ecdfbb 13563rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27ca5dad 13564fi
81ecdfbb
RW
13565{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
13566$as_echo "$gdb_cv_struct_reg" >&6; }
a3828db0 13567if test $gdb_cv_struct_reg = yes; then
bec39cab 13568
81ecdfbb 13569$as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
27ca5dad
MC
13570
13571fi
97bf5e38 13572
a3828db0
MK
13573# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
13574# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
a6e69c1f
JB
13575ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <sys/types.h>
13576#include <machine/reg.h>
81ecdfbb
RW
13577"
13578if test "x$ac_cv_member_struct_reg_r_fs" = x""yes; then :
5c45e068
MK
13579
13580cat >>confdefs.h <<_ACEOF
a3828db0 13581#define HAVE_STRUCT_REG_R_FS 1
bec39cab 13582_ACEOF
3862412b 13583
5c45e068 13584
97bf5e38 13585fi
a6e69c1f
JB
13586ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <sys/types.h>
13587#include <machine/reg.h>
81ecdfbb
RW
13588"
13589if test "x$ac_cv_member_struct_reg_r_gs" = x""yes; then :
5c45e068
MK
13590
13591cat >>confdefs.h <<_ACEOF
a3828db0 13592#define HAVE_STRUCT_REG_R_GS 1
bec39cab 13593_ACEOF
3862412b 13594
5c45e068 13595
97bf5e38 13596fi
3862412b 13597
5c45e068 13598
6fea9e18
L
13599# See if <sys/user.h> supports the %fs_base and %gs_bas amd64 segment registers.
13600# Older amd64 Linux's don't have the fs_base and gs_base members of
13601# `struct user_regs_struct'.
13602ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "fs_base" "ac_cv_member_struct_user_regs_struct_fs_base" "#include <sys/user.h>
13603"
13604if test "x$ac_cv_member_struct_user_regs_struct_fs_base" = x""yes; then :
13605
13606cat >>confdefs.h <<_ACEOF
13607#define HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE 1
13608_ACEOF
13609
13610
13611fi
13612ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "gs_base" "ac_cv_member_struct_user_regs_struct_gs_base" "#include <sys/user.h>
13613"
13614if test "x$ac_cv_member_struct_user_regs_struct_gs_base" = x""yes; then :
13615
13616cat >>confdefs.h <<_ACEOF
13617#define HAVE_STRUCT_USER_REGS_STRUCT_GS_BASE 1
13618_ACEOF
13619
13620
13621fi
13622
13623
a3828db0 13624# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
81ecdfbb
RW
13625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
13626$as_echo_n "checking for PTRACE_GETREGS... " >&6; }
13627if test "${gdb_cv_have_ptrace_getregs+set}" = set; then :
13628 $as_echo_n "(cached) " >&6
451928c5 13629else
81ecdfbb 13630 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13631/* end confdefs.h. */
a3828db0 13632#include <sys/ptrace.h>
bec39cab
AC
13633int
13634main ()
13635{
a3828db0 13636PTRACE_GETREGS;
bec39cab
AC
13637 ;
13638 return 0;
13639}
13640_ACEOF
81ecdfbb 13641if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13642 gdb_cv_have_ptrace_getregs=yes
451928c5 13643else
81ecdfbb 13644 gdb_cv_have_ptrace_getregs=no
451928c5 13645fi
81ecdfbb 13646rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
13647fi
13648
81ecdfbb
RW
13649{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
13650$as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
a3828db0 13651if test $gdb_cv_have_ptrace_getregs = yes; then
60ca704f 13652
81ecdfbb 13653$as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
451928c5 13654
97bf5e38 13655fi
451928c5 13656
a3828db0 13657# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
81ecdfbb
RW
13658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
13659$as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
13660if test "${gdb_cv_have_ptrace_getfpxregs+set}" = set; then :
13661 $as_echo_n "(cached) " >&6
451928c5 13662else
81ecdfbb 13663 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13664/* end confdefs.h. */
a3828db0 13665#include <sys/ptrace.h>
bec39cab
AC
13666int
13667main ()
13668{
a3828db0 13669PTRACE_GETFPXREGS;
bec39cab
AC
13670 ;
13671 return 0;
13672}
13673_ACEOF
81ecdfbb 13674if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13675 gdb_cv_have_ptrace_getfpxregs=yes
451928c5 13676else
81ecdfbb 13677 gdb_cv_have_ptrace_getfpxregs=no
451928c5 13678fi
81ecdfbb 13679rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
13680fi
13681
81ecdfbb
RW
13682{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
13683$as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
a3828db0 13684if test $gdb_cv_have_ptrace_getfpxregs = yes; then
60ca704f 13685
81ecdfbb 13686$as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
451928c5 13687
97bf5e38 13688fi
451928c5 13689
a3828db0 13690# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
81ecdfbb
RW
13691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
13692$as_echo_n "checking for PT_GETDBREGS... " >&6; }
13693if test "${gdb_cv_have_pt_getdbregs+set}" = set; then :
13694 $as_echo_n "(cached) " >&6
3862412b 13695else
81ecdfbb 13696 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13697/* end confdefs.h. */
a3828db0
MK
13698#include <sys/types.h>
13699#include <sys/ptrace.h>
bec39cab
AC
13700int
13701main ()
13702{
a3828db0 13703PT_GETDBREGS;
bec39cab
AC
13704 ;
13705 return 0;
13706}
13707_ACEOF
81ecdfbb 13708if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13709 gdb_cv_have_pt_getdbregs=yes
3862412b 13710else
81ecdfbb 13711 gdb_cv_have_pt_getdbregs=no
3862412b 13712fi
81ecdfbb 13713rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
13714fi
13715
81ecdfbb
RW
13716{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
13717$as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
a3828db0 13718if test $gdb_cv_have_pt_getdbregs = yes; then
60ca704f 13719
81ecdfbb 13720$as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
3862412b 13721
97bf5e38 13722fi
3862412b 13723
a3828db0 13724# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
81ecdfbb
RW
13725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
13726$as_echo_n "checking for PT_GETXMMREGS... " >&6; }
13727if test "${gdb_cv_have_pt_getxmmregs+set}" = set; then :
13728 $as_echo_n "(cached) " >&6
3862412b 13729else
81ecdfbb 13730 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13731/* end confdefs.h. */
a3828db0
MK
13732#include <sys/types.h>
13733#include <sys/ptrace.h>
bec39cab
AC
13734int
13735main ()
13736{
a3828db0 13737PT_GETXMMREGS;
bec39cab
AC
13738 ;
13739 return 0;
13740}
13741_ACEOF
81ecdfbb 13742if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13743 gdb_cv_have_pt_getxmmregs=yes
3862412b 13744else
81ecdfbb 13745 gdb_cv_have_pt_getxmmregs=no
3862412b 13746fi
81ecdfbb 13747rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
13748fi
13749
81ecdfbb
RW
13750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
13751$as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
a3828db0 13752if test $gdb_cv_have_pt_getxmmregs = yes; then
60ca704f 13753
81ecdfbb 13754$as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
3862412b 13755
97bf5e38 13756fi
3862412b 13757
6e9567fe
JB
13758# See if <sys/ptrace.h> supports LWP names on FreeBSD
13759# Older FreeBSD versions don't have the pl_tdname member of
13760# `struct ptrace_lwpinfo'.
13761ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_tdname" "ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" "#include <sys/ptrace.h>
13762"
13763if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" = x""yes; then :
13764
13765cat >>confdefs.h <<_ACEOF
13766#define HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME 1
13767_ACEOF
13768
13769
13770fi
13771
13772
e6cdd38e
JB
13773# See if <sys/ptrace.h> supports syscall fields on FreeBSD. The
13774# pl_syscall_code member of `struct ptrace_lwpinfo' was added in
13775# FreeBSD 10.3.
13776ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_syscall_code" "ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" "#include <sys/ptrace.h>
13777"
13778if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" = x""yes; then :
13779
13780cat >>confdefs.h <<_ACEOF
13781#define HAVE_STRUCT_PTRACE_LWPINFO_PL_SYSCALL_CODE 1
13782_ACEOF
13783
13784
13785fi
13786
6e9567fe 13787
05b4bd79 13788# Detect which type of /proc is in use, such as for Solaris.
97bf5e38
MK
13789
13790if test "${target}" = "${host}"; then
13791 case "${host}" in
7b00db47 13792 *-*-sysv4.2* | *-*-sysv5* )
60ca704f 13793
81ecdfbb 13794$as_echo "#define NEW_PROC_API 1" >>confdefs.h
97bf5e38
MK
13795
13796 ;;
c162e8c9 13797 *-*-solaris2.[6789] | *-*-solaris2.1[0-9]*)
60ca704f 13798
81ecdfbb 13799$as_echo "#define NEW_PROC_API 1" >>confdefs.h
c960c18f 13800
97bf5e38
MK
13801 ;;
13802 esac
13803fi
13804
13805if test "$ac_cv_header_sys_procfs_h" = yes; then
81ecdfbb
RW
13806 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
13807$as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
13808 if test "${bfd_cv_have_sys_procfs_type_gregset_t+set}" = set; then :
13809 $as_echo_n "(cached) " >&6
596c9d4b 13810else
81ecdfbb 13811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13812/* end confdefs.h. */
596c9d4b
KB
13813
13814#define _SYSCALL32
d30c5336
JK
13815/* Needed for new procfs interface on sparc-solaris. */
13816#define _STRUCTURED_PROC 1
596c9d4b 13817#include <sys/procfs.h>
bec39cab
AC
13818int
13819main ()
13820{
97bf5e38 13821gregset_t avar
bec39cab
AC
13822 ;
13823 return 0;
13824}
13825_ACEOF
81ecdfbb 13826if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13827 bfd_cv_have_sys_procfs_type_gregset_t=yes
596c9d4b 13828else
81ecdfbb 13829 bfd_cv_have_sys_procfs_type_gregset_t=no
bec39cab 13830
596c9d4b 13831fi
81ecdfbb 13832rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
13833fi
13834
97bf5e38 13835 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
bec39cab 13836
81ecdfbb 13837$as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
596c9d4b
KB
13838
13839 fi
81ecdfbb
RW
13840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
13841$as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
451928c5 13842
81ecdfbb
RW
13843 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
13844$as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
13845 if test "${bfd_cv_have_sys_procfs_type_fpregset_t+set}" = set; then :
13846 $as_echo_n "(cached) " >&6
d84dd0c5 13847else
81ecdfbb 13848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13849/* end confdefs.h. */
97bf5e38
MK
13850
13851#define _SYSCALL32
d30c5336
JK
13852/* Needed for new procfs interface on sparc-solaris. */
13853#define _STRUCTURED_PROC 1
d84dd0c5 13854#include <sys/procfs.h>
bec39cab
AC
13855int
13856main ()
13857{
97bf5e38 13858fpregset_t avar
bec39cab
AC
13859 ;
13860 return 0;
13861}
13862_ACEOF
81ecdfbb 13863if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13864 bfd_cv_have_sys_procfs_type_fpregset_t=yes
d84dd0c5 13865else
81ecdfbb 13866 bfd_cv_have_sys_procfs_type_fpregset_t=no
bec39cab 13867
d84dd0c5 13868fi
81ecdfbb 13869rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d84dd0c5
MK
13870fi
13871
97bf5e38 13872 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
bec39cab 13873
81ecdfbb 13874$as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
d84dd0c5 13875
97bf5e38 13876 fi
81ecdfbb
RW
13877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
13878$as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
d84dd0c5 13879
81ecdfbb
RW
13880 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
13881$as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
13882 if test "${bfd_cv_have_sys_procfs_type_prgregset_t+set}" = set; then :
13883 $as_echo_n "(cached) " >&6
c906108c 13884else
81ecdfbb 13885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13886/* end confdefs.h. */
c906108c 13887
97bf5e38 13888#define _SYSCALL32
d30c5336
JK
13889/* Needed for new procfs interface on sparc-solaris. */
13890#define _STRUCTURED_PROC 1
97bf5e38 13891#include <sys/procfs.h>
bec39cab
AC
13892int
13893main ()
13894{
97bf5e38 13895prgregset_t avar
bec39cab
AC
13896 ;
13897 return 0;
13898}
13899_ACEOF
81ecdfbb 13900if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13901 bfd_cv_have_sys_procfs_type_prgregset_t=yes
c906108c 13902else
81ecdfbb 13903 bfd_cv_have_sys_procfs_type_prgregset_t=no
bec39cab 13904
c906108c 13905fi
81ecdfbb 13906rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13907fi
13908
97bf5e38 13909 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
bec39cab 13910
81ecdfbb 13911$as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
c906108c 13912
97bf5e38 13913 fi
81ecdfbb
RW
13914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
13915$as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
c906108c 13916
81ecdfbb
RW
13917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
13918$as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
13919 if test "${bfd_cv_have_sys_procfs_type_prfpregset_t+set}" = set; then :
13920 $as_echo_n "(cached) " >&6
d45fe813 13921else
81ecdfbb 13922 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13923/* end confdefs.h. */
97bf5e38
MK
13924
13925#define _SYSCALL32
d30c5336
JK
13926/* Needed for new procfs interface on sparc-solaris. */
13927#define _STRUCTURED_PROC 1
97bf5e38 13928#include <sys/procfs.h>
bec39cab
AC
13929int
13930main ()
13931{
97bf5e38 13932prfpregset_t avar
bec39cab
AC
13933 ;
13934 return 0;
13935}
13936_ACEOF
81ecdfbb 13937if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13938 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
d45fe813 13939else
81ecdfbb 13940 bfd_cv_have_sys_procfs_type_prfpregset_t=no
bec39cab 13941
d45fe813 13942fi
81ecdfbb 13943rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
13944fi
13945
97bf5e38 13946 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
bec39cab 13947
81ecdfbb 13948$as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
d45fe813 13949
97bf5e38 13950 fi
81ecdfbb
RW
13951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
13952$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
d45fe813 13953
81ecdfbb
RW
13954 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
13955$as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
13956 if test "${bfd_cv_have_sys_procfs_type_prgregset32_t+set}" = set; then :
13957 $as_echo_n "(cached) " >&6
d45fe813 13958else
81ecdfbb 13959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13960/* end confdefs.h. */
97bf5e38
MK
13961
13962#define _SYSCALL32
d30c5336
JK
13963/* Needed for new procfs interface on sparc-solaris. */
13964#define _STRUCTURED_PROC 1
97bf5e38 13965#include <sys/procfs.h>
bec39cab
AC
13966int
13967main ()
13968{
97bf5e38 13969prgregset32_t avar
bec39cab
AC
13970 ;
13971 return 0;
13972}
13973_ACEOF
81ecdfbb 13974if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13975 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
d45fe813 13976else
81ecdfbb 13977 bfd_cv_have_sys_procfs_type_prgregset32_t=no
bec39cab 13978
d45fe813 13979fi
81ecdfbb 13980rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
13981fi
13982
97bf5e38 13983 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
bec39cab 13984
81ecdfbb 13985$as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
d45fe813 13986
97bf5e38 13987 fi
81ecdfbb
RW
13988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
13989$as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
d45fe813 13990
81ecdfbb
RW
13991 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
13992$as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
13993 if test "${bfd_cv_have_sys_procfs_type_lwpid_t+set}" = set; then :
13994 $as_echo_n "(cached) " >&6
d45fe813 13995else
81ecdfbb 13996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13997/* end confdefs.h. */
97bf5e38 13998
d45fe813 13999#define _SYSCALL32
d30c5336
JK
14000/* Needed for new procfs interface on sparc-solaris. */
14001#define _STRUCTURED_PROC 1
97bf5e38 14002#include <sys/procfs.h>
bec39cab
AC
14003int
14004main ()
14005{
97bf5e38 14006lwpid_t avar
bec39cab
AC
14007 ;
14008 return 0;
14009}
14010_ACEOF
81ecdfbb 14011if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14012 bfd_cv_have_sys_procfs_type_lwpid_t=yes
d45fe813 14013else
81ecdfbb 14014 bfd_cv_have_sys_procfs_type_lwpid_t=no
bec39cab 14015
d45fe813 14016fi
81ecdfbb 14017rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
14018fi
14019
97bf5e38 14020 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
bec39cab 14021
81ecdfbb 14022$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
d45fe813 14023
97bf5e38 14024 fi
81ecdfbb
RW
14025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
14026$as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
c906108c 14027
81ecdfbb
RW
14028 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
14029$as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
14030 if test "${bfd_cv_have_sys_procfs_type_psaddr_t+set}" = set; then :
14031 $as_echo_n "(cached) " >&6
c906108c 14032else
81ecdfbb 14033 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14034/* end confdefs.h. */
c906108c 14035
97bf5e38 14036#define _SYSCALL32
d30c5336
JK
14037/* Needed for new procfs interface on sparc-solaris. */
14038#define _STRUCTURED_PROC 1
97bf5e38 14039#include <sys/procfs.h>
bec39cab
AC
14040int
14041main ()
14042{
97bf5e38 14043psaddr_t avar
bec39cab
AC
14044 ;
14045 return 0;
14046}
14047_ACEOF
81ecdfbb 14048if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14049 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c 14050else
81ecdfbb 14051 bfd_cv_have_sys_procfs_type_psaddr_t=no
bec39cab 14052
c906108c 14053fi
81ecdfbb 14054rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
14055fi
14056
97bf5e38 14057 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
bec39cab 14058
81ecdfbb 14059$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
c906108c 14060
97bf5e38 14061 fi
81ecdfbb
RW
14062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
14063$as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
c906108c 14064
81ecdfbb
RW
14065 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prsysent_t in sys/procfs.h" >&5
14066$as_echo_n "checking for prsysent_t in sys/procfs.h... " >&6; }
14067 if test "${bfd_cv_have_sys_procfs_type_prsysent_t+set}" = set; then :
14068 $as_echo_n "(cached) " >&6
c906108c 14069else
81ecdfbb 14070 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14071/* end confdefs.h. */
c906108c 14072
97bf5e38 14073#define _SYSCALL32
d30c5336
JK
14074/* Needed for new procfs interface on sparc-solaris. */
14075#define _STRUCTURED_PROC 1
97bf5e38 14076#include <sys/procfs.h>
bec39cab
AC
14077int
14078main ()
14079{
97bf5e38 14080prsysent_t avar
bec39cab
AC
14081 ;
14082 return 0;
14083}
14084_ACEOF
81ecdfbb 14085if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14086 bfd_cv_have_sys_procfs_type_prsysent_t=yes
c906108c 14087else
81ecdfbb 14088 bfd_cv_have_sys_procfs_type_prsysent_t=no
bec39cab 14089
c906108c 14090fi
81ecdfbb 14091rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
14092fi
14093
97bf5e38 14094 if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
bec39cab 14095
81ecdfbb 14096$as_echo "#define HAVE_PRSYSENT_T 1" >>confdefs.h
c906108c 14097
97bf5e38 14098 fi
81ecdfbb
RW
14099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prsysent_t" >&5
14100$as_echo "$bfd_cv_have_sys_procfs_type_prsysent_t" >&6; }
c906108c 14101
81ecdfbb
RW
14102 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigset_t in sys/procfs.h" >&5
14103$as_echo_n "checking for pr_sigset_t in sys/procfs.h... " >&6; }
14104 if test "${bfd_cv_have_sys_procfs_type_pr_sigset_t+set}" = set; then :
14105 $as_echo_n "(cached) " >&6
c906108c 14106else
81ecdfbb 14107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14108/* end confdefs.h. */
c906108c 14109
97bf5e38 14110#define _SYSCALL32
d30c5336
JK
14111/* Needed for new procfs interface on sparc-solaris. */
14112#define _STRUCTURED_PROC 1
97bf5e38 14113#include <sys/procfs.h>
bec39cab
AC
14114int
14115main ()
14116{
97bf5e38 14117pr_sigset_t avar
bec39cab
AC
14118 ;
14119 return 0;
14120}
14121_ACEOF
81ecdfbb 14122if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14123 bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
c906108c 14124else
81ecdfbb 14125 bfd_cv_have_sys_procfs_type_pr_sigset_t=no
bec39cab 14126
c906108c 14127fi
81ecdfbb 14128rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
14129fi
14130
97bf5e38 14131 if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
bec39cab 14132
81ecdfbb 14133$as_echo "#define HAVE_PR_SIGSET_T 1" >>confdefs.h
c906108c 14134
97bf5e38 14135 fi
81ecdfbb
RW
14136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigset_t" >&5
14137$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigset_t" >&6; }
c906108c 14138
81ecdfbb
RW
14139 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigaction64_t in sys/procfs.h" >&5
14140$as_echo_n "checking for pr_sigaction64_t in sys/procfs.h... " >&6; }
14141 if test "${bfd_cv_have_sys_procfs_type_pr_sigaction64_t+set}" = set; then :
14142 $as_echo_n "(cached) " >&6
c906108c 14143else
81ecdfbb 14144 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14145/* end confdefs.h. */
c906108c 14146
97bf5e38 14147#define _SYSCALL32
d30c5336
JK
14148/* Needed for new procfs interface on sparc-solaris. */
14149#define _STRUCTURED_PROC 1
97bf5e38 14150#include <sys/procfs.h>
bec39cab
AC
14151int
14152main ()
14153{
97bf5e38 14154pr_sigaction64_t avar
bec39cab
AC
14155 ;
14156 return 0;
14157}
14158_ACEOF
81ecdfbb 14159if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14160 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
c906108c 14161else
81ecdfbb 14162 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
bec39cab 14163
c906108c 14164fi
81ecdfbb 14165rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
14166fi
14167
97bf5e38 14168 if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
bec39cab 14169
81ecdfbb 14170$as_echo "#define HAVE_PR_SIGACTION64_T 1" >>confdefs.h
c906108c 14171
97bf5e38 14172 fi
81ecdfbb
RW
14173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&5
14174$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&6; }
97bf5e38 14175
81ecdfbb
RW
14176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_siginfo64_t in sys/procfs.h" >&5
14177$as_echo_n "checking for pr_siginfo64_t in sys/procfs.h... " >&6; }
14178 if test "${bfd_cv_have_sys_procfs_type_pr_siginfo64_t+set}" = set; then :
14179 $as_echo_n "(cached) " >&6
97bf5e38 14180else
81ecdfbb 14181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14182/* end confdefs.h. */
97bf5e38
MK
14183
14184#define _SYSCALL32
d30c5336
JK
14185/* Needed for new procfs interface on sparc-solaris. */
14186#define _STRUCTURED_PROC 1
97bf5e38 14187#include <sys/procfs.h>
bec39cab
AC
14188int
14189main ()
14190{
97bf5e38 14191pr_siginfo64_t avar
bec39cab
AC
14192 ;
14193 return 0;
14194}
14195_ACEOF
81ecdfbb 14196if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
14197 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
14198else
81ecdfbb 14199 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
bec39cab 14200
97bf5e38 14201fi
81ecdfbb 14202rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 14203fi
c906108c 14204
97bf5e38 14205 if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
bec39cab 14206
81ecdfbb 14207$as_echo "#define HAVE_PR_SIGINFO64_T 1" >>confdefs.h
c906108c 14208
97bf5e38 14209 fi
81ecdfbb
RW
14210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&5
14211$as_echo "$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&6; }
bec39cab
AC
14212
14213
97bf5e38
MK
14214
14215
14216
97bf5e38 14217 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
81ecdfbb
RW
14218 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether prfpregset_t type is broken" >&5
14219$as_echo_n "checking whether prfpregset_t type is broken... " >&6; }
14220 if test "${gdb_cv_prfpregset_t_broken+set}" = set; then :
14221 $as_echo_n "(cached) " >&6
c906108c 14222else
81ecdfbb 14223 if test "$cross_compiling" = yes; then :
97bf5e38 14224 gdb_cv_prfpregset_t_broken=yes
c906108c 14225else
81ecdfbb 14226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14227/* end confdefs.h. */
97bf5e38
MK
14228#include <sys/procfs.h>
14229 int main ()
14230 {
14231 if (sizeof (prfpregset_t) == sizeof (void *))
14232 return 1;
14233 return 0;
14234 }
bec39cab 14235_ACEOF
81ecdfbb 14236if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 14237 gdb_cv_prfpregset_t_broken=no
81ecdfbb
RW
14238else
14239 gdb_cv_prfpregset_t_broken=yes
c906108c 14240fi
81ecdfbb
RW
14241rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14242 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 14243fi
81ecdfbb 14244
c906108c
SS
14245fi
14246
81ecdfbb
RW
14247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_prfpregset_t_broken" >&5
14248$as_echo "$gdb_cv_prfpregset_t_broken" >&6; }
97bf5e38 14249 if test $gdb_cv_prfpregset_t_broken = yes; then
60ca704f 14250
81ecdfbb 14251$as_echo "#define PRFPREGSET_T_BROKEN 1" >>confdefs.h
c906108c 14252
97bf5e38
MK
14253 fi
14254 fi
c906108c 14255fi
c906108c 14256
bc8bcb4b 14257# Check if the compiler supports the `long long' type.
c906108c 14258
81ecdfbb
RW
14259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
14260$as_echo_n "checking for long long support in compiler... " >&6; }
14261if test "${gdb_cv_c_long_long+set}" = set; then :
14262 $as_echo_n "(cached) " >&6
97bf5e38 14263else
81ecdfbb 14264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14265/* end confdefs.h. */
bc8bcb4b 14266extern long long foo;
bec39cab
AC
14267int
14268main ()
14269{
bc8bcb4b 14270switch (foo & 2) { case 0: return 1; }
bec39cab
AC
14271 ;
14272 return 0;
14273}
14274_ACEOF
81ecdfbb 14275if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
14276 gdb_cv_c_long_long=yes
14277else
81ecdfbb 14278 gdb_cv_c_long_long=no
97bf5e38 14279fi
81ecdfbb 14280rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 14281fi
81ecdfbb
RW
14282{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
14283$as_echo "$gdb_cv_c_long_long" >&6; }
74a0d9f6
JK
14284if test $gdb_cv_c_long_long != yes; then
14285 # libdecnumber requires long long.
14286 as_fn_error "Compiler must support long long for GDB." "$LINENO" 5
97bf5e38
MK
14287fi
14288
bc8bcb4b 14289# Check if the compiler and runtime support printing long longs.
97bf5e38 14290
81ecdfbb
RW
14291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
14292$as_echo_n "checking for long long support in printf... " >&6; }
14293if test "${gdb_cv_printf_has_long_long+set}" = set; then :
14294 $as_echo_n "(cached) " >&6
97bf5e38 14295else
81ecdfbb 14296 if test "$cross_compiling" = yes; then :
97bf5e38
MK
14297 gdb_cv_printf_has_long_long=no
14298else
81ecdfbb 14299 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14300/* end confdefs.h. */
bc8bcb4b
MK
14301$ac_includes_default
14302int
14303main ()
14304{
14305char buf[32];
97bf5e38
MK
14306 long long l = 0;
14307 l = (l << 16) + 0x0123;
14308 l = (l << 16) + 0x4567;
14309 l = (l << 16) + 0x89ab;
14310 l = (l << 16) + 0xcdef;
14311 sprintf (buf, "0x%016llx", l);
14312 return (strcmp ("0x0123456789abcdef", buf));
bc8bcb4b
MK
14313 ;
14314 return 0;
c906108c 14315}
bec39cab 14316_ACEOF
81ecdfbb 14317if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
14318 gdb_cv_printf_has_long_long=yes
14319else
81ecdfbb 14320 gdb_cv_printf_has_long_long=no
97bf5e38 14321fi
81ecdfbb
RW
14322rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14323 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 14324fi
81ecdfbb 14325
97bf5e38 14326fi
81ecdfbb
RW
14327{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
14328$as_echo "$gdb_cv_printf_has_long_long" >&6; }
97bf5e38 14329if test $gdb_cv_printf_has_long_long = yes; then
bc8bcb4b 14330
81ecdfbb 14331$as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
97bf5e38
MK
14332
14333fi
97bf5e38 14334
1a619819
LM
14335# Check if the compiler and runtime support printing decfloats.
14336
81ecdfbb
RW
14337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
14338$as_echo_n "checking for decfloat support in printf... " >&6; }
14339if test "${gdb_cv_printf_has_decfloat+set}" = set; then :
14340 $as_echo_n "(cached) " >&6
1a619819 14341else
81ecdfbb 14342 if test "$cross_compiling" = yes; then :
1a619819
LM
14343 gdb_cv_printf_has_decfloat=no
14344else
81ecdfbb 14345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1a619819
LM
14346/* end confdefs.h. */
14347$ac_includes_default
14348int
14349main ()
14350{
14351char buf[64];
14352 _Decimal32 d32 = 1.2345df;
14353 _Decimal64 d64 = 1.2345dd;
14354 _Decimal128 d128 = 1.2345dl;
14355 sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
14356 return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
14357 ;
14358 return 0;
14359}
14360_ACEOF
81ecdfbb 14361if ac_fn_c_try_run "$LINENO"; then :
1a619819
LM
14362 gdb_cv_printf_has_decfloat=yes
14363else
81ecdfbb 14364 gdb_cv_printf_has_decfloat=no
1a619819 14365fi
81ecdfbb
RW
14366rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14367 conftest.$ac_objext conftest.beam conftest.$ac_ext
1a619819 14368fi
81ecdfbb 14369
1a619819 14370fi
81ecdfbb
RW
14371{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
14372$as_echo "$gdb_cv_printf_has_decfloat" >&6; }
1a619819
LM
14373if test $gdb_cv_printf_has_decfloat = yes; then
14374
81ecdfbb 14375$as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
1a619819
LM
14376
14377fi
14378
bc8bcb4b
MK
14379# Check if the compiler supports the `long double' type. We can't use
14380# AC_C_LONG_DOUBLE because that one does additional checks on the
14381# constants defined in <float.h> that fail on some systems,
14382# e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
97bf5e38 14383
81ecdfbb
RW
14384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
14385$as_echo_n "checking for long double support in compiler... " >&6; }
14386if test "${gdb_cv_c_long_double+set}" = set; then :
14387 $as_echo_n "(cached) " >&6
97bf5e38 14388else
81ecdfbb 14389 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14390/* end confdefs.h. */
97bf5e38 14391long double foo;
bec39cab 14392_ACEOF
81ecdfbb 14393if ac_fn_c_try_compile "$LINENO"; then :
bc8bcb4b 14394 gdb_cv_c_long_double=yes
97bf5e38 14395else
81ecdfbb 14396 gdb_cv_c_long_double=no
97bf5e38 14397fi
81ecdfbb 14398rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 14399fi
81ecdfbb
RW
14400{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
14401$as_echo "$gdb_cv_c_long_double" >&6; }
bc8bcb4b 14402if test $gdb_cv_c_long_double = yes; then
c906108c 14403
81ecdfbb 14404$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
14405
14406fi
14407
bc8bcb4b 14408# Check if the compiler and runtime support printing long doubles.
97bf5e38 14409
81ecdfbb
RW
14410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
14411$as_echo_n "checking for long double support in printf... " >&6; }
14412if test "${gdb_cv_printf_has_long_double+set}" = set; then :
14413 $as_echo_n "(cached) " >&6
97bf5e38 14414else
81ecdfbb 14415 if test "$cross_compiling" = yes; then :
97bf5e38
MK
14416 gdb_cv_printf_has_long_double=no
14417else
81ecdfbb 14418 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14419/* end confdefs.h. */
bc8bcb4b
MK
14420$ac_includes_default
14421int
14422main ()
14423{
14424char buf[16];
97bf5e38
MK
14425 long double f = 3.141592653;
14426 sprintf (buf, "%Lg", f);
14427 return (strncmp ("3.14159", buf, 7));
bc8bcb4b
MK
14428 ;
14429 return 0;
97bf5e38 14430}
bec39cab 14431_ACEOF
81ecdfbb 14432if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 14433 gdb_cv_printf_has_long_double=yes
c906108c 14434else
81ecdfbb 14435 gdb_cv_printf_has_long_double=no
c906108c 14436fi
81ecdfbb
RW
14437rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14438 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 14439fi
81ecdfbb 14440
c906108c 14441fi
81ecdfbb
RW
14442{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
14443$as_echo "$gdb_cv_printf_has_long_double" >&6; }
97bf5e38 14444if test $gdb_cv_printf_has_long_double = yes; then
bc8bcb4b 14445
81ecdfbb 14446$as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
14447
14448fi
97bf5e38 14449
bc8bcb4b 14450# Check if the compiler and runtime support scanning long doubles.
97bf5e38 14451
81ecdfbb
RW
14452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
14453$as_echo_n "checking for long double support in scanf... " >&6; }
14454if test "${gdb_cv_scanf_has_long_double+set}" = set; then :
14455 $as_echo_n "(cached) " >&6
97bf5e38 14456else
81ecdfbb 14457 if test "$cross_compiling" = yes; then :
97bf5e38
MK
14458 gdb_cv_scanf_has_long_double=no
14459else
81ecdfbb 14460 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14461/* end confdefs.h. */
bc8bcb4b
MK
14462#include <stdio.h>
14463int
14464main ()
14465{
14466char *buf = "3.141592653";
97bf5e38
MK
14467 long double f = 0;
14468 sscanf (buf, "%Lg", &f);
14469 return !(f > 3.14159 && f < 3.14160);
bc8bcb4b
MK
14470 ;
14471 return 0;
97bf5e38 14472}
bec39cab 14473_ACEOF
81ecdfbb 14474if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
14475 gdb_cv_scanf_has_long_double=yes
14476else
81ecdfbb 14477 gdb_cv_scanf_has_long_double=no
97bf5e38 14478fi
81ecdfbb
RW
14479rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14480 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 14481fi
81ecdfbb 14482
c906108c 14483fi
81ecdfbb
RW
14484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
14485$as_echo "$gdb_cv_scanf_has_long_double" >&6; }
97bf5e38 14486if test $gdb_cv_scanf_has_long_double = yes; then
bc8bcb4b 14487
81ecdfbb 14488$as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
14489
14490fi
c906108c 14491
438013df
AO
14492case ${host_os} in
14493aix*)
81ecdfbb
RW
14494 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
14495$as_echo_n "checking for -bbigtoc option... " >&6; }
14496if test "${gdb_cv_bigtoc+set}" = set; then :
14497 $as_echo_n "(cached) " >&6
438013df 14498else
bec39cab 14499
438013df
AO
14500 SAVE_LDFLAGS=$LDFLAGS
14501
14502 case $GCC in
14503 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
14504 *) gdb_cv_bigtoc=-bbigtoc ;;
14505 esac
14506
14507 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
81ecdfbb 14508 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14509/* end confdefs.h. */
438013df 14510
bec39cab
AC
14511int
14512main ()
14513{
438013df 14514int i;
bec39cab
AC
14515 ;
14516 return 0;
14517}
14518_ACEOF
81ecdfbb 14519if ac_fn_c_try_link "$LINENO"; then :
bec39cab 14520
81ecdfbb
RW
14521else
14522 gdb_cv_bigtoc=
438013df 14523fi
81ecdfbb
RW
14524rm -f core conftest.err conftest.$ac_objext \
14525 conftest$ac_exeext conftest.$ac_ext
ec76baa5 14526 LDFLAGS="${SAVE_LDFLAGS}"
438013df 14527
bec39cab 14528fi
81ecdfbb
RW
14529{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
14530$as_echo "$gdb_cv_bigtoc" >&6; }
438013df
AO
14531 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
14532 ;;
14533esac
14534
38f6b338 14535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
f6528abd 14536$as_echo_n "checking for the dynamic export flag... " >&6; }
38f6b338
JK
14537dynamic_list=false
14538if test "${gdb_native}" = yes; then
14539 # The dynamically loaded libthread_db needs access to symbols in the gdb
14540 # executable. Older GNU ld supports --export-dynamic but --dynamic-list
14541 # may not be supported there.
14542 old_LDFLAGS="$LDFLAGS"
14543 # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
14544 RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
14545 LDFLAGS="$LDFLAGS $RDYNAMIC"
14546 if test "${have_libpython}" = no; then
14547 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f6528abd
JK
14548/* end confdefs.h. */
14549
14550int
14551main ()
14552{
14553
14554 ;
14555 return 0;
14556}
14557_ACEOF
14558if ac_fn_c_try_link "$LINENO"; then :
3bebe2f2
JK
14559 dynamic_list=true
14560fi
14561rm -f core conftest.err conftest.$ac_objext \
14562 conftest$ac_exeext conftest.$ac_ext
38f6b338
JK
14563 else
14564 # Workaround http://bugs.python.org/issue4434 where static
14565 # libpythonX.Y.a would get its symbols required for
14566 # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
14567 # Problem does not happen for the recommended libpythonX.Y.so linkage.
a4a1c157
PA
14568
14569 # Note the workaround for Python
14570 # http://bugs.python.org/issue10112 earlier has removed
14571 # -export-dynamic from PYTHON_LIBS. That's exactly what we want
14572 # here too, as otherwise it'd make this -Wl,--dynamic-list test
14573 # always pass.
38f6b338
JK
14574 old_CFLAGS="$CFLAGS"
14575 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
8c1fb155
JK
14576 old_LIBS="$LIBS"
14577 LIBS="$LIBS $PYTHON_LIBS"
1b4f615e
PA
14578 old_CPPFLAGS="$CPPFLAGS"
14579 CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
38f6b338 14580 if test "$cross_compiling" = yes; then :
3bebe2f2 14581 true
f6528abd 14582else
3bebe2f2
JK
14583 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14584/* end confdefs.h. */
1b4f615e 14585#include "Python.h"
3bebe2f2
JK
14586int
14587main ()
14588{
14589int err;
38f6b338
JK
14590 Py_Initialize ();
14591 err = PyRun_SimpleString ("import itertools\n");
14592 Py_Finalize ();
14593 return err == 0 ? 0 : 1;
3bebe2f2
JK
14594 ;
14595 return 0;
14596}
14597_ACEOF
14598if ac_fn_c_try_run "$LINENO"; then :
14599 dynamic_list=true
14600fi
14601rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14602 conftest.$ac_objext conftest.beam conftest.$ac_ext
14603fi
14604
8c1fb155 14605 LIBS="$old_LIBS"
38f6b338 14606 CFLAGS="$old_CFLAGS"
1b4f615e 14607 CPPFLAGS="$old_CPPFLAGS"
38f6b338
JK
14608 fi
14609 LDFLAGS="$old_LDFLAGS"
14610fi
14611if $dynamic_list; then
14612 found="-Wl,--dynamic-list"
14613 RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
f6528abd 14614else
38f6b338
JK
14615 found="-rdynamic"
14616 RDYNAMIC="-rdynamic"
f6528abd 14617fi
f6528abd 14618
38f6b338 14619{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
f6528abd 14620$as_echo "$found" >&6; }
0407b3f1 14621
f6528abd 14622
0407b3f1 14623if test ${build} = ${host} -a ${host} = ${target} ; then
c906108c 14624 case ${host_os} in
d92419e5 14625 aix*)
81ecdfbb
RW
14626 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
14627$as_echo_n "checking for AiX thread debugging library... " >&6; }
14628 if test "${gdb_cv_have_aix_thread_debug+set}" = set; then :
14629 $as_echo_n "(cached) " >&6
bec39cab 14630else
81ecdfbb 14631 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14632/* end confdefs.h. */
d92419e5 14633#include <sys/pthdebug.h>
bec39cab
AC
14634int
14635main ()
14636{
d92419e5
JB
14637#ifndef PTHDB_VERSION_3
14638 #error
14639 #endif
bec39cab
AC
14640 ;
14641 return 0;
14642}
14643_ACEOF
81ecdfbb 14644if ac_fn_c_try_compile "$LINENO"; then :
d92419e5
JB
14645 gdb_cv_have_aix_thread_debug=yes
14646else
81ecdfbb 14647 gdb_cv_have_aix_thread_debug=no
d92419e5 14648fi
81ecdfbb 14649rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d92419e5
JB
14650fi
14651
81ecdfbb
RW
14652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
14653$as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
d92419e5
JB
14654 if test $gdb_cv_have_aix_thread_debug = yes; then
14655 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
3483b318 14656 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
7f533142 14657 LIBS="$LIBS -lpthdebug"
d645e32e
JB
14658
14659 # Older versions of AIX do not provide the declaration for
14660 # the getthrds function (it appears that it was introduced
14661 # with AIX 6.x).
14662 ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h>
14663"
14664if test "x$ac_cv_have_decl_getthrds" = x""yes; then :
14665 ac_have_decl=1
14666else
14667 ac_have_decl=0
14668fi
14669
14670cat >>confdefs.h <<_ACEOF
14671#define HAVE_DECL_GETTHRDS $ac_have_decl
14672_ACEOF
14673
d92419e5
JB
14674 fi
14675 ;;
c906108c 14676 esac
bec39cab 14677
c906108c
SS
14678fi
14679
3f47be5c 14680if test "x$ac_cv_header_thread_db_h" = "xyes"; then
81ecdfbb
RW
14681 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
14682$as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
14683if test "${gdb_cv_thread_db_h_has_td_notalloc+set}" = set; then :
14684 $as_echo_n "(cached) " >&6
bec39cab 14685else
81ecdfbb 14686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14687/* end confdefs.h. */
3f47be5c 14688#include <thread_db.h>
bec39cab
AC
14689int
14690main ()
14691{
3f47be5c 14692int i = TD_NOTALLOC;
bec39cab
AC
14693 ;
14694 return 0;
14695}
14696_ACEOF
81ecdfbb 14697if ac_fn_c_try_compile "$LINENO"; then :
3f47be5c
EZ
14698 gdb_cv_thread_db_h_has_td_notalloc=yes
14699else
81ecdfbb 14700 gdb_cv_thread_db_h_has_td_notalloc=no
bec39cab 14701
3f47be5c 14702fi
81ecdfbb 14703rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3f47be5c 14704
bec39cab 14705fi
81ecdfbb
RW
14706{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
14707$as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
14708 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
14709$as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
14710if test "${gdb_cv_thread_db_h_has_td_version+set}" = set; then :
14711 $as_echo_n "(cached) " >&6
59f80f10 14712else
81ecdfbb 14713 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
14714/* end confdefs.h. */
14715#include <thread_db.h>
14716int
14717main ()
14718{
14719int i = TD_VERSION;
14720 ;
14721 return 0;
14722}
14723_ACEOF
81ecdfbb 14724if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
14725 gdb_cv_thread_db_h_has_td_version=yes
14726else
81ecdfbb 14727 gdb_cv_thread_db_h_has_td_version=no
59f80f10
DJ
14728
14729fi
81ecdfbb 14730rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
14731
14732fi
81ecdfbb
RW
14733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
14734$as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
14735 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
14736$as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
14737if test "${gdb_cv_thread_db_h_has_td_notls+set}" = set; then :
14738 $as_echo_n "(cached) " >&6
59f80f10 14739else
81ecdfbb 14740 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
14741/* end confdefs.h. */
14742#include <thread_db.h>
14743int
14744main ()
14745{
14746int i = TD_NOTLS;
14747 ;
14748 return 0;
14749}
14750_ACEOF
81ecdfbb 14751if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
14752 gdb_cv_thread_db_h_has_td_notls=yes
14753else
81ecdfbb 14754 gdb_cv_thread_db_h_has_td_notls=no
59f80f10
DJ
14755
14756fi
81ecdfbb 14757rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
14758
14759fi
81ecdfbb
RW
14760{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
14761$as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
3f47be5c
EZ
14762fi
14763if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
bec39cab 14764
81ecdfbb 14765$as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
3f47be5c 14766
59f80f10
DJ
14767fi
14768if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
14769
81ecdfbb 14770$as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
59f80f10
DJ
14771
14772fi
14773if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
14774
81ecdfbb 14775$as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
59f80f10 14776
3f47be5c
EZ
14777fi
14778
81ecdfbb
RW
14779ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
14780"
14781if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = x""yes; then :
14782 ac_have_decl=1
10568435 14783else
81ecdfbb 14784 ac_have_decl=0
10568435 14785fi
10568435
JK
14786
14787cat >>confdefs.h <<_ACEOF
81ecdfbb 14788#define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
10568435
JK
14789_ACEOF
14790
14791
81ecdfbb
RW
14792if test "$cross_compiling" = yes; then :
14793 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
14794/* end confdefs.h. */
14795#include <sys/personality.h>
14796int
14797main ()
14798{
14799
14800# if !HAVE_DECL_ADDR_NO_RANDOMIZE
14801# define ADDR_NO_RANDOMIZE 0x0040000
14802# endif
14803 /* Test the flag could be set and stays set. */
14804 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
14805 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
14806 return 1
14807 ;
14808 return 0;
14809}
14810_ACEOF
81ecdfbb 14811if ac_fn_c_try_link "$LINENO"; then :
10568435
JK
14812 have_personality=true
14813else
81ecdfbb 14814 have_personality=false
10568435 14815fi
81ecdfbb
RW
14816rm -f core conftest.err conftest.$ac_objext \
14817 conftest$ac_exeext conftest.$ac_ext
10568435 14818else
81ecdfbb 14819 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
14820/* end confdefs.h. */
14821#include <sys/personality.h>
14822int
14823main ()
14824{
14825
14826# if !HAVE_DECL_ADDR_NO_RANDOMIZE
14827# define ADDR_NO_RANDOMIZE 0x0040000
14828# endif
14829 /* Test the flag could be set and stays set. */
14830 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
14831 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
14832 return 1
14833 ;
14834 return 0;
14835}
14836_ACEOF
81ecdfbb 14837if ac_fn_c_try_run "$LINENO"; then :
10568435
JK
14838 have_personality=true
14839else
81ecdfbb 14840 have_personality=false
10568435 14841fi
81ecdfbb
RW
14842rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14843 conftest.$ac_objext conftest.beam conftest.$ac_ext
10568435 14844fi
81ecdfbb 14845
10568435
JK
14846if $have_personality
14847then
14848
81ecdfbb 14849$as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
10568435
JK
14850
14851fi
14852
e655c1a2
PA
14853case $host_os in
14854 go32* | *djgpp*)
14855 gdbinit=gdb.ini
14856 ;;
14857 *)
14858 gdbinit=.gdbinit
14859 ;;
14860esac
14861
14862cat >>confdefs.h <<_ACEOF
14863#define GDBINIT "$gdbinit"
14864_ACEOF
14865
14866
fb40c209 14867
f83d8a90
DE
14868# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
14869# except that the argument to --with-sysroot is optional.
14870# --with-sysroot (or --with-sysroot=yes) sets the default sysroot path.
14871if test "x$with_sysroot" = xyes; then
14872 with_sysroot="${exec_prefix}/${target_alias}/sys-root"
14873fi
bec39cab 14874
81ecdfbb
RW
14875# Check whether --with-sysroot was given.
14876if test "${with_sysroot+set}" = set; then :
f83d8a90
DE
14877 withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval
14878else
14879 TARGET_SYSTEM_ROOT=
14880fi
030292b7 14881
030292b7 14882
f83d8a90
DE
14883 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
14884 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14885 ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT`
14886 ac_define_dir=`eval echo $ac_define_dir`
030292b7 14887
f83d8a90
DE
14888cat >>confdefs.h <<_ACEOF
14889#define TARGET_SYSTEM_ROOT "$ac_define_dir"
14890_ACEOF
bec39cab 14891
030292b7 14892
b14b1491 14893
f83d8a90
DE
14894
14895 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
14896 if test "x$prefix" = xNONE; then
14897 test_prefix=/usr/local
14898 else
14899 test_prefix=$prefix
14900 fi
14901 else
14902 test_prefix=$exec_prefix
14903 fi
14904 value=0
14905 case ${ac_define_dir} in
14906 "${test_prefix}"|"${test_prefix}/"*|\
14907 '${exec_prefix}'|'${exec_prefix}/'*)
14908 value=1
14909 ;;
14910 esac
14911
14912cat >>confdefs.h <<_ACEOF
14913#define TARGET_SYSTEM_ROOT_RELOCATABLE $value
14914_ACEOF
030292b7
DJ
14915
14916
14917
16e7150e 14918
16e7150e 14919
81ecdfbb
RW
14920# Check whether --with-system-gdbinit was given.
14921if test "${with_system_gdbinit+set}" = set; then :
14922 withval=$with_system_gdbinit;
b14b1491
TT
14923 SYSTEM_GDBINIT=$withval
14924else
14925 SYSTEM_GDBINIT=
81ecdfbb
RW
14926fi
14927
16e7150e
JG
14928
14929 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
14930 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 14931 ac_define_dir=`eval echo $SYSTEM_GDBINIT`
16e7150e
JG
14932 ac_define_dir=`eval echo $ac_define_dir`
14933
14934cat >>confdefs.h <<_ACEOF
14935#define SYSTEM_GDBINIT "$ac_define_dir"
14936_ACEOF
14937
14938
14939
0c4a4063 14940
b14b1491
TT
14941 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
14942 if test "x$prefix" = xNONE; then
14943 test_prefix=/usr/local
14944 else
14945 test_prefix=$prefix
14946 fi
14947 else
14948 test_prefix=$exec_prefix
14949 fi
14950 value=0
14951 case ${ac_define_dir} in
14952 "${test_prefix}"|"${test_prefix}/"*|\
14953 '${exec_prefix}'|'${exec_prefix}/'*)
14954 value=1
14955 ;;
14956 esac
16e7150e 14957
b14b1491
TT
14958cat >>confdefs.h <<_ACEOF
14959#define SYSTEM_GDBINIT_RELOCATABLE $value
16e7150e
JG
14960_ACEOF
14961
b14b1491 14962
16e7150e 14963
0c4a4063 14964
b835bb52 14965
81ecdfbb
RW
14966# Check whether --enable-werror was given.
14967if test "${enable_werror+set}" = set; then :
14968 enableval=$enable_werror; case "${enableval}" in
094a342e
MK
14969 yes | y) ERROR_ON_WARNING="yes" ;;
14970 no | n) ERROR_ON_WARNING="no" ;;
81ecdfbb 14971 *) as_fn_error "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
094a342e 14972 esac
81ecdfbb
RW
14973fi
14974
094a342e 14975
9a084706
PA
14976# Enable -Werror by default when using gcc. Turn it off for releases.
14977if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
094a342e
MK
14978 ERROR_ON_WARNING=yes
14979fi
14980
14981WERROR_CFLAGS=""
14982if test "${ERROR_ON_WARNING}" = yes ; then
14983 WERROR_CFLAGS="-Werror"
14984fi
14985
cf6de44d 14986# The options we'll try to enable.
aac331e4 14987build_warnings="-Wall -Wpointer-arith \
1cb5e2a4 14988-Wno-unused -Wunused-value -Wunused-function \
aac331e4 14989-Wno-switch -Wno-char-subscripts \
cf6de44d 14990-Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \
8465943a
SM
14991-Wno-sign-compare -Wno-narrowing -Wno-error=maybe-uninitialized \
14992-Wno-mismatched-tags"
3bc3d82a 14993
3526781e 14994case "${host}" in
4fa7574e
RO
14995 *-*-mingw32*)
14996 # Enable -Wno-format by default when using gcc on mingw since many
14997 # GCC versions complain about %I64.
14998 build_warnings="$build_warnings -Wno-format" ;;
14999 *-*-solaris*)
15000 # Solaris 11.4 <python2.7/ceval.h> uses #pragma no_inline that GCC
15001 # doesn't understand.
15002 build_warnings="$build_warnings -Wno-unknown-pragmas"
15003 # Solaris 11 <unistd.h> marks vfork deprecated.
15004 build_warnings="$build_warnings -Wno-deprecated-declarations" ;;
d3685d60 15005 *) build_warnings="$build_warnings -Wformat-nonliteral" ;;
3526781e
DJ
15006esac
15007
81ecdfbb
RW
15008# Check whether --enable-build-warnings was given.
15009if test "${enable_build_warnings+set}" = set; then :
15010 enableval=$enable_build_warnings; case "${enableval}" in
c906108c
SS
15011 yes) ;;
15012 no) build_warnings="-w";;
15013 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15014 build_warnings="${build_warnings} ${t}";;
15015 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15016 build_warnings="${t} ${build_warnings}";;
15017 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
15018esac
d4f3574e 15019if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 15020 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 15021fi
81ecdfbb
RW
15022fi
15023# Check whether --enable-gdb-build-warnings was given.
15024if test "${enable_gdb_build_warnings+set}" = set; then :
15025 enableval=$enable_gdb_build_warnings; case "${enableval}" in
3b851bce
AC
15026 yes) ;;
15027 no) build_warnings="-w";;
15028 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15029 build_warnings="${build_warnings} ${t}";;
15030 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15031 build_warnings="${t} ${build_warnings}";;
15032 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
15033esac
15034if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
15035 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
15036fi
81ecdfbb 15037fi
3bc3d82a
PA
15038
15039# The set of warnings supported by a C++ compiler is not the same as
15040# of the C compiler.
cf6de44d 15041ac_ext=cpp
3bc3d82a
PA
15042ac_cpp='$CXXCPP $CPPFLAGS'
15043ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15044ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15045ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15046
3bc3d82a 15047
81ecdfbb 15048WARN_CFLAGS=""
c906108c
SS
15049if test "x${build_warnings}" != x -a "x$GCC" = xyes
15050then
81ecdfbb
RW
15051 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
15052$as_echo_n "checking compiler warning flags... " >&6; }
746a987d
AC
15053 # Separate out the -Werror flag as some files just cannot be
15054 # compiled with it enabled.
15055 for w in ${build_warnings}; do
7544db95
PA
15056 # GCC does not complain about -Wno-unknown-warning. Invert
15057 # and test -Wunknown-warning instead.
15058 case $w in
15059 -Wno-*)
15060 wtest=`echo $w | sed 's/-Wno-/-W/g'` ;;
15061 *)
15062 wtest=$w ;;
15063 esac
15064
746a987d
AC
15065 case $w in
15066 -Werr*) WERROR_CFLAGS=-Werror ;;
3bc3d82a
PA
15067 *)
15068 # Check whether GCC accepts it.
4536bbc6 15069 saved_CFLAGS="$CFLAGS"
3e019bdc 15070 CFLAGS="$CFLAGS -Werror $wtest"
3bc3d82a 15071 saved_CXXFLAGS="$CXXFLAGS"
3e019bdc 15072 CXXFLAGS="$CXXFLAGS -Werror $wtest"
54019719 15073 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15074/* end confdefs.h. */
4536bbc6 15075
bec39cab
AC
15076int
15077main ()
15078{
4536bbc6 15079
bec39cab
AC
15080 ;
15081 return 0;
15082}
15083_ACEOF
3bc3d82a 15084if ac_fn_cxx_try_compile "$LINENO"; then :
4536bbc6 15085 WARN_CFLAGS="${WARN_CFLAGS} $w"
4536bbc6 15086fi
81ecdfbb 15087rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4536bbc6 15088 CFLAGS="$saved_CFLAGS"
3bc3d82a 15089 CXXFLAGS="$saved_CXXFLAGS"
746a987d
AC
15090 esac
15091 done
81ecdfbb
RW
15092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
15093$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
c906108c
SS
15094fi
15095
15096
104c1213 15097
cf6de44d 15098ac_ext=c
3bc3d82a
PA
15099ac_cpp='$CPP $CPPFLAGS'
15100ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15101ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15102ac_compiler_gnu=$ac_cv_c_compiler_gnu
15103
3bc3d82a 15104
b835bb52 15105
7a292a7a 15106# In the Cygwin environment, we need some additional flags.
81ecdfbb
RW
15107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
15108$as_echo_n "checking for cygwin... " >&6; }
15109if test "${gdb_cv_os_cygwin+set}" = set; then :
15110 $as_echo_n "(cached) " >&6
bec39cab 15111else
81ecdfbb 15112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15113/* end confdefs.h. */
7a292a7a
SS
15114
15115#if defined (__CYGWIN__) || defined (__CYGWIN32__)
15116lose
15117#endif
bec39cab 15118_ACEOF
7a292a7a 15119if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
92a021de 15120 $EGREP "^lose$" >/dev/null 2>&1; then :
7a292a7a
SS
15121 gdb_cv_os_cygwin=yes
15122else
7a292a7a
SS
15123 gdb_cv_os_cygwin=no
15124fi
15125rm -f conftest*
15126
15127fi
81ecdfbb
RW
15128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
15129$as_echo "$gdb_cv_os_cygwin" >&6; }
7a292a7a 15130
aff38e61 15131
3eb25fda 15132SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
aff38e61 15133case ${host} in
95cbc983
AC
15134 *go32* ) SER_HARDWIRE=ser-go32.o ;;
15135 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
0ea3f30e 15136 *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
aff38e61
AC
15137esac
15138
15139
cd0fc7c3
SS
15140# libreadline needs libuser32.a in a cygwin environment
15141WIN32LIBS=
15142if test x$gdb_cv_os_cygwin = xyes; then
c5394b80
JM
15143 WIN32LIBS="-luser32"
15144 case "${target}" in
15145 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
15146 ;;
15147 esac
cd0fc7c3 15148fi
c906108c 15149
b4505029
MM
15150# The ser-tcp.c module requires sockets.
15151case ${host} in
15152 *mingw32*)
15153
81ecdfbb 15154$as_echo "#define USE_WIN32API 1" >>confdefs.h
b4505029
MM
15155
15156 WIN32LIBS="$WIN32LIBS -lws2_32"
15157 ;;
15158esac
15159
7a292a7a 15160
31d99776 15161# Add ELF support to GDB, but only if BFD includes ELF support.
def63ff0
TT
15162
15163 OLD_CFLAGS=$CFLAGS
15164 OLD_LDFLAGS=$LDFLAGS
15165 OLD_LIBS=$LIBS
15166 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
15167 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
15168 # always want our bfd.
15169 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
5a2d4533
L
15170 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
15171 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
def63ff0 15172 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
711a72d3 15173 LIBS="-lbfd -liberty -lz $intl $LIBS"
def63ff0 15174 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
81ecdfbb
RW
15175$as_echo_n "checking for ELF support in BFD... " >&6; }
15176if test "${gdb_cv_var_elf+set}" = set; then :
15177 $as_echo_n "(cached) " >&6
31d99776 15178else
81ecdfbb 15179 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31d99776
DJ
15180/* end confdefs.h. */
15181#include <stdlib.h>
def63ff0
TT
15182 #include "bfd.h"
15183 #include "elf-bfd.h"
31d99776
DJ
15184
15185int
15186main ()
15187{
def63ff0 15188return bfd_get_elf_phdr_upper_bound (NULL);
31d99776
DJ
15189 ;
15190 return 0;
15191}
15192_ACEOF
81ecdfbb 15193if ac_fn_c_try_link "$LINENO"; then :
31d99776
DJ
15194 gdb_cv_var_elf=yes
15195else
81ecdfbb 15196 gdb_cv_var_elf=no
31d99776 15197fi
81ecdfbb
RW
15198rm -f core conftest.err conftest.$ac_objext \
15199 conftest$ac_exeext conftest.$ac_ext
31d99776 15200fi
81ecdfbb
RW
15201{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
15202$as_echo "$gdb_cv_var_elf" >&6; }
def63ff0
TT
15203 CFLAGS=$OLD_CFLAGS
15204 LDFLAGS=$OLD_LDFLAGS
15205 LIBS=$OLD_LIBS
31d99776 15206if test $gdb_cv_var_elf = yes; then
d4777acb 15207 CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o dtrace-probe.o"
31d99776 15208
81ecdfbb 15209$as_echo "#define HAVE_ELF 1" >>confdefs.h
31d99776 15210
075ff26d
JK
15211 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
15212 if test "$plugins" = "yes"; then
a48b32c0
L
15213 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
15214$as_echo_n "checking for library containing dlopen... " >&6; }
15215if test "${ac_cv_search_dlopen+set}" = set; then :
15216 $as_echo_n "(cached) " >&6
15217else
15218 ac_func_search_save_LIBS=$LIBS
15219cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15220/* end confdefs.h. */
15221
15222/* Override any GCC internal prototype to avoid an error.
15223 Use char because int might match the return type of a GCC
15224 builtin and then its argument prototype would still apply. */
15225#ifdef __cplusplus
15226extern "C"
15227#endif
15228char dlopen ();
15229int
15230main ()
15231{
15232return dlopen ();
15233 ;
15234 return 0;
15235}
15236_ACEOF
15237for ac_lib in '' dl; do
15238 if test -z "$ac_lib"; then
15239 ac_res="none required"
15240 else
15241 ac_res=-l$ac_lib
15242 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
15243 fi
15244 if ac_fn_c_try_link "$LINENO"; then :
15245 ac_cv_search_dlopen=$ac_res
15246fi
15247rm -f core conftest.err conftest.$ac_objext \
15248 conftest$ac_exeext
15249 if test "${ac_cv_search_dlopen+set}" = set; then :
15250 break
15251fi
15252done
15253if test "${ac_cv_search_dlopen+set}" = set; then :
15254
15255else
15256 ac_cv_search_dlopen=no
15257fi
15258rm conftest.$ac_ext
15259LIBS=$ac_func_search_save_LIBS
15260fi
15261{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
15262$as_echo "$ac_cv_search_dlopen" >&6; }
15263ac_res=$ac_cv_search_dlopen
15264if test "$ac_res" != no; then :
15265 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15266
15267fi
15268
075ff26d 15269 fi
31d99776 15270fi
31d99776 15271
4f05add4
TT
15272# Add macho support to GDB, but only if BFD includes it.
15273
15274 OLD_CFLAGS=$CFLAGS
15275 OLD_LDFLAGS=$LDFLAGS
15276 OLD_LIBS=$LIBS
15277 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
15278 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
15279 # always want our bfd.
15280 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
5a2d4533
L
15281 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
15282 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
4f05add4 15283 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
711a72d3 15284 LIBS="-lbfd -liberty -lz $intl $LIBS"
4f05add4
TT
15285 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5
15286$as_echo_n "checking for Mach-O support in BFD... " >&6; }
15287if test "${gdb_cv_var_macho+set}" = set; then :
15288 $as_echo_n "(cached) " >&6
15289else
15290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15291/* end confdefs.h. */
15292#include <stdlib.h>
15293 #include "bfd.h"
15294 #include "mach-o.h"
15295
15296int
15297main ()
15298{
15299return bfd_mach_o_lookup_command (NULL, 0, NULL);
15300 ;
15301 return 0;
15302}
15303_ACEOF
15304if ac_fn_c_try_link "$LINENO"; then :
15305 gdb_cv_var_macho=yes
15306else
15307 gdb_cv_var_macho=no
15308fi
15309rm -f core conftest.err conftest.$ac_objext \
15310 conftest$ac_exeext conftest.$ac_ext
15311fi
15312{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5
15313$as_echo "$gdb_cv_var_macho" >&6; }
15314 CFLAGS=$OLD_CFLAGS
15315 LDFLAGS=$OLD_LDFLAGS
15316 LIBS=$OLD_LIBS
15317if test $gdb_cv_var_macho = yes; then
15318 CONFIG_OBS="$CONFIG_OBS machoread.o"
15319fi
15320
121ce6e5
DJ
15321# Add any host-specific objects to GDB.
15322CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
15323
608e2dbb
TT
15324# If building on ELF, look for lzma support for embedded compressed debug info.
15325if test $gdb_cv_var_elf = yes; then
15326
15327# Check whether --with-lzma was given.
15328if test "${with_lzma+set}" = set; then :
15329 withval=$with_lzma;
15330else
15331 with_lzma=auto
15332fi
15333
15334 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5
15335$as_echo_n "checking whether to use lzma... " >&6; }
15336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5
15337$as_echo "$with_lzma" >&6; }
15338
15339 if test "${with_lzma}" != no; then
15340
15341
15342
15343
15344
15345
15346
15347
15348 use_additional=yes
15349
15350 acl_save_prefix="$prefix"
15351 prefix="$acl_final_prefix"
15352 acl_save_exec_prefix="$exec_prefix"
15353 exec_prefix="$acl_final_exec_prefix"
15354
15355 eval additional_includedir=\"$includedir\"
15356 eval additional_libdir=\"$libdir\"
15357
15358 exec_prefix="$acl_save_exec_prefix"
15359 prefix="$acl_save_prefix"
15360
15361
15362# Check whether --with-liblzma-prefix was given.
15363if test "${with_liblzma_prefix+set}" = set; then :
15364 withval=$with_liblzma_prefix;
15365 if test "X$withval" = "Xno"; then
15366 use_additional=no
15367 else
15368 if test "X$withval" = "X"; then
15369
15370 acl_save_prefix="$prefix"
15371 prefix="$acl_final_prefix"
15372 acl_save_exec_prefix="$exec_prefix"
15373 exec_prefix="$acl_final_exec_prefix"
15374
15375 eval additional_includedir=\"$includedir\"
15376 eval additional_libdir=\"$libdir\"
15377
15378 exec_prefix="$acl_save_exec_prefix"
15379 prefix="$acl_save_prefix"
15380
15381 else
15382 additional_includedir="$withval/include"
15383 additional_libdir="$withval/lib"
15384 fi
15385 fi
15386
15387fi
15388
15389 LIBLZMA=
15390 LTLIBLZMA=
15391 INCLZMA=
15392 rpathdirs=
15393 ltrpathdirs=
15394 names_already_handled=
15395 names_next_round='lzma '
15396 while test -n "$names_next_round"; do
15397 names_this_round="$names_next_round"
15398 names_next_round=
15399 for name in $names_this_round; do
15400 already_handled=
15401 for n in $names_already_handled; do
15402 if test "$n" = "$name"; then
15403 already_handled=yes
15404 break
15405 fi
15406 done
15407 if test -z "$already_handled"; then
15408 names_already_handled="$names_already_handled $name"
15409 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
15410 eval value=\"\$HAVE_LIB$uppername\"
15411 if test -n "$value"; then
15412 if test "$value" = yes; then
15413 eval value=\"\$LIB$uppername\"
15414 test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value"
15415 eval value=\"\$LTLIB$uppername\"
15416 test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value"
15417 else
15418 :
15419 fi
15420 else
15421 found_dir=
15422 found_la=
15423 found_so=
15424 found_a=
15425 if test $use_additional = yes; then
15426 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
15427 found_dir="$additional_libdir"
15428 found_so="$additional_libdir/lib$name.$shlibext"
15429 if test -f "$additional_libdir/lib$name.la"; then
15430 found_la="$additional_libdir/lib$name.la"
15431 fi
15432 else
15433 if test -f "$additional_libdir/lib$name.$libext"; then
15434 found_dir="$additional_libdir"
15435 found_a="$additional_libdir/lib$name.$libext"
15436 if test -f "$additional_libdir/lib$name.la"; then
15437 found_la="$additional_libdir/lib$name.la"
15438 fi
15439 fi
15440 fi
15441 fi
15442 if test "X$found_dir" = "X"; then
15443 for x in $LDFLAGS $LTLIBLZMA; do
15444
15445 acl_save_prefix="$prefix"
15446 prefix="$acl_final_prefix"
15447 acl_save_exec_prefix="$exec_prefix"
15448 exec_prefix="$acl_final_exec_prefix"
15449 eval x=\"$x\"
15450 exec_prefix="$acl_save_exec_prefix"
15451 prefix="$acl_save_prefix"
15452
15453 case "$x" in
15454 -L*)
15455 dir=`echo "X$x" | sed -e 's/^X-L//'`
15456 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
15457 found_dir="$dir"
15458 found_so="$dir/lib$name.$shlibext"
15459 if test -f "$dir/lib$name.la"; then
15460 found_la="$dir/lib$name.la"
15461 fi
15462 else
15463 if test -f "$dir/lib$name.$libext"; then
15464 found_dir="$dir"
15465 found_a="$dir/lib$name.$libext"
15466 if test -f "$dir/lib$name.la"; then
15467 found_la="$dir/lib$name.la"
15468 fi
15469 fi
15470 fi
15471 ;;
15472 esac
15473 if test "X$found_dir" != "X"; then
15474 break
15475 fi
15476 done
15477 fi
15478 if test "X$found_dir" != "X"; then
15479 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name"
15480 if test "X$found_so" != "X"; then
15481 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
15482 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
15483 else
15484 haveit=
15485 for x in $ltrpathdirs; do
15486 if test "X$x" = "X$found_dir"; then
15487 haveit=yes
15488 break
15489 fi
15490 done
15491 if test -z "$haveit"; then
15492 ltrpathdirs="$ltrpathdirs $found_dir"
15493 fi
15494 if test "$hardcode_direct" = yes; then
15495 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
15496 else
15497 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
15498 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
15499 haveit=
15500 for x in $rpathdirs; do
15501 if test "X$x" = "X$found_dir"; then
15502 haveit=yes
15503 break
15504 fi
15505 done
15506 if test -z "$haveit"; then
15507 rpathdirs="$rpathdirs $found_dir"
15508 fi
15509 else
15510 haveit=
15511 for x in $LDFLAGS $LIBLZMA; do
15512
15513 acl_save_prefix="$prefix"
15514 prefix="$acl_final_prefix"
15515 acl_save_exec_prefix="$exec_prefix"
15516 exec_prefix="$acl_final_exec_prefix"
15517 eval x=\"$x\"
15518 exec_prefix="$acl_save_exec_prefix"
15519 prefix="$acl_save_prefix"
15520
15521 if test "X$x" = "X-L$found_dir"; then
15522 haveit=yes
15523 break
15524 fi
15525 done
15526 if test -z "$haveit"; then
15527 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir"
15528 fi
15529 if test "$hardcode_minus_L" != no; then
15530 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
15531 else
15532 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
15533 fi
15534 fi
15535 fi
15536 fi
15537 else
15538 if test "X$found_a" != "X"; then
15539 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a"
15540 else
15541 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name"
15542 fi
15543 fi
15544 additional_includedir=
15545 case "$found_dir" in
15546 */lib | */lib/)
15547 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
15548 additional_includedir="$basedir/include"
15549 ;;
15550 esac
15551 if test "X$additional_includedir" != "X"; then
15552 if test "X$additional_includedir" != "X/usr/include"; then
15553 haveit=
15554 if test "X$additional_includedir" = "X/usr/local/include"; then
15555 if test -n "$GCC"; then
15556 case $host_os in
15557 linux*) haveit=yes;;
15558 esac
15559 fi
15560 fi
15561 if test -z "$haveit"; then
15562 for x in $CPPFLAGS $INCLZMA; do
15563
15564 acl_save_prefix="$prefix"
15565 prefix="$acl_final_prefix"
15566 acl_save_exec_prefix="$exec_prefix"
15567 exec_prefix="$acl_final_exec_prefix"
15568 eval x=\"$x\"
15569 exec_prefix="$acl_save_exec_prefix"
15570 prefix="$acl_save_prefix"
15571
15572 if test "X$x" = "X-I$additional_includedir"; then
15573 haveit=yes
15574 break
15575 fi
15576 done
15577 if test -z "$haveit"; then
15578 if test -d "$additional_includedir"; then
15579 INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir"
15580 fi
15581 fi
15582 fi
15583 fi
15584 fi
15585 if test -n "$found_la"; then
15586 save_libdir="$libdir"
15587 case "$found_la" in
15588 */* | *\\*) . "$found_la" ;;
15589 *) . "./$found_la" ;;
15590 esac
15591 libdir="$save_libdir"
15592 for dep in $dependency_libs; do
15593 case "$dep" in
15594 -L*)
15595 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
15596 if test "X$additional_libdir" != "X/usr/lib"; then
15597 haveit=
15598 if test "X$additional_libdir" = "X/usr/local/lib"; then
15599 if test -n "$GCC"; then
15600 case $host_os in
15601 linux*) haveit=yes;;
15602 esac
15603 fi
15604 fi
15605 if test -z "$haveit"; then
15606 haveit=
15607 for x in $LDFLAGS $LIBLZMA; do
15608
15609 acl_save_prefix="$prefix"
15610 prefix="$acl_final_prefix"
15611 acl_save_exec_prefix="$exec_prefix"
15612 exec_prefix="$acl_final_exec_prefix"
15613 eval x=\"$x\"
15614 exec_prefix="$acl_save_exec_prefix"
15615 prefix="$acl_save_prefix"
15616
15617 if test "X$x" = "X-L$additional_libdir"; then
15618 haveit=yes
15619 break
15620 fi
15621 done
15622 if test -z "$haveit"; then
15623 if test -d "$additional_libdir"; then
15624 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir"
15625 fi
15626 fi
15627 haveit=
15628 for x in $LDFLAGS $LTLIBLZMA; do
15629
15630 acl_save_prefix="$prefix"
15631 prefix="$acl_final_prefix"
15632 acl_save_exec_prefix="$exec_prefix"
15633 exec_prefix="$acl_final_exec_prefix"
15634 eval x=\"$x\"
15635 exec_prefix="$acl_save_exec_prefix"
15636 prefix="$acl_save_prefix"
15637
15638 if test "X$x" = "X-L$additional_libdir"; then
15639 haveit=yes
15640 break
15641 fi
15642 done
15643 if test -z "$haveit"; then
15644 if test -d "$additional_libdir"; then
15645 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir"
15646 fi
15647 fi
15648 fi
15649 fi
15650 ;;
15651 -R*)
15652 dir=`echo "X$dep" | sed -e 's/^X-R//'`
15653 if test "$enable_rpath" != no; then
15654 haveit=
15655 for x in $rpathdirs; do
15656 if test "X$x" = "X$dir"; then
15657 haveit=yes
15658 break
15659 fi
15660 done
15661 if test -z "$haveit"; then
15662 rpathdirs="$rpathdirs $dir"
15663 fi
15664 haveit=
15665 for x in $ltrpathdirs; do
15666 if test "X$x" = "X$dir"; then
15667 haveit=yes
15668 break
15669 fi
15670 done
15671 if test -z "$haveit"; then
15672 ltrpathdirs="$ltrpathdirs $dir"
15673 fi
15674 fi
15675 ;;
15676 -l*)
15677 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
15678 ;;
15679 *.la)
15680 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
15681 ;;
15682 *)
15683 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep"
15684 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep"
15685 ;;
15686 esac
15687 done
15688 fi
15689 else
15690 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
15691 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name"
15692 fi
15693 fi
15694 fi
15695 done
15696 done
15697 if test "X$rpathdirs" != "X"; then
15698 if test -n "$hardcode_libdir_separator"; then
15699 alldirs=
15700 for found_dir in $rpathdirs; do
15701 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
15702 done
15703 acl_save_libdir="$libdir"
15704 libdir="$alldirs"
15705 eval flag=\"$hardcode_libdir_flag_spec\"
15706 libdir="$acl_save_libdir"
15707 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
15708 else
15709 for found_dir in $rpathdirs; do
15710 acl_save_libdir="$libdir"
15711 libdir="$found_dir"
15712 eval flag=\"$hardcode_libdir_flag_spec\"
15713 libdir="$acl_save_libdir"
15714 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
15715 done
15716 fi
15717 fi
15718 if test "X$ltrpathdirs" != "X"; then
15719 for found_dir in $ltrpathdirs; do
15720 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir"
15721 done
15722 fi
15723
15724
15725 ac_save_CPPFLAGS="$CPPFLAGS"
15726
15727 for element in $INCLZMA; do
15728 haveit=
15729 for x in $CPPFLAGS; do
15730
15731 acl_save_prefix="$prefix"
15732 prefix="$acl_final_prefix"
15733 acl_save_exec_prefix="$exec_prefix"
15734 exec_prefix="$acl_final_exec_prefix"
15735 eval x=\"$x\"
15736 exec_prefix="$acl_save_exec_prefix"
15737 prefix="$acl_save_prefix"
15738
15739 if test "X$x" = "X$element"; then
15740 haveit=yes
15741 break
15742 fi
15743 done
15744 if test -z "$haveit"; then
15745 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
15746 fi
15747 done
15748
15749
15750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5
15751$as_echo_n "checking for liblzma... " >&6; }
15752if test "${ac_cv_liblzma+set}" = set; then :
15753 $as_echo_n "(cached) " >&6
15754else
15755
15756 ac_save_LIBS="$LIBS"
15757 LIBS="$LIBS $LIBLZMA"
15758 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15759/* end confdefs.h. */
15760#include "lzma.h"
15761int
15762main ()
15763{
15764lzma_index_iter iter;
15765 lzma_index_iter_init (&iter, 0);
15766 lzma_mf_is_supported (LZMA_MF_HC3);
15767 ;
15768 return 0;
15769}
15770_ACEOF
15771if ac_fn_c_try_link "$LINENO"; then :
15772 ac_cv_liblzma=yes
15773else
15774 ac_cv_liblzma=no
15775fi
15776rm -f core conftest.err conftest.$ac_objext \
15777 conftest$ac_exeext conftest.$ac_ext
15778 LIBS="$ac_save_LIBS"
15779
15780fi
15781{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5
15782$as_echo "$ac_cv_liblzma" >&6; }
15783 if test "$ac_cv_liblzma" = yes; then
15784 HAVE_LIBLZMA=yes
15785
15786$as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h
15787
15788 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5
15789$as_echo_n "checking how to link with liblzma... " >&6; }
15790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5
15791$as_echo "$LIBLZMA" >&6; }
15792 else
15793 HAVE_LIBLZMA=no
15794 CPPFLAGS="$ac_save_CPPFLAGS"
15795 LIBLZMA=
15796 LTLIBLZMA=
15797 fi
15798
15799
15800
15801
15802
15803
15804 if test "$HAVE_LIBLZMA" != yes; then
15805 if test "$with_lzma" = yes; then
15806 as_fn_error "missing liblzma for --with-lzma" "$LINENO" 5
15807 fi
15808 fi
15809 fi
15810fi
15811
3fc11d3e
JM
15812LIBGUI="../libgui/src/libgui.a"
15813GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
15814
15815
7a292a7a 15816
3fc11d3e
JM
15817WIN32LDAPP=
15818
15819
15820
d91670b9 15821case "${host}" in
686a5eed 15822*-*-cygwin* | *-*-mingw* )
d91670b9
CV
15823 configdir="win"
15824 ;;
15825*)
15826 configdir="unix"
15827 ;;
15828esac
3fc11d3e
JM
15829
15830GDBTKLIBS=
15831if test "${enable_gdbtk}" = "yes"; then
15832
d1c3b63a
KS
15833 # Gdbtk must have an absolute path to srcdir in order to run
15834 # properly when not installed.
15835 here=`pwd`
15836 cd ${srcdir}
15837 GDBTK_SRC_DIR=`pwd`
15838 cd $here
15839
bec39cab 15840
5062cc19
KS
15841 #
15842 # Ok, lets find the tcl configuration
15843 # First, look for one uninstalled.
15844 # the alternative search directory is invoked by --with-tcl
15845 #
3fc11d3e 15846
5062cc19
KS
15847 if test x"${no_tcl}" = x ; then
15848 # we reset no_tcl in case something fails here
15849 no_tcl=true
bec39cab 15850
81ecdfbb
RW
15851# Check whether --with-tcl was given.
15852if test "${with_tcl+set}" = set; then :
15853 withval=$with_tcl; with_tclconfig=${withval}
15854fi
15855
15856 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
15857$as_echo_n "checking for Tcl configuration... " >&6; }
15858 if test "${ac_cv_c_tclconfig+set}" = set; then :
15859 $as_echo_n "(cached) " >&6
3fc11d3e 15860else
bec39cab 15861
3fc11d3e 15862
5062cc19
KS
15863 # First check to see if --with-tcl was specified.
15864 case "${host}" in
15865 *-*-cygwin*) platDir="win" ;;
15866 *) platDir="unix" ;;
15867 esac
15868 if test x"${with_tclconfig}" != x ; then
15869 if test -f "${with_tclconfig}/tclConfig.sh" ; then
15870 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
15871 else
81ecdfbb 15872 as_fn_error "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
5062cc19
KS
15873 fi
15874 fi
15875
15876 # then check for a private Tcl installation
15877 if test x"${ac_cv_c_tclconfig}" = x ; then
15878 for i in \
15879 ../tcl \
15880 `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
15881 `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
15882 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
15883 ../../tcl \
15884 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
15885 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
15886 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
15887 ../../../tcl \
15888 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
15889 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
15890 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
15891 if test -f "$i/$platDir/tclConfig.sh" ; then
15892 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
15893 break
15894 fi
15895 done
15896 fi
15897
15898 # on Darwin, check in Framework installation locations
15899 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
15900 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
15901 `ls -d /Library/Frameworks 2>/dev/null` \
15902 `ls -d /Network/Library/Frameworks 2>/dev/null` \
15903 `ls -d /System/Library/Frameworks 2>/dev/null` \
15904 ; do
15905 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
15906 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
15907 break
15908 fi
15909 done
15910 fi
15911
15912 # check in a few common install locations
15913 if test x"${ac_cv_c_tclconfig}" = x ; then
15914 for i in `ls -d ${libdir} 2>/dev/null` \
15915 `ls -d ${exec_prefix}/lib 2>/dev/null` \
15916 `ls -d ${prefix}/lib 2>/dev/null` \
15917 `ls -d /usr/local/lib 2>/dev/null` \
15918 `ls -d /usr/contrib/lib 2>/dev/null` \
15919 `ls -d /usr/lib 2>/dev/null` \
15920 ; do
15921 if test -f "$i/tclConfig.sh" ; then
15922 ac_cv_c_tclconfig=`(cd $i; pwd)`
15923 break
15924 fi
15925 done
15926 fi
3fc11d3e 15927
5062cc19
KS
15928 # check in a few other private locations
15929 if test x"${ac_cv_c_tclconfig}" = x ; then
15930 for i in \
15931 ${srcdir}/../tcl \
15932 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
15933 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
15934 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
15935 if test -f "$i/$platDir/tclConfig.sh" ; then
15936 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
15937 break
15938 fi
15939 done
15940 fi
bec39cab 15941
3fc11d3e
JM
15942fi
15943
5062cc19
KS
15944
15945 if test x"${ac_cv_c_tclconfig}" = x ; then
15946 TCL_BIN_DIR="# no Tcl configs found"
81ecdfbb
RW
15947 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
15948$as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
5062cc19
KS
15949 else
15950 no_tcl=
15951 TCL_BIN_DIR=${ac_cv_c_tclconfig}
81ecdfbb
RW
15952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
15953$as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
5062cc19
KS
15954 fi
15955 fi
3fc11d3e 15956
bec39cab 15957
85541719
DE
15958 # If $no_tk is nonempty, then we can't do Tk, and there is no
15959 # point to doing Tcl.
bec39cab 15960
5062cc19
KS
15961 #
15962 # Ok, lets find the tk configuration
15963 # First, look for one uninstalled.
15964 # the alternative search directory is invoked by --with-tk
15965 #
3fc11d3e 15966
5062cc19
KS
15967 if test x"${no_tk}" = x ; then
15968 # we reset no_tk in case something fails here
15969 no_tk=true
bec39cab 15970
81ecdfbb
RW
15971# Check whether --with-tk was given.
15972if test "${with_tk+set}" = set; then :
15973 withval=$with_tk; with_tkconfig=${withval}
15974fi
15975
15976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
15977$as_echo_n "checking for Tk configuration... " >&6; }
15978 if test "${ac_cv_c_tkconfig+set}" = set; then :
15979 $as_echo_n "(cached) " >&6
bec39cab 15980else
3fc11d3e
JM
15981
15982
5062cc19
KS
15983 # First check to see if --with-tkconfig was specified.
15984 if test x"${with_tkconfig}" != x ; then
15985 if test -f "${with_tkconfig}/tkConfig.sh" ; then
15986 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
15987 else
81ecdfbb 15988 as_fn_error "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
5062cc19
KS
15989 fi
15990 fi
3fc11d3e 15991
5062cc19
KS
15992 # then check for a private Tk library
15993 case "${host}" in
15994 *-*-cygwin*) platDir="win" ;;
15995 *) platDir="unix" ;;
15996 esac
15997 if test x"${ac_cv_c_tkconfig}" = x ; then
15998 for i in \
15999 ../tk \
16000 `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16001 `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
16002 `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
16003 ../../tk \
16004 `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16005 `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
16006 `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
16007 ../../../tk \
16008 `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16009 `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
16010 `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
16011 if test -f "$i/$platDir/tkConfig.sh" ; then
16012 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
16013 break
16014 fi
16015 done
16016 fi
16017
16018 # on Darwin, check in Framework installation locations
16019 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
16020 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
16021 `ls -d /Library/Frameworks 2>/dev/null` \
16022 `ls -d /Network/Library/Frameworks 2>/dev/null` \
16023 `ls -d /System/Library/Frameworks 2>/dev/null` \
16024 ; do
16025 if test -f "$i/Tk.framework/tkConfig.sh" ; then
16026 ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
16027 break
16028 fi
16029 done
16030 fi
16031
16032 # check in a few common install locations
16033 if test x"${ac_cv_c_tkconfig}" = x ; then
16034 for i in `ls -d ${libdir} 2>/dev/null` \
16035 `ls -d ${exec_prefix}/lib 2>/dev/null` \
16036 `ls -d ${prefix}/lib 2>/dev/null` \
16037 `ls -d /usr/local/lib 2>/dev/null` \
16038 `ls -d /usr/contrib/lib 2>/dev/null` \
16039 `ls -d /usr/lib 2>/dev/null` \
16040 ; do
16041 if test -f "$i/tkConfig.sh" ; then
16042 ac_cv_c_tkconfig=`(cd $i; pwd)`
16043 break
16044 fi
16045 done
16046 fi
16047 # check in a few other private locations
16048 if test x"${ac_cv_c_tkconfig}" = x ; then
16049 for i in \
16050 ${srcdir}/../tk \
16051 `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16052 `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
16053 `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
16054 if test -f "$i/$platDir/tkConfig.sh" ; then
16055 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
16056 break
16057 fi
16058 done
16059 fi
3fc11d3e 16060
3fc11d3e
JM
16061fi
16062
16063
5062cc19
KS
16064 if test x"${ac_cv_c_tkconfig}" = x ; then
16065 TK_BIN_DIR="# no Tk configs found"
81ecdfbb
RW
16066 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
16067$as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
5062cc19
KS
16068 else
16069 no_tk=
16070 TK_BIN_DIR=${ac_cv_c_tkconfig}
81ecdfbb
RW
16071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
16072$as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
5062cc19 16073 fi
3fc11d3e 16074 fi
dd2504ab 16075
dd2504ab 16076
85541719
DE
16077 if test -z "${no_tcl}" -a -z "${no_tk}"; then
16078
81ecdfbb
RW
16079 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
16080$as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
85541719
DE
16081
16082 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
81ecdfbb
RW
16083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
16084$as_echo "loading" >&6; }
85541719
DE
16085 . ${TCL_BIN_DIR}/tclConfig.sh
16086 else
81ecdfbb
RW
16087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
16088$as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
85541719
DE
16089 fi
16090
16091 # eval is required to do the TCL_DBGX substitution
16092 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
16093 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
16094
16095 # If the TCL_BIN_DIR is the build directory (not the install directory),
16096 # then set the common variable name to the value of the build variables.
16097 # For example, the variable TCL_LIB_SPEC will be set to the value
16098 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
16099 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
16100 # installed and uninstalled version of Tcl.
16101 if test -f "${TCL_BIN_DIR}/Makefile" ; then
16102 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
16103 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
16104 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
16105 elif test "`uname -s`" = "Darwin"; then
16106 # If Tcl was built as a framework, attempt to use the libraries
16107 # from the framework at the given location so that linking works
a68ffae9 16108 # against Tcl.framework installed in an arbitrary location.
85541719
DE
16109 case ${TCL_DEFS} in
16110 *TCL_FRAMEWORK*)
16111 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
16112 for i in "`cd ${TCL_BIN_DIR}; pwd`" \
16113 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
16114 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
16115 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
16116 break
16117 fi
16118 done
16119 fi
16120 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
16121 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
16122 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
16123 fi
16124 ;;
16125 esac
16126 fi
16127
16128 # eval is required to do the TCL_DBGX substitution
16129 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
16130 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
16131 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
16132 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
16133
16134
16135
16136
16137
16138
16139
16140
16141
16142
16143
16144
16145
16146
16147
16148 # Check for in-tree tcl
16149 here=`pwd`
16150 cd ${srcdir}/..
16151 topdir=`pwd`
16152 cd ${here}
16153
16154 intree="no"
16155 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
16156 intree="yes"
16157 fi
16158
16159 # Find Tcl private headers
16160 if test x"${intree}" = xno; then
16161
81ecdfbb
RW
16162 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
16163$as_echo_n "checking for Tcl private headers... " >&6; }
85541719
DE
16164 private_dir=""
16165 dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
16166 if test -f ${dir}/tclInt.h ; then
16167 private_dir=${dir}
16168 fi
16169
16170 if test x"${private_dir}" = x; then
81ecdfbb 16171 as_fn_error "could not find private Tcl headers" "$LINENO" 5
85541719
DE
16172 else
16173 TCL_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
16174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
16175$as_echo "${private_dir}" >&6; }
85541719
DE
16176 fi
16177
16178 TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
16179 TCL_LIBRARY="${TCL_LIB_SPEC}"
16180 TCL_DEPS=""
16181 else
16182 # If building tcl in the same src tree, private headers
16183 # are not needed, but we need to be sure to use the right
16184 # headers library
16185 TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
16186 TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
16187 TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
16188 fi
16189
16190
16191
16192
16193
81ecdfbb
RW
16194 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
16195$as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
dd2504ab 16196
5062cc19 16197 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
81ecdfbb
RW
16198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
16199$as_echo "loading" >&6; }
5062cc19 16200 . ${TK_BIN_DIR}/tkConfig.sh
3fc11d3e 16201 else
81ecdfbb
RW
16202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
16203$as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
3fc11d3e 16204 fi
bec39cab 16205
5062cc19
KS
16206 # eval is required to do the TK_DBGX substitution
16207 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
16208 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
16209
16210 # If the TK_BIN_DIR is the build directory (not the install directory),
16211 # then set the common variable name to the value of the build variables.
16212 # For example, the variable TK_LIB_SPEC will be set to the value
16213 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
16214 # instead of TK_BUILD_LIB_SPEC since it will work with both an
16215 # installed and uninstalled version of Tcl.
85541719 16216 if test -f "${TK_BIN_DIR}/Makefile" ; then
5062cc19
KS
16217 TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
16218 TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
16219 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
16220 elif test "`uname -s`" = "Darwin"; then
16221 # If Tk was built as a framework, attempt to use the libraries
16222 # from the framework at the given location so that linking works
a68ffae9 16223 # against Tk.framework installed in an arbitrary location.
5062cc19
KS
16224 case ${TK_DEFS} in
16225 *TK_FRAMEWORK*)
85541719 16226 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
5062cc19
KS
16227 for i in "`cd ${TK_BIN_DIR}; pwd`" \
16228 "`cd ${TK_BIN_DIR}/../..; pwd`"; do
16229 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
16230 TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
16231 break
16232 fi
16233 done
16234 fi
85541719 16235 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
5062cc19
KS
16236 TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
16237 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
16238 fi
16239 ;;
16240 esac
3fc11d3e
JM
16241 fi
16242
5062cc19
KS
16243 # eval is required to do the TK_DBGX substitution
16244 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
16245 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
16246 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
16247 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
3fc11d3e 16248
3fc11d3e
JM
16249
16250
bec39cab
AC
16251
16252
16253
16254
16255
16256
16257
3fc11d3e 16258
3fc11d3e 16259
bec39cab 16260
bec39cab 16261
85541719
DE
16262 # Check for in-tree Tk
16263 intree="no"
16264 if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
16265 intree="yes"
16266 fi
3fc11d3e 16267
85541719
DE
16268 # Find Tk private headers
16269 if test x"${intree}" = xno; then
3fc11d3e 16270
81ecdfbb
RW
16271 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
16272$as_echo_n "checking for Tk private headers... " >&6; }
5062cc19
KS
16273 private_dir=""
16274 dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
16275 if test -f ${dir}/tkInt.h; then
16276 private_dir=${dir}
3fc11d3e 16277 fi
bec39cab 16278
5062cc19 16279 if test x"${private_dir}" = x; then
81ecdfbb 16280 as_fn_error "could not find Tk private headers" "$LINENO" 5
3fc11d3e 16281 else
5062cc19 16282 TK_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
16283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
16284$as_echo "${private_dir}" >&6; }
3fc11d3e 16285 fi
3fc11d3e 16286
85541719
DE
16287 TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
16288 TK_LIBRARY=${TK_LIB_SPEC}
16289 TK_DEPS=""
16290 else
16291 TK_INCLUDE="-I${TK_SRC_DIR}/generic"
16292 TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
16293 TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
16294 fi
3fc11d3e
JM
16295
16296
3fc11d3e
JM
16297
16298
3fc11d3e 16299
85541719 16300 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e 16301
85541719
DE
16302 # Include some libraries that Tcl and Tk want.
16303 TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
16304 # Yes, the ordering seems wrong here. But it isn't.
16305 # TK_LIBS is the list of libraries that need to be linked
16306 # after Tcl/Tk. Note that this isn't put into LIBS. If it
16307 # were in LIBS then any link tests after this point would
16308 # try to include things like `$(LIBGUI)', which wouldn't work.
16309 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5 16310
85541719
DE
16311 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
16312 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
16313 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
16314 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
16315 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
16316 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
16317 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
3fc11d3e 16318
85541719
DE
16319 if test x$gdb_cv_os_cygwin = xyes; then
16320 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
16321 WIN32LDAPP="-Wl,--subsystem,console"
16322 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
3fc11d3e 16323 fi
ffc6a242 16324
81ecdfbb 16325 subdirs="$subdirs gdbtk"
3ace7edb 16326
85541719 16327 fi
3fc11d3e
JM
16328fi
16329
16330
16331
16332
16333
16334
16335
16336
81ecdfbb
RW
16337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
16338$as_echo_n "checking for X... " >&6; }
bec39cab 16339
c906108c 16340
81ecdfbb
RW
16341# Check whether --with-x was given.
16342if test "${with_x+set}" = set; then :
16343 withval=$with_x;
16344fi
c906108c
SS
16345
16346# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
16347if test "x$with_x" = xno; then
16348 # The user explicitly disabled X.
16349 have_x=disabled
16350else
81ecdfbb
RW
16351 case $x_includes,$x_libraries in #(
16352 *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
16353 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
16354 $as_echo_n "(cached) " >&6
c906108c
SS
16355else
16356 # One or both of the vars are not set, and there is no cached value.
bec39cab 16357ac_x_includes=no ac_x_libraries=no
81ecdfbb 16358rm -f -r conftest.dir
bec39cab
AC
16359if mkdir conftest.dir; then
16360 cd conftest.dir
bec39cab 16361 cat >Imakefile <<'_ACEOF'
81ecdfbb
RW
16362incroot:
16363 @echo incroot='${INCROOT}'
16364usrlibdir:
16365 @echo usrlibdir='${USRLIBDIR}'
16366libdir:
16367 @echo libdir='${LIBDIR}'
16368_ACEOF
16369 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
c906108c 16370 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
81ecdfbb
RW
16371 for ac_var in incroot usrlibdir libdir; do
16372 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
16373 done
c906108c 16374 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
81ecdfbb
RW
16375 for ac_extension in a so sl dylib la dll; do
16376 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
16377 test -f "$ac_im_libdir/libX11.$ac_extension"; then
bec39cab 16378 ac_im_usrlibdir=$ac_im_libdir; break
c906108c
SS
16379 fi
16380 done
16381 # Screen out bogus values from the imake configuration. They are
16382 # bogus both because they are the default anyway, and because
16383 # using them would break gcc on systems where it needs fixed includes.
bec39cab 16384 case $ac_im_incroot in
81ecdfbb 16385 /usr/include) ac_x_includes= ;;
bec39cab 16386 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
c906108c 16387 esac
bec39cab 16388 case $ac_im_usrlibdir in
81ecdfbb 16389 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
bec39cab 16390 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
c906108c
SS
16391 esac
16392 fi
16393 cd ..
81ecdfbb 16394 rm -f -r conftest.dir
c906108c
SS
16395fi
16396
bec39cab
AC
16397# Standard set of common directories for X headers.
16398# Check X11 before X11Rn because it is often a symlink to the current release.
16399ac_x_header_dirs='
16400/usr/X11/include
81ecdfbb 16401/usr/X11R7/include
bec39cab
AC
16402/usr/X11R6/include
16403/usr/X11R5/include
16404/usr/X11R4/include
16405
16406/usr/include/X11
81ecdfbb 16407/usr/include/X11R7
bec39cab
AC
16408/usr/include/X11R6
16409/usr/include/X11R5
16410/usr/include/X11R4
16411
16412/usr/local/X11/include
81ecdfbb 16413/usr/local/X11R7/include
bec39cab
AC
16414/usr/local/X11R6/include
16415/usr/local/X11R5/include
16416/usr/local/X11R4/include
16417
16418/usr/local/include/X11
81ecdfbb 16419/usr/local/include/X11R7
bec39cab
AC
16420/usr/local/include/X11R6
16421/usr/local/include/X11R5
16422/usr/local/include/X11R4
16423
16424/usr/X386/include
16425/usr/x386/include
16426/usr/XFree86/include/X11
16427
16428/usr/include
16429/usr/local/include
16430/usr/unsupported/include
16431/usr/athena/include
16432/usr/local/x11r5/include
16433/usr/lpp/Xamples/include
16434
16435/usr/openwin/include
16436/usr/openwin/share/include'
16437
16438if test "$ac_x_includes" = no; then
81ecdfbb 16439 # Guess where to find include files, by looking for Xlib.h.
c906108c 16440 # First, try using that file with no special directory specified.
81ecdfbb 16441 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 16442/* end confdefs.h. */
81ecdfbb 16443#include <X11/Xlib.h>
bec39cab 16444_ACEOF
81ecdfbb 16445if ac_fn_c_try_cpp "$LINENO"; then :
c906108c
SS
16446 # We can compile using X headers with no special include directory.
16447ac_x_includes=
16448else
bec39cab 16449 for ac_dir in $ac_x_header_dirs; do
81ecdfbb 16450 if test -r "$ac_dir/X11/Xlib.h"; then
bec39cab
AC
16451 ac_x_includes=$ac_dir
16452 break
16453 fi
16454done
c906108c 16455fi
bec39cab
AC
16456rm -f conftest.err conftest.$ac_ext
16457fi # $ac_x_includes = no
c906108c 16458
bec39cab 16459if test "$ac_x_libraries" = no; then
c906108c 16460 # Check for the libraries.
c906108c
SS
16461 # See if we find them without any special options.
16462 # Don't add to $LIBS permanently.
bec39cab 16463 ac_save_LIBS=$LIBS
81ecdfbb
RW
16464 LIBS="-lX11 $LIBS"
16465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 16466/* end confdefs.h. */
81ecdfbb 16467#include <X11/Xlib.h>
bec39cab
AC
16468int
16469main ()
16470{
81ecdfbb 16471XrmInitialize ()
bec39cab
AC
16472 ;
16473 return 0;
16474}
16475_ACEOF
81ecdfbb 16476if ac_fn_c_try_link "$LINENO"; then :
bec39cab 16477 LIBS=$ac_save_LIBS
c906108c
SS
16478# We can link X programs with no special library path.
16479ac_x_libraries=
16480else
81ecdfbb
RW
16481 LIBS=$ac_save_LIBS
16482for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
c906108c 16483do
bec39cab 16484 # Don't even attempt the hair of trying to link an X program!
81ecdfbb
RW
16485 for ac_extension in a so sl dylib la dll; do
16486 if test -r "$ac_dir/libX11.$ac_extension"; then
c906108c
SS
16487 ac_x_libraries=$ac_dir
16488 break 2
16489 fi
16490 done
16491done
16492fi
81ecdfbb
RW
16493rm -f core conftest.err conftest.$ac_objext \
16494 conftest$ac_exeext conftest.$ac_ext
bec39cab 16495fi # $ac_x_libraries = no
c906108c 16496
81ecdfbb
RW
16497case $ac_x_includes,$ac_x_libraries in #(
16498 no,* | *,no | *\'*)
16499 # Didn't find X, or a directory has "'" in its name.
16500 ac_cv_have_x="have_x=no";; #(
16501 *)
16502 # Record where we found X for the cache.
16503 ac_cv_have_x="have_x=yes\
16504 ac_x_includes='$ac_x_includes'\
16505 ac_x_libraries='$ac_x_libraries'"
16506esac
c906108c 16507fi
81ecdfbb
RW
16508;; #(
16509 *) have_x=yes;;
16510 esac
c906108c
SS
16511 eval "$ac_cv_have_x"
16512fi # $with_x != no
16513
16514if test "$have_x" != yes; then
81ecdfbb
RW
16515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
16516$as_echo "$have_x" >&6; }
c906108c
SS
16517 no_x=yes
16518else
16519 # If each of the values was on the command line, it overrides each guess.
16520 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
16521 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
16522 # Update the cache value to reflect the command line values.
81ecdfbb
RW
16523 ac_cv_have_x="have_x=yes\
16524 ac_x_includes='$x_includes'\
16525 ac_x_libraries='$x_libraries'"
16526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
16527$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
c906108c
SS
16528fi
16529
16530
bec39cab 16531# Unlike the sim directory, whether a simulator is linked is controlled by
9b624dbe 16532# presence of a gdb_sim definition in the target configure.tgt entry.
7a292a7a
SS
16533# This code just checks for a few cases where we'd like to ignore those
16534# definitions, even when they're present in the '.mt' file. These cases
16535# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 16536# not part of the source tree.
7a292a7a 16537#
81ecdfbb
RW
16538# Check whether --enable-sim was given.
16539if test "${enable_sim+set}" = set; then :
16540 enableval=$enable_sim; echo "enable_sim = $enable_sim";
7a292a7a
SS
16541 echo "enableval = ${enableval}";
16542 case "${enableval}" in
16543 yes) ignore_sim=false ;;
16544 no) ignore_sim=true ;;
16545 *) ignore_sim=false ;;
16546 esac
16547else
16548 ignore_sim=false
81ecdfbb
RW
16549fi
16550
7a292a7a
SS
16551
16552if test ! -d "${srcdir}/../sim"; then
16553 ignore_sim=true
16554fi
16555
9b624dbe
UW
16556SIM=
16557SIM_OBS=
16558if test "${ignore_sim}" = "false"; then
16559 if test x"${gdb_sim}" != x ; then
16560 SIM="${gdb_sim}"
16561 SIM_OBS="remote-sim.o"
60ca704f 16562
81ecdfbb 16563$as_echo "#define WITH_SIM 1" >>confdefs.h
7a292a7a 16564
976102cd
PA
16565
16566 # Some tdep code should only be compiled in when the ppc sim is
16567 # built. PR sim/13418.
16568 case $target in
16569 powerpc*-*-*)
16570
16571$as_echo "#define WITH_PPC_SIM 1" >>confdefs.h
16572
16573 ;;
16574 esac
9b624dbe 16575 fi
7a292a7a
SS
16576fi
16577
16578
16579
c906108c
SS
16580
16581
16582
16583
16584
16585
dfcd3bfb 16586
e56ac5c3
AC
16587
16588
b3a90332
AC
16589
16590
c35f4ffc 16591# List of host floatformats.
bec39cab
AC
16592
16593cat >>confdefs.h <<_ACEOF
c35f4ffc 16594#define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
bec39cab 16595_ACEOF
c35f4ffc 16596
bec39cab
AC
16597
16598cat >>confdefs.h <<_ACEOF
c35f4ffc 16599#define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
bec39cab
AC
16600_ACEOF
16601
c35f4ffc 16602
bec39cab 16603cat >>confdefs.h <<_ACEOF
c35f4ffc 16604#define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
bec39cab 16605_ACEOF
c35f4ffc
AC
16606
16607
c906108c
SS
16608# target_subdir is used by the testsuite to find the target libraries.
16609target_subdir=
16610if test "${host}" != "${target}"; then
16611 target_subdir="${target_alias}/"
16612fi
16613
16614
21ea5acd 16615# Import nat definitions.
2b351b19 16616nat_makefile_frag=/dev/null
771b4502 16617if test "${gdb_native}" = "yes"; then
21ea5acd
SDJ
16618 . ${srcdir}/configure.nat
16619 nativefile=$NAT_FILE
c906108c 16620fi
c906108c 16621
c906108c
SS
16622
16623
16624
21ea5acd
SDJ
16625
16626
16627
16628
16629
c906108c
SS
16630
16631
b00a8037 16632if test x"${gdb_osabi}" != x ; then
bec39cab
AC
16633
16634cat >>confdefs.h <<_ACEOF
b00a8037 16635#define GDB_OSABI_DEFAULT $gdb_osabi
bec39cab 16636_ACEOF
b00a8037
DJ
16637
16638fi
16639
8dcde887 16640# Enable multi-ice-gdb-server.
81ecdfbb
RW
16641# Check whether --enable-multi-ice was given.
16642if test "${enable_multi_ice+set}" = set; then :
16643 enableval=$enable_multi_ice; case $enableval in
8dcde887
MK
16644 yes | no)
16645 ;;
81ecdfbb 16646 *) as_fn_error "bad value $enableval for --enable-multi-ice" "$LINENO" 5 ;;
8dcde887 16647 esac
81ecdfbb 16648fi
b4e70030 16649
81ecdfbb
RW
16650if test "x$enable_multi_ice" = xyes; then
16651 subdirs="$subdirs multi-ice"
3ace7edb 16652
a85f51e7
DJ
16653fi
16654
496c0e1b
JB
16655# Check whether --enable-gdbserver was given.
16656if test "${enable_gdbserver+set}" = set; then :
16657 enableval=$enable_gdbserver; case "${enableval}" in
16658 yes| no|auto) ;;
16659 *) as_fn_error "bad value ${enableval} for --enable-gdbserver option" "$LINENO" 5 ;;
16660esac
16661else
16662 enable_gdbserver=auto
16663fi
16664
16665
16666# We only build gdbserver automatically in a native configuration, and
16667# only if the user did not explicitly disable its build.
16668if test "$gdb_native" = "yes" -a "$enable_gdbserver" != "no"; then
81ecdfbb
RW
16669 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5
16670$as_echo_n "checking whether gdbserver is supported on this host... " >&6; }
8dcde887 16671 if test "x$build_gdbserver" = xyes; then
81ecdfbb
RW
16672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16673$as_echo "yes" >&6; }
16674 subdirs="$subdirs gdbserver"
3ace7edb 16675
496c0e1b 16676 gdbserver_build_enabled=yes
8dcde887 16677 else
81ecdfbb
RW
16678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16679$as_echo "no" >&6; }
8dcde887
MK
16680 fi
16681fi
16682
496c0e1b
JB
16683# If the user explicitly request the gdbserver to be built, verify that
16684# we were in fact able to enable it.
16685if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then
16686 as_fn_error "Automatic gdbserver build is not supported for this configuration" "$LINENO" 5
16687fi
16688
393fd4c3
YQ
16689# Check for babeltrace and babeltrace-ctf
16690
16691# Check whether --with-babeltrace was given.
16692if test "${with_babeltrace+set}" = set; then :
16693 withval=$with_babeltrace;
16694else
16695 with_babeltrace=auto
16696fi
16697
16698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltrace" >&5
16699$as_echo_n "checking whether to use babeltrace... " >&6; }
16700{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5
16701$as_echo "$with_babeltrace" >&6; }
16702
16703if test "x$with_babeltrace" = "xno"; then
16704 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&5
16705$as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&2;}
16706else
16707 # Append -Werror to CFLAGS so that configure can catch the warning
16708 # "assignment from incompatible pointer type", which is related to
16709 # the babeltrace change from 1.0.3 to 1.1.0. Babeltrace 1.1.0 works
16710 # in GDB, while babeltrace 1.0.3 is broken.
16711 # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be
16712 # safe to save and restore CFLAGS here.
16713 saved_CFLAGS=$CFLAGS
16714 CFLAGS="$CFLAGS -Werror"
16715
16716
16717
16718
16719
16720
16721
16722
16723 use_additional=yes
16724
16725 acl_save_prefix="$prefix"
16726 prefix="$acl_final_prefix"
16727 acl_save_exec_prefix="$exec_prefix"
16728 exec_prefix="$acl_final_exec_prefix"
16729
16730 eval additional_includedir=\"$includedir\"
16731 eval additional_libdir=\"$libdir\"
16732
16733 exec_prefix="$acl_save_exec_prefix"
16734 prefix="$acl_save_prefix"
16735
16736
16737# Check whether --with-libbabeltrace-prefix was given.
16738if test "${with_libbabeltrace_prefix+set}" = set; then :
16739 withval=$with_libbabeltrace_prefix;
16740 if test "X$withval" = "Xno"; then
16741 use_additional=no
16742 else
16743 if test "X$withval" = "X"; then
16744
16745 acl_save_prefix="$prefix"
16746 prefix="$acl_final_prefix"
16747 acl_save_exec_prefix="$exec_prefix"
16748 exec_prefix="$acl_final_exec_prefix"
16749
16750 eval additional_includedir=\"$includedir\"
16751 eval additional_libdir=\"$libdir\"
16752
16753 exec_prefix="$acl_save_exec_prefix"
16754 prefix="$acl_save_prefix"
16755
16756 else
16757 additional_includedir="$withval/include"
16758 additional_libdir="$withval/lib"
16759 fi
16760 fi
16761
16762fi
16763
16764 LIBBABELTRACE=
16765 LTLIBBABELTRACE=
16766 INCBABELTRACE=
16767 rpathdirs=
16768 ltrpathdirs=
16769 names_already_handled=
16770 names_next_round='babeltrace babeltrace-ctf'
16771 while test -n "$names_next_round"; do
16772 names_this_round="$names_next_round"
16773 names_next_round=
16774 for name in $names_this_round; do
16775 already_handled=
16776 for n in $names_already_handled; do
16777 if test "$n" = "$name"; then
16778 already_handled=yes
16779 break
16780 fi
16781 done
16782 if test -z "$already_handled"; then
16783 names_already_handled="$names_already_handled $name"
16784 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
16785 eval value=\"\$HAVE_LIB$uppername\"
16786 if test -n "$value"; then
16787 if test "$value" = yes; then
16788 eval value=\"\$LIB$uppername\"
16789 test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value"
16790 eval value=\"\$LTLIB$uppername\"
16791 test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value"
16792 else
16793 :
16794 fi
16795 else
16796 found_dir=
16797 found_la=
16798 found_so=
16799 found_a=
16800 if test $use_additional = yes; then
16801 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
16802 found_dir="$additional_libdir"
16803 found_so="$additional_libdir/lib$name.$shlibext"
16804 if test -f "$additional_libdir/lib$name.la"; then
16805 found_la="$additional_libdir/lib$name.la"
16806 fi
16807 else
16808 if test -f "$additional_libdir/lib$name.$libext"; then
16809 found_dir="$additional_libdir"
16810 found_a="$additional_libdir/lib$name.$libext"
16811 if test -f "$additional_libdir/lib$name.la"; then
16812 found_la="$additional_libdir/lib$name.la"
16813 fi
16814 fi
16815 fi
16816 fi
16817 if test "X$found_dir" = "X"; then
16818 for x in $LDFLAGS $LTLIBBABELTRACE; do
16819
16820 acl_save_prefix="$prefix"
16821 prefix="$acl_final_prefix"
16822 acl_save_exec_prefix="$exec_prefix"
16823 exec_prefix="$acl_final_exec_prefix"
16824 eval x=\"$x\"
16825 exec_prefix="$acl_save_exec_prefix"
16826 prefix="$acl_save_prefix"
16827
16828 case "$x" in
16829 -L*)
16830 dir=`echo "X$x" | sed -e 's/^X-L//'`
16831 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
16832 found_dir="$dir"
16833 found_so="$dir/lib$name.$shlibext"
16834 if test -f "$dir/lib$name.la"; then
16835 found_la="$dir/lib$name.la"
16836 fi
16837 else
16838 if test -f "$dir/lib$name.$libext"; then
16839 found_dir="$dir"
16840 found_a="$dir/lib$name.$libext"
16841 if test -f "$dir/lib$name.la"; then
16842 found_la="$dir/lib$name.la"
16843 fi
16844 fi
16845 fi
16846 ;;
16847 esac
16848 if test "X$found_dir" != "X"; then
16849 break
16850 fi
16851 done
16852 fi
16853 if test "X$found_dir" != "X"; then
16854 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name"
16855 if test "X$found_so" != "X"; then
16856 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
16857 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
16858 else
16859 haveit=
16860 for x in $ltrpathdirs; do
16861 if test "X$x" = "X$found_dir"; then
16862 haveit=yes
16863 break
16864 fi
16865 done
16866 if test -z "$haveit"; then
16867 ltrpathdirs="$ltrpathdirs $found_dir"
16868 fi
16869 if test "$hardcode_direct" = yes; then
16870 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
16871 else
16872 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
16873 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
16874 haveit=
16875 for x in $rpathdirs; do
16876 if test "X$x" = "X$found_dir"; then
16877 haveit=yes
16878 break
16879 fi
16880 done
16881 if test -z "$haveit"; then
16882 rpathdirs="$rpathdirs $found_dir"
16883 fi
16884 else
16885 haveit=
16886 for x in $LDFLAGS $LIBBABELTRACE; do
16887
16888 acl_save_prefix="$prefix"
16889 prefix="$acl_final_prefix"
16890 acl_save_exec_prefix="$exec_prefix"
16891 exec_prefix="$acl_final_exec_prefix"
16892 eval x=\"$x\"
16893 exec_prefix="$acl_save_exec_prefix"
16894 prefix="$acl_save_prefix"
16895
16896 if test "X$x" = "X-L$found_dir"; then
16897 haveit=yes
16898 break
16899 fi
16900 done
16901 if test -z "$haveit"; then
16902 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir"
16903 fi
16904 if test "$hardcode_minus_L" != no; then
16905 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
16906 else
16907 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
16908 fi
16909 fi
16910 fi
16911 fi
16912 else
16913 if test "X$found_a" != "X"; then
16914 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a"
16915 else
16916 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name"
16917 fi
16918 fi
16919 additional_includedir=
16920 case "$found_dir" in
16921 */lib | */lib/)
16922 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
16923 additional_includedir="$basedir/include"
16924 ;;
16925 esac
16926 if test "X$additional_includedir" != "X"; then
16927 if test "X$additional_includedir" != "X/usr/include"; then
16928 haveit=
16929 if test "X$additional_includedir" = "X/usr/local/include"; then
16930 if test -n "$GCC"; then
16931 case $host_os in
16932 linux*) haveit=yes;;
16933 esac
16934 fi
16935 fi
16936 if test -z "$haveit"; then
16937 for x in $CPPFLAGS $INCBABELTRACE; do
16938
16939 acl_save_prefix="$prefix"
16940 prefix="$acl_final_prefix"
16941 acl_save_exec_prefix="$exec_prefix"
16942 exec_prefix="$acl_final_exec_prefix"
16943 eval x=\"$x\"
16944 exec_prefix="$acl_save_exec_prefix"
16945 prefix="$acl_save_prefix"
16946
16947 if test "X$x" = "X-I$additional_includedir"; then
16948 haveit=yes
16949 break
16950 fi
16951 done
16952 if test -z "$haveit"; then
16953 if test -d "$additional_includedir"; then
16954 INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir"
16955 fi
16956 fi
16957 fi
16958 fi
16959 fi
16960 if test -n "$found_la"; then
16961 save_libdir="$libdir"
16962 case "$found_la" in
16963 */* | *\\*) . "$found_la" ;;
16964 *) . "./$found_la" ;;
16965 esac
16966 libdir="$save_libdir"
16967 for dep in $dependency_libs; do
16968 case "$dep" in
16969 -L*)
16970 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
16971 if test "X$additional_libdir" != "X/usr/lib"; then
16972 haveit=
16973 if test "X$additional_libdir" = "X/usr/local/lib"; then
16974 if test -n "$GCC"; then
16975 case $host_os in
16976 linux*) haveit=yes;;
16977 esac
16978 fi
16979 fi
16980 if test -z "$haveit"; then
16981 haveit=
16982 for x in $LDFLAGS $LIBBABELTRACE; do
16983
16984 acl_save_prefix="$prefix"
16985 prefix="$acl_final_prefix"
16986 acl_save_exec_prefix="$exec_prefix"
16987 exec_prefix="$acl_final_exec_prefix"
16988 eval x=\"$x\"
16989 exec_prefix="$acl_save_exec_prefix"
16990 prefix="$acl_save_prefix"
16991
16992 if test "X$x" = "X-L$additional_libdir"; then
16993 haveit=yes
16994 break
16995 fi
16996 done
16997 if test -z "$haveit"; then
16998 if test -d "$additional_libdir"; then
16999 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir"
17000 fi
17001 fi
17002 haveit=
17003 for x in $LDFLAGS $LTLIBBABELTRACE; do
17004
17005 acl_save_prefix="$prefix"
17006 prefix="$acl_final_prefix"
17007 acl_save_exec_prefix="$exec_prefix"
17008 exec_prefix="$acl_final_exec_prefix"
17009 eval x=\"$x\"
17010 exec_prefix="$acl_save_exec_prefix"
17011 prefix="$acl_save_prefix"
17012
17013 if test "X$x" = "X-L$additional_libdir"; then
17014 haveit=yes
17015 break
17016 fi
17017 done
17018 if test -z "$haveit"; then
17019 if test -d "$additional_libdir"; then
17020 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir"
17021 fi
17022 fi
17023 fi
17024 fi
17025 ;;
17026 -R*)
17027 dir=`echo "X$dep" | sed -e 's/^X-R//'`
17028 if test "$enable_rpath" != no; then
17029 haveit=
17030 for x in $rpathdirs; do
17031 if test "X$x" = "X$dir"; then
17032 haveit=yes
17033 break
17034 fi
17035 done
17036 if test -z "$haveit"; then
17037 rpathdirs="$rpathdirs $dir"
17038 fi
17039 haveit=
17040 for x in $ltrpathdirs; do
17041 if test "X$x" = "X$dir"; then
17042 haveit=yes
17043 break
17044 fi
17045 done
17046 if test -z "$haveit"; then
17047 ltrpathdirs="$ltrpathdirs $dir"
17048 fi
17049 fi
17050 ;;
17051 -l*)
17052 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
17053 ;;
17054 *.la)
17055 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
17056 ;;
17057 *)
17058 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$dep"
17059 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$dep"
17060 ;;
17061 esac
17062 done
17063 fi
17064 else
17065 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
17066 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name"
17067 fi
17068 fi
17069 fi
17070 done
17071 done
17072 if test "X$rpathdirs" != "X"; then
17073 if test -n "$hardcode_libdir_separator"; then
17074 alldirs=
17075 for found_dir in $rpathdirs; do
17076 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
17077 done
17078 acl_save_libdir="$libdir"
17079 libdir="$alldirs"
17080 eval flag=\"$hardcode_libdir_flag_spec\"
17081 libdir="$acl_save_libdir"
17082 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
17083 else
17084 for found_dir in $rpathdirs; do
17085 acl_save_libdir="$libdir"
17086 libdir="$found_dir"
17087 eval flag=\"$hardcode_libdir_flag_spec\"
17088 libdir="$acl_save_libdir"
17089 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
17090 done
17091 fi
17092 fi
17093 if test "X$ltrpathdirs" != "X"; then
17094 for found_dir in $ltrpathdirs; do
17095 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir"
17096 done
17097 fi
17098
17099
17100 ac_save_CPPFLAGS="$CPPFLAGS"
17101
17102 for element in $INCBABELTRACE; do
17103 haveit=
17104 for x in $CPPFLAGS; do
17105
17106 acl_save_prefix="$prefix"
17107 prefix="$acl_final_prefix"
17108 acl_save_exec_prefix="$exec_prefix"
17109 exec_prefix="$acl_final_exec_prefix"
17110 eval x=\"$x\"
17111 exec_prefix="$acl_save_exec_prefix"
17112 prefix="$acl_save_prefix"
17113
17114 if test "X$x" = "X$element"; then
17115 haveit=yes
17116 break
17117 fi
17118 done
17119 if test -z "$haveit"; then
17120 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
17121 fi
17122 done
17123
17124
17125 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5
17126$as_echo_n "checking for libbabeltrace... " >&6; }
17127if test "${ac_cv_libbabeltrace+set}" = set; then :
17128 $as_echo_n "(cached) " >&6
17129else
17130
17131 ac_save_LIBS="$LIBS"
17132 LIBS="$LIBS $LIBBABELTRACE"
17133 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17134/* end confdefs.h. */
17135#include <babeltrace/babeltrace.h>
17136 #include <babeltrace/ctf/events.h>
17137 #include <babeltrace/ctf/iterator.h>
17138int
17139main ()
17140{
17141struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL));
17142 struct bt_ctf_event *event = NULL;
17143 const struct bt_definition *scope;
17144
13cdc2af 17145 pos->type = BT_SEEK_BEGIN;
65c749e7 17146 bt_iter_set_pos (bt_ctf_get_iter (NULL), pos);
393fd4c3
YQ
17147 scope = bt_ctf_get_top_level_scope (event,
17148 BT_STREAM_EVENT_HEADER);
17149 bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id"));
17150
17151 ;
17152 return 0;
17153}
17154_ACEOF
17155if ac_fn_c_try_link "$LINENO"; then :
17156 ac_cv_libbabeltrace=yes
17157else
17158 ac_cv_libbabeltrace=no
17159fi
17160rm -f core conftest.err conftest.$ac_objext \
17161 conftest$ac_exeext conftest.$ac_ext
17162 LIBS="$ac_save_LIBS"
17163
17164fi
17165{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5
17166$as_echo "$ac_cv_libbabeltrace" >&6; }
17167 if test "$ac_cv_libbabeltrace" = yes; then
17168 HAVE_LIBBABELTRACE=yes
17169
17170$as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h
17171
17172 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libbabeltrace" >&5
17173$as_echo_n "checking how to link with libbabeltrace... " >&6; }
17174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5
17175$as_echo "$LIBBABELTRACE" >&6; }
17176 else
17177 HAVE_LIBBABELTRACE=no
17178 CPPFLAGS="$ac_save_CPPFLAGS"
17179 LIBBABELTRACE=
17180 LTLIBBABELTRACE=
17181 fi
17182
17183
17184
17185
17186
17187
17188 CFLAGS=$saved_CFLAGS
17189
17190 if test "$HAVE_LIBBABELTRACE" != yes; then
17191 if test "$with_babeltrace" = yes; then
17192 as_fn_error "babeltrace is missing or unusable" "$LINENO" 5
17193 else
17194 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&5
17195$as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&2;}
17196 fi
17197 fi
17198fi
17199
21ea5acd
SDJ
17200# If nativefile (NAT_FILE) is not set in configure.nat, we link to an
17201# empty version.
c906108c
SS
17202
17203files=
17204links=
5a2402b8 17205
c906108c
SS
17206rm -f nm.h
17207if test "${nativefile}" != ""; then
0f475e27
AC
17208 case "${nativefile}" in
17209 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
17210 * ) GDB_NM_FILE="${nativefile}"
17211 esac
5a2402b8
AC
17212 files="${files} ${GDB_NM_FILE}"
17213 links="${links} nm.h"
60ca704f
SE
17214
17215cat >>confdefs.h <<_ACEOF
b78960be 17216#define GDB_NM_FILE "${GDB_NM_FILE}"
bec39cab 17217_ACEOF
5a2402b8 17218
c906108c 17219fi
5a2402b8
AC
17220
17221
e3487908
GKB
17222for ac_prog in xsltproc
17223do
17224 # Extract the first word of "$ac_prog", so it can be a program name with args.
17225set dummy $ac_prog; ac_word=$2
17226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17227$as_echo_n "checking for $ac_word... " >&6; }
17228if test "${ac_cv_path_XSLTPROC+set}" = set; then :
17229 $as_echo_n "(cached) " >&6
17230else
17231 case $XSLTPROC in
17232 [\\/]* | ?:[\\/]*)
17233 ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
17234 ;;
17235 *)
17236 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17237for as_dir in $PATH
17238do
17239 IFS=$as_save_IFS
17240 test -z "$as_dir" && as_dir=.
17241 for ac_exec_ext in '' $ac_executable_extensions; do
17242 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17243 ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
17244 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17245 break 2
17246 fi
17247done
17248 done
17249IFS=$as_save_IFS
17250
17251 ;;
17252esac
17253fi
17254XSLTPROC=$ac_cv_path_XSLTPROC
17255if test -n "$XSLTPROC"; then
17256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
17257$as_echo "$XSLTPROC" >&6; }
17258else
17259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17260$as_echo "no" >&6; }
17261fi
17262
17263
17264 test -n "$XSLTPROC" && break
17265done
17266test -n "$XSLTPROC" || XSLTPROC="missing"
17267
17268if test "x$USE_MAINTAINER_MODE" = xyes; then
17269 if test "${XSLTPROC}" = missing; then
17270 as_fn_error "unable to find xsltproc. maintainer-mode requires xsltproc." "$LINENO" 5
17271 fi
17272fi
17273
17274
bec39cab
AC
17275ac_sources="$files"
17276ac_dests="$links"
17277while test -n "$ac_sources"; do
17278 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
17279 set $ac_sources; ac_source=$1; shift; ac_sources=$*
17280 ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source"
17281done
81ecdfbb 17282ac_config_links="$ac_config_links $ac_config_links_1"
c906108c
SS
17283
17284
c906108c
SS
17285
17286
c906108c 17287
81ecdfbb 17288$as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
bec39cab 17289
bec39cab 17290
dcd1f979
TT
17291if $development; then
17292
17293$as_echo "#define GDB_SELF_TEST 1" >>confdefs.h
17294
07e253aa
PA
17295 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_UNITTESTS_OBS)"
17296 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_UNITTESTS_SRCS)"
dcd1f979
TT
17297fi
17298
b292c783 17299
f6a88844
JM
17300 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
17301 GDB_TRANSFORM_NAME=`echo gdb | sed -e "$gdb_ac_transform"`
17302 if test "x$GDB_TRANSFORM_NAME" = x; then
17303 GDB_TRANSFORM_NAME=gdb
17304 fi
17305
17306
17307
17308 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
17309 GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$gdb_ac_transform"`
17310 if test "x$GCORE_TRANSFORM_NAME" = x; then
17311 GCORE_TRANSFORM_NAME=gcore
17312 fi
17313
b292c783
JK
17314
17315ac_config_files="$ac_config_files gcore"
17316
c971b7fa 17317ac_config_files="$ac_config_files Makefile gdb-gdb.gdb doc/Makefile data-directory/Makefile"
81ecdfbb 17318
89a34d1b 17319
bec39cab
AC
17320cat >confcache <<\_ACEOF
17321# This file is a shell script that caches the results of configure
17322# tests run on this system so they can be shared between configure
17323# scripts and configure runs, see configure's option --config-cache.
17324# It is not useful on other systems. If it contains results you don't
17325# want to keep, you may remove or edit it.
17326#
17327# config.status only pays attention to the cache file if you give it
17328# the --recheck option to rerun configure.
17329#
17330# `ac_cv_env_foo' variables (set or unset) will be overridden when
17331# loading this file, other *unset* `ac_cv_foo' will be assigned the
17332# following values.
17333
17334_ACEOF
17335
17336# The following way of writing the cache mishandles newlines in values,
17337# but we know of no workaround that is simple, portable, and efficient.
81ecdfbb 17338# So, we kill variables containing newlines.
bec39cab
AC
17339# Ultrix sh set writes to stderr and can't be redirected directly,
17340# and sets the high bit in the cache file unless we assign to the vars.
81ecdfbb
RW
17341(
17342 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17343 eval ac_val=\$$ac_var
17344 case $ac_val in #(
17345 *${as_nl}*)
17346 case $ac_var in #(
17347 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17348$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
17349 esac
17350 case $ac_var in #(
17351 _ | IFS | as_nl) ;; #(
17352 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
17353 *) { eval $ac_var=; unset $ac_var;} ;;
17354 esac ;;
17355 esac
17356 done
17357
bec39cab 17358 (set) 2>&1 |
81ecdfbb
RW
17359 case $as_nl`(ac_space=' '; set) 2>&1` in #(
17360 *${as_nl}ac_space=\ *)
17361 # `set' does not quote correctly, so add quotes: double-quote
17362 # substitution turns \\\\ into \\, and sed turns \\ into \.
bec39cab
AC
17363 sed -n \
17364 "s/'/'\\\\''/g;
17365 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
81ecdfbb 17366 ;; #(
bec39cab
AC
17367 *)
17368 # `set' quotes correctly as required by POSIX, so do not add quotes.
81ecdfbb 17369 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
bec39cab 17370 ;;
81ecdfbb
RW
17371 esac |
17372 sort
17373) |
bec39cab 17374 sed '
81ecdfbb 17375 /^ac_cv_env_/b end
bec39cab 17376 t clear
81ecdfbb 17377 :clear
bec39cab
AC
17378 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17379 t end
81ecdfbb
RW
17380 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17381 :end' >>confcache
17382if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17383 if test -w "$cache_file"; then
17384 test "x$cache_file" != "x/dev/null" &&
17385 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17386$as_echo "$as_me: updating cache $cache_file" >&6;}
bec39cab
AC
17387 cat confcache >$cache_file
17388 else
81ecdfbb
RW
17389 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17390$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
bec39cab
AC
17391 fi
17392fi
17393rm -f confcache
17394
17395test "x$prefix" = xNONE && prefix=$ac_default_prefix
17396# Let make expand exec_prefix.
17397test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
17398
bec39cab
AC
17399DEFS=-DHAVE_CONFIG_H
17400
17401ac_libobjs=
17402ac_ltlibobjs=
17403for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17404 # 1. Remove the extension, and $U if already installed.
81ecdfbb
RW
17405 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
17406 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
17407 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
17408 # will be set to the directory where LIBOBJS objects are built.
17409 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17410 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
bec39cab
AC
17411done
17412LIBOBJS=$ac_libobjs
17413
17414LTLIBOBJS=$ac_ltlibobjs
17415
17416
85981d60 17417if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
81ecdfbb
RW
17418 as_fn_error "conditional \"MAINTAINER_MODE\" was never defined.
17419Usually this means the macro was only invoked conditionally." "$LINENO" 5
85981d60 17420fi
4df42755
DE
17421if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then
17422 as_fn_error "conditional \"HAVE_PYTHON\" was never defined.
17423Usually this means the macro was only invoked conditionally." "$LINENO" 5
17424fi
17425if test -z "${HAVE_GUILE_TRUE}" && test -z "${HAVE_GUILE_FALSE}"; then
17426 as_fn_error "conditional \"HAVE_GUILE\" was never defined.
17427Usually this means the macro was only invoked conditionally." "$LINENO" 5
17428fi
81ecdfbb
RW
17429
17430
bec39cab 17431: ${CONFIG_STATUS=./config.status}
81ecdfbb 17432ac_write_fail=0
bec39cab
AC
17433ac_clean_files_save=$ac_clean_files
17434ac_clean_files="$ac_clean_files $CONFIG_STATUS"
81ecdfbb
RW
17435{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17436$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
17437as_write_fail=0
17438cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
bec39cab
AC
17439#! $SHELL
17440# Generated by $as_me.
17441# Run this file to recreate the current configuration.
17442# Compiler output produced by configure, useful for debugging
17443# configure, is in config.log if it exists.
17444
17445debug=false
17446ac_cs_recheck=false
17447ac_cs_silent=false
bec39cab 17448
81ecdfbb
RW
17449SHELL=\${CONFIG_SHELL-$SHELL}
17450export SHELL
17451_ASEOF
17452cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17453## -------------------- ##
17454## M4sh Initialization. ##
17455## -------------------- ##
17456
17457# Be more Bourne compatible
17458DUALCASE=1; export DUALCASE # for MKS sh
17459if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
17460 emulate sh
17461 NULLCMD=:
81ecdfbb 17462 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
17463 # is contrary to our usage. Disable this feature.
17464 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
17465 setopt NO_GLOB_SUBST
17466else
17467 case `(set -o) 2>/dev/null` in #(
17468 *posix*) :
17469 set -o posix ;; #(
17470 *) :
17471 ;;
17472esac
bec39cab 17473fi
bec39cab 17474
81ecdfbb
RW
17475
17476as_nl='
17477'
17478export as_nl
17479# Printing a long string crashes Solaris 7 /usr/bin/printf.
17480as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
17481as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
17482as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
17483# Prefer a ksh shell builtin over an external printf program on Solaris,
17484# but without wasting forks for bash or zsh.
17485if test -z "$BASH_VERSION$ZSH_VERSION" \
17486 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
17487 as_echo='print -r --'
17488 as_echo_n='print -rn --'
17489elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
17490 as_echo='printf %s\n'
17491 as_echo_n='printf %s'
17492else
17493 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
17494 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
17495 as_echo_n='/usr/ucb/echo -n'
17496 else
17497 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
17498 as_echo_n_body='eval
17499 arg=$1;
17500 case $arg in #(
17501 *"$as_nl"*)
17502 expr "X$arg" : "X\\(.*\\)$as_nl";
17503 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
17504 esac;
17505 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
17506 '
17507 export as_echo_n_body
17508 as_echo_n='sh -c $as_echo_n_body as_echo'
17509 fi
17510 export as_echo_body
17511 as_echo='sh -c $as_echo_body as_echo'
17512fi
17513
17514# The user is always right.
17515if test "${PATH_SEPARATOR+set}" != set; then
17516 PATH_SEPARATOR=:
17517 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
17518 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
17519 PATH_SEPARATOR=';'
17520 }
bec39cab
AC
17521fi
17522
17523
81ecdfbb
RW
17524# IFS
17525# We need space, tab and new line, in precisely that order. Quoting is
17526# there to prevent editors from complaining about space-tab.
17527# (If _AS_PATH_WALK were called with IFS unset, it would disable word
17528# splitting by setting IFS to empty value.)
17529IFS=" "" $as_nl"
17530
17531# Find who we are. Look in the path if we contain no directory separator.
17532case $0 in #((
17533 *[\\/]* ) as_myself=$0 ;;
17534 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17535for as_dir in $PATH
17536do
17537 IFS=$as_save_IFS
17538 test -z "$as_dir" && as_dir=.
17539 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17540 done
17541IFS=$as_save_IFS
17542
17543 ;;
17544esac
17545# We did not find ourselves, most probably we were run as `sh COMMAND'
17546# in which case we are not to be found in the path.
17547if test "x$as_myself" = x; then
17548 as_myself=$0
17549fi
17550if test ! -f "$as_myself"; then
17551 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
17552 exit 1
17553fi
17554
17555# Unset variables that we do not need and which cause bugs (e.g. in
17556# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
17557# suppresses any "Segmentation fault" message there. '((' could
17558# trigger a bug in pdksh 5.2.14.
17559for as_var in BASH_ENV ENV MAIL MAILPATH
17560do eval test x\${$as_var+set} = xset \
17561 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
17562done
bec39cab
AC
17563PS1='$ '
17564PS2='> '
17565PS4='+ '
17566
17567# NLS nuisances.
81ecdfbb
RW
17568LC_ALL=C
17569export LC_ALL
17570LANGUAGE=C
17571export LANGUAGE
17572
17573# CDPATH.
17574(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
17575
17576
17577# as_fn_error ERROR [LINENO LOG_FD]
17578# ---------------------------------
17579# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
17580# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
17581# script with status $?, using 1 if that was 0.
17582as_fn_error ()
17583{
17584 as_status=$?; test $as_status -eq 0 && as_status=1
17585 if test "$3"; then
17586 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
17587 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
17588 fi
17589 $as_echo "$as_me: error: $1" >&2
17590 as_fn_exit $as_status
17591} # as_fn_error
17592
17593
17594# as_fn_set_status STATUS
17595# -----------------------
17596# Set $? to STATUS, without forking.
17597as_fn_set_status ()
17598{
17599 return $1
17600} # as_fn_set_status
17601
17602# as_fn_exit STATUS
17603# -----------------
17604# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
17605as_fn_exit ()
17606{
17607 set +e
17608 as_fn_set_status $1
17609 exit $1
17610} # as_fn_exit
17611
17612# as_fn_unset VAR
17613# ---------------
17614# Portably unset VAR.
17615as_fn_unset ()
17616{
17617 { eval $1=; unset $1;}
17618}
17619as_unset=as_fn_unset
17620# as_fn_append VAR VALUE
17621# ----------------------
17622# Append the text in VALUE to the end of the definition contained in VAR. Take
17623# advantage of any shell optimizations that allow amortized linear growth over
17624# repeated appends, instead of the typical quadratic growth present in naive
17625# implementations.
17626if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
17627 eval 'as_fn_append ()
17628 {
17629 eval $1+=\$2
17630 }'
17631else
17632 as_fn_append ()
17633 {
17634 eval $1=\$$1\$2
17635 }
17636fi # as_fn_append
17637
17638# as_fn_arith ARG...
17639# ------------------
17640# Perform arithmetic evaluation on the ARGs, and store the result in the
17641# global $as_val. Take advantage of shells that can avoid forks. The arguments
17642# must be portable across $(()) and expr.
17643if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
17644 eval 'as_fn_arith ()
17645 {
17646 as_val=$(( $* ))
17647 }'
17648else
17649 as_fn_arith ()
17650 {
17651 as_val=`expr "$@" || test $? -eq 1`
17652 }
17653fi # as_fn_arith
bec39cab 17654
81ecdfbb
RW
17655
17656if expr a : '\(a\)' >/dev/null 2>&1 &&
17657 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
17658 as_expr=expr
17659else
17660 as_expr=false
17661fi
17662
81ecdfbb 17663if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
17664 as_basename=basename
17665else
17666 as_basename=false
17667fi
17668
81ecdfbb
RW
17669if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17670 as_dirname=dirname
17671else
17672 as_dirname=false
17673fi
bec39cab 17674
81ecdfbb 17675as_me=`$as_basename -- "$0" ||
bec39cab
AC
17676$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17677 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
17678 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
17679$as_echo X/"$0" |
17680 sed '/^.*\/\([^/][^/]*\)\/*$/{
17681 s//\1/
17682 q
17683 }
17684 /^X\/\(\/\/\)$/{
17685 s//\1/
17686 q
17687 }
17688 /^X\/\(\/\).*/{
17689 s//\1/
17690 q
17691 }
17692 s/.*/./; q'`
b4e70030 17693
b4e70030
JB
17694# Avoid depending upon Character Ranges.
17695as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17696as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17697as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17698as_cr_digits='0123456789'
17699as_cr_alnum=$as_cr_Letters$as_cr_digits
17700
81ecdfbb
RW
17701ECHO_C= ECHO_N= ECHO_T=
17702case `echo -n x` in #(((((
17703-n*)
17704 case `echo 'xy\c'` in
17705 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
17706 xy) ECHO_C='\c';;
17707 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
17708 ECHO_T=' ';;
17709 esac;;
17710*)
17711 ECHO_N='-n';;
bec39cab
AC
17712esac
17713
81ecdfbb
RW
17714rm -f conf$$ conf$$.exe conf$$.file
17715if test -d conf$$.dir; then
17716 rm -f conf$$.dir/conf$$.file
bec39cab 17717else
81ecdfbb
RW
17718 rm -f conf$$.dir
17719 mkdir conf$$.dir 2>/dev/null
bec39cab 17720fi
81ecdfbb
RW
17721if (echo >conf$$.file) 2>/dev/null; then
17722 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 17723 as_ln_s='ln -s'
81ecdfbb
RW
17724 # ... but there are two gotchas:
17725 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17726 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
17727 # In both cases, we have to default to `cp -p'.
17728 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
17729 as_ln_s='cp -p'
17730 elif ln conf$$.file conf$$ 2>/dev/null; then
17731 as_ln_s=ln
17732 else
17733 as_ln_s='cp -p'
b4e70030 17734 fi
bec39cab
AC
17735else
17736 as_ln_s='cp -p'
17737fi
81ecdfbb
RW
17738rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17739rmdir conf$$.dir 2>/dev/null
17740
17741
17742# as_fn_mkdir_p
17743# -------------
17744# Create "$as_dir" as a directory, including parents if necessary.
17745as_fn_mkdir_p ()
17746{
17747
17748 case $as_dir in #(
17749 -*) as_dir=./$as_dir;;
17750 esac
17751 test -d "$as_dir" || eval $as_mkdir_p || {
17752 as_dirs=
17753 while :; do
17754 case $as_dir in #(
17755 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17756 *) as_qdir=$as_dir;;
17757 esac
17758 as_dirs="'$as_qdir' $as_dirs"
17759 as_dir=`$as_dirname -- "$as_dir" ||
17760$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17761 X"$as_dir" : 'X\(//\)[^/]' \| \
17762 X"$as_dir" : 'X\(//\)$' \| \
17763 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17764$as_echo X"$as_dir" |
17765 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17766 s//\1/
17767 q
17768 }
17769 /^X\(\/\/\)[^/].*/{
17770 s//\1/
17771 q
17772 }
17773 /^X\(\/\/\)$/{
17774 s//\1/
17775 q
17776 }
17777 /^X\(\/\).*/{
17778 s//\1/
17779 q
17780 }
17781 s/.*/./; q'`
17782 test -d "$as_dir" && break
17783 done
17784 test -z "$as_dirs" || eval "mkdir $as_dirs"
17785 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
17786
bec39cab 17787
81ecdfbb 17788} # as_fn_mkdir_p
bec39cab 17789if mkdir -p . 2>/dev/null; then
81ecdfbb 17790 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
17791else
17792 test -d ./-p && rmdir ./-p
17793 as_mkdir_p=false
17794fi
17795
81ecdfbb
RW
17796if test -x / >/dev/null 2>&1; then
17797 as_test_x='test -x'
17798else
17799 if ls -dL / >/dev/null 2>&1; then
17800 as_ls_L_option=L
17801 else
17802 as_ls_L_option=
17803 fi
17804 as_test_x='
17805 eval sh -c '\''
17806 if test -d "$1"; then
17807 test -d "$1/.";
17808 else
17809 case $1 in #(
17810 -*)set "./$1";;
17811 esac;
17812 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
17813 ???[sx]*):;;*)false;;esac;fi
17814 '\'' sh
17815 '
17816fi
17817as_executable_p=$as_test_x
bec39cab
AC
17818
17819# Sed expression to map a string onto a valid CPP name.
17820as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
17821
17822# Sed expression to map a string onto a valid variable name.
17823as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
17824
17825
bec39cab 17826exec 6>&1
81ecdfbb
RW
17827## ----------------------------------- ##
17828## Main body of $CONFIG_STATUS script. ##
17829## ----------------------------------- ##
17830_ASEOF
17831test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
17832
17833cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17834# Save the log message, to keep $0 and so on meaningful, and to
bec39cab 17835# report actual input values of CONFIG_FILES etc. instead of their
81ecdfbb
RW
17836# values after options handling.
17837ac_log="
bec39cab 17838This file was extended by $as_me, which was
81ecdfbb 17839generated by GNU Autoconf 2.64. Invocation command line was
bec39cab
AC
17840
17841 CONFIG_FILES = $CONFIG_FILES
17842 CONFIG_HEADERS = $CONFIG_HEADERS
17843 CONFIG_LINKS = $CONFIG_LINKS
17844 CONFIG_COMMANDS = $CONFIG_COMMANDS
17845 $ $0 $@
17846
81ecdfbb
RW
17847on `(hostname || uname -n) 2>/dev/null | sed 1q`
17848"
17849
bec39cab
AC
17850_ACEOF
17851
81ecdfbb
RW
17852case $ac_config_files in *"
17853"*) set x $ac_config_files; shift; ac_config_files=$*;;
17854esac
234b45d4 17855
81ecdfbb
RW
17856case $ac_config_headers in *"
17857"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17858esac
b4e70030 17859
b4e70030 17860
81ecdfbb
RW
17861cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17862# Files that config.status was made for.
17863config_files="$ac_config_files"
17864config_headers="$ac_config_headers"
17865config_links="$ac_config_links"
17866config_commands="$ac_config_commands"
234b45d4 17867
81ecdfbb 17868_ACEOF
b4e70030 17869
81ecdfbb 17870cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab 17871ac_cs_usage="\
81ecdfbb
RW
17872\`$as_me' instantiates files and other configuration actions
17873from templates according to the current configuration. Unless the files
17874and actions are specified as TAGs, all are instantiated by default.
234b45d4 17875
81ecdfbb 17876Usage: $0 [OPTION]... [TAG]...
234b45d4 17877
bec39cab 17878 -h, --help print this help, then exit
81ecdfbb
RW
17879 -V, --version print version number and configuration settings, then exit
17880 -q, --quiet, --silent
17881 do not print progress messages
bec39cab
AC
17882 -d, --debug don't remove temporary files
17883 --recheck update $as_me by reconfiguring in the same conditions
81ecdfbb
RW
17884 --file=FILE[:TEMPLATE]
17885 instantiate the configuration file FILE
17886 --header=FILE[:TEMPLATE]
17887 instantiate the configuration header FILE
234b45d4 17888
bec39cab
AC
17889Configuration files:
17890$config_files
234b45d4 17891
bec39cab
AC
17892Configuration headers:
17893$config_headers
234b45d4 17894
bec39cab
AC
17895Configuration links:
17896$config_links
234b45d4 17897
bec39cab
AC
17898Configuration commands:
17899$config_commands
17900
81ecdfbb 17901Report bugs to the package provider."
b4e70030 17902
81ecdfbb
RW
17903_ACEOF
17904cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab
AC
17905ac_cs_version="\\
17906config.status
81ecdfbb
RW
17907configured by $0, generated by GNU Autoconf 2.64,
17908 with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
bec39cab 17909
81ecdfbb 17910Copyright (C) 2009 Free Software Foundation, Inc.
bec39cab
AC
17911This config.status script is free software; the Free Software Foundation
17912gives unlimited permission to copy, distribute and modify it."
81ecdfbb
RW
17913
17914ac_pwd='$ac_pwd'
17915srcdir='$srcdir'
17916INSTALL='$INSTALL'
81ecdfbb
RW
17917AWK='$AWK'
17918test -n "\$AWK" || AWK=awk
bec39cab
AC
17919_ACEOF
17920
81ecdfbb
RW
17921cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17922# The default lists apply if the user does not specify any file.
bec39cab
AC
17923ac_need_defaults=:
17924while test $# != 0
17925do
17926 case $1 in
17927 --*=*)
81ecdfbb
RW
17928 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17929 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
bec39cab 17930 ac_shift=:
c906108c 17931 ;;
81ecdfbb 17932 *)
bec39cab
AC
17933 ac_option=$1
17934 ac_optarg=$2
17935 ac_shift=shift
c906108c 17936 ;;
bec39cab 17937 esac
c906108c 17938
bec39cab
AC
17939 case $ac_option in
17940 # Handling of the options.
bec39cab
AC
17941 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17942 ac_cs_recheck=: ;;
81ecdfbb
RW
17943 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
17944 $as_echo "$ac_cs_version"; exit ;;
17945 --debug | --debu | --deb | --de | --d | -d )
bec39cab
AC
17946 debug=: ;;
17947 --file | --fil | --fi | --f )
17948 $ac_shift
81ecdfbb
RW
17949 case $ac_optarg in
17950 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17951 esac
17952 as_fn_append CONFIG_FILES " '$ac_optarg'"
bec39cab
AC
17953 ac_need_defaults=false;;
17954 --header | --heade | --head | --hea )
17955 $ac_shift
81ecdfbb
RW
17956 case $ac_optarg in
17957 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17958 esac
17959 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
bec39cab 17960 ac_need_defaults=false;;
81ecdfbb
RW
17961 --he | --h)
17962 # Conflict between --help and --header
17963 as_fn_error "ambiguous option: \`$1'
17964Try \`$0 --help' for more information.";;
17965 --help | --hel | -h )
17966 $as_echo "$ac_cs_usage"; exit ;;
bec39cab
AC
17967 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17968 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17969 ac_cs_silent=: ;;
c906108c 17970
bec39cab 17971 # This is an error.
81ecdfbb
RW
17972 -*) as_fn_error "unrecognized option: \`$1'
17973Try \`$0 --help' for more information." ;;
c906108c 17974
81ecdfbb
RW
17975 *) as_fn_append ac_config_targets " $1"
17976 ac_need_defaults=false ;;
c906108c 17977
bec39cab
AC
17978 esac
17979 shift
17980done
c906108c 17981
bec39cab 17982ac_configure_extra_args=
c906108c 17983
bec39cab
AC
17984if $ac_cs_silent; then
17985 exec 6>/dev/null
17986 ac_configure_extra_args="$ac_configure_extra_args --silent"
17987fi
c906108c 17988
bec39cab 17989_ACEOF
81ecdfbb 17990cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab 17991if \$ac_cs_recheck; then
81ecdfbb
RW
17992 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
17993 shift
17994 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17995 CONFIG_SHELL='$SHELL'
17996 export CONFIG_SHELL
17997 exec "\$@"
bec39cab
AC
17998fi
17999
18000_ACEOF
81ecdfbb
RW
18001cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18002exec 5>>config.log
18003{
18004 echo
18005 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18006## Running $as_me. ##
18007_ASBOX
18008 $as_echo "$ac_log"
18009} >&5
bec39cab 18010
81ecdfbb
RW
18011_ACEOF
18012cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
c906108c 18013#
81ecdfbb 18014# INIT-COMMANDS
c906108c 18015#
a417dc56 18016ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
f38307f5 18017ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR CONFIG_SRC_SUBDIR="$CONFIG_SRC_SUBDIR"
b4e70030 18018
bec39cab
AC
18019_ACEOF
18020
81ecdfbb 18021cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
4e8d927d 18022
81ecdfbb 18023# Handling of arguments.
bec39cab 18024for ac_config_target in $ac_config_targets
c906108c 18025do
81ecdfbb
RW
18026 case $ac_config_target in
18027 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
18028 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
f38307f5 18029 "gdbdepdir") CONFIG_COMMANDS="$CONFIG_COMMANDS gdbdepdir" ;;
f997c383 18030 "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
81ecdfbb 18031 "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;;
b292c783 18032 "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;;
81ecdfbb 18033 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
e2207b9a 18034 "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;;
5ae98d25 18035 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
aa2e2d8d 18036 "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
81ecdfbb
RW
18037
18038 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
c906108c
SS
18039 esac
18040done
18041
81ecdfbb 18042
bec39cab
AC
18043# If the user did not use the arguments to specify the items to instantiate,
18044# then the envvar interface is used. Set only those that are not.
18045# We use the long form for the default assignment because of an extremely
18046# bizarre bug on SunOS 4.1.3.
18047if $ac_need_defaults; then
18048 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18049 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18050 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
18051 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
18052fi
18053
b4e70030 18054# Have a temporary directory for convenience. Make it in the build tree
81ecdfbb 18055# simply because there is no reason against having it here, and in addition,
b4e70030 18056# creating and moving files from /tmp can sometimes cause problems.
81ecdfbb
RW
18057# Hook for its removal unless debugging.
18058# Note that there is a small window in which the directory will not be cleaned:
18059# after its creation but before its name has been assigned to `$tmp'.
b4e70030
JB
18060$debug ||
18061{
81ecdfbb
RW
18062 tmp=
18063 trap 'exit_status=$?
18064 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
18065' 0
18066 trap 'as_fn_exit 1' 1 2 13 15
18067}
18068# Create a (secure) tmp directory for tmp files.
18069
18070{
18071 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
18072 test -n "$tmp" && test -d "$tmp"
18073} ||
18074{
18075 tmp=./conf$$-$RANDOM
18076 (umask 077 && mkdir "$tmp")
18077} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
18078
18079# Set up the scripts for CONFIG_FILES section.
18080# No need to generate them if there are no CONFIG_FILES.
18081# This happens for instance with `./config.status config.h'.
18082if test -n "$CONFIG_FILES"; then
18083
18084if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
18085 ac_cs_awk_getline=:
18086 ac_cs_awk_pipe_init=
18087 ac_cs_awk_read_file='
18088 while ((getline aline < (F[key])) > 0)
18089 print(aline)
18090 close(F[key])'
18091 ac_cs_awk_pipe_fini=
18092else
18093 ac_cs_awk_getline=false
18094 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
18095 ac_cs_awk_read_file='
18096 print "|#_!!_#|"
18097 print "cat " F[key] " &&"
18098 '$ac_cs_awk_pipe_init
18099 # The final `:' finishes the AND list.
18100 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
18101fi
18102ac_cr=`echo X | tr X '\015'`
18103# On cygwin, bash can eat \r inside `` if the user requested igncr.
18104# But we know of no other shell where ac_cr would be empty at this
18105# point, so we can use a bashism as a fallback.
18106if test "x$ac_cr" = x; then
18107 eval ac_cr=\$\'\\r\'
18108fi
18109ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
18110if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
18111 ac_cs_awk_cr='\r'
18112else
18113 ac_cs_awk_cr=$ac_cr
18114fi
18115
18116echo 'BEGIN {' >"$tmp/subs1.awk" &&
18117_ACEOF
18118
18119# Create commands to substitute file output variables.
18120{
18121 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
18122 echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' &&
18123 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
18124 echo "_ACAWK" &&
18125 echo "_ACEOF"
18126} >conf$$files.sh &&
18127. ./conf$$files.sh ||
18128 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
18129rm -f conf$$files.sh
18130
18131{
18132 echo "cat >conf$$subs.awk <<_ACEOF" &&
18133 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
18134 echo "_ACEOF"
18135} >conf$$subs.sh ||
18136 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
18137ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
18138ac_delim='%!_!# '
18139for ac_last_try in false false false false false :; do
18140 . ./conf$$subs.sh ||
18141 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
18142
18143 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
18144 if test $ac_delim_n = $ac_delim_num; then
18145 break
18146 elif $ac_last_try; then
18147 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
18148 else
18149 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18150 fi
18151done
18152rm -f conf$$subs.sh
18153
18154cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18155cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
18156_ACEOF
18157sed -n '
18158h
18159s/^/S["/; s/!.*/"]=/
18160p
18161g
18162s/^[^!]*!//
18163:repl
18164t repl
18165s/'"$ac_delim"'$//
18166t delim
18167:nl
18168h
18169s/\(.\{148\}\).*/\1/
18170t more1
18171s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
18172p
18173n
18174b repl
18175:more1
18176s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18177p
18178g
18179s/.\{148\}//
18180t nl
18181:delim
18182h
18183s/\(.\{148\}\).*/\1/
18184t more2
18185s/["\\]/\\&/g; s/^/"/; s/$/"/
18186p
18187b
18188:more2
18189s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18190p
18191g
18192s/.\{148\}//
18193t delim
18194' <conf$$subs.awk | sed '
18195/^[^""]/{
18196 N
18197 s/\n//
18198}
18199' >>$CONFIG_STATUS || ac_write_fail=1
18200rm -f conf$$subs.awk
18201cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18202_ACAWK
18203cat >>"\$tmp/subs1.awk" <<_ACAWK &&
18204 for (key in S) S_is_set[key] = 1
18205 FS = "\a"
18206 \$ac_cs_awk_pipe_init
18207}
18208{
18209 line = $ 0
18210 nfields = split(line, field, "@")
18211 substed = 0
18212 len = length(field[1])
18213 for (i = 2; i < nfields; i++) {
18214 key = field[i]
18215 keylen = length(key)
18216 if (S_is_set[key]) {
18217 value = S[key]
18218 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
18219 len += length(value) + length(field[++i])
18220 substed = 1
18221 } else
18222 len += 1 + keylen
18223 }
18224 if (nfields == 3 && !substed) {
18225 key = field[2]
18226 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
18227 \$ac_cs_awk_read_file
18228 next
18229 }
18230 }
18231 print line
b4e70030 18232}
81ecdfbb
RW
18233\$ac_cs_awk_pipe_fini
18234_ACAWK
18235_ACEOF
18236cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18237if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
18238 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
18239else
18240 cat
18241fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
18242 || as_fn_error "could not setup config files machinery" "$LINENO" 5
18243_ACEOF
18244
18245# VPATH may cause trouble with some makes, so we remove $(srcdir),
18246# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
18247# trailing colons and then remove the whole line if VPATH becomes empty
18248# (actually we leave an empty line to preserve line numbers).
18249if test "x$srcdir" = x.; then
18250 ac_vpsub='/^[ ]*VPATH[ ]*=/{
18251s/:*\$(srcdir):*/:/
18252s/:*\${srcdir}:*/:/
18253s/:*@srcdir@:*/:/
18254s/^\([^=]*=[ ]*\):*/\1/
18255s/:*$//
18256s/^[^=]*=[ ]*$//
18257}'
18258fi
18259
18260cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18261fi # test -n "$CONFIG_FILES"
18262
18263# Set up the scripts for CONFIG_HEADERS section.
18264# No need to generate them if there are no CONFIG_HEADERS.
18265# This happens for instance with `./config.status Makefile'.
18266if test -n "$CONFIG_HEADERS"; then
18267cat >"$tmp/defines.awk" <<\_ACAWK ||
18268BEGIN {
18269_ACEOF
18270
18271# Transform confdefs.h into an awk script `defines.awk', embedded as
18272# here-document in config.status, that substitutes the proper values into
18273# config.h.in to produce config.h.
4e8d927d 18274
81ecdfbb
RW
18275# Create a delimiter string that does not exist in confdefs.h, to ease
18276# handling of long lines.
18277ac_delim='%!_!# '
18278for ac_last_try in false false :; do
18279 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
18280 if test -z "$ac_t"; then
18281 break
18282 elif $ac_last_try; then
18283 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
18284 else
18285 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18286 fi
18287done
4e8d927d 18288
81ecdfbb
RW
18289# For the awk script, D is an array of macro values keyed by name,
18290# likewise P contains macro parameters if any. Preserve backslash
18291# newline sequences.
18292
18293ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
18294sed -n '
18295s/.\{148\}/&'"$ac_delim"'/g
18296t rset
18297:rset
18298s/^[ ]*#[ ]*define[ ][ ]*/ /
18299t def
18300d
18301:def
18302s/\\$//
18303t bsnl
18304s/["\\]/\\&/g
18305s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18306D["\1"]=" \3"/p
18307s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
18308d
18309:bsnl
18310s/["\\]/\\&/g
18311s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18312D["\1"]=" \3\\\\\\n"\\/p
18313t cont
18314s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
18315t cont
18316d
18317:cont
18318n
18319s/.\{148\}/&'"$ac_delim"'/g
18320t clear
18321:clear
18322s/\\$//
18323t bsnlc
18324s/["\\]/\\&/g; s/^/"/; s/$/"/p
18325d
18326:bsnlc
18327s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
18328b cont
18329' <confdefs.h | sed '
18330s/'"$ac_delim"'/"\\\
18331"/g' >>$CONFIG_STATUS || ac_write_fail=1
18332
18333cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18334 for (key in D) D_is_set[key] = 1
18335 FS = "\a"
18336}
18337/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18338 line = \$ 0
18339 split(line, arg, " ")
18340 if (arg[1] == "#") {
18341 defundef = arg[2]
18342 mac1 = arg[3]
18343 } else {
18344 defundef = substr(arg[1], 2)
18345 mac1 = arg[2]
18346 }
18347 split(mac1, mac2, "(") #)
18348 macro = mac2[1]
18349 prefix = substr(line, 1, index(line, defundef) - 1)
18350 if (D_is_set[macro]) {
18351 # Preserve the white space surrounding the "#".
18352 print prefix "define", macro P[macro] D[macro]
18353 next
18354 } else {
18355 # Replace #undef with comments. This is necessary, for example,
18356 # in the case of _POSIX_SOURCE, which is predefined and required
18357 # on some systems where configure will not decide to define it.
18358 if (defundef == "undef") {
18359 print "/*", prefix defundef, macro, "*/"
18360 next
18361 }
18362 }
b4e70030 18363}
81ecdfbb
RW
18364{ print }
18365_ACAWK
b4e70030 18366_ACEOF
81ecdfbb
RW
18367cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18368 as_fn_error "could not setup config headers machinery" "$LINENO" 5
18369fi # test -n "$CONFIG_HEADERS"
4e8d927d 18370
4e8d927d 18371
81ecdfbb
RW
18372eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
18373shift
18374for ac_tag
18375do
18376 case $ac_tag in
18377 :[FHLC]) ac_mode=$ac_tag; continue;;
18378 esac
18379 case $ac_mode$ac_tag in
18380 :[FHL]*:*);;
18381 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
18382 :[FH]-) ac_tag=-:-;;
18383 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18384 esac
18385 ac_save_IFS=$IFS
18386 IFS=:
18387 set x $ac_tag
18388 IFS=$ac_save_IFS
18389 shift
18390 ac_file=$1
18391 shift
4e8d927d 18392
81ecdfbb
RW
18393 case $ac_mode in
18394 :L) ac_source=$1;;
18395 :[FH])
18396 ac_file_inputs=
18397 for ac_f
18398 do
18399 case $ac_f in
18400 -) ac_f="$tmp/stdin";;
18401 *) # Look for the file first in the build tree, then in the source tree
18402 # (if the path is not absolute). The absolute path cannot be DOS-style,
18403 # because $ac_f cannot contain `:'.
18404 test -f "$ac_f" ||
18405 case $ac_f in
18406 [\\/$]*) false;;
18407 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18408 esac ||
18409 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
18410 esac
18411 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
18412 as_fn_append ac_file_inputs " '$ac_f'"
18413 done
18414
18415 # Let's still pretend it is `configure' which instantiates (i.e., don't
18416 # use $as_me), people would be surprised to read:
18417 # /* config.h. Generated by config.status. */
18418 configure_input='Generated from '`
18419 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
18420 `' by configure.'
18421 if test x"$ac_file" != x-; then
18422 configure_input="$ac_file. $configure_input"
18423 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18424$as_echo "$as_me: creating $ac_file" >&6;}
b4e70030 18425 fi
81ecdfbb
RW
18426 # Neutralize special characters interpreted by sed in replacement strings.
18427 case $configure_input in #(
18428 *\&* | *\|* | *\\* )
18429 ac_sed_conf_input=`$as_echo "$configure_input" |
18430 sed 's/[\\\\&|]/\\\\&/g'`;; #(
18431 *) ac_sed_conf_input=$configure_input;;
18432 esac
4e8d927d 18433
81ecdfbb
RW
18434 case $ac_tag in
18435 *:-:* | *:-) cat >"$tmp/stdin" \
18436 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
18437 esac
18438 ;;
c906108c
SS
18439 esac
18440
81ecdfbb 18441 ac_dir=`$as_dirname -- "$ac_file" ||
bec39cab
AC
18442$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18443 X"$ac_file" : 'X\(//\)[^/]' \| \
18444 X"$ac_file" : 'X\(//\)$' \| \
81ecdfbb
RW
18445 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
18446$as_echo X"$ac_file" |
18447 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18448 s//\1/
18449 q
18450 }
18451 /^X\(\/\/\)[^/].*/{
18452 s//\1/
18453 q
18454 }
18455 /^X\(\/\/\)$/{
18456 s//\1/
18457 q
18458 }
18459 /^X\(\/\).*/{
18460 s//\1/
18461 q
18462 }
18463 s/.*/./; q'`
18464 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
18465 ac_builddir=.
18466
81ecdfbb
RW
18467case "$ac_dir" in
18468.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18469*)
18470 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
18471 # A ".." for each directory in $ac_dir_suffix.
18472 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
18473 case $ac_top_builddir_sub in
18474 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18475 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18476 esac ;;
18477esac
18478ac_abs_top_builddir=$ac_pwd
18479ac_abs_builddir=$ac_pwd$ac_dir_suffix
18480# for backward compatibility:
18481ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
18482
18483case $srcdir in
81ecdfbb 18484 .) # We are building in place.
bec39cab 18485 ac_srcdir=.
81ecdfbb
RW
18486 ac_top_srcdir=$ac_top_builddir_sub
18487 ac_abs_top_srcdir=$ac_pwd ;;
18488 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 18489 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
18490 ac_top_srcdir=$srcdir
18491 ac_abs_top_srcdir=$srcdir ;;
18492 *) # Relative name.
18493 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18494 ac_top_srcdir=$ac_top_build_prefix$srcdir
18495 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 18496esac
81ecdfbb 18497ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 18498
c906108c 18499
81ecdfbb
RW
18500 case $ac_mode in
18501 :F)
18502 #
18503 # CONFIG_FILE
18504 #
c906108c 18505
bec39cab
AC
18506 case $INSTALL in
18507 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
81ecdfbb 18508 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
c906108c 18509 esac
81ecdfbb 18510_ACEOF
121ce6e5 18511
81ecdfbb
RW
18512cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18513# If the template does not know about datarootdir, expand it.
18514# FIXME: This hack should be removed a few years after 2.60.
18515ac_datarootdir_hack=; ac_datarootdir_seen=
18516ac_sed_dataroot='
18517/datarootdir/ {
18518 p
18519 q
18520}
18521/@datadir@/p
18522/@docdir@/p
18523/@infodir@/p
18524/@localedir@/p
18525/@mandir@/p'
18526case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
18527*datarootdir*) ac_datarootdir_seen=yes;;
18528*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
18529 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18530$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
18531_ACEOF
18532cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18533 ac_datarootdir_hack='
18534 s&@datadir@&$datadir&g
18535 s&@docdir@&$docdir&g
18536 s&@infodir@&$infodir&g
18537 s&@localedir@&$localedir&g
18538 s&@mandir@&$mandir&g
18539 s&\\\${datarootdir}&$datarootdir&g' ;;
18540esac
4e8d927d 18541_ACEOF
81ecdfbb
RW
18542
18543# Neutralize VPATH when `$srcdir' = `.'.
18544# Shell code in configure.ac might set extrasub.
18545# FIXME: do we really want to maintain this feature?
18546cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18547ac_sed_extra="$ac_vpsub
bec39cab
AC
18548$extrasub
18549_ACEOF
81ecdfbb 18550cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab
AC
18551:t
18552/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
81ecdfbb
RW
18553s|@configure_input@|$ac_sed_conf_input|;t t
18554s&@top_builddir@&$ac_top_builddir_sub&;t t
18555s&@top_build_prefix@&$ac_top_build_prefix&;t t
18556s&@srcdir@&$ac_srcdir&;t t
18557s&@abs_srcdir@&$ac_abs_srcdir&;t t
18558s&@top_srcdir@&$ac_top_srcdir&;t t
18559s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
18560s&@builddir@&$ac_builddir&;t t
18561s&@abs_builddir@&$ac_abs_builddir&;t t
18562s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
18563s&@INSTALL@&$ac_INSTALL&;t t
81ecdfbb
RW
18564$ac_datarootdir_hack
18565"
18566eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
18567if $ac_cs_awk_getline; then
18568 $AWK -f "$tmp/subs.awk"
18569else
18570 $AWK -f "$tmp/subs.awk" | $SHELL
18571fi >$tmp/out \
18572 || as_fn_error "could not create $ac_file" "$LINENO" 5
18573
18574test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
18575 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
18576 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
18577 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
18578which seems to be undefined. Please make sure it is defined." >&5
18579$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
18580which seems to be undefined. Please make sure it is defined." >&2;}
18581
18582 rm -f "$tmp/stdin"
bec39cab 18583 case $ac_file in
81ecdfbb
RW
18584 -) cat "$tmp/out" && rm -f "$tmp/out";;
18585 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
18586 esac \
18587 || as_fn_error "could not create $ac_file" "$LINENO" 5
18588 ;;
18589 :H)
18590 #
18591 # CONFIG_HEADER
18592 #
bec39cab 18593 if test x"$ac_file" != x-; then
81ecdfbb
RW
18594 {
18595 $as_echo "/* $configure_input */" \
18596 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
18597 } >"$tmp/config.h" \
18598 || as_fn_error "could not create $ac_file" "$LINENO" 5
18599 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
18600 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
18601$as_echo "$as_me: $ac_file is unchanged" >&6;}
bec39cab 18602 else
81ecdfbb
RW
18603 rm -f "$ac_file"
18604 mv "$tmp/config.h" "$ac_file" \
18605 || as_fn_error "could not create $ac_file" "$LINENO" 5
bec39cab
AC
18606 fi
18607 else
81ecdfbb
RW
18608 $as_echo "/* $configure_input */" \
18609 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
18610 || as_fn_error "could not create -" "$LINENO" 5
bec39cab 18611 fi
81ecdfbb
RW
18612 ;;
18613 :L)
18614 #
18615 # CONFIG_LINK
18616 #
c906108c 18617
81ecdfbb
RW
18618 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
18619 :
b4e70030 18620 else
81ecdfbb
RW
18621 # Prefer the file from the source tree if names are identical.
18622 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
18623 ac_source=$srcdir/$ac_source
18624 fi
b4e70030 18625
81ecdfbb
RW
18626 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
18627$as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
b4e70030 18628
81ecdfbb
RW
18629 if test ! -r "$ac_source"; then
18630 as_fn_error "$ac_source: file not found" "$LINENO" 5
18631 fi
18632 rm -f "$ac_file"
bec39cab 18633
81ecdfbb
RW
18634 # Try a relative symlink, then a hard link, then a copy.
18635 case $srcdir in
18636 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
18637 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
18638 esac
18639 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
18640 ln "$ac_source" "$ac_file" 2>/dev/null ||
18641 cp -p "$ac_source" "$ac_file" ||
18642 as_fn_error "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
18643 fi
18644 ;;
18645 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
18646$as_echo "$as_me: executing $ac_file commands" >&6;}
18647 ;;
c906108c 18648 esac
b4e70030 18649
bec39cab 18650
81ecdfbb
RW
18651 case $ac_file$ac_mode in
18652 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
f38307f5
YQ
18653 "gdbdepdir":C)
18654 for subdir in ${CONFIG_SRC_SUBDIR}
18655 do
18656 $SHELL $ac_aux_dir/mkinstalldirs $subdir/$DEPDIR
18657 done ;;
b292c783 18658 "gcore":F) chmod +x gcore ;;
1e94266c
SM
18659 "Makefile":F)
18660case x$CONFIG_HEADERS in
18661xconfig.h:config.in)
18662echo > stamp-h ;;
18663esac
18664 ;;
18665 "gdb-gdb.gdb":F)
18666case x$CONFIG_HEADERS in
18667xconfig.h:config.in)
18668echo > stamp-h ;;
18669esac
18670 ;;
18671 "doc/Makefile":F)
18672case x$CONFIG_HEADERS in
18673xconfig.h:config.in)
18674echo > stamp-h ;;
18675esac
18676 ;;
18677 "data-directory/Makefile":F)
c906108c
SS
18678case x$CONFIG_HEADERS in
18679xconfig.h:config.in)
18680echo > stamp-h ;;
18681esac
bec39cab 18682 ;;
81ecdfbb 18683
bec39cab 18684 esac
81ecdfbb 18685done # for ac_tag
c906108c 18686
bec39cab 18687
81ecdfbb 18688as_fn_exit 0
bec39cab 18689_ACEOF
bec39cab
AC
18690ac_clean_files=$ac_clean_files_save
18691
81ecdfbb
RW
18692test $ac_write_fail = 0 ||
18693 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
18694
bec39cab
AC
18695
18696# configure is writing to config.log, and then calls config.status.
18697# config.status does its own redirection, appending to config.log.
18698# Unfortunately, on DOS this fails, as config.log is still kept open
18699# by configure, so config.status won't be able to write to it; its
18700# output is simply discarded. So we exec the FD to /dev/null,
18701# effectively closing config.log, so it can be properly (re)opened and
18702# appended to by config.status. When coming back to configure, we
18703# need to make the FD available again.
18704if test "$no_create" != yes; then
18705 ac_cs_success=:
18706 ac_config_status_args=
18707 test "$silent" = yes &&
18708 ac_config_status_args="$ac_config_status_args --quiet"
18709 exec 5>/dev/null
18710 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
18711 exec 5>>config.log
18712 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18713 # would make configure fail if this is the last instruction.
81ecdfbb 18714 $ac_cs_success || as_fn_exit $?
bec39cab 18715fi
c906108c 18716
bec39cab 18717#
81ecdfbb 18718# CONFIG_SUBDIRS section.
bec39cab 18719#
c906108c
SS
18720if test "$no_recursion" != yes; then
18721
81ecdfbb
RW
18722 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
18723 # so they do not pile up.
c906108c
SS
18724 ac_sub_configure_args=
18725 ac_prev=
fdc59709
PB
18726 eval "set x $ac_configure_args"
18727 shift
18728 for ac_arg
18729 do
c906108c
SS
18730 if test -n "$ac_prev"; then
18731 ac_prev=
18732 continue
18733 fi
bec39cab 18734 case $ac_arg in
c906108c
SS
18735 -cache-file | --cache-file | --cache-fil | --cache-fi \
18736 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
18737 ac_prev=cache_file ;;
18738 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
bec39cab
AC
18739 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
18740 | --c=*)
18741 ;;
18742 --config-cache | -C)
c906108c
SS
18743 ;;
18744 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
18745 ac_prev=srcdir ;;
18746 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
18747 ;;
bec39cab
AC
18748 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
18749 ac_prev=prefix ;;
18750 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
18751 ;;
81ecdfbb
RW
18752 --disable-option-checking)
18753 ;;
fdc59709
PB
18754 *)
18755 case $ac_arg in
81ecdfbb 18756 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 18757 esac
81ecdfbb 18758 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
c906108c
SS
18759 esac
18760 done
18761
bec39cab
AC
18762 # Always prepend --prefix to ensure using the same prefix
18763 # in subdir configurations.
fdc59709
PB
18764 ac_arg="--prefix=$prefix"
18765 case $ac_arg in
81ecdfbb 18766 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 18767 esac
81ecdfbb
RW
18768 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
18769
18770 # Pass --silent
18771 if test "$silent" = yes; then
18772 ac_sub_configure_args="--silent $ac_sub_configure_args"
18773 fi
18774
18775 # Always prepend --disable-option-checking to silence warnings, since
18776 # different subdirs can have different --enable and --with options.
18777 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
bec39cab 18778
b4e70030 18779 ac_popdir=`pwd`
bec39cab 18780 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
c906108c
SS
18781
18782 # Do not complain, so a configure script can configure whichever
18783 # parts of a large source tree are present.
fdc59709 18784 test -d "$srcdir/$ac_dir" || continue
c906108c 18785
81ecdfbb
RW
18786 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
18787 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
18788 $as_echo "$ac_msg" >&6
18789 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
18790 ac_builddir=.
18791
81ecdfbb
RW
18792case "$ac_dir" in
18793.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18794*)
18795 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
18796 # A ".." for each directory in $ac_dir_suffix.
18797 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
18798 case $ac_top_builddir_sub in
18799 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18800 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18801 esac ;;
18802esac
18803ac_abs_top_builddir=$ac_pwd
18804ac_abs_builddir=$ac_pwd$ac_dir_suffix
18805# for backward compatibility:
18806ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
18807
18808case $srcdir in
81ecdfbb 18809 .) # We are building in place.
bec39cab 18810 ac_srcdir=.
81ecdfbb
RW
18811 ac_top_srcdir=$ac_top_builddir_sub
18812 ac_abs_top_srcdir=$ac_pwd ;;
18813 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 18814 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
18815 ac_top_srcdir=$srcdir
18816 ac_abs_top_srcdir=$srcdir ;;
18817 *) # Relative name.
18818 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18819 ac_top_srcdir=$ac_top_build_prefix$srcdir
18820 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 18821esac
81ecdfbb 18822ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
c906108c 18823
c906108c 18824
fdc59709 18825 cd "$ac_dir"
c906108c
SS
18826
18827 # Check for guested configure; otherwise get Cygnus style configure.
fdc59709
PB
18828 if test -f "$ac_srcdir/configure.gnu"; then
18829 ac_sub_configure=$ac_srcdir/configure.gnu
18830 elif test -f "$ac_srcdir/configure"; then
18831 ac_sub_configure=$ac_srcdir/configure
18832 elif test -f "$ac_srcdir/configure.in"; then
18833 # This should be Cygnus configure.
18834 ac_sub_configure=$ac_aux_dir/configure
c906108c 18835 else
81ecdfbb
RW
18836 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
18837$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
c906108c
SS
18838 ac_sub_configure=
18839 fi
18840
18841 # The recursion is here.
18842 if test -n "$ac_sub_configure"; then
c906108c 18843 # Make the cache file name correct relative to the subdirectory.
bec39cab
AC
18844 case $cache_file in
18845 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
81ecdfbb
RW
18846 *) # Relative name.
18847 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
c906108c 18848 esac
c906108c 18849
81ecdfbb
RW
18850 { $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
18851$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
c906108c 18852 # The eval makes quoting arguments work.
fdc59709
PB
18853 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
18854 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
81ecdfbb 18855 as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
c906108c
SS
18856 fi
18857
fdc59709 18858 cd "$ac_popdir"
c906108c
SS
18859 done
18860fi
81ecdfbb
RW
18861if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
18862 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
18863$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
18864fi
c906108c 18865
This page took 3.711643 seconds and 4 git commands to generate.