gdb: Import AX_CXX_COMPILE_STDCXX from the GNU Autoconf Archive
[deliverable/binutils-gdb.git] / gdb / configure
CommitLineData
c906108c 1#! /bin/sh
c906108c 2# Guess values for system-dependent variables and create Makefiles.
81ecdfbb
RW
3# Generated by GNU Autoconf 2.64.
4#
5# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
6# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
7# Foundation, Inc.
c906108c
SS
8#
9# This configure script is free software; the Free Software Foundation
10# gives unlimited permission to copy, distribute and modify it.
81ecdfbb
RW
11## -------------------- ##
12## M4sh Initialization. ##
13## -------------------- ##
bec39cab 14
81ecdfbb
RW
15# Be more Bourne compatible
16DUALCASE=1; export DUALCASE # for MKS sh
17if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
18 emulate sh
19 NULLCMD=:
81ecdfbb 20 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
21 # is contrary to our usage. Disable this feature.
22 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
23 setopt NO_GLOB_SUBST
24else
25 case `(set -o) 2>/dev/null` in #(
26 *posix*) :
27 set -o posix ;; #(
28 *) :
29 ;;
30esac
bec39cab 31fi
bec39cab 32
81ecdfbb
RW
33
34as_nl='
35'
36export as_nl
37# Printing a long string crashes Solaris 7 /usr/bin/printf.
38as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
39as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
40as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
41# Prefer a ksh shell builtin over an external printf program on Solaris,
42# but without wasting forks for bash or zsh.
43if test -z "$BASH_VERSION$ZSH_VERSION" \
44 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
45 as_echo='print -r --'
46 as_echo_n='print -rn --'
47elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
48 as_echo='printf %s\n'
49 as_echo_n='printf %s'
50else
51 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
52 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53 as_echo_n='/usr/ucb/echo -n'
54 else
55 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
56 as_echo_n_body='eval
57 arg=$1;
58 case $arg in #(
59 *"$as_nl"*)
60 expr "X$arg" : "X\\(.*\\)$as_nl";
61 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
62 esac;
63 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
64 '
65 export as_echo_n_body
66 as_echo_n='sh -c $as_echo_n_body as_echo'
67 fi
68 export as_echo_body
69 as_echo='sh -c $as_echo_body as_echo'
70fi
71
72# The user is always right.
73if test "${PATH_SEPARATOR+set}" != set; then
74 PATH_SEPARATOR=:
75 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
76 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
77 PATH_SEPARATOR=';'
78 }
bec39cab
AC
79fi
80
81
81ecdfbb
RW
82# IFS
83# We need space, tab and new line, in precisely that order. Quoting is
84# there to prevent editors from complaining about space-tab.
85# (If _AS_PATH_WALK were called with IFS unset, it would disable word
86# splitting by setting IFS to empty value.)
87IFS=" "" $as_nl"
88
89# Find who we are. Look in the path if we contain no directory separator.
90case $0 in #((
91 *[\\/]* ) as_myself=$0 ;;
92 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
93for as_dir in $PATH
94do
95 IFS=$as_save_IFS
96 test -z "$as_dir" && as_dir=.
97 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
98 done
99IFS=$as_save_IFS
100
101 ;;
102esac
103# We did not find ourselves, most probably we were run as `sh COMMAND'
104# in which case we are not to be found in the path.
105if test "x$as_myself" = x; then
106 as_myself=$0
107fi
108if test ! -f "$as_myself"; then
109 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
110 exit 1
111fi
112
113# Unset variables that we do not need and which cause bugs (e.g. in
114# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
115# suppresses any "Segmentation fault" message there. '((' could
116# trigger a bug in pdksh 5.2.14.
117for as_var in BASH_ENV ENV MAIL MAILPATH
118do eval test x\${$as_var+set} = xset \
119 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
120done
bec39cab
AC
121PS1='$ '
122PS2='> '
123PS4='+ '
124
125# NLS nuisances.
81ecdfbb
RW
126LC_ALL=C
127export LC_ALL
128LANGUAGE=C
129export LANGUAGE
130
131# CDPATH.
132(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
133
134if test "x$CONFIG_SHELL" = x; then
135 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
136 emulate sh
137 NULLCMD=:
138 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
139 # is contrary to our usage. Disable this feature.
140 alias -g '\${1+\"\$@\"}'='\"\$@\"'
141 setopt NO_GLOB_SUBST
142else
143 case \`(set -o) 2>/dev/null\` in #(
144 *posix*) :
145 set -o posix ;; #(
146 *) :
147 ;;
148esac
149fi
150"
151 as_required="as_fn_return () { (exit \$1); }
152as_fn_success () { as_fn_return 0; }
153as_fn_failure () { as_fn_return 1; }
154as_fn_ret_success () { return 0; }
155as_fn_ret_failure () { return 1; }
156
157exitcode=0
158as_fn_success || { exitcode=1; echo as_fn_success failed.; }
159as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
160as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
161as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
162if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
163
164else
165 exitcode=1; echo positional parameters were not saved.
166fi
167test x\$exitcode = x0 || exit 1"
168 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
169 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
170 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
171 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
172test \$(( 1 + 1 )) = 2 || exit 1"
173 if (eval "$as_required") 2>/dev/null; then :
174 as_have_required=yes
175else
176 as_have_required=no
177fi
178 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
179
180else
181 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
182as_found=false
183for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
bec39cab 184do
81ecdfbb
RW
185 IFS=$as_save_IFS
186 test -z "$as_dir" && as_dir=.
187 as_found=:
188 case $as_dir in #(
189 /*)
190 for as_base in sh bash ksh sh5; do
191 # Try only shells that exist, to save several forks.
192 as_shell=$as_dir/$as_base
193 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
194 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
195 CONFIG_SHELL=$as_shell as_have_required=yes
196 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
197 break 2
198fi
199fi
200 done;;
201 esac
202 as_found=false
203done
204$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
205 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
206 CONFIG_SHELL=$SHELL as_have_required=yes
207fi; }
208IFS=$as_save_IFS
209
210
211 if test "x$CONFIG_SHELL" != x; then :
212 # We cannot yet assume a decent shell, so we have to provide a
213 # neutralization value for shells without unset; and this also
214 # works around shells that cannot unset nonexistent variables.
215 BASH_ENV=/dev/null
216 ENV=/dev/null
217 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
218 export CONFIG_SHELL
219 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
220fi
221
222 if test x$as_have_required = xno; then :
223 $as_echo "$0: This script requires a shell more modern than all"
224 $as_echo "$0: the shells that I found on your system."
225 if test x${ZSH_VERSION+set} = xset ; then
226 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
227 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
bec39cab 228 else
81ecdfbb
RW
229 $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
230$0: including any error possibly output before this
231$0: message. Then install a modern shell, or manually run
232$0: the script under such a shell if you do have one."
bec39cab 233 fi
81ecdfbb
RW
234 exit 1
235fi
236fi
237fi
238SHELL=${CONFIG_SHELL-/bin/sh}
239export SHELL
240# Unset more variables known to interfere with behavior of common tools.
241CLICOLOR_FORCE= GREP_OPTIONS=
242unset CLICOLOR_FORCE GREP_OPTIONS
243
244## --------------------- ##
245## M4sh Shell Functions. ##
246## --------------------- ##
247# as_fn_unset VAR
248# ---------------
249# Portably unset VAR.
250as_fn_unset ()
251{
252 { eval $1=; unset $1;}
253}
254as_unset=as_fn_unset
255
256# as_fn_set_status STATUS
257# -----------------------
258# Set $? to STATUS, without forking.
259as_fn_set_status ()
260{
261 return $1
262} # as_fn_set_status
bec39cab 263
81ecdfbb
RW
264# as_fn_exit STATUS
265# -----------------
266# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
267as_fn_exit ()
268{
269 set +e
270 as_fn_set_status $1
271 exit $1
272} # as_fn_exit
273
274# as_fn_mkdir_p
275# -------------
276# Create "$as_dir" as a directory, including parents if necessary.
277as_fn_mkdir_p ()
278{
279
280 case $as_dir in #(
281 -*) as_dir=./$as_dir;;
282 esac
283 test -d "$as_dir" || eval $as_mkdir_p || {
284 as_dirs=
285 while :; do
286 case $as_dir in #(
287 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
288 *) as_qdir=$as_dir;;
289 esac
290 as_dirs="'$as_qdir' $as_dirs"
291 as_dir=`$as_dirname -- "$as_dir" ||
292$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
293 X"$as_dir" : 'X\(//\)[^/]' \| \
294 X"$as_dir" : 'X\(//\)$' \| \
295 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
296$as_echo X"$as_dir" |
297 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
298 s//\1/
299 q
300 }
301 /^X\(\/\/\)[^/].*/{
302 s//\1/
303 q
304 }
305 /^X\(\/\/\)$/{
306 s//\1/
307 q
308 }
309 /^X\(\/\).*/{
310 s//\1/
311 q
312 }
313 s/.*/./; q'`
314 test -d "$as_dir" && break
315 done
316 test -z "$as_dirs" || eval "mkdir $as_dirs"
317 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
318
319
320} # as_fn_mkdir_p
321# as_fn_append VAR VALUE
322# ----------------------
323# Append the text in VALUE to the end of the definition contained in VAR. Take
324# advantage of any shell optimizations that allow amortized linear growth over
325# repeated appends, instead of the typical quadratic growth present in naive
326# implementations.
327if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
328 eval 'as_fn_append ()
329 {
330 eval $1+=\$2
331 }'
332else
333 as_fn_append ()
334 {
335 eval $1=\$$1\$2
336 }
337fi # as_fn_append
338
339# as_fn_arith ARG...
340# ------------------
341# Perform arithmetic evaluation on the ARGs, and store the result in the
342# global $as_val. Take advantage of shells that can avoid forks. The arguments
343# must be portable across $(()) and expr.
344if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
345 eval 'as_fn_arith ()
346 {
347 as_val=$(( $* ))
348 }'
349else
350 as_fn_arith ()
351 {
352 as_val=`expr "$@" || test $? -eq 1`
353 }
354fi # as_fn_arith
355
356
357# as_fn_error ERROR [LINENO LOG_FD]
358# ---------------------------------
359# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
360# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
361# script with status $?, using 1 if that was 0.
362as_fn_error ()
363{
364 as_status=$?; test $as_status -eq 0 && as_status=1
365 if test "$3"; then
366 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
367 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
368 fi
369 $as_echo "$as_me: error: $1" >&2
370 as_fn_exit $as_status
371} # as_fn_error
372
373if expr a : '\(a\)' >/dev/null 2>&1 &&
374 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
375 as_expr=expr
376else
377 as_expr=false
378fi
379
81ecdfbb 380if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
381 as_basename=basename
382else
383 as_basename=false
384fi
385
81ecdfbb
RW
386if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
387 as_dirname=dirname
388else
389 as_dirname=false
390fi
bec39cab 391
81ecdfbb 392as_me=`$as_basename -- "$0" ||
bec39cab
AC
393$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
394 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
395 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
396$as_echo X/"$0" |
397 sed '/^.*\/\([^/][^/]*\)\/*$/{
398 s//\1/
399 q
400 }
401 /^X\/\(\/\/\)$/{
402 s//\1/
403 q
404 }
405 /^X\/\(\/\).*/{
406 s//\1/
407 q
408 }
409 s/.*/./; q'`
bec39cab 410
b4e70030
JB
411# Avoid depending upon Character Ranges.
412as_cr_letters='abcdefghijklmnopqrstuvwxyz'
413as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
414as_cr_Letters=$as_cr_letters$as_cr_LETTERS
415as_cr_digits='0123456789'
416as_cr_alnum=$as_cr_Letters$as_cr_digits
4e8d927d 417
bec39cab 418
81ecdfbb
RW
419 as_lineno_1=$LINENO as_lineno_1a=$LINENO
420 as_lineno_2=$LINENO as_lineno_2a=$LINENO
421 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
422 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
423 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
424 sed -n '
425 p
426 /[$]LINENO/=
427 ' <$as_myself |
bec39cab 428 sed '
81ecdfbb
RW
429 s/[$]LINENO.*/&-/
430 t lineno
431 b
432 :lineno
bec39cab 433 N
81ecdfbb
RW
434 :loop
435 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
bec39cab 436 t loop
81ecdfbb 437 s/-\n.*//
bec39cab 438 ' >$as_me.lineno &&
81ecdfbb
RW
439 chmod +x "$as_me.lineno" ||
440 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
bec39cab
AC
441
442 # Don't try to exec as it changes $[0], causing all sort of problems
443 # (the dirname of $[0] is not the place where we might find the
81ecdfbb
RW
444 # original and so on. Autoconf is especially sensitive to this).
445 . "./$as_me.lineno"
bec39cab
AC
446 # Exit status is that of the last command.
447 exit
448}
449
81ecdfbb
RW
450ECHO_C= ECHO_N= ECHO_T=
451case `echo -n x` in #(((((
452-n*)
453 case `echo 'xy\c'` in
454 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
455 xy) ECHO_C='\c';;
456 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
457 ECHO_T=' ';;
458 esac;;
459*)
460 ECHO_N='-n';;
bec39cab
AC
461esac
462
81ecdfbb
RW
463rm -f conf$$ conf$$.exe conf$$.file
464if test -d conf$$.dir; then
465 rm -f conf$$.dir/conf$$.file
bec39cab 466else
81ecdfbb
RW
467 rm -f conf$$.dir
468 mkdir conf$$.dir 2>/dev/null
bec39cab 469fi
81ecdfbb
RW
470if (echo >conf$$.file) 2>/dev/null; then
471 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 472 as_ln_s='ln -s'
81ecdfbb
RW
473 # ... but there are two gotchas:
474 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
475 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
476 # In both cases, we have to default to `cp -p'.
477 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
478 as_ln_s='cp -p'
479 elif ln conf$$.file conf$$ 2>/dev/null; then
480 as_ln_s=ln
481 else
482 as_ln_s='cp -p'
b4e70030 483 fi
bec39cab
AC
484else
485 as_ln_s='cp -p'
486fi
81ecdfbb
RW
487rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
488rmdir conf$$.dir 2>/dev/null
bec39cab
AC
489
490if mkdir -p . 2>/dev/null; then
81ecdfbb 491 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
492else
493 test -d ./-p && rmdir ./-p
494 as_mkdir_p=false
495fi
496
81ecdfbb
RW
497if test -x / >/dev/null 2>&1; then
498 as_test_x='test -x'
499else
500 if ls -dL / >/dev/null 2>&1; then
501 as_ls_L_option=L
502 else
503 as_ls_L_option=
504 fi
505 as_test_x='
506 eval sh -c '\''
507 if test -d "$1"; then
508 test -d "$1/.";
509 else
510 case $1 in #(
511 -*)set "./$1";;
512 esac;
513 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
514 ???[sx]*):;;*)false;;esac;fi
515 '\'' sh
516 '
517fi
518as_executable_p=$as_test_x
bec39cab
AC
519
520# Sed expression to map a string onto a valid CPP name.
521as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
522
523# Sed expression to map a string onto a valid variable name.
524as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
525
526
81ecdfbb 527exec 7<&0 </dev/null 6>&1
c906108c 528
bec39cab
AC
529# Name of the host.
530# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
531# so uname gets run too.
532ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
533
bec39cab
AC
534#
535# Initializations.
536#
c906108c 537ac_default_prefix=/usr/local
81ecdfbb 538ac_clean_files=
bec39cab 539ac_config_libobj_dir=.
81ecdfbb 540LIBOBJS=
bec39cab
AC
541cross_compiling=no
542subdirs=
543MFLAGS=
544MAKEFLAGS=
b4e70030 545
bec39cab
AC
546# Identity of this package.
547PACKAGE_NAME=
548PACKAGE_TARNAME=
549PACKAGE_VERSION=
550PACKAGE_STRING=
551PACKAGE_BUGREPORT=
81ecdfbb 552PACKAGE_URL=
bec39cab
AC
553
554ac_unique_file="main.c"
555# Factoring default headers for most tests.
556ac_includes_default="\
557#include <stdio.h>
81ecdfbb 558#ifdef HAVE_SYS_TYPES_H
bec39cab
AC
559# include <sys/types.h>
560#endif
81ecdfbb 561#ifdef HAVE_SYS_STAT_H
bec39cab
AC
562# include <sys/stat.h>
563#endif
81ecdfbb 564#ifdef STDC_HEADERS
bec39cab
AC
565# include <stdlib.h>
566# include <stddef.h>
567#else
81ecdfbb 568# ifdef HAVE_STDLIB_H
bec39cab
AC
569# include <stdlib.h>
570# endif
571#endif
81ecdfbb
RW
572#ifdef HAVE_STRING_H
573# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
bec39cab
AC
574# include <memory.h>
575# endif
576# include <string.h>
577#endif
81ecdfbb 578#ifdef HAVE_STRINGS_H
bec39cab
AC
579# include <strings.h>
580#endif
81ecdfbb 581#ifdef HAVE_INTTYPES_H
bec39cab 582# include <inttypes.h>
bec39cab 583#endif
81ecdfbb
RW
584#ifdef HAVE_STDINT_H
585# include <stdint.h>
586#endif
587#ifdef HAVE_UNISTD_H
bec39cab
AC
588# include <unistd.h>
589#endif"
590
81ecdfbb 591enable_option_checking=no
c971b7fa 592ac_subst_vars='LTLIBOBJS
81ecdfbb 593LIBOBJS
b292c783
JK
594GCORE_TRANSFORM_NAME
595GDB_TRANSFORM_NAME
e3487908 596XSLTPROC
81ecdfbb 597GDB_NM_FILE
393fd4c3
YQ
598LTLIBBABELTRACE
599LIBBABELTRACE
600HAVE_LIBBABELTRACE
81ecdfbb
RW
601frags
602target_subdir
603CONFIG_UNINSTALL
604CONFIG_INSTALL
605CONFIG_CLEAN
606CONFIG_ALL
607CONFIG_SRCS
608CONFIG_DEPS
609CONFIG_OBS
610PROFILE_CFLAGS
611ENABLE_CFLAGS
612SIM_OBS
613SIM
614XMKMF
615GDBTK_SRC_DIR
616GDBTK_CFLAGS
617GDBTKLIBS
618X_LIBS
619X_LDFLAGS
620X_CFLAGS
621TK_XINCLUDES
622TK_DEPS
623TK_LIBRARY
624TK_INCLUDE
625TK_STUB_LIB_SPEC
626TK_STUB_LIB_FLAG
627TK_STUB_LIB_FILE
628TK_LIB_SPEC
629TK_LIB_FLAG
630TK_LIB_FILE
631TK_SRC_DIR
632TK_BIN_DIR
633TK_VERSION
634TCL_DEPS
635TCL_LIBRARY
636TCL_INCLUDE
637TCL_STUB_LIB_SPEC
638TCL_STUB_LIB_FLAG
639TCL_STUB_LIB_FILE
640TCL_LIB_SPEC
641TCL_LIB_FLAG
642TCL_LIB_FILE
643TCL_SRC_DIR
644TCL_BIN_DIR
645TCL_PATCH_LEVEL
646TCL_VERSION
647WIN32LDAPP
648GUI_CFLAGS_X
649LIBGUI
608e2dbb
TT
650LTLIBLZMA
651LIBLZMA
652HAVE_LIBLZMA
81ecdfbb
RW
653WIN32LIBS
654SER_HARDWIRE
655WERROR_CFLAGS
656WARN_CFLAGS
657SYSTEM_GDBINIT
81ecdfbb
RW
658TARGET_SYSTEM_ROOT
659CONFIG_LDFLAGS
f6528abd 660RDYNAMIC
81ecdfbb 661ALLOCA
58bfce93
MM
662LTLIBIPT
663LIBIPT
664HAVE_LIBIPT
4df42755
DE
665HAVE_GUILE_FALSE
666HAVE_GUILE_TRUE
ed3ef339
DE
667GUILE_LIBS
668GUILE_CPPFLAGS
e76c5d17
DE
669GUILD_TARGET_FLAG
670GUILD
ed3ef339 671pkg_config_prog_path
4df42755
DE
672HAVE_PYTHON_FALSE
673HAVE_PYTHON_TRUE
ac534cba
JB
674PYTHON_LIBS
675PYTHON_CPPFLAGS
81ecdfbb 676PYTHON_CFLAGS
ec685c5e 677python_prog_path
81ecdfbb
RW
678LTLIBEXPAT
679LIBEXPAT
680HAVE_LIBEXPAT
b8e0a31c 681JIT_READER_DIR
f997c383 682TARGET_PTR
39037522 683READLINE_TEXI_INCFLAG
81ecdfbb
RW
684READLINE_CFLAGS
685READLINE_DEPS
686READLINE
016a3251
DD
687LTLIBICONV
688LIBICONV
711a72d3
L
689zlibinc
690zlibdir
81ecdfbb
RW
691MIG
692WINDRES
693DLLTOOL
c971b7fa 694AR
81ecdfbb
RW
695YFLAGS
696YACC
c971b7fa 697RANLIB
81ecdfbb 698LN_S
c971b7fa
PA
699INSTALL_DATA
700INSTALL_SCRIPT
701INSTALL_PROGRAM
702AWK
81ecdfbb
RW
703REPORT_BUGS_TEXI
704REPORT_BUGS_TO
705PKGVERSION
b292c783 706HAVE_NATIVE_GCORE_TARGET
81ecdfbb
RW
707TARGET_OBS
708subdirs
709GDB_DATADIR
710DEBUGDIR
5048e516
JK
711MAKEINFO_EXTRA_FLAGS
712MAKEINFOFLAGS
713MAKEINFO
81ecdfbb
RW
714PACKAGE
715GNULIB_STDINT_H
81ecdfbb
RW
716CATOBJEXT
717GENCAT
718INSTOBJEXT
719DATADIRNAME
720CATALOGS
721POSUB
722GMSGFMT
723XGETTEXT
724INCINTL
725LIBINTL_DEP
726LIBINTL
727USE_NLS
728SET_MAKE
729GMAKE_FALSE
730GMAKE_TRUE
731MAKE
732CCDEPMODE
733DEPDIR
734am__leading_dot
4869db5e
RM
735INSTALL_STRIP_PROGRAM
736STRIP
737install_sh
81ecdfbb
RW
738target_os
739target_vendor
740target_cpu
741target
742host_os
743host_vendor
744host_cpu
745host
746build_os
747build_vendor
748build_cpu
749build
c971b7fa
PA
750EGREP
751GREP
752CPP
3bc3d82a
PA
753ac_ct_CXX
754CXXFLAGS
755CXX
81ecdfbb
RW
756OBJEXT
757EXEEXT
758ac_ct_CC
759CPPFLAGS
760LDFLAGS
761CFLAGS
762CC
763MAINT
764MAINTAINER_MODE_FALSE
765MAINTAINER_MODE_TRUE
766target_alias
767host_alias
768build_alias
769LIBS
770ECHO_T
771ECHO_N
772ECHO_C
773DEFS
774mandir
775localedir
776libdir
777psdir
778pdfdir
779dvidir
780htmldir
781infodir
782docdir
783oldincludedir
784includedir
785localstatedir
786sharedstatedir
787sysconfdir
788datadir
789datarootdir
790libexecdir
791sbindir
792bindir
793program_transform_name
794prefix
795exec_prefix
796PACKAGE_URL
797PACKAGE_BUGREPORT
798PACKAGE_STRING
799PACKAGE_VERSION
800PACKAGE_TARNAME
801PACKAGE_NAME
802PATH_SEPARATOR
803SHELL'
a4ce5b0d 804ac_subst_files='host_makefile_frag'
81ecdfbb
RW
805ac_user_opts='
806enable_option_checking
807enable_maintainer_mode
da2f07f1
JK
808enable_plugins
809enable_largefile
81ecdfbb
RW
810with_separate_debug_dir
811with_gdb_datadir
812with_relocated_sources
7349ff92 813with_auto_load_dir
bccbefd2 814with_auto_load_safe_path
81ecdfbb
RW
815enable_targets
816enable_64_bit_bfd
817enable_gdbcli
818enable_gdbmi
819enable_tui
820enable_gdbtk
05e7c244 821with_libunwind_ia64
81ecdfbb
RW
822with_curses
823enable_profiling
824with_pkgversion
825with_bugurl
711a72d3 826with_system_zlib
016a3251
DD
827with_gnu_ld
828enable_rpath
81ecdfbb 829with_libiconv_prefix
478aac75 830with_iconv_bin
81ecdfbb 831with_system_readline
b8e0a31c 832with_jit_reader_dir
81ecdfbb 833with_expat
81ecdfbb
RW
834with_libexpat_prefix
835with_python
ed3ef339 836with_guile
a8db4212 837enable_libmcheck
58bfce93
MM
838with_intel_pt
839with_libipt_prefix
81ecdfbb
RW
840with_included_regex
841with_sysroot
842with_system_gdbinit
843enable_werror
844enable_build_warnings
845enable_gdb_build_warnings
608e2dbb
TT
846with_lzma
847with_liblzma_prefix
81ecdfbb
RW
848with_tcl
849with_tk
850with_x
851enable_sim
852enable_multi_ice
496c0e1b 853enable_gdbserver
393fd4c3
YQ
854with_babeltrace
855with_libbabeltrace_prefix
81ecdfbb
RW
856'
857 ac_precious_vars='build_alias
858host_alias
859target_alias
860CC
861CFLAGS
862LDFLAGS
863LIBS
864CPPFLAGS
3bc3d82a
PA
865CXX
866CXXFLAGS
867CCC
81ecdfbb 868CPP
f06e05e0
JK
869MAKEINFO
870MAKEINFOFLAGS
81ecdfbb
RW
871YACC
872YFLAGS
873XMKMF'
5ae98d25 874ac_subdirs_all='testsuite
81ecdfbb
RW
875gdbtk
876multi-ice
877gdbserver'
c906108c
SS
878
879# Initialize some variables set by options.
bec39cab
AC
880ac_init_help=
881ac_init_version=false
81ecdfbb
RW
882ac_unrecognized_opts=
883ac_unrecognized_sep=
c906108c
SS
884# The variables have the same names as the options, with
885# dashes changed to underlines.
bec39cab 886cache_file=/dev/null
c906108c 887exec_prefix=NONE
c906108c 888no_create=
c906108c
SS
889no_recursion=
890prefix=NONE
891program_prefix=NONE
892program_suffix=NONE
893program_transform_name=s,x,x,
894silent=
895site=
896srcdir=
c906108c
SS
897verbose=
898x_includes=NONE
899x_libraries=NONE
bec39cab
AC
900
901# Installation directory options.
902# These are left unexpanded so users can "make install exec_prefix=/foo"
903# and all the variables that are supposed to be based on exec_prefix
904# by default will actually change.
905# Use braces instead of parens because sh, perl, etc. also accept them.
81ecdfbb 906# (The list follows the same order as the GNU Coding Standards.)
c906108c
SS
907bindir='${exec_prefix}/bin'
908sbindir='${exec_prefix}/sbin'
909libexecdir='${exec_prefix}/libexec'
81ecdfbb
RW
910datarootdir='${prefix}/share'
911datadir='${datarootdir}'
c906108c
SS
912sysconfdir='${prefix}/etc'
913sharedstatedir='${prefix}/com'
914localstatedir='${prefix}/var'
c906108c
SS
915includedir='${prefix}/include'
916oldincludedir='/usr/include'
81ecdfbb
RW
917docdir='${datarootdir}/doc/${PACKAGE}'
918infodir='${datarootdir}/info'
919htmldir='${docdir}'
920dvidir='${docdir}'
921pdfdir='${docdir}'
922psdir='${docdir}'
923libdir='${exec_prefix}/lib'
924localedir='${datarootdir}/locale'
925mandir='${datarootdir}/man'
c906108c 926
c906108c 927ac_prev=
81ecdfbb 928ac_dashdash=
c906108c
SS
929for ac_option
930do
c906108c
SS
931 # If the previous option needs an argument, assign it.
932 if test -n "$ac_prev"; then
81ecdfbb 933 eval $ac_prev=\$ac_option
c906108c
SS
934 ac_prev=
935 continue
936 fi
937
81ecdfbb
RW
938 case $ac_option in
939 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
940 *) ac_optarg=yes ;;
941 esac
c906108c
SS
942
943 # Accept the important Cygnus configure options, so we can diagnose typos.
944
81ecdfbb
RW
945 case $ac_dashdash$ac_option in
946 --)
947 ac_dashdash=yes ;;
c906108c
SS
948
949 -bindir | --bindir | --bindi | --bind | --bin | --bi)
950 ac_prev=bindir ;;
951 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
bec39cab 952 bindir=$ac_optarg ;;
c906108c
SS
953
954 -build | --build | --buil | --bui | --bu)
bec39cab 955 ac_prev=build_alias ;;
c906108c 956 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
bec39cab 957 build_alias=$ac_optarg ;;
c906108c
SS
958
959 -cache-file | --cache-file | --cache-fil | --cache-fi \
960 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
961 ac_prev=cache_file ;;
962 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
963 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
bec39cab
AC
964 cache_file=$ac_optarg ;;
965
966 --config-cache | -C)
967 cache_file=config.cache ;;
c906108c 968
81ecdfbb 969 -datadir | --datadir | --datadi | --datad)
c906108c 970 ac_prev=datadir ;;
81ecdfbb 971 -datadir=* | --datadir=* | --datadi=* | --datad=*)
bec39cab 972 datadir=$ac_optarg ;;
c906108c 973
81ecdfbb
RW
974 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
975 | --dataroo | --dataro | --datar)
976 ac_prev=datarootdir ;;
977 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
978 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
979 datarootdir=$ac_optarg ;;
980
c906108c 981 -disable-* | --disable-*)
81ecdfbb 982 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
c906108c 983 # Reject names that are not valid shell variable names.
81ecdfbb
RW
984 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
985 as_fn_error "invalid feature name: $ac_useropt"
986 ac_useropt_orig=$ac_useropt
987 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
988 case $ac_user_opts in
989 *"
990"enable_$ac_useropt"
991"*) ;;
992 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
993 ac_unrecognized_sep=', ';;
994 esac
995 eval enable_$ac_useropt=no ;;
996
997 -docdir | --docdir | --docdi | --doc | --do)
998 ac_prev=docdir ;;
999 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1000 docdir=$ac_optarg ;;
1001
1002 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1003 ac_prev=dvidir ;;
1004 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1005 dvidir=$ac_optarg ;;
c906108c
SS
1006
1007 -enable-* | --enable-*)
81ecdfbb 1008 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
c906108c 1009 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1010 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1011 as_fn_error "invalid feature name: $ac_useropt"
1012 ac_useropt_orig=$ac_useropt
1013 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1014 case $ac_user_opts in
1015 *"
1016"enable_$ac_useropt"
1017"*) ;;
1018 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1019 ac_unrecognized_sep=', ';;
b4e70030 1020 esac
81ecdfbb 1021 eval enable_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1022
1023 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1024 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1025 | --exec | --exe | --ex)
1026 ac_prev=exec_prefix ;;
1027 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1028 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1029 | --exec=* | --exe=* | --ex=*)
bec39cab 1030 exec_prefix=$ac_optarg ;;
c906108c
SS
1031
1032 -gas | --gas | --ga | --g)
1033 # Obsolete; use --with-gas.
1034 with_gas=yes ;;
1035
bec39cab
AC
1036 -help | --help | --hel | --he | -h)
1037 ac_init_help=long ;;
1038 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1039 ac_init_help=recursive ;;
1040 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1041 ac_init_help=short ;;
c906108c
SS
1042
1043 -host | --host | --hos | --ho)
bec39cab 1044 ac_prev=host_alias ;;
c906108c 1045 -host=* | --host=* | --hos=* | --ho=*)
bec39cab 1046 host_alias=$ac_optarg ;;
c906108c 1047
81ecdfbb
RW
1048 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1049 ac_prev=htmldir ;;
1050 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1051 | --ht=*)
1052 htmldir=$ac_optarg ;;
1053
c906108c
SS
1054 -includedir | --includedir | --includedi | --included | --include \
1055 | --includ | --inclu | --incl | --inc)
1056 ac_prev=includedir ;;
1057 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1058 | --includ=* | --inclu=* | --incl=* | --inc=*)
bec39cab 1059 includedir=$ac_optarg ;;
c906108c
SS
1060
1061 -infodir | --infodir | --infodi | --infod | --info | --inf)
1062 ac_prev=infodir ;;
1063 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
bec39cab 1064 infodir=$ac_optarg ;;
c906108c
SS
1065
1066 -libdir | --libdir | --libdi | --libd)
1067 ac_prev=libdir ;;
1068 -libdir=* | --libdir=* | --libdi=* | --libd=*)
bec39cab 1069 libdir=$ac_optarg ;;
c906108c
SS
1070
1071 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1072 | --libexe | --libex | --libe)
1073 ac_prev=libexecdir ;;
1074 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1075 | --libexe=* | --libex=* | --libe=*)
bec39cab 1076 libexecdir=$ac_optarg ;;
c906108c 1077
81ecdfbb
RW
1078 -localedir | --localedir | --localedi | --localed | --locale)
1079 ac_prev=localedir ;;
1080 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1081 localedir=$ac_optarg ;;
1082
c906108c 1083 -localstatedir | --localstatedir | --localstatedi | --localstated \
81ecdfbb 1084 | --localstate | --localstat | --localsta | --localst | --locals)
c906108c
SS
1085 ac_prev=localstatedir ;;
1086 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
81ecdfbb 1087 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
bec39cab 1088 localstatedir=$ac_optarg ;;
c906108c
SS
1089
1090 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1091 ac_prev=mandir ;;
1092 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
bec39cab 1093 mandir=$ac_optarg ;;
c906108c
SS
1094
1095 -nfp | --nfp | --nf)
1096 # Obsolete; use --without-fp.
1097 with_fp=no ;;
1098
1099 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
bec39cab 1100 | --no-cr | --no-c | -n)
c906108c
SS
1101 no_create=yes ;;
1102
1103 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1104 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1105 no_recursion=yes ;;
1106
1107 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1108 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1109 | --oldin | --oldi | --old | --ol | --o)
1110 ac_prev=oldincludedir ;;
1111 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1112 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1113 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
bec39cab 1114 oldincludedir=$ac_optarg ;;
c906108c
SS
1115
1116 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1117 ac_prev=prefix ;;
1118 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
bec39cab 1119 prefix=$ac_optarg ;;
c906108c
SS
1120
1121 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1122 | --program-pre | --program-pr | --program-p)
1123 ac_prev=program_prefix ;;
1124 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1125 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
bec39cab 1126 program_prefix=$ac_optarg ;;
c906108c
SS
1127
1128 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1129 | --program-suf | --program-su | --program-s)
1130 ac_prev=program_suffix ;;
1131 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1132 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
bec39cab 1133 program_suffix=$ac_optarg ;;
c906108c
SS
1134
1135 -program-transform-name | --program-transform-name \
1136 | --program-transform-nam | --program-transform-na \
1137 | --program-transform-n | --program-transform- \
1138 | --program-transform | --program-transfor \
1139 | --program-transfo | --program-transf \
1140 | --program-trans | --program-tran \
1141 | --progr-tra | --program-tr | --program-t)
1142 ac_prev=program_transform_name ;;
1143 -program-transform-name=* | --program-transform-name=* \
1144 | --program-transform-nam=* | --program-transform-na=* \
1145 | --program-transform-n=* | --program-transform-=* \
1146 | --program-transform=* | --program-transfor=* \
1147 | --program-transfo=* | --program-transf=* \
1148 | --program-trans=* | --program-tran=* \
1149 | --progr-tra=* | --program-tr=* | --program-t=*)
bec39cab 1150 program_transform_name=$ac_optarg ;;
c906108c 1151
81ecdfbb
RW
1152 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1153 ac_prev=pdfdir ;;
1154 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1155 pdfdir=$ac_optarg ;;
1156
1157 -psdir | --psdir | --psdi | --psd | --ps)
1158 ac_prev=psdir ;;
1159 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1160 psdir=$ac_optarg ;;
1161
c906108c
SS
1162 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1163 | -silent | --silent | --silen | --sile | --sil)
1164 silent=yes ;;
1165
1166 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1167 ac_prev=sbindir ;;
1168 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1169 | --sbi=* | --sb=*)
bec39cab 1170 sbindir=$ac_optarg ;;
c906108c
SS
1171
1172 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1173 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1174 | --sharedst | --shareds | --shared | --share | --shar \
1175 | --sha | --sh)
1176 ac_prev=sharedstatedir ;;
1177 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1178 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1179 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1180 | --sha=* | --sh=*)
bec39cab 1181 sharedstatedir=$ac_optarg ;;
c906108c
SS
1182
1183 -site | --site | --sit)
1184 ac_prev=site ;;
1185 -site=* | --site=* | --sit=*)
bec39cab 1186 site=$ac_optarg ;;
3ace7edb 1187
c906108c
SS
1188 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1189 ac_prev=srcdir ;;
1190 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
bec39cab 1191 srcdir=$ac_optarg ;;
c906108c
SS
1192
1193 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1194 | --syscon | --sysco | --sysc | --sys | --sy)
1195 ac_prev=sysconfdir ;;
1196 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1197 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
bec39cab 1198 sysconfdir=$ac_optarg ;;
c906108c
SS
1199
1200 -target | --target | --targe | --targ | --tar | --ta | --t)
bec39cab 1201 ac_prev=target_alias ;;
c906108c 1202 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
bec39cab 1203 target_alias=$ac_optarg ;;
c906108c
SS
1204
1205 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1206 verbose=yes ;;
1207
bec39cab
AC
1208 -version | --version | --versio | --versi | --vers | -V)
1209 ac_init_version=: ;;
c906108c
SS
1210
1211 -with-* | --with-*)
81ecdfbb 1212 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
c906108c 1213 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1214 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1215 as_fn_error "invalid package name: $ac_useropt"
1216 ac_useropt_orig=$ac_useropt
1217 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1218 case $ac_user_opts in
1219 *"
1220"with_$ac_useropt"
1221"*) ;;
1222 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1223 ac_unrecognized_sep=', ';;
b4e70030 1224 esac
81ecdfbb 1225 eval with_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1226
1227 -without-* | --without-*)
81ecdfbb 1228 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
c906108c 1229 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1230 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1231 as_fn_error "invalid package name: $ac_useropt"
1232 ac_useropt_orig=$ac_useropt
1233 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1234 case $ac_user_opts in
1235 *"
1236"with_$ac_useropt"
1237"*) ;;
1238 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1239 ac_unrecognized_sep=', ';;
1240 esac
1241 eval with_$ac_useropt=no ;;
c906108c
SS
1242
1243 --x)
1244 # Obsolete; use --with-x.
1245 with_x=yes ;;
1246
1247 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1248 | --x-incl | --x-inc | --x-in | --x-i)
1249 ac_prev=x_includes ;;
1250 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1251 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
bec39cab 1252 x_includes=$ac_optarg ;;
c906108c
SS
1253
1254 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1255 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1256 ac_prev=x_libraries ;;
1257 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1258 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
bec39cab 1259 x_libraries=$ac_optarg ;;
c906108c 1260
81ecdfbb
RW
1261 -*) as_fn_error "unrecognized option: \`$ac_option'
1262Try \`$0 --help' for more information."
c906108c
SS
1263 ;;
1264
bec39cab
AC
1265 *=*)
1266 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1267 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1268 case $ac_envvar in #(
1269 '' | [0-9]* | *[!_$as_cr_alnum]* )
1270 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1271 esac
1272 eval $ac_envvar=\$ac_optarg
bec39cab
AC
1273 export $ac_envvar ;;
1274
c906108c 1275 *)
bec39cab 1276 # FIXME: should be removed in autoconf 3.0.
81ecdfbb 1277 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
bec39cab 1278 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
81ecdfbb 1279 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
bec39cab 1280 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
c906108c
SS
1281 ;;
1282
1283 esac
1284done
1285
1286if test -n "$ac_prev"; then
bec39cab 1287 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
81ecdfbb 1288 as_fn_error "missing argument to $ac_option"
c906108c 1289fi
c906108c 1290
81ecdfbb
RW
1291if test -n "$ac_unrecognized_opts"; then
1292 case $enable_option_checking in
1293 no) ;;
1294 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
1295 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
b4e70030 1296 esac
81ecdfbb 1297fi
b4e70030 1298
81ecdfbb
RW
1299# Check all directory arguments for consistency.
1300for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1301 datadir sysconfdir sharedstatedir localstatedir includedir \
1302 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1303 libdir localedir mandir
b4e70030 1304do
81ecdfbb
RW
1305 eval ac_val=\$$ac_var
1306 # Remove trailing slashes.
1307 case $ac_val in
1308 */ )
1309 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1310 eval $ac_var=\$ac_val;;
1311 esac
1312 # Be sure to have absolute directory names.
b4e70030 1313 case $ac_val in
81ecdfbb
RW
1314 [\\/$]* | ?:[\\/]* ) continue;;
1315 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
c906108c 1316 esac
81ecdfbb 1317 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
c906108c
SS
1318done
1319
bec39cab
AC
1320# There might be people who depend on the old broken behavior: `$host'
1321# used to hold the argument of --host etc.
1322# FIXME: To remove some day.
1323build=$build_alias
1324host=$host_alias
1325target=$target_alias
1326
1327# FIXME: To remove some day.
1328if test "x$host_alias" != x; then
1329 if test "x$build_alias" = x; then
1330 cross_compiling=maybe
81ecdfbb 1331 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
bec39cab
AC
1332 If a cross compiler is detected then cross compile mode will be used." >&2
1333 elif test "x$build_alias" != "x$host_alias"; then
1334 cross_compiling=yes
1335 fi
1336fi
c906108c 1337
bec39cab
AC
1338ac_tool_prefix=
1339test -n "$host_alias" && ac_tool_prefix=$host_alias-
1340
1341test "$silent" = yes && exec 6>/dev/null
c906108c 1342
c906108c 1343
81ecdfbb
RW
1344ac_pwd=`pwd` && test -n "$ac_pwd" &&
1345ac_ls_di=`ls -di .` &&
1346ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1347 as_fn_error "working directory cannot be determined"
1348test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1349 as_fn_error "pwd does not report name of working directory"
1350
1351
c906108c
SS
1352# Find the source files, if location was not specified.
1353if test -z "$srcdir"; then
1354 ac_srcdir_defaulted=yes
81ecdfbb
RW
1355 # Try the directory containing this script, then the parent directory.
1356 ac_confdir=`$as_dirname -- "$as_myself" ||
1357$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1358 X"$as_myself" : 'X\(//\)[^/]' \| \
1359 X"$as_myself" : 'X\(//\)$' \| \
1360 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1361$as_echo X"$as_myself" |
1362 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1363 s//\1/
1364 q
1365 }
1366 /^X\(\/\/\)[^/].*/{
1367 s//\1/
1368 q
1369 }
1370 /^X\(\/\/\)$/{
1371 s//\1/
1372 q
1373 }
1374 /^X\(\/\).*/{
1375 s//\1/
1376 q
1377 }
1378 s/.*/./; q'`
c906108c 1379 srcdir=$ac_confdir
81ecdfbb 1380 if test ! -r "$srcdir/$ac_unique_file"; then
c906108c
SS
1381 srcdir=..
1382 fi
1383else
1384 ac_srcdir_defaulted=no
1385fi
81ecdfbb
RW
1386if test ! -r "$srcdir/$ac_unique_file"; then
1387 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1388 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
1389fi
1390ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1391ac_abs_confdir=`(
1392 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
1393 pwd)`
1394# When building in place, set srcdir=.
1395if test "$ac_abs_confdir" = "$ac_pwd"; then
1396 srcdir=.
1397fi
1398# Remove unnecessary trailing slashes from srcdir.
1399# Double slashes in file names in object file debugging info
1400# mess up M-x gdb in Emacs.
1401case $srcdir in
1402*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1403esac
1404for ac_var in $ac_precious_vars; do
1405 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1406 eval ac_env_${ac_var}_value=\$${ac_var}
1407 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1408 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1409done
c906108c 1410
bec39cab
AC
1411#
1412# Report the --help message.
1413#
1414if test "$ac_init_help" = "long"; then
1415 # Omit some internal or obsolete options to make the list less imposing.
1416 # This message is too long to be a string in the A/UX 3.1 sh.
1417 cat <<_ACEOF
1418\`configure' configures this package to adapt to many kinds of systems.
1419
1420Usage: $0 [OPTION]... [VAR=VALUE]...
1421
1422To assign environment variables (e.g., CC, CFLAGS...), specify them as
1423VAR=VALUE. See below for descriptions of some of the useful variables.
1424
1425Defaults for the options are specified in brackets.
1426
1427Configuration:
1428 -h, --help display this help and exit
1429 --help=short display options specific to this package
1430 --help=recursive display the short help of all the included packages
1431 -V, --version display version information and exit
1432 -q, --quiet, --silent do not print \`checking...' messages
1433 --cache-file=FILE cache test results in FILE [disabled]
1434 -C, --config-cache alias for \`--cache-file=config.cache'
1435 -n, --no-create do not create output files
1436 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1437
bec39cab
AC
1438Installation directories:
1439 --prefix=PREFIX install architecture-independent files in PREFIX
81ecdfbb 1440 [$ac_default_prefix]
bec39cab 1441 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
81ecdfbb 1442 [PREFIX]
bec39cab
AC
1443
1444By default, \`make install' will install all the files in
1445\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1446an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1447for instance \`--prefix=\$HOME'.
1448
1449For better control, use the options below.
1450
1451Fine tuning of the installation directories:
81ecdfbb
RW
1452 --bindir=DIR user executables [EPREFIX/bin]
1453 --sbindir=DIR system admin executables [EPREFIX/sbin]
1454 --libexecdir=DIR program executables [EPREFIX/libexec]
1455 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1456 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1457 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1458 --libdir=DIR object code libraries [EPREFIX/lib]
1459 --includedir=DIR C header files [PREFIX/include]
1460 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1461 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1462 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1463 --infodir=DIR info documentation [DATAROOTDIR/info]
1464 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1465 --mandir=DIR man documentation [DATAROOTDIR/man]
1466 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1467 --htmldir=DIR html documentation [DOCDIR]
1468 --dvidir=DIR dvi documentation [DOCDIR]
1469 --pdfdir=DIR pdf documentation [DOCDIR]
1470 --psdir=DIR ps documentation [DOCDIR]
bec39cab
AC
1471_ACEOF
1472
1473 cat <<\_ACEOF
1474
9009e1ae
MR
1475Program names:
1476 --program-prefix=PREFIX prepend PREFIX to installed program names
1477 --program-suffix=SUFFIX append SUFFIX to installed program names
1478 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1479
bec39cab
AC
1480X features:
1481 --x-includes=DIR X include files are in DIR
1482 --x-libraries=DIR X library files are in DIR
1483
1484System types:
1485 --build=BUILD configure for building on BUILD [guessed]
1486 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1487 --target=TARGET configure for building compilers for TARGET [HOST]
1488_ACEOF
1489fi
1490
1491if test -n "$ac_init_help"; then
1492
1493 cat <<\_ACEOF
1494
1495Optional Features:
81ecdfbb 1496 --disable-option-checking ignore unrecognized --enable/--with options
bec39cab
AC
1497 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1498 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
85981d60
AC
1499 --enable-maintainer-mode enable make rules and dependencies not useful
1500 (and sometimes confusing) to the casual installer
2974be62 1501 --enable-plugins Enable support for plugins
da2f07f1 1502 --disable-largefile omit support for large files
a1220294
TT
1503 --enable-targets=TARGETS
1504 alternative target configurations
c0993dbe 1505 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
bec39cab
AC
1506 --disable-gdbcli disable command-line interface (CLI)
1507 --disable-gdbmi disable machine-interface (MI)
1508 --enable-tui enable full-screen terminal user interface (TUI)
1509 --enable-gdbtk enable gdbtk graphical user interface (GUI)
1510 --enable-profiling enable profiling of GDB
3841debe 1511 --disable-rpath do not hardcode runtime library paths
17ef446e 1512 --enable-libmcheck Try linking with -lmcheck if available
a1220294 1513 --enable-werror treat compile warnings as errors
32c1c914 1514 --enable-build-warnings enable build-time compiler warnings if gcc is used
a1220294 1515 --enable-gdb-build-warnings
32c1c914 1516 enable GDB specific build-time compiler warnings if
a1220294 1517 gcc is used
32c1c914 1518 --enable-sim link gdb with simulator
bec39cab 1519 --enable-multi-ice build the multi-ice-gdb-server
496c0e1b
JB
1520 --enable-gdbserver automatically build gdbserver (yes/no/auto, default
1521 is auto)
bec39cab
AC
1522
1523Optional Packages:
1524 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1525 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
a1220294 1526 --with-separate-debug-dir=PATH
32c1c914 1527 look for global separate debug info in this path
62e4f60c 1528 [LIBDIR/debug]
b14b1491
TT
1529 --with-gdb-datadir=PATH look for global separate data files in this path
1530 [DATADIR/gdb]
29b0e8a2 1531 --with-relocated-sources=PATH
32c1c914 1532 automatically relocate this path for source files
7349ff92 1533 --with-auto-load-dir=PATH
aff139ff 1534 directories from which to load auto-loaded scripts
1564a261 1535 [$debugdir:$datadir/auto-load]
bccbefd2 1536 --with-auto-load-safe-path=PATH
aff139ff 1537 directories safe to hold auto-loaded files
7349ff92 1538 [--with-auto-load-dir]
bccbefd2
JK
1539 --without-auto-load-safe-path
1540 do not restrict auto-loaded files locations
05e7c244 1541 --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets
cb01cfba
JB
1542 --with-curses use the curses library instead of the termcap
1543 library
c16158bc
JM
1544 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
1545 --with-bugurl=URL Direct users to URL to report a bug
711a72d3 1546 --with-system-zlib use installed libz
016a3251
DD
1547 --with-gnu-ld assume the C compiler uses GNU ld default=no
1548 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
1549 --without-libiconv-prefix don't search for libiconv in includedir and libdir
478aac75 1550 --with-iconv-bin=PATH specify where to find the iconv program
6a30b0a5 1551 --with-system-readline use installed readline library
b8e0a31c
SD
1552 --with-jit-reader-dir=PATH
1553 directory to load the JIT readers from
5c39566f 1554 --with-expat include expat support (auto/yes/no)
3841debe
DJ
1555 --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib
1556 --without-libexpat-prefix don't search for libexpat in includedir and libdir
0c4a4063
DE
1557 --with-python[=PYTHON] include python support
1558 (auto/yes/no/<python-program>)
ed3ef339
DE
1559 --with-guile[=GUILE] include guile support
1560 (auto/yes/no/<guile-version>/<pkg-config-program>)
bc504a31 1561 --with-intel-pt include Intel Processor Trace support (auto/yes/no)
58bfce93
MM
1562 --with-libipt-prefix[=DIR] search for libipt in DIR/include and DIR/lib
1563 --without-libipt-prefix don't search for libipt in includedir and libdir
a1220294
TT
1564 --without-included-regex
1565 don't use included regex; this is the default on
1566 systems with version 2 of the GNU C library (use
1567 with caution on other system)
81ecdfbb 1568 --with-sysroot[=DIR] search for usr/lib et al within DIR
b14b1491 1569 --with-system-gdbinit=PATH
32c1c914 1570 automatically load a system-wide gdbinit file
608e2dbb
TT
1571 --with-lzma support lzma compression (auto/yes/no)
1572 --with-liblzma-prefix[=DIR] search for liblzma in DIR/include and DIR/lib
1573 --without-liblzma-prefix don't search for liblzma in includedir and libdir
5062cc19
KS
1574 --with-tcl directory containing tcl configuration (tclConfig.sh)
1575 --with-tk directory containing tk configuration (tkConfig.sh)
bec39cab 1576 --with-x use the X Window System
393fd4c3
YQ
1577 --with-babeltrace include babeltrace support (auto/yes/no)
1578 --with-libbabeltrace-prefix[=DIR] search for libbabeltrace in DIR/include and DIR/lib
1579 --without-libbabeltrace-prefix don't search for libbabeltrace in includedir and libdir
bec39cab
AC
1580
1581Some influential environment variables:
1582 CC C compiler command
1583 CFLAGS C compiler flags
1584 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1585 nonstandard directory <lib dir>
81ecdfbb
RW
1586 LIBS libraries to pass to the linker, e.g. -l<library>
1587 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1588 you have headers in a nonstandard directory <include dir>
3bc3d82a
PA
1589 CXX C++ compiler command
1590 CXXFLAGS C++ compiler flags
bec39cab 1591 CPP C preprocessor
f06e05e0
JK
1592 MAKEINFO Parent configure detects if it is of sufficient version.
1593 MAKEINFOFLAGS
1594 Parameters for MAKEINFO.
81ecdfbb
RW
1595 YACC The `Yet Another C Compiler' implementation to use. Defaults to
1596 the first program found out of: `bison -y', `byacc', `yacc'.
1597 YFLAGS The list of arguments that will be passed by default to $YACC.
1598 This script will default YFLAGS to the empty string to avoid a
1599 default value of `-d' given by some make applications.
1600 XMKMF Path to xmkmf, Makefile generator for X Window System
bec39cab
AC
1601
1602Use these variables to override the choices made by `configure' or to help
1603it to find libraries and programs with nonstandard names/locations.
1604
81ecdfbb 1605Report bugs to the package provider.
bec39cab 1606_ACEOF
81ecdfbb 1607ac_status=$?
bec39cab
AC
1608fi
1609
1610if test "$ac_init_help" = "recursive"; then
1611 # If there are subdirs, report their specific --help.
bec39cab 1612 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
81ecdfbb
RW
1613 test -d "$ac_dir" ||
1614 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1615 continue
bec39cab
AC
1616 ac_builddir=.
1617
81ecdfbb
RW
1618case "$ac_dir" in
1619.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1620*)
1621 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1622 # A ".." for each directory in $ac_dir_suffix.
1623 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1624 case $ac_top_builddir_sub in
1625 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1626 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1627 esac ;;
1628esac
1629ac_abs_top_builddir=$ac_pwd
1630ac_abs_builddir=$ac_pwd$ac_dir_suffix
1631# for backward compatibility:
1632ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
1633
1634case $srcdir in
81ecdfbb 1635 .) # We are building in place.
bec39cab 1636 ac_srcdir=.
81ecdfbb
RW
1637 ac_top_srcdir=$ac_top_builddir_sub
1638 ac_abs_top_srcdir=$ac_pwd ;;
1639 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 1640 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
1641 ac_top_srcdir=$srcdir
1642 ac_abs_top_srcdir=$srcdir ;;
1643 *) # Relative name.
1644 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1645 ac_top_srcdir=$ac_top_build_prefix$srcdir
1646 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 1647esac
81ecdfbb 1648ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 1649
81ecdfbb
RW
1650 cd "$ac_dir" || { ac_status=$?; continue; }
1651 # Check for guested configure.
1652 if test -f "$ac_srcdir/configure.gnu"; then
1653 echo &&
1654 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1655 elif test -f "$ac_srcdir/configure"; then
1656 echo &&
1657 $SHELL "$ac_srcdir/configure" --help=recursive
3ace7edb 1658 else
81ecdfbb
RW
1659 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1660 fi || ac_status=$?
1661 cd "$ac_pwd" || { ac_status=$?; break; }
bec39cab
AC
1662 done
1663fi
1664
81ecdfbb 1665test -n "$ac_init_help" && exit $ac_status
bec39cab
AC
1666if $ac_init_version; then
1667 cat <<\_ACEOF
81ecdfbb
RW
1668configure
1669generated by GNU Autoconf 2.64
bec39cab 1670
81ecdfbb 1671Copyright (C) 2009 Free Software Foundation, Inc.
bec39cab
AC
1672This configure script is free software; the Free Software Foundation
1673gives unlimited permission to copy, distribute and modify it.
1674_ACEOF
81ecdfbb 1675 exit
bec39cab 1676fi
bec39cab 1677
81ecdfbb
RW
1678## ------------------------ ##
1679## Autoconf initialization. ##
1680## ------------------------ ##
bec39cab 1681
81ecdfbb
RW
1682# ac_fn_c_try_compile LINENO
1683# --------------------------
1684# Try to compile conftest.$ac_ext, and return whether this succeeded.
1685ac_fn_c_try_compile ()
1686{
1687 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1688 rm -f conftest.$ac_objext
1689 if { { ac_try="$ac_compile"
1690case "(($ac_try" in
1691 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1692 *) ac_try_echo=$ac_try;;
1693esac
1694eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1695$as_echo "$ac_try_echo"; } >&5
1696 (eval "$ac_compile") 2>conftest.err
1697 ac_status=$?
1698 if test -s conftest.err; then
1699 grep -v '^ *+' conftest.err >conftest.er1
1700 cat conftest.er1 >&5
1701 mv -f conftest.er1 conftest.err
1702 fi
1703 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1704 test $ac_status = 0; } && {
1705 test -z "$ac_c_werror_flag" ||
1706 test ! -s conftest.err
1707 } && test -s conftest.$ac_objext; then :
1708 ac_retval=0
1709else
1710 $as_echo "$as_me: failed program was:" >&5
1711sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1712
81ecdfbb
RW
1713 ac_retval=1
1714fi
1715 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1716 return $ac_retval
1717
1718} # ac_fn_c_try_compile
1719
3bc3d82a
PA
1720# ac_fn_cxx_try_compile LINENO
1721# ----------------------------
1722# Try to compile conftest.$ac_ext, and return whether this succeeded.
1723ac_fn_cxx_try_compile ()
1724{
1725 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1726 rm -f conftest.$ac_objext
1727 if { { ac_try="$ac_compile"
1728case "(($ac_try" in
1729 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1730 *) ac_try_echo=$ac_try;;
1731esac
1732eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1733$as_echo "$ac_try_echo"; } >&5
1734 (eval "$ac_compile") 2>conftest.err
1735 ac_status=$?
1736 if test -s conftest.err; then
1737 grep -v '^ *+' conftest.err >conftest.er1
1738 cat conftest.er1 >&5
1739 mv -f conftest.er1 conftest.err
1740 fi
1741 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1742 test $ac_status = 0; } && {
1743 test -z "$ac_cxx_werror_flag" ||
1744 test ! -s conftest.err
1745 } && test -s conftest.$ac_objext; then :
1746 ac_retval=0
1747else
1748 $as_echo "$as_me: failed program was:" >&5
1749sed 's/^/| /' conftest.$ac_ext >&5
1750
1751 ac_retval=1
1752fi
1753 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1754 return $ac_retval
1755
1756} # ac_fn_cxx_try_compile
1757
81ecdfbb
RW
1758# ac_fn_c_try_cpp LINENO
1759# ----------------------
1760# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1761ac_fn_c_try_cpp ()
bec39cab 1762{
81ecdfbb
RW
1763 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1764 if { { ac_try="$ac_cpp conftest.$ac_ext"
1765case "(($ac_try" in
1766 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1767 *) ac_try_echo=$ac_try;;
1768esac
1769eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1770$as_echo "$ac_try_echo"; } >&5
1771 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1772 ac_status=$?
1773 if test -s conftest.err; then
1774 grep -v '^ *+' conftest.err >conftest.er1
1775 cat conftest.er1 >&5
1776 mv -f conftest.er1 conftest.err
1777 fi
1778 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1779 test $ac_status = 0; } >/dev/null && {
1780 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1781 test ! -s conftest.err
1782 }; then :
1783 ac_retval=0
1784else
1785 $as_echo "$as_me: failed program was:" >&5
1786sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1787
81ecdfbb
RW
1788 ac_retval=1
1789fi
1790 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1791 return $ac_retval
bec39cab 1792
81ecdfbb 1793} # ac_fn_c_try_cpp
bec39cab 1794
81ecdfbb
RW
1795# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1796# -------------------------------------------------------
1797# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1798# the include files in INCLUDES and setting the cache variable VAR
1799# accordingly.
1800ac_fn_c_check_header_mongrel ()
1801{
1802 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1803 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1805$as_echo_n "checking for $2... " >&6; }
1806if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1807 $as_echo_n "(cached) " >&6
1808fi
1809eval ac_res=\$$3
1810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1811$as_echo "$ac_res" >&6; }
1812else
1813 # Is the header compilable?
1814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1815$as_echo_n "checking $2 usability... " >&6; }
1816cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1817/* end confdefs.h. */
1818$4
1819#include <$2>
1820_ACEOF
1821if ac_fn_c_try_compile "$LINENO"; then :
1822 ac_header_compiler=yes
1823else
1824 ac_header_compiler=no
1825fi
1826rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1827{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1828$as_echo "$ac_header_compiler" >&6; }
bec39cab 1829
81ecdfbb
RW
1830# Is the header present?
1831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1832$as_echo_n "checking $2 presence... " >&6; }
1833cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1834/* end confdefs.h. */
1835#include <$2>
1836_ACEOF
1837if ac_fn_c_try_cpp "$LINENO"; then :
1838 ac_header_preproc=yes
1839else
1840 ac_header_preproc=no
1841fi
1842rm -f conftest.err conftest.$ac_ext
1843{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1844$as_echo "$ac_header_preproc" >&6; }
bec39cab 1845
81ecdfbb
RW
1846# So? What about this header?
1847case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1848 yes:no: )
1849 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1850$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1851 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1852$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1853 ;;
1854 no:yes:* )
1855 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1856$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1857 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1858$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1859 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1860$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1861 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1862$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1863 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1864$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1865 ;;
1866esac
1867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1868$as_echo_n "checking for $2... " >&6; }
1869if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1870 $as_echo_n "(cached) " >&6
1871else
1872 eval "$3=\$ac_header_compiler"
1873fi
1874eval ac_res=\$$3
1875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1876$as_echo "$ac_res" >&6; }
1877fi
1878 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 1879
81ecdfbb 1880} # ac_fn_c_check_header_mongrel
bec39cab 1881
81ecdfbb
RW
1882# ac_fn_c_try_run LINENO
1883# ----------------------
1884# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1885# that executables *can* be run.
1886ac_fn_c_try_run ()
1887{
1888 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1889 if { { ac_try="$ac_link"
1890case "(($ac_try" in
1891 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1892 *) ac_try_echo=$ac_try;;
1893esac
1894eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1895$as_echo "$ac_try_echo"; } >&5
1896 (eval "$ac_link") 2>&5
1897 ac_status=$?
1898 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1899 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1900 { { case "(($ac_try" in
1901 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1902 *) ac_try_echo=$ac_try;;
1903esac
1904eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1905$as_echo "$ac_try_echo"; } >&5
1906 (eval "$ac_try") 2>&5
1907 ac_status=$?
1908 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1909 test $ac_status = 0; }; }; then :
1910 ac_retval=0
1911else
1912 $as_echo "$as_me: program exited with status $ac_status" >&5
1913 $as_echo "$as_me: failed program was:" >&5
1914sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1915
81ecdfbb
RW
1916 ac_retval=$ac_status
1917fi
1918 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1919 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1920 return $ac_retval
bec39cab 1921
81ecdfbb 1922} # ac_fn_c_try_run
bec39cab 1923
81ecdfbb
RW
1924# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1925# -------------------------------------------------------
1926# Tests whether HEADER exists and can be compiled using the include files in
1927# INCLUDES, setting the cache variable VAR accordingly.
1928ac_fn_c_check_header_compile ()
1929{
1930 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1931 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1932$as_echo_n "checking for $2... " >&6; }
1933if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1934 $as_echo_n "(cached) " >&6
1935else
1936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1937/* end confdefs.h. */
1938$4
1939#include <$2>
bec39cab 1940_ACEOF
81ecdfbb
RW
1941if ac_fn_c_try_compile "$LINENO"; then :
1942 eval "$3=yes"
1943else
1944 eval "$3=no"
1945fi
1946rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1947fi
1948eval ac_res=\$$3
1949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1950$as_echo "$ac_res" >&6; }
1951 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 1952
81ecdfbb 1953} # ac_fn_c_check_header_compile
bec39cab 1954
2974be62
AM
1955# ac_fn_c_try_link LINENO
1956# -----------------------
1957# Try to link conftest.$ac_ext, and return whether this succeeded.
1958ac_fn_c_try_link ()
1959{
1960 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1961 rm -f conftest.$ac_objext conftest$ac_exeext
1962 if { { ac_try="$ac_link"
1963case "(($ac_try" in
1964 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1965 *) ac_try_echo=$ac_try;;
1966esac
1967eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1968$as_echo "$ac_try_echo"; } >&5
1969 (eval "$ac_link") 2>conftest.err
1970 ac_status=$?
1971 if test -s conftest.err; then
1972 grep -v '^ *+' conftest.err >conftest.er1
1973 cat conftest.er1 >&5
1974 mv -f conftest.er1 conftest.err
1975 fi
1976 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1977 test $ac_status = 0; } && {
1978 test -z "$ac_c_werror_flag" ||
1979 test ! -s conftest.err
1980 } && test -s conftest$ac_exeext && {
1981 test "$cross_compiling" = yes ||
1982 $as_test_x conftest$ac_exeext
1983 }; then :
1984 ac_retval=0
1985else
1986 $as_echo "$as_me: failed program was:" >&5
1987sed 's/^/| /' conftest.$ac_ext >&5
1988
1989 ac_retval=1
1990fi
1991 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1992 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1993 # interfere with the next link command; also delete a directory that is
1994 # left behind by Apple's compiler. We do this before executing the actions.
1995 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1996 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1997 return $ac_retval
1998
1999} # ac_fn_c_try_link
2000
81ecdfbb
RW
2001# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2002# --------------------------------------------
2003# Tries to find the compile-time value of EXPR in a program that includes
2004# INCLUDES, setting VAR accordingly. Returns whether the value could be
2005# computed
2006ac_fn_c_compute_int ()
2007{
2008 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2009 if test "$cross_compiling" = yes; then
2010 # Depending upon the size, compute the lo and hi bounds.
2011cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2012/* end confdefs.h. */
2013$4
2014int
2015main ()
2016{
2017static int test_array [1 - 2 * !(($2) >= 0)];
2018test_array [0] = 0
bec39cab 2019
81ecdfbb
RW
2020 ;
2021 return 0;
2022}
2023_ACEOF
2024if ac_fn_c_try_compile "$LINENO"; then :
2025 ac_lo=0 ac_mid=0
2026 while :; do
2027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2028/* end confdefs.h. */
2029$4
2030int
2031main ()
2032{
2033static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2034test_array [0] = 0
bec39cab 2035
81ecdfbb
RW
2036 ;
2037 return 0;
2038}
2039_ACEOF
2040if ac_fn_c_try_compile "$LINENO"; then :
2041 ac_hi=$ac_mid; break
2042else
2043 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2044 if test $ac_lo -le $ac_mid; then
2045 ac_lo= ac_hi=
2046 break
2047 fi
2048 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
c906108c 2049fi
81ecdfbb
RW
2050rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2051 done
c906108c 2052else
81ecdfbb
RW
2053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2054/* end confdefs.h. */
2055$4
2056int
2057main ()
2058{
2059static int test_array [1 - 2 * !(($2) < 0)];
2060test_array [0] = 0
bec39cab 2061
81ecdfbb
RW
2062 ;
2063 return 0;
2064}
2065_ACEOF
2066if ac_fn_c_try_compile "$LINENO"; then :
2067 ac_hi=-1 ac_mid=-1
2068 while :; do
2069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2070/* end confdefs.h. */
2071$4
2072int
2073main ()
2074{
2075static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2076test_array [0] = 0
bec39cab 2077
81ecdfbb
RW
2078 ;
2079 return 0;
2080}
2081_ACEOF
2082if ac_fn_c_try_compile "$LINENO"; then :
2083 ac_lo=$ac_mid; break
2084else
2085 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2086 if test $ac_mid -le $ac_hi; then
2087 ac_lo= ac_hi=
2088 break
2089 fi
2090 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2091fi
2092rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2093 done
2094else
2095 ac_lo= ac_hi=
2096fi
2097rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2098fi
2099rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2100# Binary search between lo and hi bounds.
2101while test "x$ac_lo" != "x$ac_hi"; do
2102 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2104/* end confdefs.h. */
2105$4
2106int
2107main ()
2108{
2109static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2110test_array [0] = 0
bec39cab 2111
81ecdfbb
RW
2112 ;
2113 return 0;
2114}
2115_ACEOF
2116if ac_fn_c_try_compile "$LINENO"; then :
2117 ac_hi=$ac_mid
2118else
2119 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2120fi
2121rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2122done
2123case $ac_lo in #((
2124?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2125'') ac_retval=1 ;;
2126esac
2127 else
2128 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2129/* end confdefs.h. */
2130$4
2131static long int longval () { return $2; }
2132static unsigned long int ulongval () { return $2; }
2133#include <stdio.h>
2134#include <stdlib.h>
2135int
2136main ()
2137{
bec39cab 2138
81ecdfbb
RW
2139 FILE *f = fopen ("conftest.val", "w");
2140 if (! f)
2141 return 1;
2142 if (($2) < 0)
2143 {
2144 long int i = longval ();
2145 if (i != ($2))
2146 return 1;
2147 fprintf (f, "%ld", i);
2148 }
2149 else
2150 {
2151 unsigned long int i = ulongval ();
2152 if (i != ($2))
2153 return 1;
2154 fprintf (f, "%lu", i);
2155 }
2156 /* Do not output a trailing newline, as this causes \r\n confusion
2157 on some platforms. */
2158 return ferror (f) || fclose (f) != 0;
bec39cab 2159
81ecdfbb
RW
2160 ;
2161 return 0;
2162}
2163_ACEOF
2164if ac_fn_c_try_run "$LINENO"; then :
2165 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2166else
2167 ac_retval=1
2168fi
2169rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2170 conftest.$ac_objext conftest.beam conftest.$ac_ext
2171rm -f conftest.val
bec39cab 2172
81ecdfbb
RW
2173 fi
2174 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2175 return $ac_retval
bec39cab 2176
81ecdfbb 2177} # ac_fn_c_compute_int
bec39cab 2178
55a8c076
YQ
2179# ac_fn_c_check_func LINENO FUNC VAR
2180# ----------------------------------
2181# Tests whether FUNC exists, setting the cache variable VAR accordingly
2182ac_fn_c_check_func ()
81ecdfbb
RW
2183{
2184 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2186$as_echo_n "checking for $2... " >&6; }
2187if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2188 $as_echo_n "(cached) " >&6
2189else
81ecdfbb
RW
2190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2191/* end confdefs.h. */
55a8c076
YQ
2192/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2193 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2194#define $2 innocuous_$2
2195
2196/* System header to define __stub macros and hopefully few prototypes,
2197 which can conflict with char $2 (); below.
2198 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2199 <limits.h> exists even on freestanding compilers. */
2200
2201#ifdef __STDC__
2202# include <limits.h>
2203#else
2204# include <assert.h>
2205#endif
2206
2207#undef $2
2208
2209/* Override any GCC internal prototype to avoid an error.
2210 Use char because int might match the return type of a GCC
2211 builtin and then its argument prototype would still apply. */
2212#ifdef __cplusplus
2213extern "C"
2214#endif
2215char $2 ();
2216/* The GNU C library defines this for functions which it implements
2217 to always fail with ENOSYS. Some functions are actually named
2218 something starting with __ and the normal name is an alias. */
2219#if defined __stub_$2 || defined __stub___$2
2220choke me
2221#endif
2222
2223int
2224main ()
2225{
2226return $2 ();
2227 ;
2228 return 0;
2229}
2230_ACEOF
2231if ac_fn_c_try_link "$LINENO"; then :
2232 eval "$3=yes"
2233else
2234 eval "$3=no"
2235fi
2236rm -f core conftest.err conftest.$ac_objext \
2237 conftest$ac_exeext conftest.$ac_ext
2238fi
2239eval ac_res=\$$3
2240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2241$as_echo "$ac_res" >&6; }
2242 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2243
2244} # ac_fn_c_check_func
2245
07697489
PA
2246# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2247# -------------------------------------------
2248# Tests whether TYPE exists after having included INCLUDES, setting cache
2249# variable VAR accordingly.
2250ac_fn_c_check_type ()
2251{
2252 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2253 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2254$as_echo_n "checking for $2... " >&6; }
2255if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2256 $as_echo_n "(cached) " >&6
2257else
2258 eval "$3=no"
2259 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2260/* end confdefs.h. */
2261$4
2262int
2263main ()
2264{
2265if (sizeof ($2))
2266 return 0;
2267 ;
2268 return 0;
2269}
2270_ACEOF
2271if ac_fn_c_try_compile "$LINENO"; then :
2272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2273/* end confdefs.h. */
2274$4
2275int
2276main ()
2277{
2278if (sizeof (($2)))
2279 return 0;
2280 ;
2281 return 0;
2282}
2283_ACEOF
2284if ac_fn_c_try_compile "$LINENO"; then :
2285
2286else
2287 eval "$3=yes"
2288fi
2289rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2290fi
2291rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2292fi
2293eval ac_res=\$$3
2294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2295$as_echo "$ac_res" >&6; }
2296 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2297
2298} # ac_fn_c_check_type
2299
770d76d7
PA
2300# ac_fn_c_check_decl LINENO SYMBOL VAR
2301# ------------------------------------
2302# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2303ac_fn_c_check_decl ()
2304{
2305 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2306 as_decl_name=`echo $2|sed 's/ *(.*//'`
2307 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2308 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2309$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2310if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2311 $as_echo_n "(cached) " >&6
2312else
2313 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2314/* end confdefs.h. */
2315$4
2316int
2317main ()
2318{
2319#ifndef $as_decl_name
2320#ifdef __cplusplus
2321 (void) $as_decl_use;
2322#else
2323 (void) $as_decl_name;
2324#endif
2325#endif
2326
2327 ;
2328 return 0;
2329}
2330_ACEOF
2331if ac_fn_c_try_compile "$LINENO"; then :
2332 eval "$3=yes"
2333else
2334 eval "$3=no"
2335fi
2336rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2337fi
2338eval ac_res=\$$3
2339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2340$as_echo "$ac_res" >&6; }
2341 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2342
2343} # ac_fn_c_check_decl
2344
55a8c076
YQ
2345# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2346# ----------------------------------------------------
2347# Tries to find if the field MEMBER exists in type AGGR, after including
2348# INCLUDES, setting cache variable VAR accordingly.
2349ac_fn_c_check_member ()
2350{
2351 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2353$as_echo_n "checking for $2.$3... " >&6; }
2354if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
2355 $as_echo_n "(cached) " >&6
2356else
2357 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2358/* end confdefs.h. */
2359$5
2360int
2361main ()
2362{
2363static $2 ac_aggr;
2364if (ac_aggr.$3)
2365return 0;
2366 ;
2367 return 0;
2368}
2369_ACEOF
2370if ac_fn_c_try_compile "$LINENO"; then :
2371 eval "$4=yes"
2372else
2373 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2374/* end confdefs.h. */
2375$5
2376int
2377main ()
2378{
2379static $2 ac_aggr;
2380if (sizeof ac_aggr.$3)
2381return 0;
2382 ;
2383 return 0;
2384}
2385_ACEOF
2386if ac_fn_c_try_compile "$LINENO"; then :
2387 eval "$4=yes"
2388else
2389 eval "$4=no"
2390fi
2391rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2392fi
2393rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2394fi
2395eval ac_res=\$$4
2396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2397$as_echo "$ac_res" >&6; }
2398 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2399
2400} # ac_fn_c_check_member
81ecdfbb
RW
2401cat >config.log <<_ACEOF
2402This file contains any messages produced by compilers while
2403running configure, to aid debugging if configure makes a mistake.
d5af19ba 2404
81ecdfbb
RW
2405It was created by $as_me, which was
2406generated by GNU Autoconf 2.64. Invocation command line was
b4e70030 2407
81ecdfbb 2408 $ $0 $@
413ccac7 2409
81ecdfbb
RW
2410_ACEOF
2411exec 5>>config.log
2412{
2413cat <<_ASUNAME
2414## --------- ##
2415## Platform. ##
2416## --------- ##
413ccac7 2417
81ecdfbb
RW
2418hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2419uname -m = `(uname -m) 2>/dev/null || echo unknown`
2420uname -r = `(uname -r) 2>/dev/null || echo unknown`
2421uname -s = `(uname -s) 2>/dev/null || echo unknown`
2422uname -v = `(uname -v) 2>/dev/null || echo unknown`
85981d60 2423
81ecdfbb
RW
2424/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2425/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
413ccac7 2426
81ecdfbb
RW
2427/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2428/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2429/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2430/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2431/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2432/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2433/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
c906108c 2434
81ecdfbb 2435_ASUNAME
bec39cab 2436
bec39cab
AC
2437as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2438for as_dir in $PATH
2439do
2440 IFS=$as_save_IFS
2441 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2442 $as_echo "PATH: $as_dir"
2443 done
2444IFS=$as_save_IFS
bec39cab 2445
81ecdfbb 2446} >&5
bec39cab 2447
81ecdfbb 2448cat >&5 <<_ACEOF
bec39cab 2449
bec39cab 2450
81ecdfbb
RW
2451## ----------- ##
2452## Core tests. ##
2453## ----------- ##
2454
2455_ACEOF
2456
2457
2458# Keep a trace of the command line.
2459# Strip out --no-create and --no-recursion so they do not pile up.
2460# Strip out --silent because we don't want to record it for future runs.
2461# Also quote any args containing shell meta-characters.
2462# Make two passes to allow for proper duplicate-argument suppression.
2463ac_configure_args=
2464ac_configure_args0=
2465ac_configure_args1=
2466ac_must_keep_next=false
2467for ac_pass in 1 2
2468do
2469 for ac_arg
2470 do
2471 case $ac_arg in
2472 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2473 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2474 | -silent | --silent | --silen | --sile | --sil)
2475 continue ;;
2476 *\'*)
2477 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2478 esac
2479 case $ac_pass in
2480 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2481 2)
2482 as_fn_append ac_configure_args1 " '$ac_arg'"
2483 if test $ac_must_keep_next = true; then
2484 ac_must_keep_next=false # Got value, back to normal.
2485 else
2486 case $ac_arg in
2487 *=* | --config-cache | -C | -disable-* | --disable-* \
2488 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2489 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2490 | -with-* | --with-* | -without-* | --without-* | --x)
2491 case "$ac_configure_args0 " in
2492 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2493 esac
2494 ;;
2495 -* ) ac_must_keep_next=true ;;
2496 esac
2497 fi
2498 as_fn_append ac_configure_args " '$ac_arg'"
2499 ;;
2500 esac
2501 done
2502done
2503{ ac_configure_args0=; unset ac_configure_args0;}
2504{ ac_configure_args1=; unset ac_configure_args1;}
2505
2506# When interrupted or exit'd, cleanup temporary files, and complete
2507# config.log. We remove comments because anyway the quotes in there
2508# would cause problems or look ugly.
2509# WARNING: Use '\'' to represent an apostrophe within the trap.
2510# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2511trap 'exit_status=$?
2512 # Save into config.log some information that might help in debugging.
2513 {
2514 echo
2515
2516 cat <<\_ASBOX
2517## ---------------- ##
2518## Cache variables. ##
2519## ---------------- ##
2520_ASBOX
2521 echo
2522 # The following way of writing the cache mishandles newlines in values,
2523(
2524 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2525 eval ac_val=\$$ac_var
2526 case $ac_val in #(
2527 *${as_nl}*)
2528 case $ac_var in #(
2529 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2530$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2531 esac
2532 case $ac_var in #(
2533 _ | IFS | as_nl) ;; #(
2534 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2535 *) { eval $ac_var=; unset $ac_var;} ;;
2536 esac ;;
2537 esac
2538 done
2539 (set) 2>&1 |
2540 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2541 *${as_nl}ac_space=\ *)
2542 sed -n \
2543 "s/'\''/'\''\\\\'\'''\''/g;
2544 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2545 ;; #(
2546 *)
2547 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2548 ;;
2549 esac |
2550 sort
2551)
2552 echo
2553
2554 cat <<\_ASBOX
2555## ----------------- ##
2556## Output variables. ##
2557## ----------------- ##
2558_ASBOX
2559 echo
2560 for ac_var in $ac_subst_vars
2561 do
2562 eval ac_val=\$$ac_var
2563 case $ac_val in
2564 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2565 esac
2566 $as_echo "$ac_var='\''$ac_val'\''"
2567 done | sort
2568 echo
2569
2570 if test -n "$ac_subst_files"; then
2571 cat <<\_ASBOX
2572## ------------------- ##
2573## File substitutions. ##
2574## ------------------- ##
2575_ASBOX
2576 echo
2577 for ac_var in $ac_subst_files
2578 do
2579 eval ac_val=\$$ac_var
2580 case $ac_val in
2581 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2582 esac
2583 $as_echo "$ac_var='\''$ac_val'\''"
2584 done | sort
2585 echo
2586 fi
2587
2588 if test -s confdefs.h; then
2589 cat <<\_ASBOX
2590## ----------- ##
2591## confdefs.h. ##
2592## ----------- ##
2593_ASBOX
2594 echo
2595 cat confdefs.h
2596 echo
2597 fi
2598 test "$ac_signal" != 0 &&
2599 $as_echo "$as_me: caught signal $ac_signal"
2600 $as_echo "$as_me: exit $exit_status"
2601 } >&5
2602 rm -f core *.core core.conftest.* &&
2603 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2604 exit $exit_status
2605' 0
2606for ac_signal in 1 2 13 15; do
2607 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2608done
2609ac_signal=0
2610
2611# confdefs.h avoids OS command line length limits that DEFS can exceed.
2612rm -f -r conftest* confdefs.h
2613
2614$as_echo "/* confdefs.h */" > confdefs.h
2615
2616# Predefined preprocessor variables.
2617
2618cat >>confdefs.h <<_ACEOF
2619#define PACKAGE_NAME "$PACKAGE_NAME"
2620_ACEOF
2621
2622cat >>confdefs.h <<_ACEOF
2623#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2624_ACEOF
2625
2626cat >>confdefs.h <<_ACEOF
2627#define PACKAGE_VERSION "$PACKAGE_VERSION"
2628_ACEOF
2629
2630cat >>confdefs.h <<_ACEOF
2631#define PACKAGE_STRING "$PACKAGE_STRING"
2632_ACEOF
2633
2634cat >>confdefs.h <<_ACEOF
2635#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2636_ACEOF
2637
2638cat >>confdefs.h <<_ACEOF
2639#define PACKAGE_URL "$PACKAGE_URL"
2640_ACEOF
2641
2642
2643# Let the site file select an alternate cache file if it wants to.
2644# Prefer an explicitly selected file to automatically selected ones.
2645ac_site_file1=NONE
2646ac_site_file2=NONE
2647if test -n "$CONFIG_SITE"; then
2648 ac_site_file1=$CONFIG_SITE
2649elif test "x$prefix" != xNONE; then
2650 ac_site_file1=$prefix/share/config.site
2651 ac_site_file2=$prefix/etc/config.site
2652else
2653 ac_site_file1=$ac_default_prefix/share/config.site
2654 ac_site_file2=$ac_default_prefix/etc/config.site
2655fi
2656for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2657do
2658 test "x$ac_site_file" = xNONE && continue
2659 if test -r "$ac_site_file"; then
2660 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2661$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2662 sed 's/^/| /' "$ac_site_file" >&5
2663 . "$ac_site_file"
2664 fi
2665done
2666
2667if test -r "$cache_file"; then
2668 # Some versions of bash will fail to source /dev/null (special
2669 # files actually), so we avoid doing that.
2670 if test -f "$cache_file"; then
2671 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2672$as_echo "$as_me: loading cache $cache_file" >&6;}
2673 case $cache_file in
2674 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2675 *) . "./$cache_file";;
2676 esac
2677 fi
2678else
2679 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2680$as_echo "$as_me: creating cache $cache_file" >&6;}
2681 >$cache_file
bec39cab
AC
2682fi
2683
81ecdfbb
RW
2684# Check that the precious variables saved in the cache have kept the same
2685# value.
2686ac_cache_corrupted=false
2687for ac_var in $ac_precious_vars; do
2688 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2689 eval ac_new_set=\$ac_env_${ac_var}_set
2690 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2691 eval ac_new_val=\$ac_env_${ac_var}_value
2692 case $ac_old_set,$ac_new_set in
2693 set,)
2694 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2695$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2696 ac_cache_corrupted=: ;;
2697 ,set)
2698 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2699$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2700 ac_cache_corrupted=: ;;
2701 ,);;
2702 *)
2703 if test "x$ac_old_val" != "x$ac_new_val"; then
2704 # differences in whitespace do not lead to failure.
2705 ac_old_val_w=`echo x $ac_old_val`
2706 ac_new_val_w=`echo x $ac_new_val`
2707 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2708 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2709$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2710 ac_cache_corrupted=:
2711 else
2712 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2713$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2714 eval $ac_var=\$ac_old_val
2715 fi
2716 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2717$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2718 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2719$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2720 fi;;
2721 esac
2722 # Pass precious variables to config.status.
2723 if test "$ac_new_set" = set; then
2724 case $ac_new_val in
2725 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2726 *) ac_arg=$ac_var=$ac_new_val ;;
2727 esac
2728 case " $ac_configure_args " in
2729 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2730 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2731 esac
2732 fi
2733done
2734if $ac_cache_corrupted; then
2735 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2736$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2737 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2738$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2739 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2740fi
2741## -------------------- ##
2742## Main body of script. ##
2743## -------------------- ##
2744
2745ac_ext=c
2746ac_cpp='$CPP $CPPFLAGS'
2747ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2748ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2749ac_compiler_gnu=$ac_cv_c_compiler_gnu
2750
2751
2752
2753
2754
2755ac_config_headers="$ac_config_headers config.h:config.in"
2756
2757
2758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2759$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2760 # Check whether --enable-maintainer-mode was given.
2761if test "${enable_maintainer_mode+set}" = set; then :
2762 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2763else
2764 USE_MAINTAINER_MODE=no
2765fi
2766
2767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
2768$as_echo "$USE_MAINTAINER_MODE" >&6; }
2769 if test $USE_MAINTAINER_MODE = yes; then
2770 MAINTAINER_MODE_TRUE=
2771 MAINTAINER_MODE_FALSE='#'
2772else
2773 MAINTAINER_MODE_TRUE='#'
2774 MAINTAINER_MODE_FALSE=
2775fi
2776
2777 MAINT=$MAINTAINER_MODE_TRUE
2778
2779
2780
17ef446e 2781# Set the 'development' global.
270c9937 2782. $srcdir/../bfd/development.sh
f5f1cdb6 2783
81ecdfbb
RW
2784ac_ext=c
2785ac_cpp='$CPP $CPPFLAGS'
2786ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2787ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2788ac_compiler_gnu=$ac_cv_c_compiler_gnu
2789if test -n "$ac_tool_prefix"; then
2790 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2791set dummy ${ac_tool_prefix}gcc; ac_word=$2
2792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2793$as_echo_n "checking for $ac_word... " >&6; }
2794if test "${ac_cv_prog_CC+set}" = set; then :
2795 $as_echo_n "(cached) " >&6
c906108c
SS
2796else
2797 if test -n "$CC"; then
2798 ac_cv_prog_CC="$CC" # Let the user override the test.
2799else
bec39cab
AC
2800as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2801for as_dir in $PATH
2802do
2803 IFS=$as_save_IFS
2804 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2805 for ac_exec_ext in '' $ac_executable_extensions; do
2806 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2807 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2808 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2809 break 2
2810 fi
2811done
81ecdfbb
RW
2812 done
2813IFS=$as_save_IFS
bec39cab 2814
c906108c
SS
2815fi
2816fi
bec39cab 2817CC=$ac_cv_prog_CC
c906108c 2818if test -n "$CC"; then
81ecdfbb
RW
2819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2820$as_echo "$CC" >&6; }
c906108c 2821else
81ecdfbb
RW
2822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2823$as_echo "no" >&6; }
c906108c
SS
2824fi
2825
81ecdfbb 2826
b4e70030
JB
2827fi
2828if test -z "$ac_cv_prog_CC"; then
2829 ac_ct_CC=$CC
81ecdfbb
RW
2830 # Extract the first word of "gcc", so it can be a program name with args.
2831set dummy gcc; ac_word=$2
2832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2833$as_echo_n "checking for $ac_word... " >&6; }
2834if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
2835 $as_echo_n "(cached) " >&6
b4e70030
JB
2836else
2837 if test -n "$ac_ct_CC"; then
2838 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2839else
2840as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2841for as_dir in $PATH
2842do
2843 IFS=$as_save_IFS
2844 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2845 for ac_exec_ext in '' $ac_executable_extensions; do
2846 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2847 ac_cv_prog_ac_ct_CC="gcc"
2848 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b4e70030 2849 break 2
4e8d927d 2850 fi
b4e70030 2851done
81ecdfbb
RW
2852 done
2853IFS=$as_save_IFS
b4e70030
JB
2854
2855fi
2856fi
2857ac_ct_CC=$ac_cv_prog_ac_ct_CC
2858if test -n "$ac_ct_CC"; then
81ecdfbb
RW
2859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2860$as_echo "$ac_ct_CC" >&6; }
b4e70030 2861else
81ecdfbb
RW
2862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2863$as_echo "no" >&6; }
b4e70030
JB
2864fi
2865
81ecdfbb
RW
2866 if test "x$ac_ct_CC" = x; then
2867 CC=""
2868 else
2869 case $cross_compiling:$ac_tool_warned in
2870yes:)
2871{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2872$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2873ac_tool_warned=yes ;;
2874esac
2875 CC=$ac_ct_CC
2876 fi
b4e70030
JB
2877else
2878 CC="$ac_cv_prog_CC"
2879fi
2880
c906108c 2881if test -z "$CC"; then
81ecdfbb
RW
2882 if test -n "$ac_tool_prefix"; then
2883 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2884set dummy ${ac_tool_prefix}cc; ac_word=$2
2885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2886$as_echo_n "checking for $ac_word... " >&6; }
2887if test "${ac_cv_prog_CC+set}" = set; then :
2888 $as_echo_n "(cached) " >&6
c906108c
SS
2889else
2890 if test -n "$CC"; then
2891 ac_cv_prog_CC="$CC" # Let the user override the test.
2892else
bec39cab
AC
2893as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2894for as_dir in $PATH
2895do
2896 IFS=$as_save_IFS
2897 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2898 for ac_exec_ext in '' $ac_executable_extensions; do
2899 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2900 ac_cv_prog_CC="${ac_tool_prefix}cc"
2901 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2902 break 2
2903 fi
2904done
81ecdfbb
RW
2905 done
2906IFS=$as_save_IFS
2907
2908fi
2909fi
2910CC=$ac_cv_prog_CC
2911if test -n "$CC"; then
2912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2913$as_echo "$CC" >&6; }
2914else
2915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2916$as_echo "no" >&6; }
2917fi
2918
2919
2920 fi
2921fi
2922if test -z "$CC"; then
2923 # Extract the first word of "cc", so it can be a program name with args.
2924set dummy cc; ac_word=$2
2925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2926$as_echo_n "checking for $ac_word... " >&6; }
2927if test "${ac_cv_prog_CC+set}" = set; then :
2928 $as_echo_n "(cached) " >&6
2929else
2930 if test -n "$CC"; then
2931 ac_cv_prog_CC="$CC" # Let the user override the test.
2932else
2933 ac_prog_rejected=no
2934as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2935for as_dir in $PATH
2936do
2937 IFS=$as_save_IFS
2938 test -z "$as_dir" && as_dir=.
2939 for ac_exec_ext in '' $ac_executable_extensions; do
2940 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2941 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2942 ac_prog_rejected=yes
2943 continue
2944 fi
2945 ac_cv_prog_CC="cc"
2946 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2947 break 2
2948 fi
2949done
2950 done
2951IFS=$as_save_IFS
bec39cab 2952
c906108c
SS
2953if test $ac_prog_rejected = yes; then
2954 # We found a bogon in the path, so make sure we never use it.
2955 set dummy $ac_cv_prog_CC
2956 shift
bec39cab 2957 if test $# != 0; then
c906108c
SS
2958 # We chose a different compiler from the bogus one.
2959 # However, it has the same basename, so the bogon will be chosen
2960 # first if we set CC to just the basename; use the full file name.
2961 shift
bec39cab 2962 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
c906108c
SS
2963 fi
2964fi
2965fi
2966fi
bec39cab 2967CC=$ac_cv_prog_CC
c906108c 2968if test -n "$CC"; then
81ecdfbb
RW
2969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2970$as_echo "$CC" >&6; }
c906108c 2971else
81ecdfbb
RW
2972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2973$as_echo "no" >&6; }
c906108c
SS
2974fi
2975
81ecdfbb 2976
bec39cab
AC
2977fi
2978if test -z "$CC"; then
2979 if test -n "$ac_tool_prefix"; then
81ecdfbb 2980 for ac_prog in cl.exe
bec39cab
AC
2981 do
2982 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2983set dummy $ac_tool_prefix$ac_prog; ac_word=$2
81ecdfbb
RW
2984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2985$as_echo_n "checking for $ac_word... " >&6; }
2986if test "${ac_cv_prog_CC+set}" = set; then :
2987 $as_echo_n "(cached) " >&6
c906108c
SS
2988else
2989 if test -n "$CC"; then
2990 ac_cv_prog_CC="$CC" # Let the user override the test.
2991else
bec39cab
AC
2992as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2993for as_dir in $PATH
2994do
2995 IFS=$as_save_IFS
2996 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2997 for ac_exec_ext in '' $ac_executable_extensions; do
2998 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 2999 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
81ecdfbb 3000 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
3001 break 2
3002 fi
3003done
81ecdfbb
RW
3004 done
3005IFS=$as_save_IFS
bec39cab 3006
c906108c
SS
3007fi
3008fi
bec39cab 3009CC=$ac_cv_prog_CC
c906108c 3010if test -n "$CC"; then
81ecdfbb
RW
3011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3012$as_echo "$CC" >&6; }
c906108c 3013else
81ecdfbb
RW
3014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3015$as_echo "no" >&6; }
c906108c 3016fi
bec39cab 3017
81ecdfbb 3018
bec39cab
AC
3019 test -n "$CC" && break
3020 done
3021fi
3022if test -z "$CC"; then
3023 ac_ct_CC=$CC
81ecdfbb 3024 for ac_prog in cl.exe
bec39cab
AC
3025do
3026 # Extract the first word of "$ac_prog", so it can be a program name with args.
3027set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
3028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3029$as_echo_n "checking for $ac_word... " >&6; }
3030if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3031 $as_echo_n "(cached) " >&6
bec39cab
AC
3032else
3033 if test -n "$ac_ct_CC"; then
3034 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3035else
3036as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3037for as_dir in $PATH
3038do
3039 IFS=$as_save_IFS
3040 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
3041 for ac_exec_ext in '' $ac_executable_extensions; do
3042 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 3043 ac_cv_prog_ac_ct_CC="$ac_prog"
81ecdfbb 3044 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab 3045 break 2
c906108c 3046 fi
bec39cab 3047done
81ecdfbb
RW
3048 done
3049IFS=$as_save_IFS
bec39cab
AC
3050
3051fi
3052fi
3053ac_ct_CC=$ac_cv_prog_ac_ct_CC
3054if test -n "$ac_ct_CC"; then
81ecdfbb
RW
3055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3056$as_echo "$ac_ct_CC" >&6; }
bec39cab 3057else
81ecdfbb
RW
3058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3059$as_echo "no" >&6; }
c906108c
SS
3060fi
3061
81ecdfbb 3062
bec39cab
AC
3063 test -n "$ac_ct_CC" && break
3064done
c906108c 3065
81ecdfbb
RW
3066 if test "x$ac_ct_CC" = x; then
3067 CC=""
3068 else
3069 case $cross_compiling:$ac_tool_warned in
3070yes:)
3071{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3072$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3073ac_tool_warned=yes ;;
3074esac
3075 CC=$ac_ct_CC
3076 fi
bec39cab
AC
3077fi
3078
3079fi
3080
3081
81ecdfbb
RW
3082test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3083$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3084as_fn_error "no acceptable C compiler found in \$PATH
3085See \`config.log' for more details." "$LINENO" 5; }
bec39cab
AC
3086
3087# Provide some information about the compiler.
81ecdfbb
RW
3088$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3089set X $ac_compile
3090ac_compiler=$2
3091for ac_option in --version -v -V -qversion; do
3092 { { ac_try="$ac_compiler $ac_option >&5"
3093case "(($ac_try" in
3094 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3095 *) ac_try_echo=$ac_try;;
3096esac
3097eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3098$as_echo "$ac_try_echo"; } >&5
3099 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
bec39cab 3100 ac_status=$?
81ecdfbb
RW
3101 if test -s conftest.err; then
3102 sed '10a\
3103... rest of stderr output deleted ...
3104 10q' conftest.err >conftest.er1
3105 cat conftest.er1 >&5
3106 rm -f conftest.er1 conftest.err
3107 fi
3108 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3109 test $ac_status = 0; }
3110done
bec39cab 3111
81ecdfbb 3112cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3113/* end confdefs.h. */
3114
3115int
3116main ()
3117{
3118
3119 ;
3120 return 0;
3121}
3122_ACEOF
3123ac_clean_files_save=$ac_clean_files
81ecdfbb 3124ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out"
bec39cab
AC
3125# Try to create an executable without -o first, disregard a.out.
3126# It will help us diagnose broken compilers, and finding out an intuition
3127# of exeext.
81ecdfbb
RW
3128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3129$as_echo_n "checking for C compiler default output file name... " >&6; }
3130ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3131
3132# The possible output files:
3133ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3134
3135ac_rmfiles=
3136for ac_file in $ac_files
3137do
3138 case $ac_file in
3139 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3140 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3141 esac
3142done
3143rm -f $ac_rmfiles
3144
3145if { { ac_try="$ac_link_default"
3146case "(($ac_try" in
3147 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3148 *) ac_try_echo=$ac_try;;
3149esac
3150eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3151$as_echo "$ac_try_echo"; } >&5
3152 (eval "$ac_link_default") 2>&5
3153 ac_status=$?
3154 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3155 test $ac_status = 0; }; then :
3156 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3157# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3158# in a Makefile. We should not override ac_cv_exeext if it was cached,
3159# so that the user can short-circuit this test for compilers unknown to
3160# Autoconf.
3161for ac_file in $ac_files ''
bec39cab
AC
3162do
3163 test -f "$ac_file" || continue
3164 case $ac_file in
81ecdfbb 3165 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
b4e70030
JB
3166 ;;
3167 [ab].out )
3168 # We found the default executable, but exeext='' is most
3169 # certainly right.
3170 break;;
3171 *.* )
81ecdfbb
RW
3172 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3173 then :; else
3174 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3175 fi
3176 # We set ac_cv_exeext here because the later test for it is not
3177 # safe: cross compilers may not add the suffix if given an `-o'
3178 # argument, so we may need to know it at that point already.
3179 # Even if this section looks crufty: it has the advantage of
3180 # actually working.
b4e70030
JB
3181 break;;
3182 * )
3183 break;;
bec39cab
AC
3184 esac
3185done
81ecdfbb
RW
3186test "$ac_cv_exeext" = no && ac_cv_exeext=
3187
bec39cab 3188else
81ecdfbb
RW
3189 ac_file=''
3190fi
3191{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3192$as_echo "$ac_file" >&6; }
3193if test -z "$ac_file"; then :
3194 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3195sed 's/^/| /' conftest.$ac_ext >&5
3196
81ecdfbb
RW
3197{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3198$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3199{ as_fn_set_status 77
3200as_fn_error "C compiler cannot create executables
3201See \`config.log' for more details." "$LINENO" 5; }; }
bec39cab 3202fi
b4e70030 3203ac_exeext=$ac_cv_exeext
b4e70030 3204
81ecdfbb 3205# Check that the compiler produces executables we can run. If not, either
bec39cab 3206# the compiler is broken, or we cross compile.
81ecdfbb
RW
3207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3208$as_echo_n "checking whether the C compiler works... " >&6; }
bec39cab
AC
3209# If not cross compiling, check that we can run a simple program.
3210if test "$cross_compiling" != yes; then
3211 if { ac_try='./$ac_file'
81ecdfbb
RW
3212 { { case "(($ac_try" in
3213 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3214 *) ac_try_echo=$ac_try;;
3215esac
3216eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3217$as_echo "$ac_try_echo"; } >&5
3218 (eval "$ac_try") 2>&5
bec39cab 3219 ac_status=$?
81ecdfbb
RW
3220 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3221 test $ac_status = 0; }; }; then
bec39cab 3222 cross_compiling=no
c906108c 3223 else
bec39cab
AC
3224 if test "$cross_compiling" = maybe; then
3225 cross_compiling=yes
3226 else
81ecdfbb
RW
3227 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3228$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3229as_fn_error "cannot run C compiled programs.
bec39cab 3230If you meant to cross compile, use \`--host'.
81ecdfbb 3231See \`config.log' for more details." "$LINENO" 5; }
bec39cab 3232 fi
c906108c 3233 fi
bec39cab 3234fi
81ecdfbb
RW
3235{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3236$as_echo "yes" >&6; }
bec39cab 3237
81ecdfbb 3238rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out
b4e70030 3239ac_clean_files=$ac_clean_files_save
81ecdfbb 3240# Check that the compiler produces executables we can run. If not, either
b4e70030 3241# the compiler is broken, or we cross compile.
81ecdfbb
RW
3242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3243$as_echo_n "checking whether we are cross compiling... " >&6; }
3244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3245$as_echo "$cross_compiling" >&6; }
3246
3247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3248$as_echo_n "checking for suffix of executables... " >&6; }
3249if { { ac_try="$ac_link"
3250case "(($ac_try" in
3251 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3252 *) ac_try_echo=$ac_try;;
3253esac
3254eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3255$as_echo "$ac_try_echo"; } >&5
3256 (eval "$ac_link") 2>&5
bec39cab 3257 ac_status=$?
81ecdfbb
RW
3258 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3259 test $ac_status = 0; }; then :
b4e70030
JB
3260 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3261# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3262# work properly (i.e., refer to `conftest.exe'), while it won't with
3263# `rm'.
3264for ac_file in conftest.exe conftest conftest.*; do
3265 test -f "$ac_file" || continue
3266 case $ac_file in
81ecdfbb 3267 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
b4e70030 3268 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
b4e70030
JB
3269 break;;
3270 * ) break;;
3271 esac
3272done
c906108c 3273else
81ecdfbb
RW
3274 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3275$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3276as_fn_error "cannot compute suffix of executables: cannot compile and link
3277See \`config.log' for more details." "$LINENO" 5; }
c906108c 3278fi
b4e70030 3279rm -f conftest$ac_cv_exeext
81ecdfbb
RW
3280{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3281$as_echo "$ac_cv_exeext" >&6; }
c906108c 3282
b4e70030 3283rm -f conftest.$ac_ext
bec39cab
AC
3284EXEEXT=$ac_cv_exeext
3285ac_exeext=$EXEEXT
81ecdfbb
RW
3286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3287$as_echo_n "checking for suffix of object files... " >&6; }
3288if test "${ac_cv_objext+set}" = set; then :
3289 $as_echo_n "(cached) " >&6
bec39cab 3290else
81ecdfbb 3291 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
3292/* end confdefs.h. */
3293
3294int
3295main ()
3296{
3297
3298 ;
3299 return 0;
3300}
3301_ACEOF
3302rm -f conftest.o conftest.obj
81ecdfbb
RW
3303if { { ac_try="$ac_compile"
3304case "(($ac_try" in
3305 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3306 *) ac_try_echo=$ac_try;;
3307esac
3308eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3309$as_echo "$ac_try_echo"; } >&5
3310 (eval "$ac_compile") 2>&5
3311 ac_status=$?
3312 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3313 test $ac_status = 0; }; then :
3314 for ac_file in conftest.o conftest.obj conftest.*; do
3315 test -f "$ac_file" || continue;
bec39cab 3316 case $ac_file in
81ecdfbb 3317 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
bec39cab
AC
3318 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3319 break;;
3320 esac
3321done
c906108c 3322else
81ecdfbb 3323 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3324sed 's/^/| /' conftest.$ac_ext >&5
3325
81ecdfbb
RW
3326{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3327$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3328as_fn_error "cannot compute suffix of object files: cannot compile
3329See \`config.log' for more details." "$LINENO" 5; }
c906108c 3330fi
b4e70030 3331rm -f conftest.$ac_cv_objext conftest.$ac_ext
bec39cab 3332fi
81ecdfbb
RW
3333{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3334$as_echo "$ac_cv_objext" >&6; }
bec39cab
AC
3335OBJEXT=$ac_cv_objext
3336ac_objext=$OBJEXT
81ecdfbb
RW
3337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3338$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3339if test "${ac_cv_c_compiler_gnu+set}" = set; then :
3340 $as_echo_n "(cached) " >&6
c906108c 3341else
81ecdfbb 3342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3343/* end confdefs.h. */
3344
3345int
3346main ()
3347{
3348#ifndef __GNUC__
3349 choke me
3350#endif
3351
3352 ;
3353 return 0;
3354}
3355_ACEOF
81ecdfbb 3356if ac_fn_c_try_compile "$LINENO"; then :
bec39cab
AC
3357 ac_compiler_gnu=yes
3358else
81ecdfbb 3359 ac_compiler_gnu=no
bec39cab 3360fi
81ecdfbb 3361rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab
AC
3362ac_cv_c_compiler_gnu=$ac_compiler_gnu
3363
3364fi
81ecdfbb
RW
3365{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3366$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3367if test $ac_compiler_gnu = yes; then
3368 GCC=yes
3369else
3370 GCC=
3371fi
bec39cab
AC
3372ac_test_CFLAGS=${CFLAGS+set}
3373ac_save_CFLAGS=$CFLAGS
81ecdfbb
RW
3374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3375$as_echo_n "checking whether $CC accepts -g... " >&6; }
3376if test "${ac_cv_prog_cc_g+set}" = set; then :
3377 $as_echo_n "(cached) " >&6
bec39cab 3378else
81ecdfbb
RW
3379 ac_save_c_werror_flag=$ac_c_werror_flag
3380 ac_c_werror_flag=yes
3381 ac_cv_prog_cc_g=no
3382 CFLAGS="-g"
3383 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3384/* end confdefs.h. */
3385
3386int
3387main ()
3388{
3389
3390 ;
3391 return 0;
3392}
3393_ACEOF
81ecdfbb 3394if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
3395 ac_cv_prog_cc_g=yes
3396else
81ecdfbb
RW
3397 CFLAGS=""
3398 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3399/* end confdefs.h. */
3400
3401int
3402main ()
3403{
3404
3405 ;
3406 return 0;
3407}
3408_ACEOF
3409if ac_fn_c_try_compile "$LINENO"; then :
3410
3411else
3412 ac_c_werror_flag=$ac_save_c_werror_flag
3413 CFLAGS="-g"
3414 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3415/* end confdefs.h. */
3416
3417int
3418main ()
3419{
c906108c 3420
81ecdfbb
RW
3421 ;
3422 return 0;
3423}
3424_ACEOF
3425if ac_fn_c_try_compile "$LINENO"; then :
3426 ac_cv_prog_cc_g=yes
3427fi
3428rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3429fi
3430rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4e8d927d 3431fi
81ecdfbb
RW
3432rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3433 ac_c_werror_flag=$ac_save_c_werror_flag
bec39cab 3434fi
81ecdfbb
RW
3435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3436$as_echo "$ac_cv_prog_cc_g" >&6; }
c906108c 3437if test "$ac_test_CFLAGS" = set; then
bec39cab 3438 CFLAGS=$ac_save_CFLAGS
c906108c
SS
3439elif test $ac_cv_prog_cc_g = yes; then
3440 if test "$GCC" = yes; then
3441 CFLAGS="-g -O2"
3442 else
3443 CFLAGS="-g"
3444 fi
3445else
3446 if test "$GCC" = yes; then
3447 CFLAGS="-O2"
3448 else
3449 CFLAGS=
3450 fi
3451fi
81ecdfbb
RW
3452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3453$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3454if test "${ac_cv_prog_cc_c89+set}" = set; then :
3455 $as_echo_n "(cached) " >&6
bec39cab 3456else
81ecdfbb 3457 ac_cv_prog_cc_c89=no
bec39cab 3458ac_save_CC=$CC
81ecdfbb 3459cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3460/* end confdefs.h. */
c906108c
SS
3461#include <stdarg.h>
3462#include <stdio.h>
3463#include <sys/types.h>
3464#include <sys/stat.h>
3465/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3466struct buf { int x; };
3467FILE * (*rcsopen) (struct buf *, struct stat *, int);
3468static char *e (p, i)
3469 char **p;
3470 int i;
3471{
3472 return p[i];
3473}
3474static char *f (char * (*g) (char **, int), char **p, ...)
3475{
3476 char *s;
3477 va_list v;
3478 va_start (v,p);
3479 s = g (p, va_arg (v,int));
3480 va_end (v);
3481 return s;
3482}
bec39cab
AC
3483
3484/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3485 function prototypes and stuff, but not '\xHH' hex character constants.
3486 These don't provoke an error unfortunately, instead are silently treated
81ecdfbb 3487 as 'x'. The following induces an error, until -std is added to get
bec39cab
AC
3488 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3489 array size at least. It's necessary to write '\x00'==0 to get something
81ecdfbb 3490 that's true only with -std. */
bec39cab
AC
3491int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3492
81ecdfbb
RW
3493/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3494 inside strings and character constants. */
3495#define FOO(x) 'x'
3496int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3497
c906108c
SS
3498int test (int i, double x);
3499struct s1 {int (*f) (int a);};
3500struct s2 {int (*f) (double a);};
3501int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3502int argc;
3503char **argv;
bec39cab
AC
3504int
3505main ()
3506{
c906108c 3507return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
bec39cab
AC
3508 ;
3509 return 0;
3510}
3511_ACEOF
81ecdfbb
RW
3512for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3513 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
bec39cab
AC
3514do
3515 CC="$ac_save_CC $ac_arg"
81ecdfbb
RW
3516 if ac_fn_c_try_compile "$LINENO"; then :
3517 ac_cv_prog_cc_c89=$ac_arg
c906108c 3518fi
81ecdfbb
RW
3519rm -f core conftest.err conftest.$ac_objext
3520 test "x$ac_cv_prog_cc_c89" != "xno" && break
c906108c 3521done
81ecdfbb 3522rm -f conftest.$ac_ext
bec39cab 3523CC=$ac_save_CC
c906108c
SS
3524
3525fi
81ecdfbb
RW
3526# AC_CACHE_VAL
3527case "x$ac_cv_prog_cc_c89" in
3528 x)
3529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3530$as_echo "none needed" >&6; } ;;
3531 xno)
3532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3533$as_echo "unsupported" >&6; } ;;
bec39cab 3534 *)
81ecdfbb
RW
3535 CC="$CC $ac_cv_prog_cc_c89"
3536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3537$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
c906108c 3538esac
81ecdfbb 3539if test "x$ac_cv_prog_cc_c89" != xno; then :
c906108c 3540
b4e70030
JB
3541fi
3542
bec39cab
AC
3543ac_ext=c
3544ac_cpp='$CPP $CPPFLAGS'
3545ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3546ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3547ac_compiler_gnu=$ac_cv_c_compiler_gnu
c906108c 3548
3bc3d82a
PA
3549ac_ext=cpp
3550ac_cpp='$CXXCPP $CPPFLAGS'
3551ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3552ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3553ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3554if test -z "$CXX"; then
3555 if test -n "$CCC"; then
3556 CXX=$CCC
3557 else
3558 if test -n "$ac_tool_prefix"; then
3559 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3560 do
3561 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3562set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3564$as_echo_n "checking for $ac_word... " >&6; }
3565if test "${ac_cv_prog_CXX+set}" = set; then :
3566 $as_echo_n "(cached) " >&6
3567else
3568 if test -n "$CXX"; then
3569 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3570else
3571as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3572for as_dir in $PATH
3573do
3574 IFS=$as_save_IFS
3575 test -z "$as_dir" && as_dir=.
3576 for ac_exec_ext in '' $ac_executable_extensions; do
3577 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3578 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3579 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3580 break 2
3581 fi
3582done
3583 done
3584IFS=$as_save_IFS
3585
3586fi
3587fi
3588CXX=$ac_cv_prog_CXX
3589if test -n "$CXX"; then
3590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
3591$as_echo "$CXX" >&6; }
3592else
3593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3594$as_echo "no" >&6; }
3595fi
3596
3597
3598 test -n "$CXX" && break
3599 done
3600fi
3601if test -z "$CXX"; then
3602 ac_ct_CXX=$CXX
3603 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3604do
3605 # Extract the first word of "$ac_prog", so it can be a program name with args.
3606set dummy $ac_prog; ac_word=$2
3607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3608$as_echo_n "checking for $ac_word... " >&6; }
3609if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
3610 $as_echo_n "(cached) " >&6
3611else
3612 if test -n "$ac_ct_CXX"; then
3613 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3614else
3615as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3616for as_dir in $PATH
3617do
3618 IFS=$as_save_IFS
3619 test -z "$as_dir" && as_dir=.
3620 for ac_exec_ext in '' $ac_executable_extensions; do
3621 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3622 ac_cv_prog_ac_ct_CXX="$ac_prog"
3623 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3624 break 2
3625 fi
3626done
3627 done
3628IFS=$as_save_IFS
3629
3630fi
3631fi
3632ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3633if test -n "$ac_ct_CXX"; then
3634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
3635$as_echo "$ac_ct_CXX" >&6; }
3636else
3637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3638$as_echo "no" >&6; }
3639fi
3640
3641
3642 test -n "$ac_ct_CXX" && break
3643done
3644
3645 if test "x$ac_ct_CXX" = x; then
3646 CXX="g++"
3647 else
3648 case $cross_compiling:$ac_tool_warned in
3649yes:)
3650{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3651$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3652ac_tool_warned=yes ;;
3653esac
3654 CXX=$ac_ct_CXX
3655 fi
3656fi
3657
3658 fi
3659fi
3660# Provide some information about the compiler.
3661$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
3662set X $ac_compile
3663ac_compiler=$2
3664for ac_option in --version -v -V -qversion; do
3665 { { ac_try="$ac_compiler $ac_option >&5"
3666case "(($ac_try" in
3667 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3668 *) ac_try_echo=$ac_try;;
3669esac
3670eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3671$as_echo "$ac_try_echo"; } >&5
3672 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3673 ac_status=$?
3674 if test -s conftest.err; then
3675 sed '10a\
3676... rest of stderr output deleted ...
3677 10q' conftest.err >conftest.er1
3678 cat conftest.er1 >&5
3679 rm -f conftest.er1 conftest.err
3680 fi
3681 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3682 test $ac_status = 0; }
3683done
3684
3685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
3686$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
3687if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
3688 $as_echo_n "(cached) " >&6
3689else
3690 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3691/* end confdefs.h. */
3692
3693int
3694main ()
3695{
3696#ifndef __GNUC__
3697 choke me
3698#endif
3699
3700 ;
3701 return 0;
3702}
3703_ACEOF
3704if ac_fn_cxx_try_compile "$LINENO"; then :
3705 ac_compiler_gnu=yes
3706else
3707 ac_compiler_gnu=no
3708fi
3709rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3710ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3711
3712fi
3713{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
3714$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
3715if test $ac_compiler_gnu = yes; then
3716 GXX=yes
3717else
3718 GXX=
3719fi
3720ac_test_CXXFLAGS=${CXXFLAGS+set}
3721ac_save_CXXFLAGS=$CXXFLAGS
3722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
3723$as_echo_n "checking whether $CXX accepts -g... " >&6; }
3724if test "${ac_cv_prog_cxx_g+set}" = set; then :
3725 $as_echo_n "(cached) " >&6
3726else
3727 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
3728 ac_cxx_werror_flag=yes
3729 ac_cv_prog_cxx_g=no
3730 CXXFLAGS="-g"
3731 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3732/* end confdefs.h. */
3733
3734int
3735main ()
3736{
3737
3738 ;
3739 return 0;
3740}
3741_ACEOF
3742if ac_fn_cxx_try_compile "$LINENO"; then :
3743 ac_cv_prog_cxx_g=yes
3744else
3745 CXXFLAGS=""
3746 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3747/* end confdefs.h. */
3748
3749int
3750main ()
3751{
3752
3753 ;
3754 return 0;
3755}
3756_ACEOF
3757if ac_fn_cxx_try_compile "$LINENO"; then :
3758
3759else
3760 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3761 CXXFLAGS="-g"
3762 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3763/* end confdefs.h. */
3764
3765int
3766main ()
3767{
3768
3769 ;
3770 return 0;
3771}
3772_ACEOF
3773if ac_fn_cxx_try_compile "$LINENO"; then :
3774 ac_cv_prog_cxx_g=yes
3775fi
3776rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3777fi
3778rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3779fi
3780rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3781 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3782fi
3783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
3784$as_echo "$ac_cv_prog_cxx_g" >&6; }
3785if test "$ac_test_CXXFLAGS" = set; then
3786 CXXFLAGS=$ac_save_CXXFLAGS
3787elif test $ac_cv_prog_cxx_g = yes; then
3788 if test "$GXX" = yes; then
3789 CXXFLAGS="-g -O2"
3790 else
3791 CXXFLAGS="-g"
3792 fi
3793else
3794 if test "$GXX" = yes; then
3795 CXXFLAGS="-O2"
3796 else
3797 CXXFLAGS=
3798 fi
3799fi
3800ac_ext=c
3801ac_cpp='$CPP $CPPFLAGS'
3802ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3803ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3804ac_compiler_gnu=$ac_cv_c_compiler_gnu
3805
3806
60ca704f 3807
bec39cab
AC
3808ac_ext=c
3809ac_cpp='$CPP $CPPFLAGS'
3810ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3811ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3812ac_compiler_gnu=$ac_cv_c_compiler_gnu
81ecdfbb
RW
3813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3814$as_echo_n "checking how to run the C preprocessor... " >&6; }
bec39cab
AC
3815# On Suns, sometimes $CPP names a directory.
3816if test -n "$CPP" && test -d "$CPP"; then
3817 CPP=
8bb2c122 3818fi
bec39cab 3819if test -z "$CPP"; then
81ecdfbb
RW
3820 if test "${ac_cv_prog_CPP+set}" = set; then :
3821 $as_echo_n "(cached) " >&6
bec39cab
AC
3822else
3823 # Double quotes because CPP needs to be expanded
3824 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3825 do
3826 ac_preproc_ok=false
3827for ac_c_preproc_warn_flag in '' yes
3828do
3829 # Use a header file that comes with gcc, so configuring glibc
3830 # with a fresh cross-compiler works.
3831 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3832 # <limits.h> exists even on freestanding compilers.
3833 # On the NeXT, cc -E runs the code through the compiler's parser,
3834 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3835 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3836/* end confdefs.h. */
3837#ifdef __STDC__
3838# include <limits.h>
3839#else
3840# include <assert.h>
3841#endif
3842 Syntax error
3843_ACEOF
81ecdfbb 3844if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3845
81ecdfbb 3846else
bec39cab
AC
3847 # Broken: fails on valid input.
3848continue
3849fi
3850rm -f conftest.err conftest.$ac_ext
3851
81ecdfbb 3852 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3853 # can be detected and how.
81ecdfbb 3854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3855/* end confdefs.h. */
3856#include <ac_nonexistent.h>
3857_ACEOF
81ecdfbb 3858if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3859 # Broken: success on invalid input.
3860continue
8bb2c122 3861else
bec39cab
AC
3862 # Passes both tests.
3863ac_preproc_ok=:
3864break
8bb2c122 3865fi
bec39cab 3866rm -f conftest.err conftest.$ac_ext
8bb2c122 3867
bec39cab
AC
3868done
3869# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3870rm -f conftest.err conftest.$ac_ext
81ecdfbb 3871if $ac_preproc_ok; then :
bec39cab
AC
3872 break
3873fi
8bb2c122 3874
bec39cab
AC
3875 done
3876 ac_cv_prog_CPP=$CPP
ddc9cd0f 3877
c906108c 3878fi
bec39cab
AC
3879 CPP=$ac_cv_prog_CPP
3880else
3881 ac_cv_prog_CPP=$CPP
c906108c 3882fi
81ecdfbb
RW
3883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3884$as_echo "$CPP" >&6; }
bec39cab
AC
3885ac_preproc_ok=false
3886for ac_c_preproc_warn_flag in '' yes
3887do
3888 # Use a header file that comes with gcc, so configuring glibc
3889 # with a fresh cross-compiler works.
3890 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3891 # <limits.h> exists even on freestanding compilers.
3892 # On the NeXT, cc -E runs the code through the compiler's parser,
3893 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3894 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3895/* end confdefs.h. */
3896#ifdef __STDC__
3897# include <limits.h>
3898#else
3899# include <assert.h>
3900#endif
3901 Syntax error
3902_ACEOF
81ecdfbb 3903if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3904
81ecdfbb 3905else
bec39cab
AC
3906 # Broken: fails on valid input.
3907continue
3908fi
3909rm -f conftest.err conftest.$ac_ext
3910
81ecdfbb 3911 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3912 # can be detected and how.
81ecdfbb 3913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3914/* end confdefs.h. */
3915#include <ac_nonexistent.h>
3916_ACEOF
81ecdfbb 3917if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3918 # Broken: success on invalid input.
3919continue
c906108c 3920else
bec39cab
AC
3921 # Passes both tests.
3922ac_preproc_ok=:
3923break
c906108c 3924fi
bec39cab 3925rm -f conftest.err conftest.$ac_ext
c906108c 3926
bec39cab
AC
3927done
3928# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3929rm -f conftest.err conftest.$ac_ext
81ecdfbb
RW
3930if $ac_preproc_ok; then :
3931
c906108c 3932else
81ecdfbb
RW
3933 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3934$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3935as_fn_error "C preprocessor \"$CPP\" fails sanity check
3936See \`config.log' for more details." "$LINENO" 5; }
c906108c 3937fi
c906108c 3938
bec39cab
AC
3939ac_ext=c
3940ac_cpp='$CPP $CPPFLAGS'
3941ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3942ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3943ac_compiler_gnu=$ac_cv_c_compiler_gnu
3944
3945
81ecdfbb
RW
3946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3947$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3948if test "${ac_cv_path_GREP+set}" = set; then :
3949 $as_echo_n "(cached) " >&6
4e8d927d 3950else
81ecdfbb
RW
3951 if test -z "$GREP"; then
3952 ac_path_GREP_found=false
3953 # Loop through the user's path and test for each of PROGNAME-LIST
3954 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3955for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3956do
3957 IFS=$as_save_IFS
3958 test -z "$as_dir" && as_dir=.
3959 for ac_prog in grep ggrep; do
3960 for ac_exec_ext in '' $ac_executable_extensions; do
3961 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3962 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3963# Check for GNU ac_path_GREP and select it if it is found.
3964 # Check for GNU $ac_path_GREP
3965case `"$ac_path_GREP" --version 2>&1` in
3966*GNU*)
3967 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3968*)
3969 ac_count=0
3970 $as_echo_n 0123456789 >"conftest.in"
3971 while :
3972 do
3973 cat "conftest.in" "conftest.in" >"conftest.tmp"
3974 mv "conftest.tmp" "conftest.in"
3975 cp "conftest.in" "conftest.nl"
3976 $as_echo 'GREP' >> "conftest.nl"
3977 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3978 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3979 as_fn_arith $ac_count + 1 && ac_count=$as_val
3980 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3981 # Best one so far, save it but keep looking for a better one
3982 ac_cv_path_GREP="$ac_path_GREP"
3983 ac_path_GREP_max=$ac_count
bec39cab 3984 fi
81ecdfbb
RW
3985 # 10*(2^10) chars as input seems more than enough
3986 test $ac_count -gt 10 && break
3987 done
3988 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3989esac
bec39cab 3990
81ecdfbb
RW
3991 $ac_path_GREP_found && break 3
3992 done
3993 done
3994 done
3995IFS=$as_save_IFS
3996 if test -z "$ac_cv_path_GREP"; then
3997 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3998 fi
c906108c 3999else
81ecdfbb 4000 ac_cv_path_GREP=$GREP
c906108c 4001fi
c906108c 4002
81ecdfbb
RW
4003fi
4004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4005$as_echo "$ac_cv_path_GREP" >&6; }
4006 GREP="$ac_cv_path_GREP"
c906108c 4007
c906108c 4008
81ecdfbb
RW
4009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4010$as_echo_n "checking for egrep... " >&6; }
4011if test "${ac_cv_path_EGREP+set}" = set; then :
4012 $as_echo_n "(cached) " >&6
783e057b 4013else
81ecdfbb
RW
4014 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4015 then ac_cv_path_EGREP="$GREP -E"
4016 else
4017 if test -z "$EGREP"; then
4018 ac_path_EGREP_found=false
4019 # Loop through the user's path and test for each of PROGNAME-LIST
4020 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4021for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
783e057b
DJ
4022do
4023 IFS=$as_save_IFS
4024 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
4025 for ac_prog in egrep; do
4026 for ac_exec_ext in '' $ac_executable_extensions; do
4027 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4028 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4029# Check for GNU ac_path_EGREP and select it if it is found.
4030 # Check for GNU $ac_path_EGREP
4031case `"$ac_path_EGREP" --version 2>&1` in
4032*GNU*)
4033 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4034*)
4035 ac_count=0
4036 $as_echo_n 0123456789 >"conftest.in"
4037 while :
4038 do
4039 cat "conftest.in" "conftest.in" >"conftest.tmp"
4040 mv "conftest.tmp" "conftest.in"
4041 cp "conftest.in" "conftest.nl"
4042 $as_echo 'EGREP' >> "conftest.nl"
4043 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4044 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4045 as_fn_arith $ac_count + 1 && ac_count=$as_val
4046 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4047 # Best one so far, save it but keep looking for a better one
4048 ac_cv_path_EGREP="$ac_path_EGREP"
4049 ac_path_EGREP_max=$ac_count
4050 fi
4051 # 10*(2^10) chars as input seems more than enough
4052 test $ac_count -gt 10 && break
4053 done
4054 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4055esac
bec39cab 4056
81ecdfbb
RW
4057 $ac_path_EGREP_found && break 3
4058 done
4059 done
4060 done
4061IFS=$as_save_IFS
4062 if test -z "$ac_cv_path_EGREP"; then
4063 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
783e057b 4064 fi
783e057b 4065else
81ecdfbb 4066 ac_cv_path_EGREP=$EGREP
783e057b
DJ
4067fi
4068
81ecdfbb 4069 fi
783e057b 4070fi
81ecdfbb
RW
4071{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4072$as_echo "$ac_cv_path_EGREP" >&6; }
4073 EGREP="$ac_cv_path_EGREP"
4074
783e057b 4075
81ecdfbb
RW
4076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4077$as_echo_n "checking for ANSI C header files... " >&6; }
4078if test "${ac_cv_header_stdc+set}" = set; then :
4079 $as_echo_n "(cached) " >&6
783e057b 4080else
81ecdfbb 4081 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 4082/* end confdefs.h. */
783e057b 4083#include <stdlib.h>
bec39cab 4084#include <stdarg.h>
783e057b
DJ
4085#include <string.h>
4086#include <float.h>
c906108c 4087
bec39cab
AC
4088int
4089main ()
4090{
c906108c 4091
bec39cab
AC
4092 ;
4093 return 0;
4094}
4095_ACEOF
81ecdfbb 4096if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4097 ac_cv_header_stdc=yes
c906108c 4098else
81ecdfbb 4099 ac_cv_header_stdc=no
c906108c 4100fi
81ecdfbb 4101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 4102
783e057b
DJ
4103if test $ac_cv_header_stdc = yes; then
4104 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
81ecdfbb 4105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4106/* end confdefs.h. */
4107#include <string.h>
c906108c 4108
783e057b
DJ
4109_ACEOF
4110if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4111 $EGREP "memchr" >/dev/null 2>&1; then :
4112
c906108c 4113else
783e057b 4114 ac_cv_header_stdc=no
c906108c 4115fi
783e057b 4116rm -f conftest*
c906108c
SS
4117
4118fi
4119
783e057b
DJ
4120if test $ac_cv_header_stdc = yes; then
4121 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
81ecdfbb 4122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4123/* end confdefs.h. */
4124#include <stdlib.h>
bec39cab 4125
783e057b
DJ
4126_ACEOF
4127if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4128 $EGREP "free" >/dev/null 2>&1; then :
4129
bec39cab 4130else
783e057b 4131 ac_cv_header_stdc=no
bec39cab 4132fi
783e057b 4133rm -f conftest*
bec39cab
AC
4134
4135fi
bec39cab 4136
783e057b
DJ
4137if test $ac_cv_header_stdc = yes; then
4138 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
81ecdfbb 4139 if test "$cross_compiling" = yes; then :
783e057b 4140 :
bec39cab 4141else
81ecdfbb 4142 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4143/* end confdefs.h. */
4144#include <ctype.h>
81ecdfbb 4145#include <stdlib.h>
783e057b
DJ
4146#if ((' ' & 0x0FF) == 0x020)
4147# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4148# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4149#else
4150# define ISLOWER(c) \
4151 (('a' <= (c) && (c) <= 'i') \
4152 || ('j' <= (c) && (c) <= 'r') \
4153 || ('s' <= (c) && (c) <= 'z'))
4154# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4155#endif
4156
4157#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4158int
4159main ()
4160{
4161 int i;
4162 for (i = 0; i < 256; i++)
4163 if (XOR (islower (i), ISLOWER (i))
4164 || toupper (i) != TOUPPER (i))
81ecdfbb
RW
4165 return 2;
4166 return 0;
783e057b
DJ
4167}
4168_ACEOF
81ecdfbb 4169if ac_fn_c_try_run "$LINENO"; then :
783e057b 4170
81ecdfbb
RW
4171else
4172 ac_cv_header_stdc=no
783e057b 4173fi
81ecdfbb
RW
4174rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4175 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 4176fi
81ecdfbb 4177
783e057b
DJ
4178fi
4179fi
81ecdfbb
RW
4180{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4181$as_echo "$ac_cv_header_stdc" >&6; }
783e057b
DJ
4182if test $ac_cv_header_stdc = yes; then
4183
81ecdfbb 4184$as_echo "#define STDC_HEADERS 1" >>confdefs.h
783e057b
DJ
4185
4186fi
4187
4188# On IRIX 5.3, sys/types and inttypes.h are conflicting.
783e057b
DJ
4189for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4190 inttypes.h stdint.h unistd.h
81ecdfbb
RW
4191do :
4192 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4193ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4194"
4195eval as_val=\$$as_ac_Header
4196 if test "x$as_val" = x""yes; then :
783e057b 4197 cat >>confdefs.h <<_ACEOF
81ecdfbb 4198#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
783e057b
DJ
4199_ACEOF
4200
4201fi
4202
4203done
4204
4205
4206
81ecdfbb
RW
4207 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4208if test "x$ac_cv_header_minix_config_h" = x""yes; then :
783e057b
DJ
4209 MINIX=yes
4210else
4211 MINIX=
4212fi
4213
4214
4215 if test "$MINIX" = yes; then
4216
81ecdfbb 4217$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
783e057b
DJ
4218
4219
81ecdfbb 4220$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
783e057b
DJ
4221
4222
81ecdfbb 4223$as_echo "#define _MINIX 1" >>confdefs.h
783e057b
DJ
4224
4225 fi
4226
4227
81ecdfbb
RW
4228 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4229$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4230if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
4231 $as_echo_n "(cached) " >&6
783e057b 4232else
81ecdfbb 4233 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4234/* end confdefs.h. */
4235
c971b7fa
PA
4236# define __EXTENSIONS__ 1
4237 $ac_includes_default
783e057b
DJ
4238int
4239main ()
4240{
4241
4242 ;
4243 return 0;
4244}
4245_ACEOF
81ecdfbb 4246if ac_fn_c_try_compile "$LINENO"; then :
783e057b
DJ
4247 ac_cv_safe_to_define___extensions__=yes
4248else
81ecdfbb 4249 ac_cv_safe_to_define___extensions__=no
783e057b 4250fi
81ecdfbb 4251rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b 4252fi
81ecdfbb
RW
4253{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4254$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
783e057b 4255 test $ac_cv_safe_to_define___extensions__ = yes &&
81ecdfbb 4256 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
783e057b 4257
81ecdfbb 4258 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
783e057b 4259
81ecdfbb 4260 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
783e057b 4261
81ecdfbb 4262 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
783e057b 4263
81ecdfbb 4264 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
783e057b
DJ
4265
4266
c971b7fa
PA
4267ac_aux_dir=
4268for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4269 for ac_t in install-sh install.sh shtool; do
4270 if test -f "$ac_dir/$ac_t"; then
4271 ac_aux_dir=$ac_dir
4272 ac_install_sh="$ac_aux_dir/$ac_t -c"
4273 break 2
4274 fi
4275 done
4276done
4277if test -z "$ac_aux_dir"; then
4278 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
4279fi
770d76d7 4280
c971b7fa
PA
4281# These three variables are undocumented and unsupported,
4282# and are intended to be withdrawn in a future Autoconf release.
4283# They can cause serious problems if a builder's source tree is in a directory
4284# whose full name contains unusual characters.
4285ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4286ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4287ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
770d76d7 4288
770d76d7 4289
c971b7fa
PA
4290# Make sure we can run config.sub.
4291$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
4292 as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
770d76d7 4293
c971b7fa
PA
4294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4295$as_echo_n "checking build system type... " >&6; }
4296if test "${ac_cv_build+set}" = set; then :
4297 $as_echo_n "(cached) " >&6
770d76d7 4298else
c971b7fa
PA
4299 ac_build_alias=$build_alias
4300test "x$ac_build_alias" = x &&
4301 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4302test "x$ac_build_alias" = x &&
4303 as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
4304ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
4305 as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
4306
770d76d7 4307fi
c971b7fa
PA
4308{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4309$as_echo "$ac_cv_build" >&6; }
4310case $ac_cv_build in
4311*-*-*) ;;
4312*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
770d76d7 4313esac
c971b7fa
PA
4314build=$ac_cv_build
4315ac_save_IFS=$IFS; IFS='-'
4316set x $ac_cv_build
4317shift
4318build_cpu=$1
4319build_vendor=$2
4320shift; shift
4321# Remember, the first character of IFS is used to create $*,
4322# except with old shells:
4323build_os=$*
4324IFS=$ac_save_IFS
4325case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
770d76d7
PA
4326
4327
c971b7fa
PA
4328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4329$as_echo_n "checking host system type... " >&6; }
4330if test "${ac_cv_host+set}" = set; then :
81ecdfbb
RW
4331 $as_echo_n "(cached) " >&6
4332else
c971b7fa
PA
4333 if test "x$host_alias" = x; then
4334 ac_cv_host=$ac_cv_build
81ecdfbb 4335else
c971b7fa
PA
4336 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
4337 as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
81ecdfbb 4338fi
81ecdfbb
RW
4339
4340fi
c971b7fa
PA
4341{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4342$as_echo "$ac_cv_host" >&6; }
4343case $ac_cv_host in
4344*-*-*) ;;
4345*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
81ecdfbb 4346esac
c971b7fa
PA
4347host=$ac_cv_host
4348ac_save_IFS=$IFS; IFS='-'
4349set x $ac_cv_host
4350shift
4351host_cpu=$1
4352host_vendor=$2
4353shift; shift
4354# Remember, the first character of IFS is used to create $*,
4355# except with old shells:
4356host_os=$*
4357IFS=$ac_save_IFS
4358case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3388710e
JM
4359
4360
4361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4362$as_echo_n "checking target system type... " >&6; }
4363if test "${ac_cv_target+set}" = set; then :
4364 $as_echo_n "(cached) " >&6
4365else
4366 if test "x$target_alias" = x; then
4367 ac_cv_target=$ac_cv_host
4368else
4369 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
4370 as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
4371fi
4372
4373fi
4374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4375$as_echo "$ac_cv_target" >&6; }
4376case $ac_cv_target in
4377*-*-*) ;;
4378*) as_fn_error "invalid value of canonical target" "$LINENO" 5;;
4379esac
4380target=$ac_cv_target
4381ac_save_IFS=$IFS; IFS='-'
4382set x $ac_cv_target
4383shift
4384target_cpu=$1
4385target_vendor=$2
4386shift; shift
4387# Remember, the first character of IFS is used to create $*,
4388# except with old shells:
4389target_os=$*
4390IFS=$ac_save_IFS
4391case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4392
4393
4394# The aliases save the names the user supplied, while $host etc.
4395# will get canonicalized.
4396test -n "$target_alias" &&
4397 test "$program_prefix$program_suffix$program_transform_name" = \
4398 NONENONEs,x,x, &&
4399 program_prefix=${target_alias}-
4400
4401# The tests for host and target for $enable_largefile require
4402# canonical names.
4403
4404
81ecdfbb 4405
da2f07f1
JK
4406# As the $enable_largefile decision depends on --enable-plugins we must set it
4407# even in directories otherwise not depending on the $plugins option.
4408
4409
2974be62
AM
4410 maybe_plugins=no
4411 for ac_header in dlfcn.h
4412do :
4413 ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
4414"
4415if test "x$ac_cv_header_dlfcn_h" = x""yes; then :
4416 cat >>confdefs.h <<_ACEOF
4417#define HAVE_DLFCN_H 1
4418_ACEOF
4419 maybe_plugins=yes
4420fi
4421
4422done
4423
4424 for ac_header in windows.h
4425do :
4426 ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
4427"
4428if test "x$ac_cv_header_windows_h" = x""yes; then :
4429 cat >>confdefs.h <<_ACEOF
4430#define HAVE_WINDOWS_H 1
4431_ACEOF
4432 maybe_plugins=yes
4433fi
4434
4435done
4436
4437
4438 # Check whether --enable-plugins was given.
da2f07f1
JK
4439if test "${enable_plugins+set}" = set; then :
4440 enableval=$enable_plugins; case "${enableval}" in
2974be62
AM
4441 no) plugins=no ;;
4442 *) plugins=yes
4443 if test "$maybe_plugins" != "yes" ; then
4444 as_fn_error "Building with plugin support requires a host that supports dlopen." "$LINENO" 5
4445 fi ;;
4446 esac
da2f07f1 4447else
2974be62
AM
4448 plugins=$maybe_plugins
4449
da2f07f1
JK
4450fi
4451
2974be62
AM
4452 if test "$plugins" = "yes"; then
4453 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
4454$as_echo_n "checking for library containing dlopen... " >&6; }
4455if test "${ac_cv_search_dlopen+set}" = set; then :
4456 $as_echo_n "(cached) " >&6
4457else
4458 ac_func_search_save_LIBS=$LIBS
4459cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4460/* end confdefs.h. */
4461
4462/* Override any GCC internal prototype to avoid an error.
4463 Use char because int might match the return type of a GCC
4464 builtin and then its argument prototype would still apply. */
4465#ifdef __cplusplus
4466extern "C"
4467#endif
4468char dlopen ();
4469int
4470main ()
4471{
4472return dlopen ();
4473 ;
4474 return 0;
4475}
4476_ACEOF
4477for ac_lib in '' dl; do
4478 if test -z "$ac_lib"; then
4479 ac_res="none required"
4480 else
4481 ac_res=-l$ac_lib
4482 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4483 fi
4484 if ac_fn_c_try_link "$LINENO"; then :
4485 ac_cv_search_dlopen=$ac_res
4486fi
4487rm -f core conftest.err conftest.$ac_objext \
4488 conftest$ac_exeext
4489 if test "${ac_cv_search_dlopen+set}" = set; then :
4490 break
4491fi
4492done
4493if test "${ac_cv_search_dlopen+set}" = set; then :
4494
4495else
4496 ac_cv_search_dlopen=no
4497fi
4498rm conftest.$ac_ext
4499LIBS=$ac_func_search_save_LIBS
4500fi
4501{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
4502$as_echo "$ac_cv_search_dlopen" >&6; }
4503ac_res=$ac_cv_search_dlopen
4504if test "$ac_res" != no; then :
4505 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4506
4507fi
4508
4509 fi
da2f07f1
JK
4510
4511
4512case "${host}" in
4513 sparc-*-solaris*|i[3-7]86-*-solaris*)
4514 # On native 32bit sparc and ia32 solaris, large-file and procfs support
4515 # are mutually exclusive; and without procfs support, the bfd/ elf module
4516 # cannot provide certain routines such as elfcore_write_prpsinfo
4517 # or elfcore_write_prstatus. So unless the user explicitly requested
4518 # large-file support through the --enable-largefile switch, disable
4519 # large-file support in favor of procfs support.
4520 test "${target}" = "${host}" -a "x$plugins" = xno \
4521 && : ${enable_largefile="no"}
4522 ;;
4523esac
4524
4525# Check whether --enable-largefile was given.
4526if test "${enable_largefile+set}" = set; then :
4527 enableval=$enable_largefile;
4528fi
4529
4530if test "$enable_largefile" != no; then
4531
4532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4533$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
4534if test "${ac_cv_sys_largefile_CC+set}" = set; then :
4535 $as_echo_n "(cached) " >&6
4536else
4537 ac_cv_sys_largefile_CC=no
4538 if test "$GCC" != yes; then
4539 ac_save_CC=$CC
4540 while :; do
4541 # IRIX 6.2 and later do not support large files by default,
4542 # so use the C compiler's -n32 option if that helps.
4543 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4544/* end confdefs.h. */
4545#include <sys/types.h>
4546 /* Check that off_t can represent 2**63 - 1 correctly.
4547 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4548 since some C++ compilers masquerading as C compilers
4549 incorrectly reject 9223372036854775807. */
4550#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4551 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4552 && LARGE_OFF_T % 2147483647 == 1)
4553 ? 1 : -1];
4554int
4555main ()
4556{
4557
4558 ;
4559 return 0;
4560}
4561_ACEOF
4562 if ac_fn_c_try_compile "$LINENO"; then :
4563 break
4564fi
4565rm -f core conftest.err conftest.$ac_objext
4566 CC="$CC -n32"
4567 if ac_fn_c_try_compile "$LINENO"; then :
4568 ac_cv_sys_largefile_CC=' -n32'; break
4569fi
4570rm -f core conftest.err conftest.$ac_objext
4571 break
4572 done
4573 CC=$ac_save_CC
4574 rm -f conftest.$ac_ext
4575 fi
4576fi
4577{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4578$as_echo "$ac_cv_sys_largefile_CC" >&6; }
4579 if test "$ac_cv_sys_largefile_CC" != no; then
4580 CC=$CC$ac_cv_sys_largefile_CC
4581 fi
4582
4583 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4584$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
4585if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
4586 $as_echo_n "(cached) " >&6
4587else
4588 while :; do
4589 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4590/* end confdefs.h. */
4591#include <sys/types.h>
4592 /* Check that off_t can represent 2**63 - 1 correctly.
4593 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4594 since some C++ compilers masquerading as C compilers
4595 incorrectly reject 9223372036854775807. */
4596#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4597 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4598 && LARGE_OFF_T % 2147483647 == 1)
4599 ? 1 : -1];
4600int
4601main ()
4602{
4603
4604 ;
4605 return 0;
4606}
4607_ACEOF
4608if ac_fn_c_try_compile "$LINENO"; then :
4609 ac_cv_sys_file_offset_bits=no; break
4610fi
4611rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4612 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4613/* end confdefs.h. */
4614#define _FILE_OFFSET_BITS 64
4615#include <sys/types.h>
4616 /* Check that off_t can represent 2**63 - 1 correctly.
4617 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4618 since some C++ compilers masquerading as C compilers
4619 incorrectly reject 9223372036854775807. */
4620#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4621 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4622 && LARGE_OFF_T % 2147483647 == 1)
4623 ? 1 : -1];
4624int
4625main ()
4626{
4627
4628 ;
4629 return 0;
4630}
4631_ACEOF
4632if ac_fn_c_try_compile "$LINENO"; then :
4633 ac_cv_sys_file_offset_bits=64; break
4634fi
4635rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4636 ac_cv_sys_file_offset_bits=unknown
4637 break
4638done
4639fi
4640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4641$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4642case $ac_cv_sys_file_offset_bits in #(
4643 no | unknown) ;;
4644 *)
4645cat >>confdefs.h <<_ACEOF
4646#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4647_ACEOF
4648;;
4649esac
4650rm -rf conftest*
4651 if test $ac_cv_sys_file_offset_bits = unknown; then
4652 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4653$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
4654if test "${ac_cv_sys_large_files+set}" = set; then :
4655 $as_echo_n "(cached) " >&6
4656else
4657 while :; do
4658 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4659/* end confdefs.h. */
4660#include <sys/types.h>
4661 /* Check that off_t can represent 2**63 - 1 correctly.
4662 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4663 since some C++ compilers masquerading as C compilers
4664 incorrectly reject 9223372036854775807. */
4665#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4666 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4667 && LARGE_OFF_T % 2147483647 == 1)
4668 ? 1 : -1];
4669int
4670main ()
4671{
4672
4673 ;
4674 return 0;
4675}
4676_ACEOF
4677if ac_fn_c_try_compile "$LINENO"; then :
4678 ac_cv_sys_large_files=no; break
4679fi
4680rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4681 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4682/* end confdefs.h. */
4683#define _LARGE_FILES 1
4684#include <sys/types.h>
4685 /* Check that off_t can represent 2**63 - 1 correctly.
4686 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4687 since some C++ compilers masquerading as C compilers
4688 incorrectly reject 9223372036854775807. */
4689#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4690 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4691 && LARGE_OFF_T % 2147483647 == 1)
4692 ? 1 : -1];
4693int
4694main ()
4695{
4696
4697 ;
4698 return 0;
4699}
4700_ACEOF
4701if ac_fn_c_try_compile "$LINENO"; then :
4702 ac_cv_sys_large_files=1; break
4703fi
4704rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4705 ac_cv_sys_large_files=unknown
4706 break
4707done
4708fi
4709{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4710$as_echo "$ac_cv_sys_large_files" >&6; }
4711case $ac_cv_sys_large_files in #(
4712 no | unknown) ;;
4713 *)
4714cat >>confdefs.h <<_ACEOF
4715#define _LARGE_FILES $ac_cv_sys_large_files
4716_ACEOF
4717;;
4718esac
4719rm -rf conftest*
4720 fi
4721fi
4722
4723
4724
81ecdfbb
RW
4725
4726
4727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5
4728$as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; }
4729if test "${am_cv_prog_cc_stdc+set}" = set; then :
4730 $as_echo_n "(cached) " >&6
4731else
4732 am_cv_prog_cc_stdc=no
4733ac_save_CC="$CC"
4734# Don't try gcc -ansi; that turns off useful extensions and
4735# breaks some systems' header files.
4736# AIX -qlanglvl=ansi
4737# Ultrix and OSF/1 -std1
4738# HP-UX 10.20 and later -Ae
4739# HP-UX older versions -Aa -D_HPUX_SOURCE
4740# SVR4 -Xc -D__EXTENSIONS__
4741for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4742do
783e057b 4743 CC="$ac_save_CC $ac_arg"
81ecdfbb 4744 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4745/* end confdefs.h. */
4746#include <stdarg.h>
4747#include <stdio.h>
4748#include <sys/types.h>
4749#include <sys/stat.h>
4750/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4751struct buf { int x; };
4752FILE * (*rcsopen) (struct buf *, struct stat *, int);
4753static char *e (p, i)
4754 char **p;
4755 int i;
4756{
4757 return p[i];
4758}
4759static char *f (char * (*g) (char **, int), char **p, ...)
4760{
4761 char *s;
4762 va_list v;
4763 va_start (v,p);
4764 s = g (p, va_arg (v,int));
4765 va_end (v);
4766 return s;
4767}
4768int test (int i, double x);
4769struct s1 {int (*f) (int a);};
4770struct s2 {int (*f) (double a);};
4771int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4772int argc;
4773char **argv;
4774
4775int
4776main ()
4777{
4778
4779return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4780
4781 ;
4782 return 0;
4783}
4784_ACEOF
81ecdfbb 4785if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4786 am_cv_prog_cc_stdc="$ac_arg"; break
783e057b 4787fi
81ecdfbb 4788rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
4789done
4790CC="$ac_save_CC"
4791
4792fi
4793
4794if test -z "$am_cv_prog_cc_stdc"; then
81ecdfbb
RW
4795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4796$as_echo "none needed" >&6; }
783e057b 4797else
81ecdfbb
RW
4798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5
4799$as_echo "$am_cv_prog_cc_stdc" >&6; }
783e057b
DJ
4800fi
4801case "x$am_cv_prog_cc_stdc" in
4802 x|xno) ;;
4803 *) CC="$CC $am_cv_prog_cc_stdc" ;;
4804esac
4805
4869db5e
RM
4806# expand $ac_aux_dir to an absolute path
4807am_aux_dir=`cd $ac_aux_dir && pwd`
4808
4809if test x"${install_sh}" != xset; then
4810 case $am_aux_dir in
4811 *\ * | *\ *)
4812 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
4813 *)
4814 install_sh="\${SHELL} $am_aux_dir/install-sh"
4815 esac
4816fi
4817
4818# Installed binaries are usually stripped using `strip' when the user
4819# run `make install-strip'. However `strip' might not be the right
4820# tool to use in cross-compilation environments, therefore Automake
4821# will honor the `STRIP' environment variable to overrule this program.
4822if test "$cross_compiling" != no; then
4823 if test -n "$ac_tool_prefix"; then
4824 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4825set dummy ${ac_tool_prefix}strip; ac_word=$2
4826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4827$as_echo_n "checking for $ac_word... " >&6; }
4828if test "${ac_cv_prog_STRIP+set}" = set; then :
4829 $as_echo_n "(cached) " >&6
4830else
4831 if test -n "$STRIP"; then
4832 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4833else
4834as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4835for as_dir in $PATH
4836do
4837 IFS=$as_save_IFS
4838 test -z "$as_dir" && as_dir=.
4839 for ac_exec_ext in '' $ac_executable_extensions; do
4840 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4841 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4842 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4843 break 2
4844 fi
4845done
4846 done
4847IFS=$as_save_IFS
4848
4849fi
4850fi
4851STRIP=$ac_cv_prog_STRIP
4852if test -n "$STRIP"; then
4853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
4854$as_echo "$STRIP" >&6; }
4855else
4856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4857$as_echo "no" >&6; }
4858fi
4859
4860
4861fi
4862if test -z "$ac_cv_prog_STRIP"; then
4863 ac_ct_STRIP=$STRIP
4864 # Extract the first word of "strip", so it can be a program name with args.
4865set dummy strip; ac_word=$2
4866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4867$as_echo_n "checking for $ac_word... " >&6; }
4868if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
4869 $as_echo_n "(cached) " >&6
4870else
4871 if test -n "$ac_ct_STRIP"; then
4872 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
4873else
4874as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4875for as_dir in $PATH
4876do
4877 IFS=$as_save_IFS
4878 test -z "$as_dir" && as_dir=.
4879 for ac_exec_ext in '' $ac_executable_extensions; do
4880 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4881 ac_cv_prog_ac_ct_STRIP="strip"
4882 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4883 break 2
4884 fi
4885done
4886 done
4887IFS=$as_save_IFS
4888
4889fi
4890fi
4891ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
4892if test -n "$ac_ct_STRIP"; then
4893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
4894$as_echo "$ac_ct_STRIP" >&6; }
4895else
4896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4897$as_echo "no" >&6; }
4898fi
4899
4900 if test "x$ac_ct_STRIP" = x; then
4901 STRIP=":"
4902 else
4903 case $cross_compiling:$ac_tool_warned in
4904yes:)
4905{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4906$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4907ac_tool_warned=yes ;;
4908esac
4909 STRIP=$ac_ct_STRIP
4910 fi
4911else
4912 STRIP="$ac_cv_prog_STRIP"
4913fi
4914
4915fi
4916INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
4917
783e057b
DJ
4918
4919ac_aux_dir=
81ecdfbb
RW
4920for ac_dir in .. "$srcdir"/..; do
4921 for ac_t in install-sh install.sh shtool; do
4922 if test -f "$ac_dir/$ac_t"; then
4923 ac_aux_dir=$ac_dir
4924 ac_install_sh="$ac_aux_dir/$ac_t -c"
4925 break 2
4926 fi
4927 done
783e057b
DJ
4928done
4929if test -z "$ac_aux_dir"; then
81ecdfbb 4930 as_fn_error "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
783e057b 4931fi
81ecdfbb
RW
4932
4933# These three variables are undocumented and unsupported,
4934# and are intended to be withdrawn in a future Autoconf release.
4935# They can cause serious problems if a builder's source tree is in a directory
4936# whose full name contains unusual characters.
4937ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4938ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4939ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4940
783e057b 4941
783e057b 4942
9009e1ae
MR
4943test "$program_prefix" != NONE &&
4944 program_transform_name="s&^&$program_prefix&;$program_transform_name"
4945# Use a double $ so make ignores it.
4946test "$program_suffix" != NONE &&
4947 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
4948# Double any \ or $.
4949# By default was `s,x,x', remove it if useless.
4950ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
4951program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
4952
81ecdfbb 4953
a417dc56
RW
4954# Dependency checking.
4955rm -rf .tst 2>/dev/null
4956mkdir .tst 2>/dev/null
4957if test -d .tst; then
4958 am__leading_dot=.
4959else
4960 am__leading_dot=_
4961fi
4962rmdir .tst 2>/dev/null
4963
4964DEPDIR="${am__leading_dot}deps"
4965
81ecdfbb 4966ac_config_commands="$ac_config_commands depdir"
a417dc56
RW
4967
4968
4969depcc="$CC" am_compiler_list=
4970
4971am_depcomp=$ac_aux_dir/depcomp
81ecdfbb
RW
4972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
4973$as_echo_n "checking dependency style of $depcc... " >&6; }
4974if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
4975 $as_echo_n "(cached) " >&6
a417dc56
RW
4976else
4977 if test -f "$am_depcomp"; then
4978 # We make a subdir and do the tests there. Otherwise we can end up
4979 # making bogus files that we don't know about and never remove. For
4980 # instance it was reported that on HP-UX the gcc test will end up
4981 # making a dummy file named `D' -- because `-MD' means `put the output
4982 # in D'.
4983 mkdir conftest.dir
4984 # Copy depcomp to subdir because otherwise we won't find it if we're
4985 # using a relative directory.
4986 cp "$am_depcomp" conftest.dir
4987 cd conftest.dir
4988 # We will build objects and dependencies in a subdirectory because
4989 # it helps to detect inapplicable dependency modes. For instance
4990 # both Tru64's cc and ICC support -MD to output dependencies as a
4991 # side effect of compilation, but ICC will put the dependencies in
4992 # the current directory while Tru64 will put them in the object
4993 # directory.
4994 mkdir sub
4995
4996 am_cv_CC_dependencies_compiler_type=none
4997 if test "$am_compiler_list" = ""; then
4998 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
4999 fi
5000 for depmode in $am_compiler_list; do
5001 if test $depmode = none; then break; fi
5002
81ecdfbb 5003 $as_echo "$as_me:$LINENO: trying $depmode" >&5
a417dc56
RW
5004 # Setup a source with many dependencies, because some compilers
5005 # like to wrap large dependency lists on column 80 (with \), and
5006 # we should not choose a depcomp mode which is confused by this.
5007 #
5008 # We need to recreate these files for each test, as the compiler may
5009 # overwrite some of them when testing with obscure command lines.
5010 # This happens at least with the AIX C compiler.
5011 : > sub/conftest.c
5012 for i in 1 2 3 4 5 6; do
5013 echo '#include "conftst'$i'.h"' >> sub/conftest.c
5014 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
5015 # Solaris 8's {/usr,}/bin/sh.
5016 touch sub/conftst$i.h
5017 done
5018 echo "include sub/conftest.Po" > confmf
5019
5020 # We check with `-c' and `-o' for the sake of the "dashmstdout"
5021 # mode. It turns out that the SunPro C++ compiler does not properly
5022 # handle `-M -o', and we need to detect this.
5023 depcmd="depmode=$depmode \
5024 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
5025 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
5026 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
5027 echo "| $depcmd" | sed -e 's/ */ /g' >&5
5028 if env $depcmd > conftest.err 2>&1 &&
5029 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
5030 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
5031 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
5032 # icc doesn't choke on unknown options, it will just issue warnings
5033 # or remarks (even with -Werror). So we grep stderr for any message
5034 # that says an option was ignored or not supported.
5035 # When given -MP, icc 7.0 and 7.1 complain thusly:
5036 # icc: Command line warning: ignoring option '-M'; no argument required
5037 # The diagnosis changed in icc 8.0:
5038 # icc: Command line remark: option '-MP' not supported
5039 if (grep 'ignoring option' conftest.err ||
5040 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
5041 am_cv_CC_dependencies_compiler_type=$depmode
81ecdfbb 5042 $as_echo "$as_me:$LINENO: success" >&5
a417dc56
RW
5043 break
5044 fi
5045 fi
81ecdfbb 5046 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
a417dc56
RW
5047 sed -e 's/^/| /' < conftest.err >&5
5048 done
5049
5050 cd ..
5051 rm -rf conftest.dir
5052else
5053 am_cv_CC_dependencies_compiler_type=none
5054fi
5055
5056fi
81ecdfbb
RW
5057{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
5058$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
a417dc56 5059if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
81ecdfbb 5060then as_fn_error "no usable dependency style found" "$LINENO" 5
a417dc56
RW
5061else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
5062
5063fi
5064
5065
5066# Check for the 'make' the user wants to use.
5067for ac_prog in make
5068do
5069 # Extract the first word of "$ac_prog", so it can be a program name with args.
5070set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
5071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5072$as_echo_n "checking for $ac_word... " >&6; }
5073if test "${ac_cv_prog_MAKE+set}" = set; then :
5074 $as_echo_n "(cached) " >&6
a417dc56
RW
5075else
5076 if test -n "$MAKE"; then
5077 ac_cv_prog_MAKE="$MAKE" # Let the user override the test.
5078else
5079as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5080for as_dir in $PATH
5081do
5082 IFS=$as_save_IFS
5083 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5084 for ac_exec_ext in '' $ac_executable_extensions; do
5085 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
a417dc56 5086 ac_cv_prog_MAKE="$ac_prog"
81ecdfbb 5087 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
a417dc56
RW
5088 break 2
5089 fi
5090done
81ecdfbb
RW
5091 done
5092IFS=$as_save_IFS
a417dc56
RW
5093
5094fi
5095fi
5096MAKE=$ac_cv_prog_MAKE
5097if test -n "$MAKE"; then
81ecdfbb
RW
5098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
5099$as_echo "$MAKE" >&6; }
a417dc56 5100else
81ecdfbb
RW
5101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5102$as_echo "no" >&6; }
a417dc56
RW
5103fi
5104
81ecdfbb 5105
a417dc56
RW
5106 test -n "$MAKE" && break
5107done
5108
5109MAKE_IS_GNU=
5110case "`$MAKE --version 2>&1 | sed 1q`" in
5111 *GNU*)
5112 MAKE_IS_GNU=yes
5113 ;;
5114esac
81ecdfbb 5115 if test "$MAKE_IS_GNU" = yes; then
a417dc56
RW
5116 GMAKE_TRUE=
5117 GMAKE_FALSE='#'
5118else
5119 GMAKE_TRUE='#'
5120 GMAKE_FALSE=
5121fi
5122
81ecdfbb
RW
5123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
5124$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
5125set x ${MAKE-make}
5126ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
5127if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
5128 $as_echo_n "(cached) " >&6
a417dc56
RW
5129else
5130 cat >conftest.make <<\_ACEOF
81ecdfbb 5131SHELL = /bin/sh
a417dc56 5132all:
81ecdfbb 5133 @echo '@@@%%%=$(MAKE)=@@@%%%'
a417dc56
RW
5134_ACEOF
5135# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
81ecdfbb
RW
5136case `${MAKE-make} -f conftest.make 2>/dev/null` in
5137 *@@@%%%=?*=@@@%%%*)
5138 eval ac_cv_prog_make_${ac_make}_set=yes;;
5139 *)
5140 eval ac_cv_prog_make_${ac_make}_set=no;;
5141esac
a417dc56
RW
5142rm -f conftest.make
5143fi
81ecdfbb
RW
5144if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
5145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5146$as_echo "yes" >&6; }
a417dc56
RW
5147 SET_MAKE=
5148else
81ecdfbb
RW
5149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5150$as_echo "no" >&6; }
a417dc56
RW
5151 SET_MAKE="MAKE=${MAKE-make}"
5152fi
5153
5154
648d586d
JB
5155gnulib_extra_configure_args=
5156# If large-file support is disabled, make sure gnulib does the same.
5157if test "$enable_largefile" = no; then
5158gnulib_extra_configure_args="$gnulib_extra_configure_args --disable-largefile"
5159fi
5160
c971b7fa
PA
5161# Configure gnulib. We need to build gnulib under some other
5162# directory not "gnulib", to avoid the problem of both GDB and
5163# GDBserver wanting to build it in the same directory, when building
5164# in the source dir.
783e057b 5165
c971b7fa
PA
5166 in_src="gnulib"
5167 in_build="build-gnulib"
648d586d 5168 in_extra_args="$gnulib_extra_configure_args"
c971b7fa
PA
5169
5170 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
5171 # so they do not pile up.
5172 ac_sub_configure_args=
5173 ac_prev=
5174 eval "set x $ac_configure_args"
5175 shift
5176 for ac_arg
5177 do
5178 if test -n "$ac_prev"; then
5179 ac_prev=
5180 continue
5181 fi
5182 case $ac_arg in
5183 -cache-file | --cache-file | --cache-fil | --cache-fi \
5184 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
5185 ac_prev=cache_file ;;
5186 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
5187 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
5188 | --c=*)
5189 ;;
5190 --config-cache | -C)
5191 ;;
5192 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
5193 ac_prev=srcdir ;;
5194 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
5195 ;;
5196 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
5197 ac_prev=prefix ;;
5198 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
5199 ;;
5200 --disable-option-checking)
5201 ;;
5202 *)
5203 case $ac_arg in
5204 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
5205 esac
5206 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
5207 esac
5208 done
5209
5210 # Always prepend --prefix to ensure using the same prefix
5211 # in subdir configurations.
5212 ac_arg="--prefix=$prefix"
5213 case $ac_arg in
5214 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
5215 esac
5216 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
5217
5218 # Pass --silent
5219 if test "$silent" = yes; then
5220 ac_sub_configure_args="--silent $ac_sub_configure_args"
5221 fi
5222
5223 # Always prepend --disable-option-checking to silence warnings, since
5224 # different subdirs can have different --enable and --with options.
5225 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
5226
5227 ac_popdir=`pwd`
5228 ac_dir=$in_build
5229
5230 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
5231 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
5232 $as_echo "$ac_msg" >&6
5233 as_dir="$ac_dir"; as_fn_mkdir_p
5234
38ea300a
PA
5235 case $srcdir in
5236 [\\/]* | ?:[\\/]* )
5237 ac_srcdir=$srcdir/$in_src ;;
5238 *) # Relative name.
5239 ac_srcdir=../$srcdir/$in_src ;;
5240 esac
c971b7fa
PA
5241
5242 cd "$ac_dir"
5243
5244 ac_sub_configure=$ac_srcdir/configure
5245
5246 # Make the cache file name correct relative to the subdirectory.
5247 case $cache_file in
5248 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
5249 *) # Relative name.
5250 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
5251 esac
5252
648d586d
JB
5253 if test -n "$in_extra_args"; then
5254 # Add the extra args at the end.
5255 ac_sub_configure_args="$ac_sub_configure_args $in_extra_args"
5256 fi
5257
c971b7fa
PA
5258 { $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
5259$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
5260 # The eval makes quoting arguments work.
5261 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
5262 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
5263 as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
5264
5265 cd "$ac_popdir"
783e057b 5266
c971b7fa
PA
5267
5268
5269CONFIG_OBS=
5270CONFIG_DEPS=
5271CONFIG_SRCS=
5272ENABLE_CFLAGS=
5273
5274CONFIG_ALL=
5275CONFIG_CLEAN=
5276CONFIG_INSTALL=
5277CONFIG_UNINSTALL=
5278
5279# If we haven't got the data from the intl directory,
5280# assume NLS is disabled.
5281USE_NLS=no
5282LIBINTL=
5283LIBINTL_DEP=
5284INCINTL=
5285XGETTEXT=
5286GMSGFMT=
5287POSUB=
783e057b
DJ
5288
5289if test -f ../intl/config.intl; then
5290 . ../intl/config.intl
5291fi
81ecdfbb
RW
5292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
5293$as_echo_n "checking whether NLS is requested... " >&6; }
783e057b 5294if test x"$USE_NLS" != xyes; then
81ecdfbb
RW
5295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5296$as_echo "no" >&6; }
783e057b 5297else
81ecdfbb
RW
5298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5299$as_echo "yes" >&6; }
783e057b 5300
81ecdfbb 5301$as_echo "#define ENABLE_NLS 1" >>confdefs.h
783e057b
DJ
5302
5303
81ecdfbb
RW
5304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
5305$as_echo_n "checking for catalogs to be installed... " >&6; }
783e057b
DJ
5306 # Look for .po and .gmo files in the source directory.
5307 CATALOGS=
5308 XLINGUAS=
5309 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
5310 # If there aren't any .gmo files the shell will give us the
5311 # literal string "../path/to/srcdir/po/*.gmo" which has to be
5312 # weeded out.
5313 case "$cat" in *\**)
5314 continue;;
5315 esac
5316 # The quadruple backslash is collapsed to a double backslash
5317 # by the backticks, then collapsed again by the double quotes,
5318 # leaving us with one backslash in the sed expression (right
5319 # before the dot that mustn't act as a wildcard).
c971b7fa
PA
5320 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
5321 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
5322 # The user is allowed to set LINGUAS to a list of languages to
5323 # install catalogs for. If it's empty that means "all of them."
5324 if test "x$LINGUAS" = x; then
5325 CATALOGS="$CATALOGS $cat"
5326 XLINGUAS="$XLINGUAS $lang"
5327 else
5328 case "$LINGUAS" in *$lang*)
5329 CATALOGS="$CATALOGS $cat"
5330 XLINGUAS="$XLINGUAS $lang"
5331 ;;
5332 esac
e28b3332
DJ
5333 fi
5334 done
c971b7fa
PA
5335 LINGUAS="$XLINGUAS"
5336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
5337$as_echo "$LINGUAS" >&6; }
5338
5339
5340 DATADIRNAME=share
5341
5342 INSTOBJEXT=.mo
5343
5344 GENCAT=gencat
5345
5346 CATOBJEXT=.gmo
e28b3332 5347
e28b3332
DJ
5348fi
5349
c971b7fa
PA
5350localedir='${datadir}/locale'
5351
5352
5353if test x"$USE_NLS" = xyes; then
5354 CONFIG_ALL="$CONFIG_ALL all-po"
5355 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
5356 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
5357 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
e28b3332 5358fi
e28b3332 5359
c971b7fa
PA
5360GNULIB=build-gnulib/import
5361
5362# For Makefile dependencies.
5363GNULIB_STDINT_H=
5364if test x"$STDINT_H" != x; then
5365 GNULIB_STDINT_H=$GNULIB/$STDINT_H
e28b3332
DJ
5366fi
5367
5368
c971b7fa
PA
5369PACKAGE=gdb
5370
5371cat >>confdefs.h <<_ACEOF
5372#define PACKAGE "$PACKAGE"
5373_ACEOF
5374
5375
5376
5377# We never need to detect it in this sub-configure.
5378# But preserve it for config.status --recheck.
5379
5380
5381
5382MAKEINFO_EXTRA_FLAGS=""
5383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5
5384$as_echo_n "checking whether $MAKEINFO supports @click... " >&6; }
5385if test "${gdb_cv_have_makeinfo_click+set}" = set; then :
5386 $as_echo_n "(cached) " >&6
5387else
5388 echo '@clicksequence{a @click{} b}' >conftest.texinfo
5389 if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then
5390 gdb_cv_have_makeinfo_click=yes
5391 else
5392 gdb_cv_have_makeinfo_click=no
5393 fi
5394fi
5395{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5
5396$as_echo "$gdb_cv_have_makeinfo_click" >&6; }
5397if test x"$gdb_cv_have_makeinfo_click" = xyes; then
5398 MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK"
5399fi
e28b3332
DJ
5400
5401
bec39cab
AC
5402
5403
81ecdfbb
RW
5404# Check whether --with-separate-debug-dir was given.
5405if test "${with_separate_debug_dir+set}" = set; then :
5406 withval=$with_separate_debug_dir;
b14b1491
TT
5407 DEBUGDIR=$withval
5408else
5409 DEBUGDIR=${libdir}/debug
81ecdfbb
RW
5410fi
5411
20e95c23 5412
783e057b
DJ
5413 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5414 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 5415 ac_define_dir=`eval echo $DEBUGDIR`
783e057b 5416 ac_define_dir=`eval echo $ac_define_dir`
20e95c23 5417
783e057b
DJ
5418cat >>confdefs.h <<_ACEOF
5419#define DEBUGDIR "$ac_define_dir"
20e95c23 5420_ACEOF
20e95c23 5421
20e95c23 5422
20e95c23 5423
0c4a4063 5424
b14b1491
TT
5425 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
5426 if test "x$prefix" = xNONE; then
5427 test_prefix=/usr/local
5428 else
5429 test_prefix=$prefix
5430 fi
783e057b 5431 else
b14b1491 5432 test_prefix=$exec_prefix
783e057b 5433 fi
b14b1491
TT
5434 value=0
5435 case ${ac_define_dir} in
5436 "${test_prefix}"|"${test_prefix}/"*|\
5437 '${exec_prefix}'|'${exec_prefix}/'*)
5438 value=1
5439 ;;
5440 esac
5441
5442cat >>confdefs.h <<_ACEOF
5443#define DEBUGDIR_RELOCATABLE $value
5444_ACEOF
5445
5446
5447
0c4a4063 5448
f83d8a90
DE
5449# We can't pass paths as command line arguments.
5450# Mingw32 tries to be clever and will convert the paths for us.
5451# For example -DBINDIR="/usr/local/bin" passed on the command line may get
5452# converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin".
5453# This breaks GDB's relocatable path conversions since paths passed in
5454# config.h would not get so translated, the path prefixes no longer match.
5455
5456 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5457 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5458 ac_define_dir=`eval echo $bindir`
5459 ac_define_dir=`eval echo $ac_define_dir`
5460
5461cat >>confdefs.h <<_ACEOF
5462#define BINDIR "$ac_define_dir"
5463_ACEOF
5464
5465
5466
b14b1491
TT
5467# GDB's datadir relocation
5468
5469
5470
81ecdfbb
RW
5471# Check whether --with-gdb-datadir was given.
5472if test "${with_gdb_datadir+set}" = set; then :
5473 withval=$with_gdb_datadir;
b14b1491 5474 GDB_DATADIR=$withval
20e95c23 5475else
b14b1491 5476 GDB_DATADIR=${datadir}/gdb
81ecdfbb
RW
5477fi
5478
20e95c23 5479
b14b1491
TT
5480 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5481 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5482 ac_define_dir=`eval echo $GDB_DATADIR`
5483 ac_define_dir=`eval echo $ac_define_dir`
5484
5485cat >>confdefs.h <<_ACEOF
5486#define GDB_DATADIR "$ac_define_dir"
20e95c23
DJ
5487_ACEOF
5488
b14b1491
TT
5489
5490
0c4a4063 5491
b14b1491
TT
5492 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
5493 if test "x$prefix" = xNONE; then
5494 test_prefix=/usr/local
5495 else
5496 test_prefix=$prefix
5497 fi
5498 else
5499 test_prefix=$exec_prefix
5500 fi
5501 value=0
5502 case ${ac_define_dir} in
5503 "${test_prefix}"|"${test_prefix}/"*|\
5504 '${exec_prefix}'|'${exec_prefix}/'*)
5505 value=1
5506 ;;
5507 esac
5508
5509cat >>confdefs.h <<_ACEOF
5510#define GDB_DATADIR_RELOCATABLE $value
5511_ACEOF
5512
5513
783e057b 5514
20e95c23 5515
0c4a4063 5516
81ecdfbb
RW
5517# Check whether --with-relocated-sources was given.
5518if test "${with_relocated_sources+set}" = set; then :
5519 withval=$with_relocated_sources; reloc_srcdir="${withval}"
29b0e8a2
JM
5520
5521 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5522 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5523 ac_define_dir=`eval echo $reloc_srcdir`
5524 ac_define_dir=`eval echo $ac_define_dir`
5525
5526cat >>confdefs.h <<_ACEOF
5527#define RELOC_SRCDIR "$ac_define_dir"
5528_ACEOF
5529
5530
5531
81ecdfbb
RW
5532fi
5533
29b0e8a2 5534
7349ff92
JK
5535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5
5536$as_echo_n "checking for default auto-load directory... " >&6; }
5537
5538# Check whether --with-auto-load-dir was given.
5539if test "${with_auto_load_dir+set}" = set; then :
5540 withval=$with_auto_load_dir;
5541else
1564a261 5542 with_auto_load_dir='$debugdir:$datadir/auto-load'
7349ff92
JK
5543fi
5544
1564a261 5545escape_dir=`echo $with_auto_load_dir | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'`
7349ff92
JK
5546
5547 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5548 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5549 ac_define_dir=`eval echo $escape_dir`
5550 ac_define_dir=`eval echo $ac_define_dir`
5551
5552cat >>confdefs.h <<_ACEOF
5553#define AUTO_LOAD_DIR "$ac_define_dir"
5554_ACEOF
5555
5556
5557{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5
5558$as_echo "$with_auto_load_dir" >&6; }
5559
bccbefd2
JK
5560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5
5561$as_echo_n "checking for default auto-load safe-path... " >&6; }
5562
5563# Check whether --with-auto-load-safe-path was given.
5564if test "${with_auto_load_safe_path+set}" = set; then :
5565 withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then
6dea1fbd
JK
5566 with_auto_load_safe_path="/"
5567 fi
bccbefd2 5568else
7349ff92 5569 with_auto_load_safe_path="$with_auto_load_dir"
bccbefd2
JK
5570fi
5571
1564a261 5572escape_dir=`echo $with_auto_load_safe_path | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'`
bccbefd2
JK
5573
5574 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5575 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6dea1fbd 5576 ac_define_dir=`eval echo $escape_dir`
bccbefd2
JK
5577 ac_define_dir=`eval echo $ac_define_dir`
5578
5579cat >>confdefs.h <<_ACEOF
6dea1fbd 5580#define AUTO_LOAD_SAFE_PATH "$ac_define_dir"
bccbefd2
JK
5581_ACEOF
5582
5583
5584{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
5585$as_echo "$with_auto_load_safe_path" >&6; }
5586
29b0e8a2 5587
20e95c23 5588
5ae98d25 5589subdirs="$subdirs testsuite"
20e95c23
DJ
5590
5591
783e057b 5592# Check whether to support alternative target configurations
81ecdfbb
RW
5593# Check whether --enable-targets was given.
5594if test "${enable_targets+set}" = set; then :
5595 enableval=$enable_targets; case "${enableval}" in
5596 yes | "") as_fn_error "enable-targets option must specify target names or 'all'" "$LINENO" 5
783e057b
DJ
5597 ;;
5598 no) enable_targets= ;;
5599 *) enable_targets=$enableval ;;
5600esac
81ecdfbb
RW
5601fi
5602
20e95c23 5603
783e057b 5604# Check whether to enable 64-bit support on 32-bit hosts
81ecdfbb
RW
5605# Check whether --enable-64-bit-bfd was given.
5606if test "${enable_64_bit_bfd+set}" = set; then :
5607 enableval=$enable_64_bit_bfd; case "${enableval}" in
783e057b
DJ
5608 yes) want64=true ;;
5609 no) want64=false ;;
81ecdfbb 5610 *) as_fn_error "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
783e057b
DJ
5611esac
5612else
5613 want64=false
81ecdfbb
RW
5614fi
5615
783e057b
DJ
5616# Provide defaults for some variables set by the per-host and per-target
5617# configuration.
5618gdb_host_obs=posix-hdep.o
20e95c23 5619
783e057b
DJ
5620if test "${target}" = "${host}"; then
5621 gdb_native=yes
5622else
5623 gdb_native=no
5624fi
20e95c23 5625
783e057b 5626. $srcdir/configure.host
20e95c23 5627
fb23d554
SDJ
5628# Add in the common host objects.
5629. $srcdir/common/common.host
5630gdb_host_obs="$gdb_host_obs $common_host_obs"
5631
783e057b 5632# Accumulate some settings from configure.tgt over all enabled targets
20e95c23 5633
783e057b
DJ
5634TARGET_OBS=
5635all_targets=
b292c783 5636HAVE_NATIVE_GCORE_TARGET=
20e95c23 5637
783e057b 5638for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
20e95c23 5639do
783e057b
DJ
5640 if test "$targ_alias" = "all"; then
5641 all_targets=true
5642 else
5643 # Canonicalize the secondary target names.
5644 result=`$ac_config_sub $targ_alias 2>/dev/null`
5645 if test -n "$result"; then
5646 targ=$result
5647 else
5648 targ=$targ_alias
5649 fi
20e95c23 5650
783e057b 5651 . ${srcdir}/configure.tgt
20e95c23 5652
bf307134
JB
5653 if test -z "${gdb_target_obs}"; then :
5654 as_fn_error "configuration ${targ} is unsupported." "$LINENO" 5
5655fi
5656
783e057b
DJ
5657 # Target-specific object files
5658 for i in ${gdb_target_obs}; do
5659 case " $TARGET_OBS " in
5660 *" ${i} "*) ;;
5661 *)
5662 TARGET_OBS="$TARGET_OBS ${i}"
5663 ;;
5664 esac
5665 done
20e95c23 5666
783e057b
DJ
5667 # Check whether this target needs 64-bit CORE_ADDR
5668 if test x${want64} = xfalse; then
5669 . ${srcdir}/../bfd/config.bfd
5670 fi
b292c783
JK
5671
5672 # Check whether this target is native and supports gcore.
5673 if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \
5674 && $gdb_have_gcore; then
5675 HAVE_NATIVE_GCORE_TARGET=1
5676 fi
783e057b 5677 fi
20e95c23
DJ
5678done
5679
783e057b
DJ
5680if test x${all_targets} = xtrue; then
5681
5682 # We want all 64-bit targets if we either:
5683 # - run on a 64-bit host or
5684 # - already require 64-bit support for some other target or
5685 # - the --enable-64-bit-bfd option was supplied
5686 # Otherwise we only support all 32-bit targets.
5687 #
5688 # NOTE: This test must be in sync with the corresponding
5689 # tests in BFD!
20e95c23 5690
783e057b 5691 if test x${want64} = xfalse; then
81ecdfbb
RW
5692 # The cast to long int works around a bug in the HP C Compiler
5693# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5694# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5695# This bug is HP SR number 8606223364.
5696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
5697$as_echo_n "checking size of long... " >&6; }
5698if test "${ac_cv_sizeof_long+set}" = set; then :
5699 $as_echo_n "(cached) " >&6
c0993dbe 5700else
81ecdfbb 5701 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
c0993dbe 5702
81ecdfbb
RW
5703else
5704 if test "$ac_cv_type_long" = yes; then
5705 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5706$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5707{ as_fn_set_status 77
5708as_fn_error "cannot compute sizeof (long)
5709See \`config.log' for more details." "$LINENO" 5; }; }
5710 else
5711 ac_cv_sizeof_long=0
5712 fi
c0993dbe 5713fi
81ecdfbb 5714
c0993dbe 5715fi
81ecdfbb
RW
5716{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
5717$as_echo "$ac_cv_sizeof_long" >&6; }
c0993dbe 5718
c0993dbe 5719
c0993dbe 5720
c0993dbe
UW
5721cat >>confdefs.h <<_ACEOF
5722#define SIZEOF_LONG $ac_cv_sizeof_long
5723_ACEOF
5724
5725
5726 if test "x${ac_cv_sizeof_long}" = "x8"; then
5727 want64=true
5728 fi
5729 fi
5730 if test x${want64} = xtrue; then
5731 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
5732 else
5733 TARGET_OBS='$(ALL_TARGET_OBS)'
5734 fi
5735fi
5736
5737
5738
b292c783 5739
c0993dbe
UW
5740# For other settings, only the main target counts.
5741gdb_sim=
5742gdb_osabi=
5743build_gdbserver=
5744targ=$target; . ${srcdir}/configure.tgt
5745
5746# Fetch the default architecture and default target vector from BFD.
5747targ=$target; . $srcdir/../bfd/config.bfd
5748
5749# We only want the first architecture, so strip off the others if
5750# there is more than one.
5751targ_archs=`echo $targ_archs | sed 's/ .*//'`
5752
5753if test "x$targ_archs" != x; then
5754
5755cat >>confdefs.h <<_ACEOF
5756#define DEFAULT_BFD_ARCH $targ_archs
5757_ACEOF
5758
5759fi
5760if test "x$targ_defvec" != x; then
5761
5762cat >>confdefs.h <<_ACEOF
5763#define DEFAULT_BFD_VEC $targ_defvec
5764_ACEOF
5765
5766fi
5767
c0993dbe
UW
5768# The CLI cannot be disabled yet, but may be in the future.
5769
5770# Enable CLI.
81ecdfbb
RW
5771# Check whether --enable-gdbcli was given.
5772if test "${enable_gdbcli+set}" = set; then :
5773 enableval=$enable_gdbcli; case $enableval in
c0993dbe
UW
5774 yes)
5775 ;;
5776 no)
81ecdfbb 5777 as_fn_error "the command-line interface cannot be disabled yet" "$LINENO" 5 ;;
c0993dbe 5778 *)
81ecdfbb 5779 as_fn_error "bad value $enableval for --enable-gdbcli" "$LINENO" 5 ;;
c0993dbe
UW
5780 esac
5781else
5782 enable_gdbcli=yes
81ecdfbb
RW
5783fi
5784
c0993dbe
UW
5785if test x"$enable_gdbcli" = xyes; then
5786 if test -d $srcdir/cli; then
5787 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
5788 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
5789 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
5790 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
5791 fi
5792fi
5793
5794# Enable MI.
81ecdfbb
RW
5795# Check whether --enable-gdbmi was given.
5796if test "${enable_gdbmi+set}" = set; then :
5797 enableval=$enable_gdbmi; case $enableval in
c0993dbe
UW
5798 yes | no)
5799 ;;
5800 *)
81ecdfbb 5801 as_fn_error "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
c0993dbe
UW
5802 esac
5803else
5804 enable_gdbmi=yes
81ecdfbb
RW
5805fi
5806
c0993dbe
UW
5807if test x"$enable_gdbmi" = xyes; then
5808 if test -d $srcdir/mi; then
5809 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
5810 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
5811 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
5812 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
5813 fi
5814fi
5815
5816# Enable TUI.
81ecdfbb
RW
5817# Check whether --enable-tui was given.
5818if test "${enable_tui+set}" = set; then :
5819 enableval=$enable_tui; case $enableval in
3ca64bd3 5820 yes | no | auto)
c0993dbe
UW
5821 ;;
5822 *)
81ecdfbb 5823 as_fn_error "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
c0993dbe
UW
5824 esac
5825else
3ca64bd3 5826 enable_tui=auto
81ecdfbb
RW
5827fi
5828
c0993dbe
UW
5829
5830# Enable gdbtk.
81ecdfbb
RW
5831# Check whether --enable-gdbtk was given.
5832if test "${enable_gdbtk+set}" = set; then :
5833 enableval=$enable_gdbtk; case $enableval in
c0993dbe
UW
5834 yes | no)
5835 ;;
5836 *)
81ecdfbb 5837 as_fn_error "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
c0993dbe
UW
5838 esac
5839else
5062cc19 5840 if test -d $srcdir/gdbtk; then
c0993dbe
UW
5841 enable_gdbtk=yes
5842 else
5843 enable_gdbtk=no
5844 fi
81ecdfbb
RW
5845fi
5846
c0993dbe
UW
5847# We unconditionally disable gdbtk tests on selected platforms.
5848case $host_os in
5849 go32* | windows*)
81ecdfbb
RW
5850 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
5851$as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
c0993dbe
UW
5852 enable_gdbtk=no ;;
5853esac
5854
05e7c244 5855# Libunwind support for ia64.
bec39cab 5856
05e7c244
JK
5857
5858# Check whether --with-libunwind-ia64 was given.
5859if test "${with_libunwind_ia64+set}" = set; then :
5860 withval=$with_libunwind_ia64;
bec39cab 5861else
05e7c244
JK
5862 with_libunwind_ia64=auto
5863fi
bec39cab 5864
05e7c244
JK
5865
5866# Backward compatibility option.
5867if test "${with_libunwind+set}" = set; then
5868 if test x"$with_libunwind_ia64" != xauto; then
5869 as_fn_error "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5
5870 fi
5871 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5
5872$as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;}
5873 with_libunwind_ia64="$with_libunwind"
5874fi
5875
5876case "$with_libunwind_ia64" in
5877 yes | no)
5878 ;;
5879 auto)
5880 for ac_header in libunwind-ia64.h
81ecdfbb 5881do :
b54a8fd7
PA
5882 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
5883if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
bec39cab 5884 cat >>confdefs.h <<_ACEOF
b54a8fd7 5885#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
5886_ACEOF
5887
5888fi
5889
5890done
5891
05e7c244
JK
5892 with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h
5893 ;;
5894 *)
5895 as_fn_error "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5
5896 ;;
5897esac
bec39cab 5898
05e7c244 5899if test x"$with_libunwind_ia64" = xyes; then
b54a8fd7 5900 for ac_header in libunwind-ia64.h
81ecdfbb 5901do :
b54a8fd7
PA
5902 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
5903if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
bec39cab 5904 cat >>confdefs.h <<_ACEOF
b54a8fd7 5905#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
5906_ACEOF
5907
5908fi
5909
5910done
5911
05e7c244
JK
5912 if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then
5913 as_fn_error "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5
5914 fi
5915 CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o"
5916 CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o"
5917 CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c"
a9322a30
TT
5918fi
5919
cb01cfba
JB
5920opt_curses=no
5921
81ecdfbb
RW
5922# Check whether --with-curses was given.
5923if test "${with_curses+set}" = set; then :
5924 withval=$with_curses; opt_curses=$withval
5925fi
5926
cb01cfba 5927
76a39ba7 5928prefer_curses=no
cb01cfba 5929if test "$opt_curses" = "yes"; then
76a39ba7 5930 prefer_curses=yes
cb01cfba
JB
5931fi
5932
a9322a30 5933# Profiling support.
81ecdfbb
RW
5934# Check whether --enable-profiling was given.
5935if test "${enable_profiling+set}" = set; then :
5936 enableval=$enable_profiling; case $enableval in
a9322a30
TT
5937 yes | no)
5938 ;;
5939 *)
81ecdfbb 5940 as_fn_error "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
a9322a30
TT
5941 esac
5942else
5943 enable_profiling=no
81ecdfbb 5944fi
bec39cab 5945
a9322a30
TT
5946
5947for ac_func in monstartup _mcleanup
81ecdfbb
RW
5948do :
5949 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
5950ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
5951eval as_val=\$$as_ac_var
5952 if test "x$as_val" = x""yes; then :
5953 cat >>confdefs.h <<_ACEOF
5954#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 5955_ACEOF
a9322a30 5956
81ecdfbb
RW
5957fi
5958done
a9322a30 5959
81ecdfbb
RW
5960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
5961$as_echo_n "checking for _etext... " >&6; }
5962if test "${ac_cv_var__etext+set}" = set; then :
5963 $as_echo_n "(cached) " >&6
5964else
5965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5966/* end confdefs.h. */
5967#include <stdlib.h>
5968extern char _etext;
a9322a30
TT
5969
5970int
5971main ()
5972{
5973free (&_etext);
5974 ;
5975 return 0;
5976}
bec39cab 5977_ACEOF
81ecdfbb 5978if ac_fn_c_try_link "$LINENO"; then :
a9322a30 5979 ac_cv_var__etext=yes
bec39cab 5980else
81ecdfbb 5981 ac_cv_var__etext=no
bec39cab 5982fi
81ecdfbb
RW
5983rm -f core conftest.err conftest.$ac_objext \
5984 conftest$ac_exeext conftest.$ac_ext
bec39cab 5985fi
81ecdfbb
RW
5986{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
5987$as_echo "$ac_cv_var__etext" >&6; }
a9322a30 5988if test $ac_cv_var__etext = yes; then
60ca704f 5989
81ecdfbb 5990$as_echo "#define HAVE__ETEXT 1" >>confdefs.h
bec39cab 5991
bec39cab 5992fi
81ecdfbb
RW
5993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
5994$as_echo_n "checking for etext... " >&6; }
5995if test "${ac_cv_var_etext+set}" = set; then :
5996 $as_echo_n "(cached) " >&6
bec39cab 5997else
81ecdfbb 5998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 5999/* end confdefs.h. */
a9322a30
TT
6000#include <stdlib.h>
6001extern char etext;
bec39cab
AC
6002
6003int
6004main ()
6005{
a9322a30 6006free (&etext);
bec39cab
AC
6007 ;
6008 return 0;
6009}
6010_ACEOF
81ecdfbb 6011if ac_fn_c_try_link "$LINENO"; then :
a9322a30 6012 ac_cv_var_etext=yes
bec39cab 6013else
81ecdfbb 6014 ac_cv_var_etext=no
bec39cab 6015fi
81ecdfbb
RW
6016rm -f core conftest.err conftest.$ac_objext \
6017 conftest$ac_exeext conftest.$ac_ext
bec39cab 6018fi
81ecdfbb
RW
6019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
6020$as_echo "$ac_cv_var_etext" >&6; }
a9322a30
TT
6021if test $ac_cv_var_etext = yes; then
6022
81ecdfbb 6023$as_echo "#define HAVE_ETEXT 1" >>confdefs.h
bec39cab
AC
6024
6025fi
a9322a30
TT
6026if test "$enable_profiling" = yes ; then
6027 if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
81ecdfbb 6028 as_fn_error "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
a9322a30
TT
6029 fi
6030 PROFILE_CFLAGS=-pg
6031 OLD_CFLAGS="$CFLAGS"
6032 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
bec39cab 6033
81ecdfbb
RW
6034 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
6035$as_echo_n "checking whether $CC supports -pg... " >&6; }
6036if test "${ac_cv_cc_supports_pg+set}" = set; then :
6037 $as_echo_n "(cached) " >&6
bec39cab 6038else
81ecdfbb 6039 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6040/* end confdefs.h. */
bec39cab
AC
6041
6042int
6043main ()
6044{
a9322a30 6045int x;
bec39cab
AC
6046 ;
6047 return 0;
6048}
6049_ACEOF
81ecdfbb 6050if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 6051 ac_cv_cc_supports_pg=yes
bec39cab 6052else
81ecdfbb 6053 ac_cv_cc_supports_pg=no
bec39cab 6054fi
81ecdfbb 6055rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 6056fi
81ecdfbb
RW
6057{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
6058$as_echo "$ac_cv_cc_supports_pg" >&6; }
bec39cab 6059
a9322a30 6060 if test $ac_cv_cc_supports_pg = no; then
81ecdfbb 6061 as_fn_error "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
a9322a30 6062 fi
bec39cab 6063
a9322a30 6064 CFLAGS="$OLD_CFLAGS"
bec39cab
AC
6065fi
6066
c16158bc
JM
6067
6068
81ecdfbb
RW
6069# Check whether --with-pkgversion was given.
6070if test "${with_pkgversion+set}" = set; then :
6071 withval=$with_pkgversion; case "$withval" in
6072 yes) as_fn_error "package version not specified" "$LINENO" 5 ;;
c16158bc
JM
6073 no) PKGVERSION= ;;
6074 *) PKGVERSION="($withval) " ;;
6075 esac
6076else
6077 PKGVERSION="(GDB) "
6078
81ecdfbb 6079fi
c16158bc
JM
6080
6081
6082
6083
81ecdfbb
RW
6084
6085# Check whether --with-bugurl was given.
6086if test "${with_bugurl+set}" = set; then :
6087 withval=$with_bugurl; case "$withval" in
6088 yes) as_fn_error "bug URL not specified" "$LINENO" 5 ;;
c16158bc
JM
6089 no) BUGURL=
6090 ;;
6091 *) BUGURL="$withval"
6092 ;;
6093 esac
6094else
6095 BUGURL="http://www.gnu.org/software/gdb/bugs/"
6096
81ecdfbb
RW
6097fi
6098
c16158bc
JM
6099 case ${BUGURL} in
6100 "")
6101 REPORT_BUGS_TO=
6102 REPORT_BUGS_TEXI=
6103 ;;
6104 *)
6105 REPORT_BUGS_TO="<$BUGURL>"
6106 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
6107 ;;
6108 esac;
6109
6110
6111
6112
6113cat >>confdefs.h <<_ACEOF
6114#define PKGVERSION "$PKGVERSION"
6115_ACEOF
6116
6117
6118cat >>confdefs.h <<_ACEOF
6119#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
6120_ACEOF
6121
6122
bec39cab
AC
6123# --------------------- #
6124# Checks for programs. #
6125# --------------------- #
6126
6127for ac_prog in gawk mawk nawk awk
6128do
6129 # Extract the first word of "$ac_prog", so it can be a program name with args.
6130set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
6131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6132$as_echo_n "checking for $ac_word... " >&6; }
6133if test "${ac_cv_prog_AWK+set}" = set; then :
6134 $as_echo_n "(cached) " >&6
bec39cab
AC
6135else
6136 if test -n "$AWK"; then
6137 ac_cv_prog_AWK="$AWK" # Let the user override the test.
6138else
6139as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6140for as_dir in $PATH
6141do
6142 IFS=$as_save_IFS
6143 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6144 for ac_exec_ext in '' $ac_executable_extensions; do
6145 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6146 ac_cv_prog_AWK="$ac_prog"
81ecdfbb 6147 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6148 break 2
6149 fi
6150done
81ecdfbb
RW
6151 done
6152IFS=$as_save_IFS
bec39cab
AC
6153
6154fi
6155fi
6156AWK=$ac_cv_prog_AWK
6157if test -n "$AWK"; then
81ecdfbb
RW
6158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
6159$as_echo "$AWK" >&6; }
bec39cab 6160else
81ecdfbb
RW
6161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6162$as_echo "no" >&6; }
bec39cab
AC
6163fi
6164
bec39cab 6165
81ecdfbb 6166 test -n "$AWK" && break
bec39cab
AC
6167done
6168
c971b7fa
PA
6169# Find a good install program. We prefer a C program (faster),
6170# so one script is as good as another. But avoid the broken or
6171# incompatible versions:
6172# SysV /etc/install, /usr/sbin/install
6173# SunOS /usr/etc/install
6174# IRIX /sbin/install
6175# AIX /bin/install
6176# AmigaOS /C/install, which installs bootblocks on floppy discs
6177# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6178# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6179# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6180# OS/2's system install, which has a completely different semantic
6181# ./install, which can be erroneously created by make from ./install.sh.
6182# Reject install programs that cannot install multiple files.
6183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6184$as_echo_n "checking for a BSD-compatible install... " >&6; }
6185if test -z "$INSTALL"; then
6186if test "${ac_cv_path_install+set}" = set; then :
6187 $as_echo_n "(cached) " >&6
6188else
6189 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6190for as_dir in $PATH
6191do
6192 IFS=$as_save_IFS
6193 test -z "$as_dir" && as_dir=.
6194 # Account for people who put trailing slashes in PATH elements.
6195case $as_dir/ in #((
6196 ./ | .// | /[cC]/* | \
6197 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
6198 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
6199 /usr/ucb/* ) ;;
6200 *)
6201 # OSF1 and SCO ODT 3.0 have their own names for install.
6202 # Don't use installbsd from OSF since it installs stuff as root
6203 # by default.
6204 for ac_prog in ginstall scoinst install; do
6205 for ac_exec_ext in '' $ac_executable_extensions; do
6206 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
6207 if test $ac_prog = install &&
6208 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6209 # AIX install. It has an incompatible calling convention.
6210 :
6211 elif test $ac_prog = install &&
6212 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6213 # program-specific install script used by HP pwplus--don't use.
6214 :
6215 else
6216 rm -rf conftest.one conftest.two conftest.dir
6217 echo one > conftest.one
6218 echo two > conftest.two
6219 mkdir conftest.dir
6220 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6221 test -s conftest.one && test -s conftest.two &&
6222 test -s conftest.dir/conftest.one &&
6223 test -s conftest.dir/conftest.two
6224 then
6225 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6226 break 3
6227 fi
6228 fi
6229 fi
6230 done
6231 done
6232 ;;
6233esac
6234
6235 done
6236IFS=$as_save_IFS
6237
6238rm -rf conftest.one conftest.two conftest.dir
6239
6240fi
6241 if test "${ac_cv_path_install+set}" = set; then
6242 INSTALL=$ac_cv_path_install
6243 else
6244 # As a last resort, use the slow shell script. Don't cache a
6245 # value for INSTALL within a source directory, because that will
6246 # break other packages using the cache if that directory is
6247 # removed, or if the value is a relative name.
6248 INSTALL=$ac_install_sh
6249 fi
6250fi
6251{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6252$as_echo "$INSTALL" >&6; }
6253
6254# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6255# It thinks the first close brace ends the variable substitution.
6256test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6257
6258test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6259
6260test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
bec39cab 6261
81ecdfbb
RW
6262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
6263$as_echo_n "checking whether ln -s works... " >&6; }
bec39cab
AC
6264LN_S=$as_ln_s
6265if test "$LN_S" = "ln -s"; then
81ecdfbb
RW
6266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6267$as_echo "yes" >&6; }
bec39cab 6268else
81ecdfbb
RW
6269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
6270$as_echo "no, using $LN_S" >&6; }
bec39cab
AC
6271fi
6272
6273if test -n "$ac_tool_prefix"; then
6274 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6275set dummy ${ac_tool_prefix}ranlib; ac_word=$2
81ecdfbb
RW
6276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6277$as_echo_n "checking for $ac_word... " >&6; }
6278if test "${ac_cv_prog_RANLIB+set}" = set; then :
6279 $as_echo_n "(cached) " >&6
bec39cab
AC
6280else
6281 if test -n "$RANLIB"; then
6282 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6283else
6284as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6285for as_dir in $PATH
6286do
6287 IFS=$as_save_IFS
6288 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6289 for ac_exec_ext in '' $ac_executable_extensions; do
6290 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6291 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
81ecdfbb 6292 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6293 break 2
6294 fi
6295done
81ecdfbb
RW
6296 done
6297IFS=$as_save_IFS
bec39cab
AC
6298
6299fi
6300fi
6301RANLIB=$ac_cv_prog_RANLIB
6302if test -n "$RANLIB"; then
81ecdfbb
RW
6303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6304$as_echo "$RANLIB" >&6; }
bec39cab 6305else
81ecdfbb
RW
6306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6307$as_echo "no" >&6; }
bec39cab
AC
6308fi
6309
81ecdfbb 6310
bec39cab
AC
6311fi
6312if test -z "$ac_cv_prog_RANLIB"; then
6313 ac_ct_RANLIB=$RANLIB
6314 # Extract the first word of "ranlib", so it can be a program name with args.
6315set dummy ranlib; ac_word=$2
81ecdfbb
RW
6316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6317$as_echo_n "checking for $ac_word... " >&6; }
6318if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
6319 $as_echo_n "(cached) " >&6
bec39cab
AC
6320else
6321 if test -n "$ac_ct_RANLIB"; then
6322 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6323else
6324as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6325for as_dir in $PATH
6326do
6327 IFS=$as_save_IFS
6328 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6329 for ac_exec_ext in '' $ac_executable_extensions; do
6330 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6331 ac_cv_prog_ac_ct_RANLIB="ranlib"
81ecdfbb 6332 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6333 break 2
6334 fi
6335done
81ecdfbb
RW
6336 done
6337IFS=$as_save_IFS
bec39cab 6338
bec39cab
AC
6339fi
6340fi
6341ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6342if test -n "$ac_ct_RANLIB"; then
81ecdfbb
RW
6343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6344$as_echo "$ac_ct_RANLIB" >&6; }
bec39cab 6345else
81ecdfbb
RW
6346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6347$as_echo "no" >&6; }
bec39cab
AC
6348fi
6349
81ecdfbb
RW
6350 if test "x$ac_ct_RANLIB" = x; then
6351 RANLIB=":"
6352 else
6353 case $cross_compiling:$ac_tool_warned in
6354yes:)
6355{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6356$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6357ac_tool_warned=yes ;;
6358esac
6359 RANLIB=$ac_ct_RANLIB
6360 fi
bec39cab
AC
6361else
6362 RANLIB="$ac_cv_prog_RANLIB"
6363fi
6364
6365for ac_prog in 'bison -y' byacc
6366do
6367 # Extract the first word of "$ac_prog", so it can be a program name with args.
6368set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
6369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6370$as_echo_n "checking for $ac_word... " >&6; }
6371if test "${ac_cv_prog_YACC+set}" = set; then :
6372 $as_echo_n "(cached) " >&6
bec39cab
AC
6373else
6374 if test -n "$YACC"; then
6375 ac_cv_prog_YACC="$YACC" # Let the user override the test.
6376else
6377as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6378for as_dir in $PATH
6379do
6380 IFS=$as_save_IFS
6381 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6382 for ac_exec_ext in '' $ac_executable_extensions; do
6383 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6384 ac_cv_prog_YACC="$ac_prog"
81ecdfbb 6385 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6386 break 2
6387 fi
6388done
81ecdfbb
RW
6389 done
6390IFS=$as_save_IFS
bec39cab
AC
6391
6392fi
6393fi
6394YACC=$ac_cv_prog_YACC
6395if test -n "$YACC"; then
81ecdfbb
RW
6396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
6397$as_echo "$YACC" >&6; }
bec39cab 6398else
81ecdfbb
RW
6399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6400$as_echo "no" >&6; }
bec39cab
AC
6401fi
6402
81ecdfbb 6403
bec39cab
AC
6404 test -n "$YACC" && break
6405done
6406test -n "$YACC" || YACC="yacc"
6407
6408
6409if test -n "$ac_tool_prefix"; then
6410 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6411set dummy ${ac_tool_prefix}ar; ac_word=$2
81ecdfbb
RW
6412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6413$as_echo_n "checking for $ac_word... " >&6; }
6414if test "${ac_cv_prog_AR+set}" = set; then :
6415 $as_echo_n "(cached) " >&6
bec39cab
AC
6416else
6417 if test -n "$AR"; then
6418 ac_cv_prog_AR="$AR" # Let the user override the test.
6419else
6420as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6421for as_dir in $PATH
6422do
6423 IFS=$as_save_IFS
6424 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6425 for ac_exec_ext in '' $ac_executable_extensions; do
6426 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6427 ac_cv_prog_AR="${ac_tool_prefix}ar"
81ecdfbb 6428 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6429 break 2
6430 fi
6431done
81ecdfbb
RW
6432 done
6433IFS=$as_save_IFS
bec39cab
AC
6434
6435fi
6436fi
6437AR=$ac_cv_prog_AR
6438if test -n "$AR"; then
81ecdfbb
RW
6439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6440$as_echo "$AR" >&6; }
bec39cab 6441else
81ecdfbb
RW
6442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6443$as_echo "no" >&6; }
bec39cab
AC
6444fi
6445
81ecdfbb 6446
bec39cab
AC
6447fi
6448if test -z "$ac_cv_prog_AR"; then
6449 ac_ct_AR=$AR
6450 # Extract the first word of "ar", so it can be a program name with args.
6451set dummy ar; ac_word=$2
81ecdfbb
RW
6452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6453$as_echo_n "checking for $ac_word... " >&6; }
6454if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
6455 $as_echo_n "(cached) " >&6
bec39cab
AC
6456else
6457 if test -n "$ac_ct_AR"; then
6458 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6459else
6460as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6461for as_dir in $PATH
6462do
6463 IFS=$as_save_IFS
6464 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6465 for ac_exec_ext in '' $ac_executable_extensions; do
6466 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6467 ac_cv_prog_ac_ct_AR="ar"
81ecdfbb 6468 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6469 break 2
6470 fi
6471done
81ecdfbb
RW
6472 done
6473IFS=$as_save_IFS
bec39cab
AC
6474
6475fi
6476fi
6477ac_ct_AR=$ac_cv_prog_ac_ct_AR
6478if test -n "$ac_ct_AR"; then
81ecdfbb
RW
6479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6480$as_echo "$ac_ct_AR" >&6; }
bec39cab 6481else
81ecdfbb
RW
6482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6483$as_echo "no" >&6; }
bec39cab
AC
6484fi
6485
81ecdfbb
RW
6486 if test "x$ac_ct_AR" = x; then
6487 AR=""
6488 else
6489 case $cross_compiling:$ac_tool_warned in
6490yes:)
6491{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6492$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6493ac_tool_warned=yes ;;
6494esac
6495 AR=$ac_ct_AR
6496 fi
bec39cab
AC
6497else
6498 AR="$ac_cv_prog_AR"
6499fi
6500
6501if test -n "$ac_tool_prefix"; then
6502 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
6503set dummy ${ac_tool_prefix}dlltool; ac_word=$2
81ecdfbb
RW
6504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6505$as_echo_n "checking for $ac_word... " >&6; }
6506if test "${ac_cv_prog_DLLTOOL+set}" = set; then :
6507 $as_echo_n "(cached) " >&6
bec39cab
AC
6508else
6509 if test -n "$DLLTOOL"; then
6510 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
6511else
6512as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6513for as_dir in $PATH
6514do
6515 IFS=$as_save_IFS
6516 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6517 for ac_exec_ext in '' $ac_executable_extensions; do
6518 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6519 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
81ecdfbb 6520 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6521 break 2
6522 fi
6523done
81ecdfbb
RW
6524 done
6525IFS=$as_save_IFS
bec39cab
AC
6526
6527fi
6528fi
6529DLLTOOL=$ac_cv_prog_DLLTOOL
6530if test -n "$DLLTOOL"; then
81ecdfbb
RW
6531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
6532$as_echo "$DLLTOOL" >&6; }
bec39cab 6533else
81ecdfbb
RW
6534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6535$as_echo "no" >&6; }
bec39cab
AC
6536fi
6537
81ecdfbb 6538
bec39cab
AC
6539fi
6540if test -z "$ac_cv_prog_DLLTOOL"; then
6541 ac_ct_DLLTOOL=$DLLTOOL
6542 # Extract the first word of "dlltool", so it can be a program name with args.
6543set dummy dlltool; ac_word=$2
81ecdfbb
RW
6544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6545$as_echo_n "checking for $ac_word... " >&6; }
6546if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then :
6547 $as_echo_n "(cached) " >&6
bec39cab
AC
6548else
6549 if test -n "$ac_ct_DLLTOOL"; then
6550 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
6551else
6552as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6553for as_dir in $PATH
6554do
6555 IFS=$as_save_IFS
6556 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6557 for ac_exec_ext in '' $ac_executable_extensions; do
6558 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6559 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
81ecdfbb 6560 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6561 break 2
6562 fi
6563done
81ecdfbb
RW
6564 done
6565IFS=$as_save_IFS
bec39cab
AC
6566
6567fi
6568fi
6569ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
6570if test -n "$ac_ct_DLLTOOL"; then
81ecdfbb
RW
6571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
6572$as_echo "$ac_ct_DLLTOOL" >&6; }
bec39cab 6573else
81ecdfbb
RW
6574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6575$as_echo "no" >&6; }
bec39cab
AC
6576fi
6577
81ecdfbb
RW
6578 if test "x$ac_ct_DLLTOOL" = x; then
6579 DLLTOOL=""
6580 else
6581 case $cross_compiling:$ac_tool_warned in
6582yes:)
6583{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6584$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6585ac_tool_warned=yes ;;
6586esac
6587 DLLTOOL=$ac_ct_DLLTOOL
6588 fi
bec39cab
AC
6589else
6590 DLLTOOL="$ac_cv_prog_DLLTOOL"
6591fi
6592
6593if test -n "$ac_tool_prefix"; then
6594 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
6595set dummy ${ac_tool_prefix}windres; ac_word=$2
81ecdfbb
RW
6596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6597$as_echo_n "checking for $ac_word... " >&6; }
6598if test "${ac_cv_prog_WINDRES+set}" = set; then :
6599 $as_echo_n "(cached) " >&6
bec39cab
AC
6600else
6601 if test -n "$WINDRES"; then
6602 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
6603else
6604as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6605for as_dir in $PATH
6606do
6607 IFS=$as_save_IFS
6608 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6609 for ac_exec_ext in '' $ac_executable_extensions; do
6610 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6611 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
81ecdfbb 6612 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6613 break 2
6614 fi
6615done
81ecdfbb
RW
6616 done
6617IFS=$as_save_IFS
bec39cab
AC
6618
6619fi
6620fi
6621WINDRES=$ac_cv_prog_WINDRES
6622if test -n "$WINDRES"; then
81ecdfbb
RW
6623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
6624$as_echo "$WINDRES" >&6; }
bec39cab 6625else
81ecdfbb
RW
6626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6627$as_echo "no" >&6; }
bec39cab
AC
6628fi
6629
81ecdfbb 6630
bec39cab
AC
6631fi
6632if test -z "$ac_cv_prog_WINDRES"; then
6633 ac_ct_WINDRES=$WINDRES
6634 # Extract the first word of "windres", so it can be a program name with args.
6635set dummy windres; ac_word=$2
81ecdfbb
RW
6636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6637$as_echo_n "checking for $ac_word... " >&6; }
6638if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then :
6639 $as_echo_n "(cached) " >&6
bec39cab
AC
6640else
6641 if test -n "$ac_ct_WINDRES"; then
6642 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
6643else
6644as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6645for as_dir in $PATH
6646do
6647 IFS=$as_save_IFS
6648 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6649 for ac_exec_ext in '' $ac_executable_extensions; do
6650 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6651 ac_cv_prog_ac_ct_WINDRES="windres"
81ecdfbb 6652 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6653 break 2
6654 fi
6655done
81ecdfbb
RW
6656 done
6657IFS=$as_save_IFS
bec39cab
AC
6658
6659fi
6660fi
6661ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
6662if test -n "$ac_ct_WINDRES"; then
81ecdfbb
RW
6663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
6664$as_echo "$ac_ct_WINDRES" >&6; }
bec39cab 6665else
81ecdfbb
RW
6666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6667$as_echo "no" >&6; }
c906108c 6668fi
bec39cab 6669
81ecdfbb
RW
6670 if test "x$ac_ct_WINDRES" = x; then
6671 WINDRES=""
6672 else
6673 case $cross_compiling:$ac_tool_warned in
6674yes:)
6675{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6676$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6677ac_tool_warned=yes ;;
6678esac
6679 WINDRES=$ac_ct_WINDRES
6680 fi
c906108c 6681else
bec39cab 6682 WINDRES="$ac_cv_prog_WINDRES"
c906108c
SS
6683fi
6684
bec39cab 6685
036c3acb
TS
6686case $host_os in
6687 gnu*)
6688 # Needed for GNU Hurd hosts.
6689 if test -n "$ac_tool_prefix"; then
bec39cab
AC
6690 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
6691set dummy ${ac_tool_prefix}mig; ac_word=$2
81ecdfbb
RW
6692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6693$as_echo_n "checking for $ac_word... " >&6; }
6694if test "${ac_cv_prog_MIG+set}" = set; then :
6695 $as_echo_n "(cached) " >&6
c906108c 6696else
bec39cab
AC
6697 if test -n "$MIG"; then
6698 ac_cv_prog_MIG="$MIG" # Let the user override the test.
6699else
6700as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6701for as_dir in $PATH
6702do
6703 IFS=$as_save_IFS
6704 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6705 for ac_exec_ext in '' $ac_executable_extensions; do
6706 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6707 ac_cv_prog_MIG="${ac_tool_prefix}mig"
81ecdfbb 6708 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6709 break 2
6710 fi
6711done
81ecdfbb
RW
6712 done
6713IFS=$as_save_IFS
bec39cab 6714
c906108c 6715fi
bec39cab
AC
6716fi
6717MIG=$ac_cv_prog_MIG
6718if test -n "$MIG"; then
81ecdfbb
RW
6719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
6720$as_echo "$MIG" >&6; }
c906108c 6721else
81ecdfbb
RW
6722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6723$as_echo "no" >&6; }
c906108c
SS
6724fi
6725
81ecdfbb 6726
bec39cab
AC
6727fi
6728if test -z "$ac_cv_prog_MIG"; then
6729 ac_ct_MIG=$MIG
6730 # Extract the first word of "mig", so it can be a program name with args.
6731set dummy mig; ac_word=$2
81ecdfbb
RW
6732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6733$as_echo_n "checking for $ac_word... " >&6; }
6734if test "${ac_cv_prog_ac_ct_MIG+set}" = set; then :
6735 $as_echo_n "(cached) " >&6
bec39cab
AC
6736else
6737 if test -n "$ac_ct_MIG"; then
6738 ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
6739else
6740as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6741for as_dir in $PATH
6742do
6743 IFS=$as_save_IFS
6744 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6745 for ac_exec_ext in '' $ac_executable_extensions; do
6746 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6747 ac_cv_prog_ac_ct_MIG="mig"
81ecdfbb 6748 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6749 break 2
6750 fi
6751done
81ecdfbb
RW
6752 done
6753IFS=$as_save_IFS
c906108c 6754
bec39cab
AC
6755fi
6756fi
6757ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
6758if test -n "$ac_ct_MIG"; then
81ecdfbb
RW
6759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
6760$as_echo "$ac_ct_MIG" >&6; }
bec39cab 6761else
81ecdfbb
RW
6762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6763$as_echo "no" >&6; }
bec39cab 6764fi
c906108c 6765
81ecdfbb
RW
6766 if test "x$ac_ct_MIG" = x; then
6767 MIG=""
6768 else
6769 case $cross_compiling:$ac_tool_warned in
6770yes:)
6771{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6772$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6773ac_tool_warned=yes ;;
6774esac
6775 MIG=$ac_ct_MIG
6776 fi
bec39cab
AC
6777else
6778 MIG="$ac_cv_prog_MIG"
6779fi
c906108c 6780
036c3acb
TS
6781 if test x"$MIG" = x; then
6782 as_fn_error "MIG not found but required for $host hosts" "$LINENO" 5
6783 fi
6784 ;;
6785esac
c906108c 6786
bec39cab
AC
6787# ---------------------- #
6788# Checks for libraries. #
6789# ---------------------- #
c906108c 6790
bec39cab 6791# We might need to link with -lm; most simulators need it.
81ecdfbb
RW
6792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
6793$as_echo_n "checking for main in -lm... " >&6; }
6794if test "${ac_cv_lib_m_main+set}" = set; then :
6795 $as_echo_n "(cached) " >&6
bec39cab
AC
6796else
6797 ac_check_lib_save_LIBS=$LIBS
6798LIBS="-lm $LIBS"
81ecdfbb 6799cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6800/* end confdefs.h. */
c906108c 6801
c906108c 6802
bec39cab
AC
6803int
6804main ()
6805{
81ecdfbb 6806return main ();
bec39cab
AC
6807 ;
6808 return 0;
6809}
6810_ACEOF
81ecdfbb 6811if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
6812 ac_cv_lib_m_main=yes
6813else
81ecdfbb 6814 ac_cv_lib_m_main=no
bec39cab 6815fi
81ecdfbb
RW
6816rm -f core conftest.err conftest.$ac_objext \
6817 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
6818LIBS=$ac_check_lib_save_LIBS
6819fi
81ecdfbb
RW
6820{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
6821$as_echo "$ac_cv_lib_m_main" >&6; }
6822if test "x$ac_cv_lib_m_main" = x""yes; then :
bec39cab
AC
6823 cat >>confdefs.h <<_ACEOF
6824#define HAVE_LIBM 1
6825_ACEOF
6826
6827 LIBS="-lm $LIBS"
c906108c 6828
c906108c 6829fi
bec39cab
AC
6830
6831
6832# We need to link with -lw to get `wctype' on Solaris before Solaris
6833# 2.6. Solaris 2.6 and beyond have this function in libc, and have a
6834# libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
6835# is known to have this problem). Therefore we avoid libw if we can.
81ecdfbb
RW
6836ac_fn_c_check_func "$LINENO" "wctype" "ac_cv_func_wctype"
6837if test "x$ac_cv_func_wctype" = x""yes; then :
bec39cab 6838
c906108c 6839else
81ecdfbb
RW
6840 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype in -lw" >&5
6841$as_echo_n "checking for wctype in -lw... " >&6; }
6842if test "${ac_cv_lib_w_wctype+set}" = set; then :
6843 $as_echo_n "(cached) " >&6
bec39cab
AC
6844else
6845 ac_check_lib_save_LIBS=$LIBS
6846LIBS="-lw $LIBS"
81ecdfbb 6847cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6848/* end confdefs.h. */
c906108c 6849
81ecdfbb
RW
6850/* Override any GCC internal prototype to avoid an error.
6851 Use char because int might match the return type of a GCC
6852 builtin and then its argument prototype would still apply. */
bec39cab
AC
6853#ifdef __cplusplus
6854extern "C"
6855#endif
bec39cab
AC
6856char wctype ();
6857int
6858main ()
6859{
81ecdfbb 6860return wctype ();
bec39cab
AC
6861 ;
6862 return 0;
6863}
6864_ACEOF
81ecdfbb 6865if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
6866 ac_cv_lib_w_wctype=yes
6867else
81ecdfbb 6868 ac_cv_lib_w_wctype=no
bec39cab 6869fi
81ecdfbb
RW
6870rm -f core conftest.err conftest.$ac_objext \
6871 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
6872LIBS=$ac_check_lib_save_LIBS
6873fi
81ecdfbb
RW
6874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_w_wctype" >&5
6875$as_echo "$ac_cv_lib_w_wctype" >&6; }
6876if test "x$ac_cv_lib_w_wctype" = x""yes; then :
bec39cab
AC
6877 cat >>confdefs.h <<_ACEOF
6878#define HAVE_LIBW 1
6879_ACEOF
c906108c 6880
bec39cab 6881 LIBS="-lw $LIBS"
c906108c 6882
bec39cab 6883fi
c906108c 6884
bec39cab 6885fi
c906108c 6886
ddc9cd0f 6887
bec39cab 6888# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
81ecdfbb
RW
6889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
6890$as_echo_n "checking for library containing gethostbyname... " >&6; }
6891if test "${ac_cv_search_gethostbyname+set}" = set; then :
6892 $as_echo_n "(cached) " >&6
bec39cab
AC
6893else
6894 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6895cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6896/* end confdefs.h. */
ddc9cd0f 6897
81ecdfbb
RW
6898/* Override any GCC internal prototype to avoid an error.
6899 Use char because int might match the return type of a GCC
6900 builtin and then its argument prototype would still apply. */
bec39cab
AC
6901#ifdef __cplusplus
6902extern "C"
6903#endif
bec39cab
AC
6904char gethostbyname ();
6905int
6906main ()
6907{
81ecdfbb 6908return gethostbyname ();
bec39cab
AC
6909 ;
6910 return 0;
6911}
6912_ACEOF
81ecdfbb
RW
6913for ac_lib in '' nsl; do
6914 if test -z "$ac_lib"; then
6915 ac_res="none required"
6916 else
6917 ac_res=-l$ac_lib
b4e70030 6918 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
6919 fi
6920 if ac_fn_c_try_link "$LINENO"; then :
6921 ac_cv_search_gethostbyname=$ac_res
6922fi
6923rm -f core conftest.err conftest.$ac_objext \
6924 conftest$ac_exeext
6925 if test "${ac_cv_search_gethostbyname+set}" = set; then :
6926 break
6927fi
6928done
6929if test "${ac_cv_search_gethostbyname+set}" = set; then :
ddc9cd0f 6930
bec39cab 6931else
81ecdfbb 6932 ac_cv_search_gethostbyname=no
bec39cab 6933fi
81ecdfbb 6934rm conftest.$ac_ext
bec39cab
AC
6935LIBS=$ac_func_search_save_LIBS
6936fi
81ecdfbb
RW
6937{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
6938$as_echo "$ac_cv_search_gethostbyname" >&6; }
6939ac_res=$ac_cv_search_gethostbyname
6940if test "$ac_res" != no; then :
6941 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
96baa820 6942
bec39cab 6943fi
96baa820 6944
c906108c 6945
b4e70030 6946# Some systems (e.g. Solaris) have `socketpair' in libsocket.
81ecdfbb
RW
6947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
6948$as_echo_n "checking for library containing socketpair... " >&6; }
6949if test "${ac_cv_search_socketpair+set}" = set; then :
6950 $as_echo_n "(cached) " >&6
b4e70030
JB
6951else
6952 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6953cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
6954/* end confdefs.h. */
6955
81ecdfbb
RW
6956/* Override any GCC internal prototype to avoid an error.
6957 Use char because int might match the return type of a GCC
6958 builtin and then its argument prototype would still apply. */
b4e70030
JB
6959#ifdef __cplusplus
6960extern "C"
6961#endif
b4e70030
JB
6962char socketpair ();
6963int
6964main ()
6965{
81ecdfbb 6966return socketpair ();
b4e70030
JB
6967 ;
6968 return 0;
6969}
6970_ACEOF
81ecdfbb
RW
6971for ac_lib in '' socket; do
6972 if test -z "$ac_lib"; then
6973 ac_res="none required"
6974 else
6975 ac_res=-l$ac_lib
b4e70030 6976 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
6977 fi
6978 if ac_fn_c_try_link "$LINENO"; then :
6979 ac_cv_search_socketpair=$ac_res
6980fi
6981rm -f core conftest.err conftest.$ac_objext \
6982 conftest$ac_exeext
6983 if test "${ac_cv_search_socketpair+set}" = set; then :
6984 break
6985fi
6986done
6987if test "${ac_cv_search_socketpair+set}" = set; then :
b4e70030 6988
b4e70030 6989else
81ecdfbb 6990 ac_cv_search_socketpair=no
b4e70030 6991fi
81ecdfbb 6992rm conftest.$ac_ext
b4e70030
JB
6993LIBS=$ac_func_search_save_LIBS
6994fi
81ecdfbb
RW
6995{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
6996$as_echo "$ac_cv_search_socketpair" >&6; }
6997ac_res=$ac_cv_search_socketpair
6998if test "$ac_res" != no; then :
6999 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
b4e70030
JB
7000
7001fi
7002
7003
233a11ab 7004# Link in zlib if we can. This allows us to read compressed debug sections.
b040ad30 7005
711a72d3 7006 # Use the system's zlib library.
39f3de7c
L
7007 zlibdir="-L\$(top_builddir)/../zlib"
7008 zlibinc="-I\$(top_srcdir)/../zlib"
b040ad30 7009
711a72d3
L
7010# Check whether --with-system-zlib was given.
7011if test "${with_system_zlib+set}" = set; then :
afa59b79
L
7012 withval=$with_system_zlib; if test x$with_system_zlib = xyes ; then
7013 zlibdir=
7014 zlibinc=
7015 fi
b040ad30 7016
233a11ab 7017fi
233a11ab 7018
233a11ab 7019
233a11ab 7020
b040ad30 7021
233a11ab 7022
25268153 7023# On FreeBSD we may need libutil for kinfo_getvmmap (used by fbsd-nat.c).
37773e78 7024# On GNU/kFreeBSD systems, FreeBSD libutil is renamed to libutil-freebsd.
25268153
JB
7025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getvmmap" >&5
7026$as_echo_n "checking for library containing kinfo_getvmmap... " >&6; }
7027if test "${ac_cv_search_kinfo_getvmmap+set}" = set; then :
7028 $as_echo_n "(cached) " >&6
7029else
7030 ac_func_search_save_LIBS=$LIBS
7031cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7032/* end confdefs.h. */
7033
7034/* Override any GCC internal prototype to avoid an error.
7035 Use char because int might match the return type of a GCC
7036 builtin and then its argument prototype would still apply. */
7037#ifdef __cplusplus
7038extern "C"
7039#endif
7040char kinfo_getvmmap ();
7041int
7042main ()
7043{
7044return kinfo_getvmmap ();
7045 ;
7046 return 0;
7047}
7048_ACEOF
37773e78 7049for ac_lib in '' util util-freebsd; do
25268153
JB
7050 if test -z "$ac_lib"; then
7051 ac_res="none required"
7052 else
7053 ac_res=-l$ac_lib
7054 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7055 fi
7056 if ac_fn_c_try_link "$LINENO"; then :
7057 ac_cv_search_kinfo_getvmmap=$ac_res
7058fi
7059rm -f core conftest.err conftest.$ac_objext \
7060 conftest$ac_exeext
7061 if test "${ac_cv_search_kinfo_getvmmap+set}" = set; then :
7062 break
7063fi
7064done
7065if test "${ac_cv_search_kinfo_getvmmap+set}" = set; then :
7066
7067else
7068 ac_cv_search_kinfo_getvmmap=no
7069fi
7070rm conftest.$ac_ext
7071LIBS=$ac_func_search_save_LIBS
7072fi
7073{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getvmmap" >&5
7074$as_echo "$ac_cv_search_kinfo_getvmmap" >&6; }
7075ac_res=$ac_cv_search_kinfo_getvmmap
7076if test "$ac_res" != no; then :
7077 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7078
7079$as_echo "#define HAVE_KINFO_GETVMMAP 1" >>confdefs.h
7080
7081fi
7082
7083
77f120bf 7084
016a3251
DD
7085 if test "X$prefix" = "XNONE"; then
7086 acl_final_prefix="$ac_default_prefix"
7087 else
7088 acl_final_prefix="$prefix"
7089 fi
7090 if test "X$exec_prefix" = "XNONE"; then
7091 acl_final_exec_prefix='${prefix}'
7092 else
7093 acl_final_exec_prefix="$exec_prefix"
7094 fi
7095 acl_save_prefix="$prefix"
7096 prefix="$acl_final_prefix"
7097 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
7098 prefix="$acl_save_prefix"
7099
7100
7101# Check whether --with-gnu-ld was given.
7102if test "${with_gnu_ld+set}" = set; then :
7103 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
7104else
7105 with_gnu_ld=no
7106fi
7107
7108# Prepare PATH_SEPARATOR.
7109# The user is always right.
7110if test "${PATH_SEPARATOR+set}" != set; then
7111 echo "#! /bin/sh" >conf$$.sh
7112 echo "exit 0" >>conf$$.sh
7113 chmod +x conf$$.sh
7114 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
7115 PATH_SEPARATOR=';'
7116 else
7117 PATH_SEPARATOR=:
7118 fi
7119 rm -f conf$$.sh
7120fi
7121ac_prog=ld
7122if test "$GCC" = yes; then
7123 # Check if gcc -print-prog-name=ld gives a path.
7124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
7125$as_echo_n "checking for ld used by GCC... " >&6; }
7126 case $host in
7127 *-*-mingw*)
7128 # gcc leaves a trailing carriage return which upsets mingw
7129 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
7130 *)
7131 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
7132 esac
7133 case $ac_prog in
7134 # Accept absolute paths.
7135 [\\/]* | [A-Za-z]:[\\/]*)
7136 re_direlt='/[^/][^/]*/\.\./'
7137 # Canonicalize the path of ld
7138 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
7139 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
7140 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
7141 done
7142 test -z "$LD" && LD="$ac_prog"
7143 ;;
7144 "")
7145 # If it fails, then pretend we aren't using GCC.
7146 ac_prog=ld
7147 ;;
7148 *)
7149 # If it is relative, then search for the first ld in PATH.
7150 with_gnu_ld=unknown
7151 ;;
7152 esac
7153elif test "$with_gnu_ld" = yes; then
7154 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
7155$as_echo_n "checking for GNU ld... " >&6; }
7156else
7157 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
7158$as_echo_n "checking for non-GNU ld... " >&6; }
7159fi
7160if test "${acl_cv_path_LD+set}" = set; then :
7161 $as_echo_n "(cached) " >&6
7162else
7163 if test -z "$LD"; then
7164 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
7165 for ac_dir in $PATH; do
7166 test -z "$ac_dir" && ac_dir=.
7167 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
7168 acl_cv_path_LD="$ac_dir/$ac_prog"
7169 # Check to see if the program is GNU ld. I'd rather use --version,
7170 # but apparently some GNU ld's only accept -v.
7171 # Break only if it was the GNU/non-GNU ld that we prefer.
7172 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
7173 test "$with_gnu_ld" != no && break
7174 else
7175 test "$with_gnu_ld" != yes && break
7176 fi
7177 fi
7178 done
7179 IFS="$ac_save_ifs"
7180else
7181 acl_cv_path_LD="$LD" # Let the user override the test with a path.
7182fi
7183fi
7184
7185LD="$acl_cv_path_LD"
7186if test -n "$LD"; then
7187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
7188$as_echo "$LD" >&6; }
7189else
7190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7191$as_echo "no" >&6; }
7192fi
7193test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
7194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
7195$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
7196if test "${acl_cv_prog_gnu_ld+set}" = set; then :
7197 $as_echo_n "(cached) " >&6
7198else
7199 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
7200if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
7201 acl_cv_prog_gnu_ld=yes
7202else
7203 acl_cv_prog_gnu_ld=no
7204fi
7205fi
7206{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
7207$as_echo "$acl_cv_prog_gnu_ld" >&6; }
7208with_gnu_ld=$acl_cv_prog_gnu_ld
7209
7210
7211
7212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
7213$as_echo_n "checking for shared library run path origin... " >&6; }
7214if test "${acl_cv_rpath+set}" = set; then :
7215 $as_echo_n "(cached) " >&6
7216else
7217
7218 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
7219 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
7220 . ./conftest.sh
7221 rm -f ./conftest.sh
7222 acl_cv_rpath=done
7223
7224fi
7225{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
7226$as_echo "$acl_cv_rpath" >&6; }
7227 wl="$acl_cv_wl"
7228 libext="$acl_cv_libext"
7229 shlibext="$acl_cv_shlibext"
7230 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
7231 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
7232 hardcode_direct="$acl_cv_hardcode_direct"
7233 hardcode_minus_L="$acl_cv_hardcode_minus_L"
7234 # Check whether --enable-rpath was given.
7235if test "${enable_rpath+set}" = set; then :
7236 enableval=$enable_rpath; :
7237else
7238 enable_rpath=yes
7239fi
7240
7241
7242
7243
7244
7245
7246
7247
7248 use_additional=yes
7249
7250 acl_save_prefix="$prefix"
7251 prefix="$acl_final_prefix"
7252 acl_save_exec_prefix="$exec_prefix"
7253 exec_prefix="$acl_final_exec_prefix"
7254
7255 eval additional_includedir=\"$includedir\"
7256 eval additional_libdir=\"$libdir\"
7257
7258 exec_prefix="$acl_save_exec_prefix"
7259 prefix="$acl_save_prefix"
77f120bf 7260
6c7a06a3 7261
81ecdfbb
RW
7262# Check whether --with-libiconv-prefix was given.
7263if test "${with_libiconv_prefix+set}" = set; then :
7264 withval=$with_libiconv_prefix;
016a3251
DD
7265 if test "X$withval" = "Xno"; then
7266 use_additional=no
7267 else
7268 if test "X$withval" = "X"; then
7269
7270 acl_save_prefix="$prefix"
7271 prefix="$acl_final_prefix"
7272 acl_save_exec_prefix="$exec_prefix"
7273 exec_prefix="$acl_final_exec_prefix"
7274
7275 eval additional_includedir=\"$includedir\"
7276 eval additional_libdir=\"$libdir\"
7277
7278 exec_prefix="$acl_save_exec_prefix"
7279 prefix="$acl_save_prefix"
7280
7281 else
7282 additional_includedir="$withval/include"
7283 additional_libdir="$withval/lib"
7284 fi
7285 fi
6c7a06a3 7286
81ecdfbb
RW
7287fi
7288
016a3251
DD
7289 LIBICONV=
7290 LTLIBICONV=
7291 INCICONV=
7292 rpathdirs=
7293 ltrpathdirs=
7294 names_already_handled=
7295 names_next_round='iconv '
7296 while test -n "$names_next_round"; do
7297 names_this_round="$names_next_round"
7298 names_next_round=
7299 for name in $names_this_round; do
7300 already_handled=
7301 for n in $names_already_handled; do
7302 if test "$n" = "$name"; then
7303 already_handled=yes
7304 break
7305 fi
7306 done
7307 if test -z "$already_handled"; then
7308 names_already_handled="$names_already_handled $name"
7309 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
7310 eval value=\"\$HAVE_LIB$uppername\"
7311 if test -n "$value"; then
7312 if test "$value" = yes; then
7313 eval value=\"\$LIB$uppername\"
7314 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
7315 eval value=\"\$LTLIB$uppername\"
7316 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
7317 else
7318 :
7319 fi
7320 else
7321 found_dir=
7322 found_la=
7323 found_so=
7324 found_a=
7325 if test $use_additional = yes; then
7326 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
7327 found_dir="$additional_libdir"
7328 found_so="$additional_libdir/lib$name.$shlibext"
7329 if test -f "$additional_libdir/lib$name.la"; then
7330 found_la="$additional_libdir/lib$name.la"
7331 fi
7332 else
7333 if test -f "$additional_libdir/lib$name.$libext"; then
7334 found_dir="$additional_libdir"
7335 found_a="$additional_libdir/lib$name.$libext"
7336 if test -f "$additional_libdir/lib$name.la"; then
7337 found_la="$additional_libdir/lib$name.la"
7338 fi
7339 fi
7340 fi
7341 fi
7342 if test "X$found_dir" = "X"; then
7343 for x in $LDFLAGS $LTLIBICONV; do
7344
7345 acl_save_prefix="$prefix"
7346 prefix="$acl_final_prefix"
7347 acl_save_exec_prefix="$exec_prefix"
7348 exec_prefix="$acl_final_exec_prefix"
7349 eval x=\"$x\"
7350 exec_prefix="$acl_save_exec_prefix"
7351 prefix="$acl_save_prefix"
7352
7353 case "$x" in
7354 -L*)
7355 dir=`echo "X$x" | sed -e 's/^X-L//'`
7356 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
7357 found_dir="$dir"
7358 found_so="$dir/lib$name.$shlibext"
7359 if test -f "$dir/lib$name.la"; then
7360 found_la="$dir/lib$name.la"
7361 fi
7362 else
7363 if test -f "$dir/lib$name.$libext"; then
7364 found_dir="$dir"
7365 found_a="$dir/lib$name.$libext"
7366 if test -f "$dir/lib$name.la"; then
7367 found_la="$dir/lib$name.la"
7368 fi
7369 fi
7370 fi
7371 ;;
7372 esac
7373 if test "X$found_dir" != "X"; then
7374 break
7375 fi
7376 done
7377 fi
7378 if test "X$found_dir" != "X"; then
7379 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
7380 if test "X$found_so" != "X"; then
7381 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
7382 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
7383 else
7384 haveit=
7385 for x in $ltrpathdirs; do
7386 if test "X$x" = "X$found_dir"; then
7387 haveit=yes
7388 break
7389 fi
7390 done
7391 if test -z "$haveit"; then
7392 ltrpathdirs="$ltrpathdirs $found_dir"
7393 fi
7394 if test "$hardcode_direct" = yes; then
7395 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
7396 else
7397 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
7398 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
7399 haveit=
7400 for x in $rpathdirs; do
7401 if test "X$x" = "X$found_dir"; then
7402 haveit=yes
7403 break
7404 fi
7405 done
7406 if test -z "$haveit"; then
7407 rpathdirs="$rpathdirs $found_dir"
7408 fi
7409 else
7410 haveit=
7411 for x in $LDFLAGS $LIBICONV; do
7412
7413 acl_save_prefix="$prefix"
7414 prefix="$acl_final_prefix"
7415 acl_save_exec_prefix="$exec_prefix"
7416 exec_prefix="$acl_final_exec_prefix"
7417 eval x=\"$x\"
7418 exec_prefix="$acl_save_exec_prefix"
7419 prefix="$acl_save_prefix"
7420
7421 if test "X$x" = "X-L$found_dir"; then
7422 haveit=yes
7423 break
7424 fi
7425 done
7426 if test -z "$haveit"; then
7427 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
7428 fi
7429 if test "$hardcode_minus_L" != no; then
7430 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
7431 else
7432 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
7433 fi
7434 fi
7435 fi
7436 fi
7437 else
7438 if test "X$found_a" != "X"; then
7439 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
7440 else
7441 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
7442 fi
7443 fi
7444 additional_includedir=
7445 case "$found_dir" in
7446 */lib | */lib/)
7447 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
7448 additional_includedir="$basedir/include"
7449 ;;
7450 esac
7451 if test "X$additional_includedir" != "X"; then
7452 if test "X$additional_includedir" != "X/usr/include"; then
7453 haveit=
7454 if test "X$additional_includedir" = "X/usr/local/include"; then
7455 if test -n "$GCC"; then
7456 case $host_os in
7457 linux*) haveit=yes;;
7458 esac
7459 fi
7460 fi
7461 if test -z "$haveit"; then
7462 for x in $CPPFLAGS $INCICONV; do
7463
7464 acl_save_prefix="$prefix"
7465 prefix="$acl_final_prefix"
7466 acl_save_exec_prefix="$exec_prefix"
7467 exec_prefix="$acl_final_exec_prefix"
7468 eval x=\"$x\"
7469 exec_prefix="$acl_save_exec_prefix"
7470 prefix="$acl_save_prefix"
7471
7472 if test "X$x" = "X-I$additional_includedir"; then
7473 haveit=yes
7474 break
7475 fi
7476 done
7477 if test -z "$haveit"; then
7478 if test -d "$additional_includedir"; then
7479 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
7480 fi
7481 fi
7482 fi
7483 fi
7484 fi
7485 if test -n "$found_la"; then
7486 save_libdir="$libdir"
7487 case "$found_la" in
7488 */* | *\\*) . "$found_la" ;;
7489 *) . "./$found_la" ;;
7490 esac
7491 libdir="$save_libdir"
7492 for dep in $dependency_libs; do
7493 case "$dep" in
7494 -L*)
7495 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
7496 if test "X$additional_libdir" != "X/usr/lib"; then
7497 haveit=
7498 if test "X$additional_libdir" = "X/usr/local/lib"; then
7499 if test -n "$GCC"; then
7500 case $host_os in
7501 linux*) haveit=yes;;
7502 esac
7503 fi
7504 fi
7505 if test -z "$haveit"; then
7506 haveit=
7507 for x in $LDFLAGS $LIBICONV; do
7508
7509 acl_save_prefix="$prefix"
7510 prefix="$acl_final_prefix"
7511 acl_save_exec_prefix="$exec_prefix"
7512 exec_prefix="$acl_final_exec_prefix"
7513 eval x=\"$x\"
7514 exec_prefix="$acl_save_exec_prefix"
7515 prefix="$acl_save_prefix"
7516
7517 if test "X$x" = "X-L$additional_libdir"; then
7518 haveit=yes
7519 break
7520 fi
7521 done
7522 if test -z "$haveit"; then
7523 if test -d "$additional_libdir"; then
7524 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
7525 fi
7526 fi
7527 haveit=
7528 for x in $LDFLAGS $LTLIBICONV; do
7529
7530 acl_save_prefix="$prefix"
7531 prefix="$acl_final_prefix"
7532 acl_save_exec_prefix="$exec_prefix"
7533 exec_prefix="$acl_final_exec_prefix"
7534 eval x=\"$x\"
7535 exec_prefix="$acl_save_exec_prefix"
7536 prefix="$acl_save_prefix"
7537
7538 if test "X$x" = "X-L$additional_libdir"; then
7539 haveit=yes
7540 break
7541 fi
7542 done
7543 if test -z "$haveit"; then
7544 if test -d "$additional_libdir"; then
7545 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
7546 fi
7547 fi
7548 fi
7549 fi
7550 ;;
7551 -R*)
7552 dir=`echo "X$dep" | sed -e 's/^X-R//'`
7553 if test "$enable_rpath" != no; then
7554 haveit=
7555 for x in $rpathdirs; do
7556 if test "X$x" = "X$dir"; then
7557 haveit=yes
7558 break
7559 fi
7560 done
7561 if test -z "$haveit"; then
7562 rpathdirs="$rpathdirs $dir"
7563 fi
7564 haveit=
7565 for x in $ltrpathdirs; do
7566 if test "X$x" = "X$dir"; then
7567 haveit=yes
7568 break
7569 fi
7570 done
7571 if test -z "$haveit"; then
7572 ltrpathdirs="$ltrpathdirs $dir"
7573 fi
7574 fi
7575 ;;
7576 -l*)
7577 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
7578 ;;
7579 *.la)
7580 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
7581 ;;
7582 *)
7583 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
7584 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
7585 ;;
7586 esac
7587 done
7588 fi
7589 else
7590 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
7591 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
7592 fi
7593 fi
7594 fi
7595 done
7596 done
7597 if test "X$rpathdirs" != "X"; then
7598 if test -n "$hardcode_libdir_separator"; then
7599 alldirs=
7600 for found_dir in $rpathdirs; do
7601 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
7602 done
7603 acl_save_libdir="$libdir"
7604 libdir="$alldirs"
7605 eval flag=\"$hardcode_libdir_flag_spec\"
7606 libdir="$acl_save_libdir"
7607 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
7608 else
7609 for found_dir in $rpathdirs; do
7610 acl_save_libdir="$libdir"
7611 libdir="$found_dir"
7612 eval flag=\"$hardcode_libdir_flag_spec\"
7613 libdir="$acl_save_libdir"
7614 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
7615 done
7616 fi
7617 fi
7618 if test "X$ltrpathdirs" != "X"; then
7619 for found_dir in $ltrpathdirs; do
7620 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
7621 done
7622 fi
7623
7624
7625
7626
7627
6c7a06a3 7628
6c7a06a3 7629
81ecdfbb
RW
7630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
7631$as_echo_n "checking for iconv... " >&6; }
7632if test "${am_cv_func_iconv+set}" = set; then :
7633 $as_echo_n "(cached) " >&6
d542061a 7634else
6c7a06a3
TT
7635
7636 am_cv_func_iconv="no, consider installing GNU libiconv"
7637 am_cv_lib_iconv=no
016a3251
DD
7638 am_save_CPPFLAGS="$CPPFLAGS"
7639 CPPFLAGS="$CPPFLAGS $INCICONV"
7640 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 7641/* end confdefs.h. */
6c7a06a3
TT
7642#include <stdlib.h>
7643#include <iconv.h>
d542061a
UW
7644int
7645main ()
7646{
6c7a06a3 7647iconv_t cd = iconv_open("","");
016a3251
DD
7648 iconv(cd,NULL,NULL,NULL,NULL);
7649 iconv_close(cd);
d542061a
UW
7650 ;
7651 return 0;
7652}
7653_ACEOF
81ecdfbb 7654if ac_fn_c_try_link "$LINENO"; then :
016a3251 7655 am_cv_func_iconv=yes
d542061a 7656fi
81ecdfbb
RW
7657rm -f core conftest.err conftest.$ac_objext \
7658 conftest$ac_exeext conftest.$ac_ext
016a3251 7659 CPPFLAGS="$am_save_CPPFLAGS"
94ae1714 7660
016a3251
DD
7661 if test "$am_cv_func_iconv" != yes && test -d ../libiconv; then
7662 for _libs in .libs _libs; do
7663 am_save_CPPFLAGS="$CPPFLAGS"
7664 am_save_LIBS="$LIBS"
7665 CPPFLAGS="$CPPFLAGS -I../libiconv/include"
7666 LIBS="$LIBS ../libiconv/lib/$_libs/libiconv.a"
7667 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 7668/* end confdefs.h. */
6c7a06a3
TT
7669#include <stdlib.h>
7670#include <iconv.h>
d542061a
UW
7671int
7672main ()
7673{
6c7a06a3 7674iconv_t cd = iconv_open("","");
016a3251
DD
7675 iconv(cd,NULL,NULL,NULL,NULL);
7676 iconv_close(cd);
d542061a
UW
7677 ;
7678 return 0;
7679}
7680_ACEOF
81ecdfbb 7681if ac_fn_c_try_link "$LINENO"; then :
016a3251
DD
7682 INCICONV="-I../libiconv/include"
7683 LIBICONV='${top_builddir}'/../libiconv/lib/$_libs/libiconv.a
7684 LTLIBICONV='${top_builddir}'/../libiconv/lib/libiconv.la
7685 am_cv_lib_iconv=yes
7686 am_cv_func_iconv=yes
d542061a 7687fi
81ecdfbb
RW
7688rm -f core conftest.err conftest.$ac_objext \
7689 conftest$ac_exeext conftest.$ac_ext
016a3251
DD
7690 CPPFLAGS="$am_save_CPPFLAGS"
7691 LIBS="$am_save_LIBS"
7692 if test "$am_cv_func_iconv" = "yes"; then
7693 break
7694 fi
7695 done
77f120bf 7696 fi
94ae1714 7697
4edb1e84 7698 if test "$am_cv_func_iconv" != yes; then
6c7a06a3 7699 am_save_CPPFLAGS="$CPPFLAGS"
4edb1e84 7700 am_save_LIBS="$LIBS"
016a3251
DD
7701 CPPFLAGS="$LIBS $INCICONV"
7702 LIBS="$LIBS $LIBICONV"
81ecdfbb 7703 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7704/* end confdefs.h. */
6c7a06a3
TT
7705#include <stdlib.h>
7706#include <iconv.h>
bec39cab
AC
7707int
7708main ()
7709{
6c7a06a3
TT
7710iconv_t cd = iconv_open("","");
7711 iconv(cd,NULL,NULL,NULL,NULL);
7712 iconv_close(cd);
bec39cab
AC
7713 ;
7714 return 0;
7715}
7716_ACEOF
81ecdfbb 7717if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 7718 am_cv_lib_iconv=yes
6c7a06a3 7719 am_cv_func_iconv=yes
627af7ea 7720fi
81ecdfbb
RW
7721rm -f core conftest.err conftest.$ac_objext \
7722 conftest$ac_exeext conftest.$ac_ext
fc3b640d 7723 CPPFLAGS="$am_save_CPPFLAGS"
016a3251 7724 LIBS="$am_save_LIBS"
6c7a06a3
TT
7725 fi
7726
7727fi
81ecdfbb
RW
7728{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
7729$as_echo "$am_cv_func_iconv" >&6; }
016a3251
DD
7730 if test "$am_cv_func_iconv" = yes; then
7731
7732$as_echo "#define HAVE_ICONV 1" >>confdefs.h
94ae1714 7733
016a3251 7734 fi
fc3b640d 7735 if test "$am_cv_lib_iconv" = yes; then
016a3251
DD
7736
7737 for element in $INCICONV; do
7738 haveit=
7739 for x in $CPPFLAGS; do
7740
7741 acl_save_prefix="$prefix"
7742 prefix="$acl_final_prefix"
7743 acl_save_exec_prefix="$exec_prefix"
7744 exec_prefix="$acl_final_exec_prefix"
7745 eval x=\"$x\"
7746 exec_prefix="$acl_save_exec_prefix"
7747 prefix="$acl_save_prefix"
7748
7749 if test "X$x" = "X$element"; then
7750 haveit=yes
7751 break
7752 fi
7753 done
7754 if test -z "$haveit"; then
7755 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
7756 fi
7757 done
7758
7759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
7760$as_echo_n "checking how to link with libiconv... " >&6; }
7761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
7762$as_echo "$LIBICONV" >&6; }
94ae1714 7763 else
016a3251
DD
7764 LIBICONV=
7765 LTLIBICONV=
fc3b640d 7766 fi
94ae1714 7767
6c7a06a3 7768
6c7a06a3 7769
016a3251 7770 if test "$am_cv_func_iconv" = yes; then
81ecdfbb
RW
7771 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
7772$as_echo_n "checking for iconv declaration... " >&6; }
7773 if test "${am_cv_proto_iconv+set}" = set; then :
7774 $as_echo_n "(cached) " >&6
6c7a06a3
TT
7775else
7776
81ecdfbb 7777 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
7778/* end confdefs.h. */
7779
6c7a06a3
TT
7780#include <stdlib.h>
7781#include <iconv.h>
7782extern
b4e70030 7783#ifdef __cplusplus
6c7a06a3 7784"C"
b4e70030 7785#endif
6c7a06a3
TT
7786#if defined(__STDC__) || defined(__cplusplus)
7787size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
7788#else
7789size_t iconv();
7790#endif
7791
b4e70030
JB
7792int
7793main ()
7794{
6c7a06a3 7795
b4e70030
JB
7796 ;
7797 return 0;
7798}
7799_ACEOF
81ecdfbb 7800if ac_fn_c_try_compile "$LINENO"; then :
6c7a06a3 7801 am_cv_proto_iconv_arg1=""
4e8d927d 7802else
81ecdfbb 7803 am_cv_proto_iconv_arg1="const"
b4e70030 7804fi
81ecdfbb 7805rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6c7a06a3
TT
7806 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);"
7807fi
7808
7809 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
81ecdfbb 7810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
6c7a06a3 7811 }$am_cv_proto_iconv" >&5
81ecdfbb
RW
7812$as_echo "${ac_t:-
7813 }$am_cv_proto_iconv" >&6; }
6c7a06a3
TT
7814
7815cat >>confdefs.h <<_ACEOF
7816#define ICONV_CONST $am_cv_proto_iconv_arg1
7817_ACEOF
7818
7819 fi
6c7a06a3
TT
7820
7821
478aac75
DE
7822# GDB may fork/exec the iconv program to get the list of supported character
7823# sets. Allow the user to specify where to find it.
7824# There are several factors affecting the choice of option name:
7825# - There is already --with-libiconv-prefix but we can't use it, it specifies
7826# the build-time location of libiconv files.
7827# - The program we need to find is iconv, which comes with glibc. The user
7828# doesn't necessarily have libiconv installed. Therefore naming this
7829# --with-libiconv-foo feels wrong.
7830# - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is
7831# defined to work on directories not files (though it really doesn't know
7832# the difference).
7833# - Calling this --with-iconv-prefix is perceived to cause too much confusion
7834# with --with-libiconv-prefix.
7835# Putting these together is why the option name is --with-iconv-bin.
7836
7837
7838# Check whether --with-iconv-bin was given.
7839if test "${with_iconv_bin+set}" = set; then :
7840 withval=$with_iconv_bin; iconv_bin="${withval}"
7841
7842cat >>confdefs.h <<_ACEOF
7843#define ICONV_BIN "${iconv_bin}"
7844_ACEOF
7845
7846
7847 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
7848 if test "x$prefix" = xNONE; then
7849 test_prefix=/usr/local
7850 else
7851 test_prefix=$prefix
7852 fi
7853 else
7854 test_prefix=$exec_prefix
7855 fi
7856 value=0
7857 case ${iconv_bin} in
7858 "${test_prefix}"|"${test_prefix}/"*|\
7859 '${exec_prefix}'|'${exec_prefix}/'*)
7860 value=1
7861 ;;
7862 esac
7863
7864cat >>confdefs.h <<_ACEOF
7865#define ICONV_BIN_RELOCATABLE $value
7866_ACEOF
7867
7868
7869
7870fi
7871
7872
cb01cfba 7873# For the TUI, we need enhanced curses functionality.
bd8a8e1b 7874if test x"$enable_tui" != xno; then
cb01cfba
JB
7875 prefer_curses=yes
7876fi
7877
7878curses_found=no
7879if test x"$prefer_curses" = xyes; then
7880 # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
7881 # curses library because the latter might not provide all the
7882 # functionality we need. However, this leads to problems on systems
7883 # where the linker searches /usr/local/lib, but the compiler doesn't
7884 # search /usr/local/include, if ncurses is installed in /usr/local. A
7885 # default installation of ncurses on alpha*-dec-osf* will lead to such
7886 # a situation.
81ecdfbb
RW
7887 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
7888$as_echo_n "checking for library containing waddstr... " >&6; }
7889if test "${ac_cv_search_waddstr+set}" = set; then :
7890 $as_echo_n "(cached) " >&6
6c7a06a3
TT
7891else
7892 ac_func_search_save_LIBS=$LIBS
81ecdfbb 7893cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
7894/* end confdefs.h. */
7895
81ecdfbb
RW
7896/* Override any GCC internal prototype to avoid an error.
7897 Use char because int might match the return type of a GCC
7898 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
7899#ifdef __cplusplus
7900extern "C"
7901#endif
6c7a06a3
TT
7902char waddstr ();
7903int
7904main ()
7905{
81ecdfbb 7906return waddstr ();
6c7a06a3
TT
7907 ;
7908 return 0;
7909}
7910_ACEOF
81ecdfbb
RW
7911for ac_lib in '' ncurses cursesX curses; do
7912 if test -z "$ac_lib"; then
7913 ac_res="none required"
7914 else
7915 ac_res=-l$ac_lib
7916 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7917 fi
7918 if ac_fn_c_try_link "$LINENO"; then :
7919 ac_cv_search_waddstr=$ac_res
7920fi
7921rm -f core conftest.err conftest.$ac_objext \
7922 conftest$ac_exeext
7923 if test "${ac_cv_search_waddstr+set}" = set; then :
7924 break
7925fi
7926done
7927if test "${ac_cv_search_waddstr+set}" = set; then :
7928
6c7a06a3 7929else
81ecdfbb
RW
7930 ac_cv_search_waddstr=no
7931fi
7932rm conftest.$ac_ext
7933LIBS=$ac_func_search_save_LIBS
7934fi
7935{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
7936$as_echo "$ac_cv_search_waddstr" >&6; }
7937ac_res=$ac_cv_search_waddstr
7938if test "$ac_res" != no; then :
7939 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3
TT
7940
7941fi
7942
7943
cb01cfba
JB
7944 if test "$ac_cv_search_waddstr" != no; then
7945 curses_found=yes
7946 fi
7947fi
7948
7949# Check whether we should enable the TUI, but only do so if we really
7950# can.
7951if test x"$enable_tui" != xno; then
7952 if test -d $srcdir/tui; then
7953 if test "$curses_found" != no; then
6c7a06a3
TT
7954 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
7955 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
7956 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
7957 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
6c7a06a3
TT
7958 else
7959 if test x"$enable_tui" = xyes; then
81ecdfbb 7960 as_fn_error "no enhanced curses library found; disable TUI" "$LINENO" 5
6c7a06a3 7961 else
81ecdfbb
RW
7962 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
7963$as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
6c7a06a3
TT
7964 fi
7965 fi
7966 fi
7967fi
7968
7969# Since GDB uses Readline, we need termcap functionality. In many
7970# cases this will be provided by the curses library, but some systems
7971# have a seperate termcap library, or no curses library at all.
7972
7973case $host_os in
7974 cygwin*)
7975 if test -d $srcdir/libtermcap; then
7976 LIBS="../libtermcap/libtermcap.a $LIBS"
7977 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
7978 fi ;;
7979 go32* | *djgpp*)
7980 ac_cv_search_tgetent="none required"
7981 ;;
6c7a06a3
TT
7982esac
7983
7984# These are the libraries checked by Readline.
81ecdfbb
RW
7985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
7986$as_echo_n "checking for library containing tgetent... " >&6; }
7987if test "${ac_cv_search_tgetent+set}" = set; then :
7988 $as_echo_n "(cached) " >&6
6c7a06a3
TT
7989else
7990 ac_func_search_save_LIBS=$LIBS
81ecdfbb 7991cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
7992/* end confdefs.h. */
7993
81ecdfbb
RW
7994/* Override any GCC internal prototype to avoid an error.
7995 Use char because int might match the return type of a GCC
7996 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
7997#ifdef __cplusplus
7998extern "C"
7999#endif
6c7a06a3
TT
8000char tgetent ();
8001int
8002main ()
8003{
81ecdfbb 8004return tgetent ();
6c7a06a3
TT
8005 ;
8006 return 0;
8007}
8008_ACEOF
81ecdfbb
RW
8009for ac_lib in '' termcap tinfo curses ncurses; do
8010 if test -z "$ac_lib"; then
8011 ac_res="none required"
8012 else
8013 ac_res=-l$ac_lib
6c7a06a3 8014 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
8015 fi
8016 if ac_fn_c_try_link "$LINENO"; then :
8017 ac_cv_search_tgetent=$ac_res
8018fi
8019rm -f core conftest.err conftest.$ac_objext \
8020 conftest$ac_exeext
8021 if test "${ac_cv_search_tgetent+set}" = set; then :
8022 break
8023fi
8024done
8025if test "${ac_cv_search_tgetent+set}" = set; then :
6c7a06a3 8026
6c7a06a3 8027else
81ecdfbb 8028 ac_cv_search_tgetent=no
6c7a06a3 8029fi
81ecdfbb 8030rm conftest.$ac_ext
6c7a06a3
TT
8031LIBS=$ac_func_search_save_LIBS
8032fi
81ecdfbb
RW
8033{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
8034$as_echo "$ac_cv_search_tgetent" >&6; }
8035ac_res=$ac_cv_search_tgetent
8036if test "$ac_res" != no; then :
8037 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3 8038
06825bd1
MK
8039fi
8040
06825bd1 8041
bec39cab 8042if test "$ac_cv_search_tgetent" = no; then
7a85168d 8043 CONFIG_OBS="$CONFIG_OBS stub-termcap.o"
8ee53726
MK
8044fi
8045
3841debe 8046
81ecdfbb
RW
8047# Check whether --with-system-readline was given.
8048if test "${with_system_readline+set}" = set; then :
8049 withval=$with_system_readline;
8050fi
6a30b0a5 8051
6a30b0a5
AS
8052
8053if test "$with_system_readline" = yes; then
8054 READLINE=-lreadline
8055 READLINE_DEPS=
8056 READLINE_CFLAGS=
39037522 8057 READLINE_TEXI_INCFLAG=
6a30b0a5
AS
8058else
8059 READLINE='$(READLINE_DIR)/libreadline.a'
8060 READLINE_DEPS='$(READLINE)'
8061 READLINE_CFLAGS='-I$(READLINE_SRC)/..'
39037522 8062 READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
6a30b0a5
AS
8063fi
8064
8065
8066
8067
8068
f997c383
SD
8069# Generate jit-reader.h
8070
8071# This is typedeffed to GDB_CORE_ADDR in jit-reader.h
8072TARGET_PTR=
8073
8074# The cast to long int works around a bug in the HP C Compiler
8075# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8076# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8077# This bug is HP SR number 8606223364.
8078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5
8079$as_echo_n "checking size of unsigned long long... " >&6; }
8080if test "${ac_cv_sizeof_unsigned_long_long+set}" = set; then :
8081 $as_echo_n "(cached) " >&6
8082else
8083 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then :
8084
8085else
8086 if test "$ac_cv_type_unsigned_long_long" = yes; then
8087 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8088$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8089{ as_fn_set_status 77
8090as_fn_error "cannot compute sizeof (unsigned long long)
8091See \`config.log' for more details." "$LINENO" 5; }; }
8092 else
8093 ac_cv_sizeof_unsigned_long_long=0
8094 fi
8095fi
8096
8097fi
8098{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5
8099$as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; }
8100
8101
8102
8103cat >>confdefs.h <<_ACEOF
8104#define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
8105_ACEOF
8106
8107
8108# The cast to long int works around a bug in the HP C Compiler
8109# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8110# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8111# This bug is HP SR number 8606223364.
8112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
8113$as_echo_n "checking size of unsigned long... " >&6; }
8114if test "${ac_cv_sizeof_unsigned_long+set}" = set; then :
8115 $as_echo_n "(cached) " >&6
8116else
8117 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then :
8118
8119else
8120 if test "$ac_cv_type_unsigned_long" = yes; then
8121 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8122$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8123{ as_fn_set_status 77
8124as_fn_error "cannot compute sizeof (unsigned long)
8125See \`config.log' for more details." "$LINENO" 5; }; }
8126 else
8127 ac_cv_sizeof_unsigned_long=0
8128 fi
8129fi
8130
8131fi
8132{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
8133$as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
8134
8135
8136
8137cat >>confdefs.h <<_ACEOF
8138#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
8139_ACEOF
8140
8141
8142# The cast to long int works around a bug in the HP C Compiler
8143# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8144# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8145# This bug is HP SR number 8606223364.
8146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5
8147$as_echo_n "checking size of unsigned __int128... " >&6; }
8148if test "${ac_cv_sizeof_unsigned___int128+set}" = set; then :
8149 $as_echo_n "(cached) " >&6
8150else
8151 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then :
8152
8153else
8154 if test "$ac_cv_type_unsigned___int128" = yes; then
8155 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8156$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8157{ as_fn_set_status 77
8158as_fn_error "cannot compute sizeof (unsigned __int128)
8159See \`config.log' for more details." "$LINENO" 5; }; }
8160 else
8161 ac_cv_sizeof_unsigned___int128=0
8162 fi
8163fi
8164
8165fi
8166{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5
8167$as_echo "$ac_cv_sizeof_unsigned___int128" >&6; }
8168
8169
8170
8171cat >>confdefs.h <<_ACEOF
8172#define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128
8173_ACEOF
8174
8175
8176
8177if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
8178 TARGET_PTR="unsigned long"
8179elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
8180 TARGET_PTR="unsigned long long"
8181elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
8182 TARGET_PTR="unsigned __int128"
8183else
8184 TARGET_PTR="unsigned long"
8185fi
8186
8187
8188ac_config_files="$ac_config_files jit-reader.h:jit-reader.in"
8189
8190
a2d08b9e
SD
8191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
8192$as_echo_n "checking for library containing dlopen... " >&6; }
8193if test "${ac_cv_search_dlopen+set}" = set; then :
8194 $as_echo_n "(cached) " >&6
8195else
8196 ac_func_search_save_LIBS=$LIBS
8197cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8198/* end confdefs.h. */
8199
8200/* Override any GCC internal prototype to avoid an error.
8201 Use char because int might match the return type of a GCC
8202 builtin and then its argument prototype would still apply. */
8203#ifdef __cplusplus
8204extern "C"
8205#endif
8206char dlopen ();
8207int
8208main ()
8209{
8210return dlopen ();
8211 ;
8212 return 0;
8213}
8214_ACEOF
8215for ac_lib in '' dl; do
8216 if test -z "$ac_lib"; then
8217 ac_res="none required"
8218 else
8219 ac_res=-l$ac_lib
8220 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8221 fi
8222 if ac_fn_c_try_link "$LINENO"; then :
8223 ac_cv_search_dlopen=$ac_res
8224fi
8225rm -f core conftest.err conftest.$ac_objext \
8226 conftest$ac_exeext
8227 if test "${ac_cv_search_dlopen+set}" = set; then :
8228 break
8229fi
8230done
8231if test "${ac_cv_search_dlopen+set}" = set; then :
8232
8233else
8234 ac_cv_search_dlopen=no
8235fi
8236rm conftest.$ac_ext
8237LIBS=$ac_func_search_save_LIBS
8238fi
8239{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
8240$as_echo "$ac_cv_search_dlopen" >&6; }
8241ac_res=$ac_cv_search_dlopen
8242if test "$ac_res" != no; then :
8243 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8244
8245fi
8246
8247
39037522 8248
b8e0a31c
SD
8249
8250# Check whether --with-jit-reader-dir was given.
8251if test "${with_jit_reader_dir+set}" = set; then :
8252 withval=$with_jit_reader_dir;
8253 JIT_READER_DIR=$withval
8254else
8255 JIT_READER_DIR=${libdir}/gdb
8256fi
8257
8258
8259 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
8260 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
8261 ac_define_dir=`eval echo $JIT_READER_DIR`
8262 ac_define_dir=`eval echo $ac_define_dir`
8263
8264cat >>confdefs.h <<_ACEOF
8265#define JIT_READER_DIR "$ac_define_dir"
8266_ACEOF
8267
8268
8269
8270
8271 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
8272 if test "x$prefix" = xNONE; then
8273 test_prefix=/usr/local
8274 else
8275 test_prefix=$prefix
8276 fi
8277 else
8278 test_prefix=$exec_prefix
8279 fi
8280 value=0
8281 case ${ac_define_dir} in
8282 "${test_prefix}"|"${test_prefix}/"*|\
8283 '${exec_prefix}'|'${exec_prefix}/'*)
8284 value=1
8285 ;;
8286 esac
8287
8288cat >>confdefs.h <<_ACEOF
8289#define JIT_READER_DIR_RELOCATABLE $value
8290_ACEOF
8291
8292
8293
8294
8295
81ecdfbb
RW
8296# Check whether --with-expat was given.
8297if test "${with_expat+set}" = set; then :
8298 withval=$with_expat;
5c39566f
DJ
8299else
8300 with_expat=auto
81ecdfbb
RW
8301fi
8302
8303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
8304$as_echo_n "checking whether to use expat... " >&6; }
8305{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
8306$as_echo "$with_expat" >&6; }
5c39566f
DJ
8307
8308if test "${with_expat}" = no; then
81ecdfbb
RW
8309 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
8310$as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
5c39566f
DJ
8311 HAVE_LIBEXPAT=no
8312else
8313
3841debe
DJ
8314
8315
8316
8317
8318
8319
8320
8321 use_additional=yes
8322
8323 acl_save_prefix="$prefix"
8324 prefix="$acl_final_prefix"
8325 acl_save_exec_prefix="$exec_prefix"
8326 exec_prefix="$acl_final_exec_prefix"
8327
8328 eval additional_includedir=\"$includedir\"
8329 eval additional_libdir=\"$libdir\"
8330
8331 exec_prefix="$acl_save_exec_prefix"
8332 prefix="$acl_save_prefix"
8333
8334
81ecdfbb
RW
8335# Check whether --with-libexpat-prefix was given.
8336if test "${with_libexpat_prefix+set}" = set; then :
8337 withval=$with_libexpat_prefix;
3841debe
DJ
8338 if test "X$withval" = "Xno"; then
8339 use_additional=no
8340 else
8341 if test "X$withval" = "X"; then
8342
8343 acl_save_prefix="$prefix"
8344 prefix="$acl_final_prefix"
8345 acl_save_exec_prefix="$exec_prefix"
8346 exec_prefix="$acl_final_exec_prefix"
8347
8348 eval additional_includedir=\"$includedir\"
8349 eval additional_libdir=\"$libdir\"
8350
8351 exec_prefix="$acl_save_exec_prefix"
8352 prefix="$acl_save_prefix"
8353
8354 else
8355 additional_includedir="$withval/include"
8356 additional_libdir="$withval/lib"
8357 fi
8358 fi
8359
81ecdfbb
RW
8360fi
8361
3841debe
DJ
8362 LIBEXPAT=
8363 LTLIBEXPAT=
8364 INCEXPAT=
8365 rpathdirs=
8366 ltrpathdirs=
8367 names_already_handled=
8368 names_next_round='expat '
8369 while test -n "$names_next_round"; do
8370 names_this_round="$names_next_round"
8371 names_next_round=
8372 for name in $names_this_round; do
8373 already_handled=
8374 for n in $names_already_handled; do
8375 if test "$n" = "$name"; then
8376 already_handled=yes
8377 break
8378 fi
8379 done
8380 if test -z "$already_handled"; then
8381 names_already_handled="$names_already_handled $name"
8382 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
8383 eval value=\"\$HAVE_LIB$uppername\"
8384 if test -n "$value"; then
8385 if test "$value" = yes; then
8386 eval value=\"\$LIB$uppername\"
8387 test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
8388 eval value=\"\$LTLIB$uppername\"
8389 test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
8390 else
8391 :
8392 fi
8393 else
8394 found_dir=
8395 found_la=
8396 found_so=
8397 found_a=
8398 if test $use_additional = yes; then
8399 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
8400 found_dir="$additional_libdir"
8401 found_so="$additional_libdir/lib$name.$shlibext"
8402 if test -f "$additional_libdir/lib$name.la"; then
8403 found_la="$additional_libdir/lib$name.la"
8404 fi
8405 else
8406 if test -f "$additional_libdir/lib$name.$libext"; then
8407 found_dir="$additional_libdir"
8408 found_a="$additional_libdir/lib$name.$libext"
8409 if test -f "$additional_libdir/lib$name.la"; then
8410 found_la="$additional_libdir/lib$name.la"
8411 fi
8412 fi
8413 fi
8414 fi
8415 if test "X$found_dir" = "X"; then
8416 for x in $LDFLAGS $LTLIBEXPAT; do
8417
8418 acl_save_prefix="$prefix"
8419 prefix="$acl_final_prefix"
8420 acl_save_exec_prefix="$exec_prefix"
8421 exec_prefix="$acl_final_exec_prefix"
8422 eval x=\"$x\"
8423 exec_prefix="$acl_save_exec_prefix"
8424 prefix="$acl_save_prefix"
8425
8426 case "$x" in
8427 -L*)
8428 dir=`echo "X$x" | sed -e 's/^X-L//'`
8429 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
8430 found_dir="$dir"
8431 found_so="$dir/lib$name.$shlibext"
8432 if test -f "$dir/lib$name.la"; then
8433 found_la="$dir/lib$name.la"
8434 fi
8435 else
8436 if test -f "$dir/lib$name.$libext"; then
8437 found_dir="$dir"
8438 found_a="$dir/lib$name.$libext"
8439 if test -f "$dir/lib$name.la"; then
8440 found_la="$dir/lib$name.la"
8441 fi
8442 fi
8443 fi
8444 ;;
8445 esac
8446 if test "X$found_dir" != "X"; then
8447 break
8448 fi
8449 done
8450 fi
8451 if test "X$found_dir" != "X"; then
8452 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
8453 if test "X$found_so" != "X"; then
8454 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
8455 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
8456 else
8457 haveit=
8458 for x in $ltrpathdirs; do
8459 if test "X$x" = "X$found_dir"; then
8460 haveit=yes
8461 break
8462 fi
8463 done
8464 if test -z "$haveit"; then
8465 ltrpathdirs="$ltrpathdirs $found_dir"
8466 fi
8467 if test "$hardcode_direct" = yes; then
8468 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
8469 else
8470 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
8471 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
8472 haveit=
8473 for x in $rpathdirs; do
8474 if test "X$x" = "X$found_dir"; then
8475 haveit=yes
8476 break
8477 fi
8478 done
8479 if test -z "$haveit"; then
8480 rpathdirs="$rpathdirs $found_dir"
8481 fi
8482 else
8483 haveit=
8484 for x in $LDFLAGS $LIBEXPAT; do
8485
8486 acl_save_prefix="$prefix"
8487 prefix="$acl_final_prefix"
8488 acl_save_exec_prefix="$exec_prefix"
8489 exec_prefix="$acl_final_exec_prefix"
8490 eval x=\"$x\"
8491 exec_prefix="$acl_save_exec_prefix"
8492 prefix="$acl_save_prefix"
8493
8494 if test "X$x" = "X-L$found_dir"; then
8495 haveit=yes
8496 break
8497 fi
8498 done
8499 if test -z "$haveit"; then
8500 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
8501 fi
8502 if test "$hardcode_minus_L" != no; then
8503 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
8504 else
8505 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
8506 fi
8507 fi
8508 fi
8509 fi
8510 else
8511 if test "X$found_a" != "X"; then
8512 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
8513 else
8514 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
8515 fi
8516 fi
8517 additional_includedir=
8518 case "$found_dir" in
8519 */lib | */lib/)
8520 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
8521 additional_includedir="$basedir/include"
8522 ;;
8523 esac
8524 if test "X$additional_includedir" != "X"; then
8525 if test "X$additional_includedir" != "X/usr/include"; then
8526 haveit=
8527 if test "X$additional_includedir" = "X/usr/local/include"; then
8528 if test -n "$GCC"; then
8529 case $host_os in
8530 linux*) haveit=yes;;
8531 esac
8532 fi
8533 fi
8534 if test -z "$haveit"; then
8535 for x in $CPPFLAGS $INCEXPAT; do
8536
8537 acl_save_prefix="$prefix"
8538 prefix="$acl_final_prefix"
8539 acl_save_exec_prefix="$exec_prefix"
8540 exec_prefix="$acl_final_exec_prefix"
8541 eval x=\"$x\"
8542 exec_prefix="$acl_save_exec_prefix"
8543 prefix="$acl_save_prefix"
8544
8545 if test "X$x" = "X-I$additional_includedir"; then
8546 haveit=yes
8547 break
8548 fi
8549 done
8550 if test -z "$haveit"; then
8551 if test -d "$additional_includedir"; then
8552 INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
8553 fi
8554 fi
8555 fi
8556 fi
8557 fi
8558 if test -n "$found_la"; then
8559 save_libdir="$libdir"
8560 case "$found_la" in
8561 */* | *\\*) . "$found_la" ;;
8562 *) . "./$found_la" ;;
8563 esac
8564 libdir="$save_libdir"
8565 for dep in $dependency_libs; do
8566 case "$dep" in
8567 -L*)
8568 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
8569 if test "X$additional_libdir" != "X/usr/lib"; then
8570 haveit=
8571 if test "X$additional_libdir" = "X/usr/local/lib"; then
8572 if test -n "$GCC"; then
8573 case $host_os in
8574 linux*) haveit=yes;;
8575 esac
8576 fi
8577 fi
8578 if test -z "$haveit"; then
8579 haveit=
8580 for x in $LDFLAGS $LIBEXPAT; do
8581
8582 acl_save_prefix="$prefix"
8583 prefix="$acl_final_prefix"
8584 acl_save_exec_prefix="$exec_prefix"
8585 exec_prefix="$acl_final_exec_prefix"
8586 eval x=\"$x\"
8587 exec_prefix="$acl_save_exec_prefix"
8588 prefix="$acl_save_prefix"
8589
8590 if test "X$x" = "X-L$additional_libdir"; then
8591 haveit=yes
8592 break
8593 fi
8594 done
8595 if test -z "$haveit"; then
8596 if test -d "$additional_libdir"; then
8597 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
8598 fi
8599 fi
8600 haveit=
8601 for x in $LDFLAGS $LTLIBEXPAT; do
8602
8603 acl_save_prefix="$prefix"
8604 prefix="$acl_final_prefix"
8605 acl_save_exec_prefix="$exec_prefix"
8606 exec_prefix="$acl_final_exec_prefix"
8607 eval x=\"$x\"
8608 exec_prefix="$acl_save_exec_prefix"
8609 prefix="$acl_save_prefix"
8610
8611 if test "X$x" = "X-L$additional_libdir"; then
8612 haveit=yes
8613 break
8614 fi
8615 done
8616 if test -z "$haveit"; then
8617 if test -d "$additional_libdir"; then
8618 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
8619 fi
8620 fi
8621 fi
8622 fi
8623 ;;
8624 -R*)
8625 dir=`echo "X$dep" | sed -e 's/^X-R//'`
8626 if test "$enable_rpath" != no; then
8627 haveit=
8628 for x in $rpathdirs; do
8629 if test "X$x" = "X$dir"; then
8630 haveit=yes
8631 break
8632 fi
8633 done
8634 if test -z "$haveit"; then
8635 rpathdirs="$rpathdirs $dir"
8636 fi
8637 haveit=
8638 for x in $ltrpathdirs; do
8639 if test "X$x" = "X$dir"; then
8640 haveit=yes
8641 break
8642 fi
8643 done
8644 if test -z "$haveit"; then
8645 ltrpathdirs="$ltrpathdirs $dir"
8646 fi
8647 fi
8648 ;;
8649 -l*)
8650 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
8651 ;;
8652 *.la)
8653 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
8654 ;;
8655 *)
8656 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
8657 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
8658 ;;
81ecdfbb
RW
8659 esac
8660 done
8661 fi
8662 else
8663 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
8664 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
8665 fi
8666 fi
8667 fi
8668 done
8669 done
8670 if test "X$rpathdirs" != "X"; then
8671 if test -n "$hardcode_libdir_separator"; then
8672 alldirs=
8673 for found_dir in $rpathdirs; do
8674 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
8675 done
8676 acl_save_libdir="$libdir"
8677 libdir="$alldirs"
8678 eval flag=\"$hardcode_libdir_flag_spec\"
8679 libdir="$acl_save_libdir"
8680 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
8681 else
8682 for found_dir in $rpathdirs; do
8683 acl_save_libdir="$libdir"
8684 libdir="$found_dir"
8685 eval flag=\"$hardcode_libdir_flag_spec\"
8686 libdir="$acl_save_libdir"
8687 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
8688 done
8689 fi
8690 fi
8691 if test "X$ltrpathdirs" != "X"; then
8692 for found_dir in $ltrpathdirs; do
8693 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
8694 done
8695 fi
a9322a30
TT
8696
8697
81ecdfbb 8698 ac_save_CPPFLAGS="$CPPFLAGS"
a9322a30 8699
81ecdfbb
RW
8700 for element in $INCEXPAT; do
8701 haveit=
8702 for x in $CPPFLAGS; do
a9322a30 8703
81ecdfbb
RW
8704 acl_save_prefix="$prefix"
8705 prefix="$acl_final_prefix"
8706 acl_save_exec_prefix="$exec_prefix"
8707 exec_prefix="$acl_final_exec_prefix"
8708 eval x=\"$x\"
8709 exec_prefix="$acl_save_exec_prefix"
8710 prefix="$acl_save_prefix"
a8111142 8711
81ecdfbb
RW
8712 if test "X$x" = "X$element"; then
8713 haveit=yes
8714 break
8715 fi
8716 done
8717 if test -z "$haveit"; then
8718 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
8719 fi
8720 done
a9322a30
TT
8721
8722
81ecdfbb
RW
8723 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
8724$as_echo_n "checking for libexpat... " >&6; }
8725if test "${ac_cv_libexpat+set}" = set; then :
8726 $as_echo_n "(cached) " >&6
bec39cab 8727else
bec39cab 8728
81ecdfbb
RW
8729 ac_save_LIBS="$LIBS"
8730 LIBS="$LIBS $LIBEXPAT"
8731 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8732/* end confdefs.h. */
81ecdfbb
RW
8733#include "expat.h"
8734int
8735main ()
8736{
8737XML_Parser p = XML_ParserCreate (0);
8738 ;
8739 return 0;
8740}
bec39cab 8741_ACEOF
81ecdfbb
RW
8742if ac_fn_c_try_link "$LINENO"; then :
8743 ac_cv_libexpat=yes
c906108c 8744else
81ecdfbb 8745 ac_cv_libexpat=no
bec39cab 8746fi
81ecdfbb
RW
8747rm -f core conftest.err conftest.$ac_objext \
8748 conftest$ac_exeext conftest.$ac_ext
8749 LIBS="$ac_save_LIBS"
c906108c 8750
95ca63c4 8751fi
81ecdfbb
RW
8752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
8753$as_echo "$ac_cv_libexpat" >&6; }
8754 if test "$ac_cv_libexpat" = yes; then
8755 HAVE_LIBEXPAT=yes
bec39cab 8756
81ecdfbb 8757$as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
bec39cab 8758
81ecdfbb
RW
8759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
8760$as_echo_n "checking how to link with libexpat... " >&6; }
8761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
8762$as_echo "$LIBEXPAT" >&6; }
8763 else
8764 HAVE_LIBEXPAT=no
8765 CPPFLAGS="$ac_save_CPPFLAGS"
8766 LIBEXPAT=
8767 LTLIBEXPAT=
8768 fi
95ca63c4
CF
8769
8770
8771
7cb9022a
MK
8772
8773
bec39cab 8774
81ecdfbb
RW
8775 if test "$HAVE_LIBEXPAT" != yes; then
8776 if test "$with_expat" = yes; then
8777 as_fn_error "expat is missing or unusable" "$LINENO" 5
8778 else
8779 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
8780$as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
8781 fi
8782 else
8783 save_LIBS=$LIBS
8784 LIBS="$LIBS $LIBEXPAT"
8785 for ac_func in XML_StopParser
8786do :
8787 ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
8788if test "x$ac_cv_func_XML_StopParser" = x""yes; then :
bec39cab 8789 cat >>confdefs.h <<_ACEOF
81ecdfbb 8790#define HAVE_XML_STOPPARSER 1
bec39cab 8791_ACEOF
95ca63c4 8792
bec39cab 8793fi
bec39cab 8794done
95ca63c4 8795
81ecdfbb
RW
8796 LIBS=$save_LIBS
8797 fi
a9322a30
TT
8798fi
8799
d344e670
DE
8800# --------------------- #
8801# Check for libpython. #
8802# --------------------- #
8803
a9322a30 8804
a9322a30
TT
8805
8806
ec685c5e 8807
0c4a4063 8808
81ecdfbb
RW
8809# Check whether --with-python was given.
8810if test "${with_python+set}" = set; then :
8811 withval=$with_python;
bec39cab 8812else
81ecdfbb 8813 with_python=auto
bec39cab 8814fi
bec39cab 8815
81ecdfbb
RW
8816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
8817$as_echo_n "checking whether to use python... " >&6; }
8818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
8819$as_echo "$with_python" >&6; }
9a156167 8820
81ecdfbb
RW
8821if test "${with_python}" = no; then
8822 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
8823$as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
8824 have_libpython=no
bec39cab 8825else
81ecdfbb 8826 case "${with_python}" in
8c85a4e2 8827 [\\/]* | ?:[\\/]*)
ec685c5e
DE
8828 if test -d ${with_python}; then
8829 # Assume the python binary is ${with_python}/bin/python.
ec685c5e 8830 python_prog="${with_python}/bin/python"
0c4a4063 8831 python_prefix=
9c4ea6c5
JB
8832 # If python does not exit ${with_python}/bin, then try in
8833 # ${with_python}. On Windows/MinGW, this is where the Python
8834 # executable is.
8835 if test ! -x "${python_prog}"; then
8836 python_prog="${with_python}/python"
8837 python_prefix=
8838 fi
e7a30f46 8839 if test ! -x "${python_prog}"; then
ec685c5e
DE
8840 # Fall back to gdb 7.0/7.1 behaviour.
8841 python_prog=missing
0c4a4063 8842 python_prefix=${with_python}
ec685c5e 8843 fi
e7a30f46 8844 elif test -x "${with_python}"; then
ec685c5e
DE
8845 # While we can't run python compiled for $host (unless host == build),
8846 # the user could write a script that provides the needed information,
8847 # so we support that.
ec685c5e 8848 python_prog=${with_python}
0c4a4063 8849 python_prefix=
ec685c5e
DE
8850 else
8851 as_fn_error "invalid value for --with-python" "$LINENO" 5
8852 fi
81ecdfbb 8853 ;;
ec685c5e
DE
8854 */*)
8855 # Disallow --with-python=foo/bar.
81ecdfbb
RW
8856 as_fn_error "invalid value for --with-python" "$LINENO" 5
8857 ;;
ec685c5e
DE
8858 *)
8859 # The user has either specified auto, yes, or the name of the python
8860 # program assumed to be in $PATH.
8861 python_prefix=
8862 case "${with_python}" in
8863 yes | auto)
8864 if test ${build} = ${host}; then
8865 # Extract the first word of "python", so it can be a program name with args.
8866set dummy python; ac_word=$2
8867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8868$as_echo_n "checking for $ac_word... " >&6; }
8869if test "${ac_cv_path_python_prog_path+set}" = set; then :
8870 $as_echo_n "(cached) " >&6
8871else
8872 case $python_prog_path in
8873 [\\/]* | ?:[\\/]*)
8874 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
8875 ;;
8876 *)
8877 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8878for as_dir in $PATH
8879do
8880 IFS=$as_save_IFS
8881 test -z "$as_dir" && as_dir=.
8882 for ac_exec_ext in '' $ac_executable_extensions; do
8883 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8884 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
8885 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8886 break 2
8887 fi
8888done
8889 done
8890IFS=$as_save_IFS
8891
8892 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
8893 ;;
8894esac
8895fi
8896python_prog_path=$ac_cv_path_python_prog_path
8897if test -n "$python_prog_path"; then
8898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
8899$as_echo "$python_prog_path" >&6; }
8900else
8901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8902$as_echo "no" >&6; }
8903fi
8904
8905
8906 if test "${python_prog_path}" = missing; then
8907 python_prog=missing
8908 else
8909 python_prog=${python_prog_path}
8910 fi
8911 else
8912 # Not much we can do except assume the cross-compiler will find the
8913 # right files.
8914 python_prog=missing
8915 fi
8916 ;;
8917 *)
8918 # While we can't run python compiled for $host (unless host == build),
8919 # the user could write a script that provides the needed information,
8920 # so we support that.
8921 python_prog="${with_python}"
8922 # Extract the first word of "${python_prog}", so it can be a program name with args.
8923set dummy ${python_prog}; ac_word=$2
8924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8925$as_echo_n "checking for $ac_word... " >&6; }
8926if test "${ac_cv_path_python_prog_path+set}" = set; then :
8927 $as_echo_n "(cached) " >&6
8928else
8929 case $python_prog_path in
8930 [\\/]* | ?:[\\/]*)
8931 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
8932 ;;
8933 *)
8934 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8935for as_dir in $PATH
8936do
8937 IFS=$as_save_IFS
8938 test -z "$as_dir" && as_dir=.
8939 for ac_exec_ext in '' $ac_executable_extensions; do
8940 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8941 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
8942 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8943 break 2
8944 fi
8945done
8946 done
8947IFS=$as_save_IFS
8948
8949 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
8950 ;;
8951esac
8952fi
8953python_prog_path=$ac_cv_path_python_prog_path
8954if test -n "$python_prog_path"; then
8955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
8956$as_echo "$python_prog_path" >&6; }
8957else
8958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8959$as_echo "no" >&6; }
8960fi
8961
8962
8963 if test "${python_prog_path}" = missing; then
8964 as_fn_error "unable to find python program ${python_prog}" "$LINENO" 5
8965 fi
8966 ;;
8967 esac
81ecdfbb
RW
8968 esac
8969
ec685c5e 8970 if test "${python_prog}" != missing; then
e7a30f46
DE
8971 # We have a python program to use, but it may be too old.
8972 # Don't flag an error for --with-python=auto (the default).
8973 have_python_config=yes
ec685c5e
DE
8974 python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
8975 if test $? != 0; then
e7a30f46
DE
8976 have_python_config=failed
8977 if test "${with_python}" != auto; then
8978 as_fn_error "failure running python-config --includes" "$LINENO" 5
8979 fi
ec685c5e
DE
8980 fi
8981 python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
8982 if test $? != 0; then
e7a30f46
DE
8983 have_python_config=failed
8984 if test "${with_python}" != auto; then
8985 as_fn_error "failure running python-config --ldflags" "$LINENO" 5
8986 fi
ec685c5e 8987 fi
0c4a4063
DE
8988 python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
8989 if test $? != 0; then
e7a30f46
DE
8990 have_python_config=failed
8991 if test "${with_python}" != auto; then
8992 as_fn_error "failure running python-config --exec-prefix" "$LINENO" 5
8993 fi
0c4a4063 8994 fi
ec685c5e 8995 else
ac534cba
JB
8996 # We do not have a python executable we can use to determine where
8997 # to find the Python headers and libs. We cannot guess the include
8998 # path from the python_prefix either, because that include path
8999 # depends on the Python version. So, there is nothing much we can
9000 # do except assume that the compiler will be able to find those files.
9001 python_includes=
9002 python_libs=
0c4a4063 9003 have_python_config=no
ec685c5e 9004 fi
bec39cab 9005
ec685c5e
DE
9006 # If we have python-config, only try the configuration it provides.
9007 # Otherwise fallback on the old way of trying different versions of
9008 # python in turn.
81ecdfbb 9009
ec685c5e
DE
9010 have_libpython=no
9011 if test "${have_python_config}" = yes; then
c1039e3c
JB
9012 # Determine the Python version by extracting "-lpython<version>"
9013 # part of the python_libs. <version> is usually X.Y with X and Y
9014 # being decimal numbers, but can also be XY (seen on Windows).
9015 #
9016 # The extraction is performed using sed with a regular expression.
9017 # Initially, the regexp used was using the '?' quantifier to make
9018 # the dot in the version number optional. Unfortunately, this
9019 # does not work with non-GNU versions of sed because, because of
9020 # what looks like a limitation (the '?' quantifier does not work
9021 # with back-references). We work around this limitation by using
9022 # the '*' quantifier instead. It means that, in theory, we might
9023 # match unexpected version strings such as "-lpython2..7", but
9024 # this seems unlikely in practice. And even if that happens,
9025 # an error will be triggered later on, when checking that version
9026 # number.
ec685c5e 9027 python_version=`echo " ${python_libs} " \
c1039e3c 9028 | sed -e 's,^.* -l\(python[0-9]*[.]*[0-9]*\).*$,\1,'`
0c4a4063
DE
9029 case "${python_version}" in
9030 python*)
ec685c5e
DE
9031
9032 version=${python_version}
9033
9034 new_CPPFLAGS=${python_includes}
9035 new_LIBS=${python_libs}
81ecdfbb
RW
9036 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
9037$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 9038 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 9039 save_LIBS=$LIBS
ec685c5e
DE
9040 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9041 LIBS="$LIBS $new_LIBS"
9042 found_usable_python=no
81ecdfbb 9043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9044/* end confdefs.h. */
ac534cba 9045#include "Python.h"
81ecdfbb
RW
9046int
9047main ()
9048{
9049Py_Initialize ();
9050 ;
9051 return 0;
9052}
bec39cab 9053_ACEOF
81ecdfbb 9054if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
9055 have_libpython=${version}
9056 found_usable_python=yes
ac534cba
JB
9057 PYTHON_CPPFLAGS=$new_CPPFLAGS
9058 PYTHON_LIBS=$new_LIBS
9a156167 9059fi
81ecdfbb
RW
9060rm -f core conftest.err conftest.$ac_objext \
9061 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
9062 CPPFLAGS=$save_CPPFLAGS
9063 LIBS=$save_LIBS
ec685c5e
DE
9064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
9065$as_echo "${found_usable_python}" >&6; }
9a156167 9066
0c4a4063
DE
9067 ;;
9068 *)
ec685c5e 9069 as_fn_error "unable to determine python version from ${python_libs}" "$LINENO" 5
0c4a4063
DE
9070 ;;
9071 esac
e7a30f46 9072 elif test "${have_python_config}" != failed; then
ec685c5e 9073 if test "${have_libpython}" = no; then
9a156167 9074
420697bb
TT
9075 version=python2.7
9076
9077 new_CPPFLAGS=${python_includes}
9078 new_LIBS="${python_libs} -lpython2.7"
9079 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
9080$as_echo_n "checking for ${version}... " >&6; }
9081 save_CPPFLAGS=$CPPFLAGS
9082 save_LIBS=$LIBS
9083 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9084 LIBS="$LIBS $new_LIBS"
9085 found_usable_python=no
9086 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9087/* end confdefs.h. */
ac534cba 9088#include "Python.h"
420697bb
TT
9089int
9090main ()
9091{
9092Py_Initialize ();
9093 ;
9094 return 0;
9095}
9096_ACEOF
9097if ac_fn_c_try_link "$LINENO"; then :
9098 have_libpython=${version}
9099 found_usable_python=yes
ac534cba
JB
9100 PYTHON_CPPFLAGS=$new_CPPFLAGS
9101 PYTHON_LIBS=$new_LIBS
420697bb
TT
9102fi
9103rm -f core conftest.err conftest.$ac_objext \
9104 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
9105 CPPFLAGS=$save_CPPFLAGS
9106 LIBS=$save_LIBS
420697bb
TT
9107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
9108$as_echo "${found_usable_python}" >&6; }
9109
9110 fi
9111 if test "${have_libpython}" = no; then
9112
ec685c5e
DE
9113 version=python2.6
9114
9115 new_CPPFLAGS=${python_includes}
9116 new_LIBS="${python_libs} -lpython2.6"
9117 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
9118$as_echo_n "checking for ${version}... " >&6; }
9119 save_CPPFLAGS=$CPPFLAGS
9120 save_LIBS=$LIBS
9121 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9122 LIBS="$LIBS $new_LIBS"
9123 found_usable_python=no
9124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9125/* end confdefs.h. */
ac534cba 9126#include "Python.h"
ec685c5e
DE
9127int
9128main ()
9129{
9130Py_Initialize ();
9131 ;
9132 return 0;
9133}
9134_ACEOF
9135if ac_fn_c_try_link "$LINENO"; then :
9136 have_libpython=${version}
9137 found_usable_python=yes
ac534cba
JB
9138 PYTHON_CPPFLAGS=$new_CPPFLAGS
9139 PYTHON_LIBS=$new_LIBS
ec685c5e
DE
9140fi
9141rm -f core conftest.err conftest.$ac_objext \
9142 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
9143 CPPFLAGS=$save_CPPFLAGS
9144 LIBS=$save_LIBS
ec685c5e
DE
9145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
9146$as_echo "${found_usable_python}" >&6; }
9a156167 9147
81ecdfbb 9148 fi
ec685c5e 9149 if test ${have_libpython} = no; then
9a156167 9150
81ecdfbb 9151 version=python2.5
9a156167 9152
ec685c5e
DE
9153 new_CPPFLAGS=${python_includes}
9154 new_LIBS="${python_libs} -lpython2.5"
81ecdfbb
RW
9155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
9156$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 9157 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 9158 save_LIBS=$LIBS
ec685c5e
DE
9159 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9160 LIBS="$LIBS $new_LIBS"
9161 found_usable_python=no
81ecdfbb 9162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 9163/* end confdefs.h. */
ac534cba 9164#include "Python.h"
81ecdfbb
RW
9165int
9166main ()
9167{
9168Py_Initialize ();
9169 ;
9170 return 0;
9171}
436868fb 9172_ACEOF
81ecdfbb 9173if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
9174 have_libpython=${version}
9175 found_usable_python=yes
ac534cba
JB
9176 PYTHON_CPPFLAGS=$new_CPPFLAGS
9177 PYTHON_LIBS=$new_LIBS
436868fb 9178fi
81ecdfbb
RW
9179rm -f core conftest.err conftest.$ac_objext \
9180 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
9181 CPPFLAGS=$save_CPPFLAGS
9182 LIBS=$save_LIBS
ec685c5e
DE
9183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
9184$as_echo "${found_usable_python}" >&6; }
a9322a30 9185
81ecdfbb 9186 fi
ec685c5e 9187 if test ${have_libpython} = no; then
a9322a30 9188
81ecdfbb 9189 version=python2.4
a9322a30 9190
ec685c5e
DE
9191 new_CPPFLAGS=${python_includes}
9192 new_LIBS="${python_libs} -lpython2.4"
81ecdfbb
RW
9193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
9194$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 9195 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 9196 save_LIBS=$LIBS
ec685c5e
DE
9197 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9198 LIBS="$LIBS $new_LIBS"
9199 found_usable_python=no
81ecdfbb 9200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 9201/* end confdefs.h. */
ac534cba 9202#include "Python.h"
a9322a30
TT
9203int
9204main ()
9205{
81ecdfbb 9206Py_Initialize ();
a9322a30
TT
9207 ;
9208 return 0;
9209}
436868fb 9210_ACEOF
81ecdfbb 9211if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
9212 have_libpython=${version}
9213 found_usable_python=yes
ac534cba
JB
9214 PYTHON_CPPFLAGS=$new_CPPFLAGS
9215 PYTHON_LIBS=$new_LIBS
436868fb 9216fi
81ecdfbb
RW
9217rm -f core conftest.err conftest.$ac_objext \
9218 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
9219 CPPFLAGS=$save_CPPFLAGS
9220 LIBS=$save_LIBS
ec685c5e
DE
9221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
9222$as_echo "${found_usable_python}" >&6; }
81ecdfbb 9223
ec685c5e
DE
9224 fi
9225 fi
9c4ea6c5 9226 if test "${have_libpython}" = python2.7 -o "${have_libpython}" = python27; then
11763c18
TT
9227
9228$as_echo "#define HAVE_LIBPYTHON2_7 1" >>confdefs.h
9229
9c4ea6c5 9230 elif test "${have_libpython}" = python2.6 -o "${have_libpython}" = python26; then
ec685c5e
DE
9231
9232$as_echo "#define HAVE_LIBPYTHON2_6 1" >>confdefs.h
9233
9c4ea6c5 9234 elif test "${have_libpython}" = python2.5 -o "${have_libpython}" = python25; then
ec685c5e
DE
9235
9236$as_echo "#define HAVE_LIBPYTHON2_5 1" >>confdefs.h
9237
9c4ea6c5 9238 elif test "${have_libpython}" = python2.4 -o "${have_libpython}" = python24; then
81ecdfbb
RW
9239
9240$as_echo "#define HAVE_LIBPYTHON2_4 1" >>confdefs.h
9241
81ecdfbb 9242 fi
ec685c5e
DE
9243
9244 if test "${have_libpython}" = no; then
81ecdfbb
RW
9245 case "${with_python}" in
9246 yes)
9247 as_fn_error "python is missing or unusable" "$LINENO" 5
9248 ;;
9249 auto)
9250 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
9251$as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
9252 ;;
9253 *)
9254 as_fn_error "no usable python found at ${with_python}" "$LINENO" 5
9255 ;;
9256 esac
0c4a4063
DE
9257 else
9258 if test -n "${python_prefix}"; then
9259
9260cat >>confdefs.h <<_ACEOF
9261#define WITH_PYTHON_PATH "${python_prefix}"
9262_ACEOF
9263
9264
9265 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
9266 if test "x$prefix" = xNONE; then
9267 test_prefix=/usr/local
9268 else
9269 test_prefix=$prefix
9270 fi
9271 else
9272 test_prefix=$exec_prefix
9273 fi
9274 value=0
9275 case ${python_prefix} in
9276 "${test_prefix}"|"${test_prefix}/"*|\
9277 '${exec_prefix}'|'${exec_prefix}/'*)
9278 value=1
9279 ;;
9280 esac
9281
9282cat >>confdefs.h <<_ACEOF
9283#define PYTHON_PATH_RELOCATABLE $value
9284_ACEOF
9285
9286
9287 fi
81ecdfbb 9288 fi
436868fb 9289fi
436868fb 9290
ec685c5e 9291if test "${have_libpython}" != no; then
436868fb 9292
81ecdfbb 9293$as_echo "#define HAVE_PYTHON 1" >>confdefs.h
436868fb 9294
81ecdfbb
RW
9295 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
9296 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
9297 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
94f7449c 9298 CONFIG_INSTALL="$CONFIG_INSTALL install-python"
81ecdfbb 9299 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
436868fb 9300
81ecdfbb
RW
9301 # Flags needed to compile Python code (taken from python-config --cflags).
9302 # We cannot call python-config directly because it will output whatever was
9303 # used when compiling the Python interpreter itself, including flags which
9304 # would make the python-related objects be compiled differently from the
9305 # rest of GDB (e.g., -O2 and -fPIC).
9306 if test "${GCC}" = yes; then
9307 tentative_python_cflags="-fno-strict-aliasing -DNDEBUG -fwrapv"
9308 fi
436868fb 9309
81ecdfbb
RW
9310 if test "x${tentative_python_cflags}" != x; then
9311 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
9312$as_echo_n "checking compiler flags for python code... " >&6; }
9313 for flag in ${tentative_python_cflags}; do
9314 # Check that the compiler accepts it
9315 saved_CFLAGS="$CFLAGS"
9316 CFLAGS="$CFLAGS $flag"
9317 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9318/* end confdefs.h. */
81ecdfbb 9319
a9322a30
TT
9320int
9321main ()
9322{
a9322a30
TT
9323
9324 ;
9325 return 0;
9326}
bec39cab 9327_ACEOF
81ecdfbb
RW
9328if ac_fn_c_try_compile "$LINENO"; then :
9329 PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
bec39cab 9330fi
81ecdfbb
RW
9331rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9332 CFLAGS="$saved_CFLAGS"
9333 done
9334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
9335$as_echo "${PYTHON_CFLAGS}" >&6; }
9336 fi
043b6510 9337
c83393b9
JB
9338 # On x64 Windows, Python's include headers, and pyconfig.h in
9339 # particular, rely on MS_WIN64 macro to detect that it's a 64bit
9340 # version of Windows. Unfortunately, MS_WIN64 is only defined if
9341 # _MSC_VER, a Microsoft-specific macro, is defined. So, when
9342 # building on x64 Windows with GCC, we define MS_WIN64 ourselves.
9343 # The issue was reported to the Python community, but still isn't
9344 # solved as of 2012-10-02 (http://bugs.python.org/issue4709).
9345
043b6510 9346 case "$gdb_host" in
c83393b9
JB
9347 mingw64)
9348 if test "${GCC}" = yes; then
9349 CPPFLAGS="$CPPFLAGS -DMS_WIN64"
9350 fi
9351 ;;
043b6510 9352 esac
a8db4212
YPK
9353
9354 # Note that "python -m threading" cannot be used to check for
9355 # threading support due to a bug in Python 2.7.3
9356 # (http://bugs.python.org/issue15567).
9357 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether python supports threads" >&5
9358$as_echo_n "checking whether python supports threads... " >&6; }
9359 saved_CPPFLAGS="${CPPFLAGS}"
9360 CPPFLAGS="${PYTHON_CPPFLAGS}"
9361 # Note that the test is reversed so that python_has_threads=yes on
9362 # unexpected failures.
9363 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9364/* end confdefs.h. */
9365
9366#include <Python.h>
9367#ifdef WITH_THREAD
9368# error
9369#endif
9370
9371_ACEOF
9372if ac_fn_c_try_cpp "$LINENO"; then :
9373 python_has_threads=no
9374else
9375 python_has_threads=yes
9376fi
9377rm -f conftest.err conftest.$ac_ext
9378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_has_threads}" >&5
9379$as_echo "${python_has_threads}" >&6; }
9380 CPPFLAGS="${saved_CPPFLAGS}"
81ecdfbb 9381else
6dddc817
DE
9382 # Even if Python support is not compiled in, we need to have this file
9383 # included so that the "python" command, et.al., still exists.
9384 CONFIG_OBS="$CONFIG_OBS python.o"
9385 CONFIG_SRCS="$CONFIG_SRCS python/python.c"
a9322a30 9386fi
9a156167 9387
a4a1c157
PA
9388# Work around Python http://bugs.python.org/issue10112. See also
9389# http://bugs.python.org/issue11410, otherwise -Wl,--dynamic-list has
9390# no effect. Note that the only test after this that uses Python is
9391# the -rdynamic/-Wl,--dynamic-list test, and we do want that one to be
9392# run without -export-dynamic too.
9393PYTHON_LIBS=`echo $PYTHON_LIBS | sed -e 's/-Xlinker -export-dynamic//'`
9394
9395
ed3ef339
DE
9396
9397
4df42755
DE
9398 if test "${have_libpython}" != no; then
9399 HAVE_PYTHON_TRUE=
9400 HAVE_PYTHON_FALSE='#'
9401else
9402 HAVE_PYTHON_TRUE='#'
9403 HAVE_PYTHON_FALSE=
9404fi
9405
ed3ef339
DE
9406
9407# -------------------- #
9408# Check for libguile. #
9409# -------------------- #
9410
9411
e1402065
DE
9412
9413
9414
9415
9416# Check whether --with-guile was given.
9417if test "${with_guile+set}" = set; then :
9418 withval=$with_guile;
9419else
9420 with_guile=auto
9421fi
9422
9423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use guile" >&5
9424$as_echo_n "checking whether to use guile... " >&6; }
9425{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_guile" >&5
9426$as_echo "$with_guile" >&6; }
9427
ed3ef339
DE
9428# Extract the first word of "pkg-config", so it can be a program name with args.
9429set dummy pkg-config; ac_word=$2
9430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9431$as_echo_n "checking for $ac_word... " >&6; }
9432if test "${ac_cv_path_pkg_config_prog_path+set}" = set; then :
9433 $as_echo_n "(cached) " >&6
9434else
9435 case $pkg_config_prog_path in
9436 [\\/]* | ?:[\\/]*)
9437 ac_cv_path_pkg_config_prog_path="$pkg_config_prog_path" # Let the user override the test with a path.
9438 ;;
9439 *)
9440 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9441for as_dir in $PATH
9442do
9443 IFS=$as_save_IFS
9444 test -z "$as_dir" && as_dir=.
9445 for ac_exec_ext in '' $ac_executable_extensions; do
9446 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9447 ac_cv_path_pkg_config_prog_path="$as_dir/$ac_word$ac_exec_ext"
9448 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9449 break 2
9450 fi
9451done
9452 done
9453IFS=$as_save_IFS
9454
9455 test -z "$ac_cv_path_pkg_config_prog_path" && ac_cv_path_pkg_config_prog_path="missing"
9456 ;;
9457esac
9458fi
9459pkg_config_prog_path=$ac_cv_path_pkg_config_prog_path
9460if test -n "$pkg_config_prog_path"; then
9461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config_prog_path" >&5
9462$as_echo "$pkg_config_prog_path" >&6; }
9463else
9464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9465$as_echo "no" >&6; }
9466fi
9467
9468
9469
214ab2da 9470try_guile_versions="guile-2.2 guile-2.0"
ed3ef339
DE
9471have_libguile=no
9472case "${with_guile}" in
9473no)
9474 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: guile support disabled; some features will be unavailable." >&5
9475$as_echo "$as_me: WARNING: guile support disabled; some features will be unavailable." >&2;}
9476 ;;
9477auto)
e1402065
DE
9478 if test "${pkg_config_prog_path}" = "missing"; then
9479 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found, guile support disabled" >&5
9480$as_echo "$as_me: WARNING: pkg-config not found, guile support disabled" >&2;}
9481 else
ed3ef339
DE
9482
9483 pkg_config=${pkg_config_prog_path}
9484 guile_version_list=${try_guile_versions}
9485 flag_errors=no
9486
ed3ef339
DE
9487 found_usable_guile=checking
9488 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
9489$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
9490 for guile_version in ${guile_version_list}; do
9491 ${pkg_config} --exists ${guile_version} 2>/dev/null
9492 if test $? != 0; then
9493 continue
9494 fi
9495 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
9496 if test $? != 0; then
9497 as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
9498 fi
9499 new_LIBS=`${pkg_config} --libs ${guile_version}`
9500 if test $? != 0; then
9501 as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
9502 fi
9503 found_usable_guile=${guile_version}
9504 break
9505 done
9506 if test "${found_usable_guile}" = "checking"; then
9507 if test "${flag_errors}" = "yes"; then
9508 as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
9509 else
9510 found_usable_guile=no
9511 fi
9512 fi
9513 if test "${found_usable_guile}" != no; then
9514 save_CPPFLAGS=$CPPFLAGS
9515 save_LIBS=$LIBS
9516 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9517 LIBS="$LIBS $new_LIBS"
9518 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9519/* end confdefs.h. */
9520#include "libguile.h"
9521int
9522main ()
9523{
9524scm_init_guile ();
9525 ;
9526 return 0;
9527}
9528_ACEOF
9529if ac_fn_c_try_link "$LINENO"; then :
9530 have_libguile=yes
9531 GUILE_CPPFLAGS=$new_CPPFLAGS
9532 GUILE_LIBS=$new_LIBS
9533else
9534 found_usable_guile=no
9535fi
9536rm -f core conftest.err conftest.$ac_objext \
9537 conftest$ac_exeext conftest.$ac_ext
92fab5a6
AW
9538 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
9539if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then :
9540
9541$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
9542
9543
9544fi
9545
ed3ef339
DE
9546 CPPFLAGS=$save_CPPFLAGS
9547 LIBS=$save_LIBS
9548 if test "${found_usable_guile}" = no; then
9549 if test "${flag_errors}" = yes; then
9550 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9551$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9552as_fn_error "linking guile version ${guile_version} test program failed
9553See \`config.log' for more details." "$LINENO" 5; }
9554 fi
9555 fi
9556 fi
9557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
9558$as_echo "${found_usable_guile}" >&6; }
9559
e1402065 9560 fi
ed3ef339
DE
9561 ;;
9562yes)
e1402065
DE
9563 if test "${pkg_config_prog_path}" = "missing"; then
9564 as_fn_error "pkg-config not found" "$LINENO" 5
9565 fi
ed3ef339
DE
9566
9567 pkg_config=${pkg_config_prog_path}
9568 guile_version_list=${try_guile_versions}
9569 flag_errors=yes
9570
ed3ef339
DE
9571 found_usable_guile=checking
9572 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
9573$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
9574 for guile_version in ${guile_version_list}; do
9575 ${pkg_config} --exists ${guile_version} 2>/dev/null
9576 if test $? != 0; then
9577 continue
9578 fi
9579 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
9580 if test $? != 0; then
9581 as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
9582 fi
9583 new_LIBS=`${pkg_config} --libs ${guile_version}`
9584 if test $? != 0; then
9585 as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
9586 fi
9587 found_usable_guile=${guile_version}
9588 break
9589 done
9590 if test "${found_usable_guile}" = "checking"; then
9591 if test "${flag_errors}" = "yes"; then
9592 as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
9593 else
9594 found_usable_guile=no
9595 fi
9596 fi
9597 if test "${found_usable_guile}" != no; then
9598 save_CPPFLAGS=$CPPFLAGS
9599 save_LIBS=$LIBS
9600 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9601 LIBS="$LIBS $new_LIBS"
9602 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9603/* end confdefs.h. */
9604#include "libguile.h"
9605int
9606main ()
9607{
9608scm_init_guile ();
9609 ;
9610 return 0;
9611}
9612_ACEOF
9613if ac_fn_c_try_link "$LINENO"; then :
9614 have_libguile=yes
9615 GUILE_CPPFLAGS=$new_CPPFLAGS
9616 GUILE_LIBS=$new_LIBS
9617else
9618 found_usable_guile=no
9619fi
9620rm -f core conftest.err conftest.$ac_objext \
9621 conftest$ac_exeext conftest.$ac_ext
92fab5a6
AW
9622 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
9623if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then :
9624
9625$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
9626
9627
9628fi
9629
ed3ef339
DE
9630 CPPFLAGS=$save_CPPFLAGS
9631 LIBS=$save_LIBS
9632 if test "${found_usable_guile}" = no; then
9633 if test "${flag_errors}" = yes; then
9634 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9635$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9636as_fn_error "linking guile version ${guile_version} test program failed
9637See \`config.log' for more details." "$LINENO" 5; }
9638 fi
9639 fi
9640 fi
9641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
9642$as_echo "${found_usable_guile}" >&6; }
9643
9644 ;;
9645[\\/]* | ?:[\\/]*)
e1402065 9646 if test -x "${with_guile}"; then
ed3ef339
DE
9647
9648 pkg_config=${with_guile}
9649 guile_version_list=${try_guile_versions}
9650 flag_errors=yes
9651
ed3ef339
DE
9652 found_usable_guile=checking
9653 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
9654$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
9655 for guile_version in ${guile_version_list}; do
9656 ${pkg_config} --exists ${guile_version} 2>/dev/null
9657 if test $? != 0; then
9658 continue
9659 fi
9660 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
9661 if test $? != 0; then
9662 as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
9663 fi
9664 new_LIBS=`${pkg_config} --libs ${guile_version}`
9665 if test $? != 0; then
9666 as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
9667 fi
9668 found_usable_guile=${guile_version}
9669 break
9670 done
9671 if test "${found_usable_guile}" = "checking"; then
9672 if test "${flag_errors}" = "yes"; then
9673 as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
9674 else
9675 found_usable_guile=no
9676 fi
9677 fi
9678 if test "${found_usable_guile}" != no; then
9679 save_CPPFLAGS=$CPPFLAGS
9680 save_LIBS=$LIBS
9681 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9682 LIBS="$LIBS $new_LIBS"
9683 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9684/* end confdefs.h. */
9685#include "libguile.h"
9686int
9687main ()
9688{
9689scm_init_guile ();
9690 ;
9691 return 0;
9692}
9693_ACEOF
9694if ac_fn_c_try_link "$LINENO"; then :
9695 have_libguile=yes
9696 GUILE_CPPFLAGS=$new_CPPFLAGS
9697 GUILE_LIBS=$new_LIBS
9698else
9699 found_usable_guile=no
9700fi
9701rm -f core conftest.err conftest.$ac_objext \
9702 conftest$ac_exeext conftest.$ac_ext
92fab5a6
AW
9703 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
9704if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then :
9705
9706$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
9707
9708
9709fi
9710
ed3ef339
DE
9711 CPPFLAGS=$save_CPPFLAGS
9712 LIBS=$save_LIBS
9713 if test "${found_usable_guile}" = no; then
9714 if test "${flag_errors}" = yes; then
9715 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9716$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9717as_fn_error "linking guile version ${guile_version} test program failed
9718See \`config.log' for more details." "$LINENO" 5; }
9719 fi
9720 fi
9721 fi
9722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
9723$as_echo "${found_usable_guile}" >&6; }
9724
e1402065
DE
9725 else
9726 as_fn_error "Guile config program not executable: ${with_guile}" "$LINENO" 5
9727 fi
ed3ef339
DE
9728 ;;
9729"" | */*)
9730 # Disallow --with=guile="" and --with-guile=foo/bar.
9731 as_fn_error "invalid value for --with-guile" "$LINENO" 5
9732 ;;
9733*)
9734 # A space separate list of guile versions to try, in order.
e1402065
DE
9735 if test "${pkg_config_prog_path}" = "missing"; then
9736 as_fn_error "pkg-config not found" "$LINENO" 5
9737 fi
ed3ef339
DE
9738
9739 pkg_config=${pkg_config_prog_path}
9740 guile_version_list=${with_guile}
9741 flag_errors=yes
9742
ed3ef339
DE
9743 found_usable_guile=checking
9744 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
9745$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
9746 for guile_version in ${guile_version_list}; do
9747 ${pkg_config} --exists ${guile_version} 2>/dev/null
9748 if test $? != 0; then
9749 continue
9750 fi
9751 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
9752 if test $? != 0; then
9753 as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
9754 fi
9755 new_LIBS=`${pkg_config} --libs ${guile_version}`
9756 if test $? != 0; then
9757 as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
9758 fi
9759 found_usable_guile=${guile_version}
9760 break
9761 done
9762 if test "${found_usable_guile}" = "checking"; then
9763 if test "${flag_errors}" = "yes"; then
9764 as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
9765 else
9766 found_usable_guile=no
9767 fi
9768 fi
9769 if test "${found_usable_guile}" != no; then
9770 save_CPPFLAGS=$CPPFLAGS
9771 save_LIBS=$LIBS
9772 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9773 LIBS="$LIBS $new_LIBS"
9774 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9775/* end confdefs.h. */
9776#include "libguile.h"
9777int
9778main ()
9779{
9780scm_init_guile ();
9781 ;
9782 return 0;
9783}
9784_ACEOF
9785if ac_fn_c_try_link "$LINENO"; then :
9786 have_libguile=yes
9787 GUILE_CPPFLAGS=$new_CPPFLAGS
9788 GUILE_LIBS=$new_LIBS
9789else
9790 found_usable_guile=no
9791fi
9792rm -f core conftest.err conftest.$ac_objext \
9793 conftest$ac_exeext conftest.$ac_ext
92fab5a6
AW
9794 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
9795if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then :
9796
9797$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
9798
9799
9800fi
9801
ed3ef339
DE
9802 CPPFLAGS=$save_CPPFLAGS
9803 LIBS=$save_LIBS
9804 if test "${found_usable_guile}" = no; then
9805 if test "${flag_errors}" = yes; then
9806 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9807$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9808as_fn_error "linking guile version ${guile_version} test program failed
9809See \`config.log' for more details." "$LINENO" 5; }
9810 fi
9811 fi
9812 fi
9813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
9814$as_echo "${found_usable_guile}" >&6; }
9815
9816 ;;
9817esac
9818
e76c5d17 9819if test "${have_libguile}" != no; then
d342a0da
DE
9820 case "${with_guile}" in
9821 [\\/]* | ?:[\\/]*)
e76c5d17
DE
9822
9823 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
9824$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
9825if test "${ac_cv_guild_program_name+set}" = set; then :
9826 $as_echo_n "(cached) " >&6
9827else
d342a0da 9828 ac_cv_guild_program_name="`"${with_guile}" --variable guild "${guile_version}"`"
e76c5d17
DE
9829
9830 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
9831 # the 'guild' and 'bindir' variables. In that case, try to guess
9832 # what the program name is, at the risk of getting it wrong if
9833 # Guile was configured with '--program-suffix' or similar.
9834 if test "x$ac_cv_guild_program_name" = "x"; then
d342a0da 9835 guile_exec_prefix="`"${with_guile}" --variable exec_prefix "${guile_version}"`"
e76c5d17
DE
9836 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
9837 fi
9838
9839fi
9840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
9841$as_echo "$ac_cv_guild_program_name" >&6; }
9842
9843 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
9844 as_fn_error "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
9845 fi
9846
9847 GUILD="$ac_cv_guild_program_name"
9848
9849
d342a0da
DE
9850 ;;
9851 *)
9852
9853 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
9854$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
9855if test "${ac_cv_guild_program_name+set}" = set; then :
9856 $as_echo_n "(cached) " >&6
9857else
9858 ac_cv_guild_program_name="`"${pkg_config_prog_path}" --variable guild "${guile_version}"`"
9859
9860 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
9861 # the 'guild' and 'bindir' variables. In that case, try to guess
9862 # what the program name is, at the risk of getting it wrong if
9863 # Guile was configured with '--program-suffix' or similar.
9864 if test "x$ac_cv_guild_program_name" = "x"; then
9865 guile_exec_prefix="`"${pkg_config_prog_path}" --variable exec_prefix "${guile_version}"`"
9866 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
9867 fi
9868
9869fi
9870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
9871$as_echo "$ac_cv_guild_program_name" >&6; }
9872
9873 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
9874 as_fn_error "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
9875 fi
9876
9877 GUILD="$ac_cv_guild_program_name"
9878
9879
9880 ;;
9881 esac
e76c5d17
DE
9882
9883
9884 if test "$cross_compiling" = no; then
9885 GUILD_TARGET_FLAG=
9886 else
9887 GUILD_TARGET_FLAG="--target=$host"
9888 fi
9889
9890
9891
9892
9893 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether guild supports this host" >&5
9894$as_echo_n "checking whether guild supports this host... " >&6; }
9895if test "${ac_cv_guild_ok+set}" = set; then :
9896 $as_echo_n "(cached) " >&6
9897else
9898 echo "$ac_cv_guild_program_name compile $GUILD_TARGET_FLAG -o conftest.go $srcdir/guile/lib/gdb/support.scm" >&5
9899 if "$ac_cv_guild_program_name" compile $GUILD_TARGET_FLAG -o conftest.go "$srcdir/guile/lib/gdb/support.scm" >&5 2>&5; then
9900 ac_cv_guild_ok=yes
9901 else
9902 ac_cv_guild_ok=no
9903 fi
9904fi
9905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_ok" >&5
9906$as_echo "$ac_cv_guild_ok" >&6; }
9907
9908 if test "$ac_cv_guild_ok" = no; then
9909 have_libguile=no
9910 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling guile support" >&5
9911$as_echo "$as_me: WARNING: disabling guile support" >&2;}
9912 fi
9913fi
9914
ed3ef339
DE
9915if test "${have_libguile}" != no; then
9916
9917$as_echo "#define HAVE_GUILE 1" >>confdefs.h
9918
9919 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_GUILE_OBS)"
9920 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_GUILE_DEPS)"
9921 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_GUILE_SRCS)"
9922 CONFIG_INSTALL="$CONFIG_INSTALL install-guile"
9923 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_GUILE_CFLAGS)"
16954d5d
LC
9924
9925 save_LIBS="$LIBS"
9926 save_CPPFLAGS="$CPPFLAGS"
9927 LIBS="$GUILE_LIBS"
9928 CPPFLAGS="$GUILE_CPPFLAGS"
9929 for ac_func in scm_new_smob
9930do :
9931 ac_fn_c_check_func "$LINENO" "scm_new_smob" "ac_cv_func_scm_new_smob"
9932if test "x$ac_cv_func_scm_new_smob" = x""yes; then :
9933 cat >>confdefs.h <<_ACEOF
9934#define HAVE_SCM_NEW_SMOB 1
9935_ACEOF
9936
9937fi
9938done
9939
9940 LIBS="$save_LIBS"
9941 CPPFLAGS="$save_CPPFLAGS"
ed3ef339
DE
9942else
9943 # Even if Guile support is not compiled in, we need to have these files
9944 # included.
9945 CONFIG_OBS="$CONFIG_OBS guile.o"
9946 CONFIG_SRCS="$CONFIG_SRCS guile/guile.c"
9947fi
9a156167 9948
ac534cba 9949
4df42755
DE
9950 if test "${have_libguile}" != no; then
9951 HAVE_GUILE_TRUE=
9952 HAVE_GUILE_FALSE='#'
9953else
9954 HAVE_GUILE_TRUE='#'
9955 HAVE_GUILE_FALSE=
9956fi
9957
ac534cba 9958
d344e670
DE
9959# --------------------- #
9960# Check for libmcheck. #
9961# --------------------- #
9962
a8db4212
YPK
9963# Enable -lmcheck by default (it provides cheap-enough memory mangling),
9964# but turn it off if Python is enabled with threads, since -lmcheck is
9965# not thread safe (http://sourceware.org/bugzilla/show_bug.cgi?id=9939),
9966# and for releases.
17ef446e
PA
9967if test \( "${have_libpython}" = "no" -o "${python_has_threads}" = "no" \) \
9968 && $development; then
9969 libmcheck_default=yes
9970else
9971 libmcheck_default=no
a8db4212
YPK
9972fi
9973
17ef446e
PA
9974 # Check whether --enable-libmcheck was given.
9975if test "${enable_libmcheck+set}" = set; then :
9976 enableval=$enable_libmcheck; case "${enableval}" in
9977 yes | y) ENABLE_LIBMCHECK="yes" ;;
9978 no | n) ENABLE_LIBMCHECK="no" ;;
9979 *) as_fn_error "bad value ${enableval} for --enable-libmcheck" "$LINENO" 5 ;;
9980 esac
9981fi
9982
9983
9984 if test -z "${ENABLE_LIBMCHECK}"; then
9985 ENABLE_LIBMCHECK=${libmcheck_default}
a8db4212 9986 fi
17ef446e
PA
9987
9988 if test "$ENABLE_LIBMCHECK" = "yes" ; then
9989 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lmcheck" >&5
a8db4212
YPK
9990$as_echo_n "checking for main in -lmcheck... " >&6; }
9991if test "${ac_cv_lib_mcheck_main+set}" = set; then :
9992 $as_echo_n "(cached) " >&6
9993else
9994 ac_check_lib_save_LIBS=$LIBS
9995LIBS="-lmcheck $LIBS"
9996cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9997/* end confdefs.h. */
9998
9999
10000int
10001main ()
10002{
10003return main ();
10004 ;
10005 return 0;
10006}
10007_ACEOF
10008if ac_fn_c_try_link "$LINENO"; then :
10009 ac_cv_lib_mcheck_main=yes
10010else
10011 ac_cv_lib_mcheck_main=no
10012fi
10013rm -f core conftest.err conftest.$ac_objext \
10014 conftest$ac_exeext conftest.$ac_ext
10015LIBS=$ac_check_lib_save_LIBS
10016fi
10017{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mcheck_main" >&5
10018$as_echo "$ac_cv_lib_mcheck_main" >&6; }
10019if test "x$ac_cv_lib_mcheck_main" = x""yes; then :
10020 cat >>confdefs.h <<_ACEOF
10021#define HAVE_LIBMCHECK 1
10022_ACEOF
10023
10024 LIBS="-lmcheck $LIBS"
10025
10026fi
10027
17ef446e
PA
10028 fi
10029
10030
10031if test "$ENABLE_LIBMCHECK" = "yes" \
10032 -a "${have_libpython}" != "no" \
10033 -a "${python_has_threads}" = "yes" ; then
10034 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&5
10035$as_echo "$as_me: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&2;}
a8db4212
YPK
10036fi
10037
58bfce93
MM
10038
10039# Check whether --with-intel_pt was given.
10040if test "${with_intel_pt+set}" = set; then :
10041 withval=$with_intel_pt;
10042else
10043 with_intel_pt=auto
10044fi
10045
10046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5
10047$as_echo_n "checking whether to use intel pt... " >&6; }
10048{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5
10049$as_echo "$with_intel_pt" >&6; }
10050
10051if test "${with_intel_pt}" = no; then
bc504a31
PA
10052 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&5
10053$as_echo "$as_me: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&2;}
58bfce93
MM
10054 HAVE_LIBIPT=no
10055else
5599c404
MM
10056 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10057/* end confdefs.h. */
10058
10059#include <linux/perf_event.h>
10060#ifndef PERF_ATTR_SIZE_VER5
10061# error
10062#endif
10063
10064_ACEOF
10065if ac_fn_c_try_cpp "$LINENO"; then :
10066 perf_event=yes
10067else
10068 perf_event=no
10069fi
10070rm -f conftest.err conftest.$ac_ext
10071 if test "$perf_event" != yes; then
10072 if test "$with_intel_pt" = yes; then
10073 as_fn_error "linux/perf_event.h missing or too old" "$LINENO" 5
10074 else
10075 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5
10076$as_echo "$as_me: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&2;}
10077 fi
10078 fi
10079
58bfce93
MM
10080
10081
10082
10083
10084
10085
10086
10087
10088 use_additional=yes
10089
10090 acl_save_prefix="$prefix"
10091 prefix="$acl_final_prefix"
10092 acl_save_exec_prefix="$exec_prefix"
10093 exec_prefix="$acl_final_exec_prefix"
10094
10095 eval additional_includedir=\"$includedir\"
10096 eval additional_libdir=\"$libdir\"
10097
10098 exec_prefix="$acl_save_exec_prefix"
10099 prefix="$acl_save_prefix"
10100
10101
10102# Check whether --with-libipt-prefix was given.
10103if test "${with_libipt_prefix+set}" = set; then :
10104 withval=$with_libipt_prefix;
10105 if test "X$withval" = "Xno"; then
10106 use_additional=no
10107 else
10108 if test "X$withval" = "X"; then
10109
10110 acl_save_prefix="$prefix"
10111 prefix="$acl_final_prefix"
10112 acl_save_exec_prefix="$exec_prefix"
10113 exec_prefix="$acl_final_exec_prefix"
10114
10115 eval additional_includedir=\"$includedir\"
10116 eval additional_libdir=\"$libdir\"
10117
10118 exec_prefix="$acl_save_exec_prefix"
10119 prefix="$acl_save_prefix"
10120
10121 else
10122 additional_includedir="$withval/include"
10123 additional_libdir="$withval/lib"
10124 fi
10125 fi
10126
10127fi
10128
10129 LIBIPT=
10130 LTLIBIPT=
10131 INCIPT=
10132 rpathdirs=
10133 ltrpathdirs=
10134 names_already_handled=
10135 names_next_round='ipt '
10136 while test -n "$names_next_round"; do
10137 names_this_round="$names_next_round"
10138 names_next_round=
10139 for name in $names_this_round; do
10140 already_handled=
10141 for n in $names_already_handled; do
10142 if test "$n" = "$name"; then
10143 already_handled=yes
10144 break
10145 fi
10146 done
10147 if test -z "$already_handled"; then
10148 names_already_handled="$names_already_handled $name"
10149 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
10150 eval value=\"\$HAVE_LIB$uppername\"
10151 if test -n "$value"; then
10152 if test "$value" = yes; then
10153 eval value=\"\$LIB$uppername\"
10154 test -z "$value" || LIBIPT="${LIBIPT}${LIBIPT:+ }$value"
10155 eval value=\"\$LTLIB$uppername\"
10156 test -z "$value" || LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$value"
10157 else
10158 :
10159 fi
10160 else
10161 found_dir=
10162 found_la=
10163 found_so=
10164 found_a=
10165 if test $use_additional = yes; then
10166 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
10167 found_dir="$additional_libdir"
10168 found_so="$additional_libdir/lib$name.$shlibext"
10169 if test -f "$additional_libdir/lib$name.la"; then
10170 found_la="$additional_libdir/lib$name.la"
10171 fi
10172 else
10173 if test -f "$additional_libdir/lib$name.$libext"; then
10174 found_dir="$additional_libdir"
10175 found_a="$additional_libdir/lib$name.$libext"
10176 if test -f "$additional_libdir/lib$name.la"; then
10177 found_la="$additional_libdir/lib$name.la"
10178 fi
10179 fi
10180 fi
10181 fi
10182 if test "X$found_dir" = "X"; then
10183 for x in $LDFLAGS $LTLIBIPT; do
10184
10185 acl_save_prefix="$prefix"
10186 prefix="$acl_final_prefix"
10187 acl_save_exec_prefix="$exec_prefix"
10188 exec_prefix="$acl_final_exec_prefix"
10189 eval x=\"$x\"
10190 exec_prefix="$acl_save_exec_prefix"
10191 prefix="$acl_save_prefix"
10192
10193 case "$x" in
10194 -L*)
10195 dir=`echo "X$x" | sed -e 's/^X-L//'`
10196 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
10197 found_dir="$dir"
10198 found_so="$dir/lib$name.$shlibext"
10199 if test -f "$dir/lib$name.la"; then
10200 found_la="$dir/lib$name.la"
10201 fi
10202 else
10203 if test -f "$dir/lib$name.$libext"; then
10204 found_dir="$dir"
10205 found_a="$dir/lib$name.$libext"
10206 if test -f "$dir/lib$name.la"; then
10207 found_la="$dir/lib$name.la"
10208 fi
10209 fi
10210 fi
10211 ;;
10212 esac
10213 if test "X$found_dir" != "X"; then
10214 break
10215 fi
10216 done
10217 fi
10218 if test "X$found_dir" != "X"; then
10219 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$found_dir -l$name"
10220 if test "X$found_so" != "X"; then
10221 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
10222 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
10223 else
10224 haveit=
10225 for x in $ltrpathdirs; do
10226 if test "X$x" = "X$found_dir"; then
10227 haveit=yes
10228 break
10229 fi
10230 done
10231 if test -z "$haveit"; then
10232 ltrpathdirs="$ltrpathdirs $found_dir"
10233 fi
10234 if test "$hardcode_direct" = yes; then
10235 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
10236 else
10237 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
10238 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
10239 haveit=
10240 for x in $rpathdirs; do
10241 if test "X$x" = "X$found_dir"; then
10242 haveit=yes
10243 break
10244 fi
10245 done
10246 if test -z "$haveit"; then
10247 rpathdirs="$rpathdirs $found_dir"
10248 fi
10249 else
10250 haveit=
10251 for x in $LDFLAGS $LIBIPT; do
10252
10253 acl_save_prefix="$prefix"
10254 prefix="$acl_final_prefix"
10255 acl_save_exec_prefix="$exec_prefix"
10256 exec_prefix="$acl_final_exec_prefix"
10257 eval x=\"$x\"
10258 exec_prefix="$acl_save_exec_prefix"
10259 prefix="$acl_save_prefix"
10260
10261 if test "X$x" = "X-L$found_dir"; then
10262 haveit=yes
10263 break
10264 fi
10265 done
10266 if test -z "$haveit"; then
10267 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir"
10268 fi
10269 if test "$hardcode_minus_L" != no; then
10270 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
10271 else
10272 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
10273 fi
10274 fi
10275 fi
10276 fi
10277 else
10278 if test "X$found_a" != "X"; then
10279 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_a"
10280 else
10281 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir -l$name"
10282 fi
10283 fi
10284 additional_includedir=
10285 case "$found_dir" in
10286 */lib | */lib/)
10287 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
10288 additional_includedir="$basedir/include"
10289 ;;
10290 esac
10291 if test "X$additional_includedir" != "X"; then
10292 if test "X$additional_includedir" != "X/usr/include"; then
10293 haveit=
10294 if test "X$additional_includedir" = "X/usr/local/include"; then
10295 if test -n "$GCC"; then
10296 case $host_os in
10297 linux*) haveit=yes;;
10298 esac
10299 fi
10300 fi
10301 if test -z "$haveit"; then
10302 for x in $CPPFLAGS $INCIPT; do
10303
10304 acl_save_prefix="$prefix"
10305 prefix="$acl_final_prefix"
10306 acl_save_exec_prefix="$exec_prefix"
10307 exec_prefix="$acl_final_exec_prefix"
10308 eval x=\"$x\"
10309 exec_prefix="$acl_save_exec_prefix"
10310 prefix="$acl_save_prefix"
10311
10312 if test "X$x" = "X-I$additional_includedir"; then
10313 haveit=yes
10314 break
10315 fi
10316 done
10317 if test -z "$haveit"; then
10318 if test -d "$additional_includedir"; then
10319 INCIPT="${INCIPT}${INCIPT:+ }-I$additional_includedir"
10320 fi
10321 fi
10322 fi
10323 fi
10324 fi
10325 if test -n "$found_la"; then
10326 save_libdir="$libdir"
10327 case "$found_la" in
10328 */* | *\\*) . "$found_la" ;;
10329 *) . "./$found_la" ;;
10330 esac
10331 libdir="$save_libdir"
10332 for dep in $dependency_libs; do
10333 case "$dep" in
10334 -L*)
10335 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10336 if test "X$additional_libdir" != "X/usr/lib"; then
10337 haveit=
10338 if test "X$additional_libdir" = "X/usr/local/lib"; then
10339 if test -n "$GCC"; then
10340 case $host_os in
10341 linux*) haveit=yes;;
10342 esac
10343 fi
10344 fi
10345 if test -z "$haveit"; then
10346 haveit=
10347 for x in $LDFLAGS $LIBIPT; do
10348
10349 acl_save_prefix="$prefix"
10350 prefix="$acl_final_prefix"
10351 acl_save_exec_prefix="$exec_prefix"
10352 exec_prefix="$acl_final_exec_prefix"
10353 eval x=\"$x\"
10354 exec_prefix="$acl_save_exec_prefix"
10355 prefix="$acl_save_prefix"
10356
10357 if test "X$x" = "X-L$additional_libdir"; then
10358 haveit=yes
10359 break
10360 fi
10361 done
10362 if test -z "$haveit"; then
10363 if test -d "$additional_libdir"; then
10364 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$additional_libdir"
10365 fi
10366 fi
10367 haveit=
10368 for x in $LDFLAGS $LTLIBIPT; do
10369
10370 acl_save_prefix="$prefix"
10371 prefix="$acl_final_prefix"
10372 acl_save_exec_prefix="$exec_prefix"
10373 exec_prefix="$acl_final_exec_prefix"
10374 eval x=\"$x\"
10375 exec_prefix="$acl_save_exec_prefix"
10376 prefix="$acl_save_prefix"
10377
10378 if test "X$x" = "X-L$additional_libdir"; then
10379 haveit=yes
10380 break
10381 fi
10382 done
10383 if test -z "$haveit"; then
10384 if test -d "$additional_libdir"; then
10385 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$additional_libdir"
10386 fi
10387 fi
10388 fi
10389 fi
10390 ;;
10391 -R*)
10392 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10393 if test "$enable_rpath" != no; then
10394 haveit=
10395 for x in $rpathdirs; do
10396 if test "X$x" = "X$dir"; then
10397 haveit=yes
10398 break
10399 fi
10400 done
10401 if test -z "$haveit"; then
10402 rpathdirs="$rpathdirs $dir"
10403 fi
10404 haveit=
10405 for x in $ltrpathdirs; do
10406 if test "X$x" = "X$dir"; then
10407 haveit=yes
10408 break
10409 fi
10410 done
10411 if test -z "$haveit"; then
10412 ltrpathdirs="$ltrpathdirs $dir"
10413 fi
10414 fi
10415 ;;
10416 -l*)
10417 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10418 ;;
10419 *.la)
10420 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10421 ;;
10422 *)
10423 LIBIPT="${LIBIPT}${LIBIPT:+ }$dep"
10424 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$dep"
10425 ;;
10426 esac
10427 done
10428 fi
10429 else
10430 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
10431 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l$name"
10432 fi
10433 fi
10434 fi
10435 done
10436 done
10437 if test "X$rpathdirs" != "X"; then
10438 if test -n "$hardcode_libdir_separator"; then
10439 alldirs=
10440 for found_dir in $rpathdirs; do
10441 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10442 done
10443 acl_save_libdir="$libdir"
10444 libdir="$alldirs"
10445 eval flag=\"$hardcode_libdir_flag_spec\"
10446 libdir="$acl_save_libdir"
10447 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
10448 else
10449 for found_dir in $rpathdirs; do
10450 acl_save_libdir="$libdir"
10451 libdir="$found_dir"
10452 eval flag=\"$hardcode_libdir_flag_spec\"
10453 libdir="$acl_save_libdir"
10454 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
10455 done
10456 fi
10457 fi
10458 if test "X$ltrpathdirs" != "X"; then
10459 for found_dir in $ltrpathdirs; do
10460 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-R$found_dir"
10461 done
10462 fi
10463
10464
10465 ac_save_CPPFLAGS="$CPPFLAGS"
10466
10467 for element in $INCIPT; do
10468 haveit=
10469 for x in $CPPFLAGS; do
10470
10471 acl_save_prefix="$prefix"
10472 prefix="$acl_final_prefix"
10473 acl_save_exec_prefix="$exec_prefix"
10474 exec_prefix="$acl_final_exec_prefix"
10475 eval x=\"$x\"
10476 exec_prefix="$acl_save_exec_prefix"
10477 prefix="$acl_save_prefix"
10478
10479 if test "X$x" = "X$element"; then
10480 haveit=yes
10481 break
10482 fi
10483 done
10484 if test -z "$haveit"; then
10485 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10486 fi
10487 done
10488
10489
10490 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libipt" >&5
10491$as_echo_n "checking for libipt... " >&6; }
10492if test "${ac_cv_libipt+set}" = set; then :
10493 $as_echo_n "(cached) " >&6
10494else
10495
10496 ac_save_LIBS="$LIBS"
10497 LIBS="$LIBS $LIBIPT"
10498 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10499/* end confdefs.h. */
10500#include "intel-pt.h"
10501int
10502main ()
10503{
10504pt_insn_alloc_decoder (0);
10505 ;
10506 return 0;
10507}
10508_ACEOF
10509if ac_fn_c_try_link "$LINENO"; then :
10510 ac_cv_libipt=yes
10511else
10512 ac_cv_libipt=no
10513fi
10514rm -f core conftest.err conftest.$ac_objext \
10515 conftest$ac_exeext conftest.$ac_ext
10516 LIBS="$ac_save_LIBS"
10517
10518fi
10519{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libipt" >&5
10520$as_echo "$ac_cv_libipt" >&6; }
10521 if test "$ac_cv_libipt" = yes; then
10522 HAVE_LIBIPT=yes
10523
10524$as_echo "#define HAVE_LIBIPT 1" >>confdefs.h
10525
10526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libipt" >&5
10527$as_echo_n "checking how to link with libipt... " >&6; }
10528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBIPT" >&5
10529$as_echo "$LIBIPT" >&6; }
10530 else
10531 HAVE_LIBIPT=no
10532 CPPFLAGS="$ac_save_CPPFLAGS"
10533 LIBIPT=
10534 LTLIBIPT=
10535 fi
10536
10537
10538
10539
10540
10541
10542 if test "$HAVE_LIBIPT" != yes; then
10543 if test "$with_intel_pt" = yes; then
10544 as_fn_error "libipt is missing or unusable" "$LINENO" 5
10545 else
10546 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5
10547$as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be unavailable." >&2;}
10548 fi
10549 fi
10550fi
10551
81ecdfbb
RW
10552# ------------------------- #
10553# Checks for header files. #
10554# ------------------------- #
c890192f 10555
81ecdfbb
RW
10556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
10557$as_echo_n "checking for ANSI C header files... " >&6; }
10558if test "${ac_cv_header_stdc+set}" = set; then :
10559 $as_echo_n "(cached) " >&6
bec39cab 10560else
81ecdfbb 10561 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10562/* end confdefs.h. */
81ecdfbb
RW
10563#include <stdlib.h>
10564#include <stdarg.h>
10565#include <string.h>
10566#include <float.h>
10567
a9322a30
TT
10568int
10569main ()
10570{
a9322a30
TT
10571
10572 ;
10573 return 0;
10574}
bec39cab 10575_ACEOF
81ecdfbb
RW
10576if ac_fn_c_try_compile "$LINENO"; then :
10577 ac_cv_header_stdc=yes
bec39cab 10578else
81ecdfbb 10579 ac_cv_header_stdc=no
a9322a30 10580fi
81ecdfbb 10581rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 10582
81ecdfbb
RW
10583if test $ac_cv_header_stdc = yes; then
10584 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10585 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10586/* end confdefs.h. */
10587#include <string.h>
bec39cab 10588
81ecdfbb
RW
10589_ACEOF
10590if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10591 $EGREP "memchr" >/dev/null 2>&1; then :
bec39cab 10592
bec39cab 10593else
81ecdfbb
RW
10594 ac_cv_header_stdc=no
10595fi
10596rm -f conftest*
10597
10598fi
10599
10600if test $ac_cv_header_stdc = yes; then
10601 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10602 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10603/* end confdefs.h. */
10604#include <stdlib.h>
10605
bec39cab 10606_ACEOF
81ecdfbb
RW
10607if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10608 $EGREP "free" >/dev/null 2>&1; then :
06825bd1 10609
81ecdfbb
RW
10610else
10611 ac_cv_header_stdc=no
10612fi
10613rm -f conftest*
bec39cab 10614
bec39cab 10615fi
81ecdfbb
RW
10616
10617if test $ac_cv_header_stdc = yes; then
10618 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10619 if test "$cross_compiling" = yes; then :
10620 :
bec39cab 10621else
81ecdfbb 10622 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10623/* end confdefs.h. */
81ecdfbb
RW
10624#include <ctype.h>
10625#include <stdlib.h>
10626#if ((' ' & 0x0FF) == 0x020)
10627# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10628# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10629#else
10630# define ISLOWER(c) \
10631 (('a' <= (c) && (c) <= 'i') \
10632 || ('j' <= (c) && (c) <= 'r') \
10633 || ('s' <= (c) && (c) <= 'z'))
10634# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10635#endif
10636
10637#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
a9322a30
TT
10638int
10639main ()
10640{
81ecdfbb
RW
10641 int i;
10642 for (i = 0; i < 256; i++)
10643 if (XOR (islower (i), ISLOWER (i))
10644 || toupper (i) != TOUPPER (i))
10645 return 2;
a9322a30
TT
10646 return 0;
10647}
bec39cab 10648_ACEOF
81ecdfbb
RW
10649if ac_fn_c_try_run "$LINENO"; then :
10650
bec39cab 10651else
81ecdfbb
RW
10652 ac_cv_header_stdc=no
10653fi
10654rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10655 conftest.$ac_objext conftest.beam conftest.$ac_ext
10656fi
bec39cab 10657
bec39cab 10658fi
a9322a30 10659fi
81ecdfbb
RW
10660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
10661$as_echo "$ac_cv_header_stdc" >&6; }
10662if test $ac_cv_header_stdc = yes; then
bec39cab 10663
81ecdfbb 10664$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5ee754fc 10665
81ecdfbb 10666fi
bec39cab 10667
81ecdfbb 10668# elf_hp.h is for HP/UX 64-bit shared library support.
9467110b 10669for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
161d1bec 10670 thread_db.h \
0080a2f6 10671 sys/fault.h \
81ecdfbb
RW
10672 sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
10673 sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
10674 sys/reg.h sys/debugreg.h sys/select.h sys/syscall.h \
9467110b 10675 termios.h termio.h \
3447c057 10676 sgtty.h elf_hp.h \
9467110b 10677 dlfcn.h
81ecdfbb
RW
10678do :
10679 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10680ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
10681eval as_val=\$$as_ac_Header
10682 if test "x$as_val" = x""yes; then :
bec39cab 10683 cat >>confdefs.h <<_ACEOF
81ecdfbb 10684#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 10685_ACEOF
c906108c 10686
bec39cab 10687fi
81ecdfbb
RW
10688
10689done
10690
81ecdfbb
RW
10691for ac_header in sys/proc.h
10692do :
10693 ac_fn_c_check_header_compile "$LINENO" "sys/proc.h" "ac_cv_header_sys_proc_h" "#if HAVE_SYS_PARAM_H
10694# include <sys/param.h>
10695#endif
c906108c 10696
81ecdfbb
RW
10697"
10698if test "x$ac_cv_header_sys_proc_h" = x""yes; then :
bec39cab 10699 cat >>confdefs.h <<_ACEOF
81ecdfbb 10700#define HAVE_SYS_PROC_H 1
bec39cab 10701_ACEOF
5ee754fc 10702
bec39cab 10703fi
81ecdfbb
RW
10704
10705done
10706
10707for ac_header in sys/user.h
10708do :
10709 ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
10710# include <sys/param.h>
a9322a30
TT
10711#endif
10712
81ecdfbb
RW
10713"
10714if test "x$ac_cv_header_sys_user_h" = x""yes; then :
10715 cat >>confdefs.h <<_ACEOF
10716#define HAVE_SYS_USER_H 1
bec39cab 10717_ACEOF
bec39cab 10718
a9322a30 10719fi
bec39cab 10720
81ecdfbb 10721done
5ee754fc 10722
5ee754fc 10723
81ecdfbb
RW
10724# On Solaris 2.[789], we need to define _MSE_INT_H to avoid a clash
10725# between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
10726# think that we don't have <curses.h> if we're using GCC.
10727case $host_os in
10728 solaris2.[789])
10729 if test "$GCC" = yes; then
10730
10731$as_echo "#define _MSE_INT_H 1" >>confdefs.h
10732
10733 fi ;;
10734esac
10735for ac_header in curses.h cursesX.h ncurses.h ncurses/ncurses.h ncurses/term.h
10736do :
10737 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10738ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
10739eval as_val=\$$as_ac_Header
10740 if test "x$as_val" = x""yes; then :
bec39cab 10741 cat >>confdefs.h <<_ACEOF
81ecdfbb 10742#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 10743_ACEOF
5ee754fc
MK
10744
10745fi
10746
81ecdfbb 10747done
bec39cab 10748
81ecdfbb
RW
10749for ac_header in term.h
10750do :
10751 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
10752# include <curses.h>
10753#endif
bec39cab 10754
81ecdfbb
RW
10755"
10756if test "x$ac_cv_header_term_h" = x""yes; then :
10757 cat >>confdefs.h <<_ACEOF
10758#define HAVE_TERM_H 1
a8111142 10759_ACEOF
a8111142 10760
a8111142 10761fi
a8111142 10762
81ecdfbb 10763done
a8111142
TT
10764
10765
81ecdfbb
RW
10766# ------------------------- #
10767# Checks for declarations. #
10768# ------------------------- #
a9322a30 10769
07697489
PA
10770
10771 # Check for presence and size of long long.
10772 ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
10773if test "x$ac_cv_type_long_long" = x""yes; then :
10774
10775cat >>confdefs.h <<_ACEOF
10776#define HAVE_LONG_LONG 1
10777_ACEOF
10778
10779# The cast to long int works around a bug in the HP C Compiler
10780# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10781# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10782# This bug is HP SR number 8606223364.
10783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
10784$as_echo_n "checking size of long long... " >&6; }
10785if test "${ac_cv_sizeof_long_long+set}" = set; then :
10786 $as_echo_n "(cached) " >&6
10787else
10788 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
10789
10790else
10791 if test "$ac_cv_type_long_long" = yes; then
10792 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10793$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10794{ as_fn_set_status 77
10795as_fn_error "cannot compute sizeof (long long)
10796See \`config.log' for more details." "$LINENO" 5; }; }
10797 else
10798 ac_cv_sizeof_long_long=0
10799 fi
10800fi
10801
10802fi
10803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
10804$as_echo "$ac_cv_sizeof_long_long" >&6; }
10805
10806
10807
10808cat >>confdefs.h <<_ACEOF
10809#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
10810_ACEOF
10811
10812
10813fi
10814
10815
10816 ac_fn_c_check_decl "$LINENO" "basename(char *)" "ac_cv_have_decl_basename_char_p_" "$ac_includes_default"
10817if test "x$ac_cv_have_decl_basename_char_p_" = x""yes; then :
10818 ac_have_decl=1
10819else
10820 ac_have_decl=0
10821fi
10822
10823cat >>confdefs.h <<_ACEOF
10824#define HAVE_DECL_BASENAME $ac_have_decl
10825_ACEOF
10826ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default"
10827if test "x$ac_cv_have_decl_ffs" = x""yes; then :
10828 ac_have_decl=1
10829else
10830 ac_have_decl=0
10831fi
10832
10833cat >>confdefs.h <<_ACEOF
10834#define HAVE_DECL_FFS $ac_have_decl
10835_ACEOF
10836ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default"
10837if test "x$ac_cv_have_decl_asprintf" = x""yes; then :
10838 ac_have_decl=1
10839else
10840 ac_have_decl=0
10841fi
10842
10843cat >>confdefs.h <<_ACEOF
10844#define HAVE_DECL_ASPRINTF $ac_have_decl
10845_ACEOF
10846ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
10847if test "x$ac_cv_have_decl_vasprintf" = x""yes; then :
10848 ac_have_decl=1
10849else
10850 ac_have_decl=0
10851fi
10852
10853cat >>confdefs.h <<_ACEOF
10854#define HAVE_DECL_VASPRINTF $ac_have_decl
10855_ACEOF
10856ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
10857if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
10858 ac_have_decl=1
10859else
10860 ac_have_decl=0
10861fi
10862
10863cat >>confdefs.h <<_ACEOF
10864#define HAVE_DECL_SNPRINTF $ac_have_decl
10865_ACEOF
10866ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
10867if test "x$ac_cv_have_decl_vsnprintf" = x""yes; then :
10868 ac_have_decl=1
10869else
10870 ac_have_decl=0
10871fi
10872
10873cat >>confdefs.h <<_ACEOF
10874#define HAVE_DECL_VSNPRINTF $ac_have_decl
10875_ACEOF
10876
10877 ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default"
10878if test "x$ac_cv_have_decl_strtol" = x""yes; then :
10879 ac_have_decl=1
10880else
10881 ac_have_decl=0
10882fi
10883
10884cat >>confdefs.h <<_ACEOF
10885#define HAVE_DECL_STRTOL $ac_have_decl
10886_ACEOF
10887ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default"
10888if test "x$ac_cv_have_decl_strtoul" = x""yes; then :
10889 ac_have_decl=1
10890else
10891 ac_have_decl=0
10892fi
10893
10894cat >>confdefs.h <<_ACEOF
10895#define HAVE_DECL_STRTOUL $ac_have_decl
10896_ACEOF
10897ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
10898if test "x$ac_cv_have_decl_strtoll" = x""yes; then :
10899 ac_have_decl=1
10900else
10901 ac_have_decl=0
10902fi
10903
10904cat >>confdefs.h <<_ACEOF
10905#define HAVE_DECL_STRTOLL $ac_have_decl
10906_ACEOF
10907ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
10908if test "x$ac_cv_have_decl_strtoull" = x""yes; then :
10909 ac_have_decl=1
10910else
10911 ac_have_decl=0
10912fi
10913
10914cat >>confdefs.h <<_ACEOF
10915#define HAVE_DECL_STRTOULL $ac_have_decl
10916_ACEOF
10917
10918 ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default"
10919if test "x$ac_cv_have_decl_strverscmp" = x""yes; then :
10920 ac_have_decl=1
10921else
10922 ac_have_decl=0
10923fi
10924
10925cat >>confdefs.h <<_ACEOF
10926#define HAVE_DECL_STRVERSCMP $ac_have_decl
10927_ACEOF
10928
10929
10930
81ecdfbb
RW
10931ac_fn_c_check_decl "$LINENO" "free" "ac_cv_have_decl_free" "$ac_includes_default"
10932if test "x$ac_cv_have_decl_free" = x""yes; then :
10933 ac_have_decl=1
bec39cab 10934else
81ecdfbb
RW
10935 ac_have_decl=0
10936fi
10937
10938cat >>confdefs.h <<_ACEOF
10939#define HAVE_DECL_FREE $ac_have_decl
bec39cab 10940_ACEOF
81ecdfbb
RW
10941ac_fn_c_check_decl "$LINENO" "malloc" "ac_cv_have_decl_malloc" "$ac_includes_default"
10942if test "x$ac_cv_have_decl_malloc" = x""yes; then :
10943 ac_have_decl=1
10944else
10945 ac_have_decl=0
10946fi
10947
10948cat >>confdefs.h <<_ACEOF
10949#define HAVE_DECL_MALLOC $ac_have_decl
bec39cab 10950_ACEOF
81ecdfbb
RW
10951ac_fn_c_check_decl "$LINENO" "realloc" "ac_cv_have_decl_realloc" "$ac_includes_default"
10952if test "x$ac_cv_have_decl_realloc" = x""yes; then :
10953 ac_have_decl=1
bec39cab 10954else
81ecdfbb
RW
10955 ac_have_decl=0
10956fi
bec39cab 10957
81ecdfbb
RW
10958cat >>confdefs.h <<_ACEOF
10959#define HAVE_DECL_REALLOC $ac_have_decl
bec39cab 10960_ACEOF
81ecdfbb
RW
10961ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
10962if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
10963 ac_have_decl=1
10964else
10965 ac_have_decl=0
5ee754fc 10966fi
81ecdfbb
RW
10967
10968cat >>confdefs.h <<_ACEOF
10969#define HAVE_DECL_SNPRINTF $ac_have_decl
a9322a30 10970_ACEOF
5ee754fc 10971
5ee754fc 10972
81ecdfbb
RW
10973 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
10974$as_echo_n "checking for LC_MESSAGES... " >&6; }
10975if test "${am_cv_val_LC_MESSAGES+set}" = set; then :
10976 $as_echo_n "(cached) " >&6
bec39cab 10977else
81ecdfbb 10978 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10979/* end confdefs.h. */
81ecdfbb 10980#include <locale.h>
a9322a30
TT
10981int
10982main ()
10983{
81ecdfbb 10984return LC_MESSAGES
a9322a30
TT
10985 ;
10986 return 0;
10987}
bec39cab 10988_ACEOF
81ecdfbb
RW
10989if ac_fn_c_try_link "$LINENO"; then :
10990 am_cv_val_LC_MESSAGES=yes
bec39cab 10991else
81ecdfbb
RW
10992 am_cv_val_LC_MESSAGES=no
10993fi
10994rm -f core conftest.err conftest.$ac_objext \
10995 conftest$ac_exeext conftest.$ac_ext
10996fi
10997{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
10998$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
10999 if test $am_cv_val_LC_MESSAGES = yes; then
bec39cab 11000
81ecdfbb
RW
11001$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
11002
11003 fi
11004
11005
11006# ----------------------- #
11007# Checks for structures. #
11008# ----------------------- #
11009
11010ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
11011if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
11012
11013cat >>confdefs.h <<_ACEOF
11014#define HAVE_STRUCT_STAT_ST_BLOCKS 1
7eb368b3 11015_ACEOF
7eb368b3 11016
81ecdfbb 11017
7eb368b3 11018fi
81ecdfbb
RW
11019ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
11020if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
7eb368b3 11021
a9322a30
TT
11022cat >>confdefs.h <<_ACEOF
11023#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
7eb368b3
NR
11024_ACEOF
11025
a9322a30 11026
7eb368b3
NR
11027fi
11028
7eb368b3 11029
a9322a30
TT
11030# ------------------ #
11031# Checks for types. #
11032# ------------------ #
7eb368b3 11033
81ecdfbb 11034ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
a9322a30
TT
11035#include <sys/socket.h>
11036
81ecdfbb
RW
11037"
11038if test "x$ac_cv_type_socklen_t" = x""yes; then :
bec39cab 11039
a9322a30
TT
11040cat >>confdefs.h <<_ACEOF
11041#define HAVE_SOCKLEN_T 1
11042_ACEOF
11043
11044
11045fi
11046
11047
11048# ------------------------------------- #
11049# Checks for compiler characteristics. #
11050# ------------------------------------- #
11051
81ecdfbb
RW
11052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11053$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
11054if test "${ac_cv_c_const+set}" = set; then :
11055 $as_echo_n "(cached) " >&6
a9322a30 11056else
81ecdfbb 11057 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11058/* end confdefs.h. */
a9322a30
TT
11059
11060int
11061main ()
11062{
11063/* FIXME: Include the comments suggested by Paul. */
11064#ifndef __cplusplus
11065 /* Ultrix mips cc rejects this. */
11066 typedef int charset[2];
81ecdfbb 11067 const charset cs;
a9322a30 11068 /* SunOS 4.1.1 cc rejects this. */
81ecdfbb
RW
11069 char const *const *pcpcc;
11070 char **ppc;
a9322a30
TT
11071 /* NEC SVR4.0.2 mips cc rejects this. */
11072 struct point {int x, y;};
11073 static struct point const zero = {0,0};
11074 /* AIX XL C 1.02.0.0 rejects this.
11075 It does not let you subtract one const X* pointer from another in
11076 an arm of an if-expression whose if-part is not a constant
11077 expression */
11078 const char *g = "string";
81ecdfbb 11079 pcpcc = &g + (g ? g-g : 0);
a9322a30 11080 /* HPUX 7.0 cc rejects these. */
81ecdfbb
RW
11081 ++pcpcc;
11082 ppc = (char**) pcpcc;
11083 pcpcc = (char const *const *) ppc;
a9322a30
TT
11084 { /* SCO 3.2v4 cc rejects this. */
11085 char *t;
11086 char const *s = 0 ? (char *) 0 : (char const *) 0;
11087
11088 *t++ = 0;
81ecdfbb 11089 if (s) return 0;
a9322a30
TT
11090 }
11091 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11092 int x[] = {25, 17};
11093 const int *foo = &x[0];
11094 ++foo;
11095 }
11096 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11097 typedef const int *iptr;
11098 iptr p = 0;
11099 ++p;
11100 }
11101 { /* AIX XL C 1.02.0.0 rejects this saying
11102 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11103 struct s { int j; const int *ap[3]; };
11104 struct s *b; b->j = 5;
11105 }
11106 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11107 const int foo = 10;
81ecdfbb 11108 if (!foo) return 0;
a9322a30 11109 }
81ecdfbb 11110 return !cs[0] && !zero.x;
a9322a30
TT
11111#endif
11112
11113 ;
11114 return 0;
11115}
bec39cab 11116_ACEOF
81ecdfbb 11117if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 11118 ac_cv_c_const=yes
5ee754fc 11119else
81ecdfbb 11120 ac_cv_c_const=no
5ee754fc 11121fi
81ecdfbb 11122rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 11123fi
81ecdfbb
RW
11124{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11125$as_echo "$ac_cv_c_const" >&6; }
a9322a30 11126if test $ac_cv_c_const = no; then
bec39cab 11127
81ecdfbb 11128$as_echo "#define const /**/" >>confdefs.h
bec39cab 11129
5ee754fc 11130fi
bec39cab 11131
81ecdfbb
RW
11132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
11133$as_echo_n "checking for inline... " >&6; }
11134if test "${ac_cv_c_inline+set}" = set; then :
11135 $as_echo_n "(cached) " >&6
bec39cab 11136else
a9322a30
TT
11137 ac_cv_c_inline=no
11138for ac_kw in inline __inline__ __inline; do
81ecdfbb 11139 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11140/* end confdefs.h. */
a9322a30
TT
11141#ifndef __cplusplus
11142typedef int foo_t;
11143static $ac_kw foo_t static_foo () {return 0; }
11144$ac_kw foo_t foo () {return 0; }
11145#endif
11146
bec39cab 11147_ACEOF
81ecdfbb
RW
11148if ac_fn_c_try_compile "$LINENO"; then :
11149 ac_cv_c_inline=$ac_kw
bec39cab 11150fi
81ecdfbb
RW
11151rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11152 test "$ac_cv_c_inline" != no && break
a9322a30 11153done
bec39cab 11154
5ee754fc 11155fi
81ecdfbb
RW
11156{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
11157$as_echo "$ac_cv_c_inline" >&6; }
5ee754fc 11158
a9322a30
TT
11159case $ac_cv_c_inline in
11160 inline | yes) ;;
11161 *)
11162 case $ac_cv_c_inline in
11163 no) ac_val=;;
11164 *) ac_val=$ac_cv_c_inline;;
11165 esac
11166 cat >>confdefs.h <<_ACEOF
11167#ifndef __cplusplus
11168#define inline $ac_val
11169#endif
11170_ACEOF
bec39cab
AC
11171 ;;
11172esac
bec39cab 11173
81ecdfbb
RW
11174 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
11175$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
11176if test "${ac_cv_c_bigendian+set}" = set; then :
11177 $as_echo_n "(cached) " >&6
bec39cab 11178else
81ecdfbb
RW
11179 ac_cv_c_bigendian=unknown
11180 # See if we're dealing with a universal compiler.
11181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11182/* end confdefs.h. */
11183#ifndef __APPLE_CC__
11184 not a universal capable compiler
11185 #endif
11186 typedef int dummy;
11187
11188_ACEOF
11189if ac_fn_c_try_compile "$LINENO"; then :
11190
11191 # Check for potential -arch flags. It is not universal unless
11192 # there are at least two -arch flags with different values.
11193 ac_arch=
11194 ac_prev=
11195 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
11196 if test -n "$ac_prev"; then
11197 case $ac_word in
11198 i?86 | x86_64 | ppc | ppc64)
11199 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
11200 ac_arch=$ac_word
11201 else
11202 ac_cv_c_bigendian=universal
11203 break
11204 fi
11205 ;;
11206 esac
11207 ac_prev=
11208 elif test "x$ac_word" = "x-arch"; then
11209 ac_prev=arch
11210 fi
11211 done
11212fi
11213rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11214 if test $ac_cv_c_bigendian = unknown; then
11215 # See if sys/param.h defines the BYTE_ORDER macro.
11216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11217/* end confdefs.h. */
a9322a30 11218#include <sys/types.h>
81ecdfbb 11219 #include <sys/param.h>
a9322a30
TT
11220
11221int
11222main ()
11223{
81ecdfbb
RW
11224#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
11225 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
11226 && LITTLE_ENDIAN)
11227 bogus endian macros
11228 #endif
a9322a30
TT
11229
11230 ;
11231 return 0;
11232}
bec39cab 11233_ACEOF
81ecdfbb 11234if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 11235 # It does; now see whether it defined to BIG_ENDIAN or not.
81ecdfbb 11236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11237/* end confdefs.h. */
a9322a30 11238#include <sys/types.h>
81ecdfbb 11239 #include <sys/param.h>
a9322a30
TT
11240
11241int
11242main ()
11243{
11244#if BYTE_ORDER != BIG_ENDIAN
81ecdfbb
RW
11245 not big endian
11246 #endif
a9322a30
TT
11247
11248 ;
11249 return 0;
11250}
bec39cab 11251_ACEOF
81ecdfbb 11252if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 11253 ac_cv_c_bigendian=yes
5ee754fc 11254else
81ecdfbb 11255 ac_cv_c_bigendian=no
5ee754fc 11256fi
81ecdfbb
RW
11257rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11258fi
11259rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11260 fi
11261 if test $ac_cv_c_bigendian = unknown; then
11262 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
11263 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11264/* end confdefs.h. */
11265#include <limits.h>
bec39cab 11266
81ecdfbb
RW
11267int
11268main ()
11269{
11270#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
11271 bogus endian macros
11272 #endif
11273
11274 ;
11275 return 0;
11276}
7eb368b3 11277_ACEOF
81ecdfbb
RW
11278if ac_fn_c_try_compile "$LINENO"; then :
11279 # It does; now see whether it defined to _BIG_ENDIAN or not.
11280 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7eb368b3 11281/* end confdefs.h. */
81ecdfbb
RW
11282#include <limits.h>
11283
7eb368b3
NR
11284int
11285main ()
11286{
81ecdfbb
RW
11287#ifndef _BIG_ENDIAN
11288 not big endian
11289 #endif
11290
7eb368b3
NR
11291 ;
11292 return 0;
11293}
11294_ACEOF
81ecdfbb 11295if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 11296 ac_cv_c_bigendian=yes
81ecdfbb
RW
11297else
11298 ac_cv_c_bigendian=no
a9322a30 11299fi
81ecdfbb 11300rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30 11301fi
81ecdfbb
RW
11302rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11303 fi
11304 if test $ac_cv_c_bigendian = unknown; then
11305 # Compile a test program.
11306 if test "$cross_compiling" = yes; then :
11307 # Try to guess by grepping values from an object file.
11308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11309/* end confdefs.h. */
11310short int ascii_mm[] =
11311 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
11312 short int ascii_ii[] =
11313 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
11314 int use_ascii (int i) {
11315 return ascii_mm[i] + ascii_ii[i];
11316 }
11317 short int ebcdic_ii[] =
11318 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
11319 short int ebcdic_mm[] =
11320 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
11321 int use_ebcdic (int i) {
11322 return ebcdic_mm[i] + ebcdic_ii[i];
11323 }
11324 extern int foo;
7eb368b3 11325
81ecdfbb
RW
11326int
11327main ()
11328{
11329return use_ascii (foo) == use_ebcdic (foo);
11330 ;
11331 return 0;
11332}
11333_ACEOF
11334if ac_fn_c_try_compile "$LINENO"; then :
11335 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
11336 ac_cv_c_bigendian=yes
11337 fi
11338 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
11339 if test "$ac_cv_c_bigendian" = unknown; then
11340 ac_cv_c_bigendian=no
11341 else
11342 # finding both strings is unlikely to happen, but who knows?
11343 ac_cv_c_bigendian=unknown
11344 fi
11345 fi
7eb368b3 11346fi
81ecdfbb 11347rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 11348else
81ecdfbb 11349 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11350/* end confdefs.h. */
81ecdfbb 11351$ac_includes_default
d3ea6809
MM
11352int
11353main ()
11354{
81ecdfbb
RW
11355
11356 /* Are we little or big endian? From Harbison&Steele. */
11357 union
11358 {
11359 long int l;
11360 char c[sizeof (long int)];
11361 } u;
11362 u.l = 1;
11363 return u.c[sizeof (long int) - 1] == 1;
11364
11365 ;
11366 return 0;
d3ea6809
MM
11367}
11368_ACEOF
81ecdfbb 11369if ac_fn_c_try_run "$LINENO"; then :
a9322a30 11370 ac_cv_c_bigendian=no
d3ea6809 11371else
81ecdfbb 11372 ac_cv_c_bigendian=yes
d3ea6809 11373fi
81ecdfbb
RW
11374rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11375 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 11376fi
a9322a30 11377
81ecdfbb
RW
11378 fi
11379fi
11380{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
11381$as_echo "$ac_cv_c_bigendian" >&6; }
11382 case $ac_cv_c_bigendian in #(
11383 yes)
11384 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
11385;; #(
11386 no)
11387 ;; #(
11388 universal)
11389
11390$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
11391
11392 ;; #(
11393 *)
11394 as_fn_error "unknown endianness
11395 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
11396 esac
d3ea6809
MM
11397
11398
a9322a30
TT
11399# ------------------------------ #
11400# Checks for library functions. #
11401# ------------------------------ #
d3ea6809 11402
a9322a30 11403for ac_header in stdlib.h unistd.h
81ecdfbb
RW
11404do :
11405 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11406ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
11407eval as_val=\$$as_ac_Header
11408 if test "x$as_val" = x""yes; then :
bec39cab 11409 cat >>confdefs.h <<_ACEOF
81ecdfbb 11410#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 11411_ACEOF
b757528f 11412
b757528f 11413fi
bec39cab 11414
a9322a30 11415done
a3828db0 11416
a9322a30 11417for ac_func in getpagesize
81ecdfbb
RW
11418do :
11419 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
11420if test "x$ac_cv_func_getpagesize" = x""yes; then :
bec39cab 11421 cat >>confdefs.h <<_ACEOF
81ecdfbb 11422#define HAVE_GETPAGESIZE 1
bec39cab 11423_ACEOF
bcb3dc3d 11424
bcb3dc3d
MK
11425fi
11426done
11427
81ecdfbb
RW
11428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
11429$as_echo_n "checking for working mmap... " >&6; }
11430if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then :
11431 $as_echo_n "(cached) " >&6
a9322a30 11432else
81ecdfbb 11433 if test "$cross_compiling" = yes; then :
a9322a30 11434 ac_cv_func_mmap_fixed_mapped=no
bec39cab 11435else
81ecdfbb 11436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11437/* end confdefs.h. */
a9322a30
TT
11438$ac_includes_default
11439/* malloc might have been renamed as rpl_malloc. */
11440#undef malloc
bec39cab 11441
a9322a30
TT
11442/* Thanks to Mike Haertel and Jim Avera for this test.
11443 Here is a matrix of mmap possibilities:
11444 mmap private not fixed
11445 mmap private fixed at somewhere currently unmapped
11446 mmap private fixed at somewhere already mapped
11447 mmap shared not fixed
11448 mmap shared fixed at somewhere currently unmapped
11449 mmap shared fixed at somewhere already mapped
11450 For private mappings, we should verify that changes cannot be read()
11451 back from the file, nor mmap's back from the file at a different
11452 address. (There have been systems where private was not correctly
11453 implemented like the infamous i386 svr4.0, and systems where the
11454 VM page cache was not coherent with the file system buffer cache
11455 like early versions of FreeBSD and possibly contemporary NetBSD.)
11456 For shared mappings, we should conversely verify that changes get
11457 propagated back to all the places they're supposed to be.
bec39cab 11458
a9322a30
TT
11459 Grep wants private fixed already mapped.
11460 The main things grep needs to know about mmap are:
11461 * does it exist and is it safe to write into the mmap'd area
11462 * how to use it (BSD variants) */
8b9cf735 11463
a9322a30
TT
11464#include <fcntl.h>
11465#include <sys/mman.h>
8b9cf735 11466
81ecdfbb 11467#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
a9322a30 11468char *malloc ();
a3828db0
MK
11469#endif
11470
a9322a30 11471/* This mess was copied from the GNU getpagesize.h. */
81ecdfbb 11472#ifndef HAVE_GETPAGESIZE
a9322a30 11473/* Assume that all systems that can run configure have sys/param.h. */
81ecdfbb 11474# ifndef HAVE_SYS_PARAM_H
a9322a30
TT
11475# define HAVE_SYS_PARAM_H 1
11476# endif
11477
11478# ifdef _SC_PAGESIZE
11479# define getpagesize() sysconf(_SC_PAGESIZE)
11480# else /* no _SC_PAGESIZE */
81ecdfbb 11481# ifdef HAVE_SYS_PARAM_H
a9322a30
TT
11482# include <sys/param.h>
11483# ifdef EXEC_PAGESIZE
11484# define getpagesize() EXEC_PAGESIZE
11485# else /* no EXEC_PAGESIZE */
11486# ifdef NBPG
11487# define getpagesize() NBPG * CLSIZE
11488# ifndef CLSIZE
11489# define CLSIZE 1
11490# endif /* no CLSIZE */
11491# else /* no NBPG */
11492# ifdef NBPC
11493# define getpagesize() NBPC
11494# else /* no NBPC */
11495# ifdef PAGESIZE
11496# define getpagesize() PAGESIZE
11497# endif /* PAGESIZE */
11498# endif /* no NBPC */
11499# endif /* no NBPG */
11500# endif /* no EXEC_PAGESIZE */
11501# else /* no HAVE_SYS_PARAM_H */
11502# define getpagesize() 8192 /* punt totally */
11503# endif /* no HAVE_SYS_PARAM_H */
11504# endif /* no _SC_PAGESIZE */
11505
11506#endif /* no HAVE_GETPAGESIZE */
11507
bec39cab
AC
11508int
11509main ()
11510{
a9322a30
TT
11511 char *data, *data2, *data3;
11512 int i, pagesize;
11513 int fd;
11514
11515 pagesize = getpagesize ();
11516
11517 /* First, make a file with some known garbage in it. */
11518 data = (char *) malloc (pagesize);
11519 if (!data)
81ecdfbb 11520 return 1;
a9322a30
TT
11521 for (i = 0; i < pagesize; ++i)
11522 *(data + i) = rand ();
11523 umask (0);
11524 fd = creat ("conftest.mmap", 0600);
11525 if (fd < 0)
81ecdfbb 11526 return 1;
a9322a30 11527 if (write (fd, data, pagesize) != pagesize)
81ecdfbb 11528 return 1;
a9322a30
TT
11529 close (fd);
11530
11531 /* Next, try to mmap the file at a fixed address which already has
11532 something else allocated at it. If we can, also make sure that
11533 we see the same garbage. */
11534 fd = open ("conftest.mmap", O_RDWR);
11535 if (fd < 0)
81ecdfbb 11536 return 1;
a9322a30
TT
11537 data2 = (char *) malloc (2 * pagesize);
11538 if (!data2)
81ecdfbb
RW
11539 return 1;
11540 data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
a9322a30
TT
11541 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
11542 MAP_PRIVATE | MAP_FIXED, fd, 0L))
81ecdfbb 11543 return 1;
a9322a30
TT
11544 for (i = 0; i < pagesize; ++i)
11545 if (*(data + i) != *(data2 + i))
81ecdfbb 11546 return 1;
a9322a30
TT
11547
11548 /* Finally, make sure that changes to the mapped area do not
11549 percolate back to the file as seen by read(). (This is a bug on
11550 some variants of i386 svr4.0.) */
11551 for (i = 0; i < pagesize; ++i)
11552 *(data2 + i) = *(data2 + i) + 1;
11553 data3 = (char *) malloc (pagesize);
11554 if (!data3)
81ecdfbb 11555 return 1;
a9322a30 11556 if (read (fd, data3, pagesize) != pagesize)
81ecdfbb 11557 return 1;
a9322a30
TT
11558 for (i = 0; i < pagesize; ++i)
11559 if (*(data + i) != *(data3 + i))
81ecdfbb 11560 return 1;
a9322a30 11561 close (fd);
81ecdfbb 11562 return 0;
bec39cab
AC
11563}
11564_ACEOF
81ecdfbb 11565if ac_fn_c_try_run "$LINENO"; then :
a9322a30 11566 ac_cv_func_mmap_fixed_mapped=yes
086ec9eb 11567else
81ecdfbb 11568 ac_cv_func_mmap_fixed_mapped=no
a3828db0 11569fi
81ecdfbb
RW
11570rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11571 conftest.$ac_objext conftest.beam conftest.$ac_ext
a3828db0 11572fi
81ecdfbb 11573
a9322a30 11574fi
81ecdfbb
RW
11575{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
11576$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
a9322a30
TT
11577if test $ac_cv_func_mmap_fixed_mapped = yes; then
11578
81ecdfbb 11579$as_echo "#define HAVE_MMAP 1" >>confdefs.h
a3828db0 11580
086ec9eb 11581fi
a9322a30 11582rm -f conftest.mmap
a3828db0 11583
81ecdfbb
RW
11584ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
11585if test "x$ac_cv_type_pid_t" = x""yes; then :
bec39cab 11586
a9322a30
TT
11587else
11588
11589cat >>confdefs.h <<_ACEOF
11590#define pid_t int
bec39cab 11591_ACEOF
086ec9eb
MK
11592
11593fi
11594
81ecdfbb
RW
11595for ac_header in vfork.h
11596do :
11597 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
11598if test "x$ac_cv_header_vfork_h" = x""yes; then :
a3828db0 11599 cat >>confdefs.h <<_ACEOF
81ecdfbb 11600#define HAVE_VFORK_H 1
bec39cab 11601_ACEOF
c906108c
SS
11602
11603fi
a9322a30 11604
a3828db0 11605done
c906108c 11606
a9322a30 11607for ac_func in fork vfork
81ecdfbb
RW
11608do :
11609 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11610ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11611eval as_val=\$$as_ac_var
11612 if test "x$as_val" = x""yes; then :
a3828db0 11613 cat >>confdefs.h <<_ACEOF
81ecdfbb 11614#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 11615_ACEOF
b83266a0 11616
97bf5e38 11617fi
a3828db0 11618done
b83266a0 11619
a9322a30 11620if test "x$ac_cv_func_fork" = xyes; then
81ecdfbb
RW
11621 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
11622$as_echo_n "checking for working fork... " >&6; }
11623if test "${ac_cv_func_fork_works+set}" = set; then :
11624 $as_echo_n "(cached) " >&6
a9322a30 11625else
81ecdfbb 11626 if test "$cross_compiling" = yes; then :
a9322a30
TT
11627 ac_cv_func_fork_works=cross
11628else
81ecdfbb
RW
11629 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11630/* end confdefs.h. */
11631$ac_includes_default
11632int
11633main ()
11634{
11635
11636 /* By Ruediger Kuhlmann. */
11637 return fork () < 0;
11638
11639 ;
11640 return 0;
11641}
a9322a30 11642_ACEOF
81ecdfbb 11643if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
11644 ac_cv_func_fork_works=yes
11645else
81ecdfbb 11646 ac_cv_func_fork_works=no
a9322a30 11647fi
81ecdfbb
RW
11648rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11649 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 11650fi
81ecdfbb 11651
a9322a30 11652fi
81ecdfbb
RW
11653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
11654$as_echo "$ac_cv_func_fork_works" >&6; }
a9322a30
TT
11655
11656else
11657 ac_cv_func_fork_works=$ac_cv_func_fork
11658fi
11659if test "x$ac_cv_func_fork_works" = xcross; then
11660 case $host in
11661 *-*-amigaos* | *-*-msdosdjgpp*)
11662 # Override, as these systems have only a dummy fork() stub
11663 ac_cv_func_fork_works=no
11664 ;;
11665 *)
11666 ac_cv_func_fork_works=yes
11667 ;;
11668 esac
81ecdfbb
RW
11669 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
11670$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
a9322a30
TT
11671fi
11672ac_cv_func_vfork_works=$ac_cv_func_vfork
11673if test "x$ac_cv_func_vfork" = xyes; then
81ecdfbb
RW
11674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
11675$as_echo_n "checking for working vfork... " >&6; }
11676if test "${ac_cv_func_vfork_works+set}" = set; then :
11677 $as_echo_n "(cached) " >&6
a9322a30 11678else
81ecdfbb 11679 if test "$cross_compiling" = yes; then :
a9322a30
TT
11680 ac_cv_func_vfork_works=cross
11681else
81ecdfbb 11682 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30
TT
11683/* end confdefs.h. */
11684/* Thanks to Paul Eggert for this test. */
81ecdfbb 11685$ac_includes_default
a9322a30 11686#include <sys/wait.h>
81ecdfbb 11687#ifdef HAVE_VFORK_H
a9322a30
TT
11688# include <vfork.h>
11689#endif
11690/* On some sparc systems, changes by the child to local and incoming
11691 argument registers are propagated back to the parent. The compiler
11692 is told about this with #include <vfork.h>, but some compilers
11693 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
11694 static variable whose address is put into a register that is
11695 clobbered by the vfork. */
11696static void
11697#ifdef __cplusplus
11698sparc_address_test (int arg)
11699# else
11700sparc_address_test (arg) int arg;
11701#endif
11702{
11703 static pid_t child;
11704 if (!child) {
11705 child = vfork ();
11706 if (child < 0) {
11707 perror ("vfork");
11708 _exit(2);
11709 }
11710 if (!child) {
11711 arg = getpid();
11712 write(-1, "", 0);
11713 _exit (arg);
11714 }
11715 }
11716}
11717
11718int
11719main ()
11720{
11721 pid_t parent = getpid ();
11722 pid_t child;
11723
11724 sparc_address_test (0);
11725
11726 child = vfork ();
11727
11728 if (child == 0) {
11729 /* Here is another test for sparc vfork register problems. This
11730 test uses lots of local variables, at least as many local
11731 variables as main has allocated so far including compiler
11732 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
11733 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
11734 reuse the register of parent for one of the local variables,
11735 since it will think that parent can't possibly be used any more
11736 in this routine. Assigning to the local variable will thus
11737 munge parent in the parent process. */
11738 pid_t
11739 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
11740 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
11741 /* Convince the compiler that p..p7 are live; otherwise, it might
11742 use the same hardware register for all 8 local variables. */
11743 if (p != p1 || p != p2 || p != p3 || p != p4
11744 || p != p5 || p != p6 || p != p7)
11745 _exit(1);
11746
11747 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
11748 from child file descriptors. If the child closes a descriptor
11749 before it execs or exits, this munges the parent's descriptor
11750 as well. Test for this by closing stdout in the child. */
11751 _exit(close(fileno(stdout)) != 0);
11752 } else {
11753 int status;
11754 struct stat st;
11755
11756 while (wait(&status) != child)
11757 ;
81ecdfbb 11758 return (
a9322a30
TT
11759 /* Was there some problem with vforking? */
11760 child < 0
11761
11762 /* Did the child fail? (This shouldn't happen.) */
11763 || status
11764
11765 /* Did the vfork/compiler bug occur? */
11766 || parent != getpid()
11767
11768 /* Did the file descriptor bug occur? */
11769 || fstat(fileno(stdout), &st) != 0
11770 );
11771 }
11772}
11773_ACEOF
81ecdfbb 11774if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
11775 ac_cv_func_vfork_works=yes
11776else
81ecdfbb 11777 ac_cv_func_vfork_works=no
a9322a30 11778fi
81ecdfbb
RW
11779rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11780 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 11781fi
81ecdfbb 11782
a9322a30 11783fi
81ecdfbb
RW
11784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
11785$as_echo "$ac_cv_func_vfork_works" >&6; }
a9322a30
TT
11786
11787fi;
11788if test "x$ac_cv_func_fork_works" = xcross; then
11789 ac_cv_func_vfork_works=$ac_cv_func_vfork
81ecdfbb
RW
11790 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
11791$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
a9322a30
TT
11792fi
11793
11794if test "x$ac_cv_func_vfork_works" = xyes; then
11795
81ecdfbb 11796$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
a9322a30
TT
11797
11798else
11799
81ecdfbb 11800$as_echo "#define vfork fork" >>confdefs.h
a9322a30
TT
11801
11802fi
11803if test "x$ac_cv_func_fork_works" = xyes; then
11804
81ecdfbb 11805$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
a9322a30
TT
11806
11807fi
11808
cdf43629 11809for ac_func in getauxval getrusage getuid getgid \
bdca27a2 11810 pipe poll pread pread64 pwrite resize_term \
7313baad 11811 sbrk setpgid setpgrp setsid \
9467110b 11812 sigaction sigprocmask sigsetmask socketpair \
110ed339 11813 ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
3332aaf2 11814 setrlimit getrlimit posix_madvise waitpid \
4b8b5e72 11815 ptrace64 sigaltstack mkdtemp setns
81ecdfbb
RW
11816do :
11817 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11818ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11819eval as_val=\$$as_ac_var
11820 if test "x$as_val" = x""yes; then :
6c7a06a3 11821 cat >>confdefs.h <<_ACEOF
81ecdfbb 11822#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6c7a06a3
TT
11823_ACEOF
11824
11825fi
11826done
11827
11828
81ecdfbb
RW
11829 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
11830$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
11831if test "${am_cv_langinfo_codeset+set}" = set; then :
11832 $as_echo_n "(cached) " >&6
6c7a06a3 11833else
81ecdfbb 11834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
11835/* end confdefs.h. */
11836#include <langinfo.h>
11837int
11838main ()
11839{
11840char* cs = nl_langinfo(CODESET);
bec39cab
AC
11841 ;
11842 return 0;
11843}
11844_ACEOF
81ecdfbb 11845if ac_fn_c_try_link "$LINENO"; then :
6c7a06a3 11846 am_cv_langinfo_codeset=yes
a4db0f07 11847else
81ecdfbb 11848 am_cv_langinfo_codeset=no
a4db0f07 11849fi
81ecdfbb
RW
11850rm -f core conftest.err conftest.$ac_objext \
11851 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 11852
a4db0f07 11853fi
81ecdfbb
RW
11854{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
11855$as_echo "$am_cv_langinfo_codeset" >&6; }
6c7a06a3
TT
11856 if test $am_cv_langinfo_codeset = yes; then
11857
81ecdfbb 11858$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
a4db0f07 11859
6c7a06a3 11860 fi
c906108c 11861
06825bd1 11862
3266f10b
TT
11863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
11864$as_echo_n "checking for ANSI C header files... " >&6; }
11865if test "${ac_cv_header_stdc+set}" = set; then :
11866 $as_echo_n "(cached) " >&6
11867else
11868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11869/* end confdefs.h. */
11870#include <stdlib.h>
11871#include <stdarg.h>
11872#include <string.h>
11873#include <float.h>
11874
11875int
11876main ()
11877{
11878
11879 ;
11880 return 0;
11881}
11882_ACEOF
11883if ac_fn_c_try_compile "$LINENO"; then :
11884 ac_cv_header_stdc=yes
11885else
11886 ac_cv_header_stdc=no
11887fi
11888rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11889
11890if test $ac_cv_header_stdc = yes; then
11891 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11893/* end confdefs.h. */
11894#include <string.h>
11895
11896_ACEOF
11897if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11898 $EGREP "memchr" >/dev/null 2>&1; then :
11899
11900else
11901 ac_cv_header_stdc=no
11902fi
11903rm -f conftest*
11904
11905fi
11906
11907if test $ac_cv_header_stdc = yes; then
11908 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11910/* end confdefs.h. */
11911#include <stdlib.h>
11912
11913_ACEOF
11914if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11915 $EGREP "free" >/dev/null 2>&1; then :
11916
11917else
11918 ac_cv_header_stdc=no
11919fi
11920rm -f conftest*
11921
11922fi
11923
11924if test $ac_cv_header_stdc = yes; then
11925 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11926 if test "$cross_compiling" = yes; then :
11927 :
11928else
11929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11930/* end confdefs.h. */
11931#include <ctype.h>
11932#include <stdlib.h>
11933#if ((' ' & 0x0FF) == 0x020)
11934# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11935# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11936#else
11937# define ISLOWER(c) \
11938 (('a' <= (c) && (c) <= 'i') \
11939 || ('j' <= (c) && (c) <= 'r') \
11940 || ('s' <= (c) && (c) <= 'z'))
11941# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11942#endif
11943
11944#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11945int
11946main ()
11947{
11948 int i;
11949 for (i = 0; i < 256; i++)
11950 if (XOR (islower (i), ISLOWER (i))
11951 || toupper (i) != TOUPPER (i))
11952 return 2;
11953 return 0;
11954}
11955_ACEOF
11956if ac_fn_c_try_run "$LINENO"; then :
11957
11958else
11959 ac_cv_header_stdc=no
11960fi
11961rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11962 conftest.$ac_objext conftest.beam conftest.$ac_ext
11963fi
11964
11965fi
11966fi
11967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
11968$as_echo "$ac_cv_header_stdc" >&6; }
11969if test $ac_cv_header_stdc = yes; then
11970
11971$as_echo "#define STDC_HEADERS 1" >>confdefs.h
11972
3266f10b
TT
11973fi
11974
11975 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
11976# for constant arguments. Useless!
11977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
11978$as_echo_n "checking for working alloca.h... " >&6; }
11979if test "${ac_cv_working_alloca_h+set}" = set; then :
11980 $as_echo_n "(cached) " >&6
11981else
11982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11983/* end confdefs.h. */
11984#include <alloca.h>
11985int
11986main ()
11987{
11988char *p = (char *) alloca (2 * sizeof (int));
11989 if (p) return 0;
11990 ;
11991 return 0;
11992}
11993_ACEOF
11994if ac_fn_c_try_link "$LINENO"; then :
11995 ac_cv_working_alloca_h=yes
11996else
11997 ac_cv_working_alloca_h=no
11998fi
11999rm -f core conftest.err conftest.$ac_objext \
12000 conftest$ac_exeext conftest.$ac_ext
12001fi
12002{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
12003$as_echo "$ac_cv_working_alloca_h" >&6; }
12004if test $ac_cv_working_alloca_h = yes; then
12005
12006$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
12007
12008fi
12009
12010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
12011$as_echo_n "checking for alloca... " >&6; }
12012if test "${ac_cv_func_alloca_works+set}" = set; then :
12013 $as_echo_n "(cached) " >&6
12014else
12015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12016/* end confdefs.h. */
12017#ifdef __GNUC__
12018# define alloca __builtin_alloca
12019#else
12020# ifdef _MSC_VER
12021# include <malloc.h>
12022# define alloca _alloca
12023# else
12024# ifdef HAVE_ALLOCA_H
12025# include <alloca.h>
12026# else
12027# ifdef _AIX
12028 #pragma alloca
12029# else
12030# ifndef alloca /* predefined by HP cc +Olibcalls */
12031char *alloca ();
12032# endif
12033# endif
12034# endif
12035# endif
12036#endif
12037
12038int
12039main ()
12040{
12041char *p = (char *) alloca (1);
12042 if (p) return 0;
12043 ;
12044 return 0;
12045}
12046_ACEOF
12047if ac_fn_c_try_link "$LINENO"; then :
12048 ac_cv_func_alloca_works=yes
12049else
12050 ac_cv_func_alloca_works=no
12051fi
12052rm -f core conftest.err conftest.$ac_objext \
12053 conftest$ac_exeext conftest.$ac_ext
12054fi
12055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
12056$as_echo "$ac_cv_func_alloca_works" >&6; }
12057
12058if test $ac_cv_func_alloca_works = yes; then
12059
12060$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
12061
12062else
12063 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
12064# that cause trouble. Some versions do not even contain alloca or
12065# contain a buggy version. If you still want to use their alloca,
12066# use ar to extract alloca.o from them instead of compiling alloca.c.
12067
12068ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
12069
12070$as_echo "#define C_ALLOCA 1" >>confdefs.h
12071
12072
12073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
12074$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
12075if test "${ac_cv_os_cray+set}" = set; then :
12076 $as_echo_n "(cached) " >&6
12077else
12078 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12079/* end confdefs.h. */
12080#if defined CRAY && ! defined CRAY2
12081webecray
12082#else
12083wenotbecray
12084#endif
12085
12086_ACEOF
12087if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12088 $EGREP "webecray" >/dev/null 2>&1; then :
12089 ac_cv_os_cray=yes
12090else
12091 ac_cv_os_cray=no
12092fi
12093rm -f conftest*
12094
12095fi
12096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
12097$as_echo "$ac_cv_os_cray" >&6; }
12098if test $ac_cv_os_cray = yes; then
12099 for ac_func in _getb67 GETB67 getb67; do
12100 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12101ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12102eval as_val=\$$as_ac_var
12103 if test "x$as_val" = x""yes; then :
12104
12105cat >>confdefs.h <<_ACEOF
12106#define CRAY_STACKSEG_END $ac_func
12107_ACEOF
12108
12109 break
12110fi
12111
12112 done
12113fi
12114
12115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
12116$as_echo_n "checking stack direction for C alloca... " >&6; }
12117if test "${ac_cv_c_stack_direction+set}" = set; then :
12118 $as_echo_n "(cached) " >&6
12119else
12120 if test "$cross_compiling" = yes; then :
12121 ac_cv_c_stack_direction=0
12122else
12123 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12124/* end confdefs.h. */
12125$ac_includes_default
12126int
12127find_stack_direction ()
12128{
12129 static char *addr = 0;
12130 auto char dummy;
12131 if (addr == 0)
12132 {
12133 addr = &dummy;
12134 return find_stack_direction ();
12135 }
12136 else
12137 return (&dummy > addr) ? 1 : -1;
12138}
12139
12140int
12141main ()
12142{
12143 return find_stack_direction () < 0;
12144}
12145_ACEOF
12146if ac_fn_c_try_run "$LINENO"; then :
12147 ac_cv_c_stack_direction=1
12148else
12149 ac_cv_c_stack_direction=-1
12150fi
12151rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12152 conftest.$ac_objext conftest.beam conftest.$ac_ext
12153fi
12154
12155fi
12156{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
12157$as_echo "$ac_cv_c_stack_direction" >&6; }
12158cat >>confdefs.h <<_ACEOF
12159#define STACK_DIRECTION $ac_cv_c_stack_direction
12160_ACEOF
12161
12162
12163fi
12164
12165
12166
12167 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
12168$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
12169if test "${am_cv_langinfo_codeset+set}" = set; then :
12170 $as_echo_n "(cached) " >&6
12171else
12172 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12173/* end confdefs.h. */
12174#include <langinfo.h>
12175int
12176main ()
12177{
12178char* cs = nl_langinfo(CODESET);
12179 ;
12180 return 0;
12181}
12182_ACEOF
12183if ac_fn_c_try_link "$LINENO"; then :
12184 am_cv_langinfo_codeset=yes
12185else
12186 am_cv_langinfo_codeset=no
12187fi
12188rm -f core conftest.err conftest.$ac_objext \
12189 conftest$ac_exeext conftest.$ac_ext
12190
12191fi
12192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
12193$as_echo "$am_cv_langinfo_codeset" >&6; }
12194 if test $am_cv_langinfo_codeset = yes; then
12195
12196$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
12197
12198 fi
12199
12200
a3d08894 12201 for ac_header in linux/perf_event.h locale.h memory.h signal.h sys/resource.h sys/socket.h sys/syscall.h sys/un.h sys/wait.h thread_db.h wait.h
3266f10b
TT
12202do :
12203 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12204ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12205eval as_val=\$$as_ac_Header
12206 if test "x$as_val" = x""yes; then :
12207 cat >>confdefs.h <<_ACEOF
12208#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12209_ACEOF
12210
12211fi
12212
12213done
12214
12215
f348d89a 12216 for ac_func in fdwalk getrlimit pipe pipe2 socketpair sigaction
3266f10b
TT
12217do :
12218 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12219ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12220eval as_val=\$$as_ac_var
12221 if test "x$as_val" = x""yes; then :
12222 cat >>confdefs.h <<_ACEOF
12223#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12224_ACEOF
12225
12226fi
12227done
12228
12229
12230 ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default"
12231if test "x$ac_cv_have_decl_strerror" = x""yes; then :
12232 ac_have_decl=1
12233else
12234 ac_have_decl=0
12235fi
12236
12237cat >>confdefs.h <<_ACEOF
12238#define HAVE_DECL_STRERROR $ac_have_decl
12239_ACEOF
12240ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
12241if test "x$ac_cv_have_decl_strstr" = x""yes; then :
12242 ac_have_decl=1
12243else
12244 ac_have_decl=0
12245fi
12246
12247cat >>confdefs.h <<_ACEOF
12248#define HAVE_DECL_STRSTR $ac_have_decl
12249_ACEOF
12250
12251
e9bcb658
GB
12252 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
12253$as_echo_n "checking for sigsetjmp... " >&6; }
12254if test "${gdb_cv_func_sigsetjmp+set}" = set; then :
12255 $as_echo_n "(cached) " >&6
12256else
12257 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12258/* end confdefs.h. */
12259
12260#include <setjmp.h>
12261
12262int
12263main ()
12264{
12265sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
12266 ;
12267 return 0;
12268}
12269_ACEOF
12270if ac_fn_c_try_compile "$LINENO"; then :
12271 gdb_cv_func_sigsetjmp=yes
12272else
12273 gdb_cv_func_sigsetjmp=no
12274fi
12275rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12276fi
12277{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
12278$as_echo "$gdb_cv_func_sigsetjmp" >&6; }
12279if test $gdb_cv_func_sigsetjmp = yes; then
12280
12281$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
12282
12283fi
12284
3266f10b 12285
54019719
PA
12286# Check the return and argument types of ptrace.
12287
12288
54019719
PA
12289for ac_header in sys/ptrace.h ptrace.h
12290do :
12291 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12292ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12293eval as_val=\$$as_ac_Header
12294 if test "x$as_val" = x""yes; then :
12295 cat >>confdefs.h <<_ACEOF
12296#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12297_ACEOF
12298
12299fi
12300
12301done
12302
12303
a3828db0 12304gdb_ptrace_headers='
4ff70b84 12305#include <sys/types.h>
a3828db0
MK
12306#if HAVE_SYS_PTRACE_H
12307# include <sys/ptrace.h>
12308#endif
12309#if HAVE_UNISTD_H
12310# include <unistd.h>
12311#endif
12312'
12313# There is no point in checking if we don't have a prototype.
9b30624b 12314ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers
81ecdfbb
RW
12315"
12316if test "x$ac_cv_have_decl_ptrace" = x""yes; then :
12317 ac_have_decl=1
06825bd1 12318else
81ecdfbb 12319 ac_have_decl=0
06825bd1 12320fi
06825bd1 12321
a3828db0 12322cat >>confdefs.h <<_ACEOF
81ecdfbb 12323#define HAVE_DECL_PTRACE $ac_have_decl
a3828db0 12324_ACEOF
81ecdfbb 12325if test $ac_have_decl = 1; then :
bec39cab 12326
a3828db0 12327else
a3828db0
MK
12328
12329 : ${gdb_cv_func_ptrace_ret='int'}
12330 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
12331
06825bd1
MK
12332fi
12333
064ef605
DJ
12334# Check return type. Varargs (used on GNU/Linux) conflict with the
12335# empty argument list, so check for that explicitly.
81ecdfbb
RW
12336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
12337$as_echo_n "checking return type of ptrace... " >&6; }
12338if test "${gdb_cv_func_ptrace_ret+set}" = set; then :
12339 $as_echo_n "(cached) " >&6
bec39cab 12340else
81ecdfbb 12341 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12342/* end confdefs.h. */
a3828db0 12343$gdb_ptrace_headers
bec39cab
AC
12344int
12345main ()
12346{
064ef605
DJ
12347extern long ptrace (enum __ptrace_request, ...);
12348 ;
12349 return 0;
12350}
12351_ACEOF
9b30624b 12352if ac_fn_c_try_compile "$LINENO"; then :
064ef605
DJ
12353 gdb_cv_func_ptrace_ret='long'
12354else
81ecdfbb 12355 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
12356/* end confdefs.h. */
12357$gdb_ptrace_headers
12358int
12359main ()
12360{
a3828db0 12361extern int ptrace ();
bec39cab
AC
12362 ;
12363 return 0;
12364}
12365_ACEOF
9b30624b 12366if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12367 gdb_cv_func_ptrace_ret='int'
70f9f479 12368else
81ecdfbb 12369 gdb_cv_func_ptrace_ret='long'
70f9f479 12370fi
81ecdfbb 12371rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
70f9f479 12372fi
81ecdfbb 12373rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
064ef605 12374fi
81ecdfbb
RW
12375{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
12376$as_echo "$gdb_cv_func_ptrace_ret" >&6; }
bec39cab 12377
a3828db0
MK
12378cat >>confdefs.h <<_ACEOF
12379#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
bec39cab 12380_ACEOF
70f9f479 12381
a3828db0 12382# Check argument types.
81ecdfbb
RW
12383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
12384$as_echo_n "checking types of arguments for ptrace... " >&6; }
12385if test "${gdb_cv_func_ptrace_args+set}" = set; then :
12386 $as_echo_n "(cached) " >&6
bec39cab 12387else
a3828db0 12388
81ecdfbb 12389 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
12390/* end confdefs.h. */
12391$gdb_ptrace_headers
12392int
12393main ()
12394{
12395extern long ptrace (enum __ptrace_request, ...);
12396 ;
12397 return 0;
12398}
12399_ACEOF
9b30624b 12400if ac_fn_c_try_compile "$LINENO"; then :
54019719 12401 gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long'
064ef605 12402else
064ef605 12403
a3828db0
MK
12404for gdb_arg1 in 'int' 'long'; do
12405 for gdb_arg2 in 'pid_t' 'int' 'long'; do
5ed10e6e 12406 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
96d7229d 12407 for gdb_arg4 in 'int' 'long' 'void *'; do
81ecdfbb 12408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12409/* end confdefs.h. */
a3828db0 12410$gdb_ptrace_headers
bec39cab
AC
12411int
12412main ()
12413{
a3828db0
MK
12414
12415extern $gdb_cv_func_ptrace_ret
12416 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
12417
bec39cab
AC
12418 ;
12419 return 0;
12420}
12421_ACEOF
9b30624b 12422if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
12423 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
12424 break 4;
5c7f2947 12425fi
81ecdfbb 12426rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0 12427 for gdb_arg5 in 'int *' 'int' 'long'; do
81ecdfbb 12428 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12429/* end confdefs.h. */
a3828db0 12430$gdb_ptrace_headers
bec39cab
AC
12431int
12432main ()
12433{
a3828db0
MK
12434
12435extern $gdb_cv_func_ptrace_ret
12436 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
12437
bec39cab
AC
12438 ;
12439 return 0;
12440}
12441_ACEOF
9b30624b 12442if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
12443
12444gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
12445 break 5;
78434e59 12446fi
81ecdfbb 12447rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0
MK
12448 done
12449 done
12450 done
12451 done
12452done
12453# Provide a safe default value.
12454: ${gdb_cv_func_ptrace_args='int,int,long,long'}
12455
064ef605 12456fi
81ecdfbb 12457rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
78434e59 12458fi
81ecdfbb
RW
12459{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
12460$as_echo "$gdb_cv_func_ptrace_args" >&6; }
a3828db0
MK
12461ac_save_IFS=$IFS; IFS=','
12462set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
12463IFS=$ac_save_IFS
12464shift
bec39cab 12465
54019719
PA
12466cat >>confdefs.h <<_ACEOF
12467#define PTRACE_TYPE_ARG1 $1
12468_ACEOF
12469
12470
a3828db0
MK
12471cat >>confdefs.h <<_ACEOF
12472#define PTRACE_TYPE_ARG3 $3
12473_ACEOF
12474
96d7229d
LM
12475
12476cat >>confdefs.h <<_ACEOF
12477#define PTRACE_TYPE_ARG4 $4
12478_ACEOF
12479
a3828db0
MK
12480if test -n "$5"; then
12481
12482cat >>confdefs.h <<_ACEOF
12483#define PTRACE_TYPE_ARG5 $5
bec39cab 12484_ACEOF
78434e59
MK
12485
12486fi
12487
54019719 12488
a3828db0 12489if test "$cross_compiling" = no; then
81ecdfbb
RW
12490 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
12491$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
12492if test "${ac_cv_func_setpgrp_void+set}" = set; then :
12493 $as_echo_n "(cached) " >&6
a3828db0 12494else
81ecdfbb
RW
12495 if test "$cross_compiling" = yes; then :
12496 as_fn_error "cannot check setpgrp when cross compiling" "$LINENO" 5
bec39cab 12497else
81ecdfbb 12498 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12499/* end confdefs.h. */
81ecdfbb 12500$ac_includes_default
bec39cab
AC
12501int
12502main ()
12503{
a3828db0
MK
12504/* If this system has a BSD-style setpgrp which takes arguments,
12505 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
12506 exit successfully. */
81ecdfbb 12507 return setpgrp (1,1) != -1;
bec39cab
AC
12508 ;
12509 return 0;
12510}
12511_ACEOF
81ecdfbb 12512if ac_fn_c_try_run "$LINENO"; then :
a3828db0 12513 ac_cv_func_setpgrp_void=no
c906108c 12514else
81ecdfbb 12515 ac_cv_func_setpgrp_void=yes
c906108c 12516fi
81ecdfbb
RW
12517rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12518 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 12519fi
81ecdfbb 12520
a3828db0 12521fi
81ecdfbb
RW
12522{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
12523$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0
MK
12524if test $ac_cv_func_setpgrp_void = yes; then
12525
81ecdfbb 12526$as_echo "#define SETPGRP_VOID 1" >>confdefs.h
97bf5e38
MK
12527
12528fi
a3828db0
MK
12529
12530else
81ecdfbb
RW
12531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
12532$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
12533if test "${ac_cv_func_setpgrp_void+set}" = set; then :
12534 $as_echo_n "(cached) " >&6
97bf5e38 12535else
81ecdfbb 12536 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12537/* end confdefs.h. */
a3828db0
MK
12538
12539#include <unistd.h>
12540
bec39cab
AC
12541int
12542main ()
12543{
a3828db0
MK
12544
12545 if (setpgrp(1,1) == -1)
12546 exit (0);
12547 else
12548 exit (1);
12549
bec39cab
AC
12550 ;
12551 return 0;
12552}
12553_ACEOF
81ecdfbb 12554if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12555 ac_cv_func_setpgrp_void=no
c906108c 12556else
81ecdfbb 12557 ac_cv_func_setpgrp_void=yes
c906108c 12558fi
81ecdfbb 12559rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 12560fi
81ecdfbb
RW
12561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
12562$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0 12563if test $ac_cv_func_setpgrp_void = yes; then
81ecdfbb 12564 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
c3f6f71d 12565
a3828db0 12566fi
c906108c
SS
12567fi
12568
db1ff28b
JK
12569# Assume we'll default to using the included libiberty regex.
12570gdb_use_included_regex=yes
12571
12572# However, if the system regex is GNU regex, then default to *not*
12573# using the included regex.
12574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5
12575$as_echo_n "checking for GNU regex... " >&6; }
12576if test "${gdb_cv_have_gnu_regex+set}" = set; then :
12577 $as_echo_n "(cached) " >&6
12578else
12579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12580/* end confdefs.h. */
12581#include <gnu-versions.h>
12582int
12583main ()
12584{
12585#define REGEX_INTERFACE_VERSION 1
12586#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
12587# error "Version mismatch"
12588#endif
12589 ;
12590 return 0;
12591}
12592_ACEOF
12593if ac_fn_c_try_compile "$LINENO"; then :
12594 gdb_cv_have_gnu_regex=yes
12595else
12596 gdb_cv_have_gnu_regex=no
12597fi
12598rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12599fi
12600{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
12601$as_echo "$gdb_cv_have_gnu_regex" >&6; }
12602if test $gdb_cv_have_gnu_regex = yes; then
12603 gdb_use_included_regex=no
12604fi
12605
12606
12607# Check whether --with-included-regex was given.
12608if test "${with_included_regex+set}" = set; then :
12609 withval=$with_included_regex; gdb_with_regex=$withval
12610else
12611 gdb_with_regex=$gdb_use_included_regex
12612fi
12613
12614if test "$gdb_with_regex" = yes; then
12615
12616$as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h
12617
12618fi
12619
81ecdfbb
RW
12620# Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
12621ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
12622#include <sys/proc.h>
12623
12624"
12625if test "x$ac_cv_member_struct_thread_td_pcb" = x""yes; then :
c906108c 12626
5c45e068 12627cat >>confdefs.h <<_ACEOF
a3828db0 12628#define HAVE_STRUCT_THREAD_TD_PCB 1
bec39cab 12629_ACEOF
c906108c 12630
5c45e068 12631
97bf5e38 12632fi
c906108c 12633
5c45e068 12634
a3828db0 12635# See if <sys/lwp.h> defines `struct lwp`.
81ecdfbb
RW
12636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
12637$as_echo_n "checking for struct lwp... " >&6; }
12638if test "${gdb_cv_struct_lwp+set}" = set; then :
12639 $as_echo_n "(cached) " >&6
bec39cab 12640else
81ecdfbb 12641 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12642/* end confdefs.h. */
a3828db0
MK
12643#include <sys/param.h>
12644#include <sys/lwp.h>
bec39cab
AC
12645int
12646main ()
12647{
a3828db0 12648struct lwp l;
bec39cab
AC
12649 ;
12650 return 0;
12651}
12652_ACEOF
81ecdfbb 12653if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12654 gdb_cv_struct_lwp=yes
c906108c 12655else
81ecdfbb 12656 gdb_cv_struct_lwp=no
c906108c 12657fi
81ecdfbb 12658rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 12659fi
81ecdfbb
RW
12660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
12661$as_echo "$gdb_cv_struct_lwp" >&6; }
a3828db0 12662if test $gdb_cv_struct_lwp = yes; then
c906108c 12663
81ecdfbb 12664$as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
c906108c 12665
97bf5e38 12666fi
c906108c 12667
a3828db0 12668# See if <machine/reg.h> degines `struct reg'.
81ecdfbb
RW
12669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
12670$as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
12671if test "${gdb_cv_struct_reg+set}" = set; then :
12672 $as_echo_n "(cached) " >&6
bec39cab 12673else
81ecdfbb 12674 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12675/* end confdefs.h. */
a3828db0
MK
12676#include <sys/types.h>
12677#include <machine/reg.h>
bec39cab
AC
12678int
12679main ()
12680{
a3828db0 12681struct reg r;
bec39cab
AC
12682 ;
12683 return 0;
12684}
12685_ACEOF
81ecdfbb 12686if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12687 gdb_cv_struct_reg=yes
27ca5dad 12688else
81ecdfbb 12689 gdb_cv_struct_reg=no
27ca5dad 12690fi
81ecdfbb 12691rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27ca5dad 12692fi
81ecdfbb
RW
12693{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
12694$as_echo "$gdb_cv_struct_reg" >&6; }
a3828db0 12695if test $gdb_cv_struct_reg = yes; then
bec39cab 12696
81ecdfbb 12697$as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
27ca5dad
MC
12698
12699fi
97bf5e38 12700
a3828db0
MK
12701# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
12702# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
a6e69c1f
JB
12703ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <sys/types.h>
12704#include <machine/reg.h>
81ecdfbb
RW
12705"
12706if test "x$ac_cv_member_struct_reg_r_fs" = x""yes; then :
5c45e068
MK
12707
12708cat >>confdefs.h <<_ACEOF
a3828db0 12709#define HAVE_STRUCT_REG_R_FS 1
bec39cab 12710_ACEOF
3862412b 12711
5c45e068 12712
97bf5e38 12713fi
a6e69c1f
JB
12714ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <sys/types.h>
12715#include <machine/reg.h>
81ecdfbb
RW
12716"
12717if test "x$ac_cv_member_struct_reg_r_gs" = x""yes; then :
5c45e068
MK
12718
12719cat >>confdefs.h <<_ACEOF
a3828db0 12720#define HAVE_STRUCT_REG_R_GS 1
bec39cab 12721_ACEOF
3862412b 12722
5c45e068 12723
97bf5e38 12724fi
3862412b 12725
5c45e068 12726
6fea9e18
L
12727# See if <sys/user.h> supports the %fs_base and %gs_bas amd64 segment registers.
12728# Older amd64 Linux's don't have the fs_base and gs_base members of
12729# `struct user_regs_struct'.
12730ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "fs_base" "ac_cv_member_struct_user_regs_struct_fs_base" "#include <sys/user.h>
12731"
12732if test "x$ac_cv_member_struct_user_regs_struct_fs_base" = x""yes; then :
12733
12734cat >>confdefs.h <<_ACEOF
12735#define HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE 1
12736_ACEOF
12737
12738
12739fi
12740ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "gs_base" "ac_cv_member_struct_user_regs_struct_gs_base" "#include <sys/user.h>
12741"
12742if test "x$ac_cv_member_struct_user_regs_struct_gs_base" = x""yes; then :
12743
12744cat >>confdefs.h <<_ACEOF
12745#define HAVE_STRUCT_USER_REGS_STRUCT_GS_BASE 1
12746_ACEOF
12747
12748
12749fi
12750
12751
a3828db0 12752# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
81ecdfbb
RW
12753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
12754$as_echo_n "checking for PTRACE_GETREGS... " >&6; }
12755if test "${gdb_cv_have_ptrace_getregs+set}" = set; then :
12756 $as_echo_n "(cached) " >&6
451928c5 12757else
81ecdfbb 12758 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12759/* end confdefs.h. */
a3828db0 12760#include <sys/ptrace.h>
bec39cab
AC
12761int
12762main ()
12763{
a3828db0 12764PTRACE_GETREGS;
bec39cab
AC
12765 ;
12766 return 0;
12767}
12768_ACEOF
81ecdfbb 12769if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12770 gdb_cv_have_ptrace_getregs=yes
451928c5 12771else
81ecdfbb 12772 gdb_cv_have_ptrace_getregs=no
451928c5 12773fi
81ecdfbb 12774rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
12775fi
12776
81ecdfbb
RW
12777{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
12778$as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
a3828db0 12779if test $gdb_cv_have_ptrace_getregs = yes; then
60ca704f 12780
81ecdfbb 12781$as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
451928c5 12782
97bf5e38 12783fi
451928c5 12784
a3828db0 12785# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
81ecdfbb
RW
12786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
12787$as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
12788if test "${gdb_cv_have_ptrace_getfpxregs+set}" = set; then :
12789 $as_echo_n "(cached) " >&6
451928c5 12790else
81ecdfbb 12791 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12792/* end confdefs.h. */
a3828db0 12793#include <sys/ptrace.h>
bec39cab
AC
12794int
12795main ()
12796{
a3828db0 12797PTRACE_GETFPXREGS;
bec39cab
AC
12798 ;
12799 return 0;
12800}
12801_ACEOF
81ecdfbb 12802if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12803 gdb_cv_have_ptrace_getfpxregs=yes
451928c5 12804else
81ecdfbb 12805 gdb_cv_have_ptrace_getfpxregs=no
451928c5 12806fi
81ecdfbb 12807rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
12808fi
12809
81ecdfbb
RW
12810{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
12811$as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
a3828db0 12812if test $gdb_cv_have_ptrace_getfpxregs = yes; then
60ca704f 12813
81ecdfbb 12814$as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
451928c5 12815
97bf5e38 12816fi
451928c5 12817
a3828db0 12818# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
81ecdfbb
RW
12819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
12820$as_echo_n "checking for PT_GETDBREGS... " >&6; }
12821if test "${gdb_cv_have_pt_getdbregs+set}" = set; then :
12822 $as_echo_n "(cached) " >&6
3862412b 12823else
81ecdfbb 12824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12825/* end confdefs.h. */
a3828db0
MK
12826#include <sys/types.h>
12827#include <sys/ptrace.h>
bec39cab
AC
12828int
12829main ()
12830{
a3828db0 12831PT_GETDBREGS;
bec39cab
AC
12832 ;
12833 return 0;
12834}
12835_ACEOF
81ecdfbb 12836if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12837 gdb_cv_have_pt_getdbregs=yes
3862412b 12838else
81ecdfbb 12839 gdb_cv_have_pt_getdbregs=no
3862412b 12840fi
81ecdfbb 12841rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
12842fi
12843
81ecdfbb
RW
12844{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
12845$as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
a3828db0 12846if test $gdb_cv_have_pt_getdbregs = yes; then
60ca704f 12847
81ecdfbb 12848$as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
3862412b 12849
97bf5e38 12850fi
3862412b 12851
a3828db0 12852# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
81ecdfbb
RW
12853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
12854$as_echo_n "checking for PT_GETXMMREGS... " >&6; }
12855if test "${gdb_cv_have_pt_getxmmregs+set}" = set; then :
12856 $as_echo_n "(cached) " >&6
3862412b 12857else
81ecdfbb 12858 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12859/* end confdefs.h. */
a3828db0
MK
12860#include <sys/types.h>
12861#include <sys/ptrace.h>
bec39cab
AC
12862int
12863main ()
12864{
a3828db0 12865PT_GETXMMREGS;
bec39cab
AC
12866 ;
12867 return 0;
12868}
12869_ACEOF
81ecdfbb 12870if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12871 gdb_cv_have_pt_getxmmregs=yes
3862412b 12872else
81ecdfbb 12873 gdb_cv_have_pt_getxmmregs=no
3862412b 12874fi
81ecdfbb 12875rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
12876fi
12877
81ecdfbb
RW
12878{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
12879$as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
a3828db0 12880if test $gdb_cv_have_pt_getxmmregs = yes; then
60ca704f 12881
81ecdfbb 12882$as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
3862412b 12883
97bf5e38 12884fi
3862412b 12885
6e9567fe
JB
12886# See if <sys/ptrace.h> supports LWP names on FreeBSD
12887# Older FreeBSD versions don't have the pl_tdname member of
12888# `struct ptrace_lwpinfo'.
12889ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_tdname" "ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" "#include <sys/ptrace.h>
12890"
12891if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" = x""yes; then :
12892
12893cat >>confdefs.h <<_ACEOF
12894#define HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME 1
12895_ACEOF
12896
12897
12898fi
12899
12900
e6cdd38e
JB
12901# See if <sys/ptrace.h> supports syscall fields on FreeBSD. The
12902# pl_syscall_code member of `struct ptrace_lwpinfo' was added in
12903# FreeBSD 10.3.
12904ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_syscall_code" "ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" "#include <sys/ptrace.h>
12905"
12906if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" = x""yes; then :
12907
12908cat >>confdefs.h <<_ACEOF
12909#define HAVE_STRUCT_PTRACE_LWPINFO_PL_SYSCALL_CODE 1
12910_ACEOF
12911
12912
12913fi
12914
6e9567fe 12915
05b4bd79 12916# Detect which type of /proc is in use, such as for Solaris.
97bf5e38
MK
12917
12918if test "${target}" = "${host}"; then
12919 case "${host}" in
7b00db47 12920 *-*-sysv4.2* | *-*-sysv5* )
60ca704f 12921
81ecdfbb 12922$as_echo "#define NEW_PROC_API 1" >>confdefs.h
97bf5e38
MK
12923
12924 ;;
c162e8c9 12925 *-*-solaris2.[6789] | *-*-solaris2.1[0-9]*)
60ca704f 12926
81ecdfbb 12927$as_echo "#define NEW_PROC_API 1" >>confdefs.h
c960c18f
AC
12928
12929 ;;
12930 mips-sgi-irix5*)
12931 # Work around <sys/proc.h> needing _KMEMUSER problem on IRIX 5.
60ca704f 12932
81ecdfbb 12933$as_echo "#define _KMEMUSER 1" >>confdefs.h
97bf5e38
MK
12934
12935 ;;
12936 esac
12937fi
12938
12939if test "$ac_cv_header_sys_procfs_h" = yes; then
81ecdfbb
RW
12940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
12941$as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
12942 if test "${bfd_cv_have_sys_procfs_type_gregset_t+set}" = set; then :
12943 $as_echo_n "(cached) " >&6
596c9d4b 12944else
81ecdfbb 12945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12946/* end confdefs.h. */
596c9d4b
KB
12947
12948#define _SYSCALL32
d30c5336
JK
12949/* Needed for new procfs interface on sparc-solaris. */
12950#define _STRUCTURED_PROC 1
596c9d4b 12951#include <sys/procfs.h>
bec39cab
AC
12952int
12953main ()
12954{
97bf5e38 12955gregset_t avar
bec39cab
AC
12956 ;
12957 return 0;
12958}
12959_ACEOF
81ecdfbb 12960if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 12961 bfd_cv_have_sys_procfs_type_gregset_t=yes
596c9d4b 12962else
81ecdfbb 12963 bfd_cv_have_sys_procfs_type_gregset_t=no
bec39cab 12964
596c9d4b 12965fi
81ecdfbb 12966rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
12967fi
12968
97bf5e38 12969 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
bec39cab 12970
81ecdfbb 12971$as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
596c9d4b
KB
12972
12973 fi
81ecdfbb
RW
12974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
12975$as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
451928c5 12976
81ecdfbb
RW
12977 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
12978$as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
12979 if test "${bfd_cv_have_sys_procfs_type_fpregset_t+set}" = set; then :
12980 $as_echo_n "(cached) " >&6
d84dd0c5 12981else
81ecdfbb 12982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12983/* end confdefs.h. */
97bf5e38
MK
12984
12985#define _SYSCALL32
d30c5336
JK
12986/* Needed for new procfs interface on sparc-solaris. */
12987#define _STRUCTURED_PROC 1
d84dd0c5 12988#include <sys/procfs.h>
bec39cab
AC
12989int
12990main ()
12991{
97bf5e38 12992fpregset_t avar
bec39cab
AC
12993 ;
12994 return 0;
12995}
12996_ACEOF
81ecdfbb 12997if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 12998 bfd_cv_have_sys_procfs_type_fpregset_t=yes
d84dd0c5 12999else
81ecdfbb 13000 bfd_cv_have_sys_procfs_type_fpregset_t=no
bec39cab 13001
d84dd0c5 13002fi
81ecdfbb 13003rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d84dd0c5
MK
13004fi
13005
97bf5e38 13006 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
bec39cab 13007
81ecdfbb 13008$as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
d84dd0c5 13009
97bf5e38 13010 fi
81ecdfbb
RW
13011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
13012$as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
d84dd0c5 13013
81ecdfbb
RW
13014 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
13015$as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
13016 if test "${bfd_cv_have_sys_procfs_type_prgregset_t+set}" = set; then :
13017 $as_echo_n "(cached) " >&6
c906108c 13018else
81ecdfbb 13019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13020/* end confdefs.h. */
c906108c 13021
97bf5e38 13022#define _SYSCALL32
d30c5336
JK
13023/* Needed for new procfs interface on sparc-solaris. */
13024#define _STRUCTURED_PROC 1
97bf5e38 13025#include <sys/procfs.h>
bec39cab
AC
13026int
13027main ()
13028{
97bf5e38 13029prgregset_t avar
bec39cab
AC
13030 ;
13031 return 0;
13032}
13033_ACEOF
81ecdfbb 13034if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13035 bfd_cv_have_sys_procfs_type_prgregset_t=yes
c906108c 13036else
81ecdfbb 13037 bfd_cv_have_sys_procfs_type_prgregset_t=no
bec39cab 13038
c906108c 13039fi
81ecdfbb 13040rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13041fi
13042
97bf5e38 13043 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
bec39cab 13044
81ecdfbb 13045$as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
c906108c 13046
97bf5e38 13047 fi
81ecdfbb
RW
13048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
13049$as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
c906108c 13050
81ecdfbb
RW
13051 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
13052$as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
13053 if test "${bfd_cv_have_sys_procfs_type_prfpregset_t+set}" = set; then :
13054 $as_echo_n "(cached) " >&6
d45fe813 13055else
81ecdfbb 13056 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13057/* end confdefs.h. */
97bf5e38
MK
13058
13059#define _SYSCALL32
d30c5336
JK
13060/* Needed for new procfs interface on sparc-solaris. */
13061#define _STRUCTURED_PROC 1
97bf5e38 13062#include <sys/procfs.h>
bec39cab
AC
13063int
13064main ()
13065{
97bf5e38 13066prfpregset_t avar
bec39cab
AC
13067 ;
13068 return 0;
13069}
13070_ACEOF
81ecdfbb 13071if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13072 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
d45fe813 13073else
81ecdfbb 13074 bfd_cv_have_sys_procfs_type_prfpregset_t=no
bec39cab 13075
d45fe813 13076fi
81ecdfbb 13077rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
13078fi
13079
97bf5e38 13080 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
bec39cab 13081
81ecdfbb 13082$as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
d45fe813 13083
97bf5e38 13084 fi
81ecdfbb
RW
13085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
13086$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
d45fe813 13087
81ecdfbb
RW
13088 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
13089$as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
13090 if test "${bfd_cv_have_sys_procfs_type_prgregset32_t+set}" = set; then :
13091 $as_echo_n "(cached) " >&6
d45fe813 13092else
81ecdfbb 13093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13094/* end confdefs.h. */
97bf5e38
MK
13095
13096#define _SYSCALL32
d30c5336
JK
13097/* Needed for new procfs interface on sparc-solaris. */
13098#define _STRUCTURED_PROC 1
97bf5e38 13099#include <sys/procfs.h>
bec39cab
AC
13100int
13101main ()
13102{
97bf5e38 13103prgregset32_t avar
bec39cab
AC
13104 ;
13105 return 0;
13106}
13107_ACEOF
81ecdfbb 13108if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13109 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
d45fe813 13110else
81ecdfbb 13111 bfd_cv_have_sys_procfs_type_prgregset32_t=no
bec39cab 13112
d45fe813 13113fi
81ecdfbb 13114rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
13115fi
13116
97bf5e38 13117 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
bec39cab 13118
81ecdfbb 13119$as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
d45fe813 13120
97bf5e38 13121 fi
81ecdfbb
RW
13122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
13123$as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
d45fe813 13124
81ecdfbb
RW
13125 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
13126$as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
13127 if test "${bfd_cv_have_sys_procfs_type_lwpid_t+set}" = set; then :
13128 $as_echo_n "(cached) " >&6
d45fe813 13129else
81ecdfbb 13130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13131/* end confdefs.h. */
97bf5e38 13132
d45fe813 13133#define _SYSCALL32
d30c5336
JK
13134/* Needed for new procfs interface on sparc-solaris. */
13135#define _STRUCTURED_PROC 1
97bf5e38 13136#include <sys/procfs.h>
bec39cab
AC
13137int
13138main ()
13139{
97bf5e38 13140lwpid_t avar
bec39cab
AC
13141 ;
13142 return 0;
13143}
13144_ACEOF
81ecdfbb 13145if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13146 bfd_cv_have_sys_procfs_type_lwpid_t=yes
d45fe813 13147else
81ecdfbb 13148 bfd_cv_have_sys_procfs_type_lwpid_t=no
bec39cab 13149
d45fe813 13150fi
81ecdfbb 13151rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
13152fi
13153
97bf5e38 13154 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
bec39cab 13155
81ecdfbb 13156$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
d45fe813 13157
97bf5e38 13158 fi
81ecdfbb
RW
13159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
13160$as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
c906108c 13161
81ecdfbb
RW
13162 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
13163$as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
13164 if test "${bfd_cv_have_sys_procfs_type_psaddr_t+set}" = set; then :
13165 $as_echo_n "(cached) " >&6
c906108c 13166else
81ecdfbb 13167 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13168/* end confdefs.h. */
c906108c 13169
97bf5e38 13170#define _SYSCALL32
d30c5336
JK
13171/* Needed for new procfs interface on sparc-solaris. */
13172#define _STRUCTURED_PROC 1
97bf5e38 13173#include <sys/procfs.h>
bec39cab
AC
13174int
13175main ()
13176{
97bf5e38 13177psaddr_t avar
bec39cab
AC
13178 ;
13179 return 0;
13180}
13181_ACEOF
81ecdfbb 13182if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13183 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c 13184else
81ecdfbb 13185 bfd_cv_have_sys_procfs_type_psaddr_t=no
bec39cab 13186
c906108c 13187fi
81ecdfbb 13188rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13189fi
13190
97bf5e38 13191 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
bec39cab 13192
81ecdfbb 13193$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
c906108c 13194
97bf5e38 13195 fi
81ecdfbb
RW
13196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
13197$as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
c906108c 13198
81ecdfbb
RW
13199 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prsysent_t in sys/procfs.h" >&5
13200$as_echo_n "checking for prsysent_t in sys/procfs.h... " >&6; }
13201 if test "${bfd_cv_have_sys_procfs_type_prsysent_t+set}" = set; then :
13202 $as_echo_n "(cached) " >&6
c906108c 13203else
81ecdfbb 13204 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13205/* end confdefs.h. */
c906108c 13206
97bf5e38 13207#define _SYSCALL32
d30c5336
JK
13208/* Needed for new procfs interface on sparc-solaris. */
13209#define _STRUCTURED_PROC 1
97bf5e38 13210#include <sys/procfs.h>
bec39cab
AC
13211int
13212main ()
13213{
97bf5e38 13214prsysent_t avar
bec39cab
AC
13215 ;
13216 return 0;
13217}
13218_ACEOF
81ecdfbb 13219if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13220 bfd_cv_have_sys_procfs_type_prsysent_t=yes
c906108c 13221else
81ecdfbb 13222 bfd_cv_have_sys_procfs_type_prsysent_t=no
bec39cab 13223
c906108c 13224fi
81ecdfbb 13225rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13226fi
13227
97bf5e38 13228 if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
bec39cab 13229
81ecdfbb 13230$as_echo "#define HAVE_PRSYSENT_T 1" >>confdefs.h
c906108c 13231
97bf5e38 13232 fi
81ecdfbb
RW
13233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prsysent_t" >&5
13234$as_echo "$bfd_cv_have_sys_procfs_type_prsysent_t" >&6; }
c906108c 13235
81ecdfbb
RW
13236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigset_t in sys/procfs.h" >&5
13237$as_echo_n "checking for pr_sigset_t in sys/procfs.h... " >&6; }
13238 if test "${bfd_cv_have_sys_procfs_type_pr_sigset_t+set}" = set; then :
13239 $as_echo_n "(cached) " >&6
c906108c 13240else
81ecdfbb 13241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13242/* end confdefs.h. */
c906108c 13243
97bf5e38 13244#define _SYSCALL32
d30c5336
JK
13245/* Needed for new procfs interface on sparc-solaris. */
13246#define _STRUCTURED_PROC 1
97bf5e38 13247#include <sys/procfs.h>
bec39cab
AC
13248int
13249main ()
13250{
97bf5e38 13251pr_sigset_t avar
bec39cab
AC
13252 ;
13253 return 0;
13254}
13255_ACEOF
81ecdfbb 13256if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13257 bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
c906108c 13258else
81ecdfbb 13259 bfd_cv_have_sys_procfs_type_pr_sigset_t=no
bec39cab 13260
c906108c 13261fi
81ecdfbb 13262rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13263fi
13264
97bf5e38 13265 if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
bec39cab 13266
81ecdfbb 13267$as_echo "#define HAVE_PR_SIGSET_T 1" >>confdefs.h
c906108c 13268
97bf5e38 13269 fi
81ecdfbb
RW
13270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigset_t" >&5
13271$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigset_t" >&6; }
c906108c 13272
81ecdfbb
RW
13273 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigaction64_t in sys/procfs.h" >&5
13274$as_echo_n "checking for pr_sigaction64_t in sys/procfs.h... " >&6; }
13275 if test "${bfd_cv_have_sys_procfs_type_pr_sigaction64_t+set}" = set; then :
13276 $as_echo_n "(cached) " >&6
c906108c 13277else
81ecdfbb 13278 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13279/* end confdefs.h. */
c906108c 13280
97bf5e38 13281#define _SYSCALL32
d30c5336
JK
13282/* Needed for new procfs interface on sparc-solaris. */
13283#define _STRUCTURED_PROC 1
97bf5e38 13284#include <sys/procfs.h>
bec39cab
AC
13285int
13286main ()
13287{
97bf5e38 13288pr_sigaction64_t avar
bec39cab
AC
13289 ;
13290 return 0;
13291}
13292_ACEOF
81ecdfbb 13293if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13294 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
c906108c 13295else
81ecdfbb 13296 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
bec39cab 13297
c906108c 13298fi
81ecdfbb 13299rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13300fi
13301
97bf5e38 13302 if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
bec39cab 13303
81ecdfbb 13304$as_echo "#define HAVE_PR_SIGACTION64_T 1" >>confdefs.h
c906108c 13305
97bf5e38 13306 fi
81ecdfbb
RW
13307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&5
13308$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&6; }
97bf5e38 13309
81ecdfbb
RW
13310 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_siginfo64_t in sys/procfs.h" >&5
13311$as_echo_n "checking for pr_siginfo64_t in sys/procfs.h... " >&6; }
13312 if test "${bfd_cv_have_sys_procfs_type_pr_siginfo64_t+set}" = set; then :
13313 $as_echo_n "(cached) " >&6
97bf5e38 13314else
81ecdfbb 13315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13316/* end confdefs.h. */
97bf5e38
MK
13317
13318#define _SYSCALL32
d30c5336
JK
13319/* Needed for new procfs interface on sparc-solaris. */
13320#define _STRUCTURED_PROC 1
97bf5e38 13321#include <sys/procfs.h>
bec39cab
AC
13322int
13323main ()
13324{
97bf5e38 13325pr_siginfo64_t avar
bec39cab
AC
13326 ;
13327 return 0;
13328}
13329_ACEOF
81ecdfbb 13330if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
13331 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
13332else
81ecdfbb 13333 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
bec39cab 13334
97bf5e38 13335fi
81ecdfbb 13336rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 13337fi
c906108c 13338
97bf5e38 13339 if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
bec39cab 13340
81ecdfbb 13341$as_echo "#define HAVE_PR_SIGINFO64_T 1" >>confdefs.h
c906108c 13342
97bf5e38 13343 fi
81ecdfbb
RW
13344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&5
13345$as_echo "$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&6; }
bec39cab
AC
13346
13347
97bf5e38
MK
13348
13349
13350
97bf5e38 13351 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
81ecdfbb
RW
13352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether prfpregset_t type is broken" >&5
13353$as_echo_n "checking whether prfpregset_t type is broken... " >&6; }
13354 if test "${gdb_cv_prfpregset_t_broken+set}" = set; then :
13355 $as_echo_n "(cached) " >&6
c906108c 13356else
81ecdfbb 13357 if test "$cross_compiling" = yes; then :
97bf5e38 13358 gdb_cv_prfpregset_t_broken=yes
c906108c 13359else
81ecdfbb 13360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13361/* end confdefs.h. */
97bf5e38
MK
13362#include <sys/procfs.h>
13363 int main ()
13364 {
13365 if (sizeof (prfpregset_t) == sizeof (void *))
13366 return 1;
13367 return 0;
13368 }
bec39cab 13369_ACEOF
81ecdfbb 13370if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 13371 gdb_cv_prfpregset_t_broken=no
81ecdfbb
RW
13372else
13373 gdb_cv_prfpregset_t_broken=yes
c906108c 13374fi
81ecdfbb
RW
13375rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13376 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 13377fi
81ecdfbb 13378
c906108c
SS
13379fi
13380
81ecdfbb
RW
13381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_prfpregset_t_broken" >&5
13382$as_echo "$gdb_cv_prfpregset_t_broken" >&6; }
97bf5e38 13383 if test $gdb_cv_prfpregset_t_broken = yes; then
60ca704f 13384
81ecdfbb 13385$as_echo "#define PRFPREGSET_T_BROKEN 1" >>confdefs.h
c906108c 13386
97bf5e38
MK
13387 fi
13388 fi
c906108c 13389fi
c906108c 13390
bc8bcb4b 13391# Check if the compiler supports the `long long' type.
c906108c 13392
81ecdfbb
RW
13393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
13394$as_echo_n "checking for long long support in compiler... " >&6; }
13395if test "${gdb_cv_c_long_long+set}" = set; then :
13396 $as_echo_n "(cached) " >&6
97bf5e38 13397else
81ecdfbb 13398 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13399/* end confdefs.h. */
bc8bcb4b 13400extern long long foo;
bec39cab
AC
13401int
13402main ()
13403{
bc8bcb4b 13404switch (foo & 2) { case 0: return 1; }
bec39cab
AC
13405 ;
13406 return 0;
13407}
13408_ACEOF
81ecdfbb 13409if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
13410 gdb_cv_c_long_long=yes
13411else
81ecdfbb 13412 gdb_cv_c_long_long=no
97bf5e38 13413fi
81ecdfbb 13414rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 13415fi
81ecdfbb
RW
13416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
13417$as_echo "$gdb_cv_c_long_long" >&6; }
74a0d9f6
JK
13418if test $gdb_cv_c_long_long != yes; then
13419 # libdecnumber requires long long.
13420 as_fn_error "Compiler must support long long for GDB." "$LINENO" 5
97bf5e38
MK
13421fi
13422
bc8bcb4b 13423# Check if the compiler and runtime support printing long longs.
97bf5e38 13424
81ecdfbb
RW
13425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
13426$as_echo_n "checking for long long support in printf... " >&6; }
13427if test "${gdb_cv_printf_has_long_long+set}" = set; then :
13428 $as_echo_n "(cached) " >&6
97bf5e38 13429else
81ecdfbb 13430 if test "$cross_compiling" = yes; then :
97bf5e38
MK
13431 gdb_cv_printf_has_long_long=no
13432else
81ecdfbb 13433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13434/* end confdefs.h. */
bc8bcb4b
MK
13435$ac_includes_default
13436int
13437main ()
13438{
13439char buf[32];
97bf5e38
MK
13440 long long l = 0;
13441 l = (l << 16) + 0x0123;
13442 l = (l << 16) + 0x4567;
13443 l = (l << 16) + 0x89ab;
13444 l = (l << 16) + 0xcdef;
13445 sprintf (buf, "0x%016llx", l);
13446 return (strcmp ("0x0123456789abcdef", buf));
bc8bcb4b
MK
13447 ;
13448 return 0;
c906108c 13449}
bec39cab 13450_ACEOF
81ecdfbb 13451if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
13452 gdb_cv_printf_has_long_long=yes
13453else
81ecdfbb 13454 gdb_cv_printf_has_long_long=no
97bf5e38 13455fi
81ecdfbb
RW
13456rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13457 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 13458fi
81ecdfbb 13459
97bf5e38 13460fi
81ecdfbb
RW
13461{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
13462$as_echo "$gdb_cv_printf_has_long_long" >&6; }
97bf5e38 13463if test $gdb_cv_printf_has_long_long = yes; then
bc8bcb4b 13464
81ecdfbb 13465$as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
97bf5e38
MK
13466
13467fi
97bf5e38 13468
1a619819
LM
13469# Check if the compiler and runtime support printing decfloats.
13470
81ecdfbb
RW
13471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
13472$as_echo_n "checking for decfloat support in printf... " >&6; }
13473if test "${gdb_cv_printf_has_decfloat+set}" = set; then :
13474 $as_echo_n "(cached) " >&6
1a619819 13475else
81ecdfbb 13476 if test "$cross_compiling" = yes; then :
1a619819
LM
13477 gdb_cv_printf_has_decfloat=no
13478else
81ecdfbb 13479 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1a619819
LM
13480/* end confdefs.h. */
13481$ac_includes_default
13482int
13483main ()
13484{
13485char buf[64];
13486 _Decimal32 d32 = 1.2345df;
13487 _Decimal64 d64 = 1.2345dd;
13488 _Decimal128 d128 = 1.2345dl;
13489 sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
13490 return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
13491 ;
13492 return 0;
13493}
13494_ACEOF
81ecdfbb 13495if ac_fn_c_try_run "$LINENO"; then :
1a619819
LM
13496 gdb_cv_printf_has_decfloat=yes
13497else
81ecdfbb 13498 gdb_cv_printf_has_decfloat=no
1a619819 13499fi
81ecdfbb
RW
13500rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13501 conftest.$ac_objext conftest.beam conftest.$ac_ext
1a619819 13502fi
81ecdfbb 13503
1a619819 13504fi
81ecdfbb
RW
13505{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
13506$as_echo "$gdb_cv_printf_has_decfloat" >&6; }
1a619819
LM
13507if test $gdb_cv_printf_has_decfloat = yes; then
13508
81ecdfbb 13509$as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
1a619819
LM
13510
13511fi
13512
bc8bcb4b
MK
13513# Check if the compiler supports the `long double' type. We can't use
13514# AC_C_LONG_DOUBLE because that one does additional checks on the
13515# constants defined in <float.h> that fail on some systems,
13516# e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
97bf5e38 13517
81ecdfbb
RW
13518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
13519$as_echo_n "checking for long double support in compiler... " >&6; }
13520if test "${gdb_cv_c_long_double+set}" = set; then :
13521 $as_echo_n "(cached) " >&6
97bf5e38 13522else
81ecdfbb 13523 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13524/* end confdefs.h. */
97bf5e38 13525long double foo;
bec39cab 13526_ACEOF
81ecdfbb 13527if ac_fn_c_try_compile "$LINENO"; then :
bc8bcb4b 13528 gdb_cv_c_long_double=yes
97bf5e38 13529else
81ecdfbb 13530 gdb_cv_c_long_double=no
97bf5e38 13531fi
81ecdfbb 13532rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 13533fi
81ecdfbb
RW
13534{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
13535$as_echo "$gdb_cv_c_long_double" >&6; }
bc8bcb4b 13536if test $gdb_cv_c_long_double = yes; then
c906108c 13537
81ecdfbb 13538$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
13539
13540fi
13541
bc8bcb4b 13542# Check if the compiler and runtime support printing long doubles.
97bf5e38 13543
81ecdfbb
RW
13544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
13545$as_echo_n "checking for long double support in printf... " >&6; }
13546if test "${gdb_cv_printf_has_long_double+set}" = set; then :
13547 $as_echo_n "(cached) " >&6
97bf5e38 13548else
81ecdfbb 13549 if test "$cross_compiling" = yes; then :
97bf5e38
MK
13550 gdb_cv_printf_has_long_double=no
13551else
81ecdfbb 13552 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13553/* end confdefs.h. */
bc8bcb4b
MK
13554$ac_includes_default
13555int
13556main ()
13557{
13558char buf[16];
97bf5e38
MK
13559 long double f = 3.141592653;
13560 sprintf (buf, "%Lg", f);
13561 return (strncmp ("3.14159", buf, 7));
bc8bcb4b
MK
13562 ;
13563 return 0;
97bf5e38 13564}
bec39cab 13565_ACEOF
81ecdfbb 13566if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 13567 gdb_cv_printf_has_long_double=yes
c906108c 13568else
81ecdfbb 13569 gdb_cv_printf_has_long_double=no
c906108c 13570fi
81ecdfbb
RW
13571rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13572 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 13573fi
81ecdfbb 13574
c906108c 13575fi
81ecdfbb
RW
13576{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
13577$as_echo "$gdb_cv_printf_has_long_double" >&6; }
97bf5e38 13578if test $gdb_cv_printf_has_long_double = yes; then
bc8bcb4b 13579
81ecdfbb 13580$as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
13581
13582fi
97bf5e38 13583
bc8bcb4b 13584# Check if the compiler and runtime support scanning long doubles.
97bf5e38 13585
81ecdfbb
RW
13586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
13587$as_echo_n "checking for long double support in scanf... " >&6; }
13588if test "${gdb_cv_scanf_has_long_double+set}" = set; then :
13589 $as_echo_n "(cached) " >&6
97bf5e38 13590else
81ecdfbb 13591 if test "$cross_compiling" = yes; then :
97bf5e38
MK
13592 gdb_cv_scanf_has_long_double=no
13593else
81ecdfbb 13594 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13595/* end confdefs.h. */
bc8bcb4b
MK
13596#include <stdio.h>
13597int
13598main ()
13599{
13600char *buf = "3.141592653";
97bf5e38
MK
13601 long double f = 0;
13602 sscanf (buf, "%Lg", &f);
13603 return !(f > 3.14159 && f < 3.14160);
bc8bcb4b
MK
13604 ;
13605 return 0;
97bf5e38 13606}
bec39cab 13607_ACEOF
81ecdfbb 13608if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
13609 gdb_cv_scanf_has_long_double=yes
13610else
81ecdfbb 13611 gdb_cv_scanf_has_long_double=no
97bf5e38 13612fi
81ecdfbb
RW
13613rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13614 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 13615fi
81ecdfbb 13616
c906108c 13617fi
81ecdfbb
RW
13618{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
13619$as_echo "$gdb_cv_scanf_has_long_double" >&6; }
97bf5e38 13620if test $gdb_cv_scanf_has_long_double = yes; then
bc8bcb4b 13621
81ecdfbb 13622$as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
13623
13624fi
c906108c 13625
438013df
AO
13626case ${host_os} in
13627aix*)
81ecdfbb
RW
13628 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
13629$as_echo_n "checking for -bbigtoc option... " >&6; }
13630if test "${gdb_cv_bigtoc+set}" = set; then :
13631 $as_echo_n "(cached) " >&6
438013df 13632else
bec39cab 13633
438013df
AO
13634 SAVE_LDFLAGS=$LDFLAGS
13635
13636 case $GCC in
13637 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
13638 *) gdb_cv_bigtoc=-bbigtoc ;;
13639 esac
13640
13641 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
81ecdfbb 13642 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13643/* end confdefs.h. */
438013df 13644
bec39cab
AC
13645int
13646main ()
13647{
438013df 13648int i;
bec39cab
AC
13649 ;
13650 return 0;
13651}
13652_ACEOF
81ecdfbb 13653if ac_fn_c_try_link "$LINENO"; then :
bec39cab 13654
81ecdfbb
RW
13655else
13656 gdb_cv_bigtoc=
438013df 13657fi
81ecdfbb
RW
13658rm -f core conftest.err conftest.$ac_objext \
13659 conftest$ac_exeext conftest.$ac_ext
ec76baa5 13660 LDFLAGS="${SAVE_LDFLAGS}"
438013df 13661
bec39cab 13662fi
81ecdfbb
RW
13663{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
13664$as_echo "$gdb_cv_bigtoc" >&6; }
438013df
AO
13665 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
13666 ;;
13667esac
13668
38f6b338 13669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
f6528abd 13670$as_echo_n "checking for the dynamic export flag... " >&6; }
38f6b338
JK
13671dynamic_list=false
13672if test "${gdb_native}" = yes; then
13673 # The dynamically loaded libthread_db needs access to symbols in the gdb
13674 # executable. Older GNU ld supports --export-dynamic but --dynamic-list
13675 # may not be supported there.
13676 old_LDFLAGS="$LDFLAGS"
13677 # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
13678 RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
13679 LDFLAGS="$LDFLAGS $RDYNAMIC"
13680 if test "${have_libpython}" = no; then
13681 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f6528abd
JK
13682/* end confdefs.h. */
13683
13684int
13685main ()
13686{
13687
13688 ;
13689 return 0;
13690}
13691_ACEOF
13692if ac_fn_c_try_link "$LINENO"; then :
3bebe2f2
JK
13693 dynamic_list=true
13694fi
13695rm -f core conftest.err conftest.$ac_objext \
13696 conftest$ac_exeext conftest.$ac_ext
38f6b338
JK
13697 else
13698 # Workaround http://bugs.python.org/issue4434 where static
13699 # libpythonX.Y.a would get its symbols required for
13700 # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
13701 # Problem does not happen for the recommended libpythonX.Y.so linkage.
a4a1c157
PA
13702
13703 # Note the workaround for Python
13704 # http://bugs.python.org/issue10112 earlier has removed
13705 # -export-dynamic from PYTHON_LIBS. That's exactly what we want
13706 # here too, as otherwise it'd make this -Wl,--dynamic-list test
13707 # always pass.
38f6b338
JK
13708 old_CFLAGS="$CFLAGS"
13709 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
8c1fb155
JK
13710 old_LIBS="$LIBS"
13711 LIBS="$LIBS $PYTHON_LIBS"
1b4f615e
PA
13712 old_CPPFLAGS="$CPPFLAGS"
13713 CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
38f6b338 13714 if test "$cross_compiling" = yes; then :
3bebe2f2 13715 true
f6528abd 13716else
3bebe2f2
JK
13717 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13718/* end confdefs.h. */
1b4f615e 13719#include "Python.h"
3bebe2f2
JK
13720int
13721main ()
13722{
13723int err;
38f6b338
JK
13724 Py_Initialize ();
13725 err = PyRun_SimpleString ("import itertools\n");
13726 Py_Finalize ();
13727 return err == 0 ? 0 : 1;
3bebe2f2
JK
13728 ;
13729 return 0;
13730}
13731_ACEOF
13732if ac_fn_c_try_run "$LINENO"; then :
13733 dynamic_list=true
13734fi
13735rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13736 conftest.$ac_objext conftest.beam conftest.$ac_ext
13737fi
13738
8c1fb155 13739 LIBS="$old_LIBS"
38f6b338 13740 CFLAGS="$old_CFLAGS"
1b4f615e 13741 CPPFLAGS="$old_CPPFLAGS"
38f6b338
JK
13742 fi
13743 LDFLAGS="$old_LDFLAGS"
13744fi
13745if $dynamic_list; then
13746 found="-Wl,--dynamic-list"
13747 RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
f6528abd 13748else
38f6b338
JK
13749 found="-rdynamic"
13750 RDYNAMIC="-rdynamic"
f6528abd 13751fi
f6528abd 13752
38f6b338 13753{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
f6528abd 13754$as_echo "$found" >&6; }
0407b3f1 13755
f6528abd 13756
0407b3f1 13757if test ${build} = ${host} -a ${host} = ${target} ; then
c906108c 13758 case ${host_os} in
c906108c 13759 solaris*)
d92419e5
JB
13760 # See if thread_db library is around for Solaris thread debugging.
13761 # Note that we must explicitly test for version 1 of the library
13762 # because version 0 (present on Solaris 2.4 or earlier) doesn't have
13763 # the same API.
81ecdfbb
RW
13764 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris thread debugging library" >&5
13765$as_echo_n "checking for Solaris thread debugging library... " >&6; }
c906108c 13766 if test -f /usr/lib/libthread_db.so.1 ; then
81ecdfbb
RW
13767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13768$as_echo "yes" >&6; }
60ca704f 13769
81ecdfbb 13770$as_echo "#define HAVE_THREAD_DB_LIB 1" >>confdefs.h
c906108c 13771
3483b318 13772 CONFIG_OBS="${CONFIG_OBS} sol-thread.o"
c906108c 13773 CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
81ecdfbb
RW
13774 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
13775$as_echo_n "checking for dlopen in -ldl... " >&6; }
13776if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
13777 $as_echo_n "(cached) " >&6
c906108c 13778else
bec39cab 13779 ac_check_lib_save_LIBS=$LIBS
c906108c 13780LIBS="-ldl $LIBS"
81ecdfbb 13781cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
13782/* end confdefs.h. */
13783
81ecdfbb
RW
13784/* Override any GCC internal prototype to avoid an error.
13785 Use char because int might match the return type of a GCC
13786 builtin and then its argument prototype would still apply. */
bec39cab
AC
13787#ifdef __cplusplus
13788extern "C"
13789#endif
bec39cab
AC
13790char dlopen ();
13791int
13792main ()
13793{
81ecdfbb 13794return dlopen ();
bec39cab
AC
13795 ;
13796 return 0;
13797}
13798_ACEOF
81ecdfbb 13799if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
13800 ac_cv_lib_dl_dlopen=yes
13801else
81ecdfbb 13802 ac_cv_lib_dl_dlopen=no
bec39cab 13803fi
81ecdfbb
RW
13804rm -f core conftest.err conftest.$ac_objext \
13805 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
13806LIBS=$ac_check_lib_save_LIBS
13807fi
81ecdfbb
RW
13808{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
13809$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
13810if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
bec39cab
AC
13811 cat >>confdefs.h <<_ACEOF
13812#define HAVE_LIBDL 1
13813_ACEOF
c906108c
SS
13814
13815 LIBS="-ldl $LIBS"
13816
c906108c
SS
13817fi
13818
f6528abd 13819 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} $RDYNAMIC"
c906108c
SS
13820 # Sun randomly tweaked the prototypes in <proc_service.h>
13821 # at one point.
81ecdfbb
RW
13822 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if <proc_service.h> is old" >&5
13823$as_echo_n "checking if <proc_service.h> is old... " >&6; }
13824 if test "${gdb_cv_proc_service_is_old+set}" = set; then :
13825 $as_echo_n "(cached) " >&6
c906108c 13826else
bec39cab 13827
81ecdfbb 13828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13829/* end confdefs.h. */
c906108c
SS
13830
13831 #include <proc_service.h>
13832 ps_err_e ps_pdwrite
13833 (struct ps_prochandle*, psaddr_t, const void*, size_t);
c906108c 13834
bec39cab
AC
13835int
13836main ()
13837{
13838
13839 ;
13840 return 0;
13841}
13842_ACEOF
81ecdfbb 13843if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
13844 gdb_cv_proc_service_is_old=no
13845else
81ecdfbb 13846 gdb_cv_proc_service_is_old=yes
c906108c 13847fi
81ecdfbb 13848rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 13849
c906108c
SS
13850fi
13851
81ecdfbb
RW
13852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_proc_service_is_old" >&5
13853$as_echo "$gdb_cv_proc_service_is_old" >&6; }
c906108c 13854 if test $gdb_cv_proc_service_is_old = yes; then
60ca704f 13855
81ecdfbb 13856$as_echo "#define PROC_SERVICE_IS_OLD 1" >>confdefs.h
c906108c
SS
13857
13858 fi
13859 else
81ecdfbb
RW
13860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13861$as_echo "no" >&6; }
c906108c
SS
13862 fi
13863 ;;
d92419e5 13864 aix*)
81ecdfbb
RW
13865 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
13866$as_echo_n "checking for AiX thread debugging library... " >&6; }
13867 if test "${gdb_cv_have_aix_thread_debug+set}" = set; then :
13868 $as_echo_n "(cached) " >&6
bec39cab 13869else
81ecdfbb 13870 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13871/* end confdefs.h. */
d92419e5 13872#include <sys/pthdebug.h>
bec39cab
AC
13873int
13874main ()
13875{
d92419e5
JB
13876#ifndef PTHDB_VERSION_3
13877 #error
13878 #endif
bec39cab
AC
13879 ;
13880 return 0;
13881}
13882_ACEOF
81ecdfbb 13883if ac_fn_c_try_compile "$LINENO"; then :
d92419e5
JB
13884 gdb_cv_have_aix_thread_debug=yes
13885else
81ecdfbb 13886 gdb_cv_have_aix_thread_debug=no
d92419e5 13887fi
81ecdfbb 13888rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d92419e5
JB
13889fi
13890
81ecdfbb
RW
13891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
13892$as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
d92419e5
JB
13893 if test $gdb_cv_have_aix_thread_debug = yes; then
13894 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
3483b318 13895 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
7f533142 13896 LIBS="$LIBS -lpthdebug"
d645e32e
JB
13897
13898 # Older versions of AIX do not provide the declaration for
13899 # the getthrds function (it appears that it was introduced
13900 # with AIX 6.x).
13901 ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h>
13902"
13903if test "x$ac_cv_have_decl_getthrds" = x""yes; then :
13904 ac_have_decl=1
13905else
13906 ac_have_decl=0
13907fi
13908
13909cat >>confdefs.h <<_ACEOF
13910#define HAVE_DECL_GETTHRDS $ac_have_decl
13911_ACEOF
13912
d92419e5
JB
13913 fi
13914 ;;
c906108c 13915 esac
bec39cab 13916
c906108c
SS
13917fi
13918
3f47be5c 13919if test "x$ac_cv_header_thread_db_h" = "xyes"; then
81ecdfbb
RW
13920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
13921$as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
13922if test "${gdb_cv_thread_db_h_has_td_notalloc+set}" = set; then :
13923 $as_echo_n "(cached) " >&6
bec39cab 13924else
81ecdfbb 13925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13926/* end confdefs.h. */
3f47be5c 13927#include <thread_db.h>
bec39cab
AC
13928int
13929main ()
13930{
3f47be5c 13931int i = TD_NOTALLOC;
bec39cab
AC
13932 ;
13933 return 0;
13934}
13935_ACEOF
81ecdfbb 13936if ac_fn_c_try_compile "$LINENO"; then :
3f47be5c
EZ
13937 gdb_cv_thread_db_h_has_td_notalloc=yes
13938else
81ecdfbb 13939 gdb_cv_thread_db_h_has_td_notalloc=no
bec39cab 13940
3f47be5c 13941fi
81ecdfbb 13942rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3f47be5c 13943
bec39cab 13944fi
81ecdfbb
RW
13945{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
13946$as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
13947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
13948$as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
13949if test "${gdb_cv_thread_db_h_has_td_version+set}" = set; then :
13950 $as_echo_n "(cached) " >&6
59f80f10 13951else
81ecdfbb 13952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
13953/* end confdefs.h. */
13954#include <thread_db.h>
13955int
13956main ()
13957{
13958int i = TD_VERSION;
13959 ;
13960 return 0;
13961}
13962_ACEOF
81ecdfbb 13963if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
13964 gdb_cv_thread_db_h_has_td_version=yes
13965else
81ecdfbb 13966 gdb_cv_thread_db_h_has_td_version=no
59f80f10
DJ
13967
13968fi
81ecdfbb 13969rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
13970
13971fi
81ecdfbb
RW
13972{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
13973$as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
13974 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
13975$as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
13976if test "${gdb_cv_thread_db_h_has_td_notls+set}" = set; then :
13977 $as_echo_n "(cached) " >&6
59f80f10 13978else
81ecdfbb 13979 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
13980/* end confdefs.h. */
13981#include <thread_db.h>
13982int
13983main ()
13984{
13985int i = TD_NOTLS;
13986 ;
13987 return 0;
13988}
13989_ACEOF
81ecdfbb 13990if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
13991 gdb_cv_thread_db_h_has_td_notls=yes
13992else
81ecdfbb 13993 gdb_cv_thread_db_h_has_td_notls=no
59f80f10
DJ
13994
13995fi
81ecdfbb 13996rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
13997
13998fi
81ecdfbb
RW
13999{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
14000$as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
3f47be5c
EZ
14001fi
14002if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
bec39cab 14003
81ecdfbb 14004$as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
3f47be5c 14005
59f80f10
DJ
14006fi
14007if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
14008
81ecdfbb 14009$as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
59f80f10
DJ
14010
14011fi
14012if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
14013
81ecdfbb 14014$as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
59f80f10 14015
3f47be5c
EZ
14016fi
14017
81ecdfbb
RW
14018ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
14019"
14020if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = x""yes; then :
14021 ac_have_decl=1
10568435 14022else
81ecdfbb 14023 ac_have_decl=0
10568435 14024fi
10568435
JK
14025
14026cat >>confdefs.h <<_ACEOF
81ecdfbb 14027#define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
10568435
JK
14028_ACEOF
14029
14030
81ecdfbb
RW
14031if test "$cross_compiling" = yes; then :
14032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
14033/* end confdefs.h. */
14034#include <sys/personality.h>
14035int
14036main ()
14037{
14038
14039# if !HAVE_DECL_ADDR_NO_RANDOMIZE
14040# define ADDR_NO_RANDOMIZE 0x0040000
14041# endif
14042 /* Test the flag could be set and stays set. */
14043 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
14044 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
14045 return 1
14046 ;
14047 return 0;
14048}
14049_ACEOF
81ecdfbb 14050if ac_fn_c_try_link "$LINENO"; then :
10568435
JK
14051 have_personality=true
14052else
81ecdfbb 14053 have_personality=false
10568435 14054fi
81ecdfbb
RW
14055rm -f core conftest.err conftest.$ac_objext \
14056 conftest$ac_exeext conftest.$ac_ext
10568435 14057else
81ecdfbb 14058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
14059/* end confdefs.h. */
14060#include <sys/personality.h>
14061int
14062main ()
14063{
14064
14065# if !HAVE_DECL_ADDR_NO_RANDOMIZE
14066# define ADDR_NO_RANDOMIZE 0x0040000
14067# endif
14068 /* Test the flag could be set and stays set. */
14069 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
14070 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
14071 return 1
14072 ;
14073 return 0;
14074}
14075_ACEOF
81ecdfbb 14076if ac_fn_c_try_run "$LINENO"; then :
10568435
JK
14077 have_personality=true
14078else
81ecdfbb 14079 have_personality=false
10568435 14080fi
81ecdfbb
RW
14081rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14082 conftest.$ac_objext conftest.beam conftest.$ac_ext
10568435 14083fi
81ecdfbb 14084
10568435
JK
14085if $have_personality
14086then
14087
81ecdfbb 14088$as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
10568435
JK
14089
14090fi
14091
e655c1a2
PA
14092case $host_os in
14093 go32* | *djgpp*)
14094 gdbinit=gdb.ini
14095 ;;
14096 *)
14097 gdbinit=.gdbinit
14098 ;;
14099esac
14100
14101cat >>confdefs.h <<_ACEOF
14102#define GDBINIT "$gdbinit"
14103_ACEOF
14104
14105
fb40c209 14106
f83d8a90
DE
14107# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
14108# except that the argument to --with-sysroot is optional.
14109# --with-sysroot (or --with-sysroot=yes) sets the default sysroot path.
14110if test "x$with_sysroot" = xyes; then
14111 with_sysroot="${exec_prefix}/${target_alias}/sys-root"
14112fi
bec39cab 14113
81ecdfbb
RW
14114# Check whether --with-sysroot was given.
14115if test "${with_sysroot+set}" = set; then :
f83d8a90
DE
14116 withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval
14117else
14118 TARGET_SYSTEM_ROOT=
14119fi
030292b7 14120
030292b7 14121
f83d8a90
DE
14122 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
14123 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14124 ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT`
14125 ac_define_dir=`eval echo $ac_define_dir`
030292b7 14126
f83d8a90
DE
14127cat >>confdefs.h <<_ACEOF
14128#define TARGET_SYSTEM_ROOT "$ac_define_dir"
14129_ACEOF
bec39cab 14130
030292b7 14131
b14b1491 14132
f83d8a90
DE
14133
14134 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
14135 if test "x$prefix" = xNONE; then
14136 test_prefix=/usr/local
14137 else
14138 test_prefix=$prefix
14139 fi
14140 else
14141 test_prefix=$exec_prefix
14142 fi
14143 value=0
14144 case ${ac_define_dir} in
14145 "${test_prefix}"|"${test_prefix}/"*|\
14146 '${exec_prefix}'|'${exec_prefix}/'*)
14147 value=1
14148 ;;
14149 esac
14150
14151cat >>confdefs.h <<_ACEOF
14152#define TARGET_SYSTEM_ROOT_RELOCATABLE $value
14153_ACEOF
030292b7
DJ
14154
14155
14156
16e7150e 14157
16e7150e 14158
81ecdfbb
RW
14159# Check whether --with-system-gdbinit was given.
14160if test "${with_system_gdbinit+set}" = set; then :
14161 withval=$with_system_gdbinit;
b14b1491
TT
14162 SYSTEM_GDBINIT=$withval
14163else
14164 SYSTEM_GDBINIT=
81ecdfbb
RW
14165fi
14166
16e7150e
JG
14167
14168 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
14169 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 14170 ac_define_dir=`eval echo $SYSTEM_GDBINIT`
16e7150e
JG
14171 ac_define_dir=`eval echo $ac_define_dir`
14172
14173cat >>confdefs.h <<_ACEOF
14174#define SYSTEM_GDBINIT "$ac_define_dir"
14175_ACEOF
14176
14177
14178
0c4a4063 14179
b14b1491
TT
14180 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
14181 if test "x$prefix" = xNONE; then
14182 test_prefix=/usr/local
14183 else
14184 test_prefix=$prefix
14185 fi
14186 else
14187 test_prefix=$exec_prefix
14188 fi
14189 value=0
14190 case ${ac_define_dir} in
14191 "${test_prefix}"|"${test_prefix}/"*|\
14192 '${exec_prefix}'|'${exec_prefix}/'*)
14193 value=1
14194 ;;
14195 esac
16e7150e 14196
b14b1491
TT
14197cat >>confdefs.h <<_ACEOF
14198#define SYSTEM_GDBINIT_RELOCATABLE $value
16e7150e
JG
14199_ACEOF
14200
b14b1491 14201
16e7150e 14202
0c4a4063 14203
b835bb52 14204
9b30624b 14205
81ecdfbb
RW
14206# Check whether --enable-werror was given.
14207if test "${enable_werror+set}" = set; then :
14208 enableval=$enable_werror; case "${enableval}" in
094a342e
MK
14209 yes | y) ERROR_ON_WARNING="yes" ;;
14210 no | n) ERROR_ON_WARNING="no" ;;
81ecdfbb 14211 *) as_fn_error "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
094a342e 14212 esac
81ecdfbb
RW
14213fi
14214
094a342e 14215
9a084706
PA
14216# Enable -Werror by default when using gcc. Turn it off for releases.
14217if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
094a342e
MK
14218 ERROR_ON_WARNING=yes
14219fi
14220
14221WERROR_CFLAGS=""
14222if test "${ERROR_ON_WARNING}" = yes ; then
14223 WERROR_CFLAGS="-Werror"
14224fi
14225
cf6de44d 14226# The options we'll try to enable.
aac331e4 14227build_warnings="-Wall -Wpointer-arith \
1cb5e2a4 14228-Wno-unused -Wunused-value -Wunused-function \
aac331e4 14229-Wno-switch -Wno-char-subscripts \
cf6de44d
PA
14230-Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \
14231-Wno-sign-compare -Wno-write-strings -Wno-narrowing"
3bc3d82a 14232
3526781e
DJ
14233# Enable -Wno-format by default when using gcc on mingw since many
14234# GCC versions complain about %I64.
14235case "${host}" in
14236 *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;;
d3685d60 14237 *) build_warnings="$build_warnings -Wformat-nonliteral" ;;
3526781e
DJ
14238esac
14239
81ecdfbb
RW
14240# Check whether --enable-build-warnings was given.
14241if test "${enable_build_warnings+set}" = set; then :
14242 enableval=$enable_build_warnings; case "${enableval}" in
c906108c
SS
14243 yes) ;;
14244 no) build_warnings="-w";;
14245 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
14246 build_warnings="${build_warnings} ${t}";;
14247 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
14248 build_warnings="${t} ${build_warnings}";;
14249 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
14250esac
d4f3574e 14251if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 14252 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 14253fi
81ecdfbb
RW
14254fi
14255# Check whether --enable-gdb-build-warnings was given.
14256if test "${enable_gdb_build_warnings+set}" = set; then :
14257 enableval=$enable_gdb_build_warnings; case "${enableval}" in
3b851bce
AC
14258 yes) ;;
14259 no) build_warnings="-w";;
14260 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
14261 build_warnings="${build_warnings} ${t}";;
14262 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
14263 build_warnings="${t} ${build_warnings}";;
14264 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
14265esac
14266if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
14267 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
14268fi
81ecdfbb 14269fi
3bc3d82a
PA
14270
14271# The set of warnings supported by a C++ compiler is not the same as
14272# of the C compiler.
cf6de44d 14273ac_ext=cpp
3bc3d82a
PA
14274ac_cpp='$CXXCPP $CPPFLAGS'
14275ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14276ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14277ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14278
3bc3d82a 14279
81ecdfbb 14280WARN_CFLAGS=""
c906108c
SS
14281if test "x${build_warnings}" != x -a "x$GCC" = xyes
14282then
81ecdfbb
RW
14283 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
14284$as_echo_n "checking compiler warning flags... " >&6; }
746a987d
AC
14285 # Separate out the -Werror flag as some files just cannot be
14286 # compiled with it enabled.
14287 for w in ${build_warnings}; do
7544db95
PA
14288 # GCC does not complain about -Wno-unknown-warning. Invert
14289 # and test -Wunknown-warning instead.
14290 case $w in
14291 -Wno-*)
14292 wtest=`echo $w | sed 's/-Wno-/-W/g'` ;;
14293 *)
14294 wtest=$w ;;
14295 esac
14296
746a987d
AC
14297 case $w in
14298 -Werr*) WERROR_CFLAGS=-Werror ;;
3bc3d82a
PA
14299 *)
14300 # Check whether GCC accepts it.
4536bbc6 14301 saved_CFLAGS="$CFLAGS"
7544db95 14302 CFLAGS="$CFLAGS $wtest"
3bc3d82a 14303 saved_CXXFLAGS="$CXXFLAGS"
7544db95 14304 CXXFLAGS="$CXXFLAGS $wtest"
54019719 14305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14306/* end confdefs.h. */
4536bbc6 14307
bec39cab
AC
14308int
14309main ()
14310{
4536bbc6 14311
bec39cab
AC
14312 ;
14313 return 0;
14314}
14315_ACEOF
3bc3d82a 14316if ac_fn_cxx_try_compile "$LINENO"; then :
4536bbc6 14317 WARN_CFLAGS="${WARN_CFLAGS} $w"
4536bbc6 14318fi
81ecdfbb 14319rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4536bbc6 14320 CFLAGS="$saved_CFLAGS"
3bc3d82a 14321 CXXFLAGS="$saved_CXXFLAGS"
746a987d
AC
14322 esac
14323 done
81ecdfbb
RW
14324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
14325$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
c906108c
SS
14326fi
14327
14328
104c1213 14329
cf6de44d 14330ac_ext=c
3bc3d82a
PA
14331ac_cpp='$CPP $CPPFLAGS'
14332ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14333ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14334ac_compiler_gnu=$ac_cv_c_compiler_gnu
14335
3bc3d82a 14336
b835bb52 14337
7a292a7a 14338# In the Cygwin environment, we need some additional flags.
81ecdfbb
RW
14339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
14340$as_echo_n "checking for cygwin... " >&6; }
14341if test "${gdb_cv_os_cygwin+set}" = set; then :
14342 $as_echo_n "(cached) " >&6
bec39cab 14343else
81ecdfbb 14344 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14345/* end confdefs.h. */
7a292a7a
SS
14346
14347#if defined (__CYGWIN__) || defined (__CYGWIN32__)
14348lose
14349#endif
bec39cab 14350_ACEOF
7a292a7a 14351if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
92a021de 14352 $EGREP "^lose$" >/dev/null 2>&1; then :
7a292a7a
SS
14353 gdb_cv_os_cygwin=yes
14354else
7a292a7a
SS
14355 gdb_cv_os_cygwin=no
14356fi
14357rm -f conftest*
14358
14359fi
81ecdfbb
RW
14360{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
14361$as_echo "$gdb_cv_os_cygwin" >&6; }
7a292a7a 14362
aff38e61 14363
3eb25fda 14364SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
aff38e61 14365case ${host} in
95cbc983
AC
14366 *go32* ) SER_HARDWIRE=ser-go32.o ;;
14367 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
0ea3f30e 14368 *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
aff38e61
AC
14369esac
14370
14371
cd0fc7c3
SS
14372# libreadline needs libuser32.a in a cygwin environment
14373WIN32LIBS=
14374if test x$gdb_cv_os_cygwin = xyes; then
c5394b80
JM
14375 WIN32LIBS="-luser32"
14376 case "${target}" in
14377 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
14378 ;;
14379 esac
cd0fc7c3 14380fi
c906108c 14381
b4505029
MM
14382# The ser-tcp.c module requires sockets.
14383case ${host} in
14384 *mingw32*)
14385
81ecdfbb 14386$as_echo "#define USE_WIN32API 1" >>confdefs.h
b4505029
MM
14387
14388 WIN32LIBS="$WIN32LIBS -lws2_32"
14389 ;;
14390esac
14391
7a292a7a 14392
31d99776 14393# Add ELF support to GDB, but only if BFD includes ELF support.
def63ff0
TT
14394
14395 OLD_CFLAGS=$CFLAGS
14396 OLD_LDFLAGS=$LDFLAGS
14397 OLD_LIBS=$LIBS
14398 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
14399 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
14400 # always want our bfd.
14401 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
5a2d4533
L
14402 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
14403 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
def63ff0 14404 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
711a72d3 14405 LIBS="-lbfd -liberty -lz $intl $LIBS"
def63ff0 14406 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
81ecdfbb
RW
14407$as_echo_n "checking for ELF support in BFD... " >&6; }
14408if test "${gdb_cv_var_elf+set}" = set; then :
14409 $as_echo_n "(cached) " >&6
31d99776 14410else
81ecdfbb 14411 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31d99776
DJ
14412/* end confdefs.h. */
14413#include <stdlib.h>
def63ff0
TT
14414 #include "bfd.h"
14415 #include "elf-bfd.h"
31d99776
DJ
14416
14417int
14418main ()
14419{
def63ff0 14420return bfd_get_elf_phdr_upper_bound (NULL);
31d99776
DJ
14421 ;
14422 return 0;
14423}
14424_ACEOF
81ecdfbb 14425if ac_fn_c_try_link "$LINENO"; then :
31d99776
DJ
14426 gdb_cv_var_elf=yes
14427else
81ecdfbb 14428 gdb_cv_var_elf=no
31d99776 14429fi
81ecdfbb
RW
14430rm -f core conftest.err conftest.$ac_objext \
14431 conftest$ac_exeext conftest.$ac_ext
31d99776 14432fi
81ecdfbb
RW
14433{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
14434$as_echo "$gdb_cv_var_elf" >&6; }
def63ff0
TT
14435 CFLAGS=$OLD_CFLAGS
14436 LDFLAGS=$OLD_LDFLAGS
14437 LIBS=$OLD_LIBS
31d99776 14438if test $gdb_cv_var_elf = yes; then
d4777acb 14439 CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o dtrace-probe.o"
31d99776 14440
81ecdfbb 14441$as_echo "#define HAVE_ELF 1" >>confdefs.h
31d99776 14442
075ff26d
JK
14443 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
14444 if test "$plugins" = "yes"; then
a48b32c0
L
14445 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
14446$as_echo_n "checking for library containing dlopen... " >&6; }
14447if test "${ac_cv_search_dlopen+set}" = set; then :
14448 $as_echo_n "(cached) " >&6
14449else
14450 ac_func_search_save_LIBS=$LIBS
14451cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14452/* end confdefs.h. */
14453
14454/* Override any GCC internal prototype to avoid an error.
14455 Use char because int might match the return type of a GCC
14456 builtin and then its argument prototype would still apply. */
14457#ifdef __cplusplus
14458extern "C"
14459#endif
14460char dlopen ();
14461int
14462main ()
14463{
14464return dlopen ();
14465 ;
14466 return 0;
14467}
14468_ACEOF
14469for ac_lib in '' dl; do
14470 if test -z "$ac_lib"; then
14471 ac_res="none required"
14472 else
14473 ac_res=-l$ac_lib
14474 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
14475 fi
14476 if ac_fn_c_try_link "$LINENO"; then :
14477 ac_cv_search_dlopen=$ac_res
14478fi
14479rm -f core conftest.err conftest.$ac_objext \
14480 conftest$ac_exeext
14481 if test "${ac_cv_search_dlopen+set}" = set; then :
14482 break
14483fi
14484done
14485if test "${ac_cv_search_dlopen+set}" = set; then :
14486
14487else
14488 ac_cv_search_dlopen=no
14489fi
14490rm conftest.$ac_ext
14491LIBS=$ac_func_search_save_LIBS
14492fi
14493{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
14494$as_echo "$ac_cv_search_dlopen" >&6; }
14495ac_res=$ac_cv_search_dlopen
14496if test "$ac_res" != no; then :
14497 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14498
14499fi
14500
075ff26d 14501 fi
31d99776 14502fi
31d99776 14503
4f05add4
TT
14504# Add macho support to GDB, but only if BFD includes it.
14505
14506 OLD_CFLAGS=$CFLAGS
14507 OLD_LDFLAGS=$LDFLAGS
14508 OLD_LIBS=$LIBS
14509 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
14510 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
14511 # always want our bfd.
14512 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
5a2d4533
L
14513 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
14514 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
4f05add4 14515 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
711a72d3 14516 LIBS="-lbfd -liberty -lz $intl $LIBS"
4f05add4
TT
14517 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5
14518$as_echo_n "checking for Mach-O support in BFD... " >&6; }
14519if test "${gdb_cv_var_macho+set}" = set; then :
14520 $as_echo_n "(cached) " >&6
14521else
14522 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14523/* end confdefs.h. */
14524#include <stdlib.h>
14525 #include "bfd.h"
14526 #include "mach-o.h"
14527
14528int
14529main ()
14530{
14531return bfd_mach_o_lookup_command (NULL, 0, NULL);
14532 ;
14533 return 0;
14534}
14535_ACEOF
14536if ac_fn_c_try_link "$LINENO"; then :
14537 gdb_cv_var_macho=yes
14538else
14539 gdb_cv_var_macho=no
14540fi
14541rm -f core conftest.err conftest.$ac_objext \
14542 conftest$ac_exeext conftest.$ac_ext
14543fi
14544{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5
14545$as_echo "$gdb_cv_var_macho" >&6; }
14546 CFLAGS=$OLD_CFLAGS
14547 LDFLAGS=$OLD_LDFLAGS
14548 LIBS=$OLD_LIBS
14549if test $gdb_cv_var_macho = yes; then
14550 CONFIG_OBS="$CONFIG_OBS machoread.o"
14551fi
14552
121ce6e5
DJ
14553# Add any host-specific objects to GDB.
14554CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
14555
608e2dbb
TT
14556# If building on ELF, look for lzma support for embedded compressed debug info.
14557if test $gdb_cv_var_elf = yes; then
14558
14559# Check whether --with-lzma was given.
14560if test "${with_lzma+set}" = set; then :
14561 withval=$with_lzma;
14562else
14563 with_lzma=auto
14564fi
14565
14566 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5
14567$as_echo_n "checking whether to use lzma... " >&6; }
14568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5
14569$as_echo "$with_lzma" >&6; }
14570
14571 if test "${with_lzma}" != no; then
14572
14573
14574
14575
14576
14577
14578
14579
14580 use_additional=yes
14581
14582 acl_save_prefix="$prefix"
14583 prefix="$acl_final_prefix"
14584 acl_save_exec_prefix="$exec_prefix"
14585 exec_prefix="$acl_final_exec_prefix"
14586
14587 eval additional_includedir=\"$includedir\"
14588 eval additional_libdir=\"$libdir\"
14589
14590 exec_prefix="$acl_save_exec_prefix"
14591 prefix="$acl_save_prefix"
14592
14593
14594# Check whether --with-liblzma-prefix was given.
14595if test "${with_liblzma_prefix+set}" = set; then :
14596 withval=$with_liblzma_prefix;
14597 if test "X$withval" = "Xno"; then
14598 use_additional=no
14599 else
14600 if test "X$withval" = "X"; then
14601
14602 acl_save_prefix="$prefix"
14603 prefix="$acl_final_prefix"
14604 acl_save_exec_prefix="$exec_prefix"
14605 exec_prefix="$acl_final_exec_prefix"
14606
14607 eval additional_includedir=\"$includedir\"
14608 eval additional_libdir=\"$libdir\"
14609
14610 exec_prefix="$acl_save_exec_prefix"
14611 prefix="$acl_save_prefix"
14612
14613 else
14614 additional_includedir="$withval/include"
14615 additional_libdir="$withval/lib"
14616 fi
14617 fi
14618
14619fi
14620
14621 LIBLZMA=
14622 LTLIBLZMA=
14623 INCLZMA=
14624 rpathdirs=
14625 ltrpathdirs=
14626 names_already_handled=
14627 names_next_round='lzma '
14628 while test -n "$names_next_round"; do
14629 names_this_round="$names_next_round"
14630 names_next_round=
14631 for name in $names_this_round; do
14632 already_handled=
14633 for n in $names_already_handled; do
14634 if test "$n" = "$name"; then
14635 already_handled=yes
14636 break
14637 fi
14638 done
14639 if test -z "$already_handled"; then
14640 names_already_handled="$names_already_handled $name"
14641 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
14642 eval value=\"\$HAVE_LIB$uppername\"
14643 if test -n "$value"; then
14644 if test "$value" = yes; then
14645 eval value=\"\$LIB$uppername\"
14646 test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value"
14647 eval value=\"\$LTLIB$uppername\"
14648 test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value"
14649 else
14650 :
14651 fi
14652 else
14653 found_dir=
14654 found_la=
14655 found_so=
14656 found_a=
14657 if test $use_additional = yes; then
14658 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
14659 found_dir="$additional_libdir"
14660 found_so="$additional_libdir/lib$name.$shlibext"
14661 if test -f "$additional_libdir/lib$name.la"; then
14662 found_la="$additional_libdir/lib$name.la"
14663 fi
14664 else
14665 if test -f "$additional_libdir/lib$name.$libext"; then
14666 found_dir="$additional_libdir"
14667 found_a="$additional_libdir/lib$name.$libext"
14668 if test -f "$additional_libdir/lib$name.la"; then
14669 found_la="$additional_libdir/lib$name.la"
14670 fi
14671 fi
14672 fi
14673 fi
14674 if test "X$found_dir" = "X"; then
14675 for x in $LDFLAGS $LTLIBLZMA; do
14676
14677 acl_save_prefix="$prefix"
14678 prefix="$acl_final_prefix"
14679 acl_save_exec_prefix="$exec_prefix"
14680 exec_prefix="$acl_final_exec_prefix"
14681 eval x=\"$x\"
14682 exec_prefix="$acl_save_exec_prefix"
14683 prefix="$acl_save_prefix"
14684
14685 case "$x" in
14686 -L*)
14687 dir=`echo "X$x" | sed -e 's/^X-L//'`
14688 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
14689 found_dir="$dir"
14690 found_so="$dir/lib$name.$shlibext"
14691 if test -f "$dir/lib$name.la"; then
14692 found_la="$dir/lib$name.la"
14693 fi
14694 else
14695 if test -f "$dir/lib$name.$libext"; then
14696 found_dir="$dir"
14697 found_a="$dir/lib$name.$libext"
14698 if test -f "$dir/lib$name.la"; then
14699 found_la="$dir/lib$name.la"
14700 fi
14701 fi
14702 fi
14703 ;;
14704 esac
14705 if test "X$found_dir" != "X"; then
14706 break
14707 fi
14708 done
14709 fi
14710 if test "X$found_dir" != "X"; then
14711 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name"
14712 if test "X$found_so" != "X"; then
14713 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
14714 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
14715 else
14716 haveit=
14717 for x in $ltrpathdirs; do
14718 if test "X$x" = "X$found_dir"; then
14719 haveit=yes
14720 break
14721 fi
14722 done
14723 if test -z "$haveit"; then
14724 ltrpathdirs="$ltrpathdirs $found_dir"
14725 fi
14726 if test "$hardcode_direct" = yes; then
14727 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
14728 else
14729 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
14730 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
14731 haveit=
14732 for x in $rpathdirs; do
14733 if test "X$x" = "X$found_dir"; then
14734 haveit=yes
14735 break
14736 fi
14737 done
14738 if test -z "$haveit"; then
14739 rpathdirs="$rpathdirs $found_dir"
14740 fi
14741 else
14742 haveit=
14743 for x in $LDFLAGS $LIBLZMA; do
14744
14745 acl_save_prefix="$prefix"
14746 prefix="$acl_final_prefix"
14747 acl_save_exec_prefix="$exec_prefix"
14748 exec_prefix="$acl_final_exec_prefix"
14749 eval x=\"$x\"
14750 exec_prefix="$acl_save_exec_prefix"
14751 prefix="$acl_save_prefix"
14752
14753 if test "X$x" = "X-L$found_dir"; then
14754 haveit=yes
14755 break
14756 fi
14757 done
14758 if test -z "$haveit"; then
14759 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir"
14760 fi
14761 if test "$hardcode_minus_L" != no; then
14762 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
14763 else
14764 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
14765 fi
14766 fi
14767 fi
14768 fi
14769 else
14770 if test "X$found_a" != "X"; then
14771 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a"
14772 else
14773 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name"
14774 fi
14775 fi
14776 additional_includedir=
14777 case "$found_dir" in
14778 */lib | */lib/)
14779 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
14780 additional_includedir="$basedir/include"
14781 ;;
14782 esac
14783 if test "X$additional_includedir" != "X"; then
14784 if test "X$additional_includedir" != "X/usr/include"; then
14785 haveit=
14786 if test "X$additional_includedir" = "X/usr/local/include"; then
14787 if test -n "$GCC"; then
14788 case $host_os in
14789 linux*) haveit=yes;;
14790 esac
14791 fi
14792 fi
14793 if test -z "$haveit"; then
14794 for x in $CPPFLAGS $INCLZMA; do
14795
14796 acl_save_prefix="$prefix"
14797 prefix="$acl_final_prefix"
14798 acl_save_exec_prefix="$exec_prefix"
14799 exec_prefix="$acl_final_exec_prefix"
14800 eval x=\"$x\"
14801 exec_prefix="$acl_save_exec_prefix"
14802 prefix="$acl_save_prefix"
14803
14804 if test "X$x" = "X-I$additional_includedir"; then
14805 haveit=yes
14806 break
14807 fi
14808 done
14809 if test -z "$haveit"; then
14810 if test -d "$additional_includedir"; then
14811 INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir"
14812 fi
14813 fi
14814 fi
14815 fi
14816 fi
14817 if test -n "$found_la"; then
14818 save_libdir="$libdir"
14819 case "$found_la" in
14820 */* | *\\*) . "$found_la" ;;
14821 *) . "./$found_la" ;;
14822 esac
14823 libdir="$save_libdir"
14824 for dep in $dependency_libs; do
14825 case "$dep" in
14826 -L*)
14827 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
14828 if test "X$additional_libdir" != "X/usr/lib"; then
14829 haveit=
14830 if test "X$additional_libdir" = "X/usr/local/lib"; then
14831 if test -n "$GCC"; then
14832 case $host_os in
14833 linux*) haveit=yes;;
14834 esac
14835 fi
14836 fi
14837 if test -z "$haveit"; then
14838 haveit=
14839 for x in $LDFLAGS $LIBLZMA; do
14840
14841 acl_save_prefix="$prefix"
14842 prefix="$acl_final_prefix"
14843 acl_save_exec_prefix="$exec_prefix"
14844 exec_prefix="$acl_final_exec_prefix"
14845 eval x=\"$x\"
14846 exec_prefix="$acl_save_exec_prefix"
14847 prefix="$acl_save_prefix"
14848
14849 if test "X$x" = "X-L$additional_libdir"; then
14850 haveit=yes
14851 break
14852 fi
14853 done
14854 if test -z "$haveit"; then
14855 if test -d "$additional_libdir"; then
14856 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir"
14857 fi
14858 fi
14859 haveit=
14860 for x in $LDFLAGS $LTLIBLZMA; do
14861
14862 acl_save_prefix="$prefix"
14863 prefix="$acl_final_prefix"
14864 acl_save_exec_prefix="$exec_prefix"
14865 exec_prefix="$acl_final_exec_prefix"
14866 eval x=\"$x\"
14867 exec_prefix="$acl_save_exec_prefix"
14868 prefix="$acl_save_prefix"
14869
14870 if test "X$x" = "X-L$additional_libdir"; then
14871 haveit=yes
14872 break
14873 fi
14874 done
14875 if test -z "$haveit"; then
14876 if test -d "$additional_libdir"; then
14877 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir"
14878 fi
14879 fi
14880 fi
14881 fi
14882 ;;
14883 -R*)
14884 dir=`echo "X$dep" | sed -e 's/^X-R//'`
14885 if test "$enable_rpath" != no; then
14886 haveit=
14887 for x in $rpathdirs; do
14888 if test "X$x" = "X$dir"; then
14889 haveit=yes
14890 break
14891 fi
14892 done
14893 if test -z "$haveit"; then
14894 rpathdirs="$rpathdirs $dir"
14895 fi
14896 haveit=
14897 for x in $ltrpathdirs; do
14898 if test "X$x" = "X$dir"; then
14899 haveit=yes
14900 break
14901 fi
14902 done
14903 if test -z "$haveit"; then
14904 ltrpathdirs="$ltrpathdirs $dir"
14905 fi
14906 fi
14907 ;;
14908 -l*)
14909 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
14910 ;;
14911 *.la)
14912 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
14913 ;;
14914 *)
14915 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep"
14916 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep"
14917 ;;
14918 esac
14919 done
14920 fi
14921 else
14922 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
14923 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name"
14924 fi
14925 fi
14926 fi
14927 done
14928 done
14929 if test "X$rpathdirs" != "X"; then
14930 if test -n "$hardcode_libdir_separator"; then
14931 alldirs=
14932 for found_dir in $rpathdirs; do
14933 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
14934 done
14935 acl_save_libdir="$libdir"
14936 libdir="$alldirs"
14937 eval flag=\"$hardcode_libdir_flag_spec\"
14938 libdir="$acl_save_libdir"
14939 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
14940 else
14941 for found_dir in $rpathdirs; do
14942 acl_save_libdir="$libdir"
14943 libdir="$found_dir"
14944 eval flag=\"$hardcode_libdir_flag_spec\"
14945 libdir="$acl_save_libdir"
14946 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
14947 done
14948 fi
14949 fi
14950 if test "X$ltrpathdirs" != "X"; then
14951 for found_dir in $ltrpathdirs; do
14952 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir"
14953 done
14954 fi
14955
14956
14957 ac_save_CPPFLAGS="$CPPFLAGS"
14958
14959 for element in $INCLZMA; do
14960 haveit=
14961 for x in $CPPFLAGS; do
14962
14963 acl_save_prefix="$prefix"
14964 prefix="$acl_final_prefix"
14965 acl_save_exec_prefix="$exec_prefix"
14966 exec_prefix="$acl_final_exec_prefix"
14967 eval x=\"$x\"
14968 exec_prefix="$acl_save_exec_prefix"
14969 prefix="$acl_save_prefix"
14970
14971 if test "X$x" = "X$element"; then
14972 haveit=yes
14973 break
14974 fi
14975 done
14976 if test -z "$haveit"; then
14977 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
14978 fi
14979 done
14980
14981
14982 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5
14983$as_echo_n "checking for liblzma... " >&6; }
14984if test "${ac_cv_liblzma+set}" = set; then :
14985 $as_echo_n "(cached) " >&6
14986else
14987
14988 ac_save_LIBS="$LIBS"
14989 LIBS="$LIBS $LIBLZMA"
14990 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14991/* end confdefs.h. */
14992#include "lzma.h"
14993int
14994main ()
14995{
14996lzma_index_iter iter;
14997 lzma_index_iter_init (&iter, 0);
14998 lzma_mf_is_supported (LZMA_MF_HC3);
14999 ;
15000 return 0;
15001}
15002_ACEOF
15003if ac_fn_c_try_link "$LINENO"; then :
15004 ac_cv_liblzma=yes
15005else
15006 ac_cv_liblzma=no
15007fi
15008rm -f core conftest.err conftest.$ac_objext \
15009 conftest$ac_exeext conftest.$ac_ext
15010 LIBS="$ac_save_LIBS"
15011
15012fi
15013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5
15014$as_echo "$ac_cv_liblzma" >&6; }
15015 if test "$ac_cv_liblzma" = yes; then
15016 HAVE_LIBLZMA=yes
15017
15018$as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h
15019
15020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5
15021$as_echo_n "checking how to link with liblzma... " >&6; }
15022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5
15023$as_echo "$LIBLZMA" >&6; }
15024 else
15025 HAVE_LIBLZMA=no
15026 CPPFLAGS="$ac_save_CPPFLAGS"
15027 LIBLZMA=
15028 LTLIBLZMA=
15029 fi
15030
15031
15032
15033
15034
15035
15036 if test "$HAVE_LIBLZMA" != yes; then
15037 if test "$with_lzma" = yes; then
15038 as_fn_error "missing liblzma for --with-lzma" "$LINENO" 5
15039 fi
15040 fi
15041 fi
15042fi
15043
3fc11d3e
JM
15044LIBGUI="../libgui/src/libgui.a"
15045GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
15046
15047
7a292a7a 15048
3fc11d3e
JM
15049WIN32LDAPP=
15050
15051
15052
d91670b9 15053case "${host}" in
686a5eed 15054*-*-cygwin* | *-*-mingw* )
d91670b9
CV
15055 configdir="win"
15056 ;;
15057*)
15058 configdir="unix"
15059 ;;
15060esac
3fc11d3e
JM
15061
15062GDBTKLIBS=
15063if test "${enable_gdbtk}" = "yes"; then
15064
d1c3b63a
KS
15065 # Gdbtk must have an absolute path to srcdir in order to run
15066 # properly when not installed.
15067 here=`pwd`
15068 cd ${srcdir}
15069 GDBTK_SRC_DIR=`pwd`
15070 cd $here
15071
bec39cab 15072
5062cc19
KS
15073 #
15074 # Ok, lets find the tcl configuration
15075 # First, look for one uninstalled.
15076 # the alternative search directory is invoked by --with-tcl
15077 #
3fc11d3e 15078
5062cc19
KS
15079 if test x"${no_tcl}" = x ; then
15080 # we reset no_tcl in case something fails here
15081 no_tcl=true
bec39cab 15082
81ecdfbb
RW
15083# Check whether --with-tcl was given.
15084if test "${with_tcl+set}" = set; then :
15085 withval=$with_tcl; with_tclconfig=${withval}
15086fi
15087
15088 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
15089$as_echo_n "checking for Tcl configuration... " >&6; }
15090 if test "${ac_cv_c_tclconfig+set}" = set; then :
15091 $as_echo_n "(cached) " >&6
3fc11d3e 15092else
bec39cab 15093
3fc11d3e 15094
5062cc19
KS
15095 # First check to see if --with-tcl was specified.
15096 case "${host}" in
15097 *-*-cygwin*) platDir="win" ;;
15098 *) platDir="unix" ;;
15099 esac
15100 if test x"${with_tclconfig}" != x ; then
15101 if test -f "${with_tclconfig}/tclConfig.sh" ; then
15102 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
15103 else
81ecdfbb 15104 as_fn_error "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
5062cc19
KS
15105 fi
15106 fi
15107
15108 # then check for a private Tcl installation
15109 if test x"${ac_cv_c_tclconfig}" = x ; then
15110 for i in \
15111 ../tcl \
15112 `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
15113 `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
15114 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
15115 ../../tcl \
15116 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
15117 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
15118 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
15119 ../../../tcl \
15120 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
15121 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
15122 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
15123 if test -f "$i/$platDir/tclConfig.sh" ; then
15124 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
15125 break
15126 fi
15127 done
15128 fi
15129
15130 # on Darwin, check in Framework installation locations
15131 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
15132 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
15133 `ls -d /Library/Frameworks 2>/dev/null` \
15134 `ls -d /Network/Library/Frameworks 2>/dev/null` \
15135 `ls -d /System/Library/Frameworks 2>/dev/null` \
15136 ; do
15137 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
15138 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
15139 break
15140 fi
15141 done
15142 fi
15143
15144 # check in a few common install locations
15145 if test x"${ac_cv_c_tclconfig}" = x ; then
15146 for i in `ls -d ${libdir} 2>/dev/null` \
15147 `ls -d ${exec_prefix}/lib 2>/dev/null` \
15148 `ls -d ${prefix}/lib 2>/dev/null` \
15149 `ls -d /usr/local/lib 2>/dev/null` \
15150 `ls -d /usr/contrib/lib 2>/dev/null` \
15151 `ls -d /usr/lib 2>/dev/null` \
15152 ; do
15153 if test -f "$i/tclConfig.sh" ; then
15154 ac_cv_c_tclconfig=`(cd $i; pwd)`
15155 break
15156 fi
15157 done
15158 fi
3fc11d3e 15159
5062cc19
KS
15160 # check in a few other private locations
15161 if test x"${ac_cv_c_tclconfig}" = x ; then
15162 for i in \
15163 ${srcdir}/../tcl \
15164 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
15165 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
15166 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
15167 if test -f "$i/$platDir/tclConfig.sh" ; then
15168 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
15169 break
15170 fi
15171 done
15172 fi
bec39cab 15173
3fc11d3e
JM
15174fi
15175
5062cc19
KS
15176
15177 if test x"${ac_cv_c_tclconfig}" = x ; then
15178 TCL_BIN_DIR="# no Tcl configs found"
81ecdfbb
RW
15179 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
15180$as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
5062cc19
KS
15181 else
15182 no_tcl=
15183 TCL_BIN_DIR=${ac_cv_c_tclconfig}
81ecdfbb
RW
15184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
15185$as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
5062cc19
KS
15186 fi
15187 fi
3fc11d3e 15188
bec39cab 15189
85541719
DE
15190 # If $no_tk is nonempty, then we can't do Tk, and there is no
15191 # point to doing Tcl.
bec39cab 15192
5062cc19
KS
15193 #
15194 # Ok, lets find the tk configuration
15195 # First, look for one uninstalled.
15196 # the alternative search directory is invoked by --with-tk
15197 #
3fc11d3e 15198
5062cc19
KS
15199 if test x"${no_tk}" = x ; then
15200 # we reset no_tk in case something fails here
15201 no_tk=true
bec39cab 15202
81ecdfbb
RW
15203# Check whether --with-tk was given.
15204if test "${with_tk+set}" = set; then :
15205 withval=$with_tk; with_tkconfig=${withval}
15206fi
15207
15208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
15209$as_echo_n "checking for Tk configuration... " >&6; }
15210 if test "${ac_cv_c_tkconfig+set}" = set; then :
15211 $as_echo_n "(cached) " >&6
bec39cab 15212else
3fc11d3e
JM
15213
15214
5062cc19
KS
15215 # First check to see if --with-tkconfig was specified.
15216 if test x"${with_tkconfig}" != x ; then
15217 if test -f "${with_tkconfig}/tkConfig.sh" ; then
15218 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
15219 else
81ecdfbb 15220 as_fn_error "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
5062cc19
KS
15221 fi
15222 fi
3fc11d3e 15223
5062cc19
KS
15224 # then check for a private Tk library
15225 case "${host}" in
15226 *-*-cygwin*) platDir="win" ;;
15227 *) platDir="unix" ;;
15228 esac
15229 if test x"${ac_cv_c_tkconfig}" = x ; then
15230 for i in \
15231 ../tk \
15232 `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
15233 `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
15234 `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
15235 ../../tk \
15236 `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
15237 `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
15238 `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
15239 ../../../tk \
15240 `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
15241 `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
15242 `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
15243 if test -f "$i/$platDir/tkConfig.sh" ; then
15244 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
15245 break
15246 fi
15247 done
15248 fi
15249
15250 # on Darwin, check in Framework installation locations
15251 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
15252 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
15253 `ls -d /Library/Frameworks 2>/dev/null` \
15254 `ls -d /Network/Library/Frameworks 2>/dev/null` \
15255 `ls -d /System/Library/Frameworks 2>/dev/null` \
15256 ; do
15257 if test -f "$i/Tk.framework/tkConfig.sh" ; then
15258 ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
15259 break
15260 fi
15261 done
15262 fi
15263
15264 # check in a few common install locations
15265 if test x"${ac_cv_c_tkconfig}" = x ; then
15266 for i in `ls -d ${libdir} 2>/dev/null` \
15267 `ls -d ${exec_prefix}/lib 2>/dev/null` \
15268 `ls -d ${prefix}/lib 2>/dev/null` \
15269 `ls -d /usr/local/lib 2>/dev/null` \
15270 `ls -d /usr/contrib/lib 2>/dev/null` \
15271 `ls -d /usr/lib 2>/dev/null` \
15272 ; do
15273 if test -f "$i/tkConfig.sh" ; then
15274 ac_cv_c_tkconfig=`(cd $i; pwd)`
15275 break
15276 fi
15277 done
15278 fi
15279 # check in a few other private locations
15280 if test x"${ac_cv_c_tkconfig}" = x ; then
15281 for i in \
15282 ${srcdir}/../tk \
15283 `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
15284 `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
15285 `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
15286 if test -f "$i/$platDir/tkConfig.sh" ; then
15287 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
15288 break
15289 fi
15290 done
15291 fi
3fc11d3e 15292
3fc11d3e
JM
15293fi
15294
15295
5062cc19
KS
15296 if test x"${ac_cv_c_tkconfig}" = x ; then
15297 TK_BIN_DIR="# no Tk configs found"
81ecdfbb
RW
15298 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
15299$as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
5062cc19
KS
15300 else
15301 no_tk=
15302 TK_BIN_DIR=${ac_cv_c_tkconfig}
81ecdfbb
RW
15303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
15304$as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
5062cc19 15305 fi
3fc11d3e 15306 fi
dd2504ab 15307
dd2504ab 15308
85541719
DE
15309 if test -z "${no_tcl}" -a -z "${no_tk}"; then
15310
81ecdfbb
RW
15311 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
15312$as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
85541719
DE
15313
15314 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
81ecdfbb
RW
15315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
15316$as_echo "loading" >&6; }
85541719
DE
15317 . ${TCL_BIN_DIR}/tclConfig.sh
15318 else
81ecdfbb
RW
15319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
15320$as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
85541719
DE
15321 fi
15322
15323 # eval is required to do the TCL_DBGX substitution
15324 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
15325 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
15326
15327 # If the TCL_BIN_DIR is the build directory (not the install directory),
15328 # then set the common variable name to the value of the build variables.
15329 # For example, the variable TCL_LIB_SPEC will be set to the value
15330 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
15331 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
15332 # installed and uninstalled version of Tcl.
15333 if test -f "${TCL_BIN_DIR}/Makefile" ; then
15334 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
15335 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
15336 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
15337 elif test "`uname -s`" = "Darwin"; then
15338 # If Tcl was built as a framework, attempt to use the libraries
15339 # from the framework at the given location so that linking works
a68ffae9 15340 # against Tcl.framework installed in an arbitrary location.
85541719
DE
15341 case ${TCL_DEFS} in
15342 *TCL_FRAMEWORK*)
15343 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
15344 for i in "`cd ${TCL_BIN_DIR}; pwd`" \
15345 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
15346 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
15347 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
15348 break
15349 fi
15350 done
15351 fi
15352 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
15353 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
15354 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
15355 fi
15356 ;;
15357 esac
15358 fi
15359
15360 # eval is required to do the TCL_DBGX substitution
15361 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
15362 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
15363 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
15364 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
15365
15366
15367
15368
15369
15370
15371
15372
15373
15374
15375
15376
15377
15378
15379
15380 # Check for in-tree tcl
15381 here=`pwd`
15382 cd ${srcdir}/..
15383 topdir=`pwd`
15384 cd ${here}
15385
15386 intree="no"
15387 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
15388 intree="yes"
15389 fi
15390
15391 # Find Tcl private headers
15392 if test x"${intree}" = xno; then
15393
81ecdfbb
RW
15394 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
15395$as_echo_n "checking for Tcl private headers... " >&6; }
85541719
DE
15396 private_dir=""
15397 dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
15398 if test -f ${dir}/tclInt.h ; then
15399 private_dir=${dir}
15400 fi
15401
15402 if test x"${private_dir}" = x; then
81ecdfbb 15403 as_fn_error "could not find private Tcl headers" "$LINENO" 5
85541719
DE
15404 else
15405 TCL_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
15406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
15407$as_echo "${private_dir}" >&6; }
85541719
DE
15408 fi
15409
15410 TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
15411 TCL_LIBRARY="${TCL_LIB_SPEC}"
15412 TCL_DEPS=""
15413 else
15414 # If building tcl in the same src tree, private headers
15415 # are not needed, but we need to be sure to use the right
15416 # headers library
15417 TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
15418 TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
15419 TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
15420 fi
15421
15422
15423
15424
15425
81ecdfbb
RW
15426 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
15427$as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
dd2504ab 15428
5062cc19 15429 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
81ecdfbb
RW
15430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
15431$as_echo "loading" >&6; }
5062cc19 15432 . ${TK_BIN_DIR}/tkConfig.sh
3fc11d3e 15433 else
81ecdfbb
RW
15434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
15435$as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
3fc11d3e 15436 fi
bec39cab 15437
5062cc19
KS
15438 # eval is required to do the TK_DBGX substitution
15439 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
15440 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
15441
15442 # If the TK_BIN_DIR is the build directory (not the install directory),
15443 # then set the common variable name to the value of the build variables.
15444 # For example, the variable TK_LIB_SPEC will be set to the value
15445 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
15446 # instead of TK_BUILD_LIB_SPEC since it will work with both an
15447 # installed and uninstalled version of Tcl.
85541719 15448 if test -f "${TK_BIN_DIR}/Makefile" ; then
5062cc19
KS
15449 TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
15450 TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
15451 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
15452 elif test "`uname -s`" = "Darwin"; then
15453 # If Tk was built as a framework, attempt to use the libraries
15454 # from the framework at the given location so that linking works
a68ffae9 15455 # against Tk.framework installed in an arbitrary location.
5062cc19
KS
15456 case ${TK_DEFS} in
15457 *TK_FRAMEWORK*)
85541719 15458 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
5062cc19
KS
15459 for i in "`cd ${TK_BIN_DIR}; pwd`" \
15460 "`cd ${TK_BIN_DIR}/../..; pwd`"; do
15461 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
15462 TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
15463 break
15464 fi
15465 done
15466 fi
85541719 15467 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
5062cc19
KS
15468 TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
15469 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
15470 fi
15471 ;;
15472 esac
3fc11d3e
JM
15473 fi
15474
5062cc19
KS
15475 # eval is required to do the TK_DBGX substitution
15476 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
15477 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
15478 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
15479 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
3fc11d3e 15480
3fc11d3e
JM
15481
15482
bec39cab
AC
15483
15484
15485
15486
15487
15488
15489
3fc11d3e 15490
3fc11d3e 15491
bec39cab 15492
bec39cab 15493
85541719
DE
15494 # Check for in-tree Tk
15495 intree="no"
15496 if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
15497 intree="yes"
15498 fi
3fc11d3e 15499
85541719
DE
15500 # Find Tk private headers
15501 if test x"${intree}" = xno; then
3fc11d3e 15502
81ecdfbb
RW
15503 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
15504$as_echo_n "checking for Tk private headers... " >&6; }
5062cc19
KS
15505 private_dir=""
15506 dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
15507 if test -f ${dir}/tkInt.h; then
15508 private_dir=${dir}
3fc11d3e 15509 fi
bec39cab 15510
5062cc19 15511 if test x"${private_dir}" = x; then
81ecdfbb 15512 as_fn_error "could not find Tk private headers" "$LINENO" 5
3fc11d3e 15513 else
5062cc19 15514 TK_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
15515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
15516$as_echo "${private_dir}" >&6; }
3fc11d3e 15517 fi
3fc11d3e 15518
85541719
DE
15519 TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
15520 TK_LIBRARY=${TK_LIB_SPEC}
15521 TK_DEPS=""
15522 else
15523 TK_INCLUDE="-I${TK_SRC_DIR}/generic"
15524 TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
15525 TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
15526 fi
3fc11d3e
JM
15527
15528
3fc11d3e
JM
15529
15530
3fc11d3e 15531
85541719 15532 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e 15533
85541719
DE
15534 # Include some libraries that Tcl and Tk want.
15535 TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
15536 # Yes, the ordering seems wrong here. But it isn't.
15537 # TK_LIBS is the list of libraries that need to be linked
15538 # after Tcl/Tk. Note that this isn't put into LIBS. If it
15539 # were in LIBS then any link tests after this point would
15540 # try to include things like `$(LIBGUI)', which wouldn't work.
15541 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5 15542
85541719
DE
15543 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
15544 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
15545 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
15546 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
15547 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
15548 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
15549 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
3fc11d3e 15550
85541719
DE
15551 if test x$gdb_cv_os_cygwin = xyes; then
15552 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
15553 WIN32LDAPP="-Wl,--subsystem,console"
15554 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
3fc11d3e 15555 fi
ffc6a242 15556
81ecdfbb 15557 subdirs="$subdirs gdbtk"
3ace7edb 15558
85541719 15559 fi
3fc11d3e
JM
15560fi
15561
15562
15563
15564
15565
15566
15567
15568
81ecdfbb
RW
15569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
15570$as_echo_n "checking for X... " >&6; }
bec39cab 15571
c906108c 15572
81ecdfbb
RW
15573# Check whether --with-x was given.
15574if test "${with_x+set}" = set; then :
15575 withval=$with_x;
15576fi
c906108c
SS
15577
15578# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
15579if test "x$with_x" = xno; then
15580 # The user explicitly disabled X.
15581 have_x=disabled
15582else
81ecdfbb
RW
15583 case $x_includes,$x_libraries in #(
15584 *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
15585 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
15586 $as_echo_n "(cached) " >&6
c906108c
SS
15587else
15588 # One or both of the vars are not set, and there is no cached value.
bec39cab 15589ac_x_includes=no ac_x_libraries=no
81ecdfbb 15590rm -f -r conftest.dir
bec39cab
AC
15591if mkdir conftest.dir; then
15592 cd conftest.dir
bec39cab 15593 cat >Imakefile <<'_ACEOF'
81ecdfbb
RW
15594incroot:
15595 @echo incroot='${INCROOT}'
15596usrlibdir:
15597 @echo usrlibdir='${USRLIBDIR}'
15598libdir:
15599 @echo libdir='${LIBDIR}'
15600_ACEOF
15601 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
c906108c 15602 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
81ecdfbb
RW
15603 for ac_var in incroot usrlibdir libdir; do
15604 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
15605 done
c906108c 15606 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
81ecdfbb
RW
15607 for ac_extension in a so sl dylib la dll; do
15608 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
15609 test -f "$ac_im_libdir/libX11.$ac_extension"; then
bec39cab 15610 ac_im_usrlibdir=$ac_im_libdir; break
c906108c
SS
15611 fi
15612 done
15613 # Screen out bogus values from the imake configuration. They are
15614 # bogus both because they are the default anyway, and because
15615 # using them would break gcc on systems where it needs fixed includes.
bec39cab 15616 case $ac_im_incroot in
81ecdfbb 15617 /usr/include) ac_x_includes= ;;
bec39cab 15618 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
c906108c 15619 esac
bec39cab 15620 case $ac_im_usrlibdir in
81ecdfbb 15621 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
bec39cab 15622 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
c906108c
SS
15623 esac
15624 fi
15625 cd ..
81ecdfbb 15626 rm -f -r conftest.dir
c906108c
SS
15627fi
15628
bec39cab
AC
15629# Standard set of common directories for X headers.
15630# Check X11 before X11Rn because it is often a symlink to the current release.
15631ac_x_header_dirs='
15632/usr/X11/include
81ecdfbb 15633/usr/X11R7/include
bec39cab
AC
15634/usr/X11R6/include
15635/usr/X11R5/include
15636/usr/X11R4/include
15637
15638/usr/include/X11
81ecdfbb 15639/usr/include/X11R7
bec39cab
AC
15640/usr/include/X11R6
15641/usr/include/X11R5
15642/usr/include/X11R4
15643
15644/usr/local/X11/include
81ecdfbb 15645/usr/local/X11R7/include
bec39cab
AC
15646/usr/local/X11R6/include
15647/usr/local/X11R5/include
15648/usr/local/X11R4/include
15649
15650/usr/local/include/X11
81ecdfbb 15651/usr/local/include/X11R7
bec39cab
AC
15652/usr/local/include/X11R6
15653/usr/local/include/X11R5
15654/usr/local/include/X11R4
15655
15656/usr/X386/include
15657/usr/x386/include
15658/usr/XFree86/include/X11
15659
15660/usr/include
15661/usr/local/include
15662/usr/unsupported/include
15663/usr/athena/include
15664/usr/local/x11r5/include
15665/usr/lpp/Xamples/include
15666
15667/usr/openwin/include
15668/usr/openwin/share/include'
15669
15670if test "$ac_x_includes" = no; then
81ecdfbb 15671 # Guess where to find include files, by looking for Xlib.h.
c906108c 15672 # First, try using that file with no special directory specified.
81ecdfbb 15673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15674/* end confdefs.h. */
81ecdfbb 15675#include <X11/Xlib.h>
bec39cab 15676_ACEOF
81ecdfbb 15677if ac_fn_c_try_cpp "$LINENO"; then :
c906108c
SS
15678 # We can compile using X headers with no special include directory.
15679ac_x_includes=
15680else
bec39cab 15681 for ac_dir in $ac_x_header_dirs; do
81ecdfbb 15682 if test -r "$ac_dir/X11/Xlib.h"; then
bec39cab
AC
15683 ac_x_includes=$ac_dir
15684 break
15685 fi
15686done
c906108c 15687fi
bec39cab
AC
15688rm -f conftest.err conftest.$ac_ext
15689fi # $ac_x_includes = no
c906108c 15690
bec39cab 15691if test "$ac_x_libraries" = no; then
c906108c 15692 # Check for the libraries.
c906108c
SS
15693 # See if we find them without any special options.
15694 # Don't add to $LIBS permanently.
bec39cab 15695 ac_save_LIBS=$LIBS
81ecdfbb
RW
15696 LIBS="-lX11 $LIBS"
15697 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15698/* end confdefs.h. */
81ecdfbb 15699#include <X11/Xlib.h>
bec39cab
AC
15700int
15701main ()
15702{
81ecdfbb 15703XrmInitialize ()
bec39cab
AC
15704 ;
15705 return 0;
15706}
15707_ACEOF
81ecdfbb 15708if ac_fn_c_try_link "$LINENO"; then :
bec39cab 15709 LIBS=$ac_save_LIBS
c906108c
SS
15710# We can link X programs with no special library path.
15711ac_x_libraries=
15712else
81ecdfbb
RW
15713 LIBS=$ac_save_LIBS
15714for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
c906108c 15715do
bec39cab 15716 # Don't even attempt the hair of trying to link an X program!
81ecdfbb
RW
15717 for ac_extension in a so sl dylib la dll; do
15718 if test -r "$ac_dir/libX11.$ac_extension"; then
c906108c
SS
15719 ac_x_libraries=$ac_dir
15720 break 2
15721 fi
15722 done
15723done
15724fi
81ecdfbb
RW
15725rm -f core conftest.err conftest.$ac_objext \
15726 conftest$ac_exeext conftest.$ac_ext
bec39cab 15727fi # $ac_x_libraries = no
c906108c 15728
81ecdfbb
RW
15729case $ac_x_includes,$ac_x_libraries in #(
15730 no,* | *,no | *\'*)
15731 # Didn't find X, or a directory has "'" in its name.
15732 ac_cv_have_x="have_x=no";; #(
15733 *)
15734 # Record where we found X for the cache.
15735 ac_cv_have_x="have_x=yes\
15736 ac_x_includes='$ac_x_includes'\
15737 ac_x_libraries='$ac_x_libraries'"
15738esac
c906108c 15739fi
81ecdfbb
RW
15740;; #(
15741 *) have_x=yes;;
15742 esac
c906108c
SS
15743 eval "$ac_cv_have_x"
15744fi # $with_x != no
15745
15746if test "$have_x" != yes; then
81ecdfbb
RW
15747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
15748$as_echo "$have_x" >&6; }
c906108c
SS
15749 no_x=yes
15750else
15751 # If each of the values was on the command line, it overrides each guess.
15752 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
15753 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
15754 # Update the cache value to reflect the command line values.
81ecdfbb
RW
15755 ac_cv_have_x="have_x=yes\
15756 ac_x_includes='$x_includes'\
15757 ac_x_libraries='$x_libraries'"
15758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
15759$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
c906108c
SS
15760fi
15761
15762
bec39cab 15763# Unlike the sim directory, whether a simulator is linked is controlled by
9b624dbe 15764# presence of a gdb_sim definition in the target configure.tgt entry.
7a292a7a
SS
15765# This code just checks for a few cases where we'd like to ignore those
15766# definitions, even when they're present in the '.mt' file. These cases
15767# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 15768# not part of the source tree.
7a292a7a 15769#
81ecdfbb
RW
15770# Check whether --enable-sim was given.
15771if test "${enable_sim+set}" = set; then :
15772 enableval=$enable_sim; echo "enable_sim = $enable_sim";
7a292a7a
SS
15773 echo "enableval = ${enableval}";
15774 case "${enableval}" in
15775 yes) ignore_sim=false ;;
15776 no) ignore_sim=true ;;
15777 *) ignore_sim=false ;;
15778 esac
15779else
15780 ignore_sim=false
81ecdfbb
RW
15781fi
15782
7a292a7a
SS
15783
15784if test ! -d "${srcdir}/../sim"; then
15785 ignore_sim=true
15786fi
15787
9b624dbe
UW
15788SIM=
15789SIM_OBS=
15790if test "${ignore_sim}" = "false"; then
15791 if test x"${gdb_sim}" != x ; then
15792 SIM="${gdb_sim}"
15793 SIM_OBS="remote-sim.o"
60ca704f 15794
81ecdfbb 15795$as_echo "#define WITH_SIM 1" >>confdefs.h
7a292a7a 15796
976102cd
PA
15797
15798 # Some tdep code should only be compiled in when the ppc sim is
15799 # built. PR sim/13418.
15800 case $target in
15801 powerpc*-*-*)
15802
15803$as_echo "#define WITH_PPC_SIM 1" >>confdefs.h
15804
15805 ;;
15806 esac
9b624dbe 15807 fi
7a292a7a
SS
15808fi
15809
15810
15811
c906108c
SS
15812
15813
15814
15815
15816
15817
dfcd3bfb 15818
e56ac5c3
AC
15819
15820
b3a90332
AC
15821
15822
c35f4ffc 15823# List of host floatformats.
bec39cab
AC
15824
15825cat >>confdefs.h <<_ACEOF
c35f4ffc 15826#define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
bec39cab 15827_ACEOF
c35f4ffc 15828
bec39cab
AC
15829
15830cat >>confdefs.h <<_ACEOF
c35f4ffc 15831#define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
bec39cab
AC
15832_ACEOF
15833
c35f4ffc 15834
bec39cab 15835cat >>confdefs.h <<_ACEOF
c35f4ffc 15836#define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
bec39cab 15837_ACEOF
c35f4ffc
AC
15838
15839
c906108c
SS
15840# target_subdir is used by the testsuite to find the target libraries.
15841target_subdir=
15842if test "${host}" != "${target}"; then
15843 target_subdir="${target_alias}/"
15844fi
15845
15846
15847frags=
771b4502 15848if test "${gdb_native}" = "yes"; then
0dad8a66
MK
15849 host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
15850 if test ! -f ${host_makefile_frag}; then
81ecdfbb 15851 as_fn_error "\"*** Gdb does not support native target ${host}\"" "$LINENO" 5
0dad8a66
MK
15852 fi
15853 frags="$frags $host_makefile_frag"
15854else
15855 host_makefile_frag=/dev/null
c906108c 15856fi
c906108c 15857
c906108c
SS
15858
15859
15860
771b4502 15861if test "${gdb_native}" = "yes"; then
a85f51e7
DJ
15862# We pick this up from the host configuration file (.mh) because we
15863# do not have a native configuration Makefile fragment.
c906108c
SS
15864nativefile=`sed -n '
15865s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
15866' ${host_makefile_frag}`
c906108c
SS
15867fi
15868
15869
b00a8037 15870if test x"${gdb_osabi}" != x ; then
bec39cab
AC
15871
15872cat >>confdefs.h <<_ACEOF
b00a8037 15873#define GDB_OSABI_DEFAULT $gdb_osabi
bec39cab 15874_ACEOF
b00a8037
DJ
15875
15876fi
15877
8dcde887 15878# Enable multi-ice-gdb-server.
81ecdfbb
RW
15879# Check whether --enable-multi-ice was given.
15880if test "${enable_multi_ice+set}" = set; then :
15881 enableval=$enable_multi_ice; case $enableval in
8dcde887
MK
15882 yes | no)
15883 ;;
81ecdfbb 15884 *) as_fn_error "bad value $enableval for --enable-multi-ice" "$LINENO" 5 ;;
8dcde887 15885 esac
81ecdfbb 15886fi
b4e70030 15887
81ecdfbb
RW
15888if test "x$enable_multi_ice" = xyes; then
15889 subdirs="$subdirs multi-ice"
3ace7edb 15890
a85f51e7
DJ
15891fi
15892
496c0e1b
JB
15893# Check whether --enable-gdbserver was given.
15894if test "${enable_gdbserver+set}" = set; then :
15895 enableval=$enable_gdbserver; case "${enableval}" in
15896 yes| no|auto) ;;
15897 *) as_fn_error "bad value ${enableval} for --enable-gdbserver option" "$LINENO" 5 ;;
15898esac
15899else
15900 enable_gdbserver=auto
15901fi
15902
15903
15904# We only build gdbserver automatically in a native configuration, and
15905# only if the user did not explicitly disable its build.
15906if test "$gdb_native" = "yes" -a "$enable_gdbserver" != "no"; then
81ecdfbb
RW
15907 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5
15908$as_echo_n "checking whether gdbserver is supported on this host... " >&6; }
8dcde887 15909 if test "x$build_gdbserver" = xyes; then
81ecdfbb
RW
15910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15911$as_echo "yes" >&6; }
15912 subdirs="$subdirs gdbserver"
3ace7edb 15913
496c0e1b 15914 gdbserver_build_enabled=yes
8dcde887 15915 else
81ecdfbb
RW
15916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15917$as_echo "no" >&6; }
8dcde887
MK
15918 fi
15919fi
15920
496c0e1b
JB
15921# If the user explicitly request the gdbserver to be built, verify that
15922# we were in fact able to enable it.
15923if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then
15924 as_fn_error "Automatic gdbserver build is not supported for this configuration" "$LINENO" 5
15925fi
15926
393fd4c3
YQ
15927# Check for babeltrace and babeltrace-ctf
15928
15929# Check whether --with-babeltrace was given.
15930if test "${with_babeltrace+set}" = set; then :
15931 withval=$with_babeltrace;
15932else
15933 with_babeltrace=auto
15934fi
15935
15936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltrace" >&5
15937$as_echo_n "checking whether to use babeltrace... " >&6; }
15938{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5
15939$as_echo "$with_babeltrace" >&6; }
15940
15941if test "x$with_babeltrace" = "xno"; then
15942 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&5
15943$as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&2;}
15944else
15945 # Append -Werror to CFLAGS so that configure can catch the warning
15946 # "assignment from incompatible pointer type", which is related to
15947 # the babeltrace change from 1.0.3 to 1.1.0. Babeltrace 1.1.0 works
15948 # in GDB, while babeltrace 1.0.3 is broken.
15949 # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be
15950 # safe to save and restore CFLAGS here.
15951 saved_CFLAGS=$CFLAGS
15952 CFLAGS="$CFLAGS -Werror"
15953
15954
15955
15956
15957
15958
15959
15960
15961 use_additional=yes
15962
15963 acl_save_prefix="$prefix"
15964 prefix="$acl_final_prefix"
15965 acl_save_exec_prefix="$exec_prefix"
15966 exec_prefix="$acl_final_exec_prefix"
15967
15968 eval additional_includedir=\"$includedir\"
15969 eval additional_libdir=\"$libdir\"
15970
15971 exec_prefix="$acl_save_exec_prefix"
15972 prefix="$acl_save_prefix"
15973
15974
15975# Check whether --with-libbabeltrace-prefix was given.
15976if test "${with_libbabeltrace_prefix+set}" = set; then :
15977 withval=$with_libbabeltrace_prefix;
15978 if test "X$withval" = "Xno"; then
15979 use_additional=no
15980 else
15981 if test "X$withval" = "X"; then
15982
15983 acl_save_prefix="$prefix"
15984 prefix="$acl_final_prefix"
15985 acl_save_exec_prefix="$exec_prefix"
15986 exec_prefix="$acl_final_exec_prefix"
15987
15988 eval additional_includedir=\"$includedir\"
15989 eval additional_libdir=\"$libdir\"
15990
15991 exec_prefix="$acl_save_exec_prefix"
15992 prefix="$acl_save_prefix"
15993
15994 else
15995 additional_includedir="$withval/include"
15996 additional_libdir="$withval/lib"
15997 fi
15998 fi
15999
16000fi
16001
16002 LIBBABELTRACE=
16003 LTLIBBABELTRACE=
16004 INCBABELTRACE=
16005 rpathdirs=
16006 ltrpathdirs=
16007 names_already_handled=
16008 names_next_round='babeltrace babeltrace-ctf'
16009 while test -n "$names_next_round"; do
16010 names_this_round="$names_next_round"
16011 names_next_round=
16012 for name in $names_this_round; do
16013 already_handled=
16014 for n in $names_already_handled; do
16015 if test "$n" = "$name"; then
16016 already_handled=yes
16017 break
16018 fi
16019 done
16020 if test -z "$already_handled"; then
16021 names_already_handled="$names_already_handled $name"
16022 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
16023 eval value=\"\$HAVE_LIB$uppername\"
16024 if test -n "$value"; then
16025 if test "$value" = yes; then
16026 eval value=\"\$LIB$uppername\"
16027 test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value"
16028 eval value=\"\$LTLIB$uppername\"
16029 test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value"
16030 else
16031 :
16032 fi
16033 else
16034 found_dir=
16035 found_la=
16036 found_so=
16037 found_a=
16038 if test $use_additional = yes; then
16039 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
16040 found_dir="$additional_libdir"
16041 found_so="$additional_libdir/lib$name.$shlibext"
16042 if test -f "$additional_libdir/lib$name.la"; then
16043 found_la="$additional_libdir/lib$name.la"
16044 fi
16045 else
16046 if test -f "$additional_libdir/lib$name.$libext"; then
16047 found_dir="$additional_libdir"
16048 found_a="$additional_libdir/lib$name.$libext"
16049 if test -f "$additional_libdir/lib$name.la"; then
16050 found_la="$additional_libdir/lib$name.la"
16051 fi
16052 fi
16053 fi
16054 fi
16055 if test "X$found_dir" = "X"; then
16056 for x in $LDFLAGS $LTLIBBABELTRACE; do
16057
16058 acl_save_prefix="$prefix"
16059 prefix="$acl_final_prefix"
16060 acl_save_exec_prefix="$exec_prefix"
16061 exec_prefix="$acl_final_exec_prefix"
16062 eval x=\"$x\"
16063 exec_prefix="$acl_save_exec_prefix"
16064 prefix="$acl_save_prefix"
16065
16066 case "$x" in
16067 -L*)
16068 dir=`echo "X$x" | sed -e 's/^X-L//'`
16069 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
16070 found_dir="$dir"
16071 found_so="$dir/lib$name.$shlibext"
16072 if test -f "$dir/lib$name.la"; then
16073 found_la="$dir/lib$name.la"
16074 fi
16075 else
16076 if test -f "$dir/lib$name.$libext"; then
16077 found_dir="$dir"
16078 found_a="$dir/lib$name.$libext"
16079 if test -f "$dir/lib$name.la"; then
16080 found_la="$dir/lib$name.la"
16081 fi
16082 fi
16083 fi
16084 ;;
16085 esac
16086 if test "X$found_dir" != "X"; then
16087 break
16088 fi
16089 done
16090 fi
16091 if test "X$found_dir" != "X"; then
16092 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name"
16093 if test "X$found_so" != "X"; then
16094 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
16095 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
16096 else
16097 haveit=
16098 for x in $ltrpathdirs; do
16099 if test "X$x" = "X$found_dir"; then
16100 haveit=yes
16101 break
16102 fi
16103 done
16104 if test -z "$haveit"; then
16105 ltrpathdirs="$ltrpathdirs $found_dir"
16106 fi
16107 if test "$hardcode_direct" = yes; then
16108 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
16109 else
16110 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
16111 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
16112 haveit=
16113 for x in $rpathdirs; do
16114 if test "X$x" = "X$found_dir"; then
16115 haveit=yes
16116 break
16117 fi
16118 done
16119 if test -z "$haveit"; then
16120 rpathdirs="$rpathdirs $found_dir"
16121 fi
16122 else
16123 haveit=
16124 for x in $LDFLAGS $LIBBABELTRACE; do
16125
16126 acl_save_prefix="$prefix"
16127 prefix="$acl_final_prefix"
16128 acl_save_exec_prefix="$exec_prefix"
16129 exec_prefix="$acl_final_exec_prefix"
16130 eval x=\"$x\"
16131 exec_prefix="$acl_save_exec_prefix"
16132 prefix="$acl_save_prefix"
16133
16134 if test "X$x" = "X-L$found_dir"; then
16135 haveit=yes
16136 break
16137 fi
16138 done
16139 if test -z "$haveit"; then
16140 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir"
16141 fi
16142 if test "$hardcode_minus_L" != no; then
16143 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
16144 else
16145 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
16146 fi
16147 fi
16148 fi
16149 fi
16150 else
16151 if test "X$found_a" != "X"; then
16152 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a"
16153 else
16154 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name"
16155 fi
16156 fi
16157 additional_includedir=
16158 case "$found_dir" in
16159 */lib | */lib/)
16160 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
16161 additional_includedir="$basedir/include"
16162 ;;
16163 esac
16164 if test "X$additional_includedir" != "X"; then
16165 if test "X$additional_includedir" != "X/usr/include"; then
16166 haveit=
16167 if test "X$additional_includedir" = "X/usr/local/include"; then
16168 if test -n "$GCC"; then
16169 case $host_os in
16170 linux*) haveit=yes;;
16171 esac
16172 fi
16173 fi
16174 if test -z "$haveit"; then
16175 for x in $CPPFLAGS $INCBABELTRACE; do
16176
16177 acl_save_prefix="$prefix"
16178 prefix="$acl_final_prefix"
16179 acl_save_exec_prefix="$exec_prefix"
16180 exec_prefix="$acl_final_exec_prefix"
16181 eval x=\"$x\"
16182 exec_prefix="$acl_save_exec_prefix"
16183 prefix="$acl_save_prefix"
16184
16185 if test "X$x" = "X-I$additional_includedir"; then
16186 haveit=yes
16187 break
16188 fi
16189 done
16190 if test -z "$haveit"; then
16191 if test -d "$additional_includedir"; then
16192 INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir"
16193 fi
16194 fi
16195 fi
16196 fi
16197 fi
16198 if test -n "$found_la"; then
16199 save_libdir="$libdir"
16200 case "$found_la" in
16201 */* | *\\*) . "$found_la" ;;
16202 *) . "./$found_la" ;;
16203 esac
16204 libdir="$save_libdir"
16205 for dep in $dependency_libs; do
16206 case "$dep" in
16207 -L*)
16208 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
16209 if test "X$additional_libdir" != "X/usr/lib"; then
16210 haveit=
16211 if test "X$additional_libdir" = "X/usr/local/lib"; then
16212 if test -n "$GCC"; then
16213 case $host_os in
16214 linux*) haveit=yes;;
16215 esac
16216 fi
16217 fi
16218 if test -z "$haveit"; then
16219 haveit=
16220 for x in $LDFLAGS $LIBBABELTRACE; do
16221
16222 acl_save_prefix="$prefix"
16223 prefix="$acl_final_prefix"
16224 acl_save_exec_prefix="$exec_prefix"
16225 exec_prefix="$acl_final_exec_prefix"
16226 eval x=\"$x\"
16227 exec_prefix="$acl_save_exec_prefix"
16228 prefix="$acl_save_prefix"
16229
16230 if test "X$x" = "X-L$additional_libdir"; then
16231 haveit=yes
16232 break
16233 fi
16234 done
16235 if test -z "$haveit"; then
16236 if test -d "$additional_libdir"; then
16237 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir"
16238 fi
16239 fi
16240 haveit=
16241 for x in $LDFLAGS $LTLIBBABELTRACE; do
16242
16243 acl_save_prefix="$prefix"
16244 prefix="$acl_final_prefix"
16245 acl_save_exec_prefix="$exec_prefix"
16246 exec_prefix="$acl_final_exec_prefix"
16247 eval x=\"$x\"
16248 exec_prefix="$acl_save_exec_prefix"
16249 prefix="$acl_save_prefix"
16250
16251 if test "X$x" = "X-L$additional_libdir"; then
16252 haveit=yes
16253 break
16254 fi
16255 done
16256 if test -z "$haveit"; then
16257 if test -d "$additional_libdir"; then
16258 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir"
16259 fi
16260 fi
16261 fi
16262 fi
16263 ;;
16264 -R*)
16265 dir=`echo "X$dep" | sed -e 's/^X-R//'`
16266 if test "$enable_rpath" != no; then
16267 haveit=
16268 for x in $rpathdirs; do
16269 if test "X$x" = "X$dir"; then
16270 haveit=yes
16271 break
16272 fi
16273 done
16274 if test -z "$haveit"; then
16275 rpathdirs="$rpathdirs $dir"
16276 fi
16277 haveit=
16278 for x in $ltrpathdirs; do
16279 if test "X$x" = "X$dir"; then
16280 haveit=yes
16281 break
16282 fi
16283 done
16284 if test -z "$haveit"; then
16285 ltrpathdirs="$ltrpathdirs $dir"
16286 fi
16287 fi
16288 ;;
16289 -l*)
16290 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
16291 ;;
16292 *.la)
16293 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
16294 ;;
16295 *)
16296 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$dep"
16297 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$dep"
16298 ;;
16299 esac
16300 done
16301 fi
16302 else
16303 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
16304 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name"
16305 fi
16306 fi
16307 fi
16308 done
16309 done
16310 if test "X$rpathdirs" != "X"; then
16311 if test -n "$hardcode_libdir_separator"; then
16312 alldirs=
16313 for found_dir in $rpathdirs; do
16314 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
16315 done
16316 acl_save_libdir="$libdir"
16317 libdir="$alldirs"
16318 eval flag=\"$hardcode_libdir_flag_spec\"
16319 libdir="$acl_save_libdir"
16320 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
16321 else
16322 for found_dir in $rpathdirs; do
16323 acl_save_libdir="$libdir"
16324 libdir="$found_dir"
16325 eval flag=\"$hardcode_libdir_flag_spec\"
16326 libdir="$acl_save_libdir"
16327 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
16328 done
16329 fi
16330 fi
16331 if test "X$ltrpathdirs" != "X"; then
16332 for found_dir in $ltrpathdirs; do
16333 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir"
16334 done
16335 fi
16336
16337
16338 ac_save_CPPFLAGS="$CPPFLAGS"
16339
16340 for element in $INCBABELTRACE; do
16341 haveit=
16342 for x in $CPPFLAGS; do
16343
16344 acl_save_prefix="$prefix"
16345 prefix="$acl_final_prefix"
16346 acl_save_exec_prefix="$exec_prefix"
16347 exec_prefix="$acl_final_exec_prefix"
16348 eval x=\"$x\"
16349 exec_prefix="$acl_save_exec_prefix"
16350 prefix="$acl_save_prefix"
16351
16352 if test "X$x" = "X$element"; then
16353 haveit=yes
16354 break
16355 fi
16356 done
16357 if test -z "$haveit"; then
16358 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
16359 fi
16360 done
16361
16362
16363 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5
16364$as_echo_n "checking for libbabeltrace... " >&6; }
16365if test "${ac_cv_libbabeltrace+set}" = set; then :
16366 $as_echo_n "(cached) " >&6
16367else
16368
16369 ac_save_LIBS="$LIBS"
16370 LIBS="$LIBS $LIBBABELTRACE"
16371 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16372/* end confdefs.h. */
16373#include <babeltrace/babeltrace.h>
16374 #include <babeltrace/ctf/events.h>
16375 #include <babeltrace/ctf/iterator.h>
16376int
16377main ()
16378{
16379struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL));
16380 struct bt_ctf_event *event = NULL;
16381 const struct bt_definition *scope;
16382
13cdc2af 16383 pos->type = BT_SEEK_BEGIN;
65c749e7 16384 bt_iter_set_pos (bt_ctf_get_iter (NULL), pos);
393fd4c3
YQ
16385 scope = bt_ctf_get_top_level_scope (event,
16386 BT_STREAM_EVENT_HEADER);
16387 bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id"));
16388
16389 ;
16390 return 0;
16391}
16392_ACEOF
16393if ac_fn_c_try_link "$LINENO"; then :
16394 ac_cv_libbabeltrace=yes
16395else
16396 ac_cv_libbabeltrace=no
16397fi
16398rm -f core conftest.err conftest.$ac_objext \
16399 conftest$ac_exeext conftest.$ac_ext
16400 LIBS="$ac_save_LIBS"
16401
16402fi
16403{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5
16404$as_echo "$ac_cv_libbabeltrace" >&6; }
16405 if test "$ac_cv_libbabeltrace" = yes; then
16406 HAVE_LIBBABELTRACE=yes
16407
16408$as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h
16409
16410 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libbabeltrace" >&5
16411$as_echo_n "checking how to link with libbabeltrace... " >&6; }
16412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5
16413$as_echo "$LIBBABELTRACE" >&6; }
16414 else
16415 HAVE_LIBBABELTRACE=no
16416 CPPFLAGS="$ac_save_CPPFLAGS"
16417 LIBBABELTRACE=
16418 LTLIBBABELTRACE=
16419 fi
16420
16421
16422
16423
16424
16425
16426 CFLAGS=$saved_CFLAGS
16427
16428 if test "$HAVE_LIBBABELTRACE" != yes; then
16429 if test "$with_babeltrace" = yes; then
16430 as_fn_error "babeltrace is missing or unusable" "$LINENO" 5
16431 else
16432 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&5
16433$as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&2;}
16434 fi
16435 fi
16436fi
16437
db985757 16438# If nativefile (NAT_FILE) is not set in config/*/*.m[ht] files, we link
2c0fc042 16439# to an empty version.
c906108c
SS
16440
16441files=
16442links=
5a2402b8 16443
c906108c
SS
16444rm -f nm.h
16445if test "${nativefile}" != ""; then
0f475e27
AC
16446 case "${nativefile}" in
16447 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
16448 * ) GDB_NM_FILE="${nativefile}"
16449 esac
5a2402b8
AC
16450 files="${files} ${GDB_NM_FILE}"
16451 links="${links} nm.h"
60ca704f
SE
16452
16453cat >>confdefs.h <<_ACEOF
b78960be 16454#define GDB_NM_FILE "${GDB_NM_FILE}"
bec39cab 16455_ACEOF
5a2402b8 16456
c906108c 16457fi
5a2402b8
AC
16458
16459
e3487908
GKB
16460for ac_prog in xsltproc
16461do
16462 # Extract the first word of "$ac_prog", so it can be a program name with args.
16463set dummy $ac_prog; ac_word=$2
16464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16465$as_echo_n "checking for $ac_word... " >&6; }
16466if test "${ac_cv_path_XSLTPROC+set}" = set; then :
16467 $as_echo_n "(cached) " >&6
16468else
16469 case $XSLTPROC in
16470 [\\/]* | ?:[\\/]*)
16471 ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
16472 ;;
16473 *)
16474 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16475for as_dir in $PATH
16476do
16477 IFS=$as_save_IFS
16478 test -z "$as_dir" && as_dir=.
16479 for ac_exec_ext in '' $ac_executable_extensions; do
16480 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16481 ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
16482 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16483 break 2
16484 fi
16485done
16486 done
16487IFS=$as_save_IFS
16488
16489 ;;
16490esac
16491fi
16492XSLTPROC=$ac_cv_path_XSLTPROC
16493if test -n "$XSLTPROC"; then
16494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
16495$as_echo "$XSLTPROC" >&6; }
16496else
16497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16498$as_echo "no" >&6; }
16499fi
16500
16501
16502 test -n "$XSLTPROC" && break
16503done
16504test -n "$XSLTPROC" || XSLTPROC="missing"
16505
16506if test "x$USE_MAINTAINER_MODE" = xyes; then
16507 if test "${XSLTPROC}" = missing; then
16508 as_fn_error "unable to find xsltproc. maintainer-mode requires xsltproc." "$LINENO" 5
16509 fi
16510fi
16511
16512
bec39cab
AC
16513ac_sources="$files"
16514ac_dests="$links"
16515while test -n "$ac_sources"; do
16516 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
16517 set $ac_sources; ac_source=$1; shift; ac_sources=$*
16518 ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source"
16519done
81ecdfbb 16520ac_config_links="$ac_config_links $ac_config_links_1"
c906108c
SS
16521
16522
c906108c
SS
16523
16524
c906108c 16525
81ecdfbb 16526$as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
bec39cab 16527
bec39cab 16528
dcd1f979
TT
16529if $development; then
16530
16531$as_echo "#define GDB_SELF_TEST 1" >>confdefs.h
16532
16533fi
16534
b292c783 16535
f6a88844
JM
16536 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
16537 GDB_TRANSFORM_NAME=`echo gdb | sed -e "$gdb_ac_transform"`
16538 if test "x$GDB_TRANSFORM_NAME" = x; then
16539 GDB_TRANSFORM_NAME=gdb
16540 fi
16541
16542
16543
16544 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
16545 GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$gdb_ac_transform"`
16546 if test "x$GCORE_TRANSFORM_NAME" = x; then
16547 GCORE_TRANSFORM_NAME=gcore
16548 fi
16549
b292c783
JK
16550
16551ac_config_files="$ac_config_files gcore"
16552
c971b7fa 16553ac_config_files="$ac_config_files Makefile gdb-gdb.gdb doc/Makefile data-directory/Makefile"
81ecdfbb 16554
89a34d1b 16555
bec39cab
AC
16556cat >confcache <<\_ACEOF
16557# This file is a shell script that caches the results of configure
16558# tests run on this system so they can be shared between configure
16559# scripts and configure runs, see configure's option --config-cache.
16560# It is not useful on other systems. If it contains results you don't
16561# want to keep, you may remove or edit it.
16562#
16563# config.status only pays attention to the cache file if you give it
16564# the --recheck option to rerun configure.
16565#
16566# `ac_cv_env_foo' variables (set or unset) will be overridden when
16567# loading this file, other *unset* `ac_cv_foo' will be assigned the
16568# following values.
16569
16570_ACEOF
16571
16572# The following way of writing the cache mishandles newlines in values,
16573# but we know of no workaround that is simple, portable, and efficient.
81ecdfbb 16574# So, we kill variables containing newlines.
bec39cab
AC
16575# Ultrix sh set writes to stderr and can't be redirected directly,
16576# and sets the high bit in the cache file unless we assign to the vars.
81ecdfbb
RW
16577(
16578 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16579 eval ac_val=\$$ac_var
16580 case $ac_val in #(
16581 *${as_nl}*)
16582 case $ac_var in #(
16583 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16584$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
16585 esac
16586 case $ac_var in #(
16587 _ | IFS | as_nl) ;; #(
16588 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16589 *) { eval $ac_var=; unset $ac_var;} ;;
16590 esac ;;
16591 esac
16592 done
16593
bec39cab 16594 (set) 2>&1 |
81ecdfbb
RW
16595 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16596 *${as_nl}ac_space=\ *)
16597 # `set' does not quote correctly, so add quotes: double-quote
16598 # substitution turns \\\\ into \\, and sed turns \\ into \.
bec39cab
AC
16599 sed -n \
16600 "s/'/'\\\\''/g;
16601 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
81ecdfbb 16602 ;; #(
bec39cab
AC
16603 *)
16604 # `set' quotes correctly as required by POSIX, so do not add quotes.
81ecdfbb 16605 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
bec39cab 16606 ;;
81ecdfbb
RW
16607 esac |
16608 sort
16609) |
bec39cab 16610 sed '
81ecdfbb 16611 /^ac_cv_env_/b end
bec39cab 16612 t clear
81ecdfbb 16613 :clear
bec39cab
AC
16614 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16615 t end
81ecdfbb
RW
16616 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16617 :end' >>confcache
16618if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16619 if test -w "$cache_file"; then
16620 test "x$cache_file" != "x/dev/null" &&
16621 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16622$as_echo "$as_me: updating cache $cache_file" >&6;}
bec39cab
AC
16623 cat confcache >$cache_file
16624 else
81ecdfbb
RW
16625 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16626$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
bec39cab
AC
16627 fi
16628fi
16629rm -f confcache
16630
16631test "x$prefix" = xNONE && prefix=$ac_default_prefix
16632# Let make expand exec_prefix.
16633test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16634
bec39cab
AC
16635DEFS=-DHAVE_CONFIG_H
16636
16637ac_libobjs=
16638ac_ltlibobjs=
16639for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16640 # 1. Remove the extension, and $U if already installed.
81ecdfbb
RW
16641 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
16642 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
16643 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16644 # will be set to the directory where LIBOBJS objects are built.
16645 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16646 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
bec39cab
AC
16647done
16648LIBOBJS=$ac_libobjs
16649
16650LTLIBOBJS=$ac_ltlibobjs
16651
16652
85981d60 16653if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
81ecdfbb
RW
16654 as_fn_error "conditional \"MAINTAINER_MODE\" was never defined.
16655Usually this means the macro was only invoked conditionally." "$LINENO" 5
85981d60 16656fi
a417dc56 16657if test -z "${GMAKE_TRUE}" && test -z "${GMAKE_FALSE}"; then
81ecdfbb
RW
16658 as_fn_error "conditional \"GMAKE\" was never defined.
16659Usually this means the macro was only invoked conditionally." "$LINENO" 5
a417dc56 16660fi
4df42755
DE
16661if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then
16662 as_fn_error "conditional \"HAVE_PYTHON\" was never defined.
16663Usually this means the macro was only invoked conditionally." "$LINENO" 5
16664fi
16665if test -z "${HAVE_GUILE_TRUE}" && test -z "${HAVE_GUILE_FALSE}"; then
16666 as_fn_error "conditional \"HAVE_GUILE\" was never defined.
16667Usually this means the macro was only invoked conditionally." "$LINENO" 5
16668fi
81ecdfbb
RW
16669
16670
bec39cab 16671: ${CONFIG_STATUS=./config.status}
81ecdfbb 16672ac_write_fail=0
bec39cab
AC
16673ac_clean_files_save=$ac_clean_files
16674ac_clean_files="$ac_clean_files $CONFIG_STATUS"
81ecdfbb
RW
16675{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16676$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16677as_write_fail=0
16678cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
bec39cab
AC
16679#! $SHELL
16680# Generated by $as_me.
16681# Run this file to recreate the current configuration.
16682# Compiler output produced by configure, useful for debugging
16683# configure, is in config.log if it exists.
16684
16685debug=false
16686ac_cs_recheck=false
16687ac_cs_silent=false
bec39cab 16688
81ecdfbb
RW
16689SHELL=\${CONFIG_SHELL-$SHELL}
16690export SHELL
16691_ASEOF
16692cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16693## -------------------- ##
16694## M4sh Initialization. ##
16695## -------------------- ##
16696
16697# Be more Bourne compatible
16698DUALCASE=1; export DUALCASE # for MKS sh
16699if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
16700 emulate sh
16701 NULLCMD=:
81ecdfbb 16702 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
16703 # is contrary to our usage. Disable this feature.
16704 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
16705 setopt NO_GLOB_SUBST
16706else
16707 case `(set -o) 2>/dev/null` in #(
16708 *posix*) :
16709 set -o posix ;; #(
16710 *) :
16711 ;;
16712esac
bec39cab 16713fi
bec39cab 16714
81ecdfbb
RW
16715
16716as_nl='
16717'
16718export as_nl
16719# Printing a long string crashes Solaris 7 /usr/bin/printf.
16720as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16721as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16722as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16723# Prefer a ksh shell builtin over an external printf program on Solaris,
16724# but without wasting forks for bash or zsh.
16725if test -z "$BASH_VERSION$ZSH_VERSION" \
16726 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16727 as_echo='print -r --'
16728 as_echo_n='print -rn --'
16729elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16730 as_echo='printf %s\n'
16731 as_echo_n='printf %s'
16732else
16733 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16734 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16735 as_echo_n='/usr/ucb/echo -n'
16736 else
16737 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16738 as_echo_n_body='eval
16739 arg=$1;
16740 case $arg in #(
16741 *"$as_nl"*)
16742 expr "X$arg" : "X\\(.*\\)$as_nl";
16743 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16744 esac;
16745 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16746 '
16747 export as_echo_n_body
16748 as_echo_n='sh -c $as_echo_n_body as_echo'
16749 fi
16750 export as_echo_body
16751 as_echo='sh -c $as_echo_body as_echo'
16752fi
16753
16754# The user is always right.
16755if test "${PATH_SEPARATOR+set}" != set; then
16756 PATH_SEPARATOR=:
16757 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16758 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16759 PATH_SEPARATOR=';'
16760 }
bec39cab
AC
16761fi
16762
16763
81ecdfbb
RW
16764# IFS
16765# We need space, tab and new line, in precisely that order. Quoting is
16766# there to prevent editors from complaining about space-tab.
16767# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16768# splitting by setting IFS to empty value.)
16769IFS=" "" $as_nl"
16770
16771# Find who we are. Look in the path if we contain no directory separator.
16772case $0 in #((
16773 *[\\/]* ) as_myself=$0 ;;
16774 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16775for as_dir in $PATH
16776do
16777 IFS=$as_save_IFS
16778 test -z "$as_dir" && as_dir=.
16779 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16780 done
16781IFS=$as_save_IFS
16782
16783 ;;
16784esac
16785# We did not find ourselves, most probably we were run as `sh COMMAND'
16786# in which case we are not to be found in the path.
16787if test "x$as_myself" = x; then
16788 as_myself=$0
16789fi
16790if test ! -f "$as_myself"; then
16791 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16792 exit 1
16793fi
16794
16795# Unset variables that we do not need and which cause bugs (e.g. in
16796# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16797# suppresses any "Segmentation fault" message there. '((' could
16798# trigger a bug in pdksh 5.2.14.
16799for as_var in BASH_ENV ENV MAIL MAILPATH
16800do eval test x\${$as_var+set} = xset \
16801 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
16802done
bec39cab
AC
16803PS1='$ '
16804PS2='> '
16805PS4='+ '
16806
16807# NLS nuisances.
81ecdfbb
RW
16808LC_ALL=C
16809export LC_ALL
16810LANGUAGE=C
16811export LANGUAGE
16812
16813# CDPATH.
16814(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16815
16816
16817# as_fn_error ERROR [LINENO LOG_FD]
16818# ---------------------------------
16819# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16820# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
16821# script with status $?, using 1 if that was 0.
16822as_fn_error ()
16823{
16824 as_status=$?; test $as_status -eq 0 && as_status=1
16825 if test "$3"; then
16826 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16827 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
16828 fi
16829 $as_echo "$as_me: error: $1" >&2
16830 as_fn_exit $as_status
16831} # as_fn_error
16832
16833
16834# as_fn_set_status STATUS
16835# -----------------------
16836# Set $? to STATUS, without forking.
16837as_fn_set_status ()
16838{
16839 return $1
16840} # as_fn_set_status
16841
16842# as_fn_exit STATUS
16843# -----------------
16844# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16845as_fn_exit ()
16846{
16847 set +e
16848 as_fn_set_status $1
16849 exit $1
16850} # as_fn_exit
16851
16852# as_fn_unset VAR
16853# ---------------
16854# Portably unset VAR.
16855as_fn_unset ()
16856{
16857 { eval $1=; unset $1;}
16858}
16859as_unset=as_fn_unset
16860# as_fn_append VAR VALUE
16861# ----------------------
16862# Append the text in VALUE to the end of the definition contained in VAR. Take
16863# advantage of any shell optimizations that allow amortized linear growth over
16864# repeated appends, instead of the typical quadratic growth present in naive
16865# implementations.
16866if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16867 eval 'as_fn_append ()
16868 {
16869 eval $1+=\$2
16870 }'
16871else
16872 as_fn_append ()
16873 {
16874 eval $1=\$$1\$2
16875 }
16876fi # as_fn_append
16877
16878# as_fn_arith ARG...
16879# ------------------
16880# Perform arithmetic evaluation on the ARGs, and store the result in the
16881# global $as_val. Take advantage of shells that can avoid forks. The arguments
16882# must be portable across $(()) and expr.
16883if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16884 eval 'as_fn_arith ()
16885 {
16886 as_val=$(( $* ))
16887 }'
16888else
16889 as_fn_arith ()
16890 {
16891 as_val=`expr "$@" || test $? -eq 1`
16892 }
16893fi # as_fn_arith
bec39cab 16894
81ecdfbb
RW
16895
16896if expr a : '\(a\)' >/dev/null 2>&1 &&
16897 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
16898 as_expr=expr
16899else
16900 as_expr=false
16901fi
16902
81ecdfbb 16903if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
16904 as_basename=basename
16905else
16906 as_basename=false
16907fi
16908
81ecdfbb
RW
16909if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16910 as_dirname=dirname
16911else
16912 as_dirname=false
16913fi
bec39cab 16914
81ecdfbb 16915as_me=`$as_basename -- "$0" ||
bec39cab
AC
16916$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16917 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
16918 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
16919$as_echo X/"$0" |
16920 sed '/^.*\/\([^/][^/]*\)\/*$/{
16921 s//\1/
16922 q
16923 }
16924 /^X\/\(\/\/\)$/{
16925 s//\1/
16926 q
16927 }
16928 /^X\/\(\/\).*/{
16929 s//\1/
16930 q
16931 }
16932 s/.*/./; q'`
b4e70030 16933
b4e70030
JB
16934# Avoid depending upon Character Ranges.
16935as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16936as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16937as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16938as_cr_digits='0123456789'
16939as_cr_alnum=$as_cr_Letters$as_cr_digits
16940
81ecdfbb
RW
16941ECHO_C= ECHO_N= ECHO_T=
16942case `echo -n x` in #(((((
16943-n*)
16944 case `echo 'xy\c'` in
16945 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
16946 xy) ECHO_C='\c';;
16947 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16948 ECHO_T=' ';;
16949 esac;;
16950*)
16951 ECHO_N='-n';;
bec39cab
AC
16952esac
16953
81ecdfbb
RW
16954rm -f conf$$ conf$$.exe conf$$.file
16955if test -d conf$$.dir; then
16956 rm -f conf$$.dir/conf$$.file
bec39cab 16957else
81ecdfbb
RW
16958 rm -f conf$$.dir
16959 mkdir conf$$.dir 2>/dev/null
bec39cab 16960fi
81ecdfbb
RW
16961if (echo >conf$$.file) 2>/dev/null; then
16962 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 16963 as_ln_s='ln -s'
81ecdfbb
RW
16964 # ... but there are two gotchas:
16965 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16966 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
16967 # In both cases, we have to default to `cp -p'.
16968 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
16969 as_ln_s='cp -p'
16970 elif ln conf$$.file conf$$ 2>/dev/null; then
16971 as_ln_s=ln
16972 else
16973 as_ln_s='cp -p'
b4e70030 16974 fi
bec39cab
AC
16975else
16976 as_ln_s='cp -p'
16977fi
81ecdfbb
RW
16978rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16979rmdir conf$$.dir 2>/dev/null
16980
16981
16982# as_fn_mkdir_p
16983# -------------
16984# Create "$as_dir" as a directory, including parents if necessary.
16985as_fn_mkdir_p ()
16986{
16987
16988 case $as_dir in #(
16989 -*) as_dir=./$as_dir;;
16990 esac
16991 test -d "$as_dir" || eval $as_mkdir_p || {
16992 as_dirs=
16993 while :; do
16994 case $as_dir in #(
16995 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
16996 *) as_qdir=$as_dir;;
16997 esac
16998 as_dirs="'$as_qdir' $as_dirs"
16999 as_dir=`$as_dirname -- "$as_dir" ||
17000$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17001 X"$as_dir" : 'X\(//\)[^/]' \| \
17002 X"$as_dir" : 'X\(//\)$' \| \
17003 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17004$as_echo X"$as_dir" |
17005 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17006 s//\1/
17007 q
17008 }
17009 /^X\(\/\/\)[^/].*/{
17010 s//\1/
17011 q
17012 }
17013 /^X\(\/\/\)$/{
17014 s//\1/
17015 q
17016 }
17017 /^X\(\/\).*/{
17018 s//\1/
17019 q
17020 }
17021 s/.*/./; q'`
17022 test -d "$as_dir" && break
17023 done
17024 test -z "$as_dirs" || eval "mkdir $as_dirs"
17025 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
17026
bec39cab 17027
81ecdfbb 17028} # as_fn_mkdir_p
bec39cab 17029if mkdir -p . 2>/dev/null; then
81ecdfbb 17030 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
17031else
17032 test -d ./-p && rmdir ./-p
17033 as_mkdir_p=false
17034fi
17035
81ecdfbb
RW
17036if test -x / >/dev/null 2>&1; then
17037 as_test_x='test -x'
17038else
17039 if ls -dL / >/dev/null 2>&1; then
17040 as_ls_L_option=L
17041 else
17042 as_ls_L_option=
17043 fi
17044 as_test_x='
17045 eval sh -c '\''
17046 if test -d "$1"; then
17047 test -d "$1/.";
17048 else
17049 case $1 in #(
17050 -*)set "./$1";;
17051 esac;
17052 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
17053 ???[sx]*):;;*)false;;esac;fi
17054 '\'' sh
17055 '
17056fi
17057as_executable_p=$as_test_x
bec39cab
AC
17058
17059# Sed expression to map a string onto a valid CPP name.
17060as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
17061
17062# Sed expression to map a string onto a valid variable name.
17063as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
17064
17065
bec39cab 17066exec 6>&1
81ecdfbb
RW
17067## ----------------------------------- ##
17068## Main body of $CONFIG_STATUS script. ##
17069## ----------------------------------- ##
17070_ASEOF
17071test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
17072
17073cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17074# Save the log message, to keep $0 and so on meaningful, and to
bec39cab 17075# report actual input values of CONFIG_FILES etc. instead of their
81ecdfbb
RW
17076# values after options handling.
17077ac_log="
bec39cab 17078This file was extended by $as_me, which was
81ecdfbb 17079generated by GNU Autoconf 2.64. Invocation command line was
bec39cab
AC
17080
17081 CONFIG_FILES = $CONFIG_FILES
17082 CONFIG_HEADERS = $CONFIG_HEADERS
17083 CONFIG_LINKS = $CONFIG_LINKS
17084 CONFIG_COMMANDS = $CONFIG_COMMANDS
17085 $ $0 $@
17086
81ecdfbb
RW
17087on `(hostname || uname -n) 2>/dev/null | sed 1q`
17088"
17089
bec39cab
AC
17090_ACEOF
17091
81ecdfbb
RW
17092case $ac_config_files in *"
17093"*) set x $ac_config_files; shift; ac_config_files=$*;;
17094esac
234b45d4 17095
81ecdfbb
RW
17096case $ac_config_headers in *"
17097"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17098esac
b4e70030 17099
b4e70030 17100
81ecdfbb
RW
17101cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17102# Files that config.status was made for.
17103config_files="$ac_config_files"
17104config_headers="$ac_config_headers"
17105config_links="$ac_config_links"
17106config_commands="$ac_config_commands"
234b45d4 17107
81ecdfbb 17108_ACEOF
b4e70030 17109
81ecdfbb 17110cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab 17111ac_cs_usage="\
81ecdfbb
RW
17112\`$as_me' instantiates files and other configuration actions
17113from templates according to the current configuration. Unless the files
17114and actions are specified as TAGs, all are instantiated by default.
234b45d4 17115
81ecdfbb 17116Usage: $0 [OPTION]... [TAG]...
234b45d4 17117
bec39cab 17118 -h, --help print this help, then exit
81ecdfbb
RW
17119 -V, --version print version number and configuration settings, then exit
17120 -q, --quiet, --silent
17121 do not print progress messages
bec39cab
AC
17122 -d, --debug don't remove temporary files
17123 --recheck update $as_me by reconfiguring in the same conditions
81ecdfbb
RW
17124 --file=FILE[:TEMPLATE]
17125 instantiate the configuration file FILE
17126 --header=FILE[:TEMPLATE]
17127 instantiate the configuration header FILE
234b45d4 17128
bec39cab
AC
17129Configuration files:
17130$config_files
234b45d4 17131
bec39cab
AC
17132Configuration headers:
17133$config_headers
234b45d4 17134
bec39cab
AC
17135Configuration links:
17136$config_links
234b45d4 17137
bec39cab
AC
17138Configuration commands:
17139$config_commands
17140
81ecdfbb 17141Report bugs to the package provider."
b4e70030 17142
81ecdfbb
RW
17143_ACEOF
17144cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab
AC
17145ac_cs_version="\\
17146config.status
81ecdfbb
RW
17147configured by $0, generated by GNU Autoconf 2.64,
17148 with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
bec39cab 17149
81ecdfbb 17150Copyright (C) 2009 Free Software Foundation, Inc.
bec39cab
AC
17151This config.status script is free software; the Free Software Foundation
17152gives unlimited permission to copy, distribute and modify it."
81ecdfbb
RW
17153
17154ac_pwd='$ac_pwd'
17155srcdir='$srcdir'
17156INSTALL='$INSTALL'
81ecdfbb
RW
17157AWK='$AWK'
17158test -n "\$AWK" || AWK=awk
bec39cab
AC
17159_ACEOF
17160
81ecdfbb
RW
17161cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17162# The default lists apply if the user does not specify any file.
bec39cab
AC
17163ac_need_defaults=:
17164while test $# != 0
17165do
17166 case $1 in
17167 --*=*)
81ecdfbb
RW
17168 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17169 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
bec39cab 17170 ac_shift=:
c906108c 17171 ;;
81ecdfbb 17172 *)
bec39cab
AC
17173 ac_option=$1
17174 ac_optarg=$2
17175 ac_shift=shift
c906108c 17176 ;;
bec39cab 17177 esac
c906108c 17178
bec39cab
AC
17179 case $ac_option in
17180 # Handling of the options.
bec39cab
AC
17181 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17182 ac_cs_recheck=: ;;
81ecdfbb
RW
17183 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
17184 $as_echo "$ac_cs_version"; exit ;;
17185 --debug | --debu | --deb | --de | --d | -d )
bec39cab
AC
17186 debug=: ;;
17187 --file | --fil | --fi | --f )
17188 $ac_shift
81ecdfbb
RW
17189 case $ac_optarg in
17190 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17191 esac
17192 as_fn_append CONFIG_FILES " '$ac_optarg'"
bec39cab
AC
17193 ac_need_defaults=false;;
17194 --header | --heade | --head | --hea )
17195 $ac_shift
81ecdfbb
RW
17196 case $ac_optarg in
17197 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17198 esac
17199 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
bec39cab 17200 ac_need_defaults=false;;
81ecdfbb
RW
17201 --he | --h)
17202 # Conflict between --help and --header
17203 as_fn_error "ambiguous option: \`$1'
17204Try \`$0 --help' for more information.";;
17205 --help | --hel | -h )
17206 $as_echo "$ac_cs_usage"; exit ;;
bec39cab
AC
17207 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17208 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17209 ac_cs_silent=: ;;
c906108c 17210
bec39cab 17211 # This is an error.
81ecdfbb
RW
17212 -*) as_fn_error "unrecognized option: \`$1'
17213Try \`$0 --help' for more information." ;;
c906108c 17214
81ecdfbb
RW
17215 *) as_fn_append ac_config_targets " $1"
17216 ac_need_defaults=false ;;
c906108c 17217
bec39cab
AC
17218 esac
17219 shift
17220done
c906108c 17221
bec39cab 17222ac_configure_extra_args=
c906108c 17223
bec39cab
AC
17224if $ac_cs_silent; then
17225 exec 6>/dev/null
17226 ac_configure_extra_args="$ac_configure_extra_args --silent"
17227fi
c906108c 17228
bec39cab 17229_ACEOF
81ecdfbb 17230cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab 17231if \$ac_cs_recheck; then
81ecdfbb
RW
17232 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
17233 shift
17234 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17235 CONFIG_SHELL='$SHELL'
17236 export CONFIG_SHELL
17237 exec "\$@"
bec39cab
AC
17238fi
17239
17240_ACEOF
81ecdfbb
RW
17241cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17242exec 5>>config.log
17243{
17244 echo
17245 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17246## Running $as_me. ##
17247_ASBOX
17248 $as_echo "$ac_log"
17249} >&5
bec39cab 17250
81ecdfbb
RW
17251_ACEOF
17252cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
c906108c 17253#
81ecdfbb 17254# INIT-COMMANDS
c906108c 17255#
a417dc56 17256ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
b4e70030 17257
bec39cab
AC
17258_ACEOF
17259
81ecdfbb 17260cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
4e8d927d 17261
81ecdfbb 17262# Handling of arguments.
bec39cab 17263for ac_config_target in $ac_config_targets
c906108c 17264do
81ecdfbb
RW
17265 case $ac_config_target in
17266 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
17267 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
f997c383 17268 "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
81ecdfbb 17269 "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;;
b292c783 17270 "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;;
81ecdfbb 17271 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
e2207b9a 17272 "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;;
5ae98d25 17273 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
aa2e2d8d 17274 "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
81ecdfbb
RW
17275
17276 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
c906108c
SS
17277 esac
17278done
17279
81ecdfbb 17280
bec39cab
AC
17281# If the user did not use the arguments to specify the items to instantiate,
17282# then the envvar interface is used. Set only those that are not.
17283# We use the long form for the default assignment because of an extremely
17284# bizarre bug on SunOS 4.1.3.
17285if $ac_need_defaults; then
17286 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17287 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17288 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
17289 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
17290fi
17291
b4e70030 17292# Have a temporary directory for convenience. Make it in the build tree
81ecdfbb 17293# simply because there is no reason against having it here, and in addition,
b4e70030 17294# creating and moving files from /tmp can sometimes cause problems.
81ecdfbb
RW
17295# Hook for its removal unless debugging.
17296# Note that there is a small window in which the directory will not be cleaned:
17297# after its creation but before its name has been assigned to `$tmp'.
b4e70030
JB
17298$debug ||
17299{
81ecdfbb
RW
17300 tmp=
17301 trap 'exit_status=$?
17302 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
17303' 0
17304 trap 'as_fn_exit 1' 1 2 13 15
17305}
17306# Create a (secure) tmp directory for tmp files.
17307
17308{
17309 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
17310 test -n "$tmp" && test -d "$tmp"
17311} ||
17312{
17313 tmp=./conf$$-$RANDOM
17314 (umask 077 && mkdir "$tmp")
17315} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
17316
17317# Set up the scripts for CONFIG_FILES section.
17318# No need to generate them if there are no CONFIG_FILES.
17319# This happens for instance with `./config.status config.h'.
17320if test -n "$CONFIG_FILES"; then
17321
17322if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
17323 ac_cs_awk_getline=:
17324 ac_cs_awk_pipe_init=
17325 ac_cs_awk_read_file='
17326 while ((getline aline < (F[key])) > 0)
17327 print(aline)
17328 close(F[key])'
17329 ac_cs_awk_pipe_fini=
17330else
17331 ac_cs_awk_getline=false
17332 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
17333 ac_cs_awk_read_file='
17334 print "|#_!!_#|"
17335 print "cat " F[key] " &&"
17336 '$ac_cs_awk_pipe_init
17337 # The final `:' finishes the AND list.
17338 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
17339fi
17340ac_cr=`echo X | tr X '\015'`
17341# On cygwin, bash can eat \r inside `` if the user requested igncr.
17342# But we know of no other shell where ac_cr would be empty at this
17343# point, so we can use a bashism as a fallback.
17344if test "x$ac_cr" = x; then
17345 eval ac_cr=\$\'\\r\'
17346fi
17347ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17348if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
17349 ac_cs_awk_cr='\r'
17350else
17351 ac_cs_awk_cr=$ac_cr
17352fi
17353
17354echo 'BEGIN {' >"$tmp/subs1.awk" &&
17355_ACEOF
17356
17357# Create commands to substitute file output variables.
17358{
17359 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
17360 echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' &&
17361 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
17362 echo "_ACAWK" &&
17363 echo "_ACEOF"
17364} >conf$$files.sh &&
17365. ./conf$$files.sh ||
17366 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
17367rm -f conf$$files.sh
17368
17369{
17370 echo "cat >conf$$subs.awk <<_ACEOF" &&
17371 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17372 echo "_ACEOF"
17373} >conf$$subs.sh ||
17374 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
17375ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
17376ac_delim='%!_!# '
17377for ac_last_try in false false false false false :; do
17378 . ./conf$$subs.sh ||
17379 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
17380
17381 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17382 if test $ac_delim_n = $ac_delim_num; then
17383 break
17384 elif $ac_last_try; then
17385 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
17386 else
17387 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17388 fi
17389done
17390rm -f conf$$subs.sh
17391
17392cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17393cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
17394_ACEOF
17395sed -n '
17396h
17397s/^/S["/; s/!.*/"]=/
17398p
17399g
17400s/^[^!]*!//
17401:repl
17402t repl
17403s/'"$ac_delim"'$//
17404t delim
17405:nl
17406h
17407s/\(.\{148\}\).*/\1/
17408t more1
17409s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17410p
17411n
17412b repl
17413:more1
17414s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17415p
17416g
17417s/.\{148\}//
17418t nl
17419:delim
17420h
17421s/\(.\{148\}\).*/\1/
17422t more2
17423s/["\\]/\\&/g; s/^/"/; s/$/"/
17424p
17425b
17426:more2
17427s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17428p
17429g
17430s/.\{148\}//
17431t delim
17432' <conf$$subs.awk | sed '
17433/^[^""]/{
17434 N
17435 s/\n//
17436}
17437' >>$CONFIG_STATUS || ac_write_fail=1
17438rm -f conf$$subs.awk
17439cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17440_ACAWK
17441cat >>"\$tmp/subs1.awk" <<_ACAWK &&
17442 for (key in S) S_is_set[key] = 1
17443 FS = "\a"
17444 \$ac_cs_awk_pipe_init
17445}
17446{
17447 line = $ 0
17448 nfields = split(line, field, "@")
17449 substed = 0
17450 len = length(field[1])
17451 for (i = 2; i < nfields; i++) {
17452 key = field[i]
17453 keylen = length(key)
17454 if (S_is_set[key]) {
17455 value = S[key]
17456 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17457 len += length(value) + length(field[++i])
17458 substed = 1
17459 } else
17460 len += 1 + keylen
17461 }
17462 if (nfields == 3 && !substed) {
17463 key = field[2]
17464 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
17465 \$ac_cs_awk_read_file
17466 next
17467 }
17468 }
17469 print line
b4e70030 17470}
81ecdfbb
RW
17471\$ac_cs_awk_pipe_fini
17472_ACAWK
17473_ACEOF
17474cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17475if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17476 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17477else
17478 cat
17479fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
17480 || as_fn_error "could not setup config files machinery" "$LINENO" 5
17481_ACEOF
17482
17483# VPATH may cause trouble with some makes, so we remove $(srcdir),
17484# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
17485# trailing colons and then remove the whole line if VPATH becomes empty
17486# (actually we leave an empty line to preserve line numbers).
17487if test "x$srcdir" = x.; then
17488 ac_vpsub='/^[ ]*VPATH[ ]*=/{
17489s/:*\$(srcdir):*/:/
17490s/:*\${srcdir}:*/:/
17491s/:*@srcdir@:*/:/
17492s/^\([^=]*=[ ]*\):*/\1/
17493s/:*$//
17494s/^[^=]*=[ ]*$//
17495}'
17496fi
17497
17498cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17499fi # test -n "$CONFIG_FILES"
17500
17501# Set up the scripts for CONFIG_HEADERS section.
17502# No need to generate them if there are no CONFIG_HEADERS.
17503# This happens for instance with `./config.status Makefile'.
17504if test -n "$CONFIG_HEADERS"; then
17505cat >"$tmp/defines.awk" <<\_ACAWK ||
17506BEGIN {
17507_ACEOF
17508
17509# Transform confdefs.h into an awk script `defines.awk', embedded as
17510# here-document in config.status, that substitutes the proper values into
17511# config.h.in to produce config.h.
4e8d927d 17512
81ecdfbb
RW
17513# Create a delimiter string that does not exist in confdefs.h, to ease
17514# handling of long lines.
17515ac_delim='%!_!# '
17516for ac_last_try in false false :; do
17517 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
17518 if test -z "$ac_t"; then
17519 break
17520 elif $ac_last_try; then
17521 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
17522 else
17523 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17524 fi
17525done
4e8d927d 17526
81ecdfbb
RW
17527# For the awk script, D is an array of macro values keyed by name,
17528# likewise P contains macro parameters if any. Preserve backslash
17529# newline sequences.
17530
17531ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17532sed -n '
17533s/.\{148\}/&'"$ac_delim"'/g
17534t rset
17535:rset
17536s/^[ ]*#[ ]*define[ ][ ]*/ /
17537t def
17538d
17539:def
17540s/\\$//
17541t bsnl
17542s/["\\]/\\&/g
17543s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17544D["\1"]=" \3"/p
17545s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17546d
17547:bsnl
17548s/["\\]/\\&/g
17549s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17550D["\1"]=" \3\\\\\\n"\\/p
17551t cont
17552s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17553t cont
17554d
17555:cont
17556n
17557s/.\{148\}/&'"$ac_delim"'/g
17558t clear
17559:clear
17560s/\\$//
17561t bsnlc
17562s/["\\]/\\&/g; s/^/"/; s/$/"/p
17563d
17564:bsnlc
17565s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17566b cont
17567' <confdefs.h | sed '
17568s/'"$ac_delim"'/"\\\
17569"/g' >>$CONFIG_STATUS || ac_write_fail=1
17570
17571cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17572 for (key in D) D_is_set[key] = 1
17573 FS = "\a"
17574}
17575/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17576 line = \$ 0
17577 split(line, arg, " ")
17578 if (arg[1] == "#") {
17579 defundef = arg[2]
17580 mac1 = arg[3]
17581 } else {
17582 defundef = substr(arg[1], 2)
17583 mac1 = arg[2]
17584 }
17585 split(mac1, mac2, "(") #)
17586 macro = mac2[1]
17587 prefix = substr(line, 1, index(line, defundef) - 1)
17588 if (D_is_set[macro]) {
17589 # Preserve the white space surrounding the "#".
17590 print prefix "define", macro P[macro] D[macro]
17591 next
17592 } else {
17593 # Replace #undef with comments. This is necessary, for example,
17594 # in the case of _POSIX_SOURCE, which is predefined and required
17595 # on some systems where configure will not decide to define it.
17596 if (defundef == "undef") {
17597 print "/*", prefix defundef, macro, "*/"
17598 next
17599 }
17600 }
b4e70030 17601}
81ecdfbb
RW
17602{ print }
17603_ACAWK
b4e70030 17604_ACEOF
81ecdfbb
RW
17605cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17606 as_fn_error "could not setup config headers machinery" "$LINENO" 5
17607fi # test -n "$CONFIG_HEADERS"
4e8d927d 17608
4e8d927d 17609
81ecdfbb
RW
17610eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
17611shift
17612for ac_tag
17613do
17614 case $ac_tag in
17615 :[FHLC]) ac_mode=$ac_tag; continue;;
17616 esac
17617 case $ac_mode$ac_tag in
17618 :[FHL]*:*);;
17619 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
17620 :[FH]-) ac_tag=-:-;;
17621 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17622 esac
17623 ac_save_IFS=$IFS
17624 IFS=:
17625 set x $ac_tag
17626 IFS=$ac_save_IFS
17627 shift
17628 ac_file=$1
17629 shift
4e8d927d 17630
81ecdfbb
RW
17631 case $ac_mode in
17632 :L) ac_source=$1;;
17633 :[FH])
17634 ac_file_inputs=
17635 for ac_f
17636 do
17637 case $ac_f in
17638 -) ac_f="$tmp/stdin";;
17639 *) # Look for the file first in the build tree, then in the source tree
17640 # (if the path is not absolute). The absolute path cannot be DOS-style,
17641 # because $ac_f cannot contain `:'.
17642 test -f "$ac_f" ||
17643 case $ac_f in
17644 [\\/$]*) false;;
17645 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17646 esac ||
17647 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
17648 esac
17649 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17650 as_fn_append ac_file_inputs " '$ac_f'"
17651 done
17652
17653 # Let's still pretend it is `configure' which instantiates (i.e., don't
17654 # use $as_me), people would be surprised to read:
17655 # /* config.h. Generated by config.status. */
17656 configure_input='Generated from '`
17657 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17658 `' by configure.'
17659 if test x"$ac_file" != x-; then
17660 configure_input="$ac_file. $configure_input"
17661 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17662$as_echo "$as_me: creating $ac_file" >&6;}
b4e70030 17663 fi
81ecdfbb
RW
17664 # Neutralize special characters interpreted by sed in replacement strings.
17665 case $configure_input in #(
17666 *\&* | *\|* | *\\* )
17667 ac_sed_conf_input=`$as_echo "$configure_input" |
17668 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17669 *) ac_sed_conf_input=$configure_input;;
17670 esac
4e8d927d 17671
81ecdfbb
RW
17672 case $ac_tag in
17673 *:-:* | *:-) cat >"$tmp/stdin" \
17674 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
17675 esac
17676 ;;
c906108c
SS
17677 esac
17678
81ecdfbb 17679 ac_dir=`$as_dirname -- "$ac_file" ||
bec39cab
AC
17680$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17681 X"$ac_file" : 'X\(//\)[^/]' \| \
17682 X"$ac_file" : 'X\(//\)$' \| \
81ecdfbb
RW
17683 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
17684$as_echo X"$ac_file" |
17685 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17686 s//\1/
17687 q
17688 }
17689 /^X\(\/\/\)[^/].*/{
17690 s//\1/
17691 q
17692 }
17693 /^X\(\/\/\)$/{
17694 s//\1/
17695 q
17696 }
17697 /^X\(\/\).*/{
17698 s//\1/
17699 q
17700 }
17701 s/.*/./; q'`
17702 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
17703 ac_builddir=.
17704
81ecdfbb
RW
17705case "$ac_dir" in
17706.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17707*)
17708 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
17709 # A ".." for each directory in $ac_dir_suffix.
17710 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
17711 case $ac_top_builddir_sub in
17712 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17713 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17714 esac ;;
17715esac
17716ac_abs_top_builddir=$ac_pwd
17717ac_abs_builddir=$ac_pwd$ac_dir_suffix
17718# for backward compatibility:
17719ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
17720
17721case $srcdir in
81ecdfbb 17722 .) # We are building in place.
bec39cab 17723 ac_srcdir=.
81ecdfbb
RW
17724 ac_top_srcdir=$ac_top_builddir_sub
17725 ac_abs_top_srcdir=$ac_pwd ;;
17726 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 17727 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
17728 ac_top_srcdir=$srcdir
17729 ac_abs_top_srcdir=$srcdir ;;
17730 *) # Relative name.
17731 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17732 ac_top_srcdir=$ac_top_build_prefix$srcdir
17733 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 17734esac
81ecdfbb 17735ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 17736
c906108c 17737
81ecdfbb
RW
17738 case $ac_mode in
17739 :F)
17740 #
17741 # CONFIG_FILE
17742 #
c906108c 17743
bec39cab
AC
17744 case $INSTALL in
17745 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
81ecdfbb 17746 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
c906108c 17747 esac
81ecdfbb 17748_ACEOF
121ce6e5 17749
81ecdfbb
RW
17750cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17751# If the template does not know about datarootdir, expand it.
17752# FIXME: This hack should be removed a few years after 2.60.
17753ac_datarootdir_hack=; ac_datarootdir_seen=
17754ac_sed_dataroot='
17755/datarootdir/ {
17756 p
17757 q
17758}
17759/@datadir@/p
17760/@docdir@/p
17761/@infodir@/p
17762/@localedir@/p
17763/@mandir@/p'
17764case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
17765*datarootdir*) ac_datarootdir_seen=yes;;
17766*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
17767 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17768$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
17769_ACEOF
17770cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17771 ac_datarootdir_hack='
17772 s&@datadir@&$datadir&g
17773 s&@docdir@&$docdir&g
17774 s&@infodir@&$infodir&g
17775 s&@localedir@&$localedir&g
17776 s&@mandir@&$mandir&g
17777 s&\\\${datarootdir}&$datarootdir&g' ;;
17778esac
4e8d927d 17779_ACEOF
81ecdfbb
RW
17780
17781# Neutralize VPATH when `$srcdir' = `.'.
17782# Shell code in configure.ac might set extrasub.
17783# FIXME: do we really want to maintain this feature?
17784cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17785ac_sed_extra="$ac_vpsub
bec39cab
AC
17786$extrasub
17787_ACEOF
81ecdfbb 17788cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab
AC
17789:t
17790/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
81ecdfbb
RW
17791s|@configure_input@|$ac_sed_conf_input|;t t
17792s&@top_builddir@&$ac_top_builddir_sub&;t t
17793s&@top_build_prefix@&$ac_top_build_prefix&;t t
17794s&@srcdir@&$ac_srcdir&;t t
17795s&@abs_srcdir@&$ac_abs_srcdir&;t t
17796s&@top_srcdir@&$ac_top_srcdir&;t t
17797s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17798s&@builddir@&$ac_builddir&;t t
17799s&@abs_builddir@&$ac_abs_builddir&;t t
17800s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17801s&@INSTALL@&$ac_INSTALL&;t t
81ecdfbb
RW
17802$ac_datarootdir_hack
17803"
17804eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
17805if $ac_cs_awk_getline; then
17806 $AWK -f "$tmp/subs.awk"
17807else
17808 $AWK -f "$tmp/subs.awk" | $SHELL
17809fi >$tmp/out \
17810 || as_fn_error "could not create $ac_file" "$LINENO" 5
17811
17812test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
17813 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
17814 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
17815 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
17816which seems to be undefined. Please make sure it is defined." >&5
17817$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
17818which seems to be undefined. Please make sure it is defined." >&2;}
17819
17820 rm -f "$tmp/stdin"
bec39cab 17821 case $ac_file in
81ecdfbb
RW
17822 -) cat "$tmp/out" && rm -f "$tmp/out";;
17823 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
17824 esac \
17825 || as_fn_error "could not create $ac_file" "$LINENO" 5
17826 ;;
17827 :H)
17828 #
17829 # CONFIG_HEADER
17830 #
bec39cab 17831 if test x"$ac_file" != x-; then
81ecdfbb
RW
17832 {
17833 $as_echo "/* $configure_input */" \
17834 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
17835 } >"$tmp/config.h" \
17836 || as_fn_error "could not create $ac_file" "$LINENO" 5
17837 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
17838 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17839$as_echo "$as_me: $ac_file is unchanged" >&6;}
bec39cab 17840 else
81ecdfbb
RW
17841 rm -f "$ac_file"
17842 mv "$tmp/config.h" "$ac_file" \
17843 || as_fn_error "could not create $ac_file" "$LINENO" 5
bec39cab
AC
17844 fi
17845 else
81ecdfbb
RW
17846 $as_echo "/* $configure_input */" \
17847 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
17848 || as_fn_error "could not create -" "$LINENO" 5
bec39cab 17849 fi
81ecdfbb
RW
17850 ;;
17851 :L)
17852 #
17853 # CONFIG_LINK
17854 #
c906108c 17855
81ecdfbb
RW
17856 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
17857 :
b4e70030 17858 else
81ecdfbb
RW
17859 # Prefer the file from the source tree if names are identical.
17860 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
17861 ac_source=$srcdir/$ac_source
17862 fi
b4e70030 17863
81ecdfbb
RW
17864 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
17865$as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
b4e70030 17866
81ecdfbb
RW
17867 if test ! -r "$ac_source"; then
17868 as_fn_error "$ac_source: file not found" "$LINENO" 5
17869 fi
17870 rm -f "$ac_file"
bec39cab 17871
81ecdfbb
RW
17872 # Try a relative symlink, then a hard link, then a copy.
17873 case $srcdir in
17874 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
17875 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
17876 esac
17877 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
17878 ln "$ac_source" "$ac_file" 2>/dev/null ||
17879 cp -p "$ac_source" "$ac_file" ||
17880 as_fn_error "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
17881 fi
17882 ;;
17883 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
17884$as_echo "$as_me: executing $ac_file commands" >&6;}
17885 ;;
c906108c 17886 esac
b4e70030 17887
bec39cab 17888
81ecdfbb
RW
17889 case $ac_file$ac_mode in
17890 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
b292c783 17891 "gcore":F) chmod +x gcore ;;
1e94266c
SM
17892 "Makefile":F)
17893case x$CONFIG_HEADERS in
17894xconfig.h:config.in)
17895echo > stamp-h ;;
17896esac
17897 ;;
17898 "gdb-gdb.gdb":F)
17899case x$CONFIG_HEADERS in
17900xconfig.h:config.in)
17901echo > stamp-h ;;
17902esac
17903 ;;
17904 "doc/Makefile":F)
17905case x$CONFIG_HEADERS in
17906xconfig.h:config.in)
17907echo > stamp-h ;;
17908esac
17909 ;;
17910 "data-directory/Makefile":F)
c906108c
SS
17911case x$CONFIG_HEADERS in
17912xconfig.h:config.in)
17913echo > stamp-h ;;
17914esac
bec39cab 17915 ;;
81ecdfbb 17916
bec39cab 17917 esac
81ecdfbb 17918done # for ac_tag
c906108c 17919
bec39cab 17920
81ecdfbb 17921as_fn_exit 0
bec39cab 17922_ACEOF
bec39cab
AC
17923ac_clean_files=$ac_clean_files_save
17924
81ecdfbb
RW
17925test $ac_write_fail = 0 ||
17926 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
17927
bec39cab
AC
17928
17929# configure is writing to config.log, and then calls config.status.
17930# config.status does its own redirection, appending to config.log.
17931# Unfortunately, on DOS this fails, as config.log is still kept open
17932# by configure, so config.status won't be able to write to it; its
17933# output is simply discarded. So we exec the FD to /dev/null,
17934# effectively closing config.log, so it can be properly (re)opened and
17935# appended to by config.status. When coming back to configure, we
17936# need to make the FD available again.
17937if test "$no_create" != yes; then
17938 ac_cs_success=:
17939 ac_config_status_args=
17940 test "$silent" = yes &&
17941 ac_config_status_args="$ac_config_status_args --quiet"
17942 exec 5>/dev/null
17943 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
17944 exec 5>>config.log
17945 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17946 # would make configure fail if this is the last instruction.
81ecdfbb 17947 $ac_cs_success || as_fn_exit $?
bec39cab 17948fi
c906108c 17949
bec39cab 17950#
81ecdfbb 17951# CONFIG_SUBDIRS section.
bec39cab 17952#
c906108c
SS
17953if test "$no_recursion" != yes; then
17954
81ecdfbb
RW
17955 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
17956 # so they do not pile up.
c906108c
SS
17957 ac_sub_configure_args=
17958 ac_prev=
fdc59709
PB
17959 eval "set x $ac_configure_args"
17960 shift
17961 for ac_arg
17962 do
c906108c
SS
17963 if test -n "$ac_prev"; then
17964 ac_prev=
17965 continue
17966 fi
bec39cab 17967 case $ac_arg in
c906108c
SS
17968 -cache-file | --cache-file | --cache-fil | --cache-fi \
17969 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
17970 ac_prev=cache_file ;;
17971 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
bec39cab
AC
17972 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
17973 | --c=*)
17974 ;;
17975 --config-cache | -C)
c906108c
SS
17976 ;;
17977 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
17978 ac_prev=srcdir ;;
17979 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
17980 ;;
bec39cab
AC
17981 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
17982 ac_prev=prefix ;;
17983 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
17984 ;;
81ecdfbb
RW
17985 --disable-option-checking)
17986 ;;
fdc59709
PB
17987 *)
17988 case $ac_arg in
81ecdfbb 17989 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 17990 esac
81ecdfbb 17991 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
c906108c
SS
17992 esac
17993 done
17994
bec39cab
AC
17995 # Always prepend --prefix to ensure using the same prefix
17996 # in subdir configurations.
fdc59709
PB
17997 ac_arg="--prefix=$prefix"
17998 case $ac_arg in
81ecdfbb 17999 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 18000 esac
81ecdfbb
RW
18001 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
18002
18003 # Pass --silent
18004 if test "$silent" = yes; then
18005 ac_sub_configure_args="--silent $ac_sub_configure_args"
18006 fi
18007
18008 # Always prepend --disable-option-checking to silence warnings, since
18009 # different subdirs can have different --enable and --with options.
18010 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
bec39cab 18011
b4e70030 18012 ac_popdir=`pwd`
bec39cab 18013 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
c906108c
SS
18014
18015 # Do not complain, so a configure script can configure whichever
18016 # parts of a large source tree are present.
fdc59709 18017 test -d "$srcdir/$ac_dir" || continue
c906108c 18018
81ecdfbb
RW
18019 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
18020 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
18021 $as_echo "$ac_msg" >&6
18022 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
18023 ac_builddir=.
18024
81ecdfbb
RW
18025case "$ac_dir" in
18026.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18027*)
18028 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
18029 # A ".." for each directory in $ac_dir_suffix.
18030 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
18031 case $ac_top_builddir_sub in
18032 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18033 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18034 esac ;;
18035esac
18036ac_abs_top_builddir=$ac_pwd
18037ac_abs_builddir=$ac_pwd$ac_dir_suffix
18038# for backward compatibility:
18039ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
18040
18041case $srcdir in
81ecdfbb 18042 .) # We are building in place.
bec39cab 18043 ac_srcdir=.
81ecdfbb
RW
18044 ac_top_srcdir=$ac_top_builddir_sub
18045 ac_abs_top_srcdir=$ac_pwd ;;
18046 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 18047 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
18048 ac_top_srcdir=$srcdir
18049 ac_abs_top_srcdir=$srcdir ;;
18050 *) # Relative name.
18051 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18052 ac_top_srcdir=$ac_top_build_prefix$srcdir
18053 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 18054esac
81ecdfbb 18055ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
c906108c 18056
c906108c 18057
fdc59709 18058 cd "$ac_dir"
c906108c
SS
18059
18060 # Check for guested configure; otherwise get Cygnus style configure.
fdc59709
PB
18061 if test -f "$ac_srcdir/configure.gnu"; then
18062 ac_sub_configure=$ac_srcdir/configure.gnu
18063 elif test -f "$ac_srcdir/configure"; then
18064 ac_sub_configure=$ac_srcdir/configure
18065 elif test -f "$ac_srcdir/configure.in"; then
18066 # This should be Cygnus configure.
18067 ac_sub_configure=$ac_aux_dir/configure
c906108c 18068 else
81ecdfbb
RW
18069 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
18070$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
c906108c
SS
18071 ac_sub_configure=
18072 fi
18073
18074 # The recursion is here.
18075 if test -n "$ac_sub_configure"; then
c906108c 18076 # Make the cache file name correct relative to the subdirectory.
bec39cab
AC
18077 case $cache_file in
18078 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
81ecdfbb
RW
18079 *) # Relative name.
18080 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
c906108c 18081 esac
c906108c 18082
81ecdfbb
RW
18083 { $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
18084$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
c906108c 18085 # The eval makes quoting arguments work.
fdc59709
PB
18086 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
18087 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
81ecdfbb 18088 as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
c906108c
SS
18089 fi
18090
fdc59709 18091 cd "$ac_popdir"
c906108c
SS
18092 done
18093fi
81ecdfbb
RW
18094if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
18095 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
18096$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
18097fi
c906108c 18098
This page took 3.313115 seconds and 4 git commands to generate.