Yaakov Selkowitz: fixes for in-tree libiconv
[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
81ecdfbb 596GDB_NM_FILE
393fd4c3
YQ
597LTLIBBABELTRACE
598LIBBABELTRACE
599HAVE_LIBBABELTRACE
81ecdfbb
RW
600frags
601target_subdir
602CONFIG_UNINSTALL
603CONFIG_INSTALL
604CONFIG_CLEAN
605CONFIG_ALL
606CONFIG_SRCS
607CONFIG_DEPS
608CONFIG_OBS
609PROFILE_CFLAGS
610ENABLE_CFLAGS
611SIM_OBS
612SIM
613XMKMF
614GDBTK_SRC_DIR
615GDBTK_CFLAGS
616GDBTKLIBS
617X_LIBS
618X_LDFLAGS
619X_CFLAGS
620TK_XINCLUDES
621TK_DEPS
622TK_LIBRARY
623TK_INCLUDE
624TK_STUB_LIB_SPEC
625TK_STUB_LIB_FLAG
626TK_STUB_LIB_FILE
627TK_LIB_SPEC
628TK_LIB_FLAG
629TK_LIB_FILE
630TK_SRC_DIR
631TK_BIN_DIR
632TK_VERSION
633TCL_DEPS
634TCL_LIBRARY
635TCL_INCLUDE
636TCL_STUB_LIB_SPEC
637TCL_STUB_LIB_FLAG
638TCL_STUB_LIB_FILE
639TCL_LIB_SPEC
640TCL_LIB_FLAG
641TCL_LIB_FILE
642TCL_SRC_DIR
643TCL_BIN_DIR
644TCL_PATCH_LEVEL
645TCL_VERSION
646WIN32LDAPP
647GUI_CFLAGS_X
648LIBGUI
608e2dbb
TT
649LTLIBLZMA
650LIBLZMA
651HAVE_LIBLZMA
81ecdfbb
RW
652WIN32LIBS
653SER_HARDWIRE
654WERROR_CFLAGS
655WARN_CFLAGS
656SYSTEM_GDBINIT
81ecdfbb
RW
657TARGET_SYSTEM_ROOT
658CONFIG_LDFLAGS
f6528abd 659RDYNAMIC
81ecdfbb 660ALLOCA
58bfce93
MM
661LTLIBIPT
662LIBIPT
663HAVE_LIBIPT
4df42755
DE
664HAVE_GUILE_FALSE
665HAVE_GUILE_TRUE
ed3ef339
DE
666GUILE_LIBS
667GUILE_CPPFLAGS
e76c5d17
DE
668GUILD_TARGET_FLAG
669GUILD
ed3ef339 670pkg_config_prog_path
4df42755
DE
671HAVE_PYTHON_FALSE
672HAVE_PYTHON_TRUE
ac534cba
JB
673PYTHON_LIBS
674PYTHON_CPPFLAGS
81ecdfbb 675PYTHON_CFLAGS
ec685c5e 676python_prog_path
81ecdfbb
RW
677LTLIBEXPAT
678LIBEXPAT
679HAVE_LIBEXPAT
b8e0a31c 680JIT_READER_DIR
f997c383 681TARGET_PTR
39037522 682READLINE_TEXI_INCFLAG
81ecdfbb
RW
683READLINE_CFLAGS
684READLINE_DEPS
685READLINE
016a3251
DD
686LTLIBICONV
687LIBICONV
711a72d3
L
688zlibinc
689zlibdir
81ecdfbb
RW
690MIG
691WINDRES
692DLLTOOL
c971b7fa 693AR
81ecdfbb
RW
694YFLAGS
695YACC
c971b7fa 696RANLIB
81ecdfbb 697LN_S
c971b7fa
PA
698INSTALL_DATA
699INSTALL_SCRIPT
700INSTALL_PROGRAM
701AWK
81ecdfbb
RW
702REPORT_BUGS_TEXI
703REPORT_BUGS_TO
704PKGVERSION
b292c783 705HAVE_NATIVE_GCORE_TARGET
81ecdfbb
RW
706TARGET_OBS
707subdirs
708GDB_DATADIR
709DEBUGDIR
5048e516
JK
710MAKEINFO_EXTRA_FLAGS
711MAKEINFOFLAGS
712MAKEINFO
81ecdfbb
RW
713PACKAGE
714GNULIB_STDINT_H
81ecdfbb
RW
715CATOBJEXT
716GENCAT
717INSTOBJEXT
718DATADIRNAME
719CATALOGS
720POSUB
721GMSGFMT
722XGETTEXT
723INCINTL
724LIBINTL_DEP
725LIBINTL
726USE_NLS
727SET_MAKE
728GMAKE_FALSE
729GMAKE_TRUE
730MAKE
731CCDEPMODE
732DEPDIR
733am__leading_dot
3bc3d82a 734COMPILER
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
3bc3d82a 810enable_build_with_cxx
81ecdfbb
RW
811with_separate_debug_dir
812with_gdb_datadir
813with_relocated_sources
7349ff92 814with_auto_load_dir
bccbefd2 815with_auto_load_safe_path
81ecdfbb
RW
816enable_targets
817enable_64_bit_bfd
818enable_gdbcli
819enable_gdbmi
820enable_tui
821enable_gdbtk
05e7c244 822with_libunwind_ia64
81ecdfbb
RW
823with_curses
824enable_profiling
825with_pkgversion
826with_bugurl
711a72d3 827with_system_zlib
016a3251
DD
828with_gnu_ld
829enable_rpath
81ecdfbb 830with_libiconv_prefix
478aac75 831with_iconv_bin
81ecdfbb 832with_system_readline
b8e0a31c 833with_jit_reader_dir
81ecdfbb 834with_expat
81ecdfbb
RW
835with_libexpat_prefix
836with_python
ed3ef339 837with_guile
a8db4212 838enable_libmcheck
58bfce93
MM
839with_intel_pt
840with_libipt_prefix
81ecdfbb
RW
841with_included_regex
842with_sysroot
843with_system_gdbinit
844enable_werror
845enable_build_warnings
846enable_gdb_build_warnings
608e2dbb
TT
847with_lzma
848with_liblzma_prefix
81ecdfbb
RW
849with_tcl
850with_tk
851with_x
852enable_sim
853enable_multi_ice
496c0e1b 854enable_gdbserver
393fd4c3
YQ
855with_babeltrace
856with_libbabeltrace_prefix
81ecdfbb
RW
857'
858 ac_precious_vars='build_alias
859host_alias
860target_alias
861CC
862CFLAGS
863LDFLAGS
864LIBS
865CPPFLAGS
3bc3d82a
PA
866CXX
867CXXFLAGS
868CCC
81ecdfbb 869CPP
f06e05e0
JK
870MAKEINFO
871MAKEINFOFLAGS
81ecdfbb
RW
872YACC
873YFLAGS
874XMKMF'
5ae98d25 875ac_subdirs_all='testsuite
81ecdfbb
RW
876gdbtk
877multi-ice
878gdbserver'
c906108c
SS
879
880# Initialize some variables set by options.
bec39cab
AC
881ac_init_help=
882ac_init_version=false
81ecdfbb
RW
883ac_unrecognized_opts=
884ac_unrecognized_sep=
c906108c
SS
885# The variables have the same names as the options, with
886# dashes changed to underlines.
bec39cab 887cache_file=/dev/null
c906108c 888exec_prefix=NONE
c906108c 889no_create=
c906108c
SS
890no_recursion=
891prefix=NONE
892program_prefix=NONE
893program_suffix=NONE
894program_transform_name=s,x,x,
895silent=
896site=
897srcdir=
c906108c
SS
898verbose=
899x_includes=NONE
900x_libraries=NONE
bec39cab
AC
901
902# Installation directory options.
903# These are left unexpanded so users can "make install exec_prefix=/foo"
904# and all the variables that are supposed to be based on exec_prefix
905# by default will actually change.
906# Use braces instead of parens because sh, perl, etc. also accept them.
81ecdfbb 907# (The list follows the same order as the GNU Coding Standards.)
c906108c
SS
908bindir='${exec_prefix}/bin'
909sbindir='${exec_prefix}/sbin'
910libexecdir='${exec_prefix}/libexec'
81ecdfbb
RW
911datarootdir='${prefix}/share'
912datadir='${datarootdir}'
c906108c
SS
913sysconfdir='${prefix}/etc'
914sharedstatedir='${prefix}/com'
915localstatedir='${prefix}/var'
c906108c
SS
916includedir='${prefix}/include'
917oldincludedir='/usr/include'
81ecdfbb
RW
918docdir='${datarootdir}/doc/${PACKAGE}'
919infodir='${datarootdir}/info'
920htmldir='${docdir}'
921dvidir='${docdir}'
922pdfdir='${docdir}'
923psdir='${docdir}'
924libdir='${exec_prefix}/lib'
925localedir='${datarootdir}/locale'
926mandir='${datarootdir}/man'
c906108c 927
c906108c 928ac_prev=
81ecdfbb 929ac_dashdash=
c906108c
SS
930for ac_option
931do
c906108c
SS
932 # If the previous option needs an argument, assign it.
933 if test -n "$ac_prev"; then
81ecdfbb 934 eval $ac_prev=\$ac_option
c906108c
SS
935 ac_prev=
936 continue
937 fi
938
81ecdfbb
RW
939 case $ac_option in
940 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
941 *) ac_optarg=yes ;;
942 esac
c906108c
SS
943
944 # Accept the important Cygnus configure options, so we can diagnose typos.
945
81ecdfbb
RW
946 case $ac_dashdash$ac_option in
947 --)
948 ac_dashdash=yes ;;
c906108c
SS
949
950 -bindir | --bindir | --bindi | --bind | --bin | --bi)
951 ac_prev=bindir ;;
952 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
bec39cab 953 bindir=$ac_optarg ;;
c906108c
SS
954
955 -build | --build | --buil | --bui | --bu)
bec39cab 956 ac_prev=build_alias ;;
c906108c 957 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
bec39cab 958 build_alias=$ac_optarg ;;
c906108c
SS
959
960 -cache-file | --cache-file | --cache-fil | --cache-fi \
961 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
962 ac_prev=cache_file ;;
963 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
964 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
bec39cab
AC
965 cache_file=$ac_optarg ;;
966
967 --config-cache | -C)
968 cache_file=config.cache ;;
c906108c 969
81ecdfbb 970 -datadir | --datadir | --datadi | --datad)
c906108c 971 ac_prev=datadir ;;
81ecdfbb 972 -datadir=* | --datadir=* | --datadi=* | --datad=*)
bec39cab 973 datadir=$ac_optarg ;;
c906108c 974
81ecdfbb
RW
975 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
976 | --dataroo | --dataro | --datar)
977 ac_prev=datarootdir ;;
978 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
979 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
980 datarootdir=$ac_optarg ;;
981
c906108c 982 -disable-* | --disable-*)
81ecdfbb 983 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
c906108c 984 # Reject names that are not valid shell variable names.
81ecdfbb
RW
985 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
986 as_fn_error "invalid feature name: $ac_useropt"
987 ac_useropt_orig=$ac_useropt
988 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
989 case $ac_user_opts in
990 *"
991"enable_$ac_useropt"
992"*) ;;
993 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
994 ac_unrecognized_sep=', ';;
995 esac
996 eval enable_$ac_useropt=no ;;
997
998 -docdir | --docdir | --docdi | --doc | --do)
999 ac_prev=docdir ;;
1000 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1001 docdir=$ac_optarg ;;
1002
1003 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1004 ac_prev=dvidir ;;
1005 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1006 dvidir=$ac_optarg ;;
c906108c
SS
1007
1008 -enable-* | --enable-*)
81ecdfbb 1009 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
c906108c 1010 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1011 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1012 as_fn_error "invalid feature name: $ac_useropt"
1013 ac_useropt_orig=$ac_useropt
1014 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1015 case $ac_user_opts in
1016 *"
1017"enable_$ac_useropt"
1018"*) ;;
1019 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1020 ac_unrecognized_sep=', ';;
b4e70030 1021 esac
81ecdfbb 1022 eval enable_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1023
1024 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1025 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1026 | --exec | --exe | --ex)
1027 ac_prev=exec_prefix ;;
1028 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1029 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1030 | --exec=* | --exe=* | --ex=*)
bec39cab 1031 exec_prefix=$ac_optarg ;;
c906108c
SS
1032
1033 -gas | --gas | --ga | --g)
1034 # Obsolete; use --with-gas.
1035 with_gas=yes ;;
1036
bec39cab
AC
1037 -help | --help | --hel | --he | -h)
1038 ac_init_help=long ;;
1039 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1040 ac_init_help=recursive ;;
1041 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1042 ac_init_help=short ;;
c906108c
SS
1043
1044 -host | --host | --hos | --ho)
bec39cab 1045 ac_prev=host_alias ;;
c906108c 1046 -host=* | --host=* | --hos=* | --ho=*)
bec39cab 1047 host_alias=$ac_optarg ;;
c906108c 1048
81ecdfbb
RW
1049 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1050 ac_prev=htmldir ;;
1051 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1052 | --ht=*)
1053 htmldir=$ac_optarg ;;
1054
c906108c
SS
1055 -includedir | --includedir | --includedi | --included | --include \
1056 | --includ | --inclu | --incl | --inc)
1057 ac_prev=includedir ;;
1058 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1059 | --includ=* | --inclu=* | --incl=* | --inc=*)
bec39cab 1060 includedir=$ac_optarg ;;
c906108c
SS
1061
1062 -infodir | --infodir | --infodi | --infod | --info | --inf)
1063 ac_prev=infodir ;;
1064 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
bec39cab 1065 infodir=$ac_optarg ;;
c906108c
SS
1066
1067 -libdir | --libdir | --libdi | --libd)
1068 ac_prev=libdir ;;
1069 -libdir=* | --libdir=* | --libdi=* | --libd=*)
bec39cab 1070 libdir=$ac_optarg ;;
c906108c
SS
1071
1072 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1073 | --libexe | --libex | --libe)
1074 ac_prev=libexecdir ;;
1075 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1076 | --libexe=* | --libex=* | --libe=*)
bec39cab 1077 libexecdir=$ac_optarg ;;
c906108c 1078
81ecdfbb
RW
1079 -localedir | --localedir | --localedi | --localed | --locale)
1080 ac_prev=localedir ;;
1081 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1082 localedir=$ac_optarg ;;
1083
c906108c 1084 -localstatedir | --localstatedir | --localstatedi | --localstated \
81ecdfbb 1085 | --localstate | --localstat | --localsta | --localst | --locals)
c906108c
SS
1086 ac_prev=localstatedir ;;
1087 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
81ecdfbb 1088 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
bec39cab 1089 localstatedir=$ac_optarg ;;
c906108c
SS
1090
1091 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1092 ac_prev=mandir ;;
1093 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
bec39cab 1094 mandir=$ac_optarg ;;
c906108c
SS
1095
1096 -nfp | --nfp | --nf)
1097 # Obsolete; use --without-fp.
1098 with_fp=no ;;
1099
1100 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
bec39cab 1101 | --no-cr | --no-c | -n)
c906108c
SS
1102 no_create=yes ;;
1103
1104 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1105 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1106 no_recursion=yes ;;
1107
1108 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1109 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1110 | --oldin | --oldi | --old | --ol | --o)
1111 ac_prev=oldincludedir ;;
1112 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1113 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1114 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
bec39cab 1115 oldincludedir=$ac_optarg ;;
c906108c
SS
1116
1117 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1118 ac_prev=prefix ;;
1119 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
bec39cab 1120 prefix=$ac_optarg ;;
c906108c
SS
1121
1122 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1123 | --program-pre | --program-pr | --program-p)
1124 ac_prev=program_prefix ;;
1125 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1126 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
bec39cab 1127 program_prefix=$ac_optarg ;;
c906108c
SS
1128
1129 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1130 | --program-suf | --program-su | --program-s)
1131 ac_prev=program_suffix ;;
1132 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1133 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
bec39cab 1134 program_suffix=$ac_optarg ;;
c906108c
SS
1135
1136 -program-transform-name | --program-transform-name \
1137 | --program-transform-nam | --program-transform-na \
1138 | --program-transform-n | --program-transform- \
1139 | --program-transform | --program-transfor \
1140 | --program-transfo | --program-transf \
1141 | --program-trans | --program-tran \
1142 | --progr-tra | --program-tr | --program-t)
1143 ac_prev=program_transform_name ;;
1144 -program-transform-name=* | --program-transform-name=* \
1145 | --program-transform-nam=* | --program-transform-na=* \
1146 | --program-transform-n=* | --program-transform-=* \
1147 | --program-transform=* | --program-transfor=* \
1148 | --program-transfo=* | --program-transf=* \
1149 | --program-trans=* | --program-tran=* \
1150 | --progr-tra=* | --program-tr=* | --program-t=*)
bec39cab 1151 program_transform_name=$ac_optarg ;;
c906108c 1152
81ecdfbb
RW
1153 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1154 ac_prev=pdfdir ;;
1155 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1156 pdfdir=$ac_optarg ;;
1157
1158 -psdir | --psdir | --psdi | --psd | --ps)
1159 ac_prev=psdir ;;
1160 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1161 psdir=$ac_optarg ;;
1162
c906108c
SS
1163 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1164 | -silent | --silent | --silen | --sile | --sil)
1165 silent=yes ;;
1166
1167 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1168 ac_prev=sbindir ;;
1169 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1170 | --sbi=* | --sb=*)
bec39cab 1171 sbindir=$ac_optarg ;;
c906108c
SS
1172
1173 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1174 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1175 | --sharedst | --shareds | --shared | --share | --shar \
1176 | --sha | --sh)
1177 ac_prev=sharedstatedir ;;
1178 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1179 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1180 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1181 | --sha=* | --sh=*)
bec39cab 1182 sharedstatedir=$ac_optarg ;;
c906108c
SS
1183
1184 -site | --site | --sit)
1185 ac_prev=site ;;
1186 -site=* | --site=* | --sit=*)
bec39cab 1187 site=$ac_optarg ;;
3ace7edb 1188
c906108c
SS
1189 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1190 ac_prev=srcdir ;;
1191 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
bec39cab 1192 srcdir=$ac_optarg ;;
c906108c
SS
1193
1194 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1195 | --syscon | --sysco | --sysc | --sys | --sy)
1196 ac_prev=sysconfdir ;;
1197 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1198 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
bec39cab 1199 sysconfdir=$ac_optarg ;;
c906108c
SS
1200
1201 -target | --target | --targe | --targ | --tar | --ta | --t)
bec39cab 1202 ac_prev=target_alias ;;
c906108c 1203 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
bec39cab 1204 target_alias=$ac_optarg ;;
c906108c
SS
1205
1206 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1207 verbose=yes ;;
1208
bec39cab
AC
1209 -version | --version | --versio | --versi | --vers | -V)
1210 ac_init_version=: ;;
c906108c
SS
1211
1212 -with-* | --with-*)
81ecdfbb 1213 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
c906108c 1214 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1215 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1216 as_fn_error "invalid package name: $ac_useropt"
1217 ac_useropt_orig=$ac_useropt
1218 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1219 case $ac_user_opts in
1220 *"
1221"with_$ac_useropt"
1222"*) ;;
1223 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1224 ac_unrecognized_sep=', ';;
b4e70030 1225 esac
81ecdfbb 1226 eval with_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1227
1228 -without-* | --without-*)
81ecdfbb 1229 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
c906108c 1230 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1231 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1232 as_fn_error "invalid package name: $ac_useropt"
1233 ac_useropt_orig=$ac_useropt
1234 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1235 case $ac_user_opts in
1236 *"
1237"with_$ac_useropt"
1238"*) ;;
1239 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1240 ac_unrecognized_sep=', ';;
1241 esac
1242 eval with_$ac_useropt=no ;;
c906108c
SS
1243
1244 --x)
1245 # Obsolete; use --with-x.
1246 with_x=yes ;;
1247
1248 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1249 | --x-incl | --x-inc | --x-in | --x-i)
1250 ac_prev=x_includes ;;
1251 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1252 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
bec39cab 1253 x_includes=$ac_optarg ;;
c906108c
SS
1254
1255 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1256 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1257 ac_prev=x_libraries ;;
1258 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1259 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
bec39cab 1260 x_libraries=$ac_optarg ;;
c906108c 1261
81ecdfbb
RW
1262 -*) as_fn_error "unrecognized option: \`$ac_option'
1263Try \`$0 --help' for more information."
c906108c
SS
1264 ;;
1265
bec39cab
AC
1266 *=*)
1267 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1268 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1269 case $ac_envvar in #(
1270 '' | [0-9]* | *[!_$as_cr_alnum]* )
1271 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1272 esac
1273 eval $ac_envvar=\$ac_optarg
bec39cab
AC
1274 export $ac_envvar ;;
1275
c906108c 1276 *)
bec39cab 1277 # FIXME: should be removed in autoconf 3.0.
81ecdfbb 1278 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
bec39cab 1279 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
81ecdfbb 1280 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
bec39cab 1281 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
c906108c
SS
1282 ;;
1283
1284 esac
1285done
1286
1287if test -n "$ac_prev"; then
bec39cab 1288 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
81ecdfbb 1289 as_fn_error "missing argument to $ac_option"
c906108c 1290fi
c906108c 1291
81ecdfbb
RW
1292if test -n "$ac_unrecognized_opts"; then
1293 case $enable_option_checking in
1294 no) ;;
1295 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
1296 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
b4e70030 1297 esac
81ecdfbb 1298fi
b4e70030 1299
81ecdfbb
RW
1300# Check all directory arguments for consistency.
1301for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1302 datadir sysconfdir sharedstatedir localstatedir includedir \
1303 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1304 libdir localedir mandir
b4e70030 1305do
81ecdfbb
RW
1306 eval ac_val=\$$ac_var
1307 # Remove trailing slashes.
1308 case $ac_val in
1309 */ )
1310 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1311 eval $ac_var=\$ac_val;;
1312 esac
1313 # Be sure to have absolute directory names.
b4e70030 1314 case $ac_val in
81ecdfbb
RW
1315 [\\/$]* | ?:[\\/]* ) continue;;
1316 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
c906108c 1317 esac
81ecdfbb 1318 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
c906108c
SS
1319done
1320
bec39cab
AC
1321# There might be people who depend on the old broken behavior: `$host'
1322# used to hold the argument of --host etc.
1323# FIXME: To remove some day.
1324build=$build_alias
1325host=$host_alias
1326target=$target_alias
1327
1328# FIXME: To remove some day.
1329if test "x$host_alias" != x; then
1330 if test "x$build_alias" = x; then
1331 cross_compiling=maybe
81ecdfbb 1332 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
bec39cab
AC
1333 If a cross compiler is detected then cross compile mode will be used." >&2
1334 elif test "x$build_alias" != "x$host_alias"; then
1335 cross_compiling=yes
1336 fi
1337fi
c906108c 1338
bec39cab
AC
1339ac_tool_prefix=
1340test -n "$host_alias" && ac_tool_prefix=$host_alias-
1341
1342test "$silent" = yes && exec 6>/dev/null
c906108c 1343
c906108c 1344
81ecdfbb
RW
1345ac_pwd=`pwd` && test -n "$ac_pwd" &&
1346ac_ls_di=`ls -di .` &&
1347ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1348 as_fn_error "working directory cannot be determined"
1349test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1350 as_fn_error "pwd does not report name of working directory"
1351
1352
c906108c
SS
1353# Find the source files, if location was not specified.
1354if test -z "$srcdir"; then
1355 ac_srcdir_defaulted=yes
81ecdfbb
RW
1356 # Try the directory containing this script, then the parent directory.
1357 ac_confdir=`$as_dirname -- "$as_myself" ||
1358$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1359 X"$as_myself" : 'X\(//\)[^/]' \| \
1360 X"$as_myself" : 'X\(//\)$' \| \
1361 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1362$as_echo X"$as_myself" |
1363 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1364 s//\1/
1365 q
1366 }
1367 /^X\(\/\/\)[^/].*/{
1368 s//\1/
1369 q
1370 }
1371 /^X\(\/\/\)$/{
1372 s//\1/
1373 q
1374 }
1375 /^X\(\/\).*/{
1376 s//\1/
1377 q
1378 }
1379 s/.*/./; q'`
c906108c 1380 srcdir=$ac_confdir
81ecdfbb 1381 if test ! -r "$srcdir/$ac_unique_file"; then
c906108c
SS
1382 srcdir=..
1383 fi
1384else
1385 ac_srcdir_defaulted=no
1386fi
81ecdfbb
RW
1387if test ! -r "$srcdir/$ac_unique_file"; then
1388 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1389 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
1390fi
1391ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1392ac_abs_confdir=`(
1393 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
1394 pwd)`
1395# When building in place, set srcdir=.
1396if test "$ac_abs_confdir" = "$ac_pwd"; then
1397 srcdir=.
1398fi
1399# Remove unnecessary trailing slashes from srcdir.
1400# Double slashes in file names in object file debugging info
1401# mess up M-x gdb in Emacs.
1402case $srcdir in
1403*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1404esac
1405for ac_var in $ac_precious_vars; do
1406 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1407 eval ac_env_${ac_var}_value=\$${ac_var}
1408 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1409 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1410done
c906108c 1411
bec39cab
AC
1412#
1413# Report the --help message.
1414#
1415if test "$ac_init_help" = "long"; then
1416 # Omit some internal or obsolete options to make the list less imposing.
1417 # This message is too long to be a string in the A/UX 3.1 sh.
1418 cat <<_ACEOF
1419\`configure' configures this package to adapt to many kinds of systems.
1420
1421Usage: $0 [OPTION]... [VAR=VALUE]...
1422
1423To assign environment variables (e.g., CC, CFLAGS...), specify them as
1424VAR=VALUE. See below for descriptions of some of the useful variables.
1425
1426Defaults for the options are specified in brackets.
1427
1428Configuration:
1429 -h, --help display this help and exit
1430 --help=short display options specific to this package
1431 --help=recursive display the short help of all the included packages
1432 -V, --version display version information and exit
1433 -q, --quiet, --silent do not print \`checking...' messages
1434 --cache-file=FILE cache test results in FILE [disabled]
1435 -C, --config-cache alias for \`--cache-file=config.cache'
1436 -n, --no-create do not create output files
1437 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1438
bec39cab
AC
1439Installation directories:
1440 --prefix=PREFIX install architecture-independent files in PREFIX
81ecdfbb 1441 [$ac_default_prefix]
bec39cab 1442 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
81ecdfbb 1443 [PREFIX]
bec39cab
AC
1444
1445By default, \`make install' will install all the files in
1446\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1447an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1448for instance \`--prefix=\$HOME'.
1449
1450For better control, use the options below.
1451
1452Fine tuning of the installation directories:
81ecdfbb
RW
1453 --bindir=DIR user executables [EPREFIX/bin]
1454 --sbindir=DIR system admin executables [EPREFIX/sbin]
1455 --libexecdir=DIR program executables [EPREFIX/libexec]
1456 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1457 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1458 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1459 --libdir=DIR object code libraries [EPREFIX/lib]
1460 --includedir=DIR C header files [PREFIX/include]
1461 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1462 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1463 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1464 --infodir=DIR info documentation [DATAROOTDIR/info]
1465 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1466 --mandir=DIR man documentation [DATAROOTDIR/man]
1467 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1468 --htmldir=DIR html documentation [DOCDIR]
1469 --dvidir=DIR dvi documentation [DOCDIR]
1470 --pdfdir=DIR pdf documentation [DOCDIR]
1471 --psdir=DIR ps documentation [DOCDIR]
bec39cab
AC
1472_ACEOF
1473
1474 cat <<\_ACEOF
1475
9009e1ae
MR
1476Program names:
1477 --program-prefix=PREFIX prepend PREFIX to installed program names
1478 --program-suffix=SUFFIX append SUFFIX to installed program names
1479 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1480
bec39cab
AC
1481X features:
1482 --x-includes=DIR X include files are in DIR
1483 --x-libraries=DIR X library files are in DIR
1484
1485System types:
1486 --build=BUILD configure for building on BUILD [guessed]
1487 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1488 --target=TARGET configure for building compilers for TARGET [HOST]
1489_ACEOF
1490fi
1491
1492if test -n "$ac_init_help"; then
1493
1494 cat <<\_ACEOF
1495
1496Optional Features:
81ecdfbb 1497 --disable-option-checking ignore unrecognized --enable/--with options
bec39cab
AC
1498 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1499 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
85981d60
AC
1500 --enable-maintainer-mode enable make rules and dependencies not useful
1501 (and sometimes confusing) to the casual installer
2974be62 1502 --enable-plugins Enable support for plugins
da2f07f1 1503 --disable-largefile omit support for large files
3bc3d82a 1504 --enable-build-with-cxx build with C++ compiler instead of C compiler
a1220294
TT
1505 --enable-targets=TARGETS
1506 alternative target configurations
c0993dbe 1507 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
bec39cab
AC
1508 --disable-gdbcli disable command-line interface (CLI)
1509 --disable-gdbmi disable machine-interface (MI)
1510 --enable-tui enable full-screen terminal user interface (TUI)
1511 --enable-gdbtk enable gdbtk graphical user interface (GUI)
1512 --enable-profiling enable profiling of GDB
3841debe 1513 --disable-rpath do not hardcode runtime library paths
17ef446e 1514 --enable-libmcheck Try linking with -lmcheck if available
a1220294 1515 --enable-werror treat compile warnings as errors
32c1c914 1516 --enable-build-warnings enable build-time compiler warnings if gcc is used
a1220294 1517 --enable-gdb-build-warnings
32c1c914 1518 enable GDB specific build-time compiler warnings if
a1220294 1519 gcc is used
32c1c914 1520 --enable-sim link gdb with simulator
bec39cab 1521 --enable-multi-ice build the multi-ice-gdb-server
496c0e1b
JB
1522 --enable-gdbserver automatically build gdbserver (yes/no/auto, default
1523 is auto)
bec39cab
AC
1524
1525Optional Packages:
1526 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1527 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
a1220294 1528 --with-separate-debug-dir=PATH
32c1c914 1529 look for global separate debug info in this path
62e4f60c 1530 [LIBDIR/debug]
b14b1491
TT
1531 --with-gdb-datadir=PATH look for global separate data files in this path
1532 [DATADIR/gdb]
29b0e8a2 1533 --with-relocated-sources=PATH
32c1c914 1534 automatically relocate this path for source files
7349ff92 1535 --with-auto-load-dir=PATH
aff139ff 1536 directories from which to load auto-loaded scripts
1564a261 1537 [$debugdir:$datadir/auto-load]
bccbefd2 1538 --with-auto-load-safe-path=PATH
aff139ff 1539 directories safe to hold auto-loaded files
7349ff92 1540 [--with-auto-load-dir]
bccbefd2
JK
1541 --without-auto-load-safe-path
1542 do not restrict auto-loaded files locations
05e7c244 1543 --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets
cb01cfba
JB
1544 --with-curses use the curses library instead of the termcap
1545 library
c16158bc
JM
1546 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
1547 --with-bugurl=URL Direct users to URL to report a bug
711a72d3 1548 --with-system-zlib use installed libz
016a3251
DD
1549 --with-gnu-ld assume the C compiler uses GNU ld default=no
1550 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
1551 --without-libiconv-prefix don't search for libiconv in includedir and libdir
478aac75 1552 --with-iconv-bin=PATH specify where to find the iconv program
6a30b0a5 1553 --with-system-readline use installed readline library
b8e0a31c
SD
1554 --with-jit-reader-dir=PATH
1555 directory to load the JIT readers from
5c39566f 1556 --with-expat include expat support (auto/yes/no)
3841debe
DJ
1557 --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib
1558 --without-libexpat-prefix don't search for libexpat in includedir and libdir
0c4a4063
DE
1559 --with-python[=PYTHON] include python support
1560 (auto/yes/no/<python-program>)
ed3ef339
DE
1561 --with-guile[=GUILE] include guile support
1562 (auto/yes/no/<guile-version>/<pkg-config-program>)
58bfce93
MM
1563 --with-intel-pt include Intel(R) Processor Trace support (auto/yes/no)
1564 --with-libipt-prefix[=DIR] search for libipt in DIR/include and DIR/lib
1565 --without-libipt-prefix don't search for libipt in includedir and libdir
a1220294
TT
1566 --without-included-regex
1567 don't use included regex; this is the default on
1568 systems with version 2 of the GNU C library (use
1569 with caution on other system)
81ecdfbb 1570 --with-sysroot[=DIR] search for usr/lib et al within DIR
b14b1491 1571 --with-system-gdbinit=PATH
32c1c914 1572 automatically load a system-wide gdbinit file
608e2dbb
TT
1573 --with-lzma support lzma compression (auto/yes/no)
1574 --with-liblzma-prefix[=DIR] search for liblzma in DIR/include and DIR/lib
1575 --without-liblzma-prefix don't search for liblzma in includedir and libdir
5062cc19
KS
1576 --with-tcl directory containing tcl configuration (tclConfig.sh)
1577 --with-tk directory containing tk configuration (tkConfig.sh)
bec39cab 1578 --with-x use the X Window System
393fd4c3
YQ
1579 --with-babeltrace include babeltrace support (auto/yes/no)
1580 --with-libbabeltrace-prefix[=DIR] search for libbabeltrace in DIR/include and DIR/lib
1581 --without-libbabeltrace-prefix don't search for libbabeltrace in includedir and libdir
bec39cab
AC
1582
1583Some influential environment variables:
1584 CC C compiler command
1585 CFLAGS C compiler flags
1586 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1587 nonstandard directory <lib dir>
81ecdfbb
RW
1588 LIBS libraries to pass to the linker, e.g. -l<library>
1589 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1590 you have headers in a nonstandard directory <include dir>
3bc3d82a
PA
1591 CXX C++ compiler command
1592 CXXFLAGS C++ compiler flags
bec39cab 1593 CPP C preprocessor
f06e05e0
JK
1594 MAKEINFO Parent configure detects if it is of sufficient version.
1595 MAKEINFOFLAGS
1596 Parameters for MAKEINFO.
81ecdfbb
RW
1597 YACC The `Yet Another C Compiler' implementation to use. Defaults to
1598 the first program found out of: `bison -y', `byacc', `yacc'.
1599 YFLAGS The list of arguments that will be passed by default to $YACC.
1600 This script will default YFLAGS to the empty string to avoid a
1601 default value of `-d' given by some make applications.
1602 XMKMF Path to xmkmf, Makefile generator for X Window System
bec39cab
AC
1603
1604Use these variables to override the choices made by `configure' or to help
1605it to find libraries and programs with nonstandard names/locations.
1606
81ecdfbb 1607Report bugs to the package provider.
bec39cab 1608_ACEOF
81ecdfbb 1609ac_status=$?
bec39cab
AC
1610fi
1611
1612if test "$ac_init_help" = "recursive"; then
1613 # If there are subdirs, report their specific --help.
bec39cab 1614 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
81ecdfbb
RW
1615 test -d "$ac_dir" ||
1616 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1617 continue
bec39cab
AC
1618 ac_builddir=.
1619
81ecdfbb
RW
1620case "$ac_dir" in
1621.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1622*)
1623 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1624 # A ".." for each directory in $ac_dir_suffix.
1625 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1626 case $ac_top_builddir_sub in
1627 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1628 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1629 esac ;;
1630esac
1631ac_abs_top_builddir=$ac_pwd
1632ac_abs_builddir=$ac_pwd$ac_dir_suffix
1633# for backward compatibility:
1634ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
1635
1636case $srcdir in
81ecdfbb 1637 .) # We are building in place.
bec39cab 1638 ac_srcdir=.
81ecdfbb
RW
1639 ac_top_srcdir=$ac_top_builddir_sub
1640 ac_abs_top_srcdir=$ac_pwd ;;
1641 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 1642 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
1643 ac_top_srcdir=$srcdir
1644 ac_abs_top_srcdir=$srcdir ;;
1645 *) # Relative name.
1646 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1647 ac_top_srcdir=$ac_top_build_prefix$srcdir
1648 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 1649esac
81ecdfbb 1650ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 1651
81ecdfbb
RW
1652 cd "$ac_dir" || { ac_status=$?; continue; }
1653 # Check for guested configure.
1654 if test -f "$ac_srcdir/configure.gnu"; then
1655 echo &&
1656 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1657 elif test -f "$ac_srcdir/configure"; then
1658 echo &&
1659 $SHELL "$ac_srcdir/configure" --help=recursive
3ace7edb 1660 else
81ecdfbb
RW
1661 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1662 fi || ac_status=$?
1663 cd "$ac_pwd" || { ac_status=$?; break; }
bec39cab
AC
1664 done
1665fi
1666
81ecdfbb 1667test -n "$ac_init_help" && exit $ac_status
bec39cab
AC
1668if $ac_init_version; then
1669 cat <<\_ACEOF
81ecdfbb
RW
1670configure
1671generated by GNU Autoconf 2.64
bec39cab 1672
81ecdfbb 1673Copyright (C) 2009 Free Software Foundation, Inc.
bec39cab
AC
1674This configure script is free software; the Free Software Foundation
1675gives unlimited permission to copy, distribute and modify it.
1676_ACEOF
81ecdfbb 1677 exit
bec39cab 1678fi
bec39cab 1679
81ecdfbb
RW
1680## ------------------------ ##
1681## Autoconf initialization. ##
1682## ------------------------ ##
bec39cab 1683
81ecdfbb
RW
1684# ac_fn_c_try_compile LINENO
1685# --------------------------
1686# Try to compile conftest.$ac_ext, and return whether this succeeded.
1687ac_fn_c_try_compile ()
1688{
1689 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1690 rm -f conftest.$ac_objext
1691 if { { ac_try="$ac_compile"
1692case "(($ac_try" in
1693 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1694 *) ac_try_echo=$ac_try;;
1695esac
1696eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1697$as_echo "$ac_try_echo"; } >&5
1698 (eval "$ac_compile") 2>conftest.err
1699 ac_status=$?
1700 if test -s conftest.err; then
1701 grep -v '^ *+' conftest.err >conftest.er1
1702 cat conftest.er1 >&5
1703 mv -f conftest.er1 conftest.err
1704 fi
1705 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1706 test $ac_status = 0; } && {
1707 test -z "$ac_c_werror_flag" ||
1708 test ! -s conftest.err
1709 } && test -s conftest.$ac_objext; then :
1710 ac_retval=0
1711else
1712 $as_echo "$as_me: failed program was:" >&5
1713sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1714
81ecdfbb
RW
1715 ac_retval=1
1716fi
1717 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1718 return $ac_retval
1719
1720} # ac_fn_c_try_compile
1721
3bc3d82a
PA
1722# ac_fn_cxx_try_compile LINENO
1723# ----------------------------
1724# Try to compile conftest.$ac_ext, and return whether this succeeded.
1725ac_fn_cxx_try_compile ()
1726{
1727 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1728 rm -f conftest.$ac_objext
1729 if { { ac_try="$ac_compile"
1730case "(($ac_try" in
1731 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1732 *) ac_try_echo=$ac_try;;
1733esac
1734eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1735$as_echo "$ac_try_echo"; } >&5
1736 (eval "$ac_compile") 2>conftest.err
1737 ac_status=$?
1738 if test -s conftest.err; then
1739 grep -v '^ *+' conftest.err >conftest.er1
1740 cat conftest.er1 >&5
1741 mv -f conftest.er1 conftest.err
1742 fi
1743 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1744 test $ac_status = 0; } && {
1745 test -z "$ac_cxx_werror_flag" ||
1746 test ! -s conftest.err
1747 } && test -s conftest.$ac_objext; then :
1748 ac_retval=0
1749else
1750 $as_echo "$as_me: failed program was:" >&5
1751sed 's/^/| /' conftest.$ac_ext >&5
1752
1753 ac_retval=1
1754fi
1755 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1756 return $ac_retval
1757
1758} # ac_fn_cxx_try_compile
1759
81ecdfbb
RW
1760# ac_fn_c_try_cpp LINENO
1761# ----------------------
1762# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1763ac_fn_c_try_cpp ()
bec39cab 1764{
81ecdfbb
RW
1765 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1766 if { { ac_try="$ac_cpp conftest.$ac_ext"
1767case "(($ac_try" in
1768 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1769 *) ac_try_echo=$ac_try;;
1770esac
1771eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1772$as_echo "$ac_try_echo"; } >&5
1773 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1774 ac_status=$?
1775 if test -s conftest.err; then
1776 grep -v '^ *+' conftest.err >conftest.er1
1777 cat conftest.er1 >&5
1778 mv -f conftest.er1 conftest.err
1779 fi
1780 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1781 test $ac_status = 0; } >/dev/null && {
1782 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1783 test ! -s conftest.err
1784 }; then :
1785 ac_retval=0
1786else
1787 $as_echo "$as_me: failed program was:" >&5
1788sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1789
81ecdfbb
RW
1790 ac_retval=1
1791fi
1792 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1793 return $ac_retval
bec39cab 1794
81ecdfbb 1795} # ac_fn_c_try_cpp
bec39cab 1796
81ecdfbb
RW
1797# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1798# -------------------------------------------------------
1799# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1800# the include files in INCLUDES and setting the cache variable VAR
1801# accordingly.
1802ac_fn_c_check_header_mongrel ()
1803{
1804 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1805 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1806 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1807$as_echo_n "checking for $2... " >&6; }
1808if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1809 $as_echo_n "(cached) " >&6
1810fi
1811eval ac_res=\$$3
1812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1813$as_echo "$ac_res" >&6; }
1814else
1815 # Is the header compilable?
1816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1817$as_echo_n "checking $2 usability... " >&6; }
1818cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1819/* end confdefs.h. */
1820$4
1821#include <$2>
1822_ACEOF
1823if ac_fn_c_try_compile "$LINENO"; then :
1824 ac_header_compiler=yes
1825else
1826 ac_header_compiler=no
1827fi
1828rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1830$as_echo "$ac_header_compiler" >&6; }
bec39cab 1831
81ecdfbb
RW
1832# Is the header present?
1833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1834$as_echo_n "checking $2 presence... " >&6; }
1835cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1836/* end confdefs.h. */
1837#include <$2>
1838_ACEOF
1839if ac_fn_c_try_cpp "$LINENO"; then :
1840 ac_header_preproc=yes
1841else
1842 ac_header_preproc=no
1843fi
1844rm -f conftest.err conftest.$ac_ext
1845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1846$as_echo "$ac_header_preproc" >&6; }
bec39cab 1847
81ecdfbb
RW
1848# So? What about this header?
1849case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1850 yes:no: )
1851 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1852$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1853 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1854$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1855 ;;
1856 no:yes:* )
1857 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1858$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1859 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1860$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1861 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1862$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1863 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1864$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1865 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1866$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1867 ;;
1868esac
1869 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1870$as_echo_n "checking for $2... " >&6; }
1871if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1872 $as_echo_n "(cached) " >&6
1873else
1874 eval "$3=\$ac_header_compiler"
1875fi
1876eval ac_res=\$$3
1877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1878$as_echo "$ac_res" >&6; }
1879fi
1880 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 1881
81ecdfbb 1882} # ac_fn_c_check_header_mongrel
bec39cab 1883
81ecdfbb
RW
1884# ac_fn_c_try_run LINENO
1885# ----------------------
1886# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1887# that executables *can* be run.
1888ac_fn_c_try_run ()
1889{
1890 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1891 if { { ac_try="$ac_link"
1892case "(($ac_try" in
1893 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1894 *) ac_try_echo=$ac_try;;
1895esac
1896eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1897$as_echo "$ac_try_echo"; } >&5
1898 (eval "$ac_link") 2>&5
1899 ac_status=$?
1900 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1901 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1902 { { case "(($ac_try" in
1903 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1904 *) ac_try_echo=$ac_try;;
1905esac
1906eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1907$as_echo "$ac_try_echo"; } >&5
1908 (eval "$ac_try") 2>&5
1909 ac_status=$?
1910 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1911 test $ac_status = 0; }; }; then :
1912 ac_retval=0
1913else
1914 $as_echo "$as_me: program exited with status $ac_status" >&5
1915 $as_echo "$as_me: failed program was:" >&5
1916sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1917
81ecdfbb
RW
1918 ac_retval=$ac_status
1919fi
1920 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1921 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1922 return $ac_retval
bec39cab 1923
81ecdfbb 1924} # ac_fn_c_try_run
bec39cab 1925
81ecdfbb
RW
1926# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1927# -------------------------------------------------------
1928# Tests whether HEADER exists and can be compiled using the include files in
1929# INCLUDES, setting the cache variable VAR accordingly.
1930ac_fn_c_check_header_compile ()
1931{
1932 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1934$as_echo_n "checking for $2... " >&6; }
1935if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1936 $as_echo_n "(cached) " >&6
1937else
1938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1939/* end confdefs.h. */
1940$4
1941#include <$2>
bec39cab 1942_ACEOF
81ecdfbb
RW
1943if ac_fn_c_try_compile "$LINENO"; then :
1944 eval "$3=yes"
1945else
1946 eval "$3=no"
1947fi
1948rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1949fi
1950eval ac_res=\$$3
1951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1952$as_echo "$ac_res" >&6; }
1953 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 1954
81ecdfbb 1955} # ac_fn_c_check_header_compile
bec39cab 1956
2974be62
AM
1957# ac_fn_c_try_link LINENO
1958# -----------------------
1959# Try to link conftest.$ac_ext, and return whether this succeeded.
1960ac_fn_c_try_link ()
1961{
1962 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1963 rm -f conftest.$ac_objext conftest$ac_exeext
1964 if { { ac_try="$ac_link"
1965case "(($ac_try" in
1966 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1967 *) ac_try_echo=$ac_try;;
1968esac
1969eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1970$as_echo "$ac_try_echo"; } >&5
1971 (eval "$ac_link") 2>conftest.err
1972 ac_status=$?
1973 if test -s conftest.err; then
1974 grep -v '^ *+' conftest.err >conftest.er1
1975 cat conftest.er1 >&5
1976 mv -f conftest.er1 conftest.err
1977 fi
1978 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1979 test $ac_status = 0; } && {
1980 test -z "$ac_c_werror_flag" ||
1981 test ! -s conftest.err
1982 } && test -s conftest$ac_exeext && {
1983 test "$cross_compiling" = yes ||
1984 $as_test_x conftest$ac_exeext
1985 }; then :
1986 ac_retval=0
1987else
1988 $as_echo "$as_me: failed program was:" >&5
1989sed 's/^/| /' conftest.$ac_ext >&5
1990
1991 ac_retval=1
1992fi
1993 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1994 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1995 # interfere with the next link command; also delete a directory that is
1996 # left behind by Apple's compiler. We do this before executing the actions.
1997 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1998 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1999 return $ac_retval
2000
2001} # ac_fn_c_try_link
2002
81ecdfbb
RW
2003# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2004# --------------------------------------------
2005# Tries to find the compile-time value of EXPR in a program that includes
2006# INCLUDES, setting VAR accordingly. Returns whether the value could be
2007# computed
2008ac_fn_c_compute_int ()
2009{
2010 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2011 if test "$cross_compiling" = yes; then
2012 # Depending upon the size, compute the lo and hi bounds.
2013cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2014/* end confdefs.h. */
2015$4
2016int
2017main ()
2018{
2019static int test_array [1 - 2 * !(($2) >= 0)];
2020test_array [0] = 0
bec39cab 2021
81ecdfbb
RW
2022 ;
2023 return 0;
2024}
2025_ACEOF
2026if ac_fn_c_try_compile "$LINENO"; then :
2027 ac_lo=0 ac_mid=0
2028 while :; do
2029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2030/* end confdefs.h. */
2031$4
2032int
2033main ()
2034{
2035static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2036test_array [0] = 0
bec39cab 2037
81ecdfbb
RW
2038 ;
2039 return 0;
2040}
2041_ACEOF
2042if ac_fn_c_try_compile "$LINENO"; then :
2043 ac_hi=$ac_mid; break
2044else
2045 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2046 if test $ac_lo -le $ac_mid; then
2047 ac_lo= ac_hi=
2048 break
2049 fi
2050 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
c906108c 2051fi
81ecdfbb
RW
2052rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2053 done
c906108c 2054else
81ecdfbb
RW
2055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2056/* end confdefs.h. */
2057$4
2058int
2059main ()
2060{
2061static int test_array [1 - 2 * !(($2) < 0)];
2062test_array [0] = 0
bec39cab 2063
81ecdfbb
RW
2064 ;
2065 return 0;
2066}
2067_ACEOF
2068if ac_fn_c_try_compile "$LINENO"; then :
2069 ac_hi=-1 ac_mid=-1
2070 while :; do
2071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2072/* end confdefs.h. */
2073$4
2074int
2075main ()
2076{
2077static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2078test_array [0] = 0
bec39cab 2079
81ecdfbb
RW
2080 ;
2081 return 0;
2082}
2083_ACEOF
2084if ac_fn_c_try_compile "$LINENO"; then :
2085 ac_lo=$ac_mid; break
2086else
2087 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2088 if test $ac_mid -le $ac_hi; then
2089 ac_lo= ac_hi=
2090 break
2091 fi
2092 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2093fi
2094rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2095 done
2096else
2097 ac_lo= ac_hi=
2098fi
2099rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2100fi
2101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2102# Binary search between lo and hi bounds.
2103while test "x$ac_lo" != "x$ac_hi"; do
2104 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2106/* end confdefs.h. */
2107$4
2108int
2109main ()
2110{
2111static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2112test_array [0] = 0
bec39cab 2113
81ecdfbb
RW
2114 ;
2115 return 0;
2116}
2117_ACEOF
2118if ac_fn_c_try_compile "$LINENO"; then :
2119 ac_hi=$ac_mid
2120else
2121 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2122fi
2123rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2124done
2125case $ac_lo in #((
2126?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2127'') ac_retval=1 ;;
2128esac
2129 else
2130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2131/* end confdefs.h. */
2132$4
2133static long int longval () { return $2; }
2134static unsigned long int ulongval () { return $2; }
2135#include <stdio.h>
2136#include <stdlib.h>
2137int
2138main ()
2139{
bec39cab 2140
81ecdfbb
RW
2141 FILE *f = fopen ("conftest.val", "w");
2142 if (! f)
2143 return 1;
2144 if (($2) < 0)
2145 {
2146 long int i = longval ();
2147 if (i != ($2))
2148 return 1;
2149 fprintf (f, "%ld", i);
2150 }
2151 else
2152 {
2153 unsigned long int i = ulongval ();
2154 if (i != ($2))
2155 return 1;
2156 fprintf (f, "%lu", i);
2157 }
2158 /* Do not output a trailing newline, as this causes \r\n confusion
2159 on some platforms. */
2160 return ferror (f) || fclose (f) != 0;
bec39cab 2161
81ecdfbb
RW
2162 ;
2163 return 0;
2164}
2165_ACEOF
2166if ac_fn_c_try_run "$LINENO"; then :
2167 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2168else
2169 ac_retval=1
2170fi
2171rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2172 conftest.$ac_objext conftest.beam conftest.$ac_ext
2173rm -f conftest.val
bec39cab 2174
81ecdfbb
RW
2175 fi
2176 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2177 return $ac_retval
bec39cab 2178
81ecdfbb 2179} # ac_fn_c_compute_int
bec39cab 2180
55a8c076
YQ
2181# ac_fn_c_check_func LINENO FUNC VAR
2182# ----------------------------------
2183# Tests whether FUNC exists, setting the cache variable VAR accordingly
2184ac_fn_c_check_func ()
81ecdfbb
RW
2185{
2186 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2187 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2188$as_echo_n "checking for $2... " >&6; }
2189if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2190 $as_echo_n "(cached) " >&6
2191else
81ecdfbb
RW
2192 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2193/* end confdefs.h. */
55a8c076
YQ
2194/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2195 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2196#define $2 innocuous_$2
2197
2198/* System header to define __stub macros and hopefully few prototypes,
2199 which can conflict with char $2 (); below.
2200 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2201 <limits.h> exists even on freestanding compilers. */
2202
2203#ifdef __STDC__
2204# include <limits.h>
2205#else
2206# include <assert.h>
2207#endif
2208
2209#undef $2
2210
2211/* Override any GCC internal prototype to avoid an error.
2212 Use char because int might match the return type of a GCC
2213 builtin and then its argument prototype would still apply. */
2214#ifdef __cplusplus
2215extern "C"
2216#endif
2217char $2 ();
2218/* The GNU C library defines this for functions which it implements
2219 to always fail with ENOSYS. Some functions are actually named
2220 something starting with __ and the normal name is an alias. */
2221#if defined __stub_$2 || defined __stub___$2
2222choke me
2223#endif
2224
2225int
2226main ()
2227{
2228return $2 ();
2229 ;
2230 return 0;
2231}
2232_ACEOF
2233if ac_fn_c_try_link "$LINENO"; then :
2234 eval "$3=yes"
2235else
2236 eval "$3=no"
2237fi
2238rm -f core conftest.err conftest.$ac_objext \
2239 conftest$ac_exeext conftest.$ac_ext
2240fi
2241eval ac_res=\$$3
2242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2243$as_echo "$ac_res" >&6; }
2244 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2245
2246} # ac_fn_c_check_func
2247
07697489
PA
2248# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2249# -------------------------------------------
2250# Tests whether TYPE exists after having included INCLUDES, setting cache
2251# variable VAR accordingly.
2252ac_fn_c_check_type ()
2253{
2254 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2256$as_echo_n "checking for $2... " >&6; }
2257if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2258 $as_echo_n "(cached) " >&6
2259else
2260 eval "$3=no"
2261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2262/* end confdefs.h. */
2263$4
2264int
2265main ()
2266{
2267if (sizeof ($2))
2268 return 0;
2269 ;
2270 return 0;
2271}
2272_ACEOF
2273if ac_fn_c_try_compile "$LINENO"; then :
2274 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2275/* end confdefs.h. */
2276$4
2277int
2278main ()
2279{
2280if (sizeof (($2)))
2281 return 0;
2282 ;
2283 return 0;
2284}
2285_ACEOF
2286if ac_fn_c_try_compile "$LINENO"; then :
2287
2288else
2289 eval "$3=yes"
2290fi
2291rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2292fi
2293rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2294fi
2295eval ac_res=\$$3
2296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2297$as_echo "$ac_res" >&6; }
2298 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2299
2300} # ac_fn_c_check_type
2301
770d76d7
PA
2302# ac_fn_c_check_decl LINENO SYMBOL VAR
2303# ------------------------------------
2304# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2305ac_fn_c_check_decl ()
2306{
2307 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2308 as_decl_name=`echo $2|sed 's/ *(.*//'`
2309 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2310 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2311$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2312if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2313 $as_echo_n "(cached) " >&6
2314else
2315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2316/* end confdefs.h. */
2317$4
2318int
2319main ()
2320{
2321#ifndef $as_decl_name
2322#ifdef __cplusplus
2323 (void) $as_decl_use;
2324#else
2325 (void) $as_decl_name;
2326#endif
2327#endif
2328
2329 ;
2330 return 0;
2331}
2332_ACEOF
2333if ac_fn_c_try_compile "$LINENO"; then :
2334 eval "$3=yes"
2335else
2336 eval "$3=no"
2337fi
2338rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2339fi
2340eval ac_res=\$$3
2341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2342$as_echo "$ac_res" >&6; }
2343 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2344
2345} # ac_fn_c_check_decl
2346
55a8c076
YQ
2347# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2348# ----------------------------------------------------
2349# Tries to find if the field MEMBER exists in type AGGR, after including
2350# INCLUDES, setting cache variable VAR accordingly.
2351ac_fn_c_check_member ()
2352{
2353 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2355$as_echo_n "checking for $2.$3... " >&6; }
2356if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
2357 $as_echo_n "(cached) " >&6
2358else
2359 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2360/* end confdefs.h. */
2361$5
2362int
2363main ()
2364{
2365static $2 ac_aggr;
2366if (ac_aggr.$3)
2367return 0;
2368 ;
2369 return 0;
2370}
2371_ACEOF
2372if ac_fn_c_try_compile "$LINENO"; then :
2373 eval "$4=yes"
2374else
2375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2376/* end confdefs.h. */
2377$5
2378int
2379main ()
2380{
2381static $2 ac_aggr;
2382if (sizeof ac_aggr.$3)
2383return 0;
2384 ;
2385 return 0;
2386}
2387_ACEOF
2388if ac_fn_c_try_compile "$LINENO"; then :
2389 eval "$4=yes"
2390else
2391 eval "$4=no"
2392fi
2393rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2394fi
2395rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2396fi
2397eval ac_res=\$$4
2398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2399$as_echo "$ac_res" >&6; }
2400 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2401
2402} # ac_fn_c_check_member
54019719
PA
2403
2404# ac_fn_cxx_check_decl LINENO SYMBOL VAR
2405# --------------------------------------
2406# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2407ac_fn_cxx_check_decl ()
2408{
2409 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2410 as_decl_name=`echo $2|sed 's/ *(.*//'`
2411 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2412 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2413$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2414if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2415 $as_echo_n "(cached) " >&6
2416else
2417 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2418/* end confdefs.h. */
2419$4
2420int
2421main ()
2422{
2423#ifndef $as_decl_name
2424#ifdef __cplusplus
2425 (void) $as_decl_use;
2426#else
2427 (void) $as_decl_name;
2428#endif
2429#endif
2430
2431 ;
2432 return 0;
2433}
2434_ACEOF
2435if ac_fn_cxx_try_compile "$LINENO"; then :
2436 eval "$3=yes"
2437else
2438 eval "$3=no"
2439fi
2440rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2441fi
2442eval ac_res=\$$3
2443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2444$as_echo "$ac_res" >&6; }
2445 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2446
2447} # ac_fn_cxx_check_decl
81ecdfbb
RW
2448cat >config.log <<_ACEOF
2449This file contains any messages produced by compilers while
2450running configure, to aid debugging if configure makes a mistake.
d5af19ba 2451
81ecdfbb
RW
2452It was created by $as_me, which was
2453generated by GNU Autoconf 2.64. Invocation command line was
b4e70030 2454
81ecdfbb 2455 $ $0 $@
413ccac7 2456
81ecdfbb
RW
2457_ACEOF
2458exec 5>>config.log
2459{
2460cat <<_ASUNAME
2461## --------- ##
2462## Platform. ##
2463## --------- ##
413ccac7 2464
81ecdfbb
RW
2465hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2466uname -m = `(uname -m) 2>/dev/null || echo unknown`
2467uname -r = `(uname -r) 2>/dev/null || echo unknown`
2468uname -s = `(uname -s) 2>/dev/null || echo unknown`
2469uname -v = `(uname -v) 2>/dev/null || echo unknown`
85981d60 2470
81ecdfbb
RW
2471/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2472/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
413ccac7 2473
81ecdfbb
RW
2474/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2475/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2476/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2477/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2478/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2479/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2480/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
c906108c 2481
81ecdfbb 2482_ASUNAME
bec39cab 2483
bec39cab
AC
2484as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2485for as_dir in $PATH
2486do
2487 IFS=$as_save_IFS
2488 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2489 $as_echo "PATH: $as_dir"
2490 done
2491IFS=$as_save_IFS
bec39cab 2492
81ecdfbb 2493} >&5
bec39cab 2494
81ecdfbb 2495cat >&5 <<_ACEOF
bec39cab 2496
bec39cab 2497
81ecdfbb
RW
2498## ----------- ##
2499## Core tests. ##
2500## ----------- ##
2501
2502_ACEOF
2503
2504
2505# Keep a trace of the command line.
2506# Strip out --no-create and --no-recursion so they do not pile up.
2507# Strip out --silent because we don't want to record it for future runs.
2508# Also quote any args containing shell meta-characters.
2509# Make two passes to allow for proper duplicate-argument suppression.
2510ac_configure_args=
2511ac_configure_args0=
2512ac_configure_args1=
2513ac_must_keep_next=false
2514for ac_pass in 1 2
2515do
2516 for ac_arg
2517 do
2518 case $ac_arg in
2519 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2520 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2521 | -silent | --silent | --silen | --sile | --sil)
2522 continue ;;
2523 *\'*)
2524 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2525 esac
2526 case $ac_pass in
2527 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2528 2)
2529 as_fn_append ac_configure_args1 " '$ac_arg'"
2530 if test $ac_must_keep_next = true; then
2531 ac_must_keep_next=false # Got value, back to normal.
2532 else
2533 case $ac_arg in
2534 *=* | --config-cache | -C | -disable-* | --disable-* \
2535 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2536 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2537 | -with-* | --with-* | -without-* | --without-* | --x)
2538 case "$ac_configure_args0 " in
2539 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2540 esac
2541 ;;
2542 -* ) ac_must_keep_next=true ;;
2543 esac
2544 fi
2545 as_fn_append ac_configure_args " '$ac_arg'"
2546 ;;
2547 esac
2548 done
2549done
2550{ ac_configure_args0=; unset ac_configure_args0;}
2551{ ac_configure_args1=; unset ac_configure_args1;}
2552
2553# When interrupted or exit'd, cleanup temporary files, and complete
2554# config.log. We remove comments because anyway the quotes in there
2555# would cause problems or look ugly.
2556# WARNING: Use '\'' to represent an apostrophe within the trap.
2557# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2558trap 'exit_status=$?
2559 # Save into config.log some information that might help in debugging.
2560 {
2561 echo
2562
2563 cat <<\_ASBOX
2564## ---------------- ##
2565## Cache variables. ##
2566## ---------------- ##
2567_ASBOX
2568 echo
2569 # The following way of writing the cache mishandles newlines in values,
2570(
2571 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2572 eval ac_val=\$$ac_var
2573 case $ac_val in #(
2574 *${as_nl}*)
2575 case $ac_var in #(
2576 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2577$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2578 esac
2579 case $ac_var in #(
2580 _ | IFS | as_nl) ;; #(
2581 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2582 *) { eval $ac_var=; unset $ac_var;} ;;
2583 esac ;;
2584 esac
2585 done
2586 (set) 2>&1 |
2587 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2588 *${as_nl}ac_space=\ *)
2589 sed -n \
2590 "s/'\''/'\''\\\\'\'''\''/g;
2591 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2592 ;; #(
2593 *)
2594 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2595 ;;
2596 esac |
2597 sort
2598)
2599 echo
2600
2601 cat <<\_ASBOX
2602## ----------------- ##
2603## Output variables. ##
2604## ----------------- ##
2605_ASBOX
2606 echo
2607 for ac_var in $ac_subst_vars
2608 do
2609 eval ac_val=\$$ac_var
2610 case $ac_val in
2611 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2612 esac
2613 $as_echo "$ac_var='\''$ac_val'\''"
2614 done | sort
2615 echo
2616
2617 if test -n "$ac_subst_files"; then
2618 cat <<\_ASBOX
2619## ------------------- ##
2620## File substitutions. ##
2621## ------------------- ##
2622_ASBOX
2623 echo
2624 for ac_var in $ac_subst_files
2625 do
2626 eval ac_val=\$$ac_var
2627 case $ac_val in
2628 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2629 esac
2630 $as_echo "$ac_var='\''$ac_val'\''"
2631 done | sort
2632 echo
2633 fi
2634
2635 if test -s confdefs.h; then
2636 cat <<\_ASBOX
2637## ----------- ##
2638## confdefs.h. ##
2639## ----------- ##
2640_ASBOX
2641 echo
2642 cat confdefs.h
2643 echo
2644 fi
2645 test "$ac_signal" != 0 &&
2646 $as_echo "$as_me: caught signal $ac_signal"
2647 $as_echo "$as_me: exit $exit_status"
2648 } >&5
2649 rm -f core *.core core.conftest.* &&
2650 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2651 exit $exit_status
2652' 0
2653for ac_signal in 1 2 13 15; do
2654 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2655done
2656ac_signal=0
2657
2658# confdefs.h avoids OS command line length limits that DEFS can exceed.
2659rm -f -r conftest* confdefs.h
2660
2661$as_echo "/* confdefs.h */" > confdefs.h
2662
2663# Predefined preprocessor variables.
2664
2665cat >>confdefs.h <<_ACEOF
2666#define PACKAGE_NAME "$PACKAGE_NAME"
2667_ACEOF
2668
2669cat >>confdefs.h <<_ACEOF
2670#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2671_ACEOF
2672
2673cat >>confdefs.h <<_ACEOF
2674#define PACKAGE_VERSION "$PACKAGE_VERSION"
2675_ACEOF
2676
2677cat >>confdefs.h <<_ACEOF
2678#define PACKAGE_STRING "$PACKAGE_STRING"
2679_ACEOF
2680
2681cat >>confdefs.h <<_ACEOF
2682#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2683_ACEOF
2684
2685cat >>confdefs.h <<_ACEOF
2686#define PACKAGE_URL "$PACKAGE_URL"
2687_ACEOF
2688
2689
2690# Let the site file select an alternate cache file if it wants to.
2691# Prefer an explicitly selected file to automatically selected ones.
2692ac_site_file1=NONE
2693ac_site_file2=NONE
2694if test -n "$CONFIG_SITE"; then
2695 ac_site_file1=$CONFIG_SITE
2696elif test "x$prefix" != xNONE; then
2697 ac_site_file1=$prefix/share/config.site
2698 ac_site_file2=$prefix/etc/config.site
2699else
2700 ac_site_file1=$ac_default_prefix/share/config.site
2701 ac_site_file2=$ac_default_prefix/etc/config.site
2702fi
2703for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2704do
2705 test "x$ac_site_file" = xNONE && continue
2706 if test -r "$ac_site_file"; then
2707 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2708$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2709 sed 's/^/| /' "$ac_site_file" >&5
2710 . "$ac_site_file"
2711 fi
2712done
2713
2714if test -r "$cache_file"; then
2715 # Some versions of bash will fail to source /dev/null (special
2716 # files actually), so we avoid doing that.
2717 if test -f "$cache_file"; then
2718 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2719$as_echo "$as_me: loading cache $cache_file" >&6;}
2720 case $cache_file in
2721 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2722 *) . "./$cache_file";;
2723 esac
2724 fi
2725else
2726 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2727$as_echo "$as_me: creating cache $cache_file" >&6;}
2728 >$cache_file
bec39cab
AC
2729fi
2730
81ecdfbb
RW
2731# Check that the precious variables saved in the cache have kept the same
2732# value.
2733ac_cache_corrupted=false
2734for ac_var in $ac_precious_vars; do
2735 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2736 eval ac_new_set=\$ac_env_${ac_var}_set
2737 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2738 eval ac_new_val=\$ac_env_${ac_var}_value
2739 case $ac_old_set,$ac_new_set in
2740 set,)
2741 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2742$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2743 ac_cache_corrupted=: ;;
2744 ,set)
2745 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2746$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2747 ac_cache_corrupted=: ;;
2748 ,);;
2749 *)
2750 if test "x$ac_old_val" != "x$ac_new_val"; then
2751 # differences in whitespace do not lead to failure.
2752 ac_old_val_w=`echo x $ac_old_val`
2753 ac_new_val_w=`echo x $ac_new_val`
2754 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2755 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2756$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2757 ac_cache_corrupted=:
2758 else
2759 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2760$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2761 eval $ac_var=\$ac_old_val
2762 fi
2763 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2764$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2765 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2766$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2767 fi;;
2768 esac
2769 # Pass precious variables to config.status.
2770 if test "$ac_new_set" = set; then
2771 case $ac_new_val in
2772 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2773 *) ac_arg=$ac_var=$ac_new_val ;;
2774 esac
2775 case " $ac_configure_args " in
2776 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2777 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2778 esac
2779 fi
2780done
2781if $ac_cache_corrupted; then
2782 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2783$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2784 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2785$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2786 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2787fi
2788## -------------------- ##
2789## Main body of script. ##
2790## -------------------- ##
2791
2792ac_ext=c
2793ac_cpp='$CPP $CPPFLAGS'
2794ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2795ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2796ac_compiler_gnu=$ac_cv_c_compiler_gnu
2797
2798
2799
2800
2801
2802ac_config_headers="$ac_config_headers config.h:config.in"
2803
2804
2805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2806$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2807 # Check whether --enable-maintainer-mode was given.
2808if test "${enable_maintainer_mode+set}" = set; then :
2809 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2810else
2811 USE_MAINTAINER_MODE=no
2812fi
2813
2814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
2815$as_echo "$USE_MAINTAINER_MODE" >&6; }
2816 if test $USE_MAINTAINER_MODE = yes; then
2817 MAINTAINER_MODE_TRUE=
2818 MAINTAINER_MODE_FALSE='#'
2819else
2820 MAINTAINER_MODE_TRUE='#'
2821 MAINTAINER_MODE_FALSE=
2822fi
2823
2824 MAINT=$MAINTAINER_MODE_TRUE
2825
2826
2827
17ef446e 2828# Set the 'development' global.
270c9937 2829. $srcdir/../bfd/development.sh
f5f1cdb6 2830
81ecdfbb
RW
2831ac_ext=c
2832ac_cpp='$CPP $CPPFLAGS'
2833ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2834ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2835ac_compiler_gnu=$ac_cv_c_compiler_gnu
2836if test -n "$ac_tool_prefix"; then
2837 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2838set dummy ${ac_tool_prefix}gcc; ac_word=$2
2839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2840$as_echo_n "checking for $ac_word... " >&6; }
2841if test "${ac_cv_prog_CC+set}" = set; then :
2842 $as_echo_n "(cached) " >&6
c906108c
SS
2843else
2844 if test -n "$CC"; then
2845 ac_cv_prog_CC="$CC" # Let the user override the test.
2846else
bec39cab
AC
2847as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2848for as_dir in $PATH
2849do
2850 IFS=$as_save_IFS
2851 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2852 for ac_exec_ext in '' $ac_executable_extensions; do
2853 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2854 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2855 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2856 break 2
2857 fi
2858done
81ecdfbb
RW
2859 done
2860IFS=$as_save_IFS
bec39cab 2861
c906108c
SS
2862fi
2863fi
bec39cab 2864CC=$ac_cv_prog_CC
c906108c 2865if test -n "$CC"; then
81ecdfbb
RW
2866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2867$as_echo "$CC" >&6; }
c906108c 2868else
81ecdfbb
RW
2869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2870$as_echo "no" >&6; }
c906108c
SS
2871fi
2872
81ecdfbb 2873
b4e70030
JB
2874fi
2875if test -z "$ac_cv_prog_CC"; then
2876 ac_ct_CC=$CC
81ecdfbb
RW
2877 # Extract the first word of "gcc", so it can be a program name with args.
2878set dummy gcc; ac_word=$2
2879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2880$as_echo_n "checking for $ac_word... " >&6; }
2881if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
2882 $as_echo_n "(cached) " >&6
b4e70030
JB
2883else
2884 if test -n "$ac_ct_CC"; then
2885 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2886else
2887as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2888for as_dir in $PATH
2889do
2890 IFS=$as_save_IFS
2891 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2892 for ac_exec_ext in '' $ac_executable_extensions; do
2893 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2894 ac_cv_prog_ac_ct_CC="gcc"
2895 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b4e70030 2896 break 2
4e8d927d 2897 fi
b4e70030 2898done
81ecdfbb
RW
2899 done
2900IFS=$as_save_IFS
b4e70030
JB
2901
2902fi
2903fi
2904ac_ct_CC=$ac_cv_prog_ac_ct_CC
2905if test -n "$ac_ct_CC"; then
81ecdfbb
RW
2906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2907$as_echo "$ac_ct_CC" >&6; }
b4e70030 2908else
81ecdfbb
RW
2909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2910$as_echo "no" >&6; }
b4e70030
JB
2911fi
2912
81ecdfbb
RW
2913 if test "x$ac_ct_CC" = x; then
2914 CC=""
2915 else
2916 case $cross_compiling:$ac_tool_warned in
2917yes:)
2918{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2919$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2920ac_tool_warned=yes ;;
2921esac
2922 CC=$ac_ct_CC
2923 fi
b4e70030
JB
2924else
2925 CC="$ac_cv_prog_CC"
2926fi
2927
c906108c 2928if test -z "$CC"; then
81ecdfbb
RW
2929 if test -n "$ac_tool_prefix"; then
2930 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2931set dummy ${ac_tool_prefix}cc; ac_word=$2
2932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2933$as_echo_n "checking for $ac_word... " >&6; }
2934if test "${ac_cv_prog_CC+set}" = set; then :
2935 $as_echo_n "(cached) " >&6
c906108c
SS
2936else
2937 if test -n "$CC"; then
2938 ac_cv_prog_CC="$CC" # Let the user override the test.
2939else
bec39cab
AC
2940as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2941for as_dir in $PATH
2942do
2943 IFS=$as_save_IFS
2944 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2945 for ac_exec_ext in '' $ac_executable_extensions; do
2946 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2947 ac_cv_prog_CC="${ac_tool_prefix}cc"
2948 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2949 break 2
2950 fi
2951done
81ecdfbb
RW
2952 done
2953IFS=$as_save_IFS
2954
2955fi
2956fi
2957CC=$ac_cv_prog_CC
2958if test -n "$CC"; then
2959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2960$as_echo "$CC" >&6; }
2961else
2962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2963$as_echo "no" >&6; }
2964fi
2965
2966
2967 fi
2968fi
2969if test -z "$CC"; then
2970 # Extract the first word of "cc", so it can be a program name with args.
2971set dummy cc; ac_word=$2
2972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2973$as_echo_n "checking for $ac_word... " >&6; }
2974if test "${ac_cv_prog_CC+set}" = set; then :
2975 $as_echo_n "(cached) " >&6
2976else
2977 if test -n "$CC"; then
2978 ac_cv_prog_CC="$CC" # Let the user override the test.
2979else
2980 ac_prog_rejected=no
2981as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2982for as_dir in $PATH
2983do
2984 IFS=$as_save_IFS
2985 test -z "$as_dir" && as_dir=.
2986 for ac_exec_ext in '' $ac_executable_extensions; do
2987 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2988 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2989 ac_prog_rejected=yes
2990 continue
2991 fi
2992 ac_cv_prog_CC="cc"
2993 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2994 break 2
2995 fi
2996done
2997 done
2998IFS=$as_save_IFS
bec39cab 2999
c906108c
SS
3000if test $ac_prog_rejected = yes; then
3001 # We found a bogon in the path, so make sure we never use it.
3002 set dummy $ac_cv_prog_CC
3003 shift
bec39cab 3004 if test $# != 0; then
c906108c
SS
3005 # We chose a different compiler from the bogus one.
3006 # However, it has the same basename, so the bogon will be chosen
3007 # first if we set CC to just the basename; use the full file name.
3008 shift
bec39cab 3009 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
c906108c
SS
3010 fi
3011fi
3012fi
3013fi
bec39cab 3014CC=$ac_cv_prog_CC
c906108c 3015if test -n "$CC"; then
81ecdfbb
RW
3016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3017$as_echo "$CC" >&6; }
c906108c 3018else
81ecdfbb
RW
3019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3020$as_echo "no" >&6; }
c906108c
SS
3021fi
3022
81ecdfbb 3023
bec39cab
AC
3024fi
3025if test -z "$CC"; then
3026 if test -n "$ac_tool_prefix"; then
81ecdfbb 3027 for ac_prog in cl.exe
bec39cab
AC
3028 do
3029 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3030set dummy $ac_tool_prefix$ac_prog; ac_word=$2
81ecdfbb
RW
3031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3032$as_echo_n "checking for $ac_word... " >&6; }
3033if test "${ac_cv_prog_CC+set}" = set; then :
3034 $as_echo_n "(cached) " >&6
c906108c
SS
3035else
3036 if test -n "$CC"; then
3037 ac_cv_prog_CC="$CC" # Let the user override the test.
3038else
bec39cab
AC
3039as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3040for as_dir in $PATH
3041do
3042 IFS=$as_save_IFS
3043 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
3044 for ac_exec_ext in '' $ac_executable_extensions; do
3045 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 3046 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
81ecdfbb 3047 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
3048 break 2
3049 fi
3050done
81ecdfbb
RW
3051 done
3052IFS=$as_save_IFS
bec39cab 3053
c906108c
SS
3054fi
3055fi
bec39cab 3056CC=$ac_cv_prog_CC
c906108c 3057if test -n "$CC"; then
81ecdfbb
RW
3058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3059$as_echo "$CC" >&6; }
c906108c 3060else
81ecdfbb
RW
3061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3062$as_echo "no" >&6; }
c906108c 3063fi
bec39cab 3064
81ecdfbb 3065
bec39cab
AC
3066 test -n "$CC" && break
3067 done
3068fi
3069if test -z "$CC"; then
3070 ac_ct_CC=$CC
81ecdfbb 3071 for ac_prog in cl.exe
bec39cab
AC
3072do
3073 # Extract the first word of "$ac_prog", so it can be a program name with args.
3074set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
3075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3076$as_echo_n "checking for $ac_word... " >&6; }
3077if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3078 $as_echo_n "(cached) " >&6
bec39cab
AC
3079else
3080 if test -n "$ac_ct_CC"; then
3081 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3082else
3083as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3084for as_dir in $PATH
3085do
3086 IFS=$as_save_IFS
3087 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
3088 for ac_exec_ext in '' $ac_executable_extensions; do
3089 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 3090 ac_cv_prog_ac_ct_CC="$ac_prog"
81ecdfbb 3091 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab 3092 break 2
c906108c 3093 fi
bec39cab 3094done
81ecdfbb
RW
3095 done
3096IFS=$as_save_IFS
bec39cab
AC
3097
3098fi
3099fi
3100ac_ct_CC=$ac_cv_prog_ac_ct_CC
3101if test -n "$ac_ct_CC"; then
81ecdfbb
RW
3102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3103$as_echo "$ac_ct_CC" >&6; }
bec39cab 3104else
81ecdfbb
RW
3105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3106$as_echo "no" >&6; }
c906108c
SS
3107fi
3108
81ecdfbb 3109
bec39cab
AC
3110 test -n "$ac_ct_CC" && break
3111done
c906108c 3112
81ecdfbb
RW
3113 if test "x$ac_ct_CC" = x; then
3114 CC=""
3115 else
3116 case $cross_compiling:$ac_tool_warned in
3117yes:)
3118{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3119$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3120ac_tool_warned=yes ;;
3121esac
3122 CC=$ac_ct_CC
3123 fi
bec39cab
AC
3124fi
3125
3126fi
3127
3128
81ecdfbb
RW
3129test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3130$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3131as_fn_error "no acceptable C compiler found in \$PATH
3132See \`config.log' for more details." "$LINENO" 5; }
bec39cab
AC
3133
3134# Provide some information about the compiler.
81ecdfbb
RW
3135$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3136set X $ac_compile
3137ac_compiler=$2
3138for ac_option in --version -v -V -qversion; do
3139 { { ac_try="$ac_compiler $ac_option >&5"
3140case "(($ac_try" in
3141 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3142 *) ac_try_echo=$ac_try;;
3143esac
3144eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3145$as_echo "$ac_try_echo"; } >&5
3146 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
bec39cab 3147 ac_status=$?
81ecdfbb
RW
3148 if test -s conftest.err; then
3149 sed '10a\
3150... rest of stderr output deleted ...
3151 10q' conftest.err >conftest.er1
3152 cat conftest.er1 >&5
3153 rm -f conftest.er1 conftest.err
3154 fi
3155 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3156 test $ac_status = 0; }
3157done
bec39cab 3158
81ecdfbb 3159cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3160/* end confdefs.h. */
3161
3162int
3163main ()
3164{
3165
3166 ;
3167 return 0;
3168}
3169_ACEOF
3170ac_clean_files_save=$ac_clean_files
81ecdfbb 3171ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out"
bec39cab
AC
3172# Try to create an executable without -o first, disregard a.out.
3173# It will help us diagnose broken compilers, and finding out an intuition
3174# of exeext.
81ecdfbb
RW
3175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3176$as_echo_n "checking for C compiler default output file name... " >&6; }
3177ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3178
3179# The possible output files:
3180ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3181
3182ac_rmfiles=
3183for ac_file in $ac_files
3184do
3185 case $ac_file in
3186 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3187 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3188 esac
3189done
3190rm -f $ac_rmfiles
3191
3192if { { ac_try="$ac_link_default"
3193case "(($ac_try" in
3194 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3195 *) ac_try_echo=$ac_try;;
3196esac
3197eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3198$as_echo "$ac_try_echo"; } >&5
3199 (eval "$ac_link_default") 2>&5
3200 ac_status=$?
3201 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3202 test $ac_status = 0; }; then :
3203 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3204# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3205# in a Makefile. We should not override ac_cv_exeext if it was cached,
3206# so that the user can short-circuit this test for compilers unknown to
3207# Autoconf.
3208for ac_file in $ac_files ''
bec39cab
AC
3209do
3210 test -f "$ac_file" || continue
3211 case $ac_file in
81ecdfbb 3212 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
b4e70030
JB
3213 ;;
3214 [ab].out )
3215 # We found the default executable, but exeext='' is most
3216 # certainly right.
3217 break;;
3218 *.* )
81ecdfbb
RW
3219 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3220 then :; else
3221 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3222 fi
3223 # We set ac_cv_exeext here because the later test for it is not
3224 # safe: cross compilers may not add the suffix if given an `-o'
3225 # argument, so we may need to know it at that point already.
3226 # Even if this section looks crufty: it has the advantage of
3227 # actually working.
b4e70030
JB
3228 break;;
3229 * )
3230 break;;
bec39cab
AC
3231 esac
3232done
81ecdfbb
RW
3233test "$ac_cv_exeext" = no && ac_cv_exeext=
3234
bec39cab 3235else
81ecdfbb
RW
3236 ac_file=''
3237fi
3238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3239$as_echo "$ac_file" >&6; }
3240if test -z "$ac_file"; then :
3241 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3242sed 's/^/| /' conftest.$ac_ext >&5
3243
81ecdfbb
RW
3244{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3245$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3246{ as_fn_set_status 77
3247as_fn_error "C compiler cannot create executables
3248See \`config.log' for more details." "$LINENO" 5; }; }
bec39cab 3249fi
b4e70030 3250ac_exeext=$ac_cv_exeext
b4e70030 3251
81ecdfbb 3252# Check that the compiler produces executables we can run. If not, either
bec39cab 3253# the compiler is broken, or we cross compile.
81ecdfbb
RW
3254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3255$as_echo_n "checking whether the C compiler works... " >&6; }
bec39cab
AC
3256# If not cross compiling, check that we can run a simple program.
3257if test "$cross_compiling" != yes; then
3258 if { ac_try='./$ac_file'
81ecdfbb
RW
3259 { { case "(($ac_try" in
3260 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3261 *) ac_try_echo=$ac_try;;
3262esac
3263eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3264$as_echo "$ac_try_echo"; } >&5
3265 (eval "$ac_try") 2>&5
bec39cab 3266 ac_status=$?
81ecdfbb
RW
3267 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3268 test $ac_status = 0; }; }; then
bec39cab 3269 cross_compiling=no
c906108c 3270 else
bec39cab
AC
3271 if test "$cross_compiling" = maybe; then
3272 cross_compiling=yes
3273 else
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 run C compiled programs.
bec39cab 3277If you meant to cross compile, use \`--host'.
81ecdfbb 3278See \`config.log' for more details." "$LINENO" 5; }
bec39cab 3279 fi
c906108c 3280 fi
bec39cab 3281fi
81ecdfbb
RW
3282{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3283$as_echo "yes" >&6; }
bec39cab 3284
81ecdfbb 3285rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out
b4e70030 3286ac_clean_files=$ac_clean_files_save
81ecdfbb 3287# Check that the compiler produces executables we can run. If not, either
b4e70030 3288# the compiler is broken, or we cross compile.
81ecdfbb
RW
3289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3290$as_echo_n "checking whether we are cross compiling... " >&6; }
3291{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3292$as_echo "$cross_compiling" >&6; }
3293
3294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3295$as_echo_n "checking for suffix of executables... " >&6; }
3296if { { ac_try="$ac_link"
3297case "(($ac_try" in
3298 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3299 *) ac_try_echo=$ac_try;;
3300esac
3301eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3302$as_echo "$ac_try_echo"; } >&5
3303 (eval "$ac_link") 2>&5
bec39cab 3304 ac_status=$?
81ecdfbb
RW
3305 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3306 test $ac_status = 0; }; then :
b4e70030
JB
3307 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3308# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3309# work properly (i.e., refer to `conftest.exe'), while it won't with
3310# `rm'.
3311for ac_file in conftest.exe conftest conftest.*; do
3312 test -f "$ac_file" || continue
3313 case $ac_file in
81ecdfbb 3314 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
b4e70030 3315 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
b4e70030
JB
3316 break;;
3317 * ) break;;
3318 esac
3319done
c906108c 3320else
81ecdfbb
RW
3321 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3322$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3323as_fn_error "cannot compute suffix of executables: cannot compile and link
3324See \`config.log' for more details." "$LINENO" 5; }
c906108c 3325fi
b4e70030 3326rm -f conftest$ac_cv_exeext
81ecdfbb
RW
3327{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3328$as_echo "$ac_cv_exeext" >&6; }
c906108c 3329
b4e70030 3330rm -f conftest.$ac_ext
bec39cab
AC
3331EXEEXT=$ac_cv_exeext
3332ac_exeext=$EXEEXT
81ecdfbb
RW
3333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3334$as_echo_n "checking for suffix of object files... " >&6; }
3335if test "${ac_cv_objext+set}" = set; then :
3336 $as_echo_n "(cached) " >&6
bec39cab 3337else
81ecdfbb 3338 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
3339/* end confdefs.h. */
3340
3341int
3342main ()
3343{
3344
3345 ;
3346 return 0;
3347}
3348_ACEOF
3349rm -f conftest.o conftest.obj
81ecdfbb
RW
3350if { { ac_try="$ac_compile"
3351case "(($ac_try" in
3352 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3353 *) ac_try_echo=$ac_try;;
3354esac
3355eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3356$as_echo "$ac_try_echo"; } >&5
3357 (eval "$ac_compile") 2>&5
3358 ac_status=$?
3359 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3360 test $ac_status = 0; }; then :
3361 for ac_file in conftest.o conftest.obj conftest.*; do
3362 test -f "$ac_file" || continue;
bec39cab 3363 case $ac_file in
81ecdfbb 3364 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
bec39cab
AC
3365 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3366 break;;
3367 esac
3368done
c906108c 3369else
81ecdfbb 3370 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3371sed 's/^/| /' conftest.$ac_ext >&5
3372
81ecdfbb
RW
3373{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3374$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3375as_fn_error "cannot compute suffix of object files: cannot compile
3376See \`config.log' for more details." "$LINENO" 5; }
c906108c 3377fi
b4e70030 3378rm -f conftest.$ac_cv_objext conftest.$ac_ext
bec39cab 3379fi
81ecdfbb
RW
3380{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3381$as_echo "$ac_cv_objext" >&6; }
bec39cab
AC
3382OBJEXT=$ac_cv_objext
3383ac_objext=$OBJEXT
81ecdfbb
RW
3384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3385$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3386if test "${ac_cv_c_compiler_gnu+set}" = set; then :
3387 $as_echo_n "(cached) " >&6
c906108c 3388else
81ecdfbb 3389 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3390/* end confdefs.h. */
3391
3392int
3393main ()
3394{
3395#ifndef __GNUC__
3396 choke me
3397#endif
3398
3399 ;
3400 return 0;
3401}
3402_ACEOF
81ecdfbb 3403if ac_fn_c_try_compile "$LINENO"; then :
bec39cab
AC
3404 ac_compiler_gnu=yes
3405else
81ecdfbb 3406 ac_compiler_gnu=no
bec39cab 3407fi
81ecdfbb 3408rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab
AC
3409ac_cv_c_compiler_gnu=$ac_compiler_gnu
3410
3411fi
81ecdfbb
RW
3412{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3413$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3414if test $ac_compiler_gnu = yes; then
3415 GCC=yes
3416else
3417 GCC=
3418fi
bec39cab
AC
3419ac_test_CFLAGS=${CFLAGS+set}
3420ac_save_CFLAGS=$CFLAGS
81ecdfbb
RW
3421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3422$as_echo_n "checking whether $CC accepts -g... " >&6; }
3423if test "${ac_cv_prog_cc_g+set}" = set; then :
3424 $as_echo_n "(cached) " >&6
bec39cab 3425else
81ecdfbb
RW
3426 ac_save_c_werror_flag=$ac_c_werror_flag
3427 ac_c_werror_flag=yes
3428 ac_cv_prog_cc_g=no
3429 CFLAGS="-g"
3430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3431/* end confdefs.h. */
3432
3433int
3434main ()
3435{
3436
3437 ;
3438 return 0;
3439}
3440_ACEOF
81ecdfbb 3441if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
3442 ac_cv_prog_cc_g=yes
3443else
81ecdfbb
RW
3444 CFLAGS=""
3445 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3446/* end confdefs.h. */
3447
3448int
3449main ()
3450{
3451
3452 ;
3453 return 0;
3454}
3455_ACEOF
3456if ac_fn_c_try_compile "$LINENO"; then :
3457
3458else
3459 ac_c_werror_flag=$ac_save_c_werror_flag
3460 CFLAGS="-g"
3461 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3462/* end confdefs.h. */
3463
3464int
3465main ()
3466{
c906108c 3467
81ecdfbb
RW
3468 ;
3469 return 0;
3470}
3471_ACEOF
3472if ac_fn_c_try_compile "$LINENO"; then :
3473 ac_cv_prog_cc_g=yes
3474fi
3475rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3476fi
3477rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4e8d927d 3478fi
81ecdfbb
RW
3479rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3480 ac_c_werror_flag=$ac_save_c_werror_flag
bec39cab 3481fi
81ecdfbb
RW
3482{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3483$as_echo "$ac_cv_prog_cc_g" >&6; }
c906108c 3484if test "$ac_test_CFLAGS" = set; then
bec39cab 3485 CFLAGS=$ac_save_CFLAGS
c906108c
SS
3486elif test $ac_cv_prog_cc_g = yes; then
3487 if test "$GCC" = yes; then
3488 CFLAGS="-g -O2"
3489 else
3490 CFLAGS="-g"
3491 fi
3492else
3493 if test "$GCC" = yes; then
3494 CFLAGS="-O2"
3495 else
3496 CFLAGS=
3497 fi
3498fi
81ecdfbb
RW
3499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3500$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3501if test "${ac_cv_prog_cc_c89+set}" = set; then :
3502 $as_echo_n "(cached) " >&6
bec39cab 3503else
81ecdfbb 3504 ac_cv_prog_cc_c89=no
bec39cab 3505ac_save_CC=$CC
81ecdfbb 3506cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3507/* end confdefs.h. */
c906108c
SS
3508#include <stdarg.h>
3509#include <stdio.h>
3510#include <sys/types.h>
3511#include <sys/stat.h>
3512/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3513struct buf { int x; };
3514FILE * (*rcsopen) (struct buf *, struct stat *, int);
3515static char *e (p, i)
3516 char **p;
3517 int i;
3518{
3519 return p[i];
3520}
3521static char *f (char * (*g) (char **, int), char **p, ...)
3522{
3523 char *s;
3524 va_list v;
3525 va_start (v,p);
3526 s = g (p, va_arg (v,int));
3527 va_end (v);
3528 return s;
3529}
bec39cab
AC
3530
3531/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3532 function prototypes and stuff, but not '\xHH' hex character constants.
3533 These don't provoke an error unfortunately, instead are silently treated
81ecdfbb 3534 as 'x'. The following induces an error, until -std is added to get
bec39cab
AC
3535 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3536 array size at least. It's necessary to write '\x00'==0 to get something
81ecdfbb 3537 that's true only with -std. */
bec39cab
AC
3538int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3539
81ecdfbb
RW
3540/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3541 inside strings and character constants. */
3542#define FOO(x) 'x'
3543int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3544
c906108c
SS
3545int test (int i, double x);
3546struct s1 {int (*f) (int a);};
3547struct s2 {int (*f) (double a);};
3548int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3549int argc;
3550char **argv;
bec39cab
AC
3551int
3552main ()
3553{
c906108c 3554return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
bec39cab
AC
3555 ;
3556 return 0;
3557}
3558_ACEOF
81ecdfbb
RW
3559for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3560 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
bec39cab
AC
3561do
3562 CC="$ac_save_CC $ac_arg"
81ecdfbb
RW
3563 if ac_fn_c_try_compile "$LINENO"; then :
3564 ac_cv_prog_cc_c89=$ac_arg
c906108c 3565fi
81ecdfbb
RW
3566rm -f core conftest.err conftest.$ac_objext
3567 test "x$ac_cv_prog_cc_c89" != "xno" && break
c906108c 3568done
81ecdfbb 3569rm -f conftest.$ac_ext
bec39cab 3570CC=$ac_save_CC
c906108c
SS
3571
3572fi
81ecdfbb
RW
3573# AC_CACHE_VAL
3574case "x$ac_cv_prog_cc_c89" in
3575 x)
3576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3577$as_echo "none needed" >&6; } ;;
3578 xno)
3579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3580$as_echo "unsupported" >&6; } ;;
bec39cab 3581 *)
81ecdfbb
RW
3582 CC="$CC $ac_cv_prog_cc_c89"
3583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3584$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
c906108c 3585esac
81ecdfbb 3586if test "x$ac_cv_prog_cc_c89" != xno; then :
c906108c 3587
b4e70030
JB
3588fi
3589
bec39cab
AC
3590ac_ext=c
3591ac_cpp='$CPP $CPPFLAGS'
3592ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3593ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3594ac_compiler_gnu=$ac_cv_c_compiler_gnu
c906108c 3595
3bc3d82a
PA
3596ac_ext=cpp
3597ac_cpp='$CXXCPP $CPPFLAGS'
3598ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3599ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3600ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3601if test -z "$CXX"; then
3602 if test -n "$CCC"; then
3603 CXX=$CCC
3604 else
3605 if test -n "$ac_tool_prefix"; then
3606 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3607 do
3608 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3609set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3611$as_echo_n "checking for $ac_word... " >&6; }
3612if test "${ac_cv_prog_CXX+set}" = set; then :
3613 $as_echo_n "(cached) " >&6
3614else
3615 if test -n "$CXX"; then
3616 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3617else
3618as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3619for as_dir in $PATH
3620do
3621 IFS=$as_save_IFS
3622 test -z "$as_dir" && as_dir=.
3623 for ac_exec_ext in '' $ac_executable_extensions; do
3624 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3625 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3626 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3627 break 2
3628 fi
3629done
3630 done
3631IFS=$as_save_IFS
3632
3633fi
3634fi
3635CXX=$ac_cv_prog_CXX
3636if test -n "$CXX"; then
3637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
3638$as_echo "$CXX" >&6; }
3639else
3640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3641$as_echo "no" >&6; }
3642fi
3643
3644
3645 test -n "$CXX" && break
3646 done
3647fi
3648if test -z "$CXX"; then
3649 ac_ct_CXX=$CXX
3650 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3651do
3652 # Extract the first word of "$ac_prog", so it can be a program name with args.
3653set dummy $ac_prog; ac_word=$2
3654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3655$as_echo_n "checking for $ac_word... " >&6; }
3656if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
3657 $as_echo_n "(cached) " >&6
3658else
3659 if test -n "$ac_ct_CXX"; then
3660 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3661else
3662as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3663for as_dir in $PATH
3664do
3665 IFS=$as_save_IFS
3666 test -z "$as_dir" && as_dir=.
3667 for ac_exec_ext in '' $ac_executable_extensions; do
3668 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3669 ac_cv_prog_ac_ct_CXX="$ac_prog"
3670 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3671 break 2
3672 fi
3673done
3674 done
3675IFS=$as_save_IFS
3676
3677fi
3678fi
3679ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3680if test -n "$ac_ct_CXX"; then
3681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
3682$as_echo "$ac_ct_CXX" >&6; }
3683else
3684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3685$as_echo "no" >&6; }
3686fi
3687
3688
3689 test -n "$ac_ct_CXX" && break
3690done
3691
3692 if test "x$ac_ct_CXX" = x; then
3693 CXX="g++"
3694 else
3695 case $cross_compiling:$ac_tool_warned in
3696yes:)
3697{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3698$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3699ac_tool_warned=yes ;;
3700esac
3701 CXX=$ac_ct_CXX
3702 fi
3703fi
3704
3705 fi
3706fi
3707# Provide some information about the compiler.
3708$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
3709set X $ac_compile
3710ac_compiler=$2
3711for ac_option in --version -v -V -qversion; do
3712 { { ac_try="$ac_compiler $ac_option >&5"
3713case "(($ac_try" in
3714 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3715 *) ac_try_echo=$ac_try;;
3716esac
3717eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3718$as_echo "$ac_try_echo"; } >&5
3719 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3720 ac_status=$?
3721 if test -s conftest.err; then
3722 sed '10a\
3723... rest of stderr output deleted ...
3724 10q' conftest.err >conftest.er1
3725 cat conftest.er1 >&5
3726 rm -f conftest.er1 conftest.err
3727 fi
3728 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3729 test $ac_status = 0; }
3730done
3731
3732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
3733$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
3734if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
3735 $as_echo_n "(cached) " >&6
3736else
3737 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3738/* end confdefs.h. */
3739
3740int
3741main ()
3742{
3743#ifndef __GNUC__
3744 choke me
3745#endif
3746
3747 ;
3748 return 0;
3749}
3750_ACEOF
3751if ac_fn_cxx_try_compile "$LINENO"; then :
3752 ac_compiler_gnu=yes
3753else
3754 ac_compiler_gnu=no
3755fi
3756rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3757ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3758
3759fi
3760{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
3761$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
3762if test $ac_compiler_gnu = yes; then
3763 GXX=yes
3764else
3765 GXX=
3766fi
3767ac_test_CXXFLAGS=${CXXFLAGS+set}
3768ac_save_CXXFLAGS=$CXXFLAGS
3769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
3770$as_echo_n "checking whether $CXX accepts -g... " >&6; }
3771if test "${ac_cv_prog_cxx_g+set}" = set; then :
3772 $as_echo_n "(cached) " >&6
3773else
3774 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
3775 ac_cxx_werror_flag=yes
3776 ac_cv_prog_cxx_g=no
3777 CXXFLAGS="-g"
3778 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3779/* end confdefs.h. */
3780
3781int
3782main ()
3783{
3784
3785 ;
3786 return 0;
3787}
3788_ACEOF
3789if ac_fn_cxx_try_compile "$LINENO"; then :
3790 ac_cv_prog_cxx_g=yes
3791else
3792 CXXFLAGS=""
3793 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3794/* end confdefs.h. */
3795
3796int
3797main ()
3798{
3799
3800 ;
3801 return 0;
3802}
3803_ACEOF
3804if ac_fn_cxx_try_compile "$LINENO"; then :
3805
3806else
3807 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3808 CXXFLAGS="-g"
3809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3810/* end confdefs.h. */
3811
3812int
3813main ()
3814{
3815
3816 ;
3817 return 0;
3818}
3819_ACEOF
3820if ac_fn_cxx_try_compile "$LINENO"; then :
3821 ac_cv_prog_cxx_g=yes
3822fi
3823rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3824fi
3825rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3826fi
3827rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3828 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3829fi
3830{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
3831$as_echo "$ac_cv_prog_cxx_g" >&6; }
3832if test "$ac_test_CXXFLAGS" = set; then
3833 CXXFLAGS=$ac_save_CXXFLAGS
3834elif test $ac_cv_prog_cxx_g = yes; then
3835 if test "$GXX" = yes; then
3836 CXXFLAGS="-g -O2"
3837 else
3838 CXXFLAGS="-g"
3839 fi
3840else
3841 if test "$GXX" = yes; then
3842 CXXFLAGS="-O2"
3843 else
3844 CXXFLAGS=
3845 fi
3846fi
3847ac_ext=c
3848ac_cpp='$CPP $CPPFLAGS'
3849ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3850ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3851ac_compiler_gnu=$ac_cv_c_compiler_gnu
3852
3853
60ca704f 3854
bec39cab
AC
3855ac_ext=c
3856ac_cpp='$CPP $CPPFLAGS'
3857ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3858ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3859ac_compiler_gnu=$ac_cv_c_compiler_gnu
81ecdfbb
RW
3860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3861$as_echo_n "checking how to run the C preprocessor... " >&6; }
bec39cab
AC
3862# On Suns, sometimes $CPP names a directory.
3863if test -n "$CPP" && test -d "$CPP"; then
3864 CPP=
8bb2c122 3865fi
bec39cab 3866if test -z "$CPP"; then
81ecdfbb
RW
3867 if test "${ac_cv_prog_CPP+set}" = set; then :
3868 $as_echo_n "(cached) " >&6
bec39cab
AC
3869else
3870 # Double quotes because CPP needs to be expanded
3871 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3872 do
3873 ac_preproc_ok=false
3874for ac_c_preproc_warn_flag in '' yes
3875do
3876 # Use a header file that comes with gcc, so configuring glibc
3877 # with a fresh cross-compiler works.
3878 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3879 # <limits.h> exists even on freestanding compilers.
3880 # On the NeXT, cc -E runs the code through the compiler's parser,
3881 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3883/* end confdefs.h. */
3884#ifdef __STDC__
3885# include <limits.h>
3886#else
3887# include <assert.h>
3888#endif
3889 Syntax error
3890_ACEOF
81ecdfbb 3891if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3892
81ecdfbb 3893else
bec39cab
AC
3894 # Broken: fails on valid input.
3895continue
3896fi
3897rm -f conftest.err conftest.$ac_ext
3898
81ecdfbb 3899 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3900 # can be detected and how.
81ecdfbb 3901 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3902/* end confdefs.h. */
3903#include <ac_nonexistent.h>
3904_ACEOF
81ecdfbb 3905if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3906 # Broken: success on invalid input.
3907continue
8bb2c122 3908else
bec39cab
AC
3909 # Passes both tests.
3910ac_preproc_ok=:
3911break
8bb2c122 3912fi
bec39cab 3913rm -f conftest.err conftest.$ac_ext
8bb2c122 3914
bec39cab
AC
3915done
3916# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3917rm -f conftest.err conftest.$ac_ext
81ecdfbb 3918if $ac_preproc_ok; then :
bec39cab
AC
3919 break
3920fi
8bb2c122 3921
bec39cab
AC
3922 done
3923 ac_cv_prog_CPP=$CPP
ddc9cd0f 3924
c906108c 3925fi
bec39cab
AC
3926 CPP=$ac_cv_prog_CPP
3927else
3928 ac_cv_prog_CPP=$CPP
c906108c 3929fi
81ecdfbb
RW
3930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3931$as_echo "$CPP" >&6; }
bec39cab
AC
3932ac_preproc_ok=false
3933for ac_c_preproc_warn_flag in '' yes
3934do
3935 # Use a header file that comes with gcc, so configuring glibc
3936 # with a fresh cross-compiler works.
3937 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3938 # <limits.h> exists even on freestanding compilers.
3939 # On the NeXT, cc -E runs the code through the compiler's parser,
3940 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3942/* end confdefs.h. */
3943#ifdef __STDC__
3944# include <limits.h>
3945#else
3946# include <assert.h>
3947#endif
3948 Syntax error
3949_ACEOF
81ecdfbb 3950if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3951
81ecdfbb 3952else
bec39cab
AC
3953 # Broken: fails on valid input.
3954continue
3955fi
3956rm -f conftest.err conftest.$ac_ext
3957
81ecdfbb 3958 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3959 # can be detected and how.
81ecdfbb 3960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3961/* end confdefs.h. */
3962#include <ac_nonexistent.h>
3963_ACEOF
81ecdfbb 3964if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3965 # Broken: success on invalid input.
3966continue
c906108c 3967else
bec39cab
AC
3968 # Passes both tests.
3969ac_preproc_ok=:
3970break
c906108c 3971fi
bec39cab 3972rm -f conftest.err conftest.$ac_ext
c906108c 3973
bec39cab
AC
3974done
3975# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3976rm -f conftest.err conftest.$ac_ext
81ecdfbb
RW
3977if $ac_preproc_ok; then :
3978
c906108c 3979else
81ecdfbb
RW
3980 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3981$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3982as_fn_error "C preprocessor \"$CPP\" fails sanity check
3983See \`config.log' for more details." "$LINENO" 5; }
c906108c 3984fi
c906108c 3985
bec39cab
AC
3986ac_ext=c
3987ac_cpp='$CPP $CPPFLAGS'
3988ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3989ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3990ac_compiler_gnu=$ac_cv_c_compiler_gnu
3991
3992
81ecdfbb
RW
3993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3994$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3995if test "${ac_cv_path_GREP+set}" = set; then :
3996 $as_echo_n "(cached) " >&6
4e8d927d 3997else
81ecdfbb
RW
3998 if test -z "$GREP"; then
3999 ac_path_GREP_found=false
4000 # Loop through the user's path and test for each of PROGNAME-LIST
4001 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4002for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4003do
4004 IFS=$as_save_IFS
4005 test -z "$as_dir" && as_dir=.
4006 for ac_prog in grep ggrep; do
4007 for ac_exec_ext in '' $ac_executable_extensions; do
4008 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4009 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4010# Check for GNU ac_path_GREP and select it if it is found.
4011 # Check for GNU $ac_path_GREP
4012case `"$ac_path_GREP" --version 2>&1` in
4013*GNU*)
4014 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4015*)
4016 ac_count=0
4017 $as_echo_n 0123456789 >"conftest.in"
4018 while :
4019 do
4020 cat "conftest.in" "conftest.in" >"conftest.tmp"
4021 mv "conftest.tmp" "conftest.in"
4022 cp "conftest.in" "conftest.nl"
4023 $as_echo 'GREP' >> "conftest.nl"
4024 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4025 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4026 as_fn_arith $ac_count + 1 && ac_count=$as_val
4027 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4028 # Best one so far, save it but keep looking for a better one
4029 ac_cv_path_GREP="$ac_path_GREP"
4030 ac_path_GREP_max=$ac_count
bec39cab 4031 fi
81ecdfbb
RW
4032 # 10*(2^10) chars as input seems more than enough
4033 test $ac_count -gt 10 && break
4034 done
4035 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4036esac
bec39cab 4037
81ecdfbb
RW
4038 $ac_path_GREP_found && break 3
4039 done
4040 done
4041 done
4042IFS=$as_save_IFS
4043 if test -z "$ac_cv_path_GREP"; then
4044 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4045 fi
c906108c 4046else
81ecdfbb 4047 ac_cv_path_GREP=$GREP
c906108c 4048fi
c906108c 4049
81ecdfbb
RW
4050fi
4051{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4052$as_echo "$ac_cv_path_GREP" >&6; }
4053 GREP="$ac_cv_path_GREP"
c906108c 4054
c906108c 4055
81ecdfbb
RW
4056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4057$as_echo_n "checking for egrep... " >&6; }
4058if test "${ac_cv_path_EGREP+set}" = set; then :
4059 $as_echo_n "(cached) " >&6
783e057b 4060else
81ecdfbb
RW
4061 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4062 then ac_cv_path_EGREP="$GREP -E"
4063 else
4064 if test -z "$EGREP"; then
4065 ac_path_EGREP_found=false
4066 # Loop through the user's path and test for each of PROGNAME-LIST
4067 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4068for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
783e057b
DJ
4069do
4070 IFS=$as_save_IFS
4071 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
4072 for ac_prog in egrep; do
4073 for ac_exec_ext in '' $ac_executable_extensions; do
4074 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4075 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4076# Check for GNU ac_path_EGREP and select it if it is found.
4077 # Check for GNU $ac_path_EGREP
4078case `"$ac_path_EGREP" --version 2>&1` in
4079*GNU*)
4080 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4081*)
4082 ac_count=0
4083 $as_echo_n 0123456789 >"conftest.in"
4084 while :
4085 do
4086 cat "conftest.in" "conftest.in" >"conftest.tmp"
4087 mv "conftest.tmp" "conftest.in"
4088 cp "conftest.in" "conftest.nl"
4089 $as_echo 'EGREP' >> "conftest.nl"
4090 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4091 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4092 as_fn_arith $ac_count + 1 && ac_count=$as_val
4093 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4094 # Best one so far, save it but keep looking for a better one
4095 ac_cv_path_EGREP="$ac_path_EGREP"
4096 ac_path_EGREP_max=$ac_count
4097 fi
4098 # 10*(2^10) chars as input seems more than enough
4099 test $ac_count -gt 10 && break
4100 done
4101 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4102esac
bec39cab 4103
81ecdfbb
RW
4104 $ac_path_EGREP_found && break 3
4105 done
4106 done
4107 done
4108IFS=$as_save_IFS
4109 if test -z "$ac_cv_path_EGREP"; then
4110 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
783e057b 4111 fi
783e057b 4112else
81ecdfbb 4113 ac_cv_path_EGREP=$EGREP
783e057b
DJ
4114fi
4115
81ecdfbb 4116 fi
783e057b 4117fi
81ecdfbb
RW
4118{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4119$as_echo "$ac_cv_path_EGREP" >&6; }
4120 EGREP="$ac_cv_path_EGREP"
4121
783e057b 4122
81ecdfbb
RW
4123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4124$as_echo_n "checking for ANSI C header files... " >&6; }
4125if test "${ac_cv_header_stdc+set}" = set; then :
4126 $as_echo_n "(cached) " >&6
783e057b 4127else
81ecdfbb 4128 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 4129/* end confdefs.h. */
783e057b 4130#include <stdlib.h>
bec39cab 4131#include <stdarg.h>
783e057b
DJ
4132#include <string.h>
4133#include <float.h>
c906108c 4134
bec39cab
AC
4135int
4136main ()
4137{
c906108c 4138
bec39cab
AC
4139 ;
4140 return 0;
4141}
4142_ACEOF
81ecdfbb 4143if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4144 ac_cv_header_stdc=yes
c906108c 4145else
81ecdfbb 4146 ac_cv_header_stdc=no
c906108c 4147fi
81ecdfbb 4148rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 4149
783e057b
DJ
4150if test $ac_cv_header_stdc = yes; then
4151 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
81ecdfbb 4152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4153/* end confdefs.h. */
4154#include <string.h>
c906108c 4155
783e057b
DJ
4156_ACEOF
4157if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4158 $EGREP "memchr" >/dev/null 2>&1; then :
4159
c906108c 4160else
783e057b 4161 ac_cv_header_stdc=no
c906108c 4162fi
783e057b 4163rm -f conftest*
c906108c
SS
4164
4165fi
4166
783e057b
DJ
4167if test $ac_cv_header_stdc = yes; then
4168 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
81ecdfbb 4169 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4170/* end confdefs.h. */
4171#include <stdlib.h>
bec39cab 4172
783e057b
DJ
4173_ACEOF
4174if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4175 $EGREP "free" >/dev/null 2>&1; then :
4176
bec39cab 4177else
783e057b 4178 ac_cv_header_stdc=no
bec39cab 4179fi
783e057b 4180rm -f conftest*
bec39cab
AC
4181
4182fi
bec39cab 4183
783e057b
DJ
4184if test $ac_cv_header_stdc = yes; then
4185 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
81ecdfbb 4186 if test "$cross_compiling" = yes; then :
783e057b 4187 :
bec39cab 4188else
81ecdfbb 4189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4190/* end confdefs.h. */
4191#include <ctype.h>
81ecdfbb 4192#include <stdlib.h>
783e057b
DJ
4193#if ((' ' & 0x0FF) == 0x020)
4194# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4195# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4196#else
4197# define ISLOWER(c) \
4198 (('a' <= (c) && (c) <= 'i') \
4199 || ('j' <= (c) && (c) <= 'r') \
4200 || ('s' <= (c) && (c) <= 'z'))
4201# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4202#endif
4203
4204#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4205int
4206main ()
4207{
4208 int i;
4209 for (i = 0; i < 256; i++)
4210 if (XOR (islower (i), ISLOWER (i))
4211 || toupper (i) != TOUPPER (i))
81ecdfbb
RW
4212 return 2;
4213 return 0;
783e057b
DJ
4214}
4215_ACEOF
81ecdfbb 4216if ac_fn_c_try_run "$LINENO"; then :
783e057b 4217
81ecdfbb
RW
4218else
4219 ac_cv_header_stdc=no
783e057b 4220fi
81ecdfbb
RW
4221rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4222 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 4223fi
81ecdfbb 4224
783e057b
DJ
4225fi
4226fi
81ecdfbb
RW
4227{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4228$as_echo "$ac_cv_header_stdc" >&6; }
783e057b
DJ
4229if test $ac_cv_header_stdc = yes; then
4230
81ecdfbb 4231$as_echo "#define STDC_HEADERS 1" >>confdefs.h
783e057b
DJ
4232
4233fi
4234
4235# On IRIX 5.3, sys/types and inttypes.h are conflicting.
783e057b
DJ
4236for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4237 inttypes.h stdint.h unistd.h
81ecdfbb
RW
4238do :
4239 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4240ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4241"
4242eval as_val=\$$as_ac_Header
4243 if test "x$as_val" = x""yes; then :
783e057b 4244 cat >>confdefs.h <<_ACEOF
81ecdfbb 4245#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
783e057b
DJ
4246_ACEOF
4247
4248fi
4249
4250done
4251
4252
4253
81ecdfbb
RW
4254 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4255if test "x$ac_cv_header_minix_config_h" = x""yes; then :
783e057b
DJ
4256 MINIX=yes
4257else
4258 MINIX=
4259fi
4260
4261
4262 if test "$MINIX" = yes; then
4263
81ecdfbb 4264$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
783e057b
DJ
4265
4266
81ecdfbb 4267$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
783e057b
DJ
4268
4269
81ecdfbb 4270$as_echo "#define _MINIX 1" >>confdefs.h
783e057b
DJ
4271
4272 fi
4273
4274
81ecdfbb
RW
4275 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4276$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4277if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
4278 $as_echo_n "(cached) " >&6
783e057b 4279else
81ecdfbb 4280 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4281/* end confdefs.h. */
4282
c971b7fa
PA
4283# define __EXTENSIONS__ 1
4284 $ac_includes_default
783e057b
DJ
4285int
4286main ()
4287{
4288
4289 ;
4290 return 0;
4291}
4292_ACEOF
81ecdfbb 4293if ac_fn_c_try_compile "$LINENO"; then :
783e057b
DJ
4294 ac_cv_safe_to_define___extensions__=yes
4295else
81ecdfbb 4296 ac_cv_safe_to_define___extensions__=no
783e057b 4297fi
81ecdfbb 4298rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b 4299fi
81ecdfbb
RW
4300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4301$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
783e057b 4302 test $ac_cv_safe_to_define___extensions__ = yes &&
81ecdfbb 4303 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
783e057b 4304
81ecdfbb 4305 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
783e057b 4306
81ecdfbb 4307 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
783e057b 4308
81ecdfbb 4309 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
783e057b 4310
81ecdfbb 4311 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
783e057b
DJ
4312
4313
c971b7fa
PA
4314ac_aux_dir=
4315for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4316 for ac_t in install-sh install.sh shtool; do
4317 if test -f "$ac_dir/$ac_t"; then
4318 ac_aux_dir=$ac_dir
4319 ac_install_sh="$ac_aux_dir/$ac_t -c"
4320 break 2
4321 fi
4322 done
4323done
4324if test -z "$ac_aux_dir"; then
4325 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
4326fi
770d76d7 4327
c971b7fa
PA
4328# These three variables are undocumented and unsupported,
4329# and are intended to be withdrawn in a future Autoconf release.
4330# They can cause serious problems if a builder's source tree is in a directory
4331# whose full name contains unusual characters.
4332ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4333ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4334ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
770d76d7 4335
770d76d7 4336
c971b7fa
PA
4337# Make sure we can run config.sub.
4338$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
4339 as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
770d76d7 4340
c971b7fa
PA
4341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4342$as_echo_n "checking build system type... " >&6; }
4343if test "${ac_cv_build+set}" = set; then :
4344 $as_echo_n "(cached) " >&6
770d76d7 4345else
c971b7fa
PA
4346 ac_build_alias=$build_alias
4347test "x$ac_build_alias" = x &&
4348 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4349test "x$ac_build_alias" = x &&
4350 as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
4351ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
4352 as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
4353
770d76d7 4354fi
c971b7fa
PA
4355{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4356$as_echo "$ac_cv_build" >&6; }
4357case $ac_cv_build in
4358*-*-*) ;;
4359*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
770d76d7 4360esac
c971b7fa
PA
4361build=$ac_cv_build
4362ac_save_IFS=$IFS; IFS='-'
4363set x $ac_cv_build
4364shift
4365build_cpu=$1
4366build_vendor=$2
4367shift; shift
4368# Remember, the first character of IFS is used to create $*,
4369# except with old shells:
4370build_os=$*
4371IFS=$ac_save_IFS
4372case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
770d76d7
PA
4373
4374
c971b7fa
PA
4375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4376$as_echo_n "checking host system type... " >&6; }
4377if test "${ac_cv_host+set}" = set; then :
81ecdfbb
RW
4378 $as_echo_n "(cached) " >&6
4379else
c971b7fa
PA
4380 if test "x$host_alias" = x; then
4381 ac_cv_host=$ac_cv_build
81ecdfbb 4382else
c971b7fa
PA
4383 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
4384 as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
81ecdfbb 4385fi
81ecdfbb
RW
4386
4387fi
c971b7fa
PA
4388{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4389$as_echo "$ac_cv_host" >&6; }
4390case $ac_cv_host in
4391*-*-*) ;;
4392*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
81ecdfbb 4393esac
c971b7fa
PA
4394host=$ac_cv_host
4395ac_save_IFS=$IFS; IFS='-'
4396set x $ac_cv_host
4397shift
4398host_cpu=$1
4399host_vendor=$2
4400shift; shift
4401# Remember, the first character of IFS is used to create $*,
4402# except with old shells:
4403host_os=$*
4404IFS=$ac_save_IFS
4405case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3388710e
JM
4406
4407
4408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4409$as_echo_n "checking target system type... " >&6; }
4410if test "${ac_cv_target+set}" = set; then :
4411 $as_echo_n "(cached) " >&6
4412else
4413 if test "x$target_alias" = x; then
4414 ac_cv_target=$ac_cv_host
4415else
4416 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
4417 as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
4418fi
4419
4420fi
4421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4422$as_echo "$ac_cv_target" >&6; }
4423case $ac_cv_target in
4424*-*-*) ;;
4425*) as_fn_error "invalid value of canonical target" "$LINENO" 5;;
4426esac
4427target=$ac_cv_target
4428ac_save_IFS=$IFS; IFS='-'
4429set x $ac_cv_target
4430shift
4431target_cpu=$1
4432target_vendor=$2
4433shift; shift
4434# Remember, the first character of IFS is used to create $*,
4435# except with old shells:
4436target_os=$*
4437IFS=$ac_save_IFS
4438case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4439
4440
4441# The aliases save the names the user supplied, while $host etc.
4442# will get canonicalized.
4443test -n "$target_alias" &&
4444 test "$program_prefix$program_suffix$program_transform_name" = \
4445 NONENONEs,x,x, &&
4446 program_prefix=${target_alias}-
4447
4448# The tests for host and target for $enable_largefile require
4449# canonical names.
4450
4451
81ecdfbb 4452
da2f07f1
JK
4453# As the $enable_largefile decision depends on --enable-plugins we must set it
4454# even in directories otherwise not depending on the $plugins option.
4455
4456
2974be62
AM
4457 maybe_plugins=no
4458 for ac_header in dlfcn.h
4459do :
4460 ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
4461"
4462if test "x$ac_cv_header_dlfcn_h" = x""yes; then :
4463 cat >>confdefs.h <<_ACEOF
4464#define HAVE_DLFCN_H 1
4465_ACEOF
4466 maybe_plugins=yes
4467fi
4468
4469done
4470
4471 for ac_header in windows.h
4472do :
4473 ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
4474"
4475if test "x$ac_cv_header_windows_h" = x""yes; then :
4476 cat >>confdefs.h <<_ACEOF
4477#define HAVE_WINDOWS_H 1
4478_ACEOF
4479 maybe_plugins=yes
4480fi
4481
4482done
4483
4484
4485 # Check whether --enable-plugins was given.
da2f07f1
JK
4486if test "${enable_plugins+set}" = set; then :
4487 enableval=$enable_plugins; case "${enableval}" in
2974be62
AM
4488 no) plugins=no ;;
4489 *) plugins=yes
4490 if test "$maybe_plugins" != "yes" ; then
4491 as_fn_error "Building with plugin support requires a host that supports dlopen." "$LINENO" 5
4492 fi ;;
4493 esac
da2f07f1 4494else
2974be62
AM
4495 plugins=$maybe_plugins
4496
da2f07f1
JK
4497fi
4498
2974be62
AM
4499 if test "$plugins" = "yes"; then
4500 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
4501$as_echo_n "checking for library containing dlopen... " >&6; }
4502if test "${ac_cv_search_dlopen+set}" = set; then :
4503 $as_echo_n "(cached) " >&6
4504else
4505 ac_func_search_save_LIBS=$LIBS
4506cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4507/* end confdefs.h. */
4508
4509/* Override any GCC internal prototype to avoid an error.
4510 Use char because int might match the return type of a GCC
4511 builtin and then its argument prototype would still apply. */
4512#ifdef __cplusplus
4513extern "C"
4514#endif
4515char dlopen ();
4516int
4517main ()
4518{
4519return dlopen ();
4520 ;
4521 return 0;
4522}
4523_ACEOF
4524for ac_lib in '' dl; do
4525 if test -z "$ac_lib"; then
4526 ac_res="none required"
4527 else
4528 ac_res=-l$ac_lib
4529 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4530 fi
4531 if ac_fn_c_try_link "$LINENO"; then :
4532 ac_cv_search_dlopen=$ac_res
4533fi
4534rm -f core conftest.err conftest.$ac_objext \
4535 conftest$ac_exeext
4536 if test "${ac_cv_search_dlopen+set}" = set; then :
4537 break
4538fi
4539done
4540if test "${ac_cv_search_dlopen+set}" = set; then :
4541
4542else
4543 ac_cv_search_dlopen=no
4544fi
4545rm conftest.$ac_ext
4546LIBS=$ac_func_search_save_LIBS
4547fi
4548{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
4549$as_echo "$ac_cv_search_dlopen" >&6; }
4550ac_res=$ac_cv_search_dlopen
4551if test "$ac_res" != no; then :
4552 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4553
4554fi
4555
4556 fi
da2f07f1
JK
4557
4558
4559case "${host}" in
4560 sparc-*-solaris*|i[3-7]86-*-solaris*)
4561 # On native 32bit sparc and ia32 solaris, large-file and procfs support
4562 # are mutually exclusive; and without procfs support, the bfd/ elf module
4563 # cannot provide certain routines such as elfcore_write_prpsinfo
4564 # or elfcore_write_prstatus. So unless the user explicitly requested
4565 # large-file support through the --enable-largefile switch, disable
4566 # large-file support in favor of procfs support.
4567 test "${target}" = "${host}" -a "x$plugins" = xno \
4568 && : ${enable_largefile="no"}
4569 ;;
4570esac
4571
4572# Check whether --enable-largefile was given.
4573if test "${enable_largefile+set}" = set; then :
4574 enableval=$enable_largefile;
4575fi
4576
4577if test "$enable_largefile" != no; then
4578
4579 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4580$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
4581if test "${ac_cv_sys_largefile_CC+set}" = set; then :
4582 $as_echo_n "(cached) " >&6
4583else
4584 ac_cv_sys_largefile_CC=no
4585 if test "$GCC" != yes; then
4586 ac_save_CC=$CC
4587 while :; do
4588 # IRIX 6.2 and later do not support large files by default,
4589 # so use the C compiler's -n32 option if that helps.
4590 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4591/* end confdefs.h. */
4592#include <sys/types.h>
4593 /* Check that off_t can represent 2**63 - 1 correctly.
4594 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4595 since some C++ compilers masquerading as C compilers
4596 incorrectly reject 9223372036854775807. */
4597#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4598 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4599 && LARGE_OFF_T % 2147483647 == 1)
4600 ? 1 : -1];
4601int
4602main ()
4603{
4604
4605 ;
4606 return 0;
4607}
4608_ACEOF
4609 if ac_fn_c_try_compile "$LINENO"; then :
4610 break
4611fi
4612rm -f core conftest.err conftest.$ac_objext
4613 CC="$CC -n32"
4614 if ac_fn_c_try_compile "$LINENO"; then :
4615 ac_cv_sys_largefile_CC=' -n32'; break
4616fi
4617rm -f core conftest.err conftest.$ac_objext
4618 break
4619 done
4620 CC=$ac_save_CC
4621 rm -f conftest.$ac_ext
4622 fi
4623fi
4624{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4625$as_echo "$ac_cv_sys_largefile_CC" >&6; }
4626 if test "$ac_cv_sys_largefile_CC" != no; then
4627 CC=$CC$ac_cv_sys_largefile_CC
4628 fi
4629
4630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4631$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
4632if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
4633 $as_echo_n "(cached) " >&6
4634else
4635 while :; do
4636 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4637/* end confdefs.h. */
4638#include <sys/types.h>
4639 /* Check that off_t can represent 2**63 - 1 correctly.
4640 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4641 since some C++ compilers masquerading as C compilers
4642 incorrectly reject 9223372036854775807. */
4643#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4644 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4645 && LARGE_OFF_T % 2147483647 == 1)
4646 ? 1 : -1];
4647int
4648main ()
4649{
4650
4651 ;
4652 return 0;
4653}
4654_ACEOF
4655if ac_fn_c_try_compile "$LINENO"; then :
4656 ac_cv_sys_file_offset_bits=no; break
4657fi
4658rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4659 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4660/* end confdefs.h. */
4661#define _FILE_OFFSET_BITS 64
4662#include <sys/types.h>
4663 /* Check that off_t can represent 2**63 - 1 correctly.
4664 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4665 since some C++ compilers masquerading as C compilers
4666 incorrectly reject 9223372036854775807. */
4667#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4668 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4669 && LARGE_OFF_T % 2147483647 == 1)
4670 ? 1 : -1];
4671int
4672main ()
4673{
4674
4675 ;
4676 return 0;
4677}
4678_ACEOF
4679if ac_fn_c_try_compile "$LINENO"; then :
4680 ac_cv_sys_file_offset_bits=64; break
4681fi
4682rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4683 ac_cv_sys_file_offset_bits=unknown
4684 break
4685done
4686fi
4687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4688$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4689case $ac_cv_sys_file_offset_bits in #(
4690 no | unknown) ;;
4691 *)
4692cat >>confdefs.h <<_ACEOF
4693#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4694_ACEOF
4695;;
4696esac
4697rm -rf conftest*
4698 if test $ac_cv_sys_file_offset_bits = unknown; then
4699 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4700$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
4701if test "${ac_cv_sys_large_files+set}" = set; then :
4702 $as_echo_n "(cached) " >&6
4703else
4704 while :; do
4705 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4706/* end confdefs.h. */
4707#include <sys/types.h>
4708 /* Check that off_t can represent 2**63 - 1 correctly.
4709 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4710 since some C++ compilers masquerading as C compilers
4711 incorrectly reject 9223372036854775807. */
4712#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4713 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4714 && LARGE_OFF_T % 2147483647 == 1)
4715 ? 1 : -1];
4716int
4717main ()
4718{
4719
4720 ;
4721 return 0;
4722}
4723_ACEOF
4724if ac_fn_c_try_compile "$LINENO"; then :
4725 ac_cv_sys_large_files=no; break
4726fi
4727rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4728 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4729/* end confdefs.h. */
4730#define _LARGE_FILES 1
4731#include <sys/types.h>
4732 /* Check that off_t can represent 2**63 - 1 correctly.
4733 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4734 since some C++ compilers masquerading as C compilers
4735 incorrectly reject 9223372036854775807. */
4736#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4737 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4738 && LARGE_OFF_T % 2147483647 == 1)
4739 ? 1 : -1];
4740int
4741main ()
4742{
4743
4744 ;
4745 return 0;
4746}
4747_ACEOF
4748if ac_fn_c_try_compile "$LINENO"; then :
4749 ac_cv_sys_large_files=1; break
4750fi
4751rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4752 ac_cv_sys_large_files=unknown
4753 break
4754done
4755fi
4756{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4757$as_echo "$ac_cv_sys_large_files" >&6; }
4758case $ac_cv_sys_large_files in #(
4759 no | unknown) ;;
4760 *)
4761cat >>confdefs.h <<_ACEOF
4762#define _LARGE_FILES $ac_cv_sys_large_files
4763_ACEOF
4764;;
4765esac
4766rm -rf conftest*
4767 fi
4768fi
4769
4770
4771
81ecdfbb
RW
4772
4773
4774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5
4775$as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; }
4776if test "${am_cv_prog_cc_stdc+set}" = set; then :
4777 $as_echo_n "(cached) " >&6
4778else
4779 am_cv_prog_cc_stdc=no
4780ac_save_CC="$CC"
4781# Don't try gcc -ansi; that turns off useful extensions and
4782# breaks some systems' header files.
4783# AIX -qlanglvl=ansi
4784# Ultrix and OSF/1 -std1
4785# HP-UX 10.20 and later -Ae
4786# HP-UX older versions -Aa -D_HPUX_SOURCE
4787# SVR4 -Xc -D__EXTENSIONS__
4788for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4789do
783e057b 4790 CC="$ac_save_CC $ac_arg"
81ecdfbb 4791 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4792/* end confdefs.h. */
4793#include <stdarg.h>
4794#include <stdio.h>
4795#include <sys/types.h>
4796#include <sys/stat.h>
4797/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4798struct buf { int x; };
4799FILE * (*rcsopen) (struct buf *, struct stat *, int);
4800static char *e (p, i)
4801 char **p;
4802 int i;
4803{
4804 return p[i];
4805}
4806static char *f (char * (*g) (char **, int), char **p, ...)
4807{
4808 char *s;
4809 va_list v;
4810 va_start (v,p);
4811 s = g (p, va_arg (v,int));
4812 va_end (v);
4813 return s;
4814}
4815int test (int i, double x);
4816struct s1 {int (*f) (int a);};
4817struct s2 {int (*f) (double a);};
4818int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4819int argc;
4820char **argv;
4821
4822int
4823main ()
4824{
4825
4826return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4827
4828 ;
4829 return 0;
4830}
4831_ACEOF
81ecdfbb 4832if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4833 am_cv_prog_cc_stdc="$ac_arg"; break
783e057b 4834fi
81ecdfbb 4835rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
4836done
4837CC="$ac_save_CC"
4838
4839fi
4840
4841if test -z "$am_cv_prog_cc_stdc"; then
81ecdfbb
RW
4842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4843$as_echo "none needed" >&6; }
783e057b 4844else
81ecdfbb
RW
4845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5
4846$as_echo "$am_cv_prog_cc_stdc" >&6; }
783e057b
DJ
4847fi
4848case "x$am_cv_prog_cc_stdc" in
4849 x|xno) ;;
4850 *) CC="$CC $am_cv_prog_cc_stdc" ;;
4851esac
4852
4869db5e
RM
4853# expand $ac_aux_dir to an absolute path
4854am_aux_dir=`cd $ac_aux_dir && pwd`
4855
4856if test x"${install_sh}" != xset; then
4857 case $am_aux_dir in
4858 *\ * | *\ *)
4859 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
4860 *)
4861 install_sh="\${SHELL} $am_aux_dir/install-sh"
4862 esac
4863fi
4864
4865# Installed binaries are usually stripped using `strip' when the user
4866# run `make install-strip'. However `strip' might not be the right
4867# tool to use in cross-compilation environments, therefore Automake
4868# will honor the `STRIP' environment variable to overrule this program.
4869if test "$cross_compiling" != no; then
4870 if test -n "$ac_tool_prefix"; then
4871 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4872set dummy ${ac_tool_prefix}strip; ac_word=$2
4873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4874$as_echo_n "checking for $ac_word... " >&6; }
4875if test "${ac_cv_prog_STRIP+set}" = set; then :
4876 $as_echo_n "(cached) " >&6
4877else
4878 if test -n "$STRIP"; then
4879 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4880else
4881as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4882for as_dir in $PATH
4883do
4884 IFS=$as_save_IFS
4885 test -z "$as_dir" && as_dir=.
4886 for ac_exec_ext in '' $ac_executable_extensions; do
4887 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4888 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4889 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4890 break 2
4891 fi
4892done
4893 done
4894IFS=$as_save_IFS
4895
4896fi
4897fi
4898STRIP=$ac_cv_prog_STRIP
4899if test -n "$STRIP"; then
4900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
4901$as_echo "$STRIP" >&6; }
4902else
4903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4904$as_echo "no" >&6; }
4905fi
4906
4907
4908fi
4909if test -z "$ac_cv_prog_STRIP"; then
4910 ac_ct_STRIP=$STRIP
4911 # Extract the first word of "strip", so it can be a program name with args.
4912set dummy strip; ac_word=$2
4913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4914$as_echo_n "checking for $ac_word... " >&6; }
4915if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
4916 $as_echo_n "(cached) " >&6
4917else
4918 if test -n "$ac_ct_STRIP"; then
4919 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
4920else
4921as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4922for as_dir in $PATH
4923do
4924 IFS=$as_save_IFS
4925 test -z "$as_dir" && as_dir=.
4926 for ac_exec_ext in '' $ac_executable_extensions; do
4927 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4928 ac_cv_prog_ac_ct_STRIP="strip"
4929 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4930 break 2
4931 fi
4932done
4933 done
4934IFS=$as_save_IFS
4935
4936fi
4937fi
4938ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
4939if test -n "$ac_ct_STRIP"; then
4940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
4941$as_echo "$ac_ct_STRIP" >&6; }
4942else
4943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4944$as_echo "no" >&6; }
4945fi
4946
4947 if test "x$ac_ct_STRIP" = x; then
4948 STRIP=":"
4949 else
4950 case $cross_compiling:$ac_tool_warned in
4951yes:)
4952{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4953$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4954ac_tool_warned=yes ;;
4955esac
4956 STRIP=$ac_ct_STRIP
4957 fi
4958else
4959 STRIP="$ac_cv_prog_STRIP"
4960fi
4961
4962fi
4963INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
4964
783e057b
DJ
4965
4966ac_aux_dir=
81ecdfbb
RW
4967for ac_dir in .. "$srcdir"/..; do
4968 for ac_t in install-sh install.sh shtool; do
4969 if test -f "$ac_dir/$ac_t"; then
4970 ac_aux_dir=$ac_dir
4971 ac_install_sh="$ac_aux_dir/$ac_t -c"
4972 break 2
4973 fi
4974 done
783e057b
DJ
4975done
4976if test -z "$ac_aux_dir"; then
81ecdfbb 4977 as_fn_error "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
783e057b 4978fi
81ecdfbb
RW
4979
4980# These three variables are undocumented and unsupported,
4981# and are intended to be withdrawn in a future Autoconf release.
4982# They can cause serious problems if a builder's source tree is in a directory
4983# whose full name contains unusual characters.
4984ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4985ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4986ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4987
783e057b 4988
783e057b 4989
9009e1ae
MR
4990test "$program_prefix" != NONE &&
4991 program_transform_name="s&^&$program_prefix&;$program_transform_name"
4992# Use a double $ so make ignores it.
4993test "$program_suffix" != NONE &&
4994 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
4995# Double any \ or $.
4996# By default was `s,x,x', remove it if useless.
4997ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
4998program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
4999
81ecdfbb 5000
3bc3d82a
PA
5001# See if we are building with C++, and substitute COMPILER.
5002
5003 # Check whether --enable-build-with-cxx was given.
5004if test "${enable_build_with_cxx+set}" = set; then :
5005 enableval=$enable_build_with_cxx; case $enableval in
5006 yes | no)
5007 ;;
5008 *)
5009 as_fn_error "bad value $enableval for --enable-build-with-cxx" "$LINENO" 5 ;;
5010 esac
5011else
5012 enable_build_with_cxx=no
5013fi
5014
5015
5016 if test "$enable_build_with_cxx" = "yes"; then
5017 # We're using -fpermissive as shortcut for now.
5018 COMPILER='$(CXX) -fpermissive'
5019 else
5020 COMPILER='$(CC)'
5021 fi
5022
5023
5024
a417dc56
RW
5025# Dependency checking.
5026rm -rf .tst 2>/dev/null
5027mkdir .tst 2>/dev/null
5028if test -d .tst; then
5029 am__leading_dot=.
5030else
5031 am__leading_dot=_
5032fi
5033rmdir .tst 2>/dev/null
5034
5035DEPDIR="${am__leading_dot}deps"
5036
81ecdfbb 5037ac_config_commands="$ac_config_commands depdir"
a417dc56
RW
5038
5039
5040depcc="$CC" am_compiler_list=
5041
5042am_depcomp=$ac_aux_dir/depcomp
81ecdfbb
RW
5043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
5044$as_echo_n "checking dependency style of $depcc... " >&6; }
5045if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
5046 $as_echo_n "(cached) " >&6
a417dc56
RW
5047else
5048 if test -f "$am_depcomp"; then
5049 # We make a subdir and do the tests there. Otherwise we can end up
5050 # making bogus files that we don't know about and never remove. For
5051 # instance it was reported that on HP-UX the gcc test will end up
5052 # making a dummy file named `D' -- because `-MD' means `put the output
5053 # in D'.
5054 mkdir conftest.dir
5055 # Copy depcomp to subdir because otherwise we won't find it if we're
5056 # using a relative directory.
5057 cp "$am_depcomp" conftest.dir
5058 cd conftest.dir
5059 # We will build objects and dependencies in a subdirectory because
5060 # it helps to detect inapplicable dependency modes. For instance
5061 # both Tru64's cc and ICC support -MD to output dependencies as a
5062 # side effect of compilation, but ICC will put the dependencies in
5063 # the current directory while Tru64 will put them in the object
5064 # directory.
5065 mkdir sub
5066
5067 am_cv_CC_dependencies_compiler_type=none
5068 if test "$am_compiler_list" = ""; then
5069 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
5070 fi
5071 for depmode in $am_compiler_list; do
5072 if test $depmode = none; then break; fi
5073
81ecdfbb 5074 $as_echo "$as_me:$LINENO: trying $depmode" >&5
a417dc56
RW
5075 # Setup a source with many dependencies, because some compilers
5076 # like to wrap large dependency lists on column 80 (with \), and
5077 # we should not choose a depcomp mode which is confused by this.
5078 #
5079 # We need to recreate these files for each test, as the compiler may
5080 # overwrite some of them when testing with obscure command lines.
5081 # This happens at least with the AIX C compiler.
5082 : > sub/conftest.c
5083 for i in 1 2 3 4 5 6; do
5084 echo '#include "conftst'$i'.h"' >> sub/conftest.c
5085 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
5086 # Solaris 8's {/usr,}/bin/sh.
5087 touch sub/conftst$i.h
5088 done
5089 echo "include sub/conftest.Po" > confmf
5090
5091 # We check with `-c' and `-o' for the sake of the "dashmstdout"
5092 # mode. It turns out that the SunPro C++ compiler does not properly
5093 # handle `-M -o', and we need to detect this.
5094 depcmd="depmode=$depmode \
5095 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
5096 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
5097 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
5098 echo "| $depcmd" | sed -e 's/ */ /g' >&5
5099 if env $depcmd > conftest.err 2>&1 &&
5100 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
5101 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
5102 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
5103 # icc doesn't choke on unknown options, it will just issue warnings
5104 # or remarks (even with -Werror). So we grep stderr for any message
5105 # that says an option was ignored or not supported.
5106 # When given -MP, icc 7.0 and 7.1 complain thusly:
5107 # icc: Command line warning: ignoring option '-M'; no argument required
5108 # The diagnosis changed in icc 8.0:
5109 # icc: Command line remark: option '-MP' not supported
5110 if (grep 'ignoring option' conftest.err ||
5111 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
5112 am_cv_CC_dependencies_compiler_type=$depmode
81ecdfbb 5113 $as_echo "$as_me:$LINENO: success" >&5
a417dc56
RW
5114 break
5115 fi
5116 fi
81ecdfbb 5117 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
a417dc56
RW
5118 sed -e 's/^/| /' < conftest.err >&5
5119 done
5120
5121 cd ..
5122 rm -rf conftest.dir
5123else
5124 am_cv_CC_dependencies_compiler_type=none
5125fi
5126
5127fi
81ecdfbb
RW
5128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
5129$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
a417dc56 5130if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
81ecdfbb 5131then as_fn_error "no usable dependency style found" "$LINENO" 5
a417dc56
RW
5132else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
5133
5134fi
5135
5136
5137# Check for the 'make' the user wants to use.
5138for ac_prog in make
5139do
5140 # Extract the first word of "$ac_prog", so it can be a program name with args.
5141set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
5142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5143$as_echo_n "checking for $ac_word... " >&6; }
5144if test "${ac_cv_prog_MAKE+set}" = set; then :
5145 $as_echo_n "(cached) " >&6
a417dc56
RW
5146else
5147 if test -n "$MAKE"; then
5148 ac_cv_prog_MAKE="$MAKE" # Let the user override the test.
5149else
5150as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5151for as_dir in $PATH
5152do
5153 IFS=$as_save_IFS
5154 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5155 for ac_exec_ext in '' $ac_executable_extensions; do
5156 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
a417dc56 5157 ac_cv_prog_MAKE="$ac_prog"
81ecdfbb 5158 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
a417dc56
RW
5159 break 2
5160 fi
5161done
81ecdfbb
RW
5162 done
5163IFS=$as_save_IFS
a417dc56
RW
5164
5165fi
5166fi
5167MAKE=$ac_cv_prog_MAKE
5168if test -n "$MAKE"; then
81ecdfbb
RW
5169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
5170$as_echo "$MAKE" >&6; }
a417dc56 5171else
81ecdfbb
RW
5172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5173$as_echo "no" >&6; }
a417dc56
RW
5174fi
5175
81ecdfbb 5176
a417dc56
RW
5177 test -n "$MAKE" && break
5178done
5179
5180MAKE_IS_GNU=
5181case "`$MAKE --version 2>&1 | sed 1q`" in
5182 *GNU*)
5183 MAKE_IS_GNU=yes
5184 ;;
5185esac
81ecdfbb 5186 if test "$MAKE_IS_GNU" = yes; then
a417dc56
RW
5187 GMAKE_TRUE=
5188 GMAKE_FALSE='#'
5189else
5190 GMAKE_TRUE='#'
5191 GMAKE_FALSE=
5192fi
5193
81ecdfbb
RW
5194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
5195$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
5196set x ${MAKE-make}
5197ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
5198if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
5199 $as_echo_n "(cached) " >&6
a417dc56
RW
5200else
5201 cat >conftest.make <<\_ACEOF
81ecdfbb 5202SHELL = /bin/sh
a417dc56 5203all:
81ecdfbb 5204 @echo '@@@%%%=$(MAKE)=@@@%%%'
a417dc56
RW
5205_ACEOF
5206# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
81ecdfbb
RW
5207case `${MAKE-make} -f conftest.make 2>/dev/null` in
5208 *@@@%%%=?*=@@@%%%*)
5209 eval ac_cv_prog_make_${ac_make}_set=yes;;
5210 *)
5211 eval ac_cv_prog_make_${ac_make}_set=no;;
5212esac
a417dc56
RW
5213rm -f conftest.make
5214fi
81ecdfbb
RW
5215if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
5216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5217$as_echo "yes" >&6; }
a417dc56
RW
5218 SET_MAKE=
5219else
81ecdfbb
RW
5220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5221$as_echo "no" >&6; }
a417dc56
RW
5222 SET_MAKE="MAKE=${MAKE-make}"
5223fi
5224
5225
648d586d
JB
5226gnulib_extra_configure_args=
5227# If large-file support is disabled, make sure gnulib does the same.
5228if test "$enable_largefile" = no; then
5229gnulib_extra_configure_args="$gnulib_extra_configure_args --disable-largefile"
5230fi
5231
c971b7fa
PA
5232# Configure gnulib. We need to build gnulib under some other
5233# directory not "gnulib", to avoid the problem of both GDB and
5234# GDBserver wanting to build it in the same directory, when building
5235# in the source dir.
783e057b 5236
c971b7fa
PA
5237 in_src="gnulib"
5238 in_build="build-gnulib"
648d586d 5239 in_extra_args="$gnulib_extra_configure_args"
c971b7fa
PA
5240
5241 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
5242 # so they do not pile up.
5243 ac_sub_configure_args=
5244 ac_prev=
5245 eval "set x $ac_configure_args"
5246 shift
5247 for ac_arg
5248 do
5249 if test -n "$ac_prev"; then
5250 ac_prev=
5251 continue
5252 fi
5253 case $ac_arg in
5254 -cache-file | --cache-file | --cache-fil | --cache-fi \
5255 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
5256 ac_prev=cache_file ;;
5257 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
5258 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
5259 | --c=*)
5260 ;;
5261 --config-cache | -C)
5262 ;;
5263 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
5264 ac_prev=srcdir ;;
5265 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
5266 ;;
5267 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
5268 ac_prev=prefix ;;
5269 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
5270 ;;
5271 --disable-option-checking)
5272 ;;
5273 *)
5274 case $ac_arg in
5275 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
5276 esac
5277 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
5278 esac
5279 done
5280
5281 # Always prepend --prefix to ensure using the same prefix
5282 # in subdir configurations.
5283 ac_arg="--prefix=$prefix"
5284 case $ac_arg in
5285 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
5286 esac
5287 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
5288
5289 # Pass --silent
5290 if test "$silent" = yes; then
5291 ac_sub_configure_args="--silent $ac_sub_configure_args"
5292 fi
5293
5294 # Always prepend --disable-option-checking to silence warnings, since
5295 # different subdirs can have different --enable and --with options.
5296 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
5297
5298 ac_popdir=`pwd`
5299 ac_dir=$in_build
5300
5301 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
5302 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
5303 $as_echo "$ac_msg" >&6
5304 as_dir="$ac_dir"; as_fn_mkdir_p
5305
38ea300a
PA
5306 case $srcdir in
5307 [\\/]* | ?:[\\/]* )
5308 ac_srcdir=$srcdir/$in_src ;;
5309 *) # Relative name.
5310 ac_srcdir=../$srcdir/$in_src ;;
5311 esac
c971b7fa
PA
5312
5313 cd "$ac_dir"
5314
5315 ac_sub_configure=$ac_srcdir/configure
5316
5317 # Make the cache file name correct relative to the subdirectory.
5318 case $cache_file in
5319 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
5320 *) # Relative name.
5321 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
5322 esac
5323
648d586d
JB
5324 if test -n "$in_extra_args"; then
5325 # Add the extra args at the end.
5326 ac_sub_configure_args="$ac_sub_configure_args $in_extra_args"
5327 fi
5328
c971b7fa
PA
5329 { $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
5330$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
5331 # The eval makes quoting arguments work.
5332 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
5333 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
5334 as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
5335
5336 cd "$ac_popdir"
783e057b 5337
c971b7fa
PA
5338
5339
5340CONFIG_OBS=
5341CONFIG_DEPS=
5342CONFIG_SRCS=
5343ENABLE_CFLAGS=
5344
5345CONFIG_ALL=
5346CONFIG_CLEAN=
5347CONFIG_INSTALL=
5348CONFIG_UNINSTALL=
5349
5350# If we haven't got the data from the intl directory,
5351# assume NLS is disabled.
5352USE_NLS=no
5353LIBINTL=
5354LIBINTL_DEP=
5355INCINTL=
5356XGETTEXT=
5357GMSGFMT=
5358POSUB=
783e057b
DJ
5359
5360if test -f ../intl/config.intl; then
5361 . ../intl/config.intl
5362fi
81ecdfbb
RW
5363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
5364$as_echo_n "checking whether NLS is requested... " >&6; }
783e057b 5365if test x"$USE_NLS" != xyes; then
81ecdfbb
RW
5366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5367$as_echo "no" >&6; }
783e057b 5368else
81ecdfbb
RW
5369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5370$as_echo "yes" >&6; }
783e057b 5371
81ecdfbb 5372$as_echo "#define ENABLE_NLS 1" >>confdefs.h
783e057b
DJ
5373
5374
81ecdfbb
RW
5375 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
5376$as_echo_n "checking for catalogs to be installed... " >&6; }
783e057b
DJ
5377 # Look for .po and .gmo files in the source directory.
5378 CATALOGS=
5379 XLINGUAS=
5380 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
5381 # If there aren't any .gmo files the shell will give us the
5382 # literal string "../path/to/srcdir/po/*.gmo" which has to be
5383 # weeded out.
5384 case "$cat" in *\**)
5385 continue;;
5386 esac
5387 # The quadruple backslash is collapsed to a double backslash
5388 # by the backticks, then collapsed again by the double quotes,
5389 # leaving us with one backslash in the sed expression (right
5390 # before the dot that mustn't act as a wildcard).
c971b7fa
PA
5391 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
5392 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
5393 # The user is allowed to set LINGUAS to a list of languages to
5394 # install catalogs for. If it's empty that means "all of them."
5395 if test "x$LINGUAS" = x; then
5396 CATALOGS="$CATALOGS $cat"
5397 XLINGUAS="$XLINGUAS $lang"
5398 else
5399 case "$LINGUAS" in *$lang*)
5400 CATALOGS="$CATALOGS $cat"
5401 XLINGUAS="$XLINGUAS $lang"
5402 ;;
5403 esac
e28b3332
DJ
5404 fi
5405 done
c971b7fa
PA
5406 LINGUAS="$XLINGUAS"
5407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
5408$as_echo "$LINGUAS" >&6; }
5409
5410
5411 DATADIRNAME=share
5412
5413 INSTOBJEXT=.mo
5414
5415 GENCAT=gencat
5416
5417 CATOBJEXT=.gmo
e28b3332 5418
e28b3332
DJ
5419fi
5420
c971b7fa
PA
5421localedir='${datadir}/locale'
5422
5423
5424if test x"$USE_NLS" = xyes; then
5425 CONFIG_ALL="$CONFIG_ALL all-po"
5426 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
5427 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
5428 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
e28b3332 5429fi
e28b3332 5430
c971b7fa
PA
5431GNULIB=build-gnulib/import
5432
5433# For Makefile dependencies.
5434GNULIB_STDINT_H=
5435if test x"$STDINT_H" != x; then
5436 GNULIB_STDINT_H=$GNULIB/$STDINT_H
e28b3332
DJ
5437fi
5438
5439
c971b7fa
PA
5440PACKAGE=gdb
5441
5442cat >>confdefs.h <<_ACEOF
5443#define PACKAGE "$PACKAGE"
5444_ACEOF
5445
5446
5447
5448# We never need to detect it in this sub-configure.
5449# But preserve it for config.status --recheck.
5450
5451
5452
5453MAKEINFO_EXTRA_FLAGS=""
5454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5
5455$as_echo_n "checking whether $MAKEINFO supports @click... " >&6; }
5456if test "${gdb_cv_have_makeinfo_click+set}" = set; then :
5457 $as_echo_n "(cached) " >&6
5458else
5459 echo '@clicksequence{a @click{} b}' >conftest.texinfo
5460 if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then
5461 gdb_cv_have_makeinfo_click=yes
5462 else
5463 gdb_cv_have_makeinfo_click=no
5464 fi
5465fi
5466{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5
5467$as_echo "$gdb_cv_have_makeinfo_click" >&6; }
5468if test x"$gdb_cv_have_makeinfo_click" = xyes; then
5469 MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK"
5470fi
e28b3332
DJ
5471
5472
bec39cab
AC
5473
5474
81ecdfbb
RW
5475# Check whether --with-separate-debug-dir was given.
5476if test "${with_separate_debug_dir+set}" = set; then :
5477 withval=$with_separate_debug_dir;
b14b1491
TT
5478 DEBUGDIR=$withval
5479else
5480 DEBUGDIR=${libdir}/debug
81ecdfbb
RW
5481fi
5482
20e95c23 5483
783e057b
DJ
5484 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5485 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 5486 ac_define_dir=`eval echo $DEBUGDIR`
783e057b 5487 ac_define_dir=`eval echo $ac_define_dir`
20e95c23 5488
783e057b
DJ
5489cat >>confdefs.h <<_ACEOF
5490#define DEBUGDIR "$ac_define_dir"
20e95c23 5491_ACEOF
20e95c23 5492
20e95c23 5493
20e95c23 5494
0c4a4063 5495
b14b1491
TT
5496 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
5497 if test "x$prefix" = xNONE; then
5498 test_prefix=/usr/local
5499 else
5500 test_prefix=$prefix
5501 fi
783e057b 5502 else
b14b1491 5503 test_prefix=$exec_prefix
783e057b 5504 fi
b14b1491
TT
5505 value=0
5506 case ${ac_define_dir} in
5507 "${test_prefix}"|"${test_prefix}/"*|\
5508 '${exec_prefix}'|'${exec_prefix}/'*)
5509 value=1
5510 ;;
5511 esac
5512
5513cat >>confdefs.h <<_ACEOF
5514#define DEBUGDIR_RELOCATABLE $value
5515_ACEOF
5516
5517
5518
0c4a4063 5519
f83d8a90
DE
5520# We can't pass paths as command line arguments.
5521# Mingw32 tries to be clever and will convert the paths for us.
5522# For example -DBINDIR="/usr/local/bin" passed on the command line may get
5523# converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin".
5524# This breaks GDB's relocatable path conversions since paths passed in
5525# config.h would not get so translated, the path prefixes no longer match.
5526
5527 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5528 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5529 ac_define_dir=`eval echo $bindir`
5530 ac_define_dir=`eval echo $ac_define_dir`
5531
5532cat >>confdefs.h <<_ACEOF
5533#define BINDIR "$ac_define_dir"
5534_ACEOF
5535
5536
5537
b14b1491
TT
5538# GDB's datadir relocation
5539
5540
5541
81ecdfbb
RW
5542# Check whether --with-gdb-datadir was given.
5543if test "${with_gdb_datadir+set}" = set; then :
5544 withval=$with_gdb_datadir;
b14b1491 5545 GDB_DATADIR=$withval
20e95c23 5546else
b14b1491 5547 GDB_DATADIR=${datadir}/gdb
81ecdfbb
RW
5548fi
5549
20e95c23 5550
b14b1491
TT
5551 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5552 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5553 ac_define_dir=`eval echo $GDB_DATADIR`
5554 ac_define_dir=`eval echo $ac_define_dir`
5555
5556cat >>confdefs.h <<_ACEOF
5557#define GDB_DATADIR "$ac_define_dir"
20e95c23
DJ
5558_ACEOF
5559
b14b1491
TT
5560
5561
0c4a4063 5562
b14b1491
TT
5563 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
5564 if test "x$prefix" = xNONE; then
5565 test_prefix=/usr/local
5566 else
5567 test_prefix=$prefix
5568 fi
5569 else
5570 test_prefix=$exec_prefix
5571 fi
5572 value=0
5573 case ${ac_define_dir} in
5574 "${test_prefix}"|"${test_prefix}/"*|\
5575 '${exec_prefix}'|'${exec_prefix}/'*)
5576 value=1
5577 ;;
5578 esac
5579
5580cat >>confdefs.h <<_ACEOF
5581#define GDB_DATADIR_RELOCATABLE $value
5582_ACEOF
5583
5584
783e057b 5585
20e95c23 5586
0c4a4063 5587
81ecdfbb
RW
5588# Check whether --with-relocated-sources was given.
5589if test "${with_relocated_sources+set}" = set; then :
5590 withval=$with_relocated_sources; reloc_srcdir="${withval}"
29b0e8a2
JM
5591
5592 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5593 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5594 ac_define_dir=`eval echo $reloc_srcdir`
5595 ac_define_dir=`eval echo $ac_define_dir`
5596
5597cat >>confdefs.h <<_ACEOF
5598#define RELOC_SRCDIR "$ac_define_dir"
5599_ACEOF
5600
5601
5602
81ecdfbb
RW
5603fi
5604
29b0e8a2 5605
7349ff92
JK
5606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5
5607$as_echo_n "checking for default auto-load directory... " >&6; }
5608
5609# Check whether --with-auto-load-dir was given.
5610if test "${with_auto_load_dir+set}" = set; then :
5611 withval=$with_auto_load_dir;
5612else
1564a261 5613 with_auto_load_dir='$debugdir:$datadir/auto-load'
7349ff92
JK
5614fi
5615
1564a261 5616escape_dir=`echo $with_auto_load_dir | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'`
7349ff92
JK
5617
5618 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5619 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5620 ac_define_dir=`eval echo $escape_dir`
5621 ac_define_dir=`eval echo $ac_define_dir`
5622
5623cat >>confdefs.h <<_ACEOF
5624#define AUTO_LOAD_DIR "$ac_define_dir"
5625_ACEOF
5626
5627
5628{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5
5629$as_echo "$with_auto_load_dir" >&6; }
5630
bccbefd2
JK
5631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5
5632$as_echo_n "checking for default auto-load safe-path... " >&6; }
5633
5634# Check whether --with-auto-load-safe-path was given.
5635if test "${with_auto_load_safe_path+set}" = set; then :
5636 withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then
6dea1fbd
JK
5637 with_auto_load_safe_path="/"
5638 fi
bccbefd2 5639else
7349ff92 5640 with_auto_load_safe_path="$with_auto_load_dir"
bccbefd2
JK
5641fi
5642
1564a261 5643escape_dir=`echo $with_auto_load_safe_path | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'`
bccbefd2
JK
5644
5645 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5646 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6dea1fbd 5647 ac_define_dir=`eval echo $escape_dir`
bccbefd2
JK
5648 ac_define_dir=`eval echo $ac_define_dir`
5649
5650cat >>confdefs.h <<_ACEOF
6dea1fbd 5651#define AUTO_LOAD_SAFE_PATH "$ac_define_dir"
bccbefd2
JK
5652_ACEOF
5653
5654
5655{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
5656$as_echo "$with_auto_load_safe_path" >&6; }
5657
29b0e8a2 5658
20e95c23 5659
5ae98d25 5660subdirs="$subdirs testsuite"
20e95c23
DJ
5661
5662
783e057b 5663# Check whether to support alternative target configurations
81ecdfbb
RW
5664# Check whether --enable-targets was given.
5665if test "${enable_targets+set}" = set; then :
5666 enableval=$enable_targets; case "${enableval}" in
5667 yes | "") as_fn_error "enable-targets option must specify target names or 'all'" "$LINENO" 5
783e057b
DJ
5668 ;;
5669 no) enable_targets= ;;
5670 *) enable_targets=$enableval ;;
5671esac
81ecdfbb
RW
5672fi
5673
20e95c23 5674
783e057b 5675# Check whether to enable 64-bit support on 32-bit hosts
81ecdfbb
RW
5676# Check whether --enable-64-bit-bfd was given.
5677if test "${enable_64_bit_bfd+set}" = set; then :
5678 enableval=$enable_64_bit_bfd; case "${enableval}" in
783e057b
DJ
5679 yes) want64=true ;;
5680 no) want64=false ;;
81ecdfbb 5681 *) as_fn_error "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
783e057b
DJ
5682esac
5683else
5684 want64=false
81ecdfbb
RW
5685fi
5686
783e057b
DJ
5687# Provide defaults for some variables set by the per-host and per-target
5688# configuration.
5689gdb_host_obs=posix-hdep.o
20e95c23 5690
783e057b
DJ
5691if test "${target}" = "${host}"; then
5692 gdb_native=yes
5693else
5694 gdb_native=no
5695fi
20e95c23 5696
783e057b 5697. $srcdir/configure.host
20e95c23 5698
fb23d554
SDJ
5699# Add in the common host objects.
5700. $srcdir/common/common.host
5701gdb_host_obs="$gdb_host_obs $common_host_obs"
5702
783e057b 5703# Accumulate some settings from configure.tgt over all enabled targets
20e95c23 5704
783e057b
DJ
5705TARGET_OBS=
5706all_targets=
b292c783 5707HAVE_NATIVE_GCORE_TARGET=
20e95c23 5708
783e057b 5709for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
20e95c23 5710do
783e057b
DJ
5711 if test "$targ_alias" = "all"; then
5712 all_targets=true
5713 else
5714 # Canonicalize the secondary target names.
5715 result=`$ac_config_sub $targ_alias 2>/dev/null`
5716 if test -n "$result"; then
5717 targ=$result
5718 else
5719 targ=$targ_alias
5720 fi
20e95c23 5721
783e057b 5722 . ${srcdir}/configure.tgt
20e95c23 5723
bf307134
JB
5724 if test -z "${gdb_target_obs}"; then :
5725 as_fn_error "configuration ${targ} is unsupported." "$LINENO" 5
5726fi
5727
783e057b
DJ
5728 # Target-specific object files
5729 for i in ${gdb_target_obs}; do
5730 case " $TARGET_OBS " in
5731 *" ${i} "*) ;;
5732 *)
5733 TARGET_OBS="$TARGET_OBS ${i}"
5734 ;;
5735 esac
5736 done
20e95c23 5737
783e057b
DJ
5738 # Check whether this target needs 64-bit CORE_ADDR
5739 if test x${want64} = xfalse; then
5740 . ${srcdir}/../bfd/config.bfd
5741 fi
b292c783
JK
5742
5743 # Check whether this target is native and supports gcore.
5744 if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \
5745 && $gdb_have_gcore; then
5746 HAVE_NATIVE_GCORE_TARGET=1
5747 fi
783e057b 5748 fi
20e95c23
DJ
5749done
5750
783e057b
DJ
5751if test x${all_targets} = xtrue; then
5752
5753 # We want all 64-bit targets if we either:
5754 # - run on a 64-bit host or
5755 # - already require 64-bit support for some other target or
5756 # - the --enable-64-bit-bfd option was supplied
5757 # Otherwise we only support all 32-bit targets.
5758 #
5759 # NOTE: This test must be in sync with the corresponding
5760 # tests in BFD!
20e95c23 5761
783e057b 5762 if test x${want64} = xfalse; then
81ecdfbb
RW
5763 # The cast to long int works around a bug in the HP C Compiler
5764# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5765# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5766# This bug is HP SR number 8606223364.
5767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
5768$as_echo_n "checking size of long... " >&6; }
5769if test "${ac_cv_sizeof_long+set}" = set; then :
5770 $as_echo_n "(cached) " >&6
c0993dbe 5771else
81ecdfbb 5772 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
c0993dbe 5773
81ecdfbb
RW
5774else
5775 if test "$ac_cv_type_long" = yes; then
5776 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5777$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5778{ as_fn_set_status 77
5779as_fn_error "cannot compute sizeof (long)
5780See \`config.log' for more details." "$LINENO" 5; }; }
5781 else
5782 ac_cv_sizeof_long=0
5783 fi
c0993dbe 5784fi
81ecdfbb 5785
c0993dbe 5786fi
81ecdfbb
RW
5787{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
5788$as_echo "$ac_cv_sizeof_long" >&6; }
c0993dbe 5789
c0993dbe 5790
c0993dbe 5791
c0993dbe
UW
5792cat >>confdefs.h <<_ACEOF
5793#define SIZEOF_LONG $ac_cv_sizeof_long
5794_ACEOF
5795
5796
5797 if test "x${ac_cv_sizeof_long}" = "x8"; then
5798 want64=true
5799 fi
5800 fi
5801 if test x${want64} = xtrue; then
5802 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
5803 else
5804 TARGET_OBS='$(ALL_TARGET_OBS)'
5805 fi
5806fi
5807
5808
5809
b292c783 5810
c0993dbe
UW
5811# For other settings, only the main target counts.
5812gdb_sim=
5813gdb_osabi=
5814build_gdbserver=
5815targ=$target; . ${srcdir}/configure.tgt
5816
5817# Fetch the default architecture and default target vector from BFD.
5818targ=$target; . $srcdir/../bfd/config.bfd
5819
5820# We only want the first architecture, so strip off the others if
5821# there is more than one.
5822targ_archs=`echo $targ_archs | sed 's/ .*//'`
5823
5824if test "x$targ_archs" != x; then
5825
5826cat >>confdefs.h <<_ACEOF
5827#define DEFAULT_BFD_ARCH $targ_archs
5828_ACEOF
5829
5830fi
5831if test "x$targ_defvec" != x; then
5832
5833cat >>confdefs.h <<_ACEOF
5834#define DEFAULT_BFD_VEC $targ_defvec
5835_ACEOF
5836
5837fi
5838
c0993dbe
UW
5839# The CLI cannot be disabled yet, but may be in the future.
5840
5841# Enable CLI.
81ecdfbb
RW
5842# Check whether --enable-gdbcli was given.
5843if test "${enable_gdbcli+set}" = set; then :
5844 enableval=$enable_gdbcli; case $enableval in
c0993dbe
UW
5845 yes)
5846 ;;
5847 no)
81ecdfbb 5848 as_fn_error "the command-line interface cannot be disabled yet" "$LINENO" 5 ;;
c0993dbe 5849 *)
81ecdfbb 5850 as_fn_error "bad value $enableval for --enable-gdbcli" "$LINENO" 5 ;;
c0993dbe
UW
5851 esac
5852else
5853 enable_gdbcli=yes
81ecdfbb
RW
5854fi
5855
c0993dbe
UW
5856if test x"$enable_gdbcli" = xyes; then
5857 if test -d $srcdir/cli; then
5858 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
5859 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
5860 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
5861 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
5862 fi
5863fi
5864
5865# Enable MI.
81ecdfbb
RW
5866# Check whether --enable-gdbmi was given.
5867if test "${enable_gdbmi+set}" = set; then :
5868 enableval=$enable_gdbmi; case $enableval in
c0993dbe
UW
5869 yes | no)
5870 ;;
5871 *)
81ecdfbb 5872 as_fn_error "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
c0993dbe
UW
5873 esac
5874else
5875 enable_gdbmi=yes
81ecdfbb
RW
5876fi
5877
c0993dbe
UW
5878if test x"$enable_gdbmi" = xyes; then
5879 if test -d $srcdir/mi; then
5880 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
5881 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
5882 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
5883 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
5884 fi
5885fi
5886
5887# Enable TUI.
81ecdfbb
RW
5888# Check whether --enable-tui was given.
5889if test "${enable_tui+set}" = set; then :
5890 enableval=$enable_tui; case $enableval in
3ca64bd3 5891 yes | no | auto)
c0993dbe
UW
5892 ;;
5893 *)
81ecdfbb 5894 as_fn_error "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
c0993dbe
UW
5895 esac
5896else
3ca64bd3 5897 enable_tui=auto
81ecdfbb
RW
5898fi
5899
c0993dbe
UW
5900
5901# Enable gdbtk.
81ecdfbb
RW
5902# Check whether --enable-gdbtk was given.
5903if test "${enable_gdbtk+set}" = set; then :
5904 enableval=$enable_gdbtk; case $enableval in
c0993dbe
UW
5905 yes | no)
5906 ;;
5907 *)
81ecdfbb 5908 as_fn_error "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
c0993dbe
UW
5909 esac
5910else
5062cc19 5911 if test -d $srcdir/gdbtk; then
c0993dbe
UW
5912 enable_gdbtk=yes
5913 else
5914 enable_gdbtk=no
5915 fi
81ecdfbb
RW
5916fi
5917
c0993dbe
UW
5918# We unconditionally disable gdbtk tests on selected platforms.
5919case $host_os in
5920 go32* | windows*)
81ecdfbb
RW
5921 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
5922$as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
c0993dbe
UW
5923 enable_gdbtk=no ;;
5924esac
5925
05e7c244 5926# Libunwind support for ia64.
bec39cab 5927
05e7c244
JK
5928
5929# Check whether --with-libunwind-ia64 was given.
5930if test "${with_libunwind_ia64+set}" = set; then :
5931 withval=$with_libunwind_ia64;
bec39cab 5932else
05e7c244
JK
5933 with_libunwind_ia64=auto
5934fi
bec39cab 5935
05e7c244
JK
5936
5937# Backward compatibility option.
5938if test "${with_libunwind+set}" = set; then
5939 if test x"$with_libunwind_ia64" != xauto; then
5940 as_fn_error "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5
5941 fi
5942 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5
5943$as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;}
5944 with_libunwind_ia64="$with_libunwind"
5945fi
5946
5947case "$with_libunwind_ia64" in
5948 yes | no)
5949 ;;
5950 auto)
5951 for ac_header in libunwind-ia64.h
81ecdfbb 5952do :
b54a8fd7
PA
5953 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
5954if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
bec39cab 5955 cat >>confdefs.h <<_ACEOF
b54a8fd7 5956#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
5957_ACEOF
5958
5959fi
5960
5961done
5962
05e7c244
JK
5963 with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h
5964 ;;
5965 *)
5966 as_fn_error "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5
5967 ;;
5968esac
bec39cab 5969
05e7c244 5970if test x"$with_libunwind_ia64" = xyes; then
b54a8fd7 5971 for ac_header in libunwind-ia64.h
81ecdfbb 5972do :
b54a8fd7
PA
5973 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
5974if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
bec39cab 5975 cat >>confdefs.h <<_ACEOF
b54a8fd7 5976#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
5977_ACEOF
5978
5979fi
5980
5981done
5982
05e7c244
JK
5983 if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then
5984 as_fn_error "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5
5985 fi
5986 CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o"
5987 CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o"
5988 CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c"
a9322a30
TT
5989fi
5990
cb01cfba
JB
5991opt_curses=no
5992
81ecdfbb
RW
5993# Check whether --with-curses was given.
5994if test "${with_curses+set}" = set; then :
5995 withval=$with_curses; opt_curses=$withval
5996fi
5997
cb01cfba 5998
76a39ba7 5999prefer_curses=no
cb01cfba 6000if test "$opt_curses" = "yes"; then
76a39ba7 6001 prefer_curses=yes
cb01cfba
JB
6002fi
6003
a9322a30 6004# Profiling support.
81ecdfbb
RW
6005# Check whether --enable-profiling was given.
6006if test "${enable_profiling+set}" = set; then :
6007 enableval=$enable_profiling; case $enableval in
a9322a30
TT
6008 yes | no)
6009 ;;
6010 *)
81ecdfbb 6011 as_fn_error "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
a9322a30
TT
6012 esac
6013else
6014 enable_profiling=no
81ecdfbb 6015fi
bec39cab 6016
a9322a30
TT
6017
6018for ac_func in monstartup _mcleanup
81ecdfbb
RW
6019do :
6020 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6021ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
6022eval as_val=\$$as_ac_var
6023 if test "x$as_val" = x""yes; then :
6024 cat >>confdefs.h <<_ACEOF
6025#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 6026_ACEOF
a9322a30 6027
81ecdfbb
RW
6028fi
6029done
a9322a30 6030
81ecdfbb
RW
6031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
6032$as_echo_n "checking for _etext... " >&6; }
6033if test "${ac_cv_var__etext+set}" = set; then :
6034 $as_echo_n "(cached) " >&6
6035else
6036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6037/* end confdefs.h. */
6038#include <stdlib.h>
6039extern char _etext;
a9322a30
TT
6040
6041int
6042main ()
6043{
6044free (&_etext);
6045 ;
6046 return 0;
6047}
bec39cab 6048_ACEOF
81ecdfbb 6049if ac_fn_c_try_link "$LINENO"; then :
a9322a30 6050 ac_cv_var__etext=yes
bec39cab 6051else
81ecdfbb 6052 ac_cv_var__etext=no
bec39cab 6053fi
81ecdfbb
RW
6054rm -f core conftest.err conftest.$ac_objext \
6055 conftest$ac_exeext conftest.$ac_ext
bec39cab 6056fi
81ecdfbb
RW
6057{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
6058$as_echo "$ac_cv_var__etext" >&6; }
a9322a30 6059if test $ac_cv_var__etext = yes; then
60ca704f 6060
81ecdfbb 6061$as_echo "#define HAVE__ETEXT 1" >>confdefs.h
bec39cab 6062
bec39cab 6063fi
81ecdfbb
RW
6064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
6065$as_echo_n "checking for etext... " >&6; }
6066if test "${ac_cv_var_etext+set}" = set; then :
6067 $as_echo_n "(cached) " >&6
bec39cab 6068else
81ecdfbb 6069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6070/* end confdefs.h. */
a9322a30
TT
6071#include <stdlib.h>
6072extern char etext;
bec39cab
AC
6073
6074int
6075main ()
6076{
a9322a30 6077free (&etext);
bec39cab
AC
6078 ;
6079 return 0;
6080}
6081_ACEOF
81ecdfbb 6082if ac_fn_c_try_link "$LINENO"; then :
a9322a30 6083 ac_cv_var_etext=yes
bec39cab 6084else
81ecdfbb 6085 ac_cv_var_etext=no
bec39cab 6086fi
81ecdfbb
RW
6087rm -f core conftest.err conftest.$ac_objext \
6088 conftest$ac_exeext conftest.$ac_ext
bec39cab 6089fi
81ecdfbb
RW
6090{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
6091$as_echo "$ac_cv_var_etext" >&6; }
a9322a30
TT
6092if test $ac_cv_var_etext = yes; then
6093
81ecdfbb 6094$as_echo "#define HAVE_ETEXT 1" >>confdefs.h
bec39cab
AC
6095
6096fi
a9322a30
TT
6097if test "$enable_profiling" = yes ; then
6098 if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
81ecdfbb 6099 as_fn_error "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
a9322a30
TT
6100 fi
6101 PROFILE_CFLAGS=-pg
6102 OLD_CFLAGS="$CFLAGS"
6103 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
bec39cab 6104
81ecdfbb
RW
6105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
6106$as_echo_n "checking whether $CC supports -pg... " >&6; }
6107if test "${ac_cv_cc_supports_pg+set}" = set; then :
6108 $as_echo_n "(cached) " >&6
bec39cab 6109else
81ecdfbb 6110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6111/* end confdefs.h. */
bec39cab
AC
6112
6113int
6114main ()
6115{
a9322a30 6116int x;
bec39cab
AC
6117 ;
6118 return 0;
6119}
6120_ACEOF
81ecdfbb 6121if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 6122 ac_cv_cc_supports_pg=yes
bec39cab 6123else
81ecdfbb 6124 ac_cv_cc_supports_pg=no
bec39cab 6125fi
81ecdfbb 6126rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 6127fi
81ecdfbb
RW
6128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
6129$as_echo "$ac_cv_cc_supports_pg" >&6; }
bec39cab 6130
a9322a30 6131 if test $ac_cv_cc_supports_pg = no; then
81ecdfbb 6132 as_fn_error "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
a9322a30 6133 fi
bec39cab 6134
a9322a30 6135 CFLAGS="$OLD_CFLAGS"
bec39cab
AC
6136fi
6137
c16158bc
JM
6138
6139
81ecdfbb
RW
6140# Check whether --with-pkgversion was given.
6141if test "${with_pkgversion+set}" = set; then :
6142 withval=$with_pkgversion; case "$withval" in
6143 yes) as_fn_error "package version not specified" "$LINENO" 5 ;;
c16158bc
JM
6144 no) PKGVERSION= ;;
6145 *) PKGVERSION="($withval) " ;;
6146 esac
6147else
6148 PKGVERSION="(GDB) "
6149
81ecdfbb 6150fi
c16158bc
JM
6151
6152
6153
6154
81ecdfbb
RW
6155
6156# Check whether --with-bugurl was given.
6157if test "${with_bugurl+set}" = set; then :
6158 withval=$with_bugurl; case "$withval" in
6159 yes) as_fn_error "bug URL not specified" "$LINENO" 5 ;;
c16158bc
JM
6160 no) BUGURL=
6161 ;;
6162 *) BUGURL="$withval"
6163 ;;
6164 esac
6165else
6166 BUGURL="http://www.gnu.org/software/gdb/bugs/"
6167
81ecdfbb
RW
6168fi
6169
c16158bc
JM
6170 case ${BUGURL} in
6171 "")
6172 REPORT_BUGS_TO=
6173 REPORT_BUGS_TEXI=
6174 ;;
6175 *)
6176 REPORT_BUGS_TO="<$BUGURL>"
6177 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
6178 ;;
6179 esac;
6180
6181
6182
6183
6184cat >>confdefs.h <<_ACEOF
6185#define PKGVERSION "$PKGVERSION"
6186_ACEOF
6187
6188
6189cat >>confdefs.h <<_ACEOF
6190#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
6191_ACEOF
6192
6193
bec39cab
AC
6194# --------------------- #
6195# Checks for programs. #
6196# --------------------- #
6197
6198for ac_prog in gawk mawk nawk awk
6199do
6200 # Extract the first word of "$ac_prog", so it can be a program name with args.
6201set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
6202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6203$as_echo_n "checking for $ac_word... " >&6; }
6204if test "${ac_cv_prog_AWK+set}" = set; then :
6205 $as_echo_n "(cached) " >&6
bec39cab
AC
6206else
6207 if test -n "$AWK"; then
6208 ac_cv_prog_AWK="$AWK" # Let the user override the test.
6209else
6210as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6211for as_dir in $PATH
6212do
6213 IFS=$as_save_IFS
6214 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6215 for ac_exec_ext in '' $ac_executable_extensions; do
6216 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6217 ac_cv_prog_AWK="$ac_prog"
81ecdfbb 6218 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6219 break 2
6220 fi
6221done
81ecdfbb
RW
6222 done
6223IFS=$as_save_IFS
bec39cab
AC
6224
6225fi
6226fi
6227AWK=$ac_cv_prog_AWK
6228if test -n "$AWK"; then
81ecdfbb
RW
6229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
6230$as_echo "$AWK" >&6; }
bec39cab 6231else
81ecdfbb
RW
6232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6233$as_echo "no" >&6; }
bec39cab
AC
6234fi
6235
bec39cab 6236
81ecdfbb 6237 test -n "$AWK" && break
bec39cab
AC
6238done
6239
c971b7fa
PA
6240# Find a good install program. We prefer a C program (faster),
6241# so one script is as good as another. But avoid the broken or
6242# incompatible versions:
6243# SysV /etc/install, /usr/sbin/install
6244# SunOS /usr/etc/install
6245# IRIX /sbin/install
6246# AIX /bin/install
6247# AmigaOS /C/install, which installs bootblocks on floppy discs
6248# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6249# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6250# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6251# OS/2's system install, which has a completely different semantic
6252# ./install, which can be erroneously created by make from ./install.sh.
6253# Reject install programs that cannot install multiple files.
6254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6255$as_echo_n "checking for a BSD-compatible install... " >&6; }
6256if test -z "$INSTALL"; then
6257if test "${ac_cv_path_install+set}" = set; then :
6258 $as_echo_n "(cached) " >&6
6259else
6260 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6261for as_dir in $PATH
6262do
6263 IFS=$as_save_IFS
6264 test -z "$as_dir" && as_dir=.
6265 # Account for people who put trailing slashes in PATH elements.
6266case $as_dir/ in #((
6267 ./ | .// | /[cC]/* | \
6268 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
6269 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
6270 /usr/ucb/* ) ;;
6271 *)
6272 # OSF1 and SCO ODT 3.0 have their own names for install.
6273 # Don't use installbsd from OSF since it installs stuff as root
6274 # by default.
6275 for ac_prog in ginstall scoinst install; do
6276 for ac_exec_ext in '' $ac_executable_extensions; do
6277 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
6278 if test $ac_prog = install &&
6279 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6280 # AIX install. It has an incompatible calling convention.
6281 :
6282 elif test $ac_prog = install &&
6283 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6284 # program-specific install script used by HP pwplus--don't use.
6285 :
6286 else
6287 rm -rf conftest.one conftest.two conftest.dir
6288 echo one > conftest.one
6289 echo two > conftest.two
6290 mkdir conftest.dir
6291 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6292 test -s conftest.one && test -s conftest.two &&
6293 test -s conftest.dir/conftest.one &&
6294 test -s conftest.dir/conftest.two
6295 then
6296 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6297 break 3
6298 fi
6299 fi
6300 fi
6301 done
6302 done
6303 ;;
6304esac
6305
6306 done
6307IFS=$as_save_IFS
6308
6309rm -rf conftest.one conftest.two conftest.dir
6310
6311fi
6312 if test "${ac_cv_path_install+set}" = set; then
6313 INSTALL=$ac_cv_path_install
6314 else
6315 # As a last resort, use the slow shell script. Don't cache a
6316 # value for INSTALL within a source directory, because that will
6317 # break other packages using the cache if that directory is
6318 # removed, or if the value is a relative name.
6319 INSTALL=$ac_install_sh
6320 fi
6321fi
6322{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6323$as_echo "$INSTALL" >&6; }
6324
6325# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6326# It thinks the first close brace ends the variable substitution.
6327test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6328
6329test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6330
6331test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
bec39cab 6332
81ecdfbb
RW
6333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
6334$as_echo_n "checking whether ln -s works... " >&6; }
bec39cab
AC
6335LN_S=$as_ln_s
6336if test "$LN_S" = "ln -s"; then
81ecdfbb
RW
6337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6338$as_echo "yes" >&6; }
bec39cab 6339else
81ecdfbb
RW
6340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
6341$as_echo "no, using $LN_S" >&6; }
bec39cab
AC
6342fi
6343
6344if test -n "$ac_tool_prefix"; then
6345 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6346set dummy ${ac_tool_prefix}ranlib; ac_word=$2
81ecdfbb
RW
6347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6348$as_echo_n "checking for $ac_word... " >&6; }
6349if test "${ac_cv_prog_RANLIB+set}" = set; then :
6350 $as_echo_n "(cached) " >&6
bec39cab
AC
6351else
6352 if test -n "$RANLIB"; then
6353 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6354else
6355as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6356for as_dir in $PATH
6357do
6358 IFS=$as_save_IFS
6359 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6360 for ac_exec_ext in '' $ac_executable_extensions; do
6361 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6362 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
81ecdfbb 6363 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6364 break 2
6365 fi
6366done
81ecdfbb
RW
6367 done
6368IFS=$as_save_IFS
bec39cab
AC
6369
6370fi
6371fi
6372RANLIB=$ac_cv_prog_RANLIB
6373if test -n "$RANLIB"; then
81ecdfbb
RW
6374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6375$as_echo "$RANLIB" >&6; }
bec39cab 6376else
81ecdfbb
RW
6377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6378$as_echo "no" >&6; }
bec39cab
AC
6379fi
6380
81ecdfbb 6381
bec39cab
AC
6382fi
6383if test -z "$ac_cv_prog_RANLIB"; then
6384 ac_ct_RANLIB=$RANLIB
6385 # Extract the first word of "ranlib", so it can be a program name with args.
6386set dummy ranlib; ac_word=$2
81ecdfbb
RW
6387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6388$as_echo_n "checking for $ac_word... " >&6; }
6389if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
6390 $as_echo_n "(cached) " >&6
bec39cab
AC
6391else
6392 if test -n "$ac_ct_RANLIB"; then
6393 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6394else
6395as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6396for as_dir in $PATH
6397do
6398 IFS=$as_save_IFS
6399 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6400 for ac_exec_ext in '' $ac_executable_extensions; do
6401 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6402 ac_cv_prog_ac_ct_RANLIB="ranlib"
81ecdfbb 6403 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6404 break 2
6405 fi
6406done
81ecdfbb
RW
6407 done
6408IFS=$as_save_IFS
bec39cab 6409
bec39cab
AC
6410fi
6411fi
6412ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6413if test -n "$ac_ct_RANLIB"; then
81ecdfbb
RW
6414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6415$as_echo "$ac_ct_RANLIB" >&6; }
bec39cab 6416else
81ecdfbb
RW
6417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6418$as_echo "no" >&6; }
bec39cab
AC
6419fi
6420
81ecdfbb
RW
6421 if test "x$ac_ct_RANLIB" = x; then
6422 RANLIB=":"
6423 else
6424 case $cross_compiling:$ac_tool_warned in
6425yes:)
6426{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6427$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6428ac_tool_warned=yes ;;
6429esac
6430 RANLIB=$ac_ct_RANLIB
6431 fi
bec39cab
AC
6432else
6433 RANLIB="$ac_cv_prog_RANLIB"
6434fi
6435
6436for ac_prog in 'bison -y' byacc
6437do
6438 # Extract the first word of "$ac_prog", so it can be a program name with args.
6439set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
6440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6441$as_echo_n "checking for $ac_word... " >&6; }
6442if test "${ac_cv_prog_YACC+set}" = set; then :
6443 $as_echo_n "(cached) " >&6
bec39cab
AC
6444else
6445 if test -n "$YACC"; then
6446 ac_cv_prog_YACC="$YACC" # Let the user override the test.
6447else
6448as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6449for as_dir in $PATH
6450do
6451 IFS=$as_save_IFS
6452 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6453 for ac_exec_ext in '' $ac_executable_extensions; do
6454 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6455 ac_cv_prog_YACC="$ac_prog"
81ecdfbb 6456 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6457 break 2
6458 fi
6459done
81ecdfbb
RW
6460 done
6461IFS=$as_save_IFS
bec39cab
AC
6462
6463fi
6464fi
6465YACC=$ac_cv_prog_YACC
6466if test -n "$YACC"; then
81ecdfbb
RW
6467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
6468$as_echo "$YACC" >&6; }
bec39cab 6469else
81ecdfbb
RW
6470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6471$as_echo "no" >&6; }
bec39cab
AC
6472fi
6473
81ecdfbb 6474
bec39cab
AC
6475 test -n "$YACC" && break
6476done
6477test -n "$YACC" || YACC="yacc"
6478
6479
6480if test -n "$ac_tool_prefix"; then
6481 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6482set dummy ${ac_tool_prefix}ar; ac_word=$2
81ecdfbb
RW
6483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6484$as_echo_n "checking for $ac_word... " >&6; }
6485if test "${ac_cv_prog_AR+set}" = set; then :
6486 $as_echo_n "(cached) " >&6
bec39cab
AC
6487else
6488 if test -n "$AR"; then
6489 ac_cv_prog_AR="$AR" # Let the user override the test.
6490else
6491as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6492for as_dir in $PATH
6493do
6494 IFS=$as_save_IFS
6495 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6496 for ac_exec_ext in '' $ac_executable_extensions; do
6497 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6498 ac_cv_prog_AR="${ac_tool_prefix}ar"
81ecdfbb 6499 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6500 break 2
6501 fi
6502done
81ecdfbb
RW
6503 done
6504IFS=$as_save_IFS
bec39cab
AC
6505
6506fi
6507fi
6508AR=$ac_cv_prog_AR
6509if test -n "$AR"; then
81ecdfbb
RW
6510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6511$as_echo "$AR" >&6; }
bec39cab 6512else
81ecdfbb
RW
6513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6514$as_echo "no" >&6; }
bec39cab
AC
6515fi
6516
81ecdfbb 6517
bec39cab
AC
6518fi
6519if test -z "$ac_cv_prog_AR"; then
6520 ac_ct_AR=$AR
6521 # Extract the first word of "ar", so it can be a program name with args.
6522set dummy ar; ac_word=$2
81ecdfbb
RW
6523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6524$as_echo_n "checking for $ac_word... " >&6; }
6525if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
6526 $as_echo_n "(cached) " >&6
bec39cab
AC
6527else
6528 if test -n "$ac_ct_AR"; then
6529 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6530else
6531as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6532for as_dir in $PATH
6533do
6534 IFS=$as_save_IFS
6535 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6536 for ac_exec_ext in '' $ac_executable_extensions; do
6537 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6538 ac_cv_prog_ac_ct_AR="ar"
81ecdfbb 6539 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6540 break 2
6541 fi
6542done
81ecdfbb
RW
6543 done
6544IFS=$as_save_IFS
bec39cab
AC
6545
6546fi
6547fi
6548ac_ct_AR=$ac_cv_prog_ac_ct_AR
6549if test -n "$ac_ct_AR"; then
81ecdfbb
RW
6550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6551$as_echo "$ac_ct_AR" >&6; }
bec39cab 6552else
81ecdfbb
RW
6553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6554$as_echo "no" >&6; }
bec39cab
AC
6555fi
6556
81ecdfbb
RW
6557 if test "x$ac_ct_AR" = x; then
6558 AR=""
6559 else
6560 case $cross_compiling:$ac_tool_warned in
6561yes:)
6562{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6563$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6564ac_tool_warned=yes ;;
6565esac
6566 AR=$ac_ct_AR
6567 fi
bec39cab
AC
6568else
6569 AR="$ac_cv_prog_AR"
6570fi
6571
6572if test -n "$ac_tool_prefix"; then
6573 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
6574set dummy ${ac_tool_prefix}dlltool; ac_word=$2
81ecdfbb
RW
6575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6576$as_echo_n "checking for $ac_word... " >&6; }
6577if test "${ac_cv_prog_DLLTOOL+set}" = set; then :
6578 $as_echo_n "(cached) " >&6
bec39cab
AC
6579else
6580 if test -n "$DLLTOOL"; then
6581 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
6582else
6583as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6584for as_dir in $PATH
6585do
6586 IFS=$as_save_IFS
6587 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6588 for ac_exec_ext in '' $ac_executable_extensions; do
6589 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6590 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
81ecdfbb 6591 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6592 break 2
6593 fi
6594done
81ecdfbb
RW
6595 done
6596IFS=$as_save_IFS
bec39cab
AC
6597
6598fi
6599fi
6600DLLTOOL=$ac_cv_prog_DLLTOOL
6601if test -n "$DLLTOOL"; then
81ecdfbb
RW
6602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
6603$as_echo "$DLLTOOL" >&6; }
bec39cab 6604else
81ecdfbb
RW
6605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6606$as_echo "no" >&6; }
bec39cab
AC
6607fi
6608
81ecdfbb 6609
bec39cab
AC
6610fi
6611if test -z "$ac_cv_prog_DLLTOOL"; then
6612 ac_ct_DLLTOOL=$DLLTOOL
6613 # Extract the first word of "dlltool", so it can be a program name with args.
6614set dummy dlltool; ac_word=$2
81ecdfbb
RW
6615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6616$as_echo_n "checking for $ac_word... " >&6; }
6617if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then :
6618 $as_echo_n "(cached) " >&6
bec39cab
AC
6619else
6620 if test -n "$ac_ct_DLLTOOL"; then
6621 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
6622else
6623as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6624for as_dir in $PATH
6625do
6626 IFS=$as_save_IFS
6627 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6628 for ac_exec_ext in '' $ac_executable_extensions; do
6629 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6630 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
81ecdfbb 6631 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6632 break 2
6633 fi
6634done
81ecdfbb
RW
6635 done
6636IFS=$as_save_IFS
bec39cab
AC
6637
6638fi
6639fi
6640ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
6641if test -n "$ac_ct_DLLTOOL"; then
81ecdfbb
RW
6642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
6643$as_echo "$ac_ct_DLLTOOL" >&6; }
bec39cab 6644else
81ecdfbb
RW
6645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6646$as_echo "no" >&6; }
bec39cab
AC
6647fi
6648
81ecdfbb
RW
6649 if test "x$ac_ct_DLLTOOL" = x; then
6650 DLLTOOL=""
6651 else
6652 case $cross_compiling:$ac_tool_warned in
6653yes:)
6654{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6655$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6656ac_tool_warned=yes ;;
6657esac
6658 DLLTOOL=$ac_ct_DLLTOOL
6659 fi
bec39cab
AC
6660else
6661 DLLTOOL="$ac_cv_prog_DLLTOOL"
6662fi
6663
6664if test -n "$ac_tool_prefix"; then
6665 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
6666set dummy ${ac_tool_prefix}windres; ac_word=$2
81ecdfbb
RW
6667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6668$as_echo_n "checking for $ac_word... " >&6; }
6669if test "${ac_cv_prog_WINDRES+set}" = set; then :
6670 $as_echo_n "(cached) " >&6
bec39cab
AC
6671else
6672 if test -n "$WINDRES"; then
6673 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
6674else
6675as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6676for as_dir in $PATH
6677do
6678 IFS=$as_save_IFS
6679 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6680 for ac_exec_ext in '' $ac_executable_extensions; do
6681 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6682 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
81ecdfbb 6683 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6684 break 2
6685 fi
6686done
81ecdfbb
RW
6687 done
6688IFS=$as_save_IFS
bec39cab
AC
6689
6690fi
6691fi
6692WINDRES=$ac_cv_prog_WINDRES
6693if test -n "$WINDRES"; then
81ecdfbb
RW
6694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
6695$as_echo "$WINDRES" >&6; }
bec39cab 6696else
81ecdfbb
RW
6697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6698$as_echo "no" >&6; }
bec39cab
AC
6699fi
6700
81ecdfbb 6701
bec39cab
AC
6702fi
6703if test -z "$ac_cv_prog_WINDRES"; then
6704 ac_ct_WINDRES=$WINDRES
6705 # Extract the first word of "windres", so it can be a program name with args.
6706set dummy windres; ac_word=$2
81ecdfbb
RW
6707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6708$as_echo_n "checking for $ac_word... " >&6; }
6709if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then :
6710 $as_echo_n "(cached) " >&6
bec39cab
AC
6711else
6712 if test -n "$ac_ct_WINDRES"; then
6713 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
6714else
6715as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6716for as_dir in $PATH
6717do
6718 IFS=$as_save_IFS
6719 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6720 for ac_exec_ext in '' $ac_executable_extensions; do
6721 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6722 ac_cv_prog_ac_ct_WINDRES="windres"
81ecdfbb 6723 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6724 break 2
6725 fi
6726done
81ecdfbb
RW
6727 done
6728IFS=$as_save_IFS
bec39cab
AC
6729
6730fi
6731fi
6732ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
6733if test -n "$ac_ct_WINDRES"; then
81ecdfbb
RW
6734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
6735$as_echo "$ac_ct_WINDRES" >&6; }
bec39cab 6736else
81ecdfbb
RW
6737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6738$as_echo "no" >&6; }
c906108c 6739fi
bec39cab 6740
81ecdfbb
RW
6741 if test "x$ac_ct_WINDRES" = x; then
6742 WINDRES=""
6743 else
6744 case $cross_compiling:$ac_tool_warned in
6745yes:)
6746{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6747$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6748ac_tool_warned=yes ;;
6749esac
6750 WINDRES=$ac_ct_WINDRES
6751 fi
c906108c 6752else
bec39cab 6753 WINDRES="$ac_cv_prog_WINDRES"
c906108c
SS
6754fi
6755
bec39cab 6756
036c3acb
TS
6757case $host_os in
6758 gnu*)
6759 # Needed for GNU Hurd hosts.
6760 if test -n "$ac_tool_prefix"; then
bec39cab
AC
6761 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
6762set dummy ${ac_tool_prefix}mig; ac_word=$2
81ecdfbb
RW
6763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6764$as_echo_n "checking for $ac_word... " >&6; }
6765if test "${ac_cv_prog_MIG+set}" = set; then :
6766 $as_echo_n "(cached) " >&6
c906108c 6767else
bec39cab
AC
6768 if test -n "$MIG"; then
6769 ac_cv_prog_MIG="$MIG" # Let the user override the test.
6770else
6771as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6772for as_dir in $PATH
6773do
6774 IFS=$as_save_IFS
6775 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6776 for ac_exec_ext in '' $ac_executable_extensions; do
6777 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6778 ac_cv_prog_MIG="${ac_tool_prefix}mig"
81ecdfbb 6779 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6780 break 2
6781 fi
6782done
81ecdfbb
RW
6783 done
6784IFS=$as_save_IFS
bec39cab 6785
c906108c 6786fi
bec39cab
AC
6787fi
6788MIG=$ac_cv_prog_MIG
6789if test -n "$MIG"; then
81ecdfbb
RW
6790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
6791$as_echo "$MIG" >&6; }
c906108c 6792else
81ecdfbb
RW
6793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6794$as_echo "no" >&6; }
c906108c
SS
6795fi
6796
81ecdfbb 6797
bec39cab
AC
6798fi
6799if test -z "$ac_cv_prog_MIG"; then
6800 ac_ct_MIG=$MIG
6801 # Extract the first word of "mig", so it can be a program name with args.
6802set dummy mig; ac_word=$2
81ecdfbb
RW
6803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6804$as_echo_n "checking for $ac_word... " >&6; }
6805if test "${ac_cv_prog_ac_ct_MIG+set}" = set; then :
6806 $as_echo_n "(cached) " >&6
bec39cab
AC
6807else
6808 if test -n "$ac_ct_MIG"; then
6809 ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
6810else
6811as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6812for as_dir in $PATH
6813do
6814 IFS=$as_save_IFS
6815 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6816 for ac_exec_ext in '' $ac_executable_extensions; do
6817 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6818 ac_cv_prog_ac_ct_MIG="mig"
81ecdfbb 6819 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6820 break 2
6821 fi
6822done
81ecdfbb
RW
6823 done
6824IFS=$as_save_IFS
c906108c 6825
bec39cab
AC
6826fi
6827fi
6828ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
6829if test -n "$ac_ct_MIG"; then
81ecdfbb
RW
6830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
6831$as_echo "$ac_ct_MIG" >&6; }
bec39cab 6832else
81ecdfbb
RW
6833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6834$as_echo "no" >&6; }
bec39cab 6835fi
c906108c 6836
81ecdfbb
RW
6837 if test "x$ac_ct_MIG" = x; then
6838 MIG=""
6839 else
6840 case $cross_compiling:$ac_tool_warned in
6841yes:)
6842{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6843$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6844ac_tool_warned=yes ;;
6845esac
6846 MIG=$ac_ct_MIG
6847 fi
bec39cab
AC
6848else
6849 MIG="$ac_cv_prog_MIG"
6850fi
c906108c 6851
036c3acb
TS
6852 if test x"$MIG" = x; then
6853 as_fn_error "MIG not found but required for $host hosts" "$LINENO" 5
6854 fi
6855 ;;
6856esac
c906108c 6857
bec39cab
AC
6858# ---------------------- #
6859# Checks for libraries. #
6860# ---------------------- #
c906108c 6861
bec39cab 6862# We might need to link with -lm; most simulators need it.
81ecdfbb
RW
6863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
6864$as_echo_n "checking for main in -lm... " >&6; }
6865if test "${ac_cv_lib_m_main+set}" = set; then :
6866 $as_echo_n "(cached) " >&6
bec39cab
AC
6867else
6868 ac_check_lib_save_LIBS=$LIBS
6869LIBS="-lm $LIBS"
81ecdfbb 6870cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6871/* end confdefs.h. */
c906108c 6872
c906108c 6873
bec39cab
AC
6874int
6875main ()
6876{
81ecdfbb 6877return main ();
bec39cab
AC
6878 ;
6879 return 0;
6880}
6881_ACEOF
81ecdfbb 6882if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
6883 ac_cv_lib_m_main=yes
6884else
81ecdfbb 6885 ac_cv_lib_m_main=no
bec39cab 6886fi
81ecdfbb
RW
6887rm -f core conftest.err conftest.$ac_objext \
6888 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
6889LIBS=$ac_check_lib_save_LIBS
6890fi
81ecdfbb
RW
6891{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
6892$as_echo "$ac_cv_lib_m_main" >&6; }
6893if test "x$ac_cv_lib_m_main" = x""yes; then :
bec39cab
AC
6894 cat >>confdefs.h <<_ACEOF
6895#define HAVE_LIBM 1
6896_ACEOF
6897
6898 LIBS="-lm $LIBS"
c906108c 6899
c906108c 6900fi
bec39cab
AC
6901
6902
6903# We need to link with -lw to get `wctype' on Solaris before Solaris
6904# 2.6. Solaris 2.6 and beyond have this function in libc, and have a
6905# libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
6906# is known to have this problem). Therefore we avoid libw if we can.
81ecdfbb
RW
6907ac_fn_c_check_func "$LINENO" "wctype" "ac_cv_func_wctype"
6908if test "x$ac_cv_func_wctype" = x""yes; then :
bec39cab 6909
c906108c 6910else
81ecdfbb
RW
6911 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype in -lw" >&5
6912$as_echo_n "checking for wctype in -lw... " >&6; }
6913if test "${ac_cv_lib_w_wctype+set}" = set; then :
6914 $as_echo_n "(cached) " >&6
bec39cab
AC
6915else
6916 ac_check_lib_save_LIBS=$LIBS
6917LIBS="-lw $LIBS"
81ecdfbb 6918cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6919/* end confdefs.h. */
c906108c 6920
81ecdfbb
RW
6921/* Override any GCC internal prototype to avoid an error.
6922 Use char because int might match the return type of a GCC
6923 builtin and then its argument prototype would still apply. */
bec39cab
AC
6924#ifdef __cplusplus
6925extern "C"
6926#endif
bec39cab
AC
6927char wctype ();
6928int
6929main ()
6930{
81ecdfbb 6931return wctype ();
bec39cab
AC
6932 ;
6933 return 0;
6934}
6935_ACEOF
81ecdfbb 6936if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
6937 ac_cv_lib_w_wctype=yes
6938else
81ecdfbb 6939 ac_cv_lib_w_wctype=no
bec39cab 6940fi
81ecdfbb
RW
6941rm -f core conftest.err conftest.$ac_objext \
6942 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
6943LIBS=$ac_check_lib_save_LIBS
6944fi
81ecdfbb
RW
6945{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_w_wctype" >&5
6946$as_echo "$ac_cv_lib_w_wctype" >&6; }
6947if test "x$ac_cv_lib_w_wctype" = x""yes; then :
bec39cab
AC
6948 cat >>confdefs.h <<_ACEOF
6949#define HAVE_LIBW 1
6950_ACEOF
c906108c 6951
bec39cab 6952 LIBS="-lw $LIBS"
c906108c 6953
bec39cab 6954fi
c906108c 6955
bec39cab 6956fi
c906108c 6957
ddc9cd0f 6958
bec39cab 6959# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
81ecdfbb
RW
6960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
6961$as_echo_n "checking for library containing gethostbyname... " >&6; }
6962if test "${ac_cv_search_gethostbyname+set}" = set; then :
6963 $as_echo_n "(cached) " >&6
bec39cab
AC
6964else
6965 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6966cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6967/* end confdefs.h. */
ddc9cd0f 6968
81ecdfbb
RW
6969/* Override any GCC internal prototype to avoid an error.
6970 Use char because int might match the return type of a GCC
6971 builtin and then its argument prototype would still apply. */
bec39cab
AC
6972#ifdef __cplusplus
6973extern "C"
6974#endif
bec39cab
AC
6975char gethostbyname ();
6976int
6977main ()
6978{
81ecdfbb 6979return gethostbyname ();
bec39cab
AC
6980 ;
6981 return 0;
6982}
6983_ACEOF
81ecdfbb
RW
6984for ac_lib in '' nsl; do
6985 if test -z "$ac_lib"; then
6986 ac_res="none required"
6987 else
6988 ac_res=-l$ac_lib
b4e70030 6989 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
6990 fi
6991 if ac_fn_c_try_link "$LINENO"; then :
6992 ac_cv_search_gethostbyname=$ac_res
6993fi
6994rm -f core conftest.err conftest.$ac_objext \
6995 conftest$ac_exeext
6996 if test "${ac_cv_search_gethostbyname+set}" = set; then :
6997 break
6998fi
6999done
7000if test "${ac_cv_search_gethostbyname+set}" = set; then :
ddc9cd0f 7001
bec39cab 7002else
81ecdfbb 7003 ac_cv_search_gethostbyname=no
bec39cab 7004fi
81ecdfbb 7005rm conftest.$ac_ext
bec39cab
AC
7006LIBS=$ac_func_search_save_LIBS
7007fi
81ecdfbb
RW
7008{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
7009$as_echo "$ac_cv_search_gethostbyname" >&6; }
7010ac_res=$ac_cv_search_gethostbyname
7011if test "$ac_res" != no; then :
7012 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
96baa820 7013
bec39cab 7014fi
96baa820 7015
c906108c 7016
b4e70030 7017# Some systems (e.g. Solaris) have `socketpair' in libsocket.
81ecdfbb
RW
7018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
7019$as_echo_n "checking for library containing socketpair... " >&6; }
7020if test "${ac_cv_search_socketpair+set}" = set; then :
7021 $as_echo_n "(cached) " >&6
b4e70030
JB
7022else
7023 ac_func_search_save_LIBS=$LIBS
81ecdfbb 7024cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
7025/* end confdefs.h. */
7026
81ecdfbb
RW
7027/* Override any GCC internal prototype to avoid an error.
7028 Use char because int might match the return type of a GCC
7029 builtin and then its argument prototype would still apply. */
b4e70030
JB
7030#ifdef __cplusplus
7031extern "C"
7032#endif
b4e70030
JB
7033char socketpair ();
7034int
7035main ()
7036{
81ecdfbb 7037return socketpair ();
b4e70030
JB
7038 ;
7039 return 0;
7040}
7041_ACEOF
81ecdfbb
RW
7042for ac_lib in '' socket; do
7043 if test -z "$ac_lib"; then
7044 ac_res="none required"
7045 else
7046 ac_res=-l$ac_lib
b4e70030 7047 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
7048 fi
7049 if ac_fn_c_try_link "$LINENO"; then :
7050 ac_cv_search_socketpair=$ac_res
7051fi
7052rm -f core conftest.err conftest.$ac_objext \
7053 conftest$ac_exeext
7054 if test "${ac_cv_search_socketpair+set}" = set; then :
7055 break
7056fi
7057done
7058if test "${ac_cv_search_socketpair+set}" = set; then :
b4e70030 7059
b4e70030 7060else
81ecdfbb 7061 ac_cv_search_socketpair=no
b4e70030 7062fi
81ecdfbb 7063rm conftest.$ac_ext
b4e70030
JB
7064LIBS=$ac_func_search_save_LIBS
7065fi
81ecdfbb
RW
7066{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
7067$as_echo "$ac_cv_search_socketpair" >&6; }
7068ac_res=$ac_cv_search_socketpair
7069if test "$ac_res" != no; then :
7070 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
b4e70030
JB
7071
7072fi
7073
7074
233a11ab 7075# Link in zlib if we can. This allows us to read compressed debug sections.
b040ad30 7076
711a72d3 7077 # Use the system's zlib library.
39f3de7c
L
7078 zlibdir="-L\$(top_builddir)/../zlib"
7079 zlibinc="-I\$(top_srcdir)/../zlib"
b040ad30 7080
711a72d3
L
7081# Check whether --with-system-zlib was given.
7082if test "${with_system_zlib+set}" = set; then :
afa59b79
L
7083 withval=$with_system_zlib; if test x$with_system_zlib = xyes ; then
7084 zlibdir=
7085 zlibinc=
7086 fi
b040ad30 7087
233a11ab 7088fi
233a11ab 7089
233a11ab 7090
233a11ab 7091
b040ad30 7092
233a11ab 7093
25268153
JB
7094# On FreeBSD we may need libutil for kinfo_getvmmap (used by fbsd-nat.c).
7095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getvmmap" >&5
7096$as_echo_n "checking for library containing kinfo_getvmmap... " >&6; }
7097if test "${ac_cv_search_kinfo_getvmmap+set}" = set; then :
7098 $as_echo_n "(cached) " >&6
7099else
7100 ac_func_search_save_LIBS=$LIBS
7101cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7102/* end confdefs.h. */
7103
7104/* Override any GCC internal prototype to avoid an error.
7105 Use char because int might match the return type of a GCC
7106 builtin and then its argument prototype would still apply. */
7107#ifdef __cplusplus
7108extern "C"
7109#endif
7110char kinfo_getvmmap ();
7111int
7112main ()
7113{
7114return kinfo_getvmmap ();
7115 ;
7116 return 0;
7117}
7118_ACEOF
7119for ac_lib in '' util; do
7120 if test -z "$ac_lib"; then
7121 ac_res="none required"
7122 else
7123 ac_res=-l$ac_lib
7124 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7125 fi
7126 if ac_fn_c_try_link "$LINENO"; then :
7127 ac_cv_search_kinfo_getvmmap=$ac_res
7128fi
7129rm -f core conftest.err conftest.$ac_objext \
7130 conftest$ac_exeext
7131 if test "${ac_cv_search_kinfo_getvmmap+set}" = set; then :
7132 break
7133fi
7134done
7135if test "${ac_cv_search_kinfo_getvmmap+set}" = set; then :
7136
7137else
7138 ac_cv_search_kinfo_getvmmap=no
7139fi
7140rm conftest.$ac_ext
7141LIBS=$ac_func_search_save_LIBS
7142fi
7143{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getvmmap" >&5
7144$as_echo "$ac_cv_search_kinfo_getvmmap" >&6; }
7145ac_res=$ac_cv_search_kinfo_getvmmap
7146if test "$ac_res" != no; then :
7147 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7148
7149$as_echo "#define HAVE_KINFO_GETVMMAP 1" >>confdefs.h
7150
7151fi
7152
7153
77f120bf 7154
016a3251
DD
7155 if test "X$prefix" = "XNONE"; then
7156 acl_final_prefix="$ac_default_prefix"
7157 else
7158 acl_final_prefix="$prefix"
7159 fi
7160 if test "X$exec_prefix" = "XNONE"; then
7161 acl_final_exec_prefix='${prefix}'
7162 else
7163 acl_final_exec_prefix="$exec_prefix"
7164 fi
7165 acl_save_prefix="$prefix"
7166 prefix="$acl_final_prefix"
7167 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
7168 prefix="$acl_save_prefix"
7169
7170
7171# Check whether --with-gnu-ld was given.
7172if test "${with_gnu_ld+set}" = set; then :
7173 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
7174else
7175 with_gnu_ld=no
7176fi
7177
7178# Prepare PATH_SEPARATOR.
7179# The user is always right.
7180if test "${PATH_SEPARATOR+set}" != set; then
7181 echo "#! /bin/sh" >conf$$.sh
7182 echo "exit 0" >>conf$$.sh
7183 chmod +x conf$$.sh
7184 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
7185 PATH_SEPARATOR=';'
7186 else
7187 PATH_SEPARATOR=:
7188 fi
7189 rm -f conf$$.sh
7190fi
7191ac_prog=ld
7192if test "$GCC" = yes; then
7193 # Check if gcc -print-prog-name=ld gives a path.
7194 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
7195$as_echo_n "checking for ld used by GCC... " >&6; }
7196 case $host in
7197 *-*-mingw*)
7198 # gcc leaves a trailing carriage return which upsets mingw
7199 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
7200 *)
7201 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
7202 esac
7203 case $ac_prog in
7204 # Accept absolute paths.
7205 [\\/]* | [A-Za-z]:[\\/]*)
7206 re_direlt='/[^/][^/]*/\.\./'
7207 # Canonicalize the path of ld
7208 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
7209 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
7210 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
7211 done
7212 test -z "$LD" && LD="$ac_prog"
7213 ;;
7214 "")
7215 # If it fails, then pretend we aren't using GCC.
7216 ac_prog=ld
7217 ;;
7218 *)
7219 # If it is relative, then search for the first ld in PATH.
7220 with_gnu_ld=unknown
7221 ;;
7222 esac
7223elif test "$with_gnu_ld" = yes; then
7224 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
7225$as_echo_n "checking for GNU ld... " >&6; }
7226else
7227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
7228$as_echo_n "checking for non-GNU ld... " >&6; }
7229fi
7230if test "${acl_cv_path_LD+set}" = set; then :
7231 $as_echo_n "(cached) " >&6
7232else
7233 if test -z "$LD"; then
7234 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
7235 for ac_dir in $PATH; do
7236 test -z "$ac_dir" && ac_dir=.
7237 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
7238 acl_cv_path_LD="$ac_dir/$ac_prog"
7239 # Check to see if the program is GNU ld. I'd rather use --version,
7240 # but apparently some GNU ld's only accept -v.
7241 # Break only if it was the GNU/non-GNU ld that we prefer.
7242 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
7243 test "$with_gnu_ld" != no && break
7244 else
7245 test "$with_gnu_ld" != yes && break
7246 fi
7247 fi
7248 done
7249 IFS="$ac_save_ifs"
7250else
7251 acl_cv_path_LD="$LD" # Let the user override the test with a path.
7252fi
7253fi
7254
7255LD="$acl_cv_path_LD"
7256if test -n "$LD"; then
7257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
7258$as_echo "$LD" >&6; }
7259else
7260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7261$as_echo "no" >&6; }
7262fi
7263test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
7264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
7265$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
7266if test "${acl_cv_prog_gnu_ld+set}" = set; then :
7267 $as_echo_n "(cached) " >&6
7268else
7269 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
7270if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
7271 acl_cv_prog_gnu_ld=yes
7272else
7273 acl_cv_prog_gnu_ld=no
7274fi
7275fi
7276{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
7277$as_echo "$acl_cv_prog_gnu_ld" >&6; }
7278with_gnu_ld=$acl_cv_prog_gnu_ld
7279
7280
7281
7282 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
7283$as_echo_n "checking for shared library run path origin... " >&6; }
7284if test "${acl_cv_rpath+set}" = set; then :
7285 $as_echo_n "(cached) " >&6
7286else
7287
7288 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
7289 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
7290 . ./conftest.sh
7291 rm -f ./conftest.sh
7292 acl_cv_rpath=done
7293
7294fi
7295{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
7296$as_echo "$acl_cv_rpath" >&6; }
7297 wl="$acl_cv_wl"
7298 libext="$acl_cv_libext"
7299 shlibext="$acl_cv_shlibext"
7300 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
7301 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
7302 hardcode_direct="$acl_cv_hardcode_direct"
7303 hardcode_minus_L="$acl_cv_hardcode_minus_L"
7304 # Check whether --enable-rpath was given.
7305if test "${enable_rpath+set}" = set; then :
7306 enableval=$enable_rpath; :
7307else
7308 enable_rpath=yes
7309fi
7310
7311
7312
7313
7314
7315
7316
7317
7318 use_additional=yes
7319
7320 acl_save_prefix="$prefix"
7321 prefix="$acl_final_prefix"
7322 acl_save_exec_prefix="$exec_prefix"
7323 exec_prefix="$acl_final_exec_prefix"
7324
7325 eval additional_includedir=\"$includedir\"
7326 eval additional_libdir=\"$libdir\"
7327
7328 exec_prefix="$acl_save_exec_prefix"
7329 prefix="$acl_save_prefix"
77f120bf 7330
6c7a06a3 7331
81ecdfbb
RW
7332# Check whether --with-libiconv-prefix was given.
7333if test "${with_libiconv_prefix+set}" = set; then :
7334 withval=$with_libiconv_prefix;
016a3251
DD
7335 if test "X$withval" = "Xno"; then
7336 use_additional=no
7337 else
7338 if test "X$withval" = "X"; then
7339
7340 acl_save_prefix="$prefix"
7341 prefix="$acl_final_prefix"
7342 acl_save_exec_prefix="$exec_prefix"
7343 exec_prefix="$acl_final_exec_prefix"
7344
7345 eval additional_includedir=\"$includedir\"
7346 eval additional_libdir=\"$libdir\"
7347
7348 exec_prefix="$acl_save_exec_prefix"
7349 prefix="$acl_save_prefix"
7350
7351 else
7352 additional_includedir="$withval/include"
7353 additional_libdir="$withval/lib"
7354 fi
7355 fi
6c7a06a3 7356
81ecdfbb
RW
7357fi
7358
016a3251
DD
7359 LIBICONV=
7360 LTLIBICONV=
7361 INCICONV=
7362 rpathdirs=
7363 ltrpathdirs=
7364 names_already_handled=
7365 names_next_round='iconv '
7366 while test -n "$names_next_round"; do
7367 names_this_round="$names_next_round"
7368 names_next_round=
7369 for name in $names_this_round; do
7370 already_handled=
7371 for n in $names_already_handled; do
7372 if test "$n" = "$name"; then
7373 already_handled=yes
7374 break
7375 fi
7376 done
7377 if test -z "$already_handled"; then
7378 names_already_handled="$names_already_handled $name"
7379 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
7380 eval value=\"\$HAVE_LIB$uppername\"
7381 if test -n "$value"; then
7382 if test "$value" = yes; then
7383 eval value=\"\$LIB$uppername\"
7384 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
7385 eval value=\"\$LTLIB$uppername\"
7386 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
7387 else
7388 :
7389 fi
7390 else
7391 found_dir=
7392 found_la=
7393 found_so=
7394 found_a=
7395 if test $use_additional = yes; then
7396 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
7397 found_dir="$additional_libdir"
7398 found_so="$additional_libdir/lib$name.$shlibext"
7399 if test -f "$additional_libdir/lib$name.la"; then
7400 found_la="$additional_libdir/lib$name.la"
7401 fi
7402 else
7403 if test -f "$additional_libdir/lib$name.$libext"; then
7404 found_dir="$additional_libdir"
7405 found_a="$additional_libdir/lib$name.$libext"
7406 if test -f "$additional_libdir/lib$name.la"; then
7407 found_la="$additional_libdir/lib$name.la"
7408 fi
7409 fi
7410 fi
7411 fi
7412 if test "X$found_dir" = "X"; then
7413 for x in $LDFLAGS $LTLIBICONV; do
7414
7415 acl_save_prefix="$prefix"
7416 prefix="$acl_final_prefix"
7417 acl_save_exec_prefix="$exec_prefix"
7418 exec_prefix="$acl_final_exec_prefix"
7419 eval x=\"$x\"
7420 exec_prefix="$acl_save_exec_prefix"
7421 prefix="$acl_save_prefix"
7422
7423 case "$x" in
7424 -L*)
7425 dir=`echo "X$x" | sed -e 's/^X-L//'`
7426 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
7427 found_dir="$dir"
7428 found_so="$dir/lib$name.$shlibext"
7429 if test -f "$dir/lib$name.la"; then
7430 found_la="$dir/lib$name.la"
7431 fi
7432 else
7433 if test -f "$dir/lib$name.$libext"; then
7434 found_dir="$dir"
7435 found_a="$dir/lib$name.$libext"
7436 if test -f "$dir/lib$name.la"; then
7437 found_la="$dir/lib$name.la"
7438 fi
7439 fi
7440 fi
7441 ;;
7442 esac
7443 if test "X$found_dir" != "X"; then
7444 break
7445 fi
7446 done
7447 fi
7448 if test "X$found_dir" != "X"; then
7449 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
7450 if test "X$found_so" != "X"; then
7451 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
7452 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
7453 else
7454 haveit=
7455 for x in $ltrpathdirs; do
7456 if test "X$x" = "X$found_dir"; then
7457 haveit=yes
7458 break
7459 fi
7460 done
7461 if test -z "$haveit"; then
7462 ltrpathdirs="$ltrpathdirs $found_dir"
7463 fi
7464 if test "$hardcode_direct" = yes; then
7465 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
7466 else
7467 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
7468 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
7469 haveit=
7470 for x in $rpathdirs; do
7471 if test "X$x" = "X$found_dir"; then
7472 haveit=yes
7473 break
7474 fi
7475 done
7476 if test -z "$haveit"; then
7477 rpathdirs="$rpathdirs $found_dir"
7478 fi
7479 else
7480 haveit=
7481 for x in $LDFLAGS $LIBICONV; do
7482
7483 acl_save_prefix="$prefix"
7484 prefix="$acl_final_prefix"
7485 acl_save_exec_prefix="$exec_prefix"
7486 exec_prefix="$acl_final_exec_prefix"
7487 eval x=\"$x\"
7488 exec_prefix="$acl_save_exec_prefix"
7489 prefix="$acl_save_prefix"
7490
7491 if test "X$x" = "X-L$found_dir"; then
7492 haveit=yes
7493 break
7494 fi
7495 done
7496 if test -z "$haveit"; then
7497 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
7498 fi
7499 if test "$hardcode_minus_L" != no; then
7500 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
7501 else
7502 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
7503 fi
7504 fi
7505 fi
7506 fi
7507 else
7508 if test "X$found_a" != "X"; then
7509 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
7510 else
7511 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
7512 fi
7513 fi
7514 additional_includedir=
7515 case "$found_dir" in
7516 */lib | */lib/)
7517 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
7518 additional_includedir="$basedir/include"
7519 ;;
7520 esac
7521 if test "X$additional_includedir" != "X"; then
7522 if test "X$additional_includedir" != "X/usr/include"; then
7523 haveit=
7524 if test "X$additional_includedir" = "X/usr/local/include"; then
7525 if test -n "$GCC"; then
7526 case $host_os in
7527 linux*) haveit=yes;;
7528 esac
7529 fi
7530 fi
7531 if test -z "$haveit"; then
7532 for x in $CPPFLAGS $INCICONV; do
7533
7534 acl_save_prefix="$prefix"
7535 prefix="$acl_final_prefix"
7536 acl_save_exec_prefix="$exec_prefix"
7537 exec_prefix="$acl_final_exec_prefix"
7538 eval x=\"$x\"
7539 exec_prefix="$acl_save_exec_prefix"
7540 prefix="$acl_save_prefix"
7541
7542 if test "X$x" = "X-I$additional_includedir"; then
7543 haveit=yes
7544 break
7545 fi
7546 done
7547 if test -z "$haveit"; then
7548 if test -d "$additional_includedir"; then
7549 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
7550 fi
7551 fi
7552 fi
7553 fi
7554 fi
7555 if test -n "$found_la"; then
7556 save_libdir="$libdir"
7557 case "$found_la" in
7558 */* | *\\*) . "$found_la" ;;
7559 *) . "./$found_la" ;;
7560 esac
7561 libdir="$save_libdir"
7562 for dep in $dependency_libs; do
7563 case "$dep" in
7564 -L*)
7565 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
7566 if test "X$additional_libdir" != "X/usr/lib"; then
7567 haveit=
7568 if test "X$additional_libdir" = "X/usr/local/lib"; then
7569 if test -n "$GCC"; then
7570 case $host_os in
7571 linux*) haveit=yes;;
7572 esac
7573 fi
7574 fi
7575 if test -z "$haveit"; then
7576 haveit=
7577 for x in $LDFLAGS $LIBICONV; do
7578
7579 acl_save_prefix="$prefix"
7580 prefix="$acl_final_prefix"
7581 acl_save_exec_prefix="$exec_prefix"
7582 exec_prefix="$acl_final_exec_prefix"
7583 eval x=\"$x\"
7584 exec_prefix="$acl_save_exec_prefix"
7585 prefix="$acl_save_prefix"
7586
7587 if test "X$x" = "X-L$additional_libdir"; then
7588 haveit=yes
7589 break
7590 fi
7591 done
7592 if test -z "$haveit"; then
7593 if test -d "$additional_libdir"; then
7594 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
7595 fi
7596 fi
7597 haveit=
7598 for x in $LDFLAGS $LTLIBICONV; do
7599
7600 acl_save_prefix="$prefix"
7601 prefix="$acl_final_prefix"
7602 acl_save_exec_prefix="$exec_prefix"
7603 exec_prefix="$acl_final_exec_prefix"
7604 eval x=\"$x\"
7605 exec_prefix="$acl_save_exec_prefix"
7606 prefix="$acl_save_prefix"
7607
7608 if test "X$x" = "X-L$additional_libdir"; then
7609 haveit=yes
7610 break
7611 fi
7612 done
7613 if test -z "$haveit"; then
7614 if test -d "$additional_libdir"; then
7615 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
7616 fi
7617 fi
7618 fi
7619 fi
7620 ;;
7621 -R*)
7622 dir=`echo "X$dep" | sed -e 's/^X-R//'`
7623 if test "$enable_rpath" != no; then
7624 haveit=
7625 for x in $rpathdirs; do
7626 if test "X$x" = "X$dir"; then
7627 haveit=yes
7628 break
7629 fi
7630 done
7631 if test -z "$haveit"; then
7632 rpathdirs="$rpathdirs $dir"
7633 fi
7634 haveit=
7635 for x in $ltrpathdirs; do
7636 if test "X$x" = "X$dir"; then
7637 haveit=yes
7638 break
7639 fi
7640 done
7641 if test -z "$haveit"; then
7642 ltrpathdirs="$ltrpathdirs $dir"
7643 fi
7644 fi
7645 ;;
7646 -l*)
7647 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
7648 ;;
7649 *.la)
7650 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
7651 ;;
7652 *)
7653 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
7654 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
7655 ;;
7656 esac
7657 done
7658 fi
7659 else
7660 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
7661 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
7662 fi
7663 fi
7664 fi
7665 done
7666 done
7667 if test "X$rpathdirs" != "X"; then
7668 if test -n "$hardcode_libdir_separator"; then
7669 alldirs=
7670 for found_dir in $rpathdirs; do
7671 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
7672 done
7673 acl_save_libdir="$libdir"
7674 libdir="$alldirs"
7675 eval flag=\"$hardcode_libdir_flag_spec\"
7676 libdir="$acl_save_libdir"
7677 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
7678 else
7679 for found_dir in $rpathdirs; do
7680 acl_save_libdir="$libdir"
7681 libdir="$found_dir"
7682 eval flag=\"$hardcode_libdir_flag_spec\"
7683 libdir="$acl_save_libdir"
7684 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
7685 done
7686 fi
7687 fi
7688 if test "X$ltrpathdirs" != "X"; then
7689 for found_dir in $ltrpathdirs; do
7690 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
7691 done
7692 fi
7693
7694
7695
7696
7697
6c7a06a3 7698
6c7a06a3 7699
81ecdfbb
RW
7700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
7701$as_echo_n "checking for iconv... " >&6; }
7702if test "${am_cv_func_iconv+set}" = set; then :
7703 $as_echo_n "(cached) " >&6
d542061a 7704else
6c7a06a3
TT
7705
7706 am_cv_func_iconv="no, consider installing GNU libiconv"
7707 am_cv_lib_iconv=no
016a3251
DD
7708 am_save_CPPFLAGS="$CPPFLAGS"
7709 CPPFLAGS="$CPPFLAGS $INCICONV"
7710 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 7711/* end confdefs.h. */
6c7a06a3
TT
7712#include <stdlib.h>
7713#include <iconv.h>
d542061a
UW
7714int
7715main ()
7716{
6c7a06a3 7717iconv_t cd = iconv_open("","");
016a3251
DD
7718 iconv(cd,NULL,NULL,NULL,NULL);
7719 iconv_close(cd);
d542061a
UW
7720 ;
7721 return 0;
7722}
7723_ACEOF
81ecdfbb 7724if ac_fn_c_try_link "$LINENO"; then :
016a3251 7725 am_cv_func_iconv=yes
d542061a 7726fi
81ecdfbb
RW
7727rm -f core conftest.err conftest.$ac_objext \
7728 conftest$ac_exeext conftest.$ac_ext
016a3251 7729 CPPFLAGS="$am_save_CPPFLAGS"
94ae1714 7730
016a3251
DD
7731 if test "$am_cv_func_iconv" != yes && test -d ../libiconv; then
7732 for _libs in .libs _libs; do
7733 am_save_CPPFLAGS="$CPPFLAGS"
7734 am_save_LIBS="$LIBS"
7735 CPPFLAGS="$CPPFLAGS -I../libiconv/include"
7736 LIBS="$LIBS ../libiconv/lib/$_libs/libiconv.a"
7737 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 7738/* end confdefs.h. */
6c7a06a3
TT
7739#include <stdlib.h>
7740#include <iconv.h>
d542061a
UW
7741int
7742main ()
7743{
6c7a06a3 7744iconv_t cd = iconv_open("","");
016a3251
DD
7745 iconv(cd,NULL,NULL,NULL,NULL);
7746 iconv_close(cd);
d542061a
UW
7747 ;
7748 return 0;
7749}
7750_ACEOF
81ecdfbb 7751if ac_fn_c_try_link "$LINENO"; then :
016a3251
DD
7752 INCICONV="-I../libiconv/include"
7753 LIBICONV='${top_builddir}'/../libiconv/lib/$_libs/libiconv.a
7754 LTLIBICONV='${top_builddir}'/../libiconv/lib/libiconv.la
7755 am_cv_lib_iconv=yes
7756 am_cv_func_iconv=yes
d542061a 7757fi
81ecdfbb
RW
7758rm -f core conftest.err conftest.$ac_objext \
7759 conftest$ac_exeext conftest.$ac_ext
016a3251
DD
7760 CPPFLAGS="$am_save_CPPFLAGS"
7761 LIBS="$am_save_LIBS"
7762 if test "$am_cv_func_iconv" = "yes"; then
7763 break
7764 fi
7765 done
77f120bf 7766 fi
94ae1714 7767
4edb1e84 7768 if test "$am_cv_func_iconv" != yes; then
6c7a06a3 7769 am_save_CPPFLAGS="$CPPFLAGS"
4edb1e84 7770 am_save_LIBS="$LIBS"
016a3251
DD
7771 CPPFLAGS="$LIBS $INCICONV"
7772 LIBS="$LIBS $LIBICONV"
81ecdfbb 7773 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7774/* end confdefs.h. */
6c7a06a3
TT
7775#include <stdlib.h>
7776#include <iconv.h>
bec39cab
AC
7777int
7778main ()
7779{
6c7a06a3
TT
7780iconv_t cd = iconv_open("","");
7781 iconv(cd,NULL,NULL,NULL,NULL);
7782 iconv_close(cd);
bec39cab
AC
7783 ;
7784 return 0;
7785}
7786_ACEOF
81ecdfbb 7787if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 7788 am_cv_lib_iconv=yes
6c7a06a3 7789 am_cv_func_iconv=yes
627af7ea 7790fi
81ecdfbb
RW
7791rm -f core conftest.err conftest.$ac_objext \
7792 conftest$ac_exeext conftest.$ac_ext
fc3b640d 7793 CPPFLAGS="$am_save_CPPFLAGS"
016a3251 7794 LIBS="$am_save_LIBS"
6c7a06a3
TT
7795 fi
7796
7797fi
81ecdfbb
RW
7798{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
7799$as_echo "$am_cv_func_iconv" >&6; }
016a3251
DD
7800 if test "$am_cv_func_iconv" = yes; then
7801
7802$as_echo "#define HAVE_ICONV 1" >>confdefs.h
94ae1714 7803
016a3251 7804 fi
fc3b640d 7805 if test "$am_cv_lib_iconv" = yes; then
016a3251
DD
7806
7807 for element in $INCICONV; do
7808 haveit=
7809 for x in $CPPFLAGS; do
7810
7811 acl_save_prefix="$prefix"
7812 prefix="$acl_final_prefix"
7813 acl_save_exec_prefix="$exec_prefix"
7814 exec_prefix="$acl_final_exec_prefix"
7815 eval x=\"$x\"
7816 exec_prefix="$acl_save_exec_prefix"
7817 prefix="$acl_save_prefix"
7818
7819 if test "X$x" = "X$element"; then
7820 haveit=yes
7821 break
7822 fi
7823 done
7824 if test -z "$haveit"; then
7825 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
7826 fi
7827 done
7828
7829 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
7830$as_echo_n "checking how to link with libiconv... " >&6; }
7831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
7832$as_echo "$LIBICONV" >&6; }
94ae1714 7833 else
016a3251
DD
7834 LIBICONV=
7835 LTLIBICONV=
fc3b640d 7836 fi
94ae1714 7837
6c7a06a3 7838
6c7a06a3 7839
016a3251 7840 if test "$am_cv_func_iconv" = yes; then
81ecdfbb
RW
7841 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
7842$as_echo_n "checking for iconv declaration... " >&6; }
7843 if test "${am_cv_proto_iconv+set}" = set; then :
7844 $as_echo_n "(cached) " >&6
6c7a06a3
TT
7845else
7846
81ecdfbb 7847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
7848/* end confdefs.h. */
7849
6c7a06a3
TT
7850#include <stdlib.h>
7851#include <iconv.h>
7852extern
b4e70030 7853#ifdef __cplusplus
6c7a06a3 7854"C"
b4e70030 7855#endif
6c7a06a3
TT
7856#if defined(__STDC__) || defined(__cplusplus)
7857size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
7858#else
7859size_t iconv();
7860#endif
7861
b4e70030
JB
7862int
7863main ()
7864{
6c7a06a3 7865
b4e70030
JB
7866 ;
7867 return 0;
7868}
7869_ACEOF
81ecdfbb 7870if ac_fn_c_try_compile "$LINENO"; then :
6c7a06a3 7871 am_cv_proto_iconv_arg1=""
4e8d927d 7872else
81ecdfbb 7873 am_cv_proto_iconv_arg1="const"
b4e70030 7874fi
81ecdfbb 7875rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6c7a06a3
TT
7876 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);"
7877fi
7878
7879 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
81ecdfbb 7880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
6c7a06a3 7881 }$am_cv_proto_iconv" >&5
81ecdfbb
RW
7882$as_echo "${ac_t:-
7883 }$am_cv_proto_iconv" >&6; }
6c7a06a3
TT
7884
7885cat >>confdefs.h <<_ACEOF
7886#define ICONV_CONST $am_cv_proto_iconv_arg1
7887_ACEOF
7888
7889 fi
6c7a06a3
TT
7890
7891
478aac75
DE
7892# GDB may fork/exec the iconv program to get the list of supported character
7893# sets. Allow the user to specify where to find it.
7894# There are several factors affecting the choice of option name:
7895# - There is already --with-libiconv-prefix but we can't use it, it specifies
7896# the build-time location of libiconv files.
7897# - The program we need to find is iconv, which comes with glibc. The user
7898# doesn't necessarily have libiconv installed. Therefore naming this
7899# --with-libiconv-foo feels wrong.
7900# - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is
7901# defined to work on directories not files (though it really doesn't know
7902# the difference).
7903# - Calling this --with-iconv-prefix is perceived to cause too much confusion
7904# with --with-libiconv-prefix.
7905# Putting these together is why the option name is --with-iconv-bin.
7906
7907
7908# Check whether --with-iconv-bin was given.
7909if test "${with_iconv_bin+set}" = set; then :
7910 withval=$with_iconv_bin; iconv_bin="${withval}"
7911
7912cat >>confdefs.h <<_ACEOF
7913#define ICONV_BIN "${iconv_bin}"
7914_ACEOF
7915
7916
7917 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
7918 if test "x$prefix" = xNONE; then
7919 test_prefix=/usr/local
7920 else
7921 test_prefix=$prefix
7922 fi
7923 else
7924 test_prefix=$exec_prefix
7925 fi
7926 value=0
7927 case ${iconv_bin} in
7928 "${test_prefix}"|"${test_prefix}/"*|\
7929 '${exec_prefix}'|'${exec_prefix}/'*)
7930 value=1
7931 ;;
7932 esac
7933
7934cat >>confdefs.h <<_ACEOF
7935#define ICONV_BIN_RELOCATABLE $value
7936_ACEOF
7937
7938
7939
7940fi
7941
7942
cb01cfba 7943# For the TUI, we need enhanced curses functionality.
bd8a8e1b 7944if test x"$enable_tui" != xno; then
cb01cfba
JB
7945 prefer_curses=yes
7946fi
7947
7948curses_found=no
7949if test x"$prefer_curses" = xyes; then
7950 # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
7951 # curses library because the latter might not provide all the
7952 # functionality we need. However, this leads to problems on systems
7953 # where the linker searches /usr/local/lib, but the compiler doesn't
7954 # search /usr/local/include, if ncurses is installed in /usr/local. A
7955 # default installation of ncurses on alpha*-dec-osf* will lead to such
7956 # a situation.
81ecdfbb
RW
7957 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
7958$as_echo_n "checking for library containing waddstr... " >&6; }
7959if test "${ac_cv_search_waddstr+set}" = set; then :
7960 $as_echo_n "(cached) " >&6
6c7a06a3
TT
7961else
7962 ac_func_search_save_LIBS=$LIBS
81ecdfbb 7963cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
7964/* end confdefs.h. */
7965
81ecdfbb
RW
7966/* Override any GCC internal prototype to avoid an error.
7967 Use char because int might match the return type of a GCC
7968 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
7969#ifdef __cplusplus
7970extern "C"
7971#endif
6c7a06a3
TT
7972char waddstr ();
7973int
7974main ()
7975{
81ecdfbb 7976return waddstr ();
6c7a06a3
TT
7977 ;
7978 return 0;
7979}
7980_ACEOF
81ecdfbb
RW
7981for ac_lib in '' ncurses cursesX curses; do
7982 if test -z "$ac_lib"; then
7983 ac_res="none required"
7984 else
7985 ac_res=-l$ac_lib
7986 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7987 fi
7988 if ac_fn_c_try_link "$LINENO"; then :
7989 ac_cv_search_waddstr=$ac_res
7990fi
7991rm -f core conftest.err conftest.$ac_objext \
7992 conftest$ac_exeext
7993 if test "${ac_cv_search_waddstr+set}" = set; then :
7994 break
7995fi
7996done
7997if test "${ac_cv_search_waddstr+set}" = set; then :
7998
6c7a06a3 7999else
81ecdfbb
RW
8000 ac_cv_search_waddstr=no
8001fi
8002rm conftest.$ac_ext
8003LIBS=$ac_func_search_save_LIBS
8004fi
8005{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
8006$as_echo "$ac_cv_search_waddstr" >&6; }
8007ac_res=$ac_cv_search_waddstr
8008if test "$ac_res" != no; then :
8009 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3
TT
8010
8011fi
8012
8013
cb01cfba
JB
8014 if test "$ac_cv_search_waddstr" != no; then
8015 curses_found=yes
8016 fi
8017fi
8018
8019# Check whether we should enable the TUI, but only do so if we really
8020# can.
8021if test x"$enable_tui" != xno; then
8022 if test -d $srcdir/tui; then
8023 if test "$curses_found" != no; then
6c7a06a3
TT
8024 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
8025 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
8026 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
8027 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
6c7a06a3
TT
8028 else
8029 if test x"$enable_tui" = xyes; then
81ecdfbb 8030 as_fn_error "no enhanced curses library found; disable TUI" "$LINENO" 5
6c7a06a3 8031 else
81ecdfbb
RW
8032 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
8033$as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
6c7a06a3
TT
8034 fi
8035 fi
8036 fi
8037fi
8038
8039# Since GDB uses Readline, we need termcap functionality. In many
8040# cases this will be provided by the curses library, but some systems
8041# have a seperate termcap library, or no curses library at all.
8042
8043case $host_os in
8044 cygwin*)
8045 if test -d $srcdir/libtermcap; then
8046 LIBS="../libtermcap/libtermcap.a $LIBS"
8047 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
8048 fi ;;
8049 go32* | *djgpp*)
8050 ac_cv_search_tgetent="none required"
8051 ;;
6c7a06a3
TT
8052esac
8053
8054# These are the libraries checked by Readline.
81ecdfbb
RW
8055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
8056$as_echo_n "checking for library containing tgetent... " >&6; }
8057if test "${ac_cv_search_tgetent+set}" = set; then :
8058 $as_echo_n "(cached) " >&6
6c7a06a3
TT
8059else
8060 ac_func_search_save_LIBS=$LIBS
81ecdfbb 8061cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
8062/* end confdefs.h. */
8063
81ecdfbb
RW
8064/* Override any GCC internal prototype to avoid an error.
8065 Use char because int might match the return type of a GCC
8066 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
8067#ifdef __cplusplus
8068extern "C"
8069#endif
6c7a06a3
TT
8070char tgetent ();
8071int
8072main ()
8073{
81ecdfbb 8074return tgetent ();
6c7a06a3
TT
8075 ;
8076 return 0;
8077}
8078_ACEOF
81ecdfbb
RW
8079for ac_lib in '' termcap tinfo curses ncurses; do
8080 if test -z "$ac_lib"; then
8081 ac_res="none required"
8082 else
8083 ac_res=-l$ac_lib
6c7a06a3 8084 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
8085 fi
8086 if ac_fn_c_try_link "$LINENO"; then :
8087 ac_cv_search_tgetent=$ac_res
8088fi
8089rm -f core conftest.err conftest.$ac_objext \
8090 conftest$ac_exeext
8091 if test "${ac_cv_search_tgetent+set}" = set; then :
8092 break
8093fi
8094done
8095if test "${ac_cv_search_tgetent+set}" = set; then :
6c7a06a3 8096
6c7a06a3 8097else
81ecdfbb 8098 ac_cv_search_tgetent=no
6c7a06a3 8099fi
81ecdfbb 8100rm conftest.$ac_ext
6c7a06a3
TT
8101LIBS=$ac_func_search_save_LIBS
8102fi
81ecdfbb
RW
8103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
8104$as_echo "$ac_cv_search_tgetent" >&6; }
8105ac_res=$ac_cv_search_tgetent
8106if test "$ac_res" != no; then :
8107 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3 8108
06825bd1
MK
8109fi
8110
06825bd1 8111
bec39cab 8112if test "$ac_cv_search_tgetent" = no; then
7a85168d 8113 CONFIG_OBS="$CONFIG_OBS stub-termcap.o"
8ee53726
MK
8114fi
8115
3841debe 8116
81ecdfbb
RW
8117# Check whether --with-system-readline was given.
8118if test "${with_system_readline+set}" = set; then :
8119 withval=$with_system_readline;
8120fi
6a30b0a5 8121
6a30b0a5
AS
8122
8123if test "$with_system_readline" = yes; then
8124 READLINE=-lreadline
8125 READLINE_DEPS=
8126 READLINE_CFLAGS=
39037522 8127 READLINE_TEXI_INCFLAG=
6a30b0a5
AS
8128else
8129 READLINE='$(READLINE_DIR)/libreadline.a'
8130 READLINE_DEPS='$(READLINE)'
8131 READLINE_CFLAGS='-I$(READLINE_SRC)/..'
39037522 8132 READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
6a30b0a5
AS
8133fi
8134
8135
8136
8137
8138
f997c383
SD
8139# Generate jit-reader.h
8140
8141# This is typedeffed to GDB_CORE_ADDR in jit-reader.h
8142TARGET_PTR=
8143
8144# The cast to long int works around a bug in the HP C Compiler
8145# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8146# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8147# This bug is HP SR number 8606223364.
8148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5
8149$as_echo_n "checking size of unsigned long long... " >&6; }
8150if test "${ac_cv_sizeof_unsigned_long_long+set}" = set; then :
8151 $as_echo_n "(cached) " >&6
8152else
8153 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then :
8154
8155else
8156 if test "$ac_cv_type_unsigned_long_long" = yes; then
8157 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8158$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8159{ as_fn_set_status 77
8160as_fn_error "cannot compute sizeof (unsigned long long)
8161See \`config.log' for more details." "$LINENO" 5; }; }
8162 else
8163 ac_cv_sizeof_unsigned_long_long=0
8164 fi
8165fi
8166
8167fi
8168{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5
8169$as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; }
8170
8171
8172
8173cat >>confdefs.h <<_ACEOF
8174#define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
8175_ACEOF
8176
8177
8178# The cast to long int works around a bug in the HP C Compiler
8179# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8180# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8181# This bug is HP SR number 8606223364.
8182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
8183$as_echo_n "checking size of unsigned long... " >&6; }
8184if test "${ac_cv_sizeof_unsigned_long+set}" = set; then :
8185 $as_echo_n "(cached) " >&6
8186else
8187 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then :
8188
8189else
8190 if test "$ac_cv_type_unsigned_long" = yes; then
8191 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8192$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8193{ as_fn_set_status 77
8194as_fn_error "cannot compute sizeof (unsigned long)
8195See \`config.log' for more details." "$LINENO" 5; }; }
8196 else
8197 ac_cv_sizeof_unsigned_long=0
8198 fi
8199fi
8200
8201fi
8202{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
8203$as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
8204
8205
8206
8207cat >>confdefs.h <<_ACEOF
8208#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
8209_ACEOF
8210
8211
8212# The cast to long int works around a bug in the HP C Compiler
8213# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8214# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8215# This bug is HP SR number 8606223364.
8216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5
8217$as_echo_n "checking size of unsigned __int128... " >&6; }
8218if test "${ac_cv_sizeof_unsigned___int128+set}" = set; then :
8219 $as_echo_n "(cached) " >&6
8220else
8221 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then :
8222
8223else
8224 if test "$ac_cv_type_unsigned___int128" = yes; then
8225 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8226$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8227{ as_fn_set_status 77
8228as_fn_error "cannot compute sizeof (unsigned __int128)
8229See \`config.log' for more details." "$LINENO" 5; }; }
8230 else
8231 ac_cv_sizeof_unsigned___int128=0
8232 fi
8233fi
8234
8235fi
8236{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5
8237$as_echo "$ac_cv_sizeof_unsigned___int128" >&6; }
8238
8239
8240
8241cat >>confdefs.h <<_ACEOF
8242#define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128
8243_ACEOF
8244
8245
8246
8247if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
8248 TARGET_PTR="unsigned long"
8249elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
8250 TARGET_PTR="unsigned long long"
8251elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
8252 TARGET_PTR="unsigned __int128"
8253else
8254 TARGET_PTR="unsigned long"
8255fi
8256
8257
8258ac_config_files="$ac_config_files jit-reader.h:jit-reader.in"
8259
8260
a2d08b9e
SD
8261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
8262$as_echo_n "checking for library containing dlopen... " >&6; }
8263if test "${ac_cv_search_dlopen+set}" = set; then :
8264 $as_echo_n "(cached) " >&6
8265else
8266 ac_func_search_save_LIBS=$LIBS
8267cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8268/* end confdefs.h. */
8269
8270/* Override any GCC internal prototype to avoid an error.
8271 Use char because int might match the return type of a GCC
8272 builtin and then its argument prototype would still apply. */
8273#ifdef __cplusplus
8274extern "C"
8275#endif
8276char dlopen ();
8277int
8278main ()
8279{
8280return dlopen ();
8281 ;
8282 return 0;
8283}
8284_ACEOF
8285for ac_lib in '' dl; do
8286 if test -z "$ac_lib"; then
8287 ac_res="none required"
8288 else
8289 ac_res=-l$ac_lib
8290 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8291 fi
8292 if ac_fn_c_try_link "$LINENO"; then :
8293 ac_cv_search_dlopen=$ac_res
8294fi
8295rm -f core conftest.err conftest.$ac_objext \
8296 conftest$ac_exeext
8297 if test "${ac_cv_search_dlopen+set}" = set; then :
8298 break
8299fi
8300done
8301if test "${ac_cv_search_dlopen+set}" = set; then :
8302
8303else
8304 ac_cv_search_dlopen=no
8305fi
8306rm conftest.$ac_ext
8307LIBS=$ac_func_search_save_LIBS
8308fi
8309{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
8310$as_echo "$ac_cv_search_dlopen" >&6; }
8311ac_res=$ac_cv_search_dlopen
8312if test "$ac_res" != no; then :
8313 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8314
8315fi
8316
8317
39037522 8318
b8e0a31c
SD
8319
8320# Check whether --with-jit-reader-dir was given.
8321if test "${with_jit_reader_dir+set}" = set; then :
8322 withval=$with_jit_reader_dir;
8323 JIT_READER_DIR=$withval
8324else
8325 JIT_READER_DIR=${libdir}/gdb
8326fi
8327
8328
8329 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
8330 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
8331 ac_define_dir=`eval echo $JIT_READER_DIR`
8332 ac_define_dir=`eval echo $ac_define_dir`
8333
8334cat >>confdefs.h <<_ACEOF
8335#define JIT_READER_DIR "$ac_define_dir"
8336_ACEOF
8337
8338
8339
8340
8341 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
8342 if test "x$prefix" = xNONE; then
8343 test_prefix=/usr/local
8344 else
8345 test_prefix=$prefix
8346 fi
8347 else
8348 test_prefix=$exec_prefix
8349 fi
8350 value=0
8351 case ${ac_define_dir} in
8352 "${test_prefix}"|"${test_prefix}/"*|\
8353 '${exec_prefix}'|'${exec_prefix}/'*)
8354 value=1
8355 ;;
8356 esac
8357
8358cat >>confdefs.h <<_ACEOF
8359#define JIT_READER_DIR_RELOCATABLE $value
8360_ACEOF
8361
8362
8363
8364
8365
81ecdfbb
RW
8366# Check whether --with-expat was given.
8367if test "${with_expat+set}" = set; then :
8368 withval=$with_expat;
5c39566f
DJ
8369else
8370 with_expat=auto
81ecdfbb
RW
8371fi
8372
8373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
8374$as_echo_n "checking whether to use expat... " >&6; }
8375{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
8376$as_echo "$with_expat" >&6; }
5c39566f
DJ
8377
8378if test "${with_expat}" = no; then
81ecdfbb
RW
8379 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
8380$as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
5c39566f
DJ
8381 HAVE_LIBEXPAT=no
8382else
8383
3841debe
DJ
8384
8385
8386
8387
8388
8389
8390
8391 use_additional=yes
8392
8393 acl_save_prefix="$prefix"
8394 prefix="$acl_final_prefix"
8395 acl_save_exec_prefix="$exec_prefix"
8396 exec_prefix="$acl_final_exec_prefix"
8397
8398 eval additional_includedir=\"$includedir\"
8399 eval additional_libdir=\"$libdir\"
8400
8401 exec_prefix="$acl_save_exec_prefix"
8402 prefix="$acl_save_prefix"
8403
8404
81ecdfbb
RW
8405# Check whether --with-libexpat-prefix was given.
8406if test "${with_libexpat_prefix+set}" = set; then :
8407 withval=$with_libexpat_prefix;
3841debe
DJ
8408 if test "X$withval" = "Xno"; then
8409 use_additional=no
8410 else
8411 if test "X$withval" = "X"; then
8412
8413 acl_save_prefix="$prefix"
8414 prefix="$acl_final_prefix"
8415 acl_save_exec_prefix="$exec_prefix"
8416 exec_prefix="$acl_final_exec_prefix"
8417
8418 eval additional_includedir=\"$includedir\"
8419 eval additional_libdir=\"$libdir\"
8420
8421 exec_prefix="$acl_save_exec_prefix"
8422 prefix="$acl_save_prefix"
8423
8424 else
8425 additional_includedir="$withval/include"
8426 additional_libdir="$withval/lib"
8427 fi
8428 fi
8429
81ecdfbb
RW
8430fi
8431
3841debe
DJ
8432 LIBEXPAT=
8433 LTLIBEXPAT=
8434 INCEXPAT=
8435 rpathdirs=
8436 ltrpathdirs=
8437 names_already_handled=
8438 names_next_round='expat '
8439 while test -n "$names_next_round"; do
8440 names_this_round="$names_next_round"
8441 names_next_round=
8442 for name in $names_this_round; do
8443 already_handled=
8444 for n in $names_already_handled; do
8445 if test "$n" = "$name"; then
8446 already_handled=yes
8447 break
8448 fi
8449 done
8450 if test -z "$already_handled"; then
8451 names_already_handled="$names_already_handled $name"
8452 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
8453 eval value=\"\$HAVE_LIB$uppername\"
8454 if test -n "$value"; then
8455 if test "$value" = yes; then
8456 eval value=\"\$LIB$uppername\"
8457 test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
8458 eval value=\"\$LTLIB$uppername\"
8459 test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
8460 else
8461 :
8462 fi
8463 else
8464 found_dir=
8465 found_la=
8466 found_so=
8467 found_a=
8468 if test $use_additional = yes; then
8469 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
8470 found_dir="$additional_libdir"
8471 found_so="$additional_libdir/lib$name.$shlibext"
8472 if test -f "$additional_libdir/lib$name.la"; then
8473 found_la="$additional_libdir/lib$name.la"
8474 fi
8475 else
8476 if test -f "$additional_libdir/lib$name.$libext"; then
8477 found_dir="$additional_libdir"
8478 found_a="$additional_libdir/lib$name.$libext"
8479 if test -f "$additional_libdir/lib$name.la"; then
8480 found_la="$additional_libdir/lib$name.la"
8481 fi
8482 fi
8483 fi
8484 fi
8485 if test "X$found_dir" = "X"; then
8486 for x in $LDFLAGS $LTLIBEXPAT; do
8487
8488 acl_save_prefix="$prefix"
8489 prefix="$acl_final_prefix"
8490 acl_save_exec_prefix="$exec_prefix"
8491 exec_prefix="$acl_final_exec_prefix"
8492 eval x=\"$x\"
8493 exec_prefix="$acl_save_exec_prefix"
8494 prefix="$acl_save_prefix"
8495
8496 case "$x" in
8497 -L*)
8498 dir=`echo "X$x" | sed -e 's/^X-L//'`
8499 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
8500 found_dir="$dir"
8501 found_so="$dir/lib$name.$shlibext"
8502 if test -f "$dir/lib$name.la"; then
8503 found_la="$dir/lib$name.la"
8504 fi
8505 else
8506 if test -f "$dir/lib$name.$libext"; then
8507 found_dir="$dir"
8508 found_a="$dir/lib$name.$libext"
8509 if test -f "$dir/lib$name.la"; then
8510 found_la="$dir/lib$name.la"
8511 fi
8512 fi
8513 fi
8514 ;;
8515 esac
8516 if test "X$found_dir" != "X"; then
8517 break
8518 fi
8519 done
8520 fi
8521 if test "X$found_dir" != "X"; then
8522 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
8523 if test "X$found_so" != "X"; then
8524 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
8525 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
8526 else
8527 haveit=
8528 for x in $ltrpathdirs; do
8529 if test "X$x" = "X$found_dir"; then
8530 haveit=yes
8531 break
8532 fi
8533 done
8534 if test -z "$haveit"; then
8535 ltrpathdirs="$ltrpathdirs $found_dir"
8536 fi
8537 if test "$hardcode_direct" = yes; then
8538 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
8539 else
8540 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
8541 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
8542 haveit=
8543 for x in $rpathdirs; do
8544 if test "X$x" = "X$found_dir"; then
8545 haveit=yes
8546 break
8547 fi
8548 done
8549 if test -z "$haveit"; then
8550 rpathdirs="$rpathdirs $found_dir"
8551 fi
8552 else
8553 haveit=
8554 for x in $LDFLAGS $LIBEXPAT; do
8555
8556 acl_save_prefix="$prefix"
8557 prefix="$acl_final_prefix"
8558 acl_save_exec_prefix="$exec_prefix"
8559 exec_prefix="$acl_final_exec_prefix"
8560 eval x=\"$x\"
8561 exec_prefix="$acl_save_exec_prefix"
8562 prefix="$acl_save_prefix"
8563
8564 if test "X$x" = "X-L$found_dir"; then
8565 haveit=yes
8566 break
8567 fi
8568 done
8569 if test -z "$haveit"; then
8570 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
8571 fi
8572 if test "$hardcode_minus_L" != no; then
8573 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
8574 else
8575 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
8576 fi
8577 fi
8578 fi
8579 fi
8580 else
8581 if test "X$found_a" != "X"; then
8582 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
8583 else
8584 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
8585 fi
8586 fi
8587 additional_includedir=
8588 case "$found_dir" in
8589 */lib | */lib/)
8590 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
8591 additional_includedir="$basedir/include"
8592 ;;
8593 esac
8594 if test "X$additional_includedir" != "X"; then
8595 if test "X$additional_includedir" != "X/usr/include"; then
8596 haveit=
8597 if test "X$additional_includedir" = "X/usr/local/include"; then
8598 if test -n "$GCC"; then
8599 case $host_os in
8600 linux*) haveit=yes;;
8601 esac
8602 fi
8603 fi
8604 if test -z "$haveit"; then
8605 for x in $CPPFLAGS $INCEXPAT; do
8606
8607 acl_save_prefix="$prefix"
8608 prefix="$acl_final_prefix"
8609 acl_save_exec_prefix="$exec_prefix"
8610 exec_prefix="$acl_final_exec_prefix"
8611 eval x=\"$x\"
8612 exec_prefix="$acl_save_exec_prefix"
8613 prefix="$acl_save_prefix"
8614
8615 if test "X$x" = "X-I$additional_includedir"; then
8616 haveit=yes
8617 break
8618 fi
8619 done
8620 if test -z "$haveit"; then
8621 if test -d "$additional_includedir"; then
8622 INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
8623 fi
8624 fi
8625 fi
8626 fi
8627 fi
8628 if test -n "$found_la"; then
8629 save_libdir="$libdir"
8630 case "$found_la" in
8631 */* | *\\*) . "$found_la" ;;
8632 *) . "./$found_la" ;;
8633 esac
8634 libdir="$save_libdir"
8635 for dep in $dependency_libs; do
8636 case "$dep" in
8637 -L*)
8638 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
8639 if test "X$additional_libdir" != "X/usr/lib"; then
8640 haveit=
8641 if test "X$additional_libdir" = "X/usr/local/lib"; then
8642 if test -n "$GCC"; then
8643 case $host_os in
8644 linux*) haveit=yes;;
8645 esac
8646 fi
8647 fi
8648 if test -z "$haveit"; then
8649 haveit=
8650 for x in $LDFLAGS $LIBEXPAT; do
8651
8652 acl_save_prefix="$prefix"
8653 prefix="$acl_final_prefix"
8654 acl_save_exec_prefix="$exec_prefix"
8655 exec_prefix="$acl_final_exec_prefix"
8656 eval x=\"$x\"
8657 exec_prefix="$acl_save_exec_prefix"
8658 prefix="$acl_save_prefix"
8659
8660 if test "X$x" = "X-L$additional_libdir"; then
8661 haveit=yes
8662 break
8663 fi
8664 done
8665 if test -z "$haveit"; then
8666 if test -d "$additional_libdir"; then
8667 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
8668 fi
8669 fi
8670 haveit=
8671 for x in $LDFLAGS $LTLIBEXPAT; do
8672
8673 acl_save_prefix="$prefix"
8674 prefix="$acl_final_prefix"
8675 acl_save_exec_prefix="$exec_prefix"
8676 exec_prefix="$acl_final_exec_prefix"
8677 eval x=\"$x\"
8678 exec_prefix="$acl_save_exec_prefix"
8679 prefix="$acl_save_prefix"
8680
8681 if test "X$x" = "X-L$additional_libdir"; then
8682 haveit=yes
8683 break
8684 fi
8685 done
8686 if test -z "$haveit"; then
8687 if test -d "$additional_libdir"; then
8688 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
8689 fi
8690 fi
8691 fi
8692 fi
8693 ;;
8694 -R*)
8695 dir=`echo "X$dep" | sed -e 's/^X-R//'`
8696 if test "$enable_rpath" != no; then
8697 haveit=
8698 for x in $rpathdirs; do
8699 if test "X$x" = "X$dir"; then
8700 haveit=yes
8701 break
8702 fi
8703 done
8704 if test -z "$haveit"; then
8705 rpathdirs="$rpathdirs $dir"
8706 fi
8707 haveit=
8708 for x in $ltrpathdirs; do
8709 if test "X$x" = "X$dir"; then
8710 haveit=yes
8711 break
8712 fi
8713 done
8714 if test -z "$haveit"; then
8715 ltrpathdirs="$ltrpathdirs $dir"
8716 fi
8717 fi
8718 ;;
8719 -l*)
8720 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
8721 ;;
8722 *.la)
8723 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
8724 ;;
8725 *)
8726 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
8727 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
8728 ;;
81ecdfbb
RW
8729 esac
8730 done
8731 fi
8732 else
8733 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
8734 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
8735 fi
8736 fi
8737 fi
8738 done
8739 done
8740 if test "X$rpathdirs" != "X"; then
8741 if test -n "$hardcode_libdir_separator"; then
8742 alldirs=
8743 for found_dir in $rpathdirs; do
8744 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
8745 done
8746 acl_save_libdir="$libdir"
8747 libdir="$alldirs"
8748 eval flag=\"$hardcode_libdir_flag_spec\"
8749 libdir="$acl_save_libdir"
8750 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
8751 else
8752 for found_dir in $rpathdirs; do
8753 acl_save_libdir="$libdir"
8754 libdir="$found_dir"
8755 eval flag=\"$hardcode_libdir_flag_spec\"
8756 libdir="$acl_save_libdir"
8757 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
8758 done
8759 fi
8760 fi
8761 if test "X$ltrpathdirs" != "X"; then
8762 for found_dir in $ltrpathdirs; do
8763 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
8764 done
8765 fi
a9322a30
TT
8766
8767
81ecdfbb 8768 ac_save_CPPFLAGS="$CPPFLAGS"
a9322a30 8769
81ecdfbb
RW
8770 for element in $INCEXPAT; do
8771 haveit=
8772 for x in $CPPFLAGS; do
a9322a30 8773
81ecdfbb
RW
8774 acl_save_prefix="$prefix"
8775 prefix="$acl_final_prefix"
8776 acl_save_exec_prefix="$exec_prefix"
8777 exec_prefix="$acl_final_exec_prefix"
8778 eval x=\"$x\"
8779 exec_prefix="$acl_save_exec_prefix"
8780 prefix="$acl_save_prefix"
a8111142 8781
81ecdfbb
RW
8782 if test "X$x" = "X$element"; then
8783 haveit=yes
8784 break
8785 fi
8786 done
8787 if test -z "$haveit"; then
8788 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
8789 fi
8790 done
a9322a30
TT
8791
8792
81ecdfbb
RW
8793 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
8794$as_echo_n "checking for libexpat... " >&6; }
8795if test "${ac_cv_libexpat+set}" = set; then :
8796 $as_echo_n "(cached) " >&6
bec39cab 8797else
bec39cab 8798
81ecdfbb
RW
8799 ac_save_LIBS="$LIBS"
8800 LIBS="$LIBS $LIBEXPAT"
8801 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8802/* end confdefs.h. */
81ecdfbb
RW
8803#include "expat.h"
8804int
8805main ()
8806{
8807XML_Parser p = XML_ParserCreate (0);
8808 ;
8809 return 0;
8810}
bec39cab 8811_ACEOF
81ecdfbb
RW
8812if ac_fn_c_try_link "$LINENO"; then :
8813 ac_cv_libexpat=yes
c906108c 8814else
81ecdfbb 8815 ac_cv_libexpat=no
bec39cab 8816fi
81ecdfbb
RW
8817rm -f core conftest.err conftest.$ac_objext \
8818 conftest$ac_exeext conftest.$ac_ext
8819 LIBS="$ac_save_LIBS"
c906108c 8820
95ca63c4 8821fi
81ecdfbb
RW
8822{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
8823$as_echo "$ac_cv_libexpat" >&6; }
8824 if test "$ac_cv_libexpat" = yes; then
8825 HAVE_LIBEXPAT=yes
bec39cab 8826
81ecdfbb 8827$as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
bec39cab 8828
81ecdfbb
RW
8829 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
8830$as_echo_n "checking how to link with libexpat... " >&6; }
8831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
8832$as_echo "$LIBEXPAT" >&6; }
8833 else
8834 HAVE_LIBEXPAT=no
8835 CPPFLAGS="$ac_save_CPPFLAGS"
8836 LIBEXPAT=
8837 LTLIBEXPAT=
8838 fi
95ca63c4
CF
8839
8840
8841
7cb9022a
MK
8842
8843
bec39cab 8844
81ecdfbb
RW
8845 if test "$HAVE_LIBEXPAT" != yes; then
8846 if test "$with_expat" = yes; then
8847 as_fn_error "expat is missing or unusable" "$LINENO" 5
8848 else
8849 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
8850$as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
8851 fi
8852 else
8853 save_LIBS=$LIBS
8854 LIBS="$LIBS $LIBEXPAT"
8855 for ac_func in XML_StopParser
8856do :
8857 ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
8858if test "x$ac_cv_func_XML_StopParser" = x""yes; then :
bec39cab 8859 cat >>confdefs.h <<_ACEOF
81ecdfbb 8860#define HAVE_XML_STOPPARSER 1
bec39cab 8861_ACEOF
95ca63c4 8862
bec39cab 8863fi
bec39cab 8864done
95ca63c4 8865
81ecdfbb
RW
8866 LIBS=$save_LIBS
8867 fi
a9322a30
TT
8868fi
8869
d344e670
DE
8870# --------------------- #
8871# Check for libpython. #
8872# --------------------- #
8873
a9322a30 8874
a9322a30
TT
8875
8876
ec685c5e 8877
0c4a4063 8878
81ecdfbb
RW
8879# Check whether --with-python was given.
8880if test "${with_python+set}" = set; then :
8881 withval=$with_python;
bec39cab 8882else
81ecdfbb 8883 with_python=auto
bec39cab 8884fi
bec39cab 8885
81ecdfbb
RW
8886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
8887$as_echo_n "checking whether to use python... " >&6; }
8888{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
8889$as_echo "$with_python" >&6; }
9a156167 8890
81ecdfbb
RW
8891if test "${with_python}" = no; then
8892 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
8893$as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
8894 have_libpython=no
bec39cab 8895else
81ecdfbb 8896 case "${with_python}" in
8c85a4e2 8897 [\\/]* | ?:[\\/]*)
ec685c5e
DE
8898 if test -d ${with_python}; then
8899 # Assume the python binary is ${with_python}/bin/python.
ec685c5e 8900 python_prog="${with_python}/bin/python"
0c4a4063 8901 python_prefix=
9c4ea6c5
JB
8902 # If python does not exit ${with_python}/bin, then try in
8903 # ${with_python}. On Windows/MinGW, this is where the Python
8904 # executable is.
8905 if test ! -x "${python_prog}"; then
8906 python_prog="${with_python}/python"
8907 python_prefix=
8908 fi
e7a30f46 8909 if test ! -x "${python_prog}"; then
ec685c5e
DE
8910 # Fall back to gdb 7.0/7.1 behaviour.
8911 python_prog=missing
0c4a4063 8912 python_prefix=${with_python}
ec685c5e 8913 fi
e7a30f46 8914 elif test -x "${with_python}"; then
ec685c5e
DE
8915 # While we can't run python compiled for $host (unless host == build),
8916 # the user could write a script that provides the needed information,
8917 # so we support that.
ec685c5e 8918 python_prog=${with_python}
0c4a4063 8919 python_prefix=
ec685c5e
DE
8920 else
8921 as_fn_error "invalid value for --with-python" "$LINENO" 5
8922 fi
81ecdfbb 8923 ;;
ec685c5e
DE
8924 */*)
8925 # Disallow --with-python=foo/bar.
81ecdfbb
RW
8926 as_fn_error "invalid value for --with-python" "$LINENO" 5
8927 ;;
ec685c5e
DE
8928 *)
8929 # The user has either specified auto, yes, or the name of the python
8930 # program assumed to be in $PATH.
8931 python_prefix=
8932 case "${with_python}" in
8933 yes | auto)
8934 if test ${build} = ${host}; then
8935 # Extract the first word of "python", so it can be a program name with args.
8936set dummy python; ac_word=$2
8937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8938$as_echo_n "checking for $ac_word... " >&6; }
8939if test "${ac_cv_path_python_prog_path+set}" = set; then :
8940 $as_echo_n "(cached) " >&6
8941else
8942 case $python_prog_path in
8943 [\\/]* | ?:[\\/]*)
8944 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
8945 ;;
8946 *)
8947 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8948for as_dir in $PATH
8949do
8950 IFS=$as_save_IFS
8951 test -z "$as_dir" && as_dir=.
8952 for ac_exec_ext in '' $ac_executable_extensions; do
8953 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8954 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
8955 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8956 break 2
8957 fi
8958done
8959 done
8960IFS=$as_save_IFS
8961
8962 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
8963 ;;
8964esac
8965fi
8966python_prog_path=$ac_cv_path_python_prog_path
8967if test -n "$python_prog_path"; then
8968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
8969$as_echo "$python_prog_path" >&6; }
8970else
8971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8972$as_echo "no" >&6; }
8973fi
8974
8975
8976 if test "${python_prog_path}" = missing; then
8977 python_prog=missing
8978 else
8979 python_prog=${python_prog_path}
8980 fi
8981 else
8982 # Not much we can do except assume the cross-compiler will find the
8983 # right files.
8984 python_prog=missing
8985 fi
8986 ;;
8987 *)
8988 # While we can't run python compiled for $host (unless host == build),
8989 # the user could write a script that provides the needed information,
8990 # so we support that.
8991 python_prog="${with_python}"
8992 # Extract the first word of "${python_prog}", so it can be a program name with args.
8993set dummy ${python_prog}; ac_word=$2
8994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8995$as_echo_n "checking for $ac_word... " >&6; }
8996if test "${ac_cv_path_python_prog_path+set}" = set; then :
8997 $as_echo_n "(cached) " >&6
8998else
8999 case $python_prog_path in
9000 [\\/]* | ?:[\\/]*)
9001 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
9002 ;;
9003 *)
9004 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9005for as_dir in $PATH
9006do
9007 IFS=$as_save_IFS
9008 test -z "$as_dir" && as_dir=.
9009 for ac_exec_ext in '' $ac_executable_extensions; do
9010 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9011 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
9012 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9013 break 2
9014 fi
9015done
9016 done
9017IFS=$as_save_IFS
9018
9019 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
9020 ;;
9021esac
9022fi
9023python_prog_path=$ac_cv_path_python_prog_path
9024if test -n "$python_prog_path"; then
9025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
9026$as_echo "$python_prog_path" >&6; }
9027else
9028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9029$as_echo "no" >&6; }
9030fi
9031
9032
9033 if test "${python_prog_path}" = missing; then
9034 as_fn_error "unable to find python program ${python_prog}" "$LINENO" 5
9035 fi
9036 ;;
9037 esac
81ecdfbb
RW
9038 esac
9039
ec685c5e 9040 if test "${python_prog}" != missing; then
e7a30f46
DE
9041 # We have a python program to use, but it may be too old.
9042 # Don't flag an error for --with-python=auto (the default).
9043 have_python_config=yes
ec685c5e
DE
9044 python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
9045 if test $? != 0; then
e7a30f46
DE
9046 have_python_config=failed
9047 if test "${with_python}" != auto; then
9048 as_fn_error "failure running python-config --includes" "$LINENO" 5
9049 fi
ec685c5e
DE
9050 fi
9051 python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
9052 if test $? != 0; then
e7a30f46
DE
9053 have_python_config=failed
9054 if test "${with_python}" != auto; then
9055 as_fn_error "failure running python-config --ldflags" "$LINENO" 5
9056 fi
ec685c5e 9057 fi
0c4a4063
DE
9058 python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
9059 if test $? != 0; then
e7a30f46
DE
9060 have_python_config=failed
9061 if test "${with_python}" != auto; then
9062 as_fn_error "failure running python-config --exec-prefix" "$LINENO" 5
9063 fi
0c4a4063 9064 fi
ec685c5e 9065 else
ac534cba
JB
9066 # We do not have a python executable we can use to determine where
9067 # to find the Python headers and libs. We cannot guess the include
9068 # path from the python_prefix either, because that include path
9069 # depends on the Python version. So, there is nothing much we can
9070 # do except assume that the compiler will be able to find those files.
9071 python_includes=
9072 python_libs=
0c4a4063 9073 have_python_config=no
ec685c5e 9074 fi
bec39cab 9075
ec685c5e
DE
9076 # If we have python-config, only try the configuration it provides.
9077 # Otherwise fallback on the old way of trying different versions of
9078 # python in turn.
81ecdfbb 9079
ec685c5e
DE
9080 have_libpython=no
9081 if test "${have_python_config}" = yes; then
c1039e3c
JB
9082 # Determine the Python version by extracting "-lpython<version>"
9083 # part of the python_libs. <version> is usually X.Y with X and Y
9084 # being decimal numbers, but can also be XY (seen on Windows).
9085 #
9086 # The extraction is performed using sed with a regular expression.
9087 # Initially, the regexp used was using the '?' quantifier to make
9088 # the dot in the version number optional. Unfortunately, this
9089 # does not work with non-GNU versions of sed because, because of
9090 # what looks like a limitation (the '?' quantifier does not work
9091 # with back-references). We work around this limitation by using
9092 # the '*' quantifier instead. It means that, in theory, we might
9093 # match unexpected version strings such as "-lpython2..7", but
9094 # this seems unlikely in practice. And even if that happens,
9095 # an error will be triggered later on, when checking that version
9096 # number.
ec685c5e 9097 python_version=`echo " ${python_libs} " \
c1039e3c 9098 | sed -e 's,^.* -l\(python[0-9]*[.]*[0-9]*\).*$,\1,'`
0c4a4063
DE
9099 case "${python_version}" in
9100 python*)
ec685c5e
DE
9101
9102 version=${python_version}
9103
9104 new_CPPFLAGS=${python_includes}
9105 new_LIBS=${python_libs}
81ecdfbb
RW
9106 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
9107$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 9108 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 9109 save_LIBS=$LIBS
ec685c5e
DE
9110 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9111 LIBS="$LIBS $new_LIBS"
9112 found_usable_python=no
81ecdfbb 9113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9114/* end confdefs.h. */
ac534cba 9115#include "Python.h"
81ecdfbb
RW
9116int
9117main ()
9118{
9119Py_Initialize ();
9120 ;
9121 return 0;
9122}
bec39cab 9123_ACEOF
81ecdfbb 9124if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
9125 have_libpython=${version}
9126 found_usable_python=yes
ac534cba
JB
9127 PYTHON_CPPFLAGS=$new_CPPFLAGS
9128 PYTHON_LIBS=$new_LIBS
9a156167 9129fi
81ecdfbb
RW
9130rm -f core conftest.err conftest.$ac_objext \
9131 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
9132 CPPFLAGS=$save_CPPFLAGS
9133 LIBS=$save_LIBS
ec685c5e
DE
9134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
9135$as_echo "${found_usable_python}" >&6; }
9a156167 9136
0c4a4063
DE
9137 ;;
9138 *)
ec685c5e 9139 as_fn_error "unable to determine python version from ${python_libs}" "$LINENO" 5
0c4a4063
DE
9140 ;;
9141 esac
e7a30f46 9142 elif test "${have_python_config}" != failed; then
ec685c5e 9143 if test "${have_libpython}" = no; then
9a156167 9144
420697bb
TT
9145 version=python2.7
9146
9147 new_CPPFLAGS=${python_includes}
9148 new_LIBS="${python_libs} -lpython2.7"
9149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
9150$as_echo_n "checking for ${version}... " >&6; }
9151 save_CPPFLAGS=$CPPFLAGS
9152 save_LIBS=$LIBS
9153 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9154 LIBS="$LIBS $new_LIBS"
9155 found_usable_python=no
9156 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9157/* end confdefs.h. */
ac534cba 9158#include "Python.h"
420697bb
TT
9159int
9160main ()
9161{
9162Py_Initialize ();
9163 ;
9164 return 0;
9165}
9166_ACEOF
9167if ac_fn_c_try_link "$LINENO"; then :
9168 have_libpython=${version}
9169 found_usable_python=yes
ac534cba
JB
9170 PYTHON_CPPFLAGS=$new_CPPFLAGS
9171 PYTHON_LIBS=$new_LIBS
420697bb
TT
9172fi
9173rm -f core conftest.err conftest.$ac_objext \
9174 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
9175 CPPFLAGS=$save_CPPFLAGS
9176 LIBS=$save_LIBS
420697bb
TT
9177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
9178$as_echo "${found_usable_python}" >&6; }
9179
9180 fi
9181 if test "${have_libpython}" = no; then
9182
ec685c5e
DE
9183 version=python2.6
9184
9185 new_CPPFLAGS=${python_includes}
9186 new_LIBS="${python_libs} -lpython2.6"
9187 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
9188$as_echo_n "checking for ${version}... " >&6; }
9189 save_CPPFLAGS=$CPPFLAGS
9190 save_LIBS=$LIBS
9191 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9192 LIBS="$LIBS $new_LIBS"
9193 found_usable_python=no
9194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9195/* end confdefs.h. */
ac534cba 9196#include "Python.h"
ec685c5e
DE
9197int
9198main ()
9199{
9200Py_Initialize ();
9201 ;
9202 return 0;
9203}
9204_ACEOF
9205if ac_fn_c_try_link "$LINENO"; then :
9206 have_libpython=${version}
9207 found_usable_python=yes
ac534cba
JB
9208 PYTHON_CPPFLAGS=$new_CPPFLAGS
9209 PYTHON_LIBS=$new_LIBS
ec685c5e
DE
9210fi
9211rm -f core conftest.err conftest.$ac_objext \
9212 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
9213 CPPFLAGS=$save_CPPFLAGS
9214 LIBS=$save_LIBS
ec685c5e
DE
9215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
9216$as_echo "${found_usable_python}" >&6; }
9a156167 9217
81ecdfbb 9218 fi
ec685c5e 9219 if test ${have_libpython} = no; then
9a156167 9220
81ecdfbb 9221 version=python2.5
9a156167 9222
ec685c5e
DE
9223 new_CPPFLAGS=${python_includes}
9224 new_LIBS="${python_libs} -lpython2.5"
81ecdfbb
RW
9225 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
9226$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 9227 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 9228 save_LIBS=$LIBS
ec685c5e
DE
9229 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9230 LIBS="$LIBS $new_LIBS"
9231 found_usable_python=no
81ecdfbb 9232 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 9233/* end confdefs.h. */
ac534cba 9234#include "Python.h"
81ecdfbb
RW
9235int
9236main ()
9237{
9238Py_Initialize ();
9239 ;
9240 return 0;
9241}
436868fb 9242_ACEOF
81ecdfbb 9243if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
9244 have_libpython=${version}
9245 found_usable_python=yes
ac534cba
JB
9246 PYTHON_CPPFLAGS=$new_CPPFLAGS
9247 PYTHON_LIBS=$new_LIBS
436868fb 9248fi
81ecdfbb
RW
9249rm -f core conftest.err conftest.$ac_objext \
9250 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
9251 CPPFLAGS=$save_CPPFLAGS
9252 LIBS=$save_LIBS
ec685c5e
DE
9253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
9254$as_echo "${found_usable_python}" >&6; }
a9322a30 9255
81ecdfbb 9256 fi
ec685c5e 9257 if test ${have_libpython} = no; then
a9322a30 9258
81ecdfbb 9259 version=python2.4
a9322a30 9260
ec685c5e
DE
9261 new_CPPFLAGS=${python_includes}
9262 new_LIBS="${python_libs} -lpython2.4"
81ecdfbb
RW
9263 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
9264$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 9265 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 9266 save_LIBS=$LIBS
ec685c5e
DE
9267 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9268 LIBS="$LIBS $new_LIBS"
9269 found_usable_python=no
81ecdfbb 9270 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 9271/* end confdefs.h. */
ac534cba 9272#include "Python.h"
a9322a30
TT
9273int
9274main ()
9275{
81ecdfbb 9276Py_Initialize ();
a9322a30
TT
9277 ;
9278 return 0;
9279}
436868fb 9280_ACEOF
81ecdfbb 9281if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
9282 have_libpython=${version}
9283 found_usable_python=yes
ac534cba
JB
9284 PYTHON_CPPFLAGS=$new_CPPFLAGS
9285 PYTHON_LIBS=$new_LIBS
436868fb 9286fi
81ecdfbb
RW
9287rm -f core conftest.err conftest.$ac_objext \
9288 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
9289 CPPFLAGS=$save_CPPFLAGS
9290 LIBS=$save_LIBS
ec685c5e
DE
9291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
9292$as_echo "${found_usable_python}" >&6; }
81ecdfbb 9293
ec685c5e
DE
9294 fi
9295 fi
9c4ea6c5 9296 if test "${have_libpython}" = python2.7 -o "${have_libpython}" = python27; then
11763c18
TT
9297
9298$as_echo "#define HAVE_LIBPYTHON2_7 1" >>confdefs.h
9299
9c4ea6c5 9300 elif test "${have_libpython}" = python2.6 -o "${have_libpython}" = python26; then
ec685c5e
DE
9301
9302$as_echo "#define HAVE_LIBPYTHON2_6 1" >>confdefs.h
9303
9c4ea6c5 9304 elif test "${have_libpython}" = python2.5 -o "${have_libpython}" = python25; then
ec685c5e
DE
9305
9306$as_echo "#define HAVE_LIBPYTHON2_5 1" >>confdefs.h
9307
9c4ea6c5 9308 elif test "${have_libpython}" = python2.4 -o "${have_libpython}" = python24; then
81ecdfbb
RW
9309
9310$as_echo "#define HAVE_LIBPYTHON2_4 1" >>confdefs.h
9311
81ecdfbb 9312 fi
ec685c5e
DE
9313
9314 if test "${have_libpython}" = no; then
81ecdfbb
RW
9315 case "${with_python}" in
9316 yes)
9317 as_fn_error "python is missing or unusable" "$LINENO" 5
9318 ;;
9319 auto)
9320 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
9321$as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
9322 ;;
9323 *)
9324 as_fn_error "no usable python found at ${with_python}" "$LINENO" 5
9325 ;;
9326 esac
0c4a4063
DE
9327 else
9328 if test -n "${python_prefix}"; then
9329
9330cat >>confdefs.h <<_ACEOF
9331#define WITH_PYTHON_PATH "${python_prefix}"
9332_ACEOF
9333
9334
9335 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
9336 if test "x$prefix" = xNONE; then
9337 test_prefix=/usr/local
9338 else
9339 test_prefix=$prefix
9340 fi
9341 else
9342 test_prefix=$exec_prefix
9343 fi
9344 value=0
9345 case ${python_prefix} in
9346 "${test_prefix}"|"${test_prefix}/"*|\
9347 '${exec_prefix}'|'${exec_prefix}/'*)
9348 value=1
9349 ;;
9350 esac
9351
9352cat >>confdefs.h <<_ACEOF
9353#define PYTHON_PATH_RELOCATABLE $value
9354_ACEOF
9355
9356
9357 fi
81ecdfbb 9358 fi
436868fb 9359fi
436868fb 9360
ec685c5e 9361if test "${have_libpython}" != no; then
436868fb 9362
81ecdfbb 9363$as_echo "#define HAVE_PYTHON 1" >>confdefs.h
436868fb 9364
81ecdfbb
RW
9365 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
9366 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
9367 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
94f7449c 9368 CONFIG_INSTALL="$CONFIG_INSTALL install-python"
81ecdfbb 9369 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
436868fb 9370
81ecdfbb
RW
9371 # Flags needed to compile Python code (taken from python-config --cflags).
9372 # We cannot call python-config directly because it will output whatever was
9373 # used when compiling the Python interpreter itself, including flags which
9374 # would make the python-related objects be compiled differently from the
9375 # rest of GDB (e.g., -O2 and -fPIC).
9376 if test "${GCC}" = yes; then
9377 tentative_python_cflags="-fno-strict-aliasing -DNDEBUG -fwrapv"
9378 fi
436868fb 9379
81ecdfbb
RW
9380 if test "x${tentative_python_cflags}" != x; then
9381 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
9382$as_echo_n "checking compiler flags for python code... " >&6; }
9383 for flag in ${tentative_python_cflags}; do
9384 # Check that the compiler accepts it
9385 saved_CFLAGS="$CFLAGS"
9386 CFLAGS="$CFLAGS $flag"
9387 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9388/* end confdefs.h. */
81ecdfbb 9389
a9322a30
TT
9390int
9391main ()
9392{
a9322a30
TT
9393
9394 ;
9395 return 0;
9396}
bec39cab 9397_ACEOF
81ecdfbb
RW
9398if ac_fn_c_try_compile "$LINENO"; then :
9399 PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
bec39cab 9400fi
81ecdfbb
RW
9401rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9402 CFLAGS="$saved_CFLAGS"
9403 done
9404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
9405$as_echo "${PYTHON_CFLAGS}" >&6; }
9406 fi
043b6510 9407
c83393b9
JB
9408 # On x64 Windows, Python's include headers, and pyconfig.h in
9409 # particular, rely on MS_WIN64 macro to detect that it's a 64bit
9410 # version of Windows. Unfortunately, MS_WIN64 is only defined if
9411 # _MSC_VER, a Microsoft-specific macro, is defined. So, when
9412 # building on x64 Windows with GCC, we define MS_WIN64 ourselves.
9413 # The issue was reported to the Python community, but still isn't
9414 # solved as of 2012-10-02 (http://bugs.python.org/issue4709).
9415
043b6510 9416 case "$gdb_host" in
c83393b9
JB
9417 mingw64)
9418 if test "${GCC}" = yes; then
9419 CPPFLAGS="$CPPFLAGS -DMS_WIN64"
9420 fi
9421 ;;
043b6510 9422 esac
a8db4212
YPK
9423
9424 # Note that "python -m threading" cannot be used to check for
9425 # threading support due to a bug in Python 2.7.3
9426 # (http://bugs.python.org/issue15567).
9427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether python supports threads" >&5
9428$as_echo_n "checking whether python supports threads... " >&6; }
9429 saved_CPPFLAGS="${CPPFLAGS}"
9430 CPPFLAGS="${PYTHON_CPPFLAGS}"
9431 # Note that the test is reversed so that python_has_threads=yes on
9432 # unexpected failures.
9433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9434/* end confdefs.h. */
9435
9436#include <Python.h>
9437#ifdef WITH_THREAD
9438# error
9439#endif
9440
9441_ACEOF
9442if ac_fn_c_try_cpp "$LINENO"; then :
9443 python_has_threads=no
9444else
9445 python_has_threads=yes
9446fi
9447rm -f conftest.err conftest.$ac_ext
9448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_has_threads}" >&5
9449$as_echo "${python_has_threads}" >&6; }
9450 CPPFLAGS="${saved_CPPFLAGS}"
81ecdfbb 9451else
6dddc817
DE
9452 # Even if Python support is not compiled in, we need to have this file
9453 # included so that the "python" command, et.al., still exists.
9454 CONFIG_OBS="$CONFIG_OBS python.o"
9455 CONFIG_SRCS="$CONFIG_SRCS python/python.c"
a9322a30 9456fi
9a156167 9457
ed3ef339
DE
9458
9459
4df42755
DE
9460 if test "${have_libpython}" != no; then
9461 HAVE_PYTHON_TRUE=
9462 HAVE_PYTHON_FALSE='#'
9463else
9464 HAVE_PYTHON_TRUE='#'
9465 HAVE_PYTHON_FALSE=
9466fi
9467
ed3ef339
DE
9468
9469# -------------------- #
9470# Check for libguile. #
9471# -------------------- #
9472
9473
e1402065
DE
9474
9475
9476
9477
9478# Check whether --with-guile was given.
9479if test "${with_guile+set}" = set; then :
9480 withval=$with_guile;
9481else
9482 with_guile=auto
9483fi
9484
9485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use guile" >&5
9486$as_echo_n "checking whether to use guile... " >&6; }
9487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_guile" >&5
9488$as_echo "$with_guile" >&6; }
9489
ed3ef339
DE
9490# Extract the first word of "pkg-config", so it can be a program name with args.
9491set dummy pkg-config; ac_word=$2
9492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9493$as_echo_n "checking for $ac_word... " >&6; }
9494if test "${ac_cv_path_pkg_config_prog_path+set}" = set; then :
9495 $as_echo_n "(cached) " >&6
9496else
9497 case $pkg_config_prog_path in
9498 [\\/]* | ?:[\\/]*)
9499 ac_cv_path_pkg_config_prog_path="$pkg_config_prog_path" # Let the user override the test with a path.
9500 ;;
9501 *)
9502 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9503for as_dir in $PATH
9504do
9505 IFS=$as_save_IFS
9506 test -z "$as_dir" && as_dir=.
9507 for ac_exec_ext in '' $ac_executable_extensions; do
9508 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9509 ac_cv_path_pkg_config_prog_path="$as_dir/$ac_word$ac_exec_ext"
9510 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9511 break 2
9512 fi
9513done
9514 done
9515IFS=$as_save_IFS
9516
9517 test -z "$ac_cv_path_pkg_config_prog_path" && ac_cv_path_pkg_config_prog_path="missing"
9518 ;;
9519esac
9520fi
9521pkg_config_prog_path=$ac_cv_path_pkg_config_prog_path
9522if test -n "$pkg_config_prog_path"; then
9523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config_prog_path" >&5
9524$as_echo "$pkg_config_prog_path" >&6; }
9525else
9526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9527$as_echo "no" >&6; }
9528fi
9529
9530
9531
214ab2da 9532try_guile_versions="guile-2.2 guile-2.0"
ed3ef339
DE
9533have_libguile=no
9534case "${with_guile}" in
9535no)
9536 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: guile support disabled; some features will be unavailable." >&5
9537$as_echo "$as_me: WARNING: guile support disabled; some features will be unavailable." >&2;}
9538 ;;
9539auto)
e1402065
DE
9540 if test "${pkg_config_prog_path}" = "missing"; then
9541 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found, guile support disabled" >&5
9542$as_echo "$as_me: WARNING: pkg-config not found, guile support disabled" >&2;}
9543 else
ed3ef339
DE
9544
9545 pkg_config=${pkg_config_prog_path}
9546 guile_version_list=${try_guile_versions}
9547 flag_errors=no
9548
ed3ef339
DE
9549 found_usable_guile=checking
9550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
9551$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
9552 for guile_version in ${guile_version_list}; do
9553 ${pkg_config} --exists ${guile_version} 2>/dev/null
9554 if test $? != 0; then
9555 continue
9556 fi
9557 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
9558 if test $? != 0; then
9559 as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
9560 fi
9561 new_LIBS=`${pkg_config} --libs ${guile_version}`
9562 if test $? != 0; then
9563 as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
9564 fi
9565 found_usable_guile=${guile_version}
9566 break
9567 done
9568 if test "${found_usable_guile}" = "checking"; then
9569 if test "${flag_errors}" = "yes"; then
9570 as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
9571 else
9572 found_usable_guile=no
9573 fi
9574 fi
9575 if test "${found_usable_guile}" != no; then
9576 save_CPPFLAGS=$CPPFLAGS
9577 save_LIBS=$LIBS
9578 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9579 LIBS="$LIBS $new_LIBS"
9580 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9581/* end confdefs.h. */
9582#include "libguile.h"
9583int
9584main ()
9585{
9586scm_init_guile ();
9587 ;
9588 return 0;
9589}
9590_ACEOF
9591if ac_fn_c_try_link "$LINENO"; then :
9592 have_libguile=yes
9593 GUILE_CPPFLAGS=$new_CPPFLAGS
9594 GUILE_LIBS=$new_LIBS
9595else
9596 found_usable_guile=no
9597fi
9598rm -f core conftest.err conftest.$ac_objext \
9599 conftest$ac_exeext conftest.$ac_ext
92fab5a6
AW
9600 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
9601if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then :
9602
9603$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
9604
9605
9606fi
9607
ed3ef339
DE
9608 CPPFLAGS=$save_CPPFLAGS
9609 LIBS=$save_LIBS
9610 if test "${found_usable_guile}" = no; then
9611 if test "${flag_errors}" = yes; then
9612 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9613$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9614as_fn_error "linking guile version ${guile_version} test program failed
9615See \`config.log' for more details." "$LINENO" 5; }
9616 fi
9617 fi
9618 fi
9619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
9620$as_echo "${found_usable_guile}" >&6; }
9621
e1402065 9622 fi
ed3ef339
DE
9623 ;;
9624yes)
e1402065
DE
9625 if test "${pkg_config_prog_path}" = "missing"; then
9626 as_fn_error "pkg-config not found" "$LINENO" 5
9627 fi
ed3ef339
DE
9628
9629 pkg_config=${pkg_config_prog_path}
9630 guile_version_list=${try_guile_versions}
9631 flag_errors=yes
9632
ed3ef339
DE
9633 found_usable_guile=checking
9634 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
9635$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
9636 for guile_version in ${guile_version_list}; do
9637 ${pkg_config} --exists ${guile_version} 2>/dev/null
9638 if test $? != 0; then
9639 continue
9640 fi
9641 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
9642 if test $? != 0; then
9643 as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
9644 fi
9645 new_LIBS=`${pkg_config} --libs ${guile_version}`
9646 if test $? != 0; then
9647 as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
9648 fi
9649 found_usable_guile=${guile_version}
9650 break
9651 done
9652 if test "${found_usable_guile}" = "checking"; then
9653 if test "${flag_errors}" = "yes"; then
9654 as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
9655 else
9656 found_usable_guile=no
9657 fi
9658 fi
9659 if test "${found_usable_guile}" != no; then
9660 save_CPPFLAGS=$CPPFLAGS
9661 save_LIBS=$LIBS
9662 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9663 LIBS="$LIBS $new_LIBS"
9664 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9665/* end confdefs.h. */
9666#include "libguile.h"
9667int
9668main ()
9669{
9670scm_init_guile ();
9671 ;
9672 return 0;
9673}
9674_ACEOF
9675if ac_fn_c_try_link "$LINENO"; then :
9676 have_libguile=yes
9677 GUILE_CPPFLAGS=$new_CPPFLAGS
9678 GUILE_LIBS=$new_LIBS
9679else
9680 found_usable_guile=no
9681fi
9682rm -f core conftest.err conftest.$ac_objext \
9683 conftest$ac_exeext conftest.$ac_ext
92fab5a6
AW
9684 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
9685if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then :
9686
9687$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
9688
9689
9690fi
9691
ed3ef339
DE
9692 CPPFLAGS=$save_CPPFLAGS
9693 LIBS=$save_LIBS
9694 if test "${found_usable_guile}" = no; then
9695 if test "${flag_errors}" = yes; then
9696 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9697$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9698as_fn_error "linking guile version ${guile_version} test program failed
9699See \`config.log' for more details." "$LINENO" 5; }
9700 fi
9701 fi
9702 fi
9703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
9704$as_echo "${found_usable_guile}" >&6; }
9705
9706 ;;
9707[\\/]* | ?:[\\/]*)
e1402065 9708 if test -x "${with_guile}"; then
ed3ef339
DE
9709
9710 pkg_config=${with_guile}
9711 guile_version_list=${try_guile_versions}
9712 flag_errors=yes
9713
ed3ef339
DE
9714 found_usable_guile=checking
9715 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
9716$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
9717 for guile_version in ${guile_version_list}; do
9718 ${pkg_config} --exists ${guile_version} 2>/dev/null
9719 if test $? != 0; then
9720 continue
9721 fi
9722 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
9723 if test $? != 0; then
9724 as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
9725 fi
9726 new_LIBS=`${pkg_config} --libs ${guile_version}`
9727 if test $? != 0; then
9728 as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
9729 fi
9730 found_usable_guile=${guile_version}
9731 break
9732 done
9733 if test "${found_usable_guile}" = "checking"; then
9734 if test "${flag_errors}" = "yes"; then
9735 as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
9736 else
9737 found_usable_guile=no
9738 fi
9739 fi
9740 if test "${found_usable_guile}" != no; then
9741 save_CPPFLAGS=$CPPFLAGS
9742 save_LIBS=$LIBS
9743 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9744 LIBS="$LIBS $new_LIBS"
9745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9746/* end confdefs.h. */
9747#include "libguile.h"
9748int
9749main ()
9750{
9751scm_init_guile ();
9752 ;
9753 return 0;
9754}
9755_ACEOF
9756if ac_fn_c_try_link "$LINENO"; then :
9757 have_libguile=yes
9758 GUILE_CPPFLAGS=$new_CPPFLAGS
9759 GUILE_LIBS=$new_LIBS
9760else
9761 found_usable_guile=no
9762fi
9763rm -f core conftest.err conftest.$ac_objext \
9764 conftest$ac_exeext conftest.$ac_ext
92fab5a6
AW
9765 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
9766if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then :
9767
9768$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
9769
9770
9771fi
9772
ed3ef339
DE
9773 CPPFLAGS=$save_CPPFLAGS
9774 LIBS=$save_LIBS
9775 if test "${found_usable_guile}" = no; then
9776 if test "${flag_errors}" = yes; then
9777 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9778$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9779as_fn_error "linking guile version ${guile_version} test program failed
9780See \`config.log' for more details." "$LINENO" 5; }
9781 fi
9782 fi
9783 fi
9784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
9785$as_echo "${found_usable_guile}" >&6; }
9786
e1402065
DE
9787 else
9788 as_fn_error "Guile config program not executable: ${with_guile}" "$LINENO" 5
9789 fi
ed3ef339
DE
9790 ;;
9791"" | */*)
9792 # Disallow --with=guile="" and --with-guile=foo/bar.
9793 as_fn_error "invalid value for --with-guile" "$LINENO" 5
9794 ;;
9795*)
9796 # A space separate list of guile versions to try, in order.
e1402065
DE
9797 if test "${pkg_config_prog_path}" = "missing"; then
9798 as_fn_error "pkg-config not found" "$LINENO" 5
9799 fi
ed3ef339
DE
9800
9801 pkg_config=${pkg_config_prog_path}
9802 guile_version_list=${with_guile}
9803 flag_errors=yes
9804
ed3ef339
DE
9805 found_usable_guile=checking
9806 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
9807$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
9808 for guile_version in ${guile_version_list}; do
9809 ${pkg_config} --exists ${guile_version} 2>/dev/null
9810 if test $? != 0; then
9811 continue
9812 fi
9813 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
9814 if test $? != 0; then
9815 as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
9816 fi
9817 new_LIBS=`${pkg_config} --libs ${guile_version}`
9818 if test $? != 0; then
9819 as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
9820 fi
9821 found_usable_guile=${guile_version}
9822 break
9823 done
9824 if test "${found_usable_guile}" = "checking"; then
9825 if test "${flag_errors}" = "yes"; then
9826 as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
9827 else
9828 found_usable_guile=no
9829 fi
9830 fi
9831 if test "${found_usable_guile}" != no; then
9832 save_CPPFLAGS=$CPPFLAGS
9833 save_LIBS=$LIBS
9834 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9835 LIBS="$LIBS $new_LIBS"
9836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9837/* end confdefs.h. */
9838#include "libguile.h"
9839int
9840main ()
9841{
9842scm_init_guile ();
9843 ;
9844 return 0;
9845}
9846_ACEOF
9847if ac_fn_c_try_link "$LINENO"; then :
9848 have_libguile=yes
9849 GUILE_CPPFLAGS=$new_CPPFLAGS
9850 GUILE_LIBS=$new_LIBS
9851else
9852 found_usable_guile=no
9853fi
9854rm -f core conftest.err conftest.$ac_objext \
9855 conftest$ac_exeext conftest.$ac_ext
92fab5a6
AW
9856 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
9857if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then :
9858
9859$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
9860
9861
9862fi
9863
ed3ef339
DE
9864 CPPFLAGS=$save_CPPFLAGS
9865 LIBS=$save_LIBS
9866 if test "${found_usable_guile}" = no; then
9867 if test "${flag_errors}" = yes; then
9868 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9869$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9870as_fn_error "linking guile version ${guile_version} test program failed
9871See \`config.log' for more details." "$LINENO" 5; }
9872 fi
9873 fi
9874 fi
9875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
9876$as_echo "${found_usable_guile}" >&6; }
9877
9878 ;;
9879esac
9880
e76c5d17 9881if test "${have_libguile}" != no; then
d342a0da
DE
9882 case "${with_guile}" in
9883 [\\/]* | ?:[\\/]*)
e76c5d17
DE
9884
9885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
9886$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
9887if test "${ac_cv_guild_program_name+set}" = set; then :
9888 $as_echo_n "(cached) " >&6
9889else
d342a0da 9890 ac_cv_guild_program_name="`"${with_guile}" --variable guild "${guile_version}"`"
e76c5d17
DE
9891
9892 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
9893 # the 'guild' and 'bindir' variables. In that case, try to guess
9894 # what the program name is, at the risk of getting it wrong if
9895 # Guile was configured with '--program-suffix' or similar.
9896 if test "x$ac_cv_guild_program_name" = "x"; then
d342a0da 9897 guile_exec_prefix="`"${with_guile}" --variable exec_prefix "${guile_version}"`"
e76c5d17
DE
9898 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
9899 fi
9900
9901fi
9902{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
9903$as_echo "$ac_cv_guild_program_name" >&6; }
9904
9905 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
9906 as_fn_error "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
9907 fi
9908
9909 GUILD="$ac_cv_guild_program_name"
9910
9911
d342a0da
DE
9912 ;;
9913 *)
9914
9915 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
9916$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
9917if test "${ac_cv_guild_program_name+set}" = set; then :
9918 $as_echo_n "(cached) " >&6
9919else
9920 ac_cv_guild_program_name="`"${pkg_config_prog_path}" --variable guild "${guile_version}"`"
9921
9922 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
9923 # the 'guild' and 'bindir' variables. In that case, try to guess
9924 # what the program name is, at the risk of getting it wrong if
9925 # Guile was configured with '--program-suffix' or similar.
9926 if test "x$ac_cv_guild_program_name" = "x"; then
9927 guile_exec_prefix="`"${pkg_config_prog_path}" --variable exec_prefix "${guile_version}"`"
9928 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
9929 fi
9930
9931fi
9932{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
9933$as_echo "$ac_cv_guild_program_name" >&6; }
9934
9935 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
9936 as_fn_error "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
9937 fi
9938
9939 GUILD="$ac_cv_guild_program_name"
9940
9941
9942 ;;
9943 esac
e76c5d17
DE
9944
9945
9946 if test "$cross_compiling" = no; then
9947 GUILD_TARGET_FLAG=
9948 else
9949 GUILD_TARGET_FLAG="--target=$host"
9950 fi
9951
9952
9953
9954
9955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether guild supports this host" >&5
9956$as_echo_n "checking whether guild supports this host... " >&6; }
9957if test "${ac_cv_guild_ok+set}" = set; then :
9958 $as_echo_n "(cached) " >&6
9959else
9960 echo "$ac_cv_guild_program_name compile $GUILD_TARGET_FLAG -o conftest.go $srcdir/guile/lib/gdb/support.scm" >&5
9961 if "$ac_cv_guild_program_name" compile $GUILD_TARGET_FLAG -o conftest.go "$srcdir/guile/lib/gdb/support.scm" >&5 2>&5; then
9962 ac_cv_guild_ok=yes
9963 else
9964 ac_cv_guild_ok=no
9965 fi
9966fi
9967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_ok" >&5
9968$as_echo "$ac_cv_guild_ok" >&6; }
9969
9970 if test "$ac_cv_guild_ok" = no; then
9971 have_libguile=no
9972 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling guile support" >&5
9973$as_echo "$as_me: WARNING: disabling guile support" >&2;}
9974 fi
9975fi
9976
ed3ef339
DE
9977if test "${have_libguile}" != no; then
9978
9979$as_echo "#define HAVE_GUILE 1" >>confdefs.h
9980
9981 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_GUILE_OBS)"
9982 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_GUILE_DEPS)"
9983 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_GUILE_SRCS)"
9984 CONFIG_INSTALL="$CONFIG_INSTALL install-guile"
9985 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_GUILE_CFLAGS)"
16954d5d
LC
9986
9987 save_LIBS="$LIBS"
9988 save_CPPFLAGS="$CPPFLAGS"
9989 LIBS="$GUILE_LIBS"
9990 CPPFLAGS="$GUILE_CPPFLAGS"
9991 for ac_func in scm_new_smob
9992do :
9993 ac_fn_c_check_func "$LINENO" "scm_new_smob" "ac_cv_func_scm_new_smob"
9994if test "x$ac_cv_func_scm_new_smob" = x""yes; then :
9995 cat >>confdefs.h <<_ACEOF
9996#define HAVE_SCM_NEW_SMOB 1
9997_ACEOF
9998
9999fi
10000done
10001
10002 LIBS="$save_LIBS"
10003 CPPFLAGS="$save_CPPFLAGS"
ed3ef339
DE
10004else
10005 # Even if Guile support is not compiled in, we need to have these files
10006 # included.
10007 CONFIG_OBS="$CONFIG_OBS guile.o"
10008 CONFIG_SRCS="$CONFIG_SRCS guile/guile.c"
10009fi
9a156167 10010
ac534cba 10011
4df42755
DE
10012 if test "${have_libguile}" != no; then
10013 HAVE_GUILE_TRUE=
10014 HAVE_GUILE_FALSE='#'
10015else
10016 HAVE_GUILE_TRUE='#'
10017 HAVE_GUILE_FALSE=
10018fi
10019
ac534cba 10020
d344e670
DE
10021# --------------------- #
10022# Check for libmcheck. #
10023# --------------------- #
10024
a8db4212
YPK
10025# Enable -lmcheck by default (it provides cheap-enough memory mangling),
10026# but turn it off if Python is enabled with threads, since -lmcheck is
10027# not thread safe (http://sourceware.org/bugzilla/show_bug.cgi?id=9939),
10028# and for releases.
17ef446e
PA
10029if test \( "${have_libpython}" = "no" -o "${python_has_threads}" = "no" \) \
10030 && $development; then
10031 libmcheck_default=yes
10032else
10033 libmcheck_default=no
a8db4212
YPK
10034fi
10035
17ef446e
PA
10036 # Check whether --enable-libmcheck was given.
10037if test "${enable_libmcheck+set}" = set; then :
10038 enableval=$enable_libmcheck; case "${enableval}" in
10039 yes | y) ENABLE_LIBMCHECK="yes" ;;
10040 no | n) ENABLE_LIBMCHECK="no" ;;
10041 *) as_fn_error "bad value ${enableval} for --enable-libmcheck" "$LINENO" 5 ;;
10042 esac
10043fi
10044
10045
10046 if test -z "${ENABLE_LIBMCHECK}"; then
10047 ENABLE_LIBMCHECK=${libmcheck_default}
a8db4212 10048 fi
17ef446e
PA
10049
10050 if test "$ENABLE_LIBMCHECK" = "yes" ; then
10051 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lmcheck" >&5
a8db4212
YPK
10052$as_echo_n "checking for main in -lmcheck... " >&6; }
10053if test "${ac_cv_lib_mcheck_main+set}" = set; then :
10054 $as_echo_n "(cached) " >&6
10055else
10056 ac_check_lib_save_LIBS=$LIBS
10057LIBS="-lmcheck $LIBS"
10058cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10059/* end confdefs.h. */
10060
10061
10062int
10063main ()
10064{
10065return main ();
10066 ;
10067 return 0;
10068}
10069_ACEOF
10070if ac_fn_c_try_link "$LINENO"; then :
10071 ac_cv_lib_mcheck_main=yes
10072else
10073 ac_cv_lib_mcheck_main=no
10074fi
10075rm -f core conftest.err conftest.$ac_objext \
10076 conftest$ac_exeext conftest.$ac_ext
10077LIBS=$ac_check_lib_save_LIBS
10078fi
10079{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mcheck_main" >&5
10080$as_echo "$ac_cv_lib_mcheck_main" >&6; }
10081if test "x$ac_cv_lib_mcheck_main" = x""yes; then :
10082 cat >>confdefs.h <<_ACEOF
10083#define HAVE_LIBMCHECK 1
10084_ACEOF
10085
10086 LIBS="-lmcheck $LIBS"
10087
10088fi
10089
17ef446e
PA
10090 fi
10091
10092
10093if test "$ENABLE_LIBMCHECK" = "yes" \
10094 -a "${have_libpython}" != "no" \
10095 -a "${python_has_threads}" = "yes" ; then
10096 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&5
10097$as_echo "$as_me: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&2;}
a8db4212
YPK
10098fi
10099
58bfce93
MM
10100
10101# Check whether --with-intel_pt was given.
10102if test "${with_intel_pt+set}" = set; then :
10103 withval=$with_intel_pt;
10104else
10105 with_intel_pt=auto
10106fi
10107
10108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5
10109$as_echo_n "checking whether to use intel pt... " >&6; }
10110{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5
10111$as_echo "$with_intel_pt" >&6; }
10112
10113if test "${with_intel_pt}" = no; then
10114 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel(R) Processor Trace support disabled; some features may be unavailable." >&5
10115$as_echo "$as_me: WARNING: Intel(R) Processor Trace support disabled; some features may be unavailable." >&2;}
10116 HAVE_LIBIPT=no
10117else
10118
10119
10120
10121
10122
10123
10124
10125
10126 use_additional=yes
10127
10128 acl_save_prefix="$prefix"
10129 prefix="$acl_final_prefix"
10130 acl_save_exec_prefix="$exec_prefix"
10131 exec_prefix="$acl_final_exec_prefix"
10132
10133 eval additional_includedir=\"$includedir\"
10134 eval additional_libdir=\"$libdir\"
10135
10136 exec_prefix="$acl_save_exec_prefix"
10137 prefix="$acl_save_prefix"
10138
10139
10140# Check whether --with-libipt-prefix was given.
10141if test "${with_libipt_prefix+set}" = set; then :
10142 withval=$with_libipt_prefix;
10143 if test "X$withval" = "Xno"; then
10144 use_additional=no
10145 else
10146 if test "X$withval" = "X"; then
10147
10148 acl_save_prefix="$prefix"
10149 prefix="$acl_final_prefix"
10150 acl_save_exec_prefix="$exec_prefix"
10151 exec_prefix="$acl_final_exec_prefix"
10152
10153 eval additional_includedir=\"$includedir\"
10154 eval additional_libdir=\"$libdir\"
10155
10156 exec_prefix="$acl_save_exec_prefix"
10157 prefix="$acl_save_prefix"
10158
10159 else
10160 additional_includedir="$withval/include"
10161 additional_libdir="$withval/lib"
10162 fi
10163 fi
10164
10165fi
10166
10167 LIBIPT=
10168 LTLIBIPT=
10169 INCIPT=
10170 rpathdirs=
10171 ltrpathdirs=
10172 names_already_handled=
10173 names_next_round='ipt '
10174 while test -n "$names_next_round"; do
10175 names_this_round="$names_next_round"
10176 names_next_round=
10177 for name in $names_this_round; do
10178 already_handled=
10179 for n in $names_already_handled; do
10180 if test "$n" = "$name"; then
10181 already_handled=yes
10182 break
10183 fi
10184 done
10185 if test -z "$already_handled"; then
10186 names_already_handled="$names_already_handled $name"
10187 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
10188 eval value=\"\$HAVE_LIB$uppername\"
10189 if test -n "$value"; then
10190 if test "$value" = yes; then
10191 eval value=\"\$LIB$uppername\"
10192 test -z "$value" || LIBIPT="${LIBIPT}${LIBIPT:+ }$value"
10193 eval value=\"\$LTLIB$uppername\"
10194 test -z "$value" || LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$value"
10195 else
10196 :
10197 fi
10198 else
10199 found_dir=
10200 found_la=
10201 found_so=
10202 found_a=
10203 if test $use_additional = yes; then
10204 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
10205 found_dir="$additional_libdir"
10206 found_so="$additional_libdir/lib$name.$shlibext"
10207 if test -f "$additional_libdir/lib$name.la"; then
10208 found_la="$additional_libdir/lib$name.la"
10209 fi
10210 else
10211 if test -f "$additional_libdir/lib$name.$libext"; then
10212 found_dir="$additional_libdir"
10213 found_a="$additional_libdir/lib$name.$libext"
10214 if test -f "$additional_libdir/lib$name.la"; then
10215 found_la="$additional_libdir/lib$name.la"
10216 fi
10217 fi
10218 fi
10219 fi
10220 if test "X$found_dir" = "X"; then
10221 for x in $LDFLAGS $LTLIBIPT; do
10222
10223 acl_save_prefix="$prefix"
10224 prefix="$acl_final_prefix"
10225 acl_save_exec_prefix="$exec_prefix"
10226 exec_prefix="$acl_final_exec_prefix"
10227 eval x=\"$x\"
10228 exec_prefix="$acl_save_exec_prefix"
10229 prefix="$acl_save_prefix"
10230
10231 case "$x" in
10232 -L*)
10233 dir=`echo "X$x" | sed -e 's/^X-L//'`
10234 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
10235 found_dir="$dir"
10236 found_so="$dir/lib$name.$shlibext"
10237 if test -f "$dir/lib$name.la"; then
10238 found_la="$dir/lib$name.la"
10239 fi
10240 else
10241 if test -f "$dir/lib$name.$libext"; then
10242 found_dir="$dir"
10243 found_a="$dir/lib$name.$libext"
10244 if test -f "$dir/lib$name.la"; then
10245 found_la="$dir/lib$name.la"
10246 fi
10247 fi
10248 fi
10249 ;;
10250 esac
10251 if test "X$found_dir" != "X"; then
10252 break
10253 fi
10254 done
10255 fi
10256 if test "X$found_dir" != "X"; then
10257 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$found_dir -l$name"
10258 if test "X$found_so" != "X"; then
10259 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
10260 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
10261 else
10262 haveit=
10263 for x in $ltrpathdirs; do
10264 if test "X$x" = "X$found_dir"; then
10265 haveit=yes
10266 break
10267 fi
10268 done
10269 if test -z "$haveit"; then
10270 ltrpathdirs="$ltrpathdirs $found_dir"
10271 fi
10272 if test "$hardcode_direct" = yes; then
10273 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
10274 else
10275 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
10276 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
10277 haveit=
10278 for x in $rpathdirs; do
10279 if test "X$x" = "X$found_dir"; then
10280 haveit=yes
10281 break
10282 fi
10283 done
10284 if test -z "$haveit"; then
10285 rpathdirs="$rpathdirs $found_dir"
10286 fi
10287 else
10288 haveit=
10289 for x in $LDFLAGS $LIBIPT; do
10290
10291 acl_save_prefix="$prefix"
10292 prefix="$acl_final_prefix"
10293 acl_save_exec_prefix="$exec_prefix"
10294 exec_prefix="$acl_final_exec_prefix"
10295 eval x=\"$x\"
10296 exec_prefix="$acl_save_exec_prefix"
10297 prefix="$acl_save_prefix"
10298
10299 if test "X$x" = "X-L$found_dir"; then
10300 haveit=yes
10301 break
10302 fi
10303 done
10304 if test -z "$haveit"; then
10305 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir"
10306 fi
10307 if test "$hardcode_minus_L" != no; then
10308 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
10309 else
10310 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
10311 fi
10312 fi
10313 fi
10314 fi
10315 else
10316 if test "X$found_a" != "X"; then
10317 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_a"
10318 else
10319 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir -l$name"
10320 fi
10321 fi
10322 additional_includedir=
10323 case "$found_dir" in
10324 */lib | */lib/)
10325 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
10326 additional_includedir="$basedir/include"
10327 ;;
10328 esac
10329 if test "X$additional_includedir" != "X"; then
10330 if test "X$additional_includedir" != "X/usr/include"; then
10331 haveit=
10332 if test "X$additional_includedir" = "X/usr/local/include"; then
10333 if test -n "$GCC"; then
10334 case $host_os in
10335 linux*) haveit=yes;;
10336 esac
10337 fi
10338 fi
10339 if test -z "$haveit"; then
10340 for x in $CPPFLAGS $INCIPT; do
10341
10342 acl_save_prefix="$prefix"
10343 prefix="$acl_final_prefix"
10344 acl_save_exec_prefix="$exec_prefix"
10345 exec_prefix="$acl_final_exec_prefix"
10346 eval x=\"$x\"
10347 exec_prefix="$acl_save_exec_prefix"
10348 prefix="$acl_save_prefix"
10349
10350 if test "X$x" = "X-I$additional_includedir"; then
10351 haveit=yes
10352 break
10353 fi
10354 done
10355 if test -z "$haveit"; then
10356 if test -d "$additional_includedir"; then
10357 INCIPT="${INCIPT}${INCIPT:+ }-I$additional_includedir"
10358 fi
10359 fi
10360 fi
10361 fi
10362 fi
10363 if test -n "$found_la"; then
10364 save_libdir="$libdir"
10365 case "$found_la" in
10366 */* | *\\*) . "$found_la" ;;
10367 *) . "./$found_la" ;;
10368 esac
10369 libdir="$save_libdir"
10370 for dep in $dependency_libs; do
10371 case "$dep" in
10372 -L*)
10373 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10374 if test "X$additional_libdir" != "X/usr/lib"; then
10375 haveit=
10376 if test "X$additional_libdir" = "X/usr/local/lib"; then
10377 if test -n "$GCC"; then
10378 case $host_os in
10379 linux*) haveit=yes;;
10380 esac
10381 fi
10382 fi
10383 if test -z "$haveit"; then
10384 haveit=
10385 for x in $LDFLAGS $LIBIPT; do
10386
10387 acl_save_prefix="$prefix"
10388 prefix="$acl_final_prefix"
10389 acl_save_exec_prefix="$exec_prefix"
10390 exec_prefix="$acl_final_exec_prefix"
10391 eval x=\"$x\"
10392 exec_prefix="$acl_save_exec_prefix"
10393 prefix="$acl_save_prefix"
10394
10395 if test "X$x" = "X-L$additional_libdir"; then
10396 haveit=yes
10397 break
10398 fi
10399 done
10400 if test -z "$haveit"; then
10401 if test -d "$additional_libdir"; then
10402 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$additional_libdir"
10403 fi
10404 fi
10405 haveit=
10406 for x in $LDFLAGS $LTLIBIPT; do
10407
10408 acl_save_prefix="$prefix"
10409 prefix="$acl_final_prefix"
10410 acl_save_exec_prefix="$exec_prefix"
10411 exec_prefix="$acl_final_exec_prefix"
10412 eval x=\"$x\"
10413 exec_prefix="$acl_save_exec_prefix"
10414 prefix="$acl_save_prefix"
10415
10416 if test "X$x" = "X-L$additional_libdir"; then
10417 haveit=yes
10418 break
10419 fi
10420 done
10421 if test -z "$haveit"; then
10422 if test -d "$additional_libdir"; then
10423 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$additional_libdir"
10424 fi
10425 fi
10426 fi
10427 fi
10428 ;;
10429 -R*)
10430 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10431 if test "$enable_rpath" != no; then
10432 haveit=
10433 for x in $rpathdirs; do
10434 if test "X$x" = "X$dir"; then
10435 haveit=yes
10436 break
10437 fi
10438 done
10439 if test -z "$haveit"; then
10440 rpathdirs="$rpathdirs $dir"
10441 fi
10442 haveit=
10443 for x in $ltrpathdirs; do
10444 if test "X$x" = "X$dir"; then
10445 haveit=yes
10446 break
10447 fi
10448 done
10449 if test -z "$haveit"; then
10450 ltrpathdirs="$ltrpathdirs $dir"
10451 fi
10452 fi
10453 ;;
10454 -l*)
10455 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10456 ;;
10457 *.la)
10458 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10459 ;;
10460 *)
10461 LIBIPT="${LIBIPT}${LIBIPT:+ }$dep"
10462 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$dep"
10463 ;;
10464 esac
10465 done
10466 fi
10467 else
10468 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
10469 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l$name"
10470 fi
10471 fi
10472 fi
10473 done
10474 done
10475 if test "X$rpathdirs" != "X"; then
10476 if test -n "$hardcode_libdir_separator"; then
10477 alldirs=
10478 for found_dir in $rpathdirs; do
10479 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10480 done
10481 acl_save_libdir="$libdir"
10482 libdir="$alldirs"
10483 eval flag=\"$hardcode_libdir_flag_spec\"
10484 libdir="$acl_save_libdir"
10485 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
10486 else
10487 for found_dir in $rpathdirs; do
10488 acl_save_libdir="$libdir"
10489 libdir="$found_dir"
10490 eval flag=\"$hardcode_libdir_flag_spec\"
10491 libdir="$acl_save_libdir"
10492 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
10493 done
10494 fi
10495 fi
10496 if test "X$ltrpathdirs" != "X"; then
10497 for found_dir in $ltrpathdirs; do
10498 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-R$found_dir"
10499 done
10500 fi
10501
10502
10503 ac_save_CPPFLAGS="$CPPFLAGS"
10504
10505 for element in $INCIPT; do
10506 haveit=
10507 for x in $CPPFLAGS; do
10508
10509 acl_save_prefix="$prefix"
10510 prefix="$acl_final_prefix"
10511 acl_save_exec_prefix="$exec_prefix"
10512 exec_prefix="$acl_final_exec_prefix"
10513 eval x=\"$x\"
10514 exec_prefix="$acl_save_exec_prefix"
10515 prefix="$acl_save_prefix"
10516
10517 if test "X$x" = "X$element"; then
10518 haveit=yes
10519 break
10520 fi
10521 done
10522 if test -z "$haveit"; then
10523 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10524 fi
10525 done
10526
10527
10528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libipt" >&5
10529$as_echo_n "checking for libipt... " >&6; }
10530if test "${ac_cv_libipt+set}" = set; then :
10531 $as_echo_n "(cached) " >&6
10532else
10533
10534 ac_save_LIBS="$LIBS"
10535 LIBS="$LIBS $LIBIPT"
10536 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10537/* end confdefs.h. */
10538#include "intel-pt.h"
10539int
10540main ()
10541{
10542pt_insn_alloc_decoder (0);
10543 ;
10544 return 0;
10545}
10546_ACEOF
10547if ac_fn_c_try_link "$LINENO"; then :
10548 ac_cv_libipt=yes
10549else
10550 ac_cv_libipt=no
10551fi
10552rm -f core conftest.err conftest.$ac_objext \
10553 conftest$ac_exeext conftest.$ac_ext
10554 LIBS="$ac_save_LIBS"
10555
10556fi
10557{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libipt" >&5
10558$as_echo "$ac_cv_libipt" >&6; }
10559 if test "$ac_cv_libipt" = yes; then
10560 HAVE_LIBIPT=yes
10561
10562$as_echo "#define HAVE_LIBIPT 1" >>confdefs.h
10563
10564 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libipt" >&5
10565$as_echo_n "checking how to link with libipt... " >&6; }
10566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBIPT" >&5
10567$as_echo "$LIBIPT" >&6; }
10568 else
10569 HAVE_LIBIPT=no
10570 CPPFLAGS="$ac_save_CPPFLAGS"
10571 LIBIPT=
10572 LTLIBIPT=
10573 fi
10574
10575
10576
10577
10578
10579
10580 if test "$HAVE_LIBIPT" != yes; then
10581 if test "$with_intel_pt" = yes; then
10582 as_fn_error "libipt is missing or unusable" "$LINENO" 5
10583 else
10584 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5
10585$as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be unavailable." >&2;}
10586 fi
10587 fi
10588fi
10589
81ecdfbb
RW
10590# ------------------------- #
10591# Checks for header files. #
10592# ------------------------- #
c890192f 10593
81ecdfbb
RW
10594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
10595$as_echo_n "checking for ANSI C header files... " >&6; }
10596if test "${ac_cv_header_stdc+set}" = set; then :
10597 $as_echo_n "(cached) " >&6
bec39cab 10598else
81ecdfbb 10599 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10600/* end confdefs.h. */
81ecdfbb
RW
10601#include <stdlib.h>
10602#include <stdarg.h>
10603#include <string.h>
10604#include <float.h>
10605
a9322a30
TT
10606int
10607main ()
10608{
a9322a30
TT
10609
10610 ;
10611 return 0;
10612}
bec39cab 10613_ACEOF
81ecdfbb
RW
10614if ac_fn_c_try_compile "$LINENO"; then :
10615 ac_cv_header_stdc=yes
bec39cab 10616else
81ecdfbb 10617 ac_cv_header_stdc=no
a9322a30 10618fi
81ecdfbb 10619rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 10620
81ecdfbb
RW
10621if test $ac_cv_header_stdc = yes; then
10622 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10623 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10624/* end confdefs.h. */
10625#include <string.h>
bec39cab 10626
81ecdfbb
RW
10627_ACEOF
10628if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10629 $EGREP "memchr" >/dev/null 2>&1; then :
bec39cab 10630
bec39cab 10631else
81ecdfbb
RW
10632 ac_cv_header_stdc=no
10633fi
10634rm -f conftest*
10635
10636fi
10637
10638if test $ac_cv_header_stdc = yes; then
10639 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10640 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10641/* end confdefs.h. */
10642#include <stdlib.h>
10643
bec39cab 10644_ACEOF
81ecdfbb
RW
10645if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10646 $EGREP "free" >/dev/null 2>&1; then :
06825bd1 10647
81ecdfbb
RW
10648else
10649 ac_cv_header_stdc=no
10650fi
10651rm -f conftest*
bec39cab 10652
bec39cab 10653fi
81ecdfbb
RW
10654
10655if test $ac_cv_header_stdc = yes; then
10656 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10657 if test "$cross_compiling" = yes; then :
10658 :
bec39cab 10659else
81ecdfbb 10660 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10661/* end confdefs.h. */
81ecdfbb
RW
10662#include <ctype.h>
10663#include <stdlib.h>
10664#if ((' ' & 0x0FF) == 0x020)
10665# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10666# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10667#else
10668# define ISLOWER(c) \
10669 (('a' <= (c) && (c) <= 'i') \
10670 || ('j' <= (c) && (c) <= 'r') \
10671 || ('s' <= (c) && (c) <= 'z'))
10672# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10673#endif
10674
10675#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
a9322a30
TT
10676int
10677main ()
10678{
81ecdfbb
RW
10679 int i;
10680 for (i = 0; i < 256; i++)
10681 if (XOR (islower (i), ISLOWER (i))
10682 || toupper (i) != TOUPPER (i))
10683 return 2;
a9322a30
TT
10684 return 0;
10685}
bec39cab 10686_ACEOF
81ecdfbb
RW
10687if ac_fn_c_try_run "$LINENO"; then :
10688
bec39cab 10689else
81ecdfbb
RW
10690 ac_cv_header_stdc=no
10691fi
10692rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10693 conftest.$ac_objext conftest.beam conftest.$ac_ext
10694fi
bec39cab 10695
bec39cab 10696fi
a9322a30 10697fi
81ecdfbb
RW
10698{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
10699$as_echo "$ac_cv_header_stdc" >&6; }
10700if test $ac_cv_header_stdc = yes; then
bec39cab 10701
81ecdfbb 10702$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5ee754fc 10703
81ecdfbb 10704fi
bec39cab 10705
81ecdfbb 10706# elf_hp.h is for HP/UX 64-bit shared library support.
9467110b 10707for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
161d1bec 10708 thread_db.h \
0080a2f6 10709 sys/fault.h \
81ecdfbb
RW
10710 sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
10711 sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
10712 sys/reg.h sys/debugreg.h sys/select.h sys/syscall.h \
9467110b 10713 termios.h termio.h \
3447c057 10714 sgtty.h elf_hp.h \
9467110b 10715 dlfcn.h
81ecdfbb
RW
10716do :
10717 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10718ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
10719eval as_val=\$$as_ac_Header
10720 if test "x$as_val" = x""yes; then :
bec39cab 10721 cat >>confdefs.h <<_ACEOF
81ecdfbb 10722#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 10723_ACEOF
c906108c 10724
bec39cab 10725fi
81ecdfbb
RW
10726
10727done
10728
81ecdfbb
RW
10729for ac_header in sys/proc.h
10730do :
10731 ac_fn_c_check_header_compile "$LINENO" "sys/proc.h" "ac_cv_header_sys_proc_h" "#if HAVE_SYS_PARAM_H
10732# include <sys/param.h>
10733#endif
c906108c 10734
81ecdfbb
RW
10735"
10736if test "x$ac_cv_header_sys_proc_h" = x""yes; then :
bec39cab 10737 cat >>confdefs.h <<_ACEOF
81ecdfbb 10738#define HAVE_SYS_PROC_H 1
bec39cab 10739_ACEOF
5ee754fc 10740
bec39cab 10741fi
81ecdfbb
RW
10742
10743done
10744
10745for ac_header in sys/user.h
10746do :
10747 ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
10748# include <sys/param.h>
a9322a30
TT
10749#endif
10750
81ecdfbb
RW
10751"
10752if test "x$ac_cv_header_sys_user_h" = x""yes; then :
10753 cat >>confdefs.h <<_ACEOF
10754#define HAVE_SYS_USER_H 1
bec39cab 10755_ACEOF
bec39cab 10756
a9322a30 10757fi
bec39cab 10758
81ecdfbb 10759done
5ee754fc 10760
5ee754fc 10761
81ecdfbb
RW
10762# On Solaris 2.[789], we need to define _MSE_INT_H to avoid a clash
10763# between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
10764# think that we don't have <curses.h> if we're using GCC.
10765case $host_os in
10766 solaris2.[789])
10767 if test "$GCC" = yes; then
10768
10769$as_echo "#define _MSE_INT_H 1" >>confdefs.h
10770
10771 fi ;;
10772esac
10773for ac_header in curses.h cursesX.h ncurses.h ncurses/ncurses.h ncurses/term.h
10774do :
10775 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10776ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
10777eval as_val=\$$as_ac_Header
10778 if test "x$as_val" = x""yes; then :
bec39cab 10779 cat >>confdefs.h <<_ACEOF
81ecdfbb 10780#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 10781_ACEOF
5ee754fc
MK
10782
10783fi
10784
81ecdfbb 10785done
bec39cab 10786
81ecdfbb
RW
10787for ac_header in term.h
10788do :
10789 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
10790# include <curses.h>
10791#endif
bec39cab 10792
81ecdfbb
RW
10793"
10794if test "x$ac_cv_header_term_h" = x""yes; then :
10795 cat >>confdefs.h <<_ACEOF
10796#define HAVE_TERM_H 1
a8111142 10797_ACEOF
a8111142 10798
a8111142 10799fi
a8111142 10800
81ecdfbb 10801done
a8111142
TT
10802
10803
81ecdfbb
RW
10804# ------------------------- #
10805# Checks for declarations. #
10806# ------------------------- #
a9322a30 10807
07697489
PA
10808
10809 # Check for presence and size of long long.
10810 ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
10811if test "x$ac_cv_type_long_long" = x""yes; then :
10812
10813cat >>confdefs.h <<_ACEOF
10814#define HAVE_LONG_LONG 1
10815_ACEOF
10816
10817# The cast to long int works around a bug in the HP C Compiler
10818# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10819# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10820# This bug is HP SR number 8606223364.
10821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
10822$as_echo_n "checking size of long long... " >&6; }
10823if test "${ac_cv_sizeof_long_long+set}" = set; then :
10824 $as_echo_n "(cached) " >&6
10825else
10826 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
10827
10828else
10829 if test "$ac_cv_type_long_long" = yes; then
10830 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10831$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10832{ as_fn_set_status 77
10833as_fn_error "cannot compute sizeof (long long)
10834See \`config.log' for more details." "$LINENO" 5; }; }
10835 else
10836 ac_cv_sizeof_long_long=0
10837 fi
10838fi
10839
10840fi
10841{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
10842$as_echo "$ac_cv_sizeof_long_long" >&6; }
10843
10844
10845
10846cat >>confdefs.h <<_ACEOF
10847#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
10848_ACEOF
10849
10850
10851fi
10852
10853
10854 ac_fn_c_check_decl "$LINENO" "basename(char *)" "ac_cv_have_decl_basename_char_p_" "$ac_includes_default"
10855if test "x$ac_cv_have_decl_basename_char_p_" = x""yes; then :
10856 ac_have_decl=1
10857else
10858 ac_have_decl=0
10859fi
10860
10861cat >>confdefs.h <<_ACEOF
10862#define HAVE_DECL_BASENAME $ac_have_decl
10863_ACEOF
10864ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default"
10865if test "x$ac_cv_have_decl_ffs" = x""yes; then :
10866 ac_have_decl=1
10867else
10868 ac_have_decl=0
10869fi
10870
10871cat >>confdefs.h <<_ACEOF
10872#define HAVE_DECL_FFS $ac_have_decl
10873_ACEOF
10874ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default"
10875if test "x$ac_cv_have_decl_asprintf" = x""yes; then :
10876 ac_have_decl=1
10877else
10878 ac_have_decl=0
10879fi
10880
10881cat >>confdefs.h <<_ACEOF
10882#define HAVE_DECL_ASPRINTF $ac_have_decl
10883_ACEOF
10884ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
10885if test "x$ac_cv_have_decl_vasprintf" = x""yes; then :
10886 ac_have_decl=1
10887else
10888 ac_have_decl=0
10889fi
10890
10891cat >>confdefs.h <<_ACEOF
10892#define HAVE_DECL_VASPRINTF $ac_have_decl
10893_ACEOF
10894ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
10895if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
10896 ac_have_decl=1
10897else
10898 ac_have_decl=0
10899fi
10900
10901cat >>confdefs.h <<_ACEOF
10902#define HAVE_DECL_SNPRINTF $ac_have_decl
10903_ACEOF
10904ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
10905if test "x$ac_cv_have_decl_vsnprintf" = x""yes; then :
10906 ac_have_decl=1
10907else
10908 ac_have_decl=0
10909fi
10910
10911cat >>confdefs.h <<_ACEOF
10912#define HAVE_DECL_VSNPRINTF $ac_have_decl
10913_ACEOF
10914
10915 ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default"
10916if test "x$ac_cv_have_decl_strtol" = x""yes; then :
10917 ac_have_decl=1
10918else
10919 ac_have_decl=0
10920fi
10921
10922cat >>confdefs.h <<_ACEOF
10923#define HAVE_DECL_STRTOL $ac_have_decl
10924_ACEOF
10925ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default"
10926if test "x$ac_cv_have_decl_strtoul" = x""yes; then :
10927 ac_have_decl=1
10928else
10929 ac_have_decl=0
10930fi
10931
10932cat >>confdefs.h <<_ACEOF
10933#define HAVE_DECL_STRTOUL $ac_have_decl
10934_ACEOF
10935ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
10936if test "x$ac_cv_have_decl_strtoll" = x""yes; then :
10937 ac_have_decl=1
10938else
10939 ac_have_decl=0
10940fi
10941
10942cat >>confdefs.h <<_ACEOF
10943#define HAVE_DECL_STRTOLL $ac_have_decl
10944_ACEOF
10945ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
10946if test "x$ac_cv_have_decl_strtoull" = x""yes; then :
10947 ac_have_decl=1
10948else
10949 ac_have_decl=0
10950fi
10951
10952cat >>confdefs.h <<_ACEOF
10953#define HAVE_DECL_STRTOULL $ac_have_decl
10954_ACEOF
10955
10956 ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default"
10957if test "x$ac_cv_have_decl_strverscmp" = x""yes; then :
10958 ac_have_decl=1
10959else
10960 ac_have_decl=0
10961fi
10962
10963cat >>confdefs.h <<_ACEOF
10964#define HAVE_DECL_STRVERSCMP $ac_have_decl
10965_ACEOF
10966
10967
10968
81ecdfbb
RW
10969ac_fn_c_check_decl "$LINENO" "free" "ac_cv_have_decl_free" "$ac_includes_default"
10970if test "x$ac_cv_have_decl_free" = x""yes; then :
10971 ac_have_decl=1
bec39cab 10972else
81ecdfbb
RW
10973 ac_have_decl=0
10974fi
10975
10976cat >>confdefs.h <<_ACEOF
10977#define HAVE_DECL_FREE $ac_have_decl
bec39cab 10978_ACEOF
81ecdfbb
RW
10979ac_fn_c_check_decl "$LINENO" "malloc" "ac_cv_have_decl_malloc" "$ac_includes_default"
10980if test "x$ac_cv_have_decl_malloc" = x""yes; then :
10981 ac_have_decl=1
10982else
10983 ac_have_decl=0
10984fi
10985
10986cat >>confdefs.h <<_ACEOF
10987#define HAVE_DECL_MALLOC $ac_have_decl
bec39cab 10988_ACEOF
81ecdfbb
RW
10989ac_fn_c_check_decl "$LINENO" "realloc" "ac_cv_have_decl_realloc" "$ac_includes_default"
10990if test "x$ac_cv_have_decl_realloc" = x""yes; then :
10991 ac_have_decl=1
bec39cab 10992else
81ecdfbb
RW
10993 ac_have_decl=0
10994fi
bec39cab 10995
81ecdfbb
RW
10996cat >>confdefs.h <<_ACEOF
10997#define HAVE_DECL_REALLOC $ac_have_decl
bec39cab 10998_ACEOF
81ecdfbb
RW
10999ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
11000if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
11001 ac_have_decl=1
11002else
11003 ac_have_decl=0
5ee754fc 11004fi
81ecdfbb
RW
11005
11006cat >>confdefs.h <<_ACEOF
11007#define HAVE_DECL_SNPRINTF $ac_have_decl
a9322a30 11008_ACEOF
5ee754fc 11009
5ee754fc 11010
81ecdfbb
RW
11011 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
11012$as_echo_n "checking for LC_MESSAGES... " >&6; }
11013if test "${am_cv_val_LC_MESSAGES+set}" = set; then :
11014 $as_echo_n "(cached) " >&6
bec39cab 11015else
81ecdfbb 11016 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11017/* end confdefs.h. */
81ecdfbb 11018#include <locale.h>
a9322a30
TT
11019int
11020main ()
11021{
81ecdfbb 11022return LC_MESSAGES
a9322a30
TT
11023 ;
11024 return 0;
11025}
bec39cab 11026_ACEOF
81ecdfbb
RW
11027if ac_fn_c_try_link "$LINENO"; then :
11028 am_cv_val_LC_MESSAGES=yes
bec39cab 11029else
81ecdfbb
RW
11030 am_cv_val_LC_MESSAGES=no
11031fi
11032rm -f core conftest.err conftest.$ac_objext \
11033 conftest$ac_exeext conftest.$ac_ext
11034fi
11035{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
11036$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
11037 if test $am_cv_val_LC_MESSAGES = yes; then
bec39cab 11038
81ecdfbb
RW
11039$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
11040
11041 fi
11042
11043
11044# ----------------------- #
11045# Checks for structures. #
11046# ----------------------- #
11047
11048ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
11049if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
11050
11051cat >>confdefs.h <<_ACEOF
11052#define HAVE_STRUCT_STAT_ST_BLOCKS 1
7eb368b3 11053_ACEOF
7eb368b3 11054
81ecdfbb 11055
7eb368b3 11056fi
81ecdfbb
RW
11057ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
11058if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
7eb368b3 11059
a9322a30
TT
11060cat >>confdefs.h <<_ACEOF
11061#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
7eb368b3
NR
11062_ACEOF
11063
a9322a30 11064
7eb368b3
NR
11065fi
11066
7eb368b3 11067
a9322a30
TT
11068# ------------------ #
11069# Checks for types. #
11070# ------------------ #
7eb368b3 11071
81ecdfbb
RW
11072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
11073$as_echo_n "checking return type of signal handlers... " >&6; }
11074if test "${ac_cv_type_signal+set}" = set; then :
11075 $as_echo_n "(cached) " >&6
bec39cab 11076else
81ecdfbb 11077 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11078/* end confdefs.h. */
a9322a30
TT
11079#include <sys/types.h>
11080#include <signal.h>
7cb9022a 11081
a9322a30
TT
11082int
11083main ()
11084{
81ecdfbb 11085return *(signal (0, 0)) (0) == 1;
a9322a30
TT
11086 ;
11087 return 0;
11088}
bec39cab 11089_ACEOF
81ecdfbb
RW
11090if ac_fn_c_try_compile "$LINENO"; then :
11091 ac_cv_type_signal=int
bec39cab 11092else
81ecdfbb 11093 ac_cv_type_signal=void
bec39cab 11094fi
81ecdfbb 11095rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 11096fi
81ecdfbb
RW
11097{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
11098$as_echo "$ac_cv_type_signal" >&6; }
bec39cab 11099
a9322a30
TT
11100cat >>confdefs.h <<_ACEOF
11101#define RETSIGTYPE $ac_cv_type_signal
11102_ACEOF
5ee754fc 11103
bec39cab 11104
81ecdfbb 11105ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
a9322a30
TT
11106#include <sys/socket.h>
11107
81ecdfbb
RW
11108"
11109if test "x$ac_cv_type_socklen_t" = x""yes; then :
bec39cab 11110
a9322a30
TT
11111cat >>confdefs.h <<_ACEOF
11112#define HAVE_SOCKLEN_T 1
11113_ACEOF
11114
11115
11116fi
11117
11118
11119# ------------------------------------- #
11120# Checks for compiler characteristics. #
11121# ------------------------------------- #
11122
81ecdfbb
RW
11123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11124$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
11125if test "${ac_cv_c_const+set}" = set; then :
11126 $as_echo_n "(cached) " >&6
a9322a30 11127else
81ecdfbb 11128 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11129/* end confdefs.h. */
a9322a30
TT
11130
11131int
11132main ()
11133{
11134/* FIXME: Include the comments suggested by Paul. */
11135#ifndef __cplusplus
11136 /* Ultrix mips cc rejects this. */
11137 typedef int charset[2];
81ecdfbb 11138 const charset cs;
a9322a30 11139 /* SunOS 4.1.1 cc rejects this. */
81ecdfbb
RW
11140 char const *const *pcpcc;
11141 char **ppc;
a9322a30
TT
11142 /* NEC SVR4.0.2 mips cc rejects this. */
11143 struct point {int x, y;};
11144 static struct point const zero = {0,0};
11145 /* AIX XL C 1.02.0.0 rejects this.
11146 It does not let you subtract one const X* pointer from another in
11147 an arm of an if-expression whose if-part is not a constant
11148 expression */
11149 const char *g = "string";
81ecdfbb 11150 pcpcc = &g + (g ? g-g : 0);
a9322a30 11151 /* HPUX 7.0 cc rejects these. */
81ecdfbb
RW
11152 ++pcpcc;
11153 ppc = (char**) pcpcc;
11154 pcpcc = (char const *const *) ppc;
a9322a30
TT
11155 { /* SCO 3.2v4 cc rejects this. */
11156 char *t;
11157 char const *s = 0 ? (char *) 0 : (char const *) 0;
11158
11159 *t++ = 0;
81ecdfbb 11160 if (s) return 0;
a9322a30
TT
11161 }
11162 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11163 int x[] = {25, 17};
11164 const int *foo = &x[0];
11165 ++foo;
11166 }
11167 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11168 typedef const int *iptr;
11169 iptr p = 0;
11170 ++p;
11171 }
11172 { /* AIX XL C 1.02.0.0 rejects this saying
11173 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11174 struct s { int j; const int *ap[3]; };
11175 struct s *b; b->j = 5;
11176 }
11177 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11178 const int foo = 10;
81ecdfbb 11179 if (!foo) return 0;
a9322a30 11180 }
81ecdfbb 11181 return !cs[0] && !zero.x;
a9322a30
TT
11182#endif
11183
11184 ;
11185 return 0;
11186}
bec39cab 11187_ACEOF
81ecdfbb 11188if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 11189 ac_cv_c_const=yes
5ee754fc 11190else
81ecdfbb 11191 ac_cv_c_const=no
5ee754fc 11192fi
81ecdfbb 11193rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 11194fi
81ecdfbb
RW
11195{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11196$as_echo "$ac_cv_c_const" >&6; }
a9322a30 11197if test $ac_cv_c_const = no; then
bec39cab 11198
81ecdfbb 11199$as_echo "#define const /**/" >>confdefs.h
bec39cab 11200
5ee754fc 11201fi
bec39cab 11202
81ecdfbb
RW
11203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
11204$as_echo_n "checking for inline... " >&6; }
11205if test "${ac_cv_c_inline+set}" = set; then :
11206 $as_echo_n "(cached) " >&6
bec39cab 11207else
a9322a30
TT
11208 ac_cv_c_inline=no
11209for ac_kw in inline __inline__ __inline; do
81ecdfbb 11210 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11211/* end confdefs.h. */
a9322a30
TT
11212#ifndef __cplusplus
11213typedef int foo_t;
11214static $ac_kw foo_t static_foo () {return 0; }
11215$ac_kw foo_t foo () {return 0; }
11216#endif
11217
bec39cab 11218_ACEOF
81ecdfbb
RW
11219if ac_fn_c_try_compile "$LINENO"; then :
11220 ac_cv_c_inline=$ac_kw
bec39cab 11221fi
81ecdfbb
RW
11222rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11223 test "$ac_cv_c_inline" != no && break
a9322a30 11224done
bec39cab 11225
5ee754fc 11226fi
81ecdfbb
RW
11227{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
11228$as_echo "$ac_cv_c_inline" >&6; }
5ee754fc 11229
a9322a30
TT
11230case $ac_cv_c_inline in
11231 inline | yes) ;;
11232 *)
11233 case $ac_cv_c_inline in
11234 no) ac_val=;;
11235 *) ac_val=$ac_cv_c_inline;;
11236 esac
11237 cat >>confdefs.h <<_ACEOF
11238#ifndef __cplusplus
11239#define inline $ac_val
11240#endif
11241_ACEOF
bec39cab
AC
11242 ;;
11243esac
bec39cab 11244
81ecdfbb
RW
11245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
11246$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
11247if test "${ac_cv_c_bigendian+set}" = set; then :
11248 $as_echo_n "(cached) " >&6
bec39cab 11249else
81ecdfbb
RW
11250 ac_cv_c_bigendian=unknown
11251 # See if we're dealing with a universal compiler.
11252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11253/* end confdefs.h. */
11254#ifndef __APPLE_CC__
11255 not a universal capable compiler
11256 #endif
11257 typedef int dummy;
11258
11259_ACEOF
11260if ac_fn_c_try_compile "$LINENO"; then :
11261
11262 # Check for potential -arch flags. It is not universal unless
11263 # there are at least two -arch flags with different values.
11264 ac_arch=
11265 ac_prev=
11266 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
11267 if test -n "$ac_prev"; then
11268 case $ac_word in
11269 i?86 | x86_64 | ppc | ppc64)
11270 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
11271 ac_arch=$ac_word
11272 else
11273 ac_cv_c_bigendian=universal
11274 break
11275 fi
11276 ;;
11277 esac
11278 ac_prev=
11279 elif test "x$ac_word" = "x-arch"; then
11280 ac_prev=arch
11281 fi
11282 done
11283fi
11284rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11285 if test $ac_cv_c_bigendian = unknown; then
11286 # See if sys/param.h defines the BYTE_ORDER macro.
11287 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11288/* end confdefs.h. */
a9322a30 11289#include <sys/types.h>
81ecdfbb 11290 #include <sys/param.h>
a9322a30
TT
11291
11292int
11293main ()
11294{
81ecdfbb
RW
11295#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
11296 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
11297 && LITTLE_ENDIAN)
11298 bogus endian macros
11299 #endif
a9322a30
TT
11300
11301 ;
11302 return 0;
11303}
bec39cab 11304_ACEOF
81ecdfbb 11305if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 11306 # It does; now see whether it defined to BIG_ENDIAN or not.
81ecdfbb 11307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11308/* end confdefs.h. */
a9322a30 11309#include <sys/types.h>
81ecdfbb 11310 #include <sys/param.h>
a9322a30
TT
11311
11312int
11313main ()
11314{
11315#if BYTE_ORDER != BIG_ENDIAN
81ecdfbb
RW
11316 not big endian
11317 #endif
a9322a30
TT
11318
11319 ;
11320 return 0;
11321}
bec39cab 11322_ACEOF
81ecdfbb 11323if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 11324 ac_cv_c_bigendian=yes
5ee754fc 11325else
81ecdfbb 11326 ac_cv_c_bigendian=no
5ee754fc 11327fi
81ecdfbb
RW
11328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11329fi
11330rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11331 fi
11332 if test $ac_cv_c_bigendian = unknown; then
11333 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
11334 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11335/* end confdefs.h. */
11336#include <limits.h>
bec39cab 11337
81ecdfbb
RW
11338int
11339main ()
11340{
11341#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
11342 bogus endian macros
11343 #endif
11344
11345 ;
11346 return 0;
11347}
7eb368b3 11348_ACEOF
81ecdfbb
RW
11349if ac_fn_c_try_compile "$LINENO"; then :
11350 # It does; now see whether it defined to _BIG_ENDIAN or not.
11351 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7eb368b3 11352/* end confdefs.h. */
81ecdfbb
RW
11353#include <limits.h>
11354
7eb368b3
NR
11355int
11356main ()
11357{
81ecdfbb
RW
11358#ifndef _BIG_ENDIAN
11359 not big endian
11360 #endif
11361
7eb368b3
NR
11362 ;
11363 return 0;
11364}
11365_ACEOF
81ecdfbb 11366if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 11367 ac_cv_c_bigendian=yes
81ecdfbb
RW
11368else
11369 ac_cv_c_bigendian=no
a9322a30 11370fi
81ecdfbb 11371rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30 11372fi
81ecdfbb
RW
11373rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11374 fi
11375 if test $ac_cv_c_bigendian = unknown; then
11376 # Compile a test program.
11377 if test "$cross_compiling" = yes; then :
11378 # Try to guess by grepping values from an object file.
11379 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11380/* end confdefs.h. */
11381short int ascii_mm[] =
11382 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
11383 short int ascii_ii[] =
11384 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
11385 int use_ascii (int i) {
11386 return ascii_mm[i] + ascii_ii[i];
11387 }
11388 short int ebcdic_ii[] =
11389 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
11390 short int ebcdic_mm[] =
11391 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
11392 int use_ebcdic (int i) {
11393 return ebcdic_mm[i] + ebcdic_ii[i];
11394 }
11395 extern int foo;
7eb368b3 11396
81ecdfbb
RW
11397int
11398main ()
11399{
11400return use_ascii (foo) == use_ebcdic (foo);
11401 ;
11402 return 0;
11403}
11404_ACEOF
11405if ac_fn_c_try_compile "$LINENO"; then :
11406 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
11407 ac_cv_c_bigendian=yes
11408 fi
11409 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
11410 if test "$ac_cv_c_bigendian" = unknown; then
11411 ac_cv_c_bigendian=no
11412 else
11413 # finding both strings is unlikely to happen, but who knows?
11414 ac_cv_c_bigendian=unknown
11415 fi
11416 fi
7eb368b3 11417fi
81ecdfbb 11418rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 11419else
81ecdfbb 11420 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11421/* end confdefs.h. */
81ecdfbb 11422$ac_includes_default
d3ea6809
MM
11423int
11424main ()
11425{
81ecdfbb
RW
11426
11427 /* Are we little or big endian? From Harbison&Steele. */
11428 union
11429 {
11430 long int l;
11431 char c[sizeof (long int)];
11432 } u;
11433 u.l = 1;
11434 return u.c[sizeof (long int) - 1] == 1;
11435
11436 ;
11437 return 0;
d3ea6809
MM
11438}
11439_ACEOF
81ecdfbb 11440if ac_fn_c_try_run "$LINENO"; then :
a9322a30 11441 ac_cv_c_bigendian=no
d3ea6809 11442else
81ecdfbb 11443 ac_cv_c_bigendian=yes
d3ea6809 11444fi
81ecdfbb
RW
11445rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11446 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 11447fi
a9322a30 11448
81ecdfbb
RW
11449 fi
11450fi
11451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
11452$as_echo "$ac_cv_c_bigendian" >&6; }
11453 case $ac_cv_c_bigendian in #(
11454 yes)
11455 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
11456;; #(
11457 no)
11458 ;; #(
11459 universal)
11460
11461$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
11462
11463 ;; #(
11464 *)
11465 as_fn_error "unknown endianness
11466 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
11467 esac
d3ea6809
MM
11468
11469
a9322a30
TT
11470# ------------------------------ #
11471# Checks for library functions. #
11472# ------------------------------ #
d3ea6809 11473
a9322a30 11474for ac_header in stdlib.h unistd.h
81ecdfbb
RW
11475do :
11476 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11477ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
11478eval as_val=\$$as_ac_Header
11479 if test "x$as_val" = x""yes; then :
bec39cab 11480 cat >>confdefs.h <<_ACEOF
81ecdfbb 11481#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 11482_ACEOF
b757528f 11483
b757528f 11484fi
bec39cab 11485
a9322a30 11486done
a3828db0 11487
a9322a30 11488for ac_func in getpagesize
81ecdfbb
RW
11489do :
11490 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
11491if test "x$ac_cv_func_getpagesize" = x""yes; then :
bec39cab 11492 cat >>confdefs.h <<_ACEOF
81ecdfbb 11493#define HAVE_GETPAGESIZE 1
bec39cab 11494_ACEOF
bcb3dc3d 11495
bcb3dc3d
MK
11496fi
11497done
11498
81ecdfbb
RW
11499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
11500$as_echo_n "checking for working mmap... " >&6; }
11501if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then :
11502 $as_echo_n "(cached) " >&6
a9322a30 11503else
81ecdfbb 11504 if test "$cross_compiling" = yes; then :
a9322a30 11505 ac_cv_func_mmap_fixed_mapped=no
bec39cab 11506else
81ecdfbb 11507 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11508/* end confdefs.h. */
a9322a30
TT
11509$ac_includes_default
11510/* malloc might have been renamed as rpl_malloc. */
11511#undef malloc
bec39cab 11512
a9322a30
TT
11513/* Thanks to Mike Haertel and Jim Avera for this test.
11514 Here is a matrix of mmap possibilities:
11515 mmap private not fixed
11516 mmap private fixed at somewhere currently unmapped
11517 mmap private fixed at somewhere already mapped
11518 mmap shared not fixed
11519 mmap shared fixed at somewhere currently unmapped
11520 mmap shared fixed at somewhere already mapped
11521 For private mappings, we should verify that changes cannot be read()
11522 back from the file, nor mmap's back from the file at a different
11523 address. (There have been systems where private was not correctly
11524 implemented like the infamous i386 svr4.0, and systems where the
11525 VM page cache was not coherent with the file system buffer cache
11526 like early versions of FreeBSD and possibly contemporary NetBSD.)
11527 For shared mappings, we should conversely verify that changes get
11528 propagated back to all the places they're supposed to be.
bec39cab 11529
a9322a30
TT
11530 Grep wants private fixed already mapped.
11531 The main things grep needs to know about mmap are:
11532 * does it exist and is it safe to write into the mmap'd area
11533 * how to use it (BSD variants) */
8b9cf735 11534
a9322a30
TT
11535#include <fcntl.h>
11536#include <sys/mman.h>
8b9cf735 11537
81ecdfbb 11538#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
a9322a30 11539char *malloc ();
a3828db0
MK
11540#endif
11541
a9322a30 11542/* This mess was copied from the GNU getpagesize.h. */
81ecdfbb 11543#ifndef HAVE_GETPAGESIZE
a9322a30 11544/* Assume that all systems that can run configure have sys/param.h. */
81ecdfbb 11545# ifndef HAVE_SYS_PARAM_H
a9322a30
TT
11546# define HAVE_SYS_PARAM_H 1
11547# endif
11548
11549# ifdef _SC_PAGESIZE
11550# define getpagesize() sysconf(_SC_PAGESIZE)
11551# else /* no _SC_PAGESIZE */
81ecdfbb 11552# ifdef HAVE_SYS_PARAM_H
a9322a30
TT
11553# include <sys/param.h>
11554# ifdef EXEC_PAGESIZE
11555# define getpagesize() EXEC_PAGESIZE
11556# else /* no EXEC_PAGESIZE */
11557# ifdef NBPG
11558# define getpagesize() NBPG * CLSIZE
11559# ifndef CLSIZE
11560# define CLSIZE 1
11561# endif /* no CLSIZE */
11562# else /* no NBPG */
11563# ifdef NBPC
11564# define getpagesize() NBPC
11565# else /* no NBPC */
11566# ifdef PAGESIZE
11567# define getpagesize() PAGESIZE
11568# endif /* PAGESIZE */
11569# endif /* no NBPC */
11570# endif /* no NBPG */
11571# endif /* no EXEC_PAGESIZE */
11572# else /* no HAVE_SYS_PARAM_H */
11573# define getpagesize() 8192 /* punt totally */
11574# endif /* no HAVE_SYS_PARAM_H */
11575# endif /* no _SC_PAGESIZE */
11576
11577#endif /* no HAVE_GETPAGESIZE */
11578
bec39cab
AC
11579int
11580main ()
11581{
a9322a30
TT
11582 char *data, *data2, *data3;
11583 int i, pagesize;
11584 int fd;
11585
11586 pagesize = getpagesize ();
11587
11588 /* First, make a file with some known garbage in it. */
11589 data = (char *) malloc (pagesize);
11590 if (!data)
81ecdfbb 11591 return 1;
a9322a30
TT
11592 for (i = 0; i < pagesize; ++i)
11593 *(data + i) = rand ();
11594 umask (0);
11595 fd = creat ("conftest.mmap", 0600);
11596 if (fd < 0)
81ecdfbb 11597 return 1;
a9322a30 11598 if (write (fd, data, pagesize) != pagesize)
81ecdfbb 11599 return 1;
a9322a30
TT
11600 close (fd);
11601
11602 /* Next, try to mmap the file at a fixed address which already has
11603 something else allocated at it. If we can, also make sure that
11604 we see the same garbage. */
11605 fd = open ("conftest.mmap", O_RDWR);
11606 if (fd < 0)
81ecdfbb 11607 return 1;
a9322a30
TT
11608 data2 = (char *) malloc (2 * pagesize);
11609 if (!data2)
81ecdfbb
RW
11610 return 1;
11611 data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
a9322a30
TT
11612 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
11613 MAP_PRIVATE | MAP_FIXED, fd, 0L))
81ecdfbb 11614 return 1;
a9322a30
TT
11615 for (i = 0; i < pagesize; ++i)
11616 if (*(data + i) != *(data2 + i))
81ecdfbb 11617 return 1;
a9322a30
TT
11618
11619 /* Finally, make sure that changes to the mapped area do not
11620 percolate back to the file as seen by read(). (This is a bug on
11621 some variants of i386 svr4.0.) */
11622 for (i = 0; i < pagesize; ++i)
11623 *(data2 + i) = *(data2 + i) + 1;
11624 data3 = (char *) malloc (pagesize);
11625 if (!data3)
81ecdfbb 11626 return 1;
a9322a30 11627 if (read (fd, data3, pagesize) != pagesize)
81ecdfbb 11628 return 1;
a9322a30
TT
11629 for (i = 0; i < pagesize; ++i)
11630 if (*(data + i) != *(data3 + i))
81ecdfbb 11631 return 1;
a9322a30 11632 close (fd);
81ecdfbb 11633 return 0;
bec39cab
AC
11634}
11635_ACEOF
81ecdfbb 11636if ac_fn_c_try_run "$LINENO"; then :
a9322a30 11637 ac_cv_func_mmap_fixed_mapped=yes
086ec9eb 11638else
81ecdfbb 11639 ac_cv_func_mmap_fixed_mapped=no
a3828db0 11640fi
81ecdfbb
RW
11641rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11642 conftest.$ac_objext conftest.beam conftest.$ac_ext
a3828db0 11643fi
81ecdfbb 11644
a9322a30 11645fi
81ecdfbb
RW
11646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
11647$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
a9322a30
TT
11648if test $ac_cv_func_mmap_fixed_mapped = yes; then
11649
81ecdfbb 11650$as_echo "#define HAVE_MMAP 1" >>confdefs.h
a3828db0 11651
086ec9eb 11652fi
a9322a30 11653rm -f conftest.mmap
a3828db0 11654
81ecdfbb
RW
11655ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
11656if test "x$ac_cv_type_pid_t" = x""yes; then :
bec39cab 11657
a9322a30
TT
11658else
11659
11660cat >>confdefs.h <<_ACEOF
11661#define pid_t int
bec39cab 11662_ACEOF
086ec9eb
MK
11663
11664fi
11665
81ecdfbb
RW
11666for ac_header in vfork.h
11667do :
11668 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
11669if test "x$ac_cv_header_vfork_h" = x""yes; then :
a3828db0 11670 cat >>confdefs.h <<_ACEOF
81ecdfbb 11671#define HAVE_VFORK_H 1
bec39cab 11672_ACEOF
c906108c
SS
11673
11674fi
a9322a30 11675
a3828db0 11676done
c906108c 11677
a9322a30 11678for ac_func in fork vfork
81ecdfbb
RW
11679do :
11680 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11681ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11682eval as_val=\$$as_ac_var
11683 if test "x$as_val" = x""yes; then :
a3828db0 11684 cat >>confdefs.h <<_ACEOF
81ecdfbb 11685#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 11686_ACEOF
b83266a0 11687
97bf5e38 11688fi
a3828db0 11689done
b83266a0 11690
a9322a30 11691if test "x$ac_cv_func_fork" = xyes; then
81ecdfbb
RW
11692 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
11693$as_echo_n "checking for working fork... " >&6; }
11694if test "${ac_cv_func_fork_works+set}" = set; then :
11695 $as_echo_n "(cached) " >&6
a9322a30 11696else
81ecdfbb 11697 if test "$cross_compiling" = yes; then :
a9322a30
TT
11698 ac_cv_func_fork_works=cross
11699else
81ecdfbb
RW
11700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11701/* end confdefs.h. */
11702$ac_includes_default
11703int
11704main ()
11705{
11706
11707 /* By Ruediger Kuhlmann. */
11708 return fork () < 0;
11709
11710 ;
11711 return 0;
11712}
a9322a30 11713_ACEOF
81ecdfbb 11714if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
11715 ac_cv_func_fork_works=yes
11716else
81ecdfbb 11717 ac_cv_func_fork_works=no
a9322a30 11718fi
81ecdfbb
RW
11719rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11720 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 11721fi
81ecdfbb 11722
a9322a30 11723fi
81ecdfbb
RW
11724{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
11725$as_echo "$ac_cv_func_fork_works" >&6; }
a9322a30
TT
11726
11727else
11728 ac_cv_func_fork_works=$ac_cv_func_fork
11729fi
11730if test "x$ac_cv_func_fork_works" = xcross; then
11731 case $host in
11732 *-*-amigaos* | *-*-msdosdjgpp*)
11733 # Override, as these systems have only a dummy fork() stub
11734 ac_cv_func_fork_works=no
11735 ;;
11736 *)
11737 ac_cv_func_fork_works=yes
11738 ;;
11739 esac
81ecdfbb
RW
11740 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
11741$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
a9322a30
TT
11742fi
11743ac_cv_func_vfork_works=$ac_cv_func_vfork
11744if test "x$ac_cv_func_vfork" = xyes; then
81ecdfbb
RW
11745 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
11746$as_echo_n "checking for working vfork... " >&6; }
11747if test "${ac_cv_func_vfork_works+set}" = set; then :
11748 $as_echo_n "(cached) " >&6
a9322a30 11749else
81ecdfbb 11750 if test "$cross_compiling" = yes; then :
a9322a30
TT
11751 ac_cv_func_vfork_works=cross
11752else
81ecdfbb 11753 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30
TT
11754/* end confdefs.h. */
11755/* Thanks to Paul Eggert for this test. */
81ecdfbb 11756$ac_includes_default
a9322a30 11757#include <sys/wait.h>
81ecdfbb 11758#ifdef HAVE_VFORK_H
a9322a30
TT
11759# include <vfork.h>
11760#endif
11761/* On some sparc systems, changes by the child to local and incoming
11762 argument registers are propagated back to the parent. The compiler
11763 is told about this with #include <vfork.h>, but some compilers
11764 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
11765 static variable whose address is put into a register that is
11766 clobbered by the vfork. */
11767static void
11768#ifdef __cplusplus
11769sparc_address_test (int arg)
11770# else
11771sparc_address_test (arg) int arg;
11772#endif
11773{
11774 static pid_t child;
11775 if (!child) {
11776 child = vfork ();
11777 if (child < 0) {
11778 perror ("vfork");
11779 _exit(2);
11780 }
11781 if (!child) {
11782 arg = getpid();
11783 write(-1, "", 0);
11784 _exit (arg);
11785 }
11786 }
11787}
11788
11789int
11790main ()
11791{
11792 pid_t parent = getpid ();
11793 pid_t child;
11794
11795 sparc_address_test (0);
11796
11797 child = vfork ();
11798
11799 if (child == 0) {
11800 /* Here is another test for sparc vfork register problems. This
11801 test uses lots of local variables, at least as many local
11802 variables as main has allocated so far including compiler
11803 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
11804 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
11805 reuse the register of parent for one of the local variables,
11806 since it will think that parent can't possibly be used any more
11807 in this routine. Assigning to the local variable will thus
11808 munge parent in the parent process. */
11809 pid_t
11810 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
11811 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
11812 /* Convince the compiler that p..p7 are live; otherwise, it might
11813 use the same hardware register for all 8 local variables. */
11814 if (p != p1 || p != p2 || p != p3 || p != p4
11815 || p != p5 || p != p6 || p != p7)
11816 _exit(1);
11817
11818 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
11819 from child file descriptors. If the child closes a descriptor
11820 before it execs or exits, this munges the parent's descriptor
11821 as well. Test for this by closing stdout in the child. */
11822 _exit(close(fileno(stdout)) != 0);
11823 } else {
11824 int status;
11825 struct stat st;
11826
11827 while (wait(&status) != child)
11828 ;
81ecdfbb 11829 return (
a9322a30
TT
11830 /* Was there some problem with vforking? */
11831 child < 0
11832
11833 /* Did the child fail? (This shouldn't happen.) */
11834 || status
11835
11836 /* Did the vfork/compiler bug occur? */
11837 || parent != getpid()
11838
11839 /* Did the file descriptor bug occur? */
11840 || fstat(fileno(stdout), &st) != 0
11841 );
11842 }
11843}
11844_ACEOF
81ecdfbb 11845if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
11846 ac_cv_func_vfork_works=yes
11847else
81ecdfbb 11848 ac_cv_func_vfork_works=no
a9322a30 11849fi
81ecdfbb
RW
11850rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11851 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 11852fi
81ecdfbb 11853
a9322a30 11854fi
81ecdfbb
RW
11855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
11856$as_echo "$ac_cv_func_vfork_works" >&6; }
a9322a30
TT
11857
11858fi;
11859if test "x$ac_cv_func_fork_works" = xcross; then
11860 ac_cv_func_vfork_works=$ac_cv_func_vfork
81ecdfbb
RW
11861 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
11862$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
a9322a30
TT
11863fi
11864
11865if test "x$ac_cv_func_vfork_works" = xyes; then
11866
81ecdfbb 11867$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
a9322a30
TT
11868
11869else
11870
81ecdfbb 11871$as_echo "#define vfork fork" >>confdefs.h
a9322a30
TT
11872
11873fi
11874if test "x$ac_cv_func_fork_works" = xyes; then
11875
81ecdfbb 11876$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
a9322a30
TT
11877
11878fi
11879
cdf43629 11880for ac_func in getauxval getrusage getuid getgid \
bdca27a2 11881 pipe poll pread pread64 pwrite resize_term \
7313baad 11882 sbrk setpgid setpgrp setsid \
9467110b 11883 sigaction sigprocmask sigsetmask socketpair \
110ed339 11884 ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
3332aaf2 11885 setrlimit getrlimit posix_madvise waitpid \
4b8b5e72 11886 ptrace64 sigaltstack mkdtemp setns
81ecdfbb
RW
11887do :
11888 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11889ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11890eval as_val=\$$as_ac_var
11891 if test "x$as_val" = x""yes; then :
6c7a06a3 11892 cat >>confdefs.h <<_ACEOF
81ecdfbb 11893#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6c7a06a3
TT
11894_ACEOF
11895
11896fi
11897done
11898
11899
81ecdfbb
RW
11900 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
11901$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
11902if test "${am_cv_langinfo_codeset+set}" = set; then :
11903 $as_echo_n "(cached) " >&6
6c7a06a3 11904else
81ecdfbb 11905 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
11906/* end confdefs.h. */
11907#include <langinfo.h>
11908int
11909main ()
11910{
11911char* cs = nl_langinfo(CODESET);
bec39cab
AC
11912 ;
11913 return 0;
11914}
11915_ACEOF
81ecdfbb 11916if ac_fn_c_try_link "$LINENO"; then :
6c7a06a3 11917 am_cv_langinfo_codeset=yes
a4db0f07 11918else
81ecdfbb 11919 am_cv_langinfo_codeset=no
a4db0f07 11920fi
81ecdfbb
RW
11921rm -f core conftest.err conftest.$ac_objext \
11922 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 11923
a4db0f07 11924fi
81ecdfbb
RW
11925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
11926$as_echo "$am_cv_langinfo_codeset" >&6; }
6c7a06a3
TT
11927 if test $am_cv_langinfo_codeset = yes; then
11928
81ecdfbb 11929$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
a4db0f07 11930
6c7a06a3 11931 fi
c906108c 11932
06825bd1 11933
3266f10b
TT
11934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
11935$as_echo_n "checking for ANSI C header files... " >&6; }
11936if test "${ac_cv_header_stdc+set}" = set; then :
11937 $as_echo_n "(cached) " >&6
11938else
11939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11940/* end confdefs.h. */
11941#include <stdlib.h>
11942#include <stdarg.h>
11943#include <string.h>
11944#include <float.h>
11945
11946int
11947main ()
11948{
11949
11950 ;
11951 return 0;
11952}
11953_ACEOF
11954if ac_fn_c_try_compile "$LINENO"; then :
11955 ac_cv_header_stdc=yes
11956else
11957 ac_cv_header_stdc=no
11958fi
11959rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11960
11961if test $ac_cv_header_stdc = yes; then
11962 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11963 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11964/* end confdefs.h. */
11965#include <string.h>
11966
11967_ACEOF
11968if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11969 $EGREP "memchr" >/dev/null 2>&1; then :
11970
11971else
11972 ac_cv_header_stdc=no
11973fi
11974rm -f conftest*
11975
11976fi
11977
11978if test $ac_cv_header_stdc = yes; then
11979 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11980 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11981/* end confdefs.h. */
11982#include <stdlib.h>
11983
11984_ACEOF
11985if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11986 $EGREP "free" >/dev/null 2>&1; then :
11987
11988else
11989 ac_cv_header_stdc=no
11990fi
11991rm -f conftest*
11992
11993fi
11994
11995if test $ac_cv_header_stdc = yes; then
11996 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11997 if test "$cross_compiling" = yes; then :
11998 :
11999else
12000 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12001/* end confdefs.h. */
12002#include <ctype.h>
12003#include <stdlib.h>
12004#if ((' ' & 0x0FF) == 0x020)
12005# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12006# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12007#else
12008# define ISLOWER(c) \
12009 (('a' <= (c) && (c) <= 'i') \
12010 || ('j' <= (c) && (c) <= 'r') \
12011 || ('s' <= (c) && (c) <= 'z'))
12012# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12013#endif
12014
12015#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12016int
12017main ()
12018{
12019 int i;
12020 for (i = 0; i < 256; i++)
12021 if (XOR (islower (i), ISLOWER (i))
12022 || toupper (i) != TOUPPER (i))
12023 return 2;
12024 return 0;
12025}
12026_ACEOF
12027if ac_fn_c_try_run "$LINENO"; then :
12028
12029else
12030 ac_cv_header_stdc=no
12031fi
12032rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12033 conftest.$ac_objext conftest.beam conftest.$ac_ext
12034fi
12035
12036fi
12037fi
12038{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
12039$as_echo "$ac_cv_header_stdc" >&6; }
12040if test $ac_cv_header_stdc = yes; then
12041
12042$as_echo "#define STDC_HEADERS 1" >>confdefs.h
12043
3266f10b
TT
12044fi
12045
12046 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
12047# for constant arguments. Useless!
12048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
12049$as_echo_n "checking for working alloca.h... " >&6; }
12050if test "${ac_cv_working_alloca_h+set}" = set; then :
12051 $as_echo_n "(cached) " >&6
12052else
12053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12054/* end confdefs.h. */
12055#include <alloca.h>
12056int
12057main ()
12058{
12059char *p = (char *) alloca (2 * sizeof (int));
12060 if (p) return 0;
12061 ;
12062 return 0;
12063}
12064_ACEOF
12065if ac_fn_c_try_link "$LINENO"; then :
12066 ac_cv_working_alloca_h=yes
12067else
12068 ac_cv_working_alloca_h=no
12069fi
12070rm -f core conftest.err conftest.$ac_objext \
12071 conftest$ac_exeext conftest.$ac_ext
12072fi
12073{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
12074$as_echo "$ac_cv_working_alloca_h" >&6; }
12075if test $ac_cv_working_alloca_h = yes; then
12076
12077$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
12078
12079fi
12080
12081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
12082$as_echo_n "checking for alloca... " >&6; }
12083if test "${ac_cv_func_alloca_works+set}" = set; then :
12084 $as_echo_n "(cached) " >&6
12085else
12086 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12087/* end confdefs.h. */
12088#ifdef __GNUC__
12089# define alloca __builtin_alloca
12090#else
12091# ifdef _MSC_VER
12092# include <malloc.h>
12093# define alloca _alloca
12094# else
12095# ifdef HAVE_ALLOCA_H
12096# include <alloca.h>
12097# else
12098# ifdef _AIX
12099 #pragma alloca
12100# else
12101# ifndef alloca /* predefined by HP cc +Olibcalls */
12102char *alloca ();
12103# endif
12104# endif
12105# endif
12106# endif
12107#endif
12108
12109int
12110main ()
12111{
12112char *p = (char *) alloca (1);
12113 if (p) return 0;
12114 ;
12115 return 0;
12116}
12117_ACEOF
12118if ac_fn_c_try_link "$LINENO"; then :
12119 ac_cv_func_alloca_works=yes
12120else
12121 ac_cv_func_alloca_works=no
12122fi
12123rm -f core conftest.err conftest.$ac_objext \
12124 conftest$ac_exeext conftest.$ac_ext
12125fi
12126{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
12127$as_echo "$ac_cv_func_alloca_works" >&6; }
12128
12129if test $ac_cv_func_alloca_works = yes; then
12130
12131$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
12132
12133else
12134 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
12135# that cause trouble. Some versions do not even contain alloca or
12136# contain a buggy version. If you still want to use their alloca,
12137# use ar to extract alloca.o from them instead of compiling alloca.c.
12138
12139ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
12140
12141$as_echo "#define C_ALLOCA 1" >>confdefs.h
12142
12143
12144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
12145$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
12146if test "${ac_cv_os_cray+set}" = set; then :
12147 $as_echo_n "(cached) " >&6
12148else
12149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12150/* end confdefs.h. */
12151#if defined CRAY && ! defined CRAY2
12152webecray
12153#else
12154wenotbecray
12155#endif
12156
12157_ACEOF
12158if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12159 $EGREP "webecray" >/dev/null 2>&1; then :
12160 ac_cv_os_cray=yes
12161else
12162 ac_cv_os_cray=no
12163fi
12164rm -f conftest*
12165
12166fi
12167{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
12168$as_echo "$ac_cv_os_cray" >&6; }
12169if test $ac_cv_os_cray = yes; then
12170 for ac_func in _getb67 GETB67 getb67; do
12171 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12172ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12173eval as_val=\$$as_ac_var
12174 if test "x$as_val" = x""yes; then :
12175
12176cat >>confdefs.h <<_ACEOF
12177#define CRAY_STACKSEG_END $ac_func
12178_ACEOF
12179
12180 break
12181fi
12182
12183 done
12184fi
12185
12186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
12187$as_echo_n "checking stack direction for C alloca... " >&6; }
12188if test "${ac_cv_c_stack_direction+set}" = set; then :
12189 $as_echo_n "(cached) " >&6
12190else
12191 if test "$cross_compiling" = yes; then :
12192 ac_cv_c_stack_direction=0
12193else
12194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12195/* end confdefs.h. */
12196$ac_includes_default
12197int
12198find_stack_direction ()
12199{
12200 static char *addr = 0;
12201 auto char dummy;
12202 if (addr == 0)
12203 {
12204 addr = &dummy;
12205 return find_stack_direction ();
12206 }
12207 else
12208 return (&dummy > addr) ? 1 : -1;
12209}
12210
12211int
12212main ()
12213{
12214 return find_stack_direction () < 0;
12215}
12216_ACEOF
12217if ac_fn_c_try_run "$LINENO"; then :
12218 ac_cv_c_stack_direction=1
12219else
12220 ac_cv_c_stack_direction=-1
12221fi
12222rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12223 conftest.$ac_objext conftest.beam conftest.$ac_ext
12224fi
12225
12226fi
12227{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
12228$as_echo "$ac_cv_c_stack_direction" >&6; }
12229cat >>confdefs.h <<_ACEOF
12230#define STACK_DIRECTION $ac_cv_c_stack_direction
12231_ACEOF
12232
12233
12234fi
12235
12236
12237
12238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
12239$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
12240if test "${am_cv_langinfo_codeset+set}" = set; then :
12241 $as_echo_n "(cached) " >&6
12242else
12243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12244/* end confdefs.h. */
12245#include <langinfo.h>
12246int
12247main ()
12248{
12249char* cs = nl_langinfo(CODESET);
12250 ;
12251 return 0;
12252}
12253_ACEOF
12254if ac_fn_c_try_link "$LINENO"; then :
12255 am_cv_langinfo_codeset=yes
12256else
12257 am_cv_langinfo_codeset=no
12258fi
12259rm -f core conftest.err conftest.$ac_objext \
12260 conftest$ac_exeext conftest.$ac_ext
12261
12262fi
12263{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
12264$as_echo "$am_cv_langinfo_codeset" >&6; }
12265 if test $am_cv_langinfo_codeset = yes; then
12266
12267$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
12268
12269 fi
12270
12271
a3d08894 12272 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
12273do :
12274 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12275ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12276eval as_val=\$$as_ac_Header
12277 if test "x$as_val" = x""yes; then :
12278 cat >>confdefs.h <<_ACEOF
12279#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12280_ACEOF
12281
12282fi
12283
12284done
12285
12286
12287 for ac_func in fdwalk getrlimit pipe pipe2 socketpair
12288do :
12289 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12290ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12291eval as_val=\$$as_ac_var
12292 if test "x$as_val" = x""yes; then :
12293 cat >>confdefs.h <<_ACEOF
12294#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12295_ACEOF
12296
12297fi
12298done
12299
12300
12301 ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default"
12302if test "x$ac_cv_have_decl_strerror" = x""yes; then :
12303 ac_have_decl=1
12304else
12305 ac_have_decl=0
12306fi
12307
12308cat >>confdefs.h <<_ACEOF
12309#define HAVE_DECL_STRERROR $ac_have_decl
12310_ACEOF
12311ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
12312if test "x$ac_cv_have_decl_strstr" = x""yes; then :
12313 ac_have_decl=1
12314else
12315 ac_have_decl=0
12316fi
12317
12318cat >>confdefs.h <<_ACEOF
12319#define HAVE_DECL_STRSTR $ac_have_decl
12320_ACEOF
12321
12322
e9bcb658
GB
12323 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
12324$as_echo_n "checking for sigsetjmp... " >&6; }
12325if test "${gdb_cv_func_sigsetjmp+set}" = set; then :
12326 $as_echo_n "(cached) " >&6
12327else
12328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12329/* end confdefs.h. */
12330
12331#include <setjmp.h>
12332
12333int
12334main ()
12335{
12336sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
12337 ;
12338 return 0;
12339}
12340_ACEOF
12341if ac_fn_c_try_compile "$LINENO"; then :
12342 gdb_cv_func_sigsetjmp=yes
12343else
12344 gdb_cv_func_sigsetjmp=no
12345fi
12346rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12347fi
12348{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
12349$as_echo "$gdb_cv_func_sigsetjmp" >&6; }
12350if test $gdb_cv_func_sigsetjmp = yes; then
12351
12352$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
12353
12354fi
12355
3266f10b 12356
54019719
PA
12357# Check the return and argument types of ptrace.
12358
12359
12360
12361for ac_header in sys/ptrace.h ptrace.h
12362do :
12363 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12364ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12365eval as_val=\$$as_ac_Header
12366 if test "x$as_val" = x""yes; then :
12367 cat >>confdefs.h <<_ACEOF
12368#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12369_ACEOF
12370
12371fi
12372
12373done
12374
12375
12376# Needs to be tested in C++ mode, to detect whether we need to cast
12377# the first argument to enum __ptrace_request.
12378if test "$enable_build_with_cxx" = "yes"; then
12379 ac_ext=cpp
12380ac_cpp='$CXXCPP $CPPFLAGS'
12381ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12382ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12383ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
12384
12385fi
12386
a3828db0 12387gdb_ptrace_headers='
4ff70b84 12388#include <sys/types.h>
a3828db0
MK
12389#if HAVE_SYS_PTRACE_H
12390# include <sys/ptrace.h>
12391#endif
12392#if HAVE_UNISTD_H
12393# include <unistd.h>
12394#endif
12395'
12396# There is no point in checking if we don't have a prototype.
54019719 12397ac_fn_cxx_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers
81ecdfbb
RW
12398"
12399if test "x$ac_cv_have_decl_ptrace" = x""yes; then :
12400 ac_have_decl=1
06825bd1 12401else
81ecdfbb 12402 ac_have_decl=0
06825bd1 12403fi
06825bd1 12404
a3828db0 12405cat >>confdefs.h <<_ACEOF
81ecdfbb 12406#define HAVE_DECL_PTRACE $ac_have_decl
a3828db0 12407_ACEOF
81ecdfbb 12408if test $ac_have_decl = 1; then :
bec39cab 12409
a3828db0 12410else
a3828db0
MK
12411
12412 : ${gdb_cv_func_ptrace_ret='int'}
12413 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
12414
06825bd1
MK
12415fi
12416
064ef605
DJ
12417# Check return type. Varargs (used on GNU/Linux) conflict with the
12418# empty argument list, so check for that explicitly.
81ecdfbb
RW
12419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
12420$as_echo_n "checking return type of ptrace... " >&6; }
12421if test "${gdb_cv_func_ptrace_ret+set}" = set; then :
12422 $as_echo_n "(cached) " >&6
bec39cab 12423else
81ecdfbb 12424 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12425/* end confdefs.h. */
a3828db0 12426$gdb_ptrace_headers
bec39cab
AC
12427int
12428main ()
12429{
064ef605
DJ
12430extern long ptrace (enum __ptrace_request, ...);
12431 ;
12432 return 0;
12433}
12434_ACEOF
54019719 12435if ac_fn_cxx_try_compile "$LINENO"; then :
064ef605
DJ
12436 gdb_cv_func_ptrace_ret='long'
12437else
81ecdfbb 12438 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
12439/* end confdefs.h. */
12440$gdb_ptrace_headers
12441int
12442main ()
12443{
a3828db0 12444extern int ptrace ();
bec39cab
AC
12445 ;
12446 return 0;
12447}
12448_ACEOF
54019719 12449if ac_fn_cxx_try_compile "$LINENO"; then :
a3828db0 12450 gdb_cv_func_ptrace_ret='int'
70f9f479 12451else
81ecdfbb 12452 gdb_cv_func_ptrace_ret='long'
70f9f479 12453fi
81ecdfbb 12454rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
70f9f479 12455fi
81ecdfbb 12456rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
064ef605 12457fi
81ecdfbb
RW
12458{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
12459$as_echo "$gdb_cv_func_ptrace_ret" >&6; }
bec39cab 12460
a3828db0
MK
12461cat >>confdefs.h <<_ACEOF
12462#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
bec39cab 12463_ACEOF
70f9f479 12464
a3828db0 12465# Check argument types.
81ecdfbb
RW
12466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
12467$as_echo_n "checking types of arguments for ptrace... " >&6; }
12468if test "${gdb_cv_func_ptrace_args+set}" = set; then :
12469 $as_echo_n "(cached) " >&6
bec39cab 12470else
a3828db0 12471
81ecdfbb 12472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
12473/* end confdefs.h. */
12474$gdb_ptrace_headers
12475int
12476main ()
12477{
12478extern long ptrace (enum __ptrace_request, ...);
12479 ;
12480 return 0;
12481}
12482_ACEOF
54019719
PA
12483if ac_fn_cxx_try_compile "$LINENO"; then :
12484 gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long'
064ef605 12485else
064ef605 12486
a3828db0
MK
12487for gdb_arg1 in 'int' 'long'; do
12488 for gdb_arg2 in 'pid_t' 'int' 'long'; do
5ed10e6e 12489 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
96d7229d 12490 for gdb_arg4 in 'int' 'long' 'void *'; do
81ecdfbb 12491 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12492/* end confdefs.h. */
a3828db0 12493$gdb_ptrace_headers
bec39cab
AC
12494int
12495main ()
12496{
a3828db0
MK
12497
12498extern $gdb_cv_func_ptrace_ret
12499 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
12500
bec39cab
AC
12501 ;
12502 return 0;
12503}
12504_ACEOF
54019719 12505if ac_fn_cxx_try_compile "$LINENO"; then :
a3828db0
MK
12506 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
12507 break 4;
5c7f2947 12508fi
81ecdfbb 12509rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0 12510 for gdb_arg5 in 'int *' 'int' 'long'; do
81ecdfbb 12511 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12512/* end confdefs.h. */
a3828db0 12513$gdb_ptrace_headers
bec39cab
AC
12514int
12515main ()
12516{
a3828db0
MK
12517
12518extern $gdb_cv_func_ptrace_ret
12519 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
12520
bec39cab
AC
12521 ;
12522 return 0;
12523}
12524_ACEOF
54019719 12525if ac_fn_cxx_try_compile "$LINENO"; then :
a3828db0
MK
12526
12527gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
12528 break 5;
78434e59 12529fi
81ecdfbb 12530rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0
MK
12531 done
12532 done
12533 done
12534 done
12535done
12536# Provide a safe default value.
12537: ${gdb_cv_func_ptrace_args='int,int,long,long'}
12538
064ef605 12539fi
81ecdfbb 12540rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
78434e59 12541fi
81ecdfbb
RW
12542{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
12543$as_echo "$gdb_cv_func_ptrace_args" >&6; }
a3828db0
MK
12544ac_save_IFS=$IFS; IFS=','
12545set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
12546IFS=$ac_save_IFS
12547shift
bec39cab 12548
54019719
PA
12549cat >>confdefs.h <<_ACEOF
12550#define PTRACE_TYPE_ARG1 $1
12551_ACEOF
12552
12553
a3828db0
MK
12554cat >>confdefs.h <<_ACEOF
12555#define PTRACE_TYPE_ARG3 $3
12556_ACEOF
12557
96d7229d
LM
12558
12559cat >>confdefs.h <<_ACEOF
12560#define PTRACE_TYPE_ARG4 $4
12561_ACEOF
12562
a3828db0
MK
12563if test -n "$5"; then
12564
12565cat >>confdefs.h <<_ACEOF
12566#define PTRACE_TYPE_ARG5 $5
bec39cab 12567_ACEOF
78434e59
MK
12568
12569fi
12570
54019719
PA
12571if test "$enable_build_with_cxx" = "yes"; then
12572 ac_ext=c
12573ac_cpp='$CPP $CPPFLAGS'
12574ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12575ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12576ac_compiler_gnu=$ac_cv_c_compiler_gnu
12577
12578fi
12579
12580
a3828db0 12581if test "$cross_compiling" = no; then
81ecdfbb
RW
12582 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
12583$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
12584if test "${ac_cv_func_setpgrp_void+set}" = set; then :
12585 $as_echo_n "(cached) " >&6
a3828db0 12586else
81ecdfbb
RW
12587 if test "$cross_compiling" = yes; then :
12588 as_fn_error "cannot check setpgrp when cross compiling" "$LINENO" 5
bec39cab 12589else
81ecdfbb 12590 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12591/* end confdefs.h. */
81ecdfbb 12592$ac_includes_default
bec39cab
AC
12593int
12594main ()
12595{
a3828db0
MK
12596/* If this system has a BSD-style setpgrp which takes arguments,
12597 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
12598 exit successfully. */
81ecdfbb 12599 return setpgrp (1,1) != -1;
bec39cab
AC
12600 ;
12601 return 0;
12602}
12603_ACEOF
81ecdfbb 12604if ac_fn_c_try_run "$LINENO"; then :
a3828db0 12605 ac_cv_func_setpgrp_void=no
c906108c 12606else
81ecdfbb 12607 ac_cv_func_setpgrp_void=yes
c906108c 12608fi
81ecdfbb
RW
12609rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12610 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 12611fi
81ecdfbb 12612
a3828db0 12613fi
81ecdfbb
RW
12614{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
12615$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0
MK
12616if test $ac_cv_func_setpgrp_void = yes; then
12617
81ecdfbb 12618$as_echo "#define SETPGRP_VOID 1" >>confdefs.h
97bf5e38
MK
12619
12620fi
a3828db0
MK
12621
12622else
81ecdfbb
RW
12623 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
12624$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
12625if test "${ac_cv_func_setpgrp_void+set}" = set; then :
12626 $as_echo_n "(cached) " >&6
97bf5e38 12627else
81ecdfbb 12628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12629/* end confdefs.h. */
a3828db0
MK
12630
12631#include <unistd.h>
12632
bec39cab
AC
12633int
12634main ()
12635{
a3828db0
MK
12636
12637 if (setpgrp(1,1) == -1)
12638 exit (0);
12639 else
12640 exit (1);
12641
bec39cab
AC
12642 ;
12643 return 0;
12644}
12645_ACEOF
81ecdfbb 12646if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12647 ac_cv_func_setpgrp_void=no
c906108c 12648else
81ecdfbb 12649 ac_cv_func_setpgrp_void=yes
c906108c 12650fi
81ecdfbb 12651rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 12652fi
81ecdfbb
RW
12653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
12654$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0 12655if test $ac_cv_func_setpgrp_void = yes; then
81ecdfbb 12656 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
c3f6f71d 12657
a3828db0 12658fi
c906108c
SS
12659fi
12660
db1ff28b
JK
12661# Assume we'll default to using the included libiberty regex.
12662gdb_use_included_regex=yes
12663
12664# However, if the system regex is GNU regex, then default to *not*
12665# using the included regex.
12666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5
12667$as_echo_n "checking for GNU regex... " >&6; }
12668if test "${gdb_cv_have_gnu_regex+set}" = set; then :
12669 $as_echo_n "(cached) " >&6
12670else
12671 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12672/* end confdefs.h. */
12673#include <gnu-versions.h>
12674int
12675main ()
12676{
12677#define REGEX_INTERFACE_VERSION 1
12678#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
12679# error "Version mismatch"
12680#endif
12681 ;
12682 return 0;
12683}
12684_ACEOF
12685if ac_fn_c_try_compile "$LINENO"; then :
12686 gdb_cv_have_gnu_regex=yes
12687else
12688 gdb_cv_have_gnu_regex=no
12689fi
12690rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12691fi
12692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
12693$as_echo "$gdb_cv_have_gnu_regex" >&6; }
12694if test $gdb_cv_have_gnu_regex = yes; then
12695 gdb_use_included_regex=no
12696fi
12697
12698
12699# Check whether --with-included-regex was given.
12700if test "${with_included_regex+set}" = set; then :
12701 withval=$with_included_regex; gdb_with_regex=$withval
12702else
12703 gdb_with_regex=$gdb_use_included_regex
12704fi
12705
12706if test "$gdb_with_regex" = yes; then
12707
12708$as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h
12709
12710fi
12711
81ecdfbb
RW
12712# Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
12713ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
12714#include <sys/proc.h>
12715
12716"
12717if test "x$ac_cv_member_struct_thread_td_pcb" = x""yes; then :
c906108c 12718
5c45e068 12719cat >>confdefs.h <<_ACEOF
a3828db0 12720#define HAVE_STRUCT_THREAD_TD_PCB 1
bec39cab 12721_ACEOF
c906108c 12722
5c45e068 12723
97bf5e38 12724fi
c906108c 12725
5c45e068 12726
a3828db0 12727# See if <sys/lwp.h> defines `struct lwp`.
81ecdfbb
RW
12728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
12729$as_echo_n "checking for struct lwp... " >&6; }
12730if test "${gdb_cv_struct_lwp+set}" = set; then :
12731 $as_echo_n "(cached) " >&6
bec39cab 12732else
81ecdfbb 12733 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12734/* end confdefs.h. */
a3828db0
MK
12735#include <sys/param.h>
12736#include <sys/lwp.h>
bec39cab
AC
12737int
12738main ()
12739{
a3828db0 12740struct lwp l;
bec39cab
AC
12741 ;
12742 return 0;
12743}
12744_ACEOF
81ecdfbb 12745if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12746 gdb_cv_struct_lwp=yes
c906108c 12747else
81ecdfbb 12748 gdb_cv_struct_lwp=no
c906108c 12749fi
81ecdfbb 12750rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 12751fi
81ecdfbb
RW
12752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
12753$as_echo "$gdb_cv_struct_lwp" >&6; }
a3828db0 12754if test $gdb_cv_struct_lwp = yes; then
c906108c 12755
81ecdfbb 12756$as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
c906108c 12757
97bf5e38 12758fi
c906108c 12759
a3828db0 12760# See if <machine/reg.h> degines `struct reg'.
81ecdfbb
RW
12761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
12762$as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
12763if test "${gdb_cv_struct_reg+set}" = set; then :
12764 $as_echo_n "(cached) " >&6
bec39cab 12765else
81ecdfbb 12766 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12767/* end confdefs.h. */
a3828db0
MK
12768#include <sys/types.h>
12769#include <machine/reg.h>
bec39cab
AC
12770int
12771main ()
12772{
a3828db0 12773struct reg r;
bec39cab
AC
12774 ;
12775 return 0;
12776}
12777_ACEOF
81ecdfbb 12778if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12779 gdb_cv_struct_reg=yes
27ca5dad 12780else
81ecdfbb 12781 gdb_cv_struct_reg=no
27ca5dad 12782fi
81ecdfbb 12783rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27ca5dad 12784fi
81ecdfbb
RW
12785{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
12786$as_echo "$gdb_cv_struct_reg" >&6; }
a3828db0 12787if test $gdb_cv_struct_reg = yes; then
bec39cab 12788
81ecdfbb 12789$as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
27ca5dad
MC
12790
12791fi
97bf5e38 12792
a3828db0
MK
12793# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
12794# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
81ecdfbb
RW
12795ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <machine/reg.h>
12796"
12797if test "x$ac_cv_member_struct_reg_r_fs" = x""yes; then :
5c45e068
MK
12798
12799cat >>confdefs.h <<_ACEOF
a3828db0 12800#define HAVE_STRUCT_REG_R_FS 1
bec39cab 12801_ACEOF
3862412b 12802
5c45e068 12803
97bf5e38 12804fi
81ecdfbb
RW
12805ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <machine/reg.h>
12806"
12807if test "x$ac_cv_member_struct_reg_r_gs" = x""yes; then :
5c45e068
MK
12808
12809cat >>confdefs.h <<_ACEOF
a3828db0 12810#define HAVE_STRUCT_REG_R_GS 1
bec39cab 12811_ACEOF
3862412b 12812
5c45e068 12813
97bf5e38 12814fi
3862412b 12815
5c45e068 12816
6fea9e18
L
12817# See if <sys/user.h> supports the %fs_base and %gs_bas amd64 segment registers.
12818# Older amd64 Linux's don't have the fs_base and gs_base members of
12819# `struct user_regs_struct'.
12820ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "fs_base" "ac_cv_member_struct_user_regs_struct_fs_base" "#include <sys/user.h>
12821"
12822if test "x$ac_cv_member_struct_user_regs_struct_fs_base" = x""yes; then :
12823
12824cat >>confdefs.h <<_ACEOF
12825#define HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE 1
12826_ACEOF
12827
12828
12829fi
12830ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "gs_base" "ac_cv_member_struct_user_regs_struct_gs_base" "#include <sys/user.h>
12831"
12832if test "x$ac_cv_member_struct_user_regs_struct_gs_base" = x""yes; then :
12833
12834cat >>confdefs.h <<_ACEOF
12835#define HAVE_STRUCT_USER_REGS_STRUCT_GS_BASE 1
12836_ACEOF
12837
12838
12839fi
12840
12841
a3828db0 12842# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
81ecdfbb
RW
12843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
12844$as_echo_n "checking for PTRACE_GETREGS... " >&6; }
12845if test "${gdb_cv_have_ptrace_getregs+set}" = set; then :
12846 $as_echo_n "(cached) " >&6
451928c5 12847else
81ecdfbb 12848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12849/* end confdefs.h. */
a3828db0 12850#include <sys/ptrace.h>
bec39cab
AC
12851int
12852main ()
12853{
a3828db0 12854PTRACE_GETREGS;
bec39cab
AC
12855 ;
12856 return 0;
12857}
12858_ACEOF
81ecdfbb 12859if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12860 gdb_cv_have_ptrace_getregs=yes
451928c5 12861else
81ecdfbb 12862 gdb_cv_have_ptrace_getregs=no
451928c5 12863fi
81ecdfbb 12864rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
12865fi
12866
81ecdfbb
RW
12867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
12868$as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
a3828db0 12869if test $gdb_cv_have_ptrace_getregs = yes; then
60ca704f 12870
81ecdfbb 12871$as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
451928c5 12872
97bf5e38 12873fi
451928c5 12874
a3828db0 12875# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
81ecdfbb
RW
12876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
12877$as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
12878if test "${gdb_cv_have_ptrace_getfpxregs+set}" = set; then :
12879 $as_echo_n "(cached) " >&6
451928c5 12880else
81ecdfbb 12881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12882/* end confdefs.h. */
a3828db0 12883#include <sys/ptrace.h>
bec39cab
AC
12884int
12885main ()
12886{
a3828db0 12887PTRACE_GETFPXREGS;
bec39cab
AC
12888 ;
12889 return 0;
12890}
12891_ACEOF
81ecdfbb 12892if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12893 gdb_cv_have_ptrace_getfpxregs=yes
451928c5 12894else
81ecdfbb 12895 gdb_cv_have_ptrace_getfpxregs=no
451928c5 12896fi
81ecdfbb 12897rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
12898fi
12899
81ecdfbb
RW
12900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
12901$as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
a3828db0 12902if test $gdb_cv_have_ptrace_getfpxregs = yes; then
60ca704f 12903
81ecdfbb 12904$as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
451928c5 12905
97bf5e38 12906fi
451928c5 12907
a3828db0 12908# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
81ecdfbb
RW
12909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
12910$as_echo_n "checking for PT_GETDBREGS... " >&6; }
12911if test "${gdb_cv_have_pt_getdbregs+set}" = set; then :
12912 $as_echo_n "(cached) " >&6
3862412b 12913else
81ecdfbb 12914 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12915/* end confdefs.h. */
a3828db0
MK
12916#include <sys/types.h>
12917#include <sys/ptrace.h>
bec39cab
AC
12918int
12919main ()
12920{
a3828db0 12921PT_GETDBREGS;
bec39cab
AC
12922 ;
12923 return 0;
12924}
12925_ACEOF
81ecdfbb 12926if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12927 gdb_cv_have_pt_getdbregs=yes
3862412b 12928else
81ecdfbb 12929 gdb_cv_have_pt_getdbregs=no
3862412b 12930fi
81ecdfbb 12931rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
12932fi
12933
81ecdfbb
RW
12934{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
12935$as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
a3828db0 12936if test $gdb_cv_have_pt_getdbregs = yes; then
60ca704f 12937
81ecdfbb 12938$as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
3862412b 12939
97bf5e38 12940fi
3862412b 12941
a3828db0 12942# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
81ecdfbb
RW
12943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
12944$as_echo_n "checking for PT_GETXMMREGS... " >&6; }
12945if test "${gdb_cv_have_pt_getxmmregs+set}" = set; then :
12946 $as_echo_n "(cached) " >&6
3862412b 12947else
81ecdfbb 12948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12949/* end confdefs.h. */
a3828db0
MK
12950#include <sys/types.h>
12951#include <sys/ptrace.h>
bec39cab
AC
12952int
12953main ()
12954{
a3828db0 12955PT_GETXMMREGS;
bec39cab
AC
12956 ;
12957 return 0;
12958}
12959_ACEOF
81ecdfbb 12960if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12961 gdb_cv_have_pt_getxmmregs=yes
3862412b 12962else
81ecdfbb 12963 gdb_cv_have_pt_getxmmregs=no
3862412b 12964fi
81ecdfbb 12965rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
12966fi
12967
81ecdfbb
RW
12968{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
12969$as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
a3828db0 12970if test $gdb_cv_have_pt_getxmmregs = yes; then
60ca704f 12971
81ecdfbb 12972$as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
3862412b 12973
97bf5e38 12974fi
3862412b 12975
05b4bd79 12976# Detect which type of /proc is in use, such as for Solaris.
97bf5e38
MK
12977
12978if test "${target}" = "${host}"; then
12979 case "${host}" in
7b00db47 12980 *-*-sysv4.2* | *-*-sysv5* )
60ca704f 12981
81ecdfbb 12982$as_echo "#define NEW_PROC_API 1" >>confdefs.h
97bf5e38
MK
12983
12984 ;;
c162e8c9 12985 *-*-solaris2.[6789] | *-*-solaris2.1[0-9]*)
60ca704f 12986
81ecdfbb 12987$as_echo "#define NEW_PROC_API 1" >>confdefs.h
c960c18f
AC
12988
12989 ;;
12990 mips-sgi-irix5*)
12991 # Work around <sys/proc.h> needing _KMEMUSER problem on IRIX 5.
60ca704f 12992
81ecdfbb 12993$as_echo "#define _KMEMUSER 1" >>confdefs.h
97bf5e38
MK
12994
12995 ;;
12996 esac
12997fi
12998
12999if test "$ac_cv_header_sys_procfs_h" = yes; then
81ecdfbb
RW
13000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
13001$as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
13002 if test "${bfd_cv_have_sys_procfs_type_gregset_t+set}" = set; then :
13003 $as_echo_n "(cached) " >&6
596c9d4b 13004else
81ecdfbb 13005 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13006/* end confdefs.h. */
596c9d4b
KB
13007
13008#define _SYSCALL32
d30c5336
JK
13009/* Needed for new procfs interface on sparc-solaris. */
13010#define _STRUCTURED_PROC 1
596c9d4b 13011#include <sys/procfs.h>
bec39cab
AC
13012int
13013main ()
13014{
97bf5e38 13015gregset_t avar
bec39cab
AC
13016 ;
13017 return 0;
13018}
13019_ACEOF
81ecdfbb 13020if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13021 bfd_cv_have_sys_procfs_type_gregset_t=yes
596c9d4b 13022else
81ecdfbb 13023 bfd_cv_have_sys_procfs_type_gregset_t=no
bec39cab 13024
596c9d4b 13025fi
81ecdfbb 13026rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
13027fi
13028
97bf5e38 13029 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
bec39cab 13030
81ecdfbb 13031$as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
596c9d4b
KB
13032
13033 fi
81ecdfbb
RW
13034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
13035$as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
451928c5 13036
81ecdfbb
RW
13037 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
13038$as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
13039 if test "${bfd_cv_have_sys_procfs_type_fpregset_t+set}" = set; then :
13040 $as_echo_n "(cached) " >&6
d84dd0c5 13041else
81ecdfbb 13042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13043/* end confdefs.h. */
97bf5e38
MK
13044
13045#define _SYSCALL32
d30c5336
JK
13046/* Needed for new procfs interface on sparc-solaris. */
13047#define _STRUCTURED_PROC 1
d84dd0c5 13048#include <sys/procfs.h>
bec39cab
AC
13049int
13050main ()
13051{
97bf5e38 13052fpregset_t avar
bec39cab
AC
13053 ;
13054 return 0;
13055}
13056_ACEOF
81ecdfbb 13057if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13058 bfd_cv_have_sys_procfs_type_fpregset_t=yes
d84dd0c5 13059else
81ecdfbb 13060 bfd_cv_have_sys_procfs_type_fpregset_t=no
bec39cab 13061
d84dd0c5 13062fi
81ecdfbb 13063rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d84dd0c5
MK
13064fi
13065
97bf5e38 13066 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
bec39cab 13067
81ecdfbb 13068$as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
d84dd0c5 13069
97bf5e38 13070 fi
81ecdfbb
RW
13071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
13072$as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
d84dd0c5 13073
81ecdfbb
RW
13074 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
13075$as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
13076 if test "${bfd_cv_have_sys_procfs_type_prgregset_t+set}" = set; then :
13077 $as_echo_n "(cached) " >&6
c906108c 13078else
81ecdfbb 13079 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13080/* end confdefs.h. */
c906108c 13081
97bf5e38 13082#define _SYSCALL32
d30c5336
JK
13083/* Needed for new procfs interface on sparc-solaris. */
13084#define _STRUCTURED_PROC 1
97bf5e38 13085#include <sys/procfs.h>
bec39cab
AC
13086int
13087main ()
13088{
97bf5e38 13089prgregset_t avar
bec39cab
AC
13090 ;
13091 return 0;
13092}
13093_ACEOF
81ecdfbb 13094if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13095 bfd_cv_have_sys_procfs_type_prgregset_t=yes
c906108c 13096else
81ecdfbb 13097 bfd_cv_have_sys_procfs_type_prgregset_t=no
bec39cab 13098
c906108c 13099fi
81ecdfbb 13100rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13101fi
13102
97bf5e38 13103 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
bec39cab 13104
81ecdfbb 13105$as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
c906108c 13106
97bf5e38 13107 fi
81ecdfbb
RW
13108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
13109$as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
c906108c 13110
81ecdfbb
RW
13111 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
13112$as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
13113 if test "${bfd_cv_have_sys_procfs_type_prfpregset_t+set}" = set; then :
13114 $as_echo_n "(cached) " >&6
d45fe813 13115else
81ecdfbb 13116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13117/* end confdefs.h. */
97bf5e38
MK
13118
13119#define _SYSCALL32
d30c5336
JK
13120/* Needed for new procfs interface on sparc-solaris. */
13121#define _STRUCTURED_PROC 1
97bf5e38 13122#include <sys/procfs.h>
bec39cab
AC
13123int
13124main ()
13125{
97bf5e38 13126prfpregset_t avar
bec39cab
AC
13127 ;
13128 return 0;
13129}
13130_ACEOF
81ecdfbb 13131if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13132 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
d45fe813 13133else
81ecdfbb 13134 bfd_cv_have_sys_procfs_type_prfpregset_t=no
bec39cab 13135
d45fe813 13136fi
81ecdfbb 13137rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
13138fi
13139
97bf5e38 13140 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
bec39cab 13141
81ecdfbb 13142$as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
d45fe813 13143
97bf5e38 13144 fi
81ecdfbb
RW
13145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
13146$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
d45fe813 13147
81ecdfbb
RW
13148 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
13149$as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
13150 if test "${bfd_cv_have_sys_procfs_type_prgregset32_t+set}" = set; then :
13151 $as_echo_n "(cached) " >&6
d45fe813 13152else
81ecdfbb 13153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13154/* end confdefs.h. */
97bf5e38
MK
13155
13156#define _SYSCALL32
d30c5336
JK
13157/* Needed for new procfs interface on sparc-solaris. */
13158#define _STRUCTURED_PROC 1
97bf5e38 13159#include <sys/procfs.h>
bec39cab
AC
13160int
13161main ()
13162{
97bf5e38 13163prgregset32_t avar
bec39cab
AC
13164 ;
13165 return 0;
13166}
13167_ACEOF
81ecdfbb 13168if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13169 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
d45fe813 13170else
81ecdfbb 13171 bfd_cv_have_sys_procfs_type_prgregset32_t=no
bec39cab 13172
d45fe813 13173fi
81ecdfbb 13174rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
13175fi
13176
97bf5e38 13177 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
bec39cab 13178
81ecdfbb 13179$as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
d45fe813 13180
97bf5e38 13181 fi
81ecdfbb
RW
13182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
13183$as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
d45fe813 13184
81ecdfbb
RW
13185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
13186$as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
13187 if test "${bfd_cv_have_sys_procfs_type_lwpid_t+set}" = set; then :
13188 $as_echo_n "(cached) " >&6
d45fe813 13189else
81ecdfbb 13190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13191/* end confdefs.h. */
97bf5e38 13192
d45fe813 13193#define _SYSCALL32
d30c5336
JK
13194/* Needed for new procfs interface on sparc-solaris. */
13195#define _STRUCTURED_PROC 1
97bf5e38 13196#include <sys/procfs.h>
bec39cab
AC
13197int
13198main ()
13199{
97bf5e38 13200lwpid_t avar
bec39cab
AC
13201 ;
13202 return 0;
13203}
13204_ACEOF
81ecdfbb 13205if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13206 bfd_cv_have_sys_procfs_type_lwpid_t=yes
d45fe813 13207else
81ecdfbb 13208 bfd_cv_have_sys_procfs_type_lwpid_t=no
bec39cab 13209
d45fe813 13210fi
81ecdfbb 13211rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
13212fi
13213
97bf5e38 13214 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
bec39cab 13215
81ecdfbb 13216$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
d45fe813 13217
97bf5e38 13218 fi
81ecdfbb
RW
13219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
13220$as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
c906108c 13221
81ecdfbb
RW
13222 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
13223$as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
13224 if test "${bfd_cv_have_sys_procfs_type_psaddr_t+set}" = set; then :
13225 $as_echo_n "(cached) " >&6
c906108c 13226else
81ecdfbb 13227 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13228/* end confdefs.h. */
c906108c 13229
97bf5e38 13230#define _SYSCALL32
d30c5336
JK
13231/* Needed for new procfs interface on sparc-solaris. */
13232#define _STRUCTURED_PROC 1
97bf5e38 13233#include <sys/procfs.h>
bec39cab
AC
13234int
13235main ()
13236{
97bf5e38 13237psaddr_t avar
bec39cab
AC
13238 ;
13239 return 0;
13240}
13241_ACEOF
81ecdfbb 13242if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13243 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c 13244else
81ecdfbb 13245 bfd_cv_have_sys_procfs_type_psaddr_t=no
bec39cab 13246
c906108c 13247fi
81ecdfbb 13248rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13249fi
13250
97bf5e38 13251 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
bec39cab 13252
81ecdfbb 13253$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
c906108c 13254
97bf5e38 13255 fi
81ecdfbb
RW
13256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
13257$as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
c906108c 13258
81ecdfbb
RW
13259 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prsysent_t in sys/procfs.h" >&5
13260$as_echo_n "checking for prsysent_t in sys/procfs.h... " >&6; }
13261 if test "${bfd_cv_have_sys_procfs_type_prsysent_t+set}" = set; then :
13262 $as_echo_n "(cached) " >&6
c906108c 13263else
81ecdfbb 13264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13265/* end confdefs.h. */
c906108c 13266
97bf5e38 13267#define _SYSCALL32
d30c5336
JK
13268/* Needed for new procfs interface on sparc-solaris. */
13269#define _STRUCTURED_PROC 1
97bf5e38 13270#include <sys/procfs.h>
bec39cab
AC
13271int
13272main ()
13273{
97bf5e38 13274prsysent_t avar
bec39cab
AC
13275 ;
13276 return 0;
13277}
13278_ACEOF
81ecdfbb 13279if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13280 bfd_cv_have_sys_procfs_type_prsysent_t=yes
c906108c 13281else
81ecdfbb 13282 bfd_cv_have_sys_procfs_type_prsysent_t=no
bec39cab 13283
c906108c 13284fi
81ecdfbb 13285rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13286fi
13287
97bf5e38 13288 if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
bec39cab 13289
81ecdfbb 13290$as_echo "#define HAVE_PRSYSENT_T 1" >>confdefs.h
c906108c 13291
97bf5e38 13292 fi
81ecdfbb
RW
13293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prsysent_t" >&5
13294$as_echo "$bfd_cv_have_sys_procfs_type_prsysent_t" >&6; }
c906108c 13295
81ecdfbb
RW
13296 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigset_t in sys/procfs.h" >&5
13297$as_echo_n "checking for pr_sigset_t in sys/procfs.h... " >&6; }
13298 if test "${bfd_cv_have_sys_procfs_type_pr_sigset_t+set}" = set; then :
13299 $as_echo_n "(cached) " >&6
c906108c 13300else
81ecdfbb 13301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13302/* end confdefs.h. */
c906108c 13303
97bf5e38 13304#define _SYSCALL32
d30c5336
JK
13305/* Needed for new procfs interface on sparc-solaris. */
13306#define _STRUCTURED_PROC 1
97bf5e38 13307#include <sys/procfs.h>
bec39cab
AC
13308int
13309main ()
13310{
97bf5e38 13311pr_sigset_t avar
bec39cab
AC
13312 ;
13313 return 0;
13314}
13315_ACEOF
81ecdfbb 13316if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13317 bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
c906108c 13318else
81ecdfbb 13319 bfd_cv_have_sys_procfs_type_pr_sigset_t=no
bec39cab 13320
c906108c 13321fi
81ecdfbb 13322rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13323fi
13324
97bf5e38 13325 if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
bec39cab 13326
81ecdfbb 13327$as_echo "#define HAVE_PR_SIGSET_T 1" >>confdefs.h
c906108c 13328
97bf5e38 13329 fi
81ecdfbb
RW
13330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigset_t" >&5
13331$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigset_t" >&6; }
c906108c 13332
81ecdfbb
RW
13333 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigaction64_t in sys/procfs.h" >&5
13334$as_echo_n "checking for pr_sigaction64_t in sys/procfs.h... " >&6; }
13335 if test "${bfd_cv_have_sys_procfs_type_pr_sigaction64_t+set}" = set; then :
13336 $as_echo_n "(cached) " >&6
c906108c 13337else
81ecdfbb 13338 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13339/* end confdefs.h. */
c906108c 13340
97bf5e38 13341#define _SYSCALL32
d30c5336
JK
13342/* Needed for new procfs interface on sparc-solaris. */
13343#define _STRUCTURED_PROC 1
97bf5e38 13344#include <sys/procfs.h>
bec39cab
AC
13345int
13346main ()
13347{
97bf5e38 13348pr_sigaction64_t avar
bec39cab
AC
13349 ;
13350 return 0;
13351}
13352_ACEOF
81ecdfbb 13353if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13354 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
c906108c 13355else
81ecdfbb 13356 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
bec39cab 13357
c906108c 13358fi
81ecdfbb 13359rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13360fi
13361
97bf5e38 13362 if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
bec39cab 13363
81ecdfbb 13364$as_echo "#define HAVE_PR_SIGACTION64_T 1" >>confdefs.h
c906108c 13365
97bf5e38 13366 fi
81ecdfbb
RW
13367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&5
13368$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&6; }
97bf5e38 13369
81ecdfbb
RW
13370 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_siginfo64_t in sys/procfs.h" >&5
13371$as_echo_n "checking for pr_siginfo64_t in sys/procfs.h... " >&6; }
13372 if test "${bfd_cv_have_sys_procfs_type_pr_siginfo64_t+set}" = set; then :
13373 $as_echo_n "(cached) " >&6
97bf5e38 13374else
81ecdfbb 13375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13376/* end confdefs.h. */
97bf5e38
MK
13377
13378#define _SYSCALL32
d30c5336
JK
13379/* Needed for new procfs interface on sparc-solaris. */
13380#define _STRUCTURED_PROC 1
97bf5e38 13381#include <sys/procfs.h>
bec39cab
AC
13382int
13383main ()
13384{
97bf5e38 13385pr_siginfo64_t avar
bec39cab
AC
13386 ;
13387 return 0;
13388}
13389_ACEOF
81ecdfbb 13390if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
13391 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
13392else
81ecdfbb 13393 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
bec39cab 13394
97bf5e38 13395fi
81ecdfbb 13396rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 13397fi
c906108c 13398
97bf5e38 13399 if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
bec39cab 13400
81ecdfbb 13401$as_echo "#define HAVE_PR_SIGINFO64_T 1" >>confdefs.h
c906108c 13402
97bf5e38 13403 fi
81ecdfbb
RW
13404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&5
13405$as_echo "$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&6; }
bec39cab
AC
13406
13407
97bf5e38
MK
13408
13409
13410
97bf5e38 13411 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
81ecdfbb
RW
13412 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether prfpregset_t type is broken" >&5
13413$as_echo_n "checking whether prfpregset_t type is broken... " >&6; }
13414 if test "${gdb_cv_prfpregset_t_broken+set}" = set; then :
13415 $as_echo_n "(cached) " >&6
c906108c 13416else
81ecdfbb 13417 if test "$cross_compiling" = yes; then :
97bf5e38 13418 gdb_cv_prfpregset_t_broken=yes
c906108c 13419else
81ecdfbb 13420 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13421/* end confdefs.h. */
97bf5e38
MK
13422#include <sys/procfs.h>
13423 int main ()
13424 {
13425 if (sizeof (prfpregset_t) == sizeof (void *))
13426 return 1;
13427 return 0;
13428 }
bec39cab 13429_ACEOF
81ecdfbb 13430if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 13431 gdb_cv_prfpregset_t_broken=no
81ecdfbb
RW
13432else
13433 gdb_cv_prfpregset_t_broken=yes
c906108c 13434fi
81ecdfbb
RW
13435rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13436 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 13437fi
81ecdfbb 13438
c906108c
SS
13439fi
13440
81ecdfbb
RW
13441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_prfpregset_t_broken" >&5
13442$as_echo "$gdb_cv_prfpregset_t_broken" >&6; }
97bf5e38 13443 if test $gdb_cv_prfpregset_t_broken = yes; then
60ca704f 13444
81ecdfbb 13445$as_echo "#define PRFPREGSET_T_BROKEN 1" >>confdefs.h
c906108c 13446
97bf5e38
MK
13447 fi
13448 fi
c906108c 13449fi
c906108c 13450
bc8bcb4b 13451# Check if the compiler supports the `long long' type.
c906108c 13452
81ecdfbb
RW
13453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
13454$as_echo_n "checking for long long support in compiler... " >&6; }
13455if test "${gdb_cv_c_long_long+set}" = set; then :
13456 $as_echo_n "(cached) " >&6
97bf5e38 13457else
81ecdfbb 13458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13459/* end confdefs.h. */
bc8bcb4b 13460extern long long foo;
bec39cab
AC
13461int
13462main ()
13463{
bc8bcb4b 13464switch (foo & 2) { case 0: return 1; }
bec39cab
AC
13465 ;
13466 return 0;
13467}
13468_ACEOF
81ecdfbb 13469if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
13470 gdb_cv_c_long_long=yes
13471else
81ecdfbb 13472 gdb_cv_c_long_long=no
97bf5e38 13473fi
81ecdfbb 13474rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 13475fi
81ecdfbb
RW
13476{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
13477$as_echo "$gdb_cv_c_long_long" >&6; }
74a0d9f6
JK
13478if test $gdb_cv_c_long_long != yes; then
13479 # libdecnumber requires long long.
13480 as_fn_error "Compiler must support long long for GDB." "$LINENO" 5
97bf5e38
MK
13481fi
13482
bc8bcb4b 13483# Check if the compiler and runtime support printing long longs.
97bf5e38 13484
81ecdfbb
RW
13485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
13486$as_echo_n "checking for long long support in printf... " >&6; }
13487if test "${gdb_cv_printf_has_long_long+set}" = set; then :
13488 $as_echo_n "(cached) " >&6
97bf5e38 13489else
81ecdfbb 13490 if test "$cross_compiling" = yes; then :
97bf5e38
MK
13491 gdb_cv_printf_has_long_long=no
13492else
81ecdfbb 13493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13494/* end confdefs.h. */
bc8bcb4b
MK
13495$ac_includes_default
13496int
13497main ()
13498{
13499char buf[32];
97bf5e38
MK
13500 long long l = 0;
13501 l = (l << 16) + 0x0123;
13502 l = (l << 16) + 0x4567;
13503 l = (l << 16) + 0x89ab;
13504 l = (l << 16) + 0xcdef;
13505 sprintf (buf, "0x%016llx", l);
13506 return (strcmp ("0x0123456789abcdef", buf));
bc8bcb4b
MK
13507 ;
13508 return 0;
c906108c 13509}
bec39cab 13510_ACEOF
81ecdfbb 13511if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
13512 gdb_cv_printf_has_long_long=yes
13513else
81ecdfbb 13514 gdb_cv_printf_has_long_long=no
97bf5e38 13515fi
81ecdfbb
RW
13516rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13517 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 13518fi
81ecdfbb 13519
97bf5e38 13520fi
81ecdfbb
RW
13521{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
13522$as_echo "$gdb_cv_printf_has_long_long" >&6; }
97bf5e38 13523if test $gdb_cv_printf_has_long_long = yes; then
bc8bcb4b 13524
81ecdfbb 13525$as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
97bf5e38
MK
13526
13527fi
97bf5e38 13528
1a619819
LM
13529# Check if the compiler and runtime support printing decfloats.
13530
81ecdfbb
RW
13531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
13532$as_echo_n "checking for decfloat support in printf... " >&6; }
13533if test "${gdb_cv_printf_has_decfloat+set}" = set; then :
13534 $as_echo_n "(cached) " >&6
1a619819 13535else
81ecdfbb 13536 if test "$cross_compiling" = yes; then :
1a619819
LM
13537 gdb_cv_printf_has_decfloat=no
13538else
81ecdfbb 13539 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1a619819
LM
13540/* end confdefs.h. */
13541$ac_includes_default
13542int
13543main ()
13544{
13545char buf[64];
13546 _Decimal32 d32 = 1.2345df;
13547 _Decimal64 d64 = 1.2345dd;
13548 _Decimal128 d128 = 1.2345dl;
13549 sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
13550 return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
13551 ;
13552 return 0;
13553}
13554_ACEOF
81ecdfbb 13555if ac_fn_c_try_run "$LINENO"; then :
1a619819
LM
13556 gdb_cv_printf_has_decfloat=yes
13557else
81ecdfbb 13558 gdb_cv_printf_has_decfloat=no
1a619819 13559fi
81ecdfbb
RW
13560rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13561 conftest.$ac_objext conftest.beam conftest.$ac_ext
1a619819 13562fi
81ecdfbb 13563
1a619819 13564fi
81ecdfbb
RW
13565{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
13566$as_echo "$gdb_cv_printf_has_decfloat" >&6; }
1a619819
LM
13567if test $gdb_cv_printf_has_decfloat = yes; then
13568
81ecdfbb 13569$as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
1a619819
LM
13570
13571fi
13572
bc8bcb4b
MK
13573# Check if the compiler supports the `long double' type. We can't use
13574# AC_C_LONG_DOUBLE because that one does additional checks on the
13575# constants defined in <float.h> that fail on some systems,
13576# e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
97bf5e38 13577
81ecdfbb
RW
13578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
13579$as_echo_n "checking for long double support in compiler... " >&6; }
13580if test "${gdb_cv_c_long_double+set}" = set; then :
13581 $as_echo_n "(cached) " >&6
97bf5e38 13582else
81ecdfbb 13583 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13584/* end confdefs.h. */
97bf5e38 13585long double foo;
bec39cab 13586_ACEOF
81ecdfbb 13587if ac_fn_c_try_compile "$LINENO"; then :
bc8bcb4b 13588 gdb_cv_c_long_double=yes
97bf5e38 13589else
81ecdfbb 13590 gdb_cv_c_long_double=no
97bf5e38 13591fi
81ecdfbb 13592rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 13593fi
81ecdfbb
RW
13594{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
13595$as_echo "$gdb_cv_c_long_double" >&6; }
bc8bcb4b 13596if test $gdb_cv_c_long_double = yes; then
c906108c 13597
81ecdfbb 13598$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
13599
13600fi
13601
bc8bcb4b 13602# Check if the compiler and runtime support printing long doubles.
97bf5e38 13603
81ecdfbb
RW
13604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
13605$as_echo_n "checking for long double support in printf... " >&6; }
13606if test "${gdb_cv_printf_has_long_double+set}" = set; then :
13607 $as_echo_n "(cached) " >&6
97bf5e38 13608else
81ecdfbb 13609 if test "$cross_compiling" = yes; then :
97bf5e38
MK
13610 gdb_cv_printf_has_long_double=no
13611else
81ecdfbb 13612 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13613/* end confdefs.h. */
bc8bcb4b
MK
13614$ac_includes_default
13615int
13616main ()
13617{
13618char buf[16];
97bf5e38
MK
13619 long double f = 3.141592653;
13620 sprintf (buf, "%Lg", f);
13621 return (strncmp ("3.14159", buf, 7));
bc8bcb4b
MK
13622 ;
13623 return 0;
97bf5e38 13624}
bec39cab 13625_ACEOF
81ecdfbb 13626if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 13627 gdb_cv_printf_has_long_double=yes
c906108c 13628else
81ecdfbb 13629 gdb_cv_printf_has_long_double=no
c906108c 13630fi
81ecdfbb
RW
13631rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13632 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 13633fi
81ecdfbb 13634
c906108c 13635fi
81ecdfbb
RW
13636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
13637$as_echo "$gdb_cv_printf_has_long_double" >&6; }
97bf5e38 13638if test $gdb_cv_printf_has_long_double = yes; then
bc8bcb4b 13639
81ecdfbb 13640$as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
13641
13642fi
97bf5e38 13643
bc8bcb4b 13644# Check if the compiler and runtime support scanning long doubles.
97bf5e38 13645
81ecdfbb
RW
13646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
13647$as_echo_n "checking for long double support in scanf... " >&6; }
13648if test "${gdb_cv_scanf_has_long_double+set}" = set; then :
13649 $as_echo_n "(cached) " >&6
97bf5e38 13650else
81ecdfbb 13651 if test "$cross_compiling" = yes; then :
97bf5e38
MK
13652 gdb_cv_scanf_has_long_double=no
13653else
81ecdfbb 13654 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13655/* end confdefs.h. */
bc8bcb4b
MK
13656#include <stdio.h>
13657int
13658main ()
13659{
13660char *buf = "3.141592653";
97bf5e38
MK
13661 long double f = 0;
13662 sscanf (buf, "%Lg", &f);
13663 return !(f > 3.14159 && f < 3.14160);
bc8bcb4b
MK
13664 ;
13665 return 0;
97bf5e38 13666}
bec39cab 13667_ACEOF
81ecdfbb 13668if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
13669 gdb_cv_scanf_has_long_double=yes
13670else
81ecdfbb 13671 gdb_cv_scanf_has_long_double=no
97bf5e38 13672fi
81ecdfbb
RW
13673rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13674 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 13675fi
81ecdfbb 13676
c906108c 13677fi
81ecdfbb
RW
13678{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
13679$as_echo "$gdb_cv_scanf_has_long_double" >&6; }
97bf5e38 13680if test $gdb_cv_scanf_has_long_double = yes; then
bc8bcb4b 13681
81ecdfbb 13682$as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
13683
13684fi
c906108c 13685
438013df
AO
13686case ${host_os} in
13687aix*)
81ecdfbb
RW
13688 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
13689$as_echo_n "checking for -bbigtoc option... " >&6; }
13690if test "${gdb_cv_bigtoc+set}" = set; then :
13691 $as_echo_n "(cached) " >&6
438013df 13692else
bec39cab 13693
438013df
AO
13694 SAVE_LDFLAGS=$LDFLAGS
13695
13696 case $GCC in
13697 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
13698 *) gdb_cv_bigtoc=-bbigtoc ;;
13699 esac
13700
13701 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
81ecdfbb 13702 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13703/* end confdefs.h. */
438013df 13704
bec39cab
AC
13705int
13706main ()
13707{
438013df 13708int i;
bec39cab
AC
13709 ;
13710 return 0;
13711}
13712_ACEOF
81ecdfbb 13713if ac_fn_c_try_link "$LINENO"; then :
bec39cab 13714
81ecdfbb
RW
13715else
13716 gdb_cv_bigtoc=
438013df 13717fi
81ecdfbb
RW
13718rm -f core conftest.err conftest.$ac_objext \
13719 conftest$ac_exeext conftest.$ac_ext
ec76baa5 13720 LDFLAGS="${SAVE_LDFLAGS}"
438013df 13721
bec39cab 13722fi
81ecdfbb
RW
13723{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
13724$as_echo "$gdb_cv_bigtoc" >&6; }
438013df
AO
13725 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
13726 ;;
13727esac
13728
38f6b338 13729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
f6528abd 13730$as_echo_n "checking for the dynamic export flag... " >&6; }
38f6b338
JK
13731dynamic_list=false
13732if test "${gdb_native}" = yes; then
13733 # The dynamically loaded libthread_db needs access to symbols in the gdb
13734 # executable. Older GNU ld supports --export-dynamic but --dynamic-list
13735 # may not be supported there.
13736 old_LDFLAGS="$LDFLAGS"
13737 # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
13738 RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
13739 LDFLAGS="$LDFLAGS $RDYNAMIC"
13740 if test "${have_libpython}" = no; then
13741 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f6528abd
JK
13742/* end confdefs.h. */
13743
13744int
13745main ()
13746{
13747
13748 ;
13749 return 0;
13750}
13751_ACEOF
13752if ac_fn_c_try_link "$LINENO"; then :
3bebe2f2
JK
13753 dynamic_list=true
13754fi
13755rm -f core conftest.err conftest.$ac_objext \
13756 conftest$ac_exeext conftest.$ac_ext
38f6b338
JK
13757 else
13758 # Workaround http://bugs.python.org/issue4434 where static
13759 # libpythonX.Y.a would get its symbols required for
13760 # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
13761 # Problem does not happen for the recommended libpythonX.Y.so linkage.
13762 old_CFLAGS="$CFLAGS"
13763 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
8c1fb155
JK
13764 old_LIBS="$LIBS"
13765 LIBS="$LIBS $PYTHON_LIBS"
38f6b338 13766 if test "$cross_compiling" = yes; then :
3bebe2f2 13767 true
f6528abd 13768else
3bebe2f2
JK
13769 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13770/* end confdefs.h. */
13771#include "${have_libpython}/Python.h"
13772int
13773main ()
13774{
13775int err;
38f6b338
JK
13776 Py_Initialize ();
13777 err = PyRun_SimpleString ("import itertools\n");
13778 Py_Finalize ();
13779 return err == 0 ? 0 : 1;
3bebe2f2
JK
13780 ;
13781 return 0;
13782}
13783_ACEOF
13784if ac_fn_c_try_run "$LINENO"; then :
13785 dynamic_list=true
13786fi
13787rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13788 conftest.$ac_objext conftest.beam conftest.$ac_ext
13789fi
13790
8c1fb155 13791 LIBS="$old_LIBS"
38f6b338
JK
13792 CFLAGS="$old_CFLAGS"
13793 fi
13794 LDFLAGS="$old_LDFLAGS"
13795fi
13796if $dynamic_list; then
13797 found="-Wl,--dynamic-list"
13798 RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
f6528abd 13799else
38f6b338
JK
13800 found="-rdynamic"
13801 RDYNAMIC="-rdynamic"
f6528abd 13802fi
f6528abd 13803
38f6b338 13804{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
f6528abd 13805$as_echo "$found" >&6; }
0407b3f1 13806
f6528abd 13807
0407b3f1 13808if test ${build} = ${host} -a ${host} = ${target} ; then
c906108c 13809 case ${host_os} in
c906108c 13810 solaris*)
d92419e5
JB
13811 # See if thread_db library is around for Solaris thread debugging.
13812 # Note that we must explicitly test for version 1 of the library
13813 # because version 0 (present on Solaris 2.4 or earlier) doesn't have
13814 # the same API.
81ecdfbb
RW
13815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris thread debugging library" >&5
13816$as_echo_n "checking for Solaris thread debugging library... " >&6; }
c906108c 13817 if test -f /usr/lib/libthread_db.so.1 ; then
81ecdfbb
RW
13818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13819$as_echo "yes" >&6; }
60ca704f 13820
81ecdfbb 13821$as_echo "#define HAVE_THREAD_DB_LIB 1" >>confdefs.h
c906108c 13822
3483b318 13823 CONFIG_OBS="${CONFIG_OBS} sol-thread.o"
c906108c 13824 CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
81ecdfbb
RW
13825 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
13826$as_echo_n "checking for dlopen in -ldl... " >&6; }
13827if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
13828 $as_echo_n "(cached) " >&6
c906108c 13829else
bec39cab 13830 ac_check_lib_save_LIBS=$LIBS
c906108c 13831LIBS="-ldl $LIBS"
81ecdfbb 13832cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
13833/* end confdefs.h. */
13834
81ecdfbb
RW
13835/* Override any GCC internal prototype to avoid an error.
13836 Use char because int might match the return type of a GCC
13837 builtin and then its argument prototype would still apply. */
bec39cab
AC
13838#ifdef __cplusplus
13839extern "C"
13840#endif
bec39cab
AC
13841char dlopen ();
13842int
13843main ()
13844{
81ecdfbb 13845return dlopen ();
bec39cab
AC
13846 ;
13847 return 0;
13848}
13849_ACEOF
81ecdfbb 13850if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
13851 ac_cv_lib_dl_dlopen=yes
13852else
81ecdfbb 13853 ac_cv_lib_dl_dlopen=no
bec39cab 13854fi
81ecdfbb
RW
13855rm -f core conftest.err conftest.$ac_objext \
13856 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
13857LIBS=$ac_check_lib_save_LIBS
13858fi
81ecdfbb
RW
13859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
13860$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
13861if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
bec39cab
AC
13862 cat >>confdefs.h <<_ACEOF
13863#define HAVE_LIBDL 1
13864_ACEOF
c906108c
SS
13865
13866 LIBS="-ldl $LIBS"
13867
c906108c
SS
13868fi
13869
f6528abd 13870 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} $RDYNAMIC"
c906108c
SS
13871 # Sun randomly tweaked the prototypes in <proc_service.h>
13872 # at one point.
81ecdfbb
RW
13873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if <proc_service.h> is old" >&5
13874$as_echo_n "checking if <proc_service.h> is old... " >&6; }
13875 if test "${gdb_cv_proc_service_is_old+set}" = set; then :
13876 $as_echo_n "(cached) " >&6
c906108c 13877else
bec39cab 13878
81ecdfbb 13879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13880/* end confdefs.h. */
c906108c
SS
13881
13882 #include <proc_service.h>
13883 ps_err_e ps_pdwrite
13884 (struct ps_prochandle*, psaddr_t, const void*, size_t);
c906108c 13885
bec39cab
AC
13886int
13887main ()
13888{
13889
13890 ;
13891 return 0;
13892}
13893_ACEOF
81ecdfbb 13894if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
13895 gdb_cv_proc_service_is_old=no
13896else
81ecdfbb 13897 gdb_cv_proc_service_is_old=yes
c906108c 13898fi
81ecdfbb 13899rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 13900
c906108c
SS
13901fi
13902
81ecdfbb
RW
13903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_proc_service_is_old" >&5
13904$as_echo "$gdb_cv_proc_service_is_old" >&6; }
c906108c 13905 if test $gdb_cv_proc_service_is_old = yes; then
60ca704f 13906
81ecdfbb 13907$as_echo "#define PROC_SERVICE_IS_OLD 1" >>confdefs.h
c906108c
SS
13908
13909 fi
13910 else
81ecdfbb
RW
13911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13912$as_echo "no" >&6; }
c906108c
SS
13913 fi
13914 ;;
d92419e5 13915 aix*)
81ecdfbb
RW
13916 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
13917$as_echo_n "checking for AiX thread debugging library... " >&6; }
13918 if test "${gdb_cv_have_aix_thread_debug+set}" = set; then :
13919 $as_echo_n "(cached) " >&6
bec39cab 13920else
81ecdfbb 13921 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13922/* end confdefs.h. */
d92419e5 13923#include <sys/pthdebug.h>
bec39cab
AC
13924int
13925main ()
13926{
d92419e5
JB
13927#ifndef PTHDB_VERSION_3
13928 #error
13929 #endif
bec39cab
AC
13930 ;
13931 return 0;
13932}
13933_ACEOF
81ecdfbb 13934if ac_fn_c_try_compile "$LINENO"; then :
d92419e5
JB
13935 gdb_cv_have_aix_thread_debug=yes
13936else
81ecdfbb 13937 gdb_cv_have_aix_thread_debug=no
d92419e5 13938fi
81ecdfbb 13939rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d92419e5
JB
13940fi
13941
81ecdfbb
RW
13942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
13943$as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
d92419e5
JB
13944 if test $gdb_cv_have_aix_thread_debug = yes; then
13945 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
3483b318 13946 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
7f533142 13947 LIBS="$LIBS -lpthdebug"
d645e32e
JB
13948
13949 # Older versions of AIX do not provide the declaration for
13950 # the getthrds function (it appears that it was introduced
13951 # with AIX 6.x).
13952 ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h>
13953"
13954if test "x$ac_cv_have_decl_getthrds" = x""yes; then :
13955 ac_have_decl=1
13956else
13957 ac_have_decl=0
13958fi
13959
13960cat >>confdefs.h <<_ACEOF
13961#define HAVE_DECL_GETTHRDS $ac_have_decl
13962_ACEOF
13963
d92419e5
JB
13964 fi
13965 ;;
c906108c 13966 esac
bec39cab 13967
c906108c
SS
13968fi
13969
3f47be5c 13970if test "x$ac_cv_header_thread_db_h" = "xyes"; then
81ecdfbb
RW
13971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
13972$as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
13973if test "${gdb_cv_thread_db_h_has_td_notalloc+set}" = set; then :
13974 $as_echo_n "(cached) " >&6
bec39cab 13975else
81ecdfbb 13976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13977/* end confdefs.h. */
3f47be5c 13978#include <thread_db.h>
bec39cab
AC
13979int
13980main ()
13981{
3f47be5c 13982int i = TD_NOTALLOC;
bec39cab
AC
13983 ;
13984 return 0;
13985}
13986_ACEOF
81ecdfbb 13987if ac_fn_c_try_compile "$LINENO"; then :
3f47be5c
EZ
13988 gdb_cv_thread_db_h_has_td_notalloc=yes
13989else
81ecdfbb 13990 gdb_cv_thread_db_h_has_td_notalloc=no
bec39cab 13991
3f47be5c 13992fi
81ecdfbb 13993rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3f47be5c 13994
bec39cab 13995fi
81ecdfbb
RW
13996{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
13997$as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
13998 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
13999$as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
14000if test "${gdb_cv_thread_db_h_has_td_version+set}" = set; then :
14001 $as_echo_n "(cached) " >&6
59f80f10 14002else
81ecdfbb 14003 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
14004/* end confdefs.h. */
14005#include <thread_db.h>
14006int
14007main ()
14008{
14009int i = TD_VERSION;
14010 ;
14011 return 0;
14012}
14013_ACEOF
81ecdfbb 14014if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
14015 gdb_cv_thread_db_h_has_td_version=yes
14016else
81ecdfbb 14017 gdb_cv_thread_db_h_has_td_version=no
59f80f10
DJ
14018
14019fi
81ecdfbb 14020rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
14021
14022fi
81ecdfbb
RW
14023{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
14024$as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
14025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
14026$as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
14027if test "${gdb_cv_thread_db_h_has_td_notls+set}" = set; then :
14028 $as_echo_n "(cached) " >&6
59f80f10 14029else
81ecdfbb 14030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
14031/* end confdefs.h. */
14032#include <thread_db.h>
14033int
14034main ()
14035{
14036int i = TD_NOTLS;
14037 ;
14038 return 0;
14039}
14040_ACEOF
81ecdfbb 14041if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
14042 gdb_cv_thread_db_h_has_td_notls=yes
14043else
81ecdfbb 14044 gdb_cv_thread_db_h_has_td_notls=no
59f80f10
DJ
14045
14046fi
81ecdfbb 14047rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
14048
14049fi
81ecdfbb
RW
14050{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
14051$as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
3f47be5c
EZ
14052fi
14053if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
bec39cab 14054
81ecdfbb 14055$as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
3f47be5c 14056
59f80f10
DJ
14057fi
14058if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
14059
81ecdfbb 14060$as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
59f80f10
DJ
14061
14062fi
14063if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
14064
81ecdfbb 14065$as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
59f80f10 14066
3f47be5c
EZ
14067fi
14068
b757528f 14069if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then
81ecdfbb
RW
14070 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/syscall.h> has __NR_tkill" >&5
14071$as_echo_n "checking whether <sys/syscall.h> has __NR_tkill... " >&6; }
14072if test "${gdb_cv_sys_syscall_h_has_tkill+set}" = set; then :
14073 $as_echo_n "(cached) " >&6
bec39cab 14074else
81ecdfbb 14075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14076/* end confdefs.h. */
b757528f 14077#include <sys/syscall.h>
bec39cab
AC
14078int
14079main ()
14080{
b757528f 14081int i = __NR_tkill;
bec39cab
AC
14082 ;
14083 return 0;
14084}
14085_ACEOF
81ecdfbb 14086if ac_fn_c_try_compile "$LINENO"; then :
b757528f
JJ
14087 gdb_cv_sys_syscall_h_has_tkill=yes
14088else
81ecdfbb 14089 gdb_cv_sys_syscall_h_has_tkill=no
bec39cab 14090
b757528f 14091fi
81ecdfbb 14092rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b757528f 14093
bec39cab 14094fi
81ecdfbb
RW
14095{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_sys_syscall_h_has_tkill" >&5
14096$as_echo "$gdb_cv_sys_syscall_h_has_tkill" >&6; }
b757528f 14097fi
99c1d451
TT
14098if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes"; then
14099 ac_fn_c_check_func "$LINENO" "syscall" "ac_cv_func_syscall"
14100if test "x$ac_cv_func_syscall" = x""yes; then :
bec39cab 14101
81ecdfbb 14102$as_echo "#define HAVE_TKILL_SYSCALL 1" >>confdefs.h
b757528f 14103
99c1d451
TT
14104
14105fi
14106
b757528f
JJ
14107fi
14108
81ecdfbb
RW
14109ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
14110"
14111if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = x""yes; then :
14112 ac_have_decl=1
10568435 14113else
81ecdfbb 14114 ac_have_decl=0
10568435 14115fi
10568435
JK
14116
14117cat >>confdefs.h <<_ACEOF
81ecdfbb 14118#define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
10568435
JK
14119_ACEOF
14120
14121
81ecdfbb
RW
14122if test "$cross_compiling" = yes; then :
14123 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
14124/* end confdefs.h. */
14125#include <sys/personality.h>
14126int
14127main ()
14128{
14129
14130# if !HAVE_DECL_ADDR_NO_RANDOMIZE
14131# define ADDR_NO_RANDOMIZE 0x0040000
14132# endif
14133 /* Test the flag could be set and stays set. */
14134 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
14135 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
14136 return 1
14137 ;
14138 return 0;
14139}
14140_ACEOF
81ecdfbb 14141if ac_fn_c_try_link "$LINENO"; then :
10568435
JK
14142 have_personality=true
14143else
81ecdfbb 14144 have_personality=false
10568435 14145fi
81ecdfbb
RW
14146rm -f core conftest.err conftest.$ac_objext \
14147 conftest$ac_exeext conftest.$ac_ext
10568435 14148else
81ecdfbb 14149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
14150/* end confdefs.h. */
14151#include <sys/personality.h>
14152int
14153main ()
14154{
14155
14156# if !HAVE_DECL_ADDR_NO_RANDOMIZE
14157# define ADDR_NO_RANDOMIZE 0x0040000
14158# endif
14159 /* Test the flag could be set and stays set. */
14160 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
14161 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
14162 return 1
14163 ;
14164 return 0;
14165}
14166_ACEOF
81ecdfbb 14167if ac_fn_c_try_run "$LINENO"; then :
10568435
JK
14168 have_personality=true
14169else
81ecdfbb 14170 have_personality=false
10568435 14171fi
81ecdfbb
RW
14172rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14173 conftest.$ac_objext conftest.beam conftest.$ac_ext
10568435 14174fi
81ecdfbb 14175
10568435
JK
14176if $have_personality
14177then
14178
81ecdfbb 14179$as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
10568435
JK
14180
14181fi
14182
e655c1a2
PA
14183case $host_os in
14184 go32* | *djgpp*)
14185 gdbinit=gdb.ini
14186 ;;
14187 *)
14188 gdbinit=.gdbinit
14189 ;;
14190esac
14191
14192cat >>confdefs.h <<_ACEOF
14193#define GDBINIT "$gdbinit"
14194_ACEOF
14195
14196
fb40c209 14197
f83d8a90
DE
14198# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
14199# except that the argument to --with-sysroot is optional.
14200# --with-sysroot (or --with-sysroot=yes) sets the default sysroot path.
14201if test "x$with_sysroot" = xyes; then
14202 with_sysroot="${exec_prefix}/${target_alias}/sys-root"
14203fi
bec39cab 14204
81ecdfbb
RW
14205# Check whether --with-sysroot was given.
14206if test "${with_sysroot+set}" = set; then :
f83d8a90
DE
14207 withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval
14208else
14209 TARGET_SYSTEM_ROOT=
14210fi
030292b7 14211
030292b7 14212
f83d8a90
DE
14213 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
14214 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14215 ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT`
14216 ac_define_dir=`eval echo $ac_define_dir`
030292b7 14217
f83d8a90
DE
14218cat >>confdefs.h <<_ACEOF
14219#define TARGET_SYSTEM_ROOT "$ac_define_dir"
14220_ACEOF
bec39cab 14221
030292b7 14222
b14b1491 14223
f83d8a90
DE
14224
14225 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
14226 if test "x$prefix" = xNONE; then
14227 test_prefix=/usr/local
14228 else
14229 test_prefix=$prefix
14230 fi
14231 else
14232 test_prefix=$exec_prefix
14233 fi
14234 value=0
14235 case ${ac_define_dir} in
14236 "${test_prefix}"|"${test_prefix}/"*|\
14237 '${exec_prefix}'|'${exec_prefix}/'*)
14238 value=1
14239 ;;
14240 esac
14241
14242cat >>confdefs.h <<_ACEOF
14243#define TARGET_SYSTEM_ROOT_RELOCATABLE $value
14244_ACEOF
030292b7
DJ
14245
14246
14247
16e7150e 14248
16e7150e 14249
81ecdfbb
RW
14250# Check whether --with-system-gdbinit was given.
14251if test "${with_system_gdbinit+set}" = set; then :
14252 withval=$with_system_gdbinit;
b14b1491
TT
14253 SYSTEM_GDBINIT=$withval
14254else
14255 SYSTEM_GDBINIT=
81ecdfbb
RW
14256fi
14257
16e7150e
JG
14258
14259 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
14260 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 14261 ac_define_dir=`eval echo $SYSTEM_GDBINIT`
16e7150e
JG
14262 ac_define_dir=`eval echo $ac_define_dir`
14263
14264cat >>confdefs.h <<_ACEOF
14265#define SYSTEM_GDBINIT "$ac_define_dir"
14266_ACEOF
14267
14268
14269
0c4a4063 14270
b14b1491
TT
14271 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
14272 if test "x$prefix" = xNONE; then
14273 test_prefix=/usr/local
14274 else
14275 test_prefix=$prefix
14276 fi
14277 else
14278 test_prefix=$exec_prefix
14279 fi
14280 value=0
14281 case ${ac_define_dir} in
14282 "${test_prefix}"|"${test_prefix}/"*|\
14283 '${exec_prefix}'|'${exec_prefix}/'*)
14284 value=1
14285 ;;
14286 esac
16e7150e 14287
b14b1491
TT
14288cat >>confdefs.h <<_ACEOF
14289#define SYSTEM_GDBINIT_RELOCATABLE $value
16e7150e
JG
14290_ACEOF
14291
b14b1491 14292
16e7150e 14293
0c4a4063 14294
81ecdfbb
RW
14295# Check whether --enable-werror was given.
14296if test "${enable_werror+set}" = set; then :
14297 enableval=$enable_werror; case "${enableval}" in
094a342e
MK
14298 yes | y) ERROR_ON_WARNING="yes" ;;
14299 no | n) ERROR_ON_WARNING="no" ;;
81ecdfbb 14300 *) as_fn_error "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
094a342e 14301 esac
81ecdfbb
RW
14302fi
14303
094a342e 14304
3bc3d82a
PA
14305# Enable -Werror by default when using gcc in C mode. Leave it off
14306# for C++ until we're warning clean. Turn it off for releases.
14307if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" \
14308 && test x"$enable_build_with_cxx" != x"yes" \
14309 && $development; then
094a342e
MK
14310 ERROR_ON_WARNING=yes
14311fi
14312
14313WERROR_CFLAGS=""
14314if test "${ERROR_ON_WARNING}" = yes ; then
14315 WERROR_CFLAGS="-Werror"
14316fi
14317
3bc3d82a 14318# These options work in either C or C++ modes.
aac331e4 14319build_warnings="-Wall -Wpointer-arith \
1cb5e2a4 14320-Wno-unused -Wunused-value -Wunused-function \
aac331e4
PA
14321-Wno-switch -Wno-char-subscripts \
14322-Wempty-body"
a3b362c4 14323
3bc3d82a
PA
14324# Now add in C and C++ specific options, depending on mode.
14325if test "$enable_build_with_cxx" = "yes"; then
14326 build_warnings="$build_warnings -Wno-sign-compare -Wno-write-strings \
14327-Wno-narrowing"
14328else
aac331e4
PA
14329 build_warnings="$build_warnings -Wpointer-sign -Wmissing-prototypes \
14330-Wdeclaration-after-statement -Wmissing-parameter-type \
14331-Wold-style-declaration -Wold-style-definition"
3bc3d82a
PA
14332fi
14333
3526781e
DJ
14334# Enable -Wno-format by default when using gcc on mingw since many
14335# GCC versions complain about %I64.
14336case "${host}" in
14337 *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;;
d3685d60 14338 *) build_warnings="$build_warnings -Wformat-nonliteral" ;;
3526781e
DJ
14339esac
14340
81ecdfbb
RW
14341# Check whether --enable-build-warnings was given.
14342if test "${enable_build_warnings+set}" = set; then :
14343 enableval=$enable_build_warnings; case "${enableval}" in
c906108c
SS
14344 yes) ;;
14345 no) build_warnings="-w";;
14346 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
14347 build_warnings="${build_warnings} ${t}";;
14348 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
14349 build_warnings="${t} ${build_warnings}";;
14350 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
14351esac
d4f3574e 14352if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 14353 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 14354fi
81ecdfbb
RW
14355fi
14356# Check whether --enable-gdb-build-warnings was given.
14357if test "${enable_gdb_build_warnings+set}" = set; then :
14358 enableval=$enable_gdb_build_warnings; case "${enableval}" in
3b851bce
AC
14359 yes) ;;
14360 no) build_warnings="-w";;
14361 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
14362 build_warnings="${build_warnings} ${t}";;
14363 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
14364 build_warnings="${t} ${build_warnings}";;
14365 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
14366esac
14367if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
14368 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
14369fi
81ecdfbb 14370fi
3bc3d82a
PA
14371
14372# The set of warnings supported by a C++ compiler is not the same as
14373# of the C compiler.
14374if test "$enable_build_with_cxx" = "yes"; then
14375 ac_ext=cpp
14376ac_cpp='$CXXCPP $CPPFLAGS'
14377ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14378ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14379ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14380
14381fi
14382
81ecdfbb 14383WARN_CFLAGS=""
c906108c
SS
14384if test "x${build_warnings}" != x -a "x$GCC" = xyes
14385then
81ecdfbb
RW
14386 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
14387$as_echo_n "checking compiler warning flags... " >&6; }
746a987d
AC
14388 # Separate out the -Werror flag as some files just cannot be
14389 # compiled with it enabled.
14390 for w in ${build_warnings}; do
14391 case $w in
14392 -Werr*) WERROR_CFLAGS=-Werror ;;
3bc3d82a
PA
14393 *)
14394 # Check whether GCC accepts it.
4536bbc6
AC
14395 saved_CFLAGS="$CFLAGS"
14396 CFLAGS="$CFLAGS $w"
3bc3d82a
PA
14397 saved_CXXFLAGS="$CXXFLAGS"
14398 CXXFLAGS="$CXXFLAGS $w"
54019719 14399 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14400/* end confdefs.h. */
4536bbc6 14401
bec39cab
AC
14402int
14403main ()
14404{
4536bbc6 14405
bec39cab
AC
14406 ;
14407 return 0;
14408}
14409_ACEOF
3bc3d82a 14410if ac_fn_cxx_try_compile "$LINENO"; then :
4536bbc6 14411 WARN_CFLAGS="${WARN_CFLAGS} $w"
4536bbc6 14412fi
81ecdfbb 14413rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4536bbc6 14414 CFLAGS="$saved_CFLAGS"
3bc3d82a 14415 CXXFLAGS="$saved_CXXFLAGS"
746a987d
AC
14416 esac
14417 done
81ecdfbb
RW
14418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
14419$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
c906108c
SS
14420fi
14421
14422
104c1213 14423
3bc3d82a
PA
14424if test "$enable_build_with_cxx" = "yes"; then
14425 ac_ext=c
14426ac_cpp='$CPP $CPPFLAGS'
14427ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14428ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14429ac_compiler_gnu=$ac_cv_c_compiler_gnu
14430
14431fi
14432
7a292a7a 14433# In the Cygwin environment, we need some additional flags.
81ecdfbb
RW
14434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
14435$as_echo_n "checking for cygwin... " >&6; }
14436if test "${gdb_cv_os_cygwin+set}" = set; then :
14437 $as_echo_n "(cached) " >&6
bec39cab 14438else
81ecdfbb 14439 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14440/* end confdefs.h. */
7a292a7a
SS
14441
14442#if defined (__CYGWIN__) || defined (__CYGWIN32__)
14443lose
14444#endif
bec39cab 14445_ACEOF
7a292a7a 14446if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
92a021de 14447 $EGREP "^lose$" >/dev/null 2>&1; then :
7a292a7a
SS
14448 gdb_cv_os_cygwin=yes
14449else
7a292a7a
SS
14450 gdb_cv_os_cygwin=no
14451fi
14452rm -f conftest*
14453
14454fi
81ecdfbb
RW
14455{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
14456$as_echo "$gdb_cv_os_cygwin" >&6; }
7a292a7a 14457
aff38e61 14458
3eb25fda 14459SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
aff38e61 14460case ${host} in
95cbc983
AC
14461 *go32* ) SER_HARDWIRE=ser-go32.o ;;
14462 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
0ea3f30e 14463 *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
aff38e61
AC
14464esac
14465
14466
cd0fc7c3
SS
14467# libreadline needs libuser32.a in a cygwin environment
14468WIN32LIBS=
14469if test x$gdb_cv_os_cygwin = xyes; then
c5394b80
JM
14470 WIN32LIBS="-luser32"
14471 case "${target}" in
14472 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
14473 ;;
14474 esac
cd0fc7c3 14475fi
c906108c 14476
b4505029
MM
14477# The ser-tcp.c module requires sockets.
14478case ${host} in
14479 *mingw32*)
14480
81ecdfbb 14481$as_echo "#define USE_WIN32API 1" >>confdefs.h
b4505029
MM
14482
14483 WIN32LIBS="$WIN32LIBS -lws2_32"
14484 ;;
14485esac
14486
7a292a7a 14487
31d99776 14488# Add ELF support to GDB, but only if BFD includes ELF support.
def63ff0
TT
14489
14490 OLD_CFLAGS=$CFLAGS
14491 OLD_LDFLAGS=$LDFLAGS
14492 OLD_LIBS=$LIBS
14493 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
14494 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
14495 # always want our bfd.
14496 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
5a2d4533
L
14497 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
14498 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
def63ff0 14499 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
711a72d3 14500 LIBS="-lbfd -liberty -lz $intl $LIBS"
def63ff0 14501 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
81ecdfbb
RW
14502$as_echo_n "checking for ELF support in BFD... " >&6; }
14503if test "${gdb_cv_var_elf+set}" = set; then :
14504 $as_echo_n "(cached) " >&6
31d99776 14505else
81ecdfbb 14506 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31d99776
DJ
14507/* end confdefs.h. */
14508#include <stdlib.h>
def63ff0
TT
14509 #include "bfd.h"
14510 #include "elf-bfd.h"
31d99776
DJ
14511
14512int
14513main ()
14514{
def63ff0 14515return bfd_get_elf_phdr_upper_bound (NULL);
31d99776
DJ
14516 ;
14517 return 0;
14518}
14519_ACEOF
81ecdfbb 14520if ac_fn_c_try_link "$LINENO"; then :
31d99776
DJ
14521 gdb_cv_var_elf=yes
14522else
81ecdfbb 14523 gdb_cv_var_elf=no
31d99776 14524fi
81ecdfbb
RW
14525rm -f core conftest.err conftest.$ac_objext \
14526 conftest$ac_exeext conftest.$ac_ext
31d99776 14527fi
81ecdfbb
RW
14528{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
14529$as_echo "$gdb_cv_var_elf" >&6; }
def63ff0
TT
14530 CFLAGS=$OLD_CFLAGS
14531 LDFLAGS=$OLD_LDFLAGS
14532 LIBS=$OLD_LIBS
31d99776 14533if test $gdb_cv_var_elf = yes; then
d4777acb 14534 CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o dtrace-probe.o"
31d99776 14535
81ecdfbb 14536$as_echo "#define HAVE_ELF 1" >>confdefs.h
31d99776 14537
075ff26d
JK
14538 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
14539 if test "$plugins" = "yes"; then
a48b32c0
L
14540 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
14541$as_echo_n "checking for library containing dlopen... " >&6; }
14542if test "${ac_cv_search_dlopen+set}" = set; then :
14543 $as_echo_n "(cached) " >&6
14544else
14545 ac_func_search_save_LIBS=$LIBS
14546cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14547/* end confdefs.h. */
14548
14549/* Override any GCC internal prototype to avoid an error.
14550 Use char because int might match the return type of a GCC
14551 builtin and then its argument prototype would still apply. */
14552#ifdef __cplusplus
14553extern "C"
14554#endif
14555char dlopen ();
14556int
14557main ()
14558{
14559return dlopen ();
14560 ;
14561 return 0;
14562}
14563_ACEOF
14564for ac_lib in '' dl; do
14565 if test -z "$ac_lib"; then
14566 ac_res="none required"
14567 else
14568 ac_res=-l$ac_lib
14569 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
14570 fi
14571 if ac_fn_c_try_link "$LINENO"; then :
14572 ac_cv_search_dlopen=$ac_res
14573fi
14574rm -f core conftest.err conftest.$ac_objext \
14575 conftest$ac_exeext
14576 if test "${ac_cv_search_dlopen+set}" = set; then :
14577 break
14578fi
14579done
14580if test "${ac_cv_search_dlopen+set}" = set; then :
14581
14582else
14583 ac_cv_search_dlopen=no
14584fi
14585rm conftest.$ac_ext
14586LIBS=$ac_func_search_save_LIBS
14587fi
14588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
14589$as_echo "$ac_cv_search_dlopen" >&6; }
14590ac_res=$ac_cv_search_dlopen
14591if test "$ac_res" != no; then :
14592 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14593
14594fi
14595
075ff26d 14596 fi
31d99776 14597fi
31d99776 14598
4f05add4
TT
14599# Add macho support to GDB, but only if BFD includes it.
14600
14601 OLD_CFLAGS=$CFLAGS
14602 OLD_LDFLAGS=$LDFLAGS
14603 OLD_LIBS=$LIBS
14604 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
14605 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
14606 # always want our bfd.
14607 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
5a2d4533
L
14608 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
14609 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
4f05add4 14610 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
711a72d3 14611 LIBS="-lbfd -liberty -lz $intl $LIBS"
4f05add4
TT
14612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5
14613$as_echo_n "checking for Mach-O support in BFD... " >&6; }
14614if test "${gdb_cv_var_macho+set}" = set; then :
14615 $as_echo_n "(cached) " >&6
14616else
14617 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14618/* end confdefs.h. */
14619#include <stdlib.h>
14620 #include "bfd.h"
14621 #include "mach-o.h"
14622
14623int
14624main ()
14625{
14626return bfd_mach_o_lookup_command (NULL, 0, NULL);
14627 ;
14628 return 0;
14629}
14630_ACEOF
14631if ac_fn_c_try_link "$LINENO"; then :
14632 gdb_cv_var_macho=yes
14633else
14634 gdb_cv_var_macho=no
14635fi
14636rm -f core conftest.err conftest.$ac_objext \
14637 conftest$ac_exeext conftest.$ac_ext
14638fi
14639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5
14640$as_echo "$gdb_cv_var_macho" >&6; }
14641 CFLAGS=$OLD_CFLAGS
14642 LDFLAGS=$OLD_LDFLAGS
14643 LIBS=$OLD_LIBS
14644if test $gdb_cv_var_macho = yes; then
14645 CONFIG_OBS="$CONFIG_OBS machoread.o"
14646fi
14647
121ce6e5
DJ
14648# Add any host-specific objects to GDB.
14649CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
14650
608e2dbb
TT
14651# If building on ELF, look for lzma support for embedded compressed debug info.
14652if test $gdb_cv_var_elf = yes; then
14653
14654# Check whether --with-lzma was given.
14655if test "${with_lzma+set}" = set; then :
14656 withval=$with_lzma;
14657else
14658 with_lzma=auto
14659fi
14660
14661 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5
14662$as_echo_n "checking whether to use lzma... " >&6; }
14663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5
14664$as_echo "$with_lzma" >&6; }
14665
14666 if test "${with_lzma}" != no; then
14667
14668
14669
14670
14671
14672
14673
14674
14675 use_additional=yes
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
14682 eval additional_includedir=\"$includedir\"
14683 eval additional_libdir=\"$libdir\"
14684
14685 exec_prefix="$acl_save_exec_prefix"
14686 prefix="$acl_save_prefix"
14687
14688
14689# Check whether --with-liblzma-prefix was given.
14690if test "${with_liblzma_prefix+set}" = set; then :
14691 withval=$with_liblzma_prefix;
14692 if test "X$withval" = "Xno"; then
14693 use_additional=no
14694 else
14695 if test "X$withval" = "X"; then
14696
14697 acl_save_prefix="$prefix"
14698 prefix="$acl_final_prefix"
14699 acl_save_exec_prefix="$exec_prefix"
14700 exec_prefix="$acl_final_exec_prefix"
14701
14702 eval additional_includedir=\"$includedir\"
14703 eval additional_libdir=\"$libdir\"
14704
14705 exec_prefix="$acl_save_exec_prefix"
14706 prefix="$acl_save_prefix"
14707
14708 else
14709 additional_includedir="$withval/include"
14710 additional_libdir="$withval/lib"
14711 fi
14712 fi
14713
14714fi
14715
14716 LIBLZMA=
14717 LTLIBLZMA=
14718 INCLZMA=
14719 rpathdirs=
14720 ltrpathdirs=
14721 names_already_handled=
14722 names_next_round='lzma '
14723 while test -n "$names_next_round"; do
14724 names_this_round="$names_next_round"
14725 names_next_round=
14726 for name in $names_this_round; do
14727 already_handled=
14728 for n in $names_already_handled; do
14729 if test "$n" = "$name"; then
14730 already_handled=yes
14731 break
14732 fi
14733 done
14734 if test -z "$already_handled"; then
14735 names_already_handled="$names_already_handled $name"
14736 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
14737 eval value=\"\$HAVE_LIB$uppername\"
14738 if test -n "$value"; then
14739 if test "$value" = yes; then
14740 eval value=\"\$LIB$uppername\"
14741 test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value"
14742 eval value=\"\$LTLIB$uppername\"
14743 test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value"
14744 else
14745 :
14746 fi
14747 else
14748 found_dir=
14749 found_la=
14750 found_so=
14751 found_a=
14752 if test $use_additional = yes; then
14753 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
14754 found_dir="$additional_libdir"
14755 found_so="$additional_libdir/lib$name.$shlibext"
14756 if test -f "$additional_libdir/lib$name.la"; then
14757 found_la="$additional_libdir/lib$name.la"
14758 fi
14759 else
14760 if test -f "$additional_libdir/lib$name.$libext"; then
14761 found_dir="$additional_libdir"
14762 found_a="$additional_libdir/lib$name.$libext"
14763 if test -f "$additional_libdir/lib$name.la"; then
14764 found_la="$additional_libdir/lib$name.la"
14765 fi
14766 fi
14767 fi
14768 fi
14769 if test "X$found_dir" = "X"; then
14770 for x in $LDFLAGS $LTLIBLZMA; do
14771
14772 acl_save_prefix="$prefix"
14773 prefix="$acl_final_prefix"
14774 acl_save_exec_prefix="$exec_prefix"
14775 exec_prefix="$acl_final_exec_prefix"
14776 eval x=\"$x\"
14777 exec_prefix="$acl_save_exec_prefix"
14778 prefix="$acl_save_prefix"
14779
14780 case "$x" in
14781 -L*)
14782 dir=`echo "X$x" | sed -e 's/^X-L//'`
14783 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
14784 found_dir="$dir"
14785 found_so="$dir/lib$name.$shlibext"
14786 if test -f "$dir/lib$name.la"; then
14787 found_la="$dir/lib$name.la"
14788 fi
14789 else
14790 if test -f "$dir/lib$name.$libext"; then
14791 found_dir="$dir"
14792 found_a="$dir/lib$name.$libext"
14793 if test -f "$dir/lib$name.la"; then
14794 found_la="$dir/lib$name.la"
14795 fi
14796 fi
14797 fi
14798 ;;
14799 esac
14800 if test "X$found_dir" != "X"; then
14801 break
14802 fi
14803 done
14804 fi
14805 if test "X$found_dir" != "X"; then
14806 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name"
14807 if test "X$found_so" != "X"; then
14808 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
14809 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
14810 else
14811 haveit=
14812 for x in $ltrpathdirs; do
14813 if test "X$x" = "X$found_dir"; then
14814 haveit=yes
14815 break
14816 fi
14817 done
14818 if test -z "$haveit"; then
14819 ltrpathdirs="$ltrpathdirs $found_dir"
14820 fi
14821 if test "$hardcode_direct" = yes; then
14822 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
14823 else
14824 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
14825 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
14826 haveit=
14827 for x in $rpathdirs; do
14828 if test "X$x" = "X$found_dir"; then
14829 haveit=yes
14830 break
14831 fi
14832 done
14833 if test -z "$haveit"; then
14834 rpathdirs="$rpathdirs $found_dir"
14835 fi
14836 else
14837 haveit=
14838 for x in $LDFLAGS $LIBLZMA; do
14839
14840 acl_save_prefix="$prefix"
14841 prefix="$acl_final_prefix"
14842 acl_save_exec_prefix="$exec_prefix"
14843 exec_prefix="$acl_final_exec_prefix"
14844 eval x=\"$x\"
14845 exec_prefix="$acl_save_exec_prefix"
14846 prefix="$acl_save_prefix"
14847
14848 if test "X$x" = "X-L$found_dir"; then
14849 haveit=yes
14850 break
14851 fi
14852 done
14853 if test -z "$haveit"; then
14854 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir"
14855 fi
14856 if test "$hardcode_minus_L" != no; then
14857 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
14858 else
14859 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
14860 fi
14861 fi
14862 fi
14863 fi
14864 else
14865 if test "X$found_a" != "X"; then
14866 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a"
14867 else
14868 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name"
14869 fi
14870 fi
14871 additional_includedir=
14872 case "$found_dir" in
14873 */lib | */lib/)
14874 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
14875 additional_includedir="$basedir/include"
14876 ;;
14877 esac
14878 if test "X$additional_includedir" != "X"; then
14879 if test "X$additional_includedir" != "X/usr/include"; then
14880 haveit=
14881 if test "X$additional_includedir" = "X/usr/local/include"; then
14882 if test -n "$GCC"; then
14883 case $host_os in
14884 linux*) haveit=yes;;
14885 esac
14886 fi
14887 fi
14888 if test -z "$haveit"; then
14889 for x in $CPPFLAGS $INCLZMA; do
14890
14891 acl_save_prefix="$prefix"
14892 prefix="$acl_final_prefix"
14893 acl_save_exec_prefix="$exec_prefix"
14894 exec_prefix="$acl_final_exec_prefix"
14895 eval x=\"$x\"
14896 exec_prefix="$acl_save_exec_prefix"
14897 prefix="$acl_save_prefix"
14898
14899 if test "X$x" = "X-I$additional_includedir"; then
14900 haveit=yes
14901 break
14902 fi
14903 done
14904 if test -z "$haveit"; then
14905 if test -d "$additional_includedir"; then
14906 INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir"
14907 fi
14908 fi
14909 fi
14910 fi
14911 fi
14912 if test -n "$found_la"; then
14913 save_libdir="$libdir"
14914 case "$found_la" in
14915 */* | *\\*) . "$found_la" ;;
14916 *) . "./$found_la" ;;
14917 esac
14918 libdir="$save_libdir"
14919 for dep in $dependency_libs; do
14920 case "$dep" in
14921 -L*)
14922 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
14923 if test "X$additional_libdir" != "X/usr/lib"; then
14924 haveit=
14925 if test "X$additional_libdir" = "X/usr/local/lib"; then
14926 if test -n "$GCC"; then
14927 case $host_os in
14928 linux*) haveit=yes;;
14929 esac
14930 fi
14931 fi
14932 if test -z "$haveit"; then
14933 haveit=
14934 for x in $LDFLAGS $LIBLZMA; do
14935
14936 acl_save_prefix="$prefix"
14937 prefix="$acl_final_prefix"
14938 acl_save_exec_prefix="$exec_prefix"
14939 exec_prefix="$acl_final_exec_prefix"
14940 eval x=\"$x\"
14941 exec_prefix="$acl_save_exec_prefix"
14942 prefix="$acl_save_prefix"
14943
14944 if test "X$x" = "X-L$additional_libdir"; then
14945 haveit=yes
14946 break
14947 fi
14948 done
14949 if test -z "$haveit"; then
14950 if test -d "$additional_libdir"; then
14951 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir"
14952 fi
14953 fi
14954 haveit=
14955 for x in $LDFLAGS $LTLIBLZMA; do
14956
14957 acl_save_prefix="$prefix"
14958 prefix="$acl_final_prefix"
14959 acl_save_exec_prefix="$exec_prefix"
14960 exec_prefix="$acl_final_exec_prefix"
14961 eval x=\"$x\"
14962 exec_prefix="$acl_save_exec_prefix"
14963 prefix="$acl_save_prefix"
14964
14965 if test "X$x" = "X-L$additional_libdir"; then
14966 haveit=yes
14967 break
14968 fi
14969 done
14970 if test -z "$haveit"; then
14971 if test -d "$additional_libdir"; then
14972 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir"
14973 fi
14974 fi
14975 fi
14976 fi
14977 ;;
14978 -R*)
14979 dir=`echo "X$dep" | sed -e 's/^X-R//'`
14980 if test "$enable_rpath" != no; then
14981 haveit=
14982 for x in $rpathdirs; do
14983 if test "X$x" = "X$dir"; then
14984 haveit=yes
14985 break
14986 fi
14987 done
14988 if test -z "$haveit"; then
14989 rpathdirs="$rpathdirs $dir"
14990 fi
14991 haveit=
14992 for x in $ltrpathdirs; do
14993 if test "X$x" = "X$dir"; then
14994 haveit=yes
14995 break
14996 fi
14997 done
14998 if test -z "$haveit"; then
14999 ltrpathdirs="$ltrpathdirs $dir"
15000 fi
15001 fi
15002 ;;
15003 -l*)
15004 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
15005 ;;
15006 *.la)
15007 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
15008 ;;
15009 *)
15010 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep"
15011 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep"
15012 ;;
15013 esac
15014 done
15015 fi
15016 else
15017 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
15018 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name"
15019 fi
15020 fi
15021 fi
15022 done
15023 done
15024 if test "X$rpathdirs" != "X"; then
15025 if test -n "$hardcode_libdir_separator"; then
15026 alldirs=
15027 for found_dir in $rpathdirs; do
15028 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
15029 done
15030 acl_save_libdir="$libdir"
15031 libdir="$alldirs"
15032 eval flag=\"$hardcode_libdir_flag_spec\"
15033 libdir="$acl_save_libdir"
15034 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
15035 else
15036 for found_dir in $rpathdirs; do
15037 acl_save_libdir="$libdir"
15038 libdir="$found_dir"
15039 eval flag=\"$hardcode_libdir_flag_spec\"
15040 libdir="$acl_save_libdir"
15041 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
15042 done
15043 fi
15044 fi
15045 if test "X$ltrpathdirs" != "X"; then
15046 for found_dir in $ltrpathdirs; do
15047 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir"
15048 done
15049 fi
15050
15051
15052 ac_save_CPPFLAGS="$CPPFLAGS"
15053
15054 for element in $INCLZMA; do
15055 haveit=
15056 for x in $CPPFLAGS; do
15057
15058 acl_save_prefix="$prefix"
15059 prefix="$acl_final_prefix"
15060 acl_save_exec_prefix="$exec_prefix"
15061 exec_prefix="$acl_final_exec_prefix"
15062 eval x=\"$x\"
15063 exec_prefix="$acl_save_exec_prefix"
15064 prefix="$acl_save_prefix"
15065
15066 if test "X$x" = "X$element"; then
15067 haveit=yes
15068 break
15069 fi
15070 done
15071 if test -z "$haveit"; then
15072 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
15073 fi
15074 done
15075
15076
15077 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5
15078$as_echo_n "checking for liblzma... " >&6; }
15079if test "${ac_cv_liblzma+set}" = set; then :
15080 $as_echo_n "(cached) " >&6
15081else
15082
15083 ac_save_LIBS="$LIBS"
15084 LIBS="$LIBS $LIBLZMA"
15085 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15086/* end confdefs.h. */
15087#include "lzma.h"
15088int
15089main ()
15090{
15091lzma_index_iter iter;
15092 lzma_index_iter_init (&iter, 0);
15093 lzma_mf_is_supported (LZMA_MF_HC3);
15094 ;
15095 return 0;
15096}
15097_ACEOF
15098if ac_fn_c_try_link "$LINENO"; then :
15099 ac_cv_liblzma=yes
15100else
15101 ac_cv_liblzma=no
15102fi
15103rm -f core conftest.err conftest.$ac_objext \
15104 conftest$ac_exeext conftest.$ac_ext
15105 LIBS="$ac_save_LIBS"
15106
15107fi
15108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5
15109$as_echo "$ac_cv_liblzma" >&6; }
15110 if test "$ac_cv_liblzma" = yes; then
15111 HAVE_LIBLZMA=yes
15112
15113$as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h
15114
15115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5
15116$as_echo_n "checking how to link with liblzma... " >&6; }
15117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5
15118$as_echo "$LIBLZMA" >&6; }
15119 else
15120 HAVE_LIBLZMA=no
15121 CPPFLAGS="$ac_save_CPPFLAGS"
15122 LIBLZMA=
15123 LTLIBLZMA=
15124 fi
15125
15126
15127
15128
15129
15130
15131 if test "$HAVE_LIBLZMA" != yes; then
15132 if test "$with_lzma" = yes; then
15133 as_fn_error "missing liblzma for --with-lzma" "$LINENO" 5
15134 fi
15135 fi
15136 fi
15137fi
15138
3fc11d3e
JM
15139LIBGUI="../libgui/src/libgui.a"
15140GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
15141
15142
7a292a7a 15143
3fc11d3e
JM
15144WIN32LDAPP=
15145
15146
15147
d91670b9 15148case "${host}" in
686a5eed 15149*-*-cygwin* | *-*-mingw* )
d91670b9
CV
15150 configdir="win"
15151 ;;
15152*)
15153 configdir="unix"
15154 ;;
15155esac
3fc11d3e
JM
15156
15157GDBTKLIBS=
15158if test "${enable_gdbtk}" = "yes"; then
15159
d1c3b63a
KS
15160 # Gdbtk must have an absolute path to srcdir in order to run
15161 # properly when not installed.
15162 here=`pwd`
15163 cd ${srcdir}
15164 GDBTK_SRC_DIR=`pwd`
15165 cd $here
15166
bec39cab 15167
5062cc19
KS
15168 #
15169 # Ok, lets find the tcl configuration
15170 # First, look for one uninstalled.
15171 # the alternative search directory is invoked by --with-tcl
15172 #
3fc11d3e 15173
5062cc19
KS
15174 if test x"${no_tcl}" = x ; then
15175 # we reset no_tcl in case something fails here
15176 no_tcl=true
bec39cab 15177
81ecdfbb
RW
15178# Check whether --with-tcl was given.
15179if test "${with_tcl+set}" = set; then :
15180 withval=$with_tcl; with_tclconfig=${withval}
15181fi
15182
15183 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
15184$as_echo_n "checking for Tcl configuration... " >&6; }
15185 if test "${ac_cv_c_tclconfig+set}" = set; then :
15186 $as_echo_n "(cached) " >&6
3fc11d3e 15187else
bec39cab 15188
3fc11d3e 15189
5062cc19
KS
15190 # First check to see if --with-tcl was specified.
15191 case "${host}" in
15192 *-*-cygwin*) platDir="win" ;;
15193 *) platDir="unix" ;;
15194 esac
15195 if test x"${with_tclconfig}" != x ; then
15196 if test -f "${with_tclconfig}/tclConfig.sh" ; then
15197 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
15198 else
81ecdfbb 15199 as_fn_error "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
5062cc19
KS
15200 fi
15201 fi
15202
15203 # then check for a private Tcl installation
15204 if test x"${ac_cv_c_tclconfig}" = x ; then
15205 for i in \
15206 ../tcl \
15207 `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
15208 `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
15209 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
15210 ../../tcl \
15211 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
15212 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
15213 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
15214 ../../../tcl \
15215 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
15216 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
15217 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
15218 if test -f "$i/$platDir/tclConfig.sh" ; then
15219 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
15220 break
15221 fi
15222 done
15223 fi
15224
15225 # on Darwin, check in Framework installation locations
15226 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
15227 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
15228 `ls -d /Library/Frameworks 2>/dev/null` \
15229 `ls -d /Network/Library/Frameworks 2>/dev/null` \
15230 `ls -d /System/Library/Frameworks 2>/dev/null` \
15231 ; do
15232 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
15233 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
15234 break
15235 fi
15236 done
15237 fi
15238
15239 # check in a few common install locations
15240 if test x"${ac_cv_c_tclconfig}" = x ; then
15241 for i in `ls -d ${libdir} 2>/dev/null` \
15242 `ls -d ${exec_prefix}/lib 2>/dev/null` \
15243 `ls -d ${prefix}/lib 2>/dev/null` \
15244 `ls -d /usr/local/lib 2>/dev/null` \
15245 `ls -d /usr/contrib/lib 2>/dev/null` \
15246 `ls -d /usr/lib 2>/dev/null` \
15247 ; do
15248 if test -f "$i/tclConfig.sh" ; then
15249 ac_cv_c_tclconfig=`(cd $i; pwd)`
15250 break
15251 fi
15252 done
15253 fi
3fc11d3e 15254
5062cc19
KS
15255 # check in a few other private locations
15256 if test x"${ac_cv_c_tclconfig}" = x ; then
15257 for i in \
15258 ${srcdir}/../tcl \
15259 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
15260 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
15261 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
15262 if test -f "$i/$platDir/tclConfig.sh" ; then
15263 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
15264 break
15265 fi
15266 done
15267 fi
bec39cab 15268
3fc11d3e
JM
15269fi
15270
5062cc19
KS
15271
15272 if test x"${ac_cv_c_tclconfig}" = x ; then
15273 TCL_BIN_DIR="# no Tcl configs found"
81ecdfbb
RW
15274 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
15275$as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
5062cc19
KS
15276 else
15277 no_tcl=
15278 TCL_BIN_DIR=${ac_cv_c_tclconfig}
81ecdfbb
RW
15279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
15280$as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
5062cc19
KS
15281 fi
15282 fi
3fc11d3e 15283
bec39cab 15284
85541719
DE
15285 # If $no_tk is nonempty, then we can't do Tk, and there is no
15286 # point to doing Tcl.
bec39cab 15287
5062cc19
KS
15288 #
15289 # Ok, lets find the tk configuration
15290 # First, look for one uninstalled.
15291 # the alternative search directory is invoked by --with-tk
15292 #
3fc11d3e 15293
5062cc19
KS
15294 if test x"${no_tk}" = x ; then
15295 # we reset no_tk in case something fails here
15296 no_tk=true
bec39cab 15297
81ecdfbb
RW
15298# Check whether --with-tk was given.
15299if test "${with_tk+set}" = set; then :
15300 withval=$with_tk; with_tkconfig=${withval}
15301fi
15302
15303 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
15304$as_echo_n "checking for Tk configuration... " >&6; }
15305 if test "${ac_cv_c_tkconfig+set}" = set; then :
15306 $as_echo_n "(cached) " >&6
bec39cab 15307else
3fc11d3e
JM
15308
15309
5062cc19
KS
15310 # First check to see if --with-tkconfig was specified.
15311 if test x"${with_tkconfig}" != x ; then
15312 if test -f "${with_tkconfig}/tkConfig.sh" ; then
15313 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
15314 else
81ecdfbb 15315 as_fn_error "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
5062cc19
KS
15316 fi
15317 fi
3fc11d3e 15318
5062cc19
KS
15319 # then check for a private Tk library
15320 case "${host}" in
15321 *-*-cygwin*) platDir="win" ;;
15322 *) platDir="unix" ;;
15323 esac
15324 if test x"${ac_cv_c_tkconfig}" = x ; then
15325 for i in \
15326 ../tk \
15327 `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
15328 `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
15329 `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
15330 ../../tk \
15331 `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
15332 `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
15333 `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
15334 ../../../tk \
15335 `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
15336 `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
15337 `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
15338 if test -f "$i/$platDir/tkConfig.sh" ; then
15339 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
15340 break
15341 fi
15342 done
15343 fi
15344
15345 # on Darwin, check in Framework installation locations
15346 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
15347 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
15348 `ls -d /Library/Frameworks 2>/dev/null` \
15349 `ls -d /Network/Library/Frameworks 2>/dev/null` \
15350 `ls -d /System/Library/Frameworks 2>/dev/null` \
15351 ; do
15352 if test -f "$i/Tk.framework/tkConfig.sh" ; then
15353 ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
15354 break
15355 fi
15356 done
15357 fi
15358
15359 # check in a few common install locations
15360 if test x"${ac_cv_c_tkconfig}" = x ; then
15361 for i in `ls -d ${libdir} 2>/dev/null` \
15362 `ls -d ${exec_prefix}/lib 2>/dev/null` \
15363 `ls -d ${prefix}/lib 2>/dev/null` \
15364 `ls -d /usr/local/lib 2>/dev/null` \
15365 `ls -d /usr/contrib/lib 2>/dev/null` \
15366 `ls -d /usr/lib 2>/dev/null` \
15367 ; do
15368 if test -f "$i/tkConfig.sh" ; then
15369 ac_cv_c_tkconfig=`(cd $i; pwd)`
15370 break
15371 fi
15372 done
15373 fi
15374 # check in a few other private locations
15375 if test x"${ac_cv_c_tkconfig}" = x ; then
15376 for i in \
15377 ${srcdir}/../tk \
15378 `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
15379 `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
15380 `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
15381 if test -f "$i/$platDir/tkConfig.sh" ; then
15382 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
15383 break
15384 fi
15385 done
15386 fi
3fc11d3e 15387
3fc11d3e
JM
15388fi
15389
15390
5062cc19
KS
15391 if test x"${ac_cv_c_tkconfig}" = x ; then
15392 TK_BIN_DIR="# no Tk configs found"
81ecdfbb
RW
15393 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
15394$as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
5062cc19
KS
15395 else
15396 no_tk=
15397 TK_BIN_DIR=${ac_cv_c_tkconfig}
81ecdfbb
RW
15398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
15399$as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
5062cc19 15400 fi
3fc11d3e 15401 fi
dd2504ab 15402
dd2504ab 15403
85541719
DE
15404 if test -z "${no_tcl}" -a -z "${no_tk}"; then
15405
81ecdfbb
RW
15406 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
15407$as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
85541719
DE
15408
15409 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
81ecdfbb
RW
15410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
15411$as_echo "loading" >&6; }
85541719
DE
15412 . ${TCL_BIN_DIR}/tclConfig.sh
15413 else
81ecdfbb
RW
15414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
15415$as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
85541719
DE
15416 fi
15417
15418 # eval is required to do the TCL_DBGX substitution
15419 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
15420 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
15421
15422 # If the TCL_BIN_DIR is the build directory (not the install directory),
15423 # then set the common variable name to the value of the build variables.
15424 # For example, the variable TCL_LIB_SPEC will be set to the value
15425 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
15426 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
15427 # installed and uninstalled version of Tcl.
15428 if test -f "${TCL_BIN_DIR}/Makefile" ; then
15429 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
15430 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
15431 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
15432 elif test "`uname -s`" = "Darwin"; then
15433 # If Tcl was built as a framework, attempt to use the libraries
15434 # from the framework at the given location so that linking works
a68ffae9 15435 # against Tcl.framework installed in an arbitrary location.
85541719
DE
15436 case ${TCL_DEFS} in
15437 *TCL_FRAMEWORK*)
15438 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
15439 for i in "`cd ${TCL_BIN_DIR}; pwd`" \
15440 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
15441 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
15442 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
15443 break
15444 fi
15445 done
15446 fi
15447 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
15448 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
15449 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
15450 fi
15451 ;;
15452 esac
15453 fi
15454
15455 # eval is required to do the TCL_DBGX substitution
15456 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
15457 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
15458 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
15459 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
15460
15461
15462
15463
15464
15465
15466
15467
15468
15469
15470
15471
15472
15473
15474
15475 # Check for in-tree tcl
15476 here=`pwd`
15477 cd ${srcdir}/..
15478 topdir=`pwd`
15479 cd ${here}
15480
15481 intree="no"
15482 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
15483 intree="yes"
15484 fi
15485
15486 # Find Tcl private headers
15487 if test x"${intree}" = xno; then
15488
81ecdfbb
RW
15489 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
15490$as_echo_n "checking for Tcl private headers... " >&6; }
85541719
DE
15491 private_dir=""
15492 dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
15493 if test -f ${dir}/tclInt.h ; then
15494 private_dir=${dir}
15495 fi
15496
15497 if test x"${private_dir}" = x; then
81ecdfbb 15498 as_fn_error "could not find private Tcl headers" "$LINENO" 5
85541719
DE
15499 else
15500 TCL_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
15501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
15502$as_echo "${private_dir}" >&6; }
85541719
DE
15503 fi
15504
15505 TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
15506 TCL_LIBRARY="${TCL_LIB_SPEC}"
15507 TCL_DEPS=""
15508 else
15509 # If building tcl in the same src tree, private headers
15510 # are not needed, but we need to be sure to use the right
15511 # headers library
15512 TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
15513 TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
15514 TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
15515 fi
15516
15517
15518
15519
15520
81ecdfbb
RW
15521 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
15522$as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
dd2504ab 15523
5062cc19 15524 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
81ecdfbb
RW
15525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
15526$as_echo "loading" >&6; }
5062cc19 15527 . ${TK_BIN_DIR}/tkConfig.sh
3fc11d3e 15528 else
81ecdfbb
RW
15529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
15530$as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
3fc11d3e 15531 fi
bec39cab 15532
5062cc19
KS
15533 # eval is required to do the TK_DBGX substitution
15534 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
15535 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
15536
15537 # If the TK_BIN_DIR is the build directory (not the install directory),
15538 # then set the common variable name to the value of the build variables.
15539 # For example, the variable TK_LIB_SPEC will be set to the value
15540 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
15541 # instead of TK_BUILD_LIB_SPEC since it will work with both an
15542 # installed and uninstalled version of Tcl.
85541719 15543 if test -f "${TK_BIN_DIR}/Makefile" ; then
5062cc19
KS
15544 TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
15545 TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
15546 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
15547 elif test "`uname -s`" = "Darwin"; then
15548 # If Tk was built as a framework, attempt to use the libraries
15549 # from the framework at the given location so that linking works
a68ffae9 15550 # against Tk.framework installed in an arbitrary location.
5062cc19
KS
15551 case ${TK_DEFS} in
15552 *TK_FRAMEWORK*)
85541719 15553 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
5062cc19
KS
15554 for i in "`cd ${TK_BIN_DIR}; pwd`" \
15555 "`cd ${TK_BIN_DIR}/../..; pwd`"; do
15556 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
15557 TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
15558 break
15559 fi
15560 done
15561 fi
85541719 15562 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
5062cc19
KS
15563 TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
15564 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
15565 fi
15566 ;;
15567 esac
3fc11d3e
JM
15568 fi
15569
5062cc19
KS
15570 # eval is required to do the TK_DBGX substitution
15571 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
15572 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
15573 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
15574 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
3fc11d3e 15575
3fc11d3e
JM
15576
15577
bec39cab
AC
15578
15579
15580
15581
15582
15583
15584
3fc11d3e 15585
3fc11d3e 15586
bec39cab 15587
bec39cab 15588
85541719
DE
15589 # Check for in-tree Tk
15590 intree="no"
15591 if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
15592 intree="yes"
15593 fi
3fc11d3e 15594
85541719
DE
15595 # Find Tk private headers
15596 if test x"${intree}" = xno; then
3fc11d3e 15597
81ecdfbb
RW
15598 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
15599$as_echo_n "checking for Tk private headers... " >&6; }
5062cc19
KS
15600 private_dir=""
15601 dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
15602 if test -f ${dir}/tkInt.h; then
15603 private_dir=${dir}
3fc11d3e 15604 fi
bec39cab 15605
5062cc19 15606 if test x"${private_dir}" = x; then
81ecdfbb 15607 as_fn_error "could not find Tk private headers" "$LINENO" 5
3fc11d3e 15608 else
5062cc19 15609 TK_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
15610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
15611$as_echo "${private_dir}" >&6; }
3fc11d3e 15612 fi
3fc11d3e 15613
85541719
DE
15614 TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
15615 TK_LIBRARY=${TK_LIB_SPEC}
15616 TK_DEPS=""
15617 else
15618 TK_INCLUDE="-I${TK_SRC_DIR}/generic"
15619 TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
15620 TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
15621 fi
3fc11d3e
JM
15622
15623
3fc11d3e
JM
15624
15625
3fc11d3e 15626
85541719 15627 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e 15628
85541719
DE
15629 # Include some libraries that Tcl and Tk want.
15630 TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
15631 # Yes, the ordering seems wrong here. But it isn't.
15632 # TK_LIBS is the list of libraries that need to be linked
15633 # after Tcl/Tk. Note that this isn't put into LIBS. If it
15634 # were in LIBS then any link tests after this point would
15635 # try to include things like `$(LIBGUI)', which wouldn't work.
15636 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5 15637
85541719
DE
15638 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
15639 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
15640 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
15641 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
15642 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
15643 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
15644 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
3fc11d3e 15645
85541719
DE
15646 if test x$gdb_cv_os_cygwin = xyes; then
15647 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
15648 WIN32LDAPP="-Wl,--subsystem,console"
15649 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
3fc11d3e 15650 fi
ffc6a242 15651
81ecdfbb 15652 subdirs="$subdirs gdbtk"
3ace7edb 15653
85541719 15654 fi
3fc11d3e
JM
15655fi
15656
15657
15658
15659
15660
15661
15662
15663
81ecdfbb
RW
15664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
15665$as_echo_n "checking for X... " >&6; }
bec39cab 15666
c906108c 15667
81ecdfbb
RW
15668# Check whether --with-x was given.
15669if test "${with_x+set}" = set; then :
15670 withval=$with_x;
15671fi
c906108c
SS
15672
15673# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
15674if test "x$with_x" = xno; then
15675 # The user explicitly disabled X.
15676 have_x=disabled
15677else
81ecdfbb
RW
15678 case $x_includes,$x_libraries in #(
15679 *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
15680 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
15681 $as_echo_n "(cached) " >&6
c906108c
SS
15682else
15683 # One or both of the vars are not set, and there is no cached value.
bec39cab 15684ac_x_includes=no ac_x_libraries=no
81ecdfbb 15685rm -f -r conftest.dir
bec39cab
AC
15686if mkdir conftest.dir; then
15687 cd conftest.dir
bec39cab 15688 cat >Imakefile <<'_ACEOF'
81ecdfbb
RW
15689incroot:
15690 @echo incroot='${INCROOT}'
15691usrlibdir:
15692 @echo usrlibdir='${USRLIBDIR}'
15693libdir:
15694 @echo libdir='${LIBDIR}'
15695_ACEOF
15696 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
c906108c 15697 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
81ecdfbb
RW
15698 for ac_var in incroot usrlibdir libdir; do
15699 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
15700 done
c906108c 15701 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
81ecdfbb
RW
15702 for ac_extension in a so sl dylib la dll; do
15703 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
15704 test -f "$ac_im_libdir/libX11.$ac_extension"; then
bec39cab 15705 ac_im_usrlibdir=$ac_im_libdir; break
c906108c
SS
15706 fi
15707 done
15708 # Screen out bogus values from the imake configuration. They are
15709 # bogus both because they are the default anyway, and because
15710 # using them would break gcc on systems where it needs fixed includes.
bec39cab 15711 case $ac_im_incroot in
81ecdfbb 15712 /usr/include) ac_x_includes= ;;
bec39cab 15713 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
c906108c 15714 esac
bec39cab 15715 case $ac_im_usrlibdir in
81ecdfbb 15716 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
bec39cab 15717 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
c906108c
SS
15718 esac
15719 fi
15720 cd ..
81ecdfbb 15721 rm -f -r conftest.dir
c906108c
SS
15722fi
15723
bec39cab
AC
15724# Standard set of common directories for X headers.
15725# Check X11 before X11Rn because it is often a symlink to the current release.
15726ac_x_header_dirs='
15727/usr/X11/include
81ecdfbb 15728/usr/X11R7/include
bec39cab
AC
15729/usr/X11R6/include
15730/usr/X11R5/include
15731/usr/X11R4/include
15732
15733/usr/include/X11
81ecdfbb 15734/usr/include/X11R7
bec39cab
AC
15735/usr/include/X11R6
15736/usr/include/X11R5
15737/usr/include/X11R4
15738
15739/usr/local/X11/include
81ecdfbb 15740/usr/local/X11R7/include
bec39cab
AC
15741/usr/local/X11R6/include
15742/usr/local/X11R5/include
15743/usr/local/X11R4/include
15744
15745/usr/local/include/X11
81ecdfbb 15746/usr/local/include/X11R7
bec39cab
AC
15747/usr/local/include/X11R6
15748/usr/local/include/X11R5
15749/usr/local/include/X11R4
15750
15751/usr/X386/include
15752/usr/x386/include
15753/usr/XFree86/include/X11
15754
15755/usr/include
15756/usr/local/include
15757/usr/unsupported/include
15758/usr/athena/include
15759/usr/local/x11r5/include
15760/usr/lpp/Xamples/include
15761
15762/usr/openwin/include
15763/usr/openwin/share/include'
15764
15765if test "$ac_x_includes" = no; then
81ecdfbb 15766 # Guess where to find include files, by looking for Xlib.h.
c906108c 15767 # First, try using that file with no special directory specified.
81ecdfbb 15768 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15769/* end confdefs.h. */
81ecdfbb 15770#include <X11/Xlib.h>
bec39cab 15771_ACEOF
81ecdfbb 15772if ac_fn_c_try_cpp "$LINENO"; then :
c906108c
SS
15773 # We can compile using X headers with no special include directory.
15774ac_x_includes=
15775else
bec39cab 15776 for ac_dir in $ac_x_header_dirs; do
81ecdfbb 15777 if test -r "$ac_dir/X11/Xlib.h"; then
bec39cab
AC
15778 ac_x_includes=$ac_dir
15779 break
15780 fi
15781done
c906108c 15782fi
bec39cab
AC
15783rm -f conftest.err conftest.$ac_ext
15784fi # $ac_x_includes = no
c906108c 15785
bec39cab 15786if test "$ac_x_libraries" = no; then
c906108c 15787 # Check for the libraries.
c906108c
SS
15788 # See if we find them without any special options.
15789 # Don't add to $LIBS permanently.
bec39cab 15790 ac_save_LIBS=$LIBS
81ecdfbb
RW
15791 LIBS="-lX11 $LIBS"
15792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15793/* end confdefs.h. */
81ecdfbb 15794#include <X11/Xlib.h>
bec39cab
AC
15795int
15796main ()
15797{
81ecdfbb 15798XrmInitialize ()
bec39cab
AC
15799 ;
15800 return 0;
15801}
15802_ACEOF
81ecdfbb 15803if ac_fn_c_try_link "$LINENO"; then :
bec39cab 15804 LIBS=$ac_save_LIBS
c906108c
SS
15805# We can link X programs with no special library path.
15806ac_x_libraries=
15807else
81ecdfbb
RW
15808 LIBS=$ac_save_LIBS
15809for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
c906108c 15810do
bec39cab 15811 # Don't even attempt the hair of trying to link an X program!
81ecdfbb
RW
15812 for ac_extension in a so sl dylib la dll; do
15813 if test -r "$ac_dir/libX11.$ac_extension"; then
c906108c
SS
15814 ac_x_libraries=$ac_dir
15815 break 2
15816 fi
15817 done
15818done
15819fi
81ecdfbb
RW
15820rm -f core conftest.err conftest.$ac_objext \
15821 conftest$ac_exeext conftest.$ac_ext
bec39cab 15822fi # $ac_x_libraries = no
c906108c 15823
81ecdfbb
RW
15824case $ac_x_includes,$ac_x_libraries in #(
15825 no,* | *,no | *\'*)
15826 # Didn't find X, or a directory has "'" in its name.
15827 ac_cv_have_x="have_x=no";; #(
15828 *)
15829 # Record where we found X for the cache.
15830 ac_cv_have_x="have_x=yes\
15831 ac_x_includes='$ac_x_includes'\
15832 ac_x_libraries='$ac_x_libraries'"
15833esac
c906108c 15834fi
81ecdfbb
RW
15835;; #(
15836 *) have_x=yes;;
15837 esac
c906108c
SS
15838 eval "$ac_cv_have_x"
15839fi # $with_x != no
15840
15841if test "$have_x" != yes; then
81ecdfbb
RW
15842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
15843$as_echo "$have_x" >&6; }
c906108c
SS
15844 no_x=yes
15845else
15846 # If each of the values was on the command line, it overrides each guess.
15847 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
15848 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
15849 # Update the cache value to reflect the command line values.
81ecdfbb
RW
15850 ac_cv_have_x="have_x=yes\
15851 ac_x_includes='$x_includes'\
15852 ac_x_libraries='$x_libraries'"
15853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
15854$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
c906108c
SS
15855fi
15856
15857
bec39cab 15858# Unlike the sim directory, whether a simulator is linked is controlled by
9b624dbe 15859# presence of a gdb_sim definition in the target configure.tgt entry.
7a292a7a
SS
15860# This code just checks for a few cases where we'd like to ignore those
15861# definitions, even when they're present in the '.mt' file. These cases
15862# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 15863# not part of the source tree.
7a292a7a 15864#
81ecdfbb
RW
15865# Check whether --enable-sim was given.
15866if test "${enable_sim+set}" = set; then :
15867 enableval=$enable_sim; echo "enable_sim = $enable_sim";
7a292a7a
SS
15868 echo "enableval = ${enableval}";
15869 case "${enableval}" in
15870 yes) ignore_sim=false ;;
15871 no) ignore_sim=true ;;
15872 *) ignore_sim=false ;;
15873 esac
15874else
15875 ignore_sim=false
81ecdfbb
RW
15876fi
15877
7a292a7a
SS
15878
15879if test ! -d "${srcdir}/../sim"; then
15880 ignore_sim=true
15881fi
15882
9b624dbe
UW
15883SIM=
15884SIM_OBS=
15885if test "${ignore_sim}" = "false"; then
15886 if test x"${gdb_sim}" != x ; then
15887 SIM="${gdb_sim}"
15888 SIM_OBS="remote-sim.o"
60ca704f 15889
81ecdfbb 15890$as_echo "#define WITH_SIM 1" >>confdefs.h
7a292a7a 15891
9b624dbe 15892 fi
7a292a7a
SS
15893fi
15894
15895
15896
c906108c
SS
15897
15898
15899
15900
15901
15902
dfcd3bfb 15903
e56ac5c3
AC
15904
15905
b3a90332
AC
15906
15907
c35f4ffc 15908# List of host floatformats.
bec39cab
AC
15909
15910cat >>confdefs.h <<_ACEOF
c35f4ffc 15911#define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
bec39cab 15912_ACEOF
c35f4ffc 15913
bec39cab
AC
15914
15915cat >>confdefs.h <<_ACEOF
c35f4ffc 15916#define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
bec39cab
AC
15917_ACEOF
15918
c35f4ffc 15919
bec39cab 15920cat >>confdefs.h <<_ACEOF
c35f4ffc 15921#define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
bec39cab 15922_ACEOF
c35f4ffc
AC
15923
15924
c906108c
SS
15925# target_subdir is used by the testsuite to find the target libraries.
15926target_subdir=
15927if test "${host}" != "${target}"; then
15928 target_subdir="${target_alias}/"
15929fi
15930
15931
15932frags=
771b4502 15933if test "${gdb_native}" = "yes"; then
0dad8a66
MK
15934 host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
15935 if test ! -f ${host_makefile_frag}; then
81ecdfbb 15936 as_fn_error "\"*** Gdb does not support native target ${host}\"" "$LINENO" 5
0dad8a66
MK
15937 fi
15938 frags="$frags $host_makefile_frag"
15939else
15940 host_makefile_frag=/dev/null
c906108c 15941fi
c906108c 15942
c906108c
SS
15943
15944
15945
771b4502 15946if test "${gdb_native}" = "yes"; then
a85f51e7
DJ
15947# We pick this up from the host configuration file (.mh) because we
15948# do not have a native configuration Makefile fragment.
c906108c
SS
15949nativefile=`sed -n '
15950s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
15951' ${host_makefile_frag}`
c906108c
SS
15952fi
15953
15954
b00a8037 15955if test x"${gdb_osabi}" != x ; then
bec39cab
AC
15956
15957cat >>confdefs.h <<_ACEOF
b00a8037 15958#define GDB_OSABI_DEFAULT $gdb_osabi
bec39cab 15959_ACEOF
b00a8037
DJ
15960
15961fi
15962
8dcde887 15963# Enable multi-ice-gdb-server.
81ecdfbb
RW
15964# Check whether --enable-multi-ice was given.
15965if test "${enable_multi_ice+set}" = set; then :
15966 enableval=$enable_multi_ice; case $enableval in
8dcde887
MK
15967 yes | no)
15968 ;;
81ecdfbb 15969 *) as_fn_error "bad value $enableval for --enable-multi-ice" "$LINENO" 5 ;;
8dcde887 15970 esac
81ecdfbb 15971fi
b4e70030 15972
81ecdfbb
RW
15973if test "x$enable_multi_ice" = xyes; then
15974 subdirs="$subdirs multi-ice"
3ace7edb 15975
a85f51e7
DJ
15976fi
15977
496c0e1b
JB
15978# Check whether --enable-gdbserver was given.
15979if test "${enable_gdbserver+set}" = set; then :
15980 enableval=$enable_gdbserver; case "${enableval}" in
15981 yes| no|auto) ;;
15982 *) as_fn_error "bad value ${enableval} for --enable-gdbserver option" "$LINENO" 5 ;;
15983esac
15984else
15985 enable_gdbserver=auto
15986fi
15987
15988
15989# We only build gdbserver automatically in a native configuration, and
15990# only if the user did not explicitly disable its build.
15991if test "$gdb_native" = "yes" -a "$enable_gdbserver" != "no"; then
81ecdfbb
RW
15992 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5
15993$as_echo_n "checking whether gdbserver is supported on this host... " >&6; }
8dcde887 15994 if test "x$build_gdbserver" = xyes; then
81ecdfbb
RW
15995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15996$as_echo "yes" >&6; }
15997 subdirs="$subdirs gdbserver"
3ace7edb 15998
496c0e1b 15999 gdbserver_build_enabled=yes
8dcde887 16000 else
81ecdfbb
RW
16001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16002$as_echo "no" >&6; }
8dcde887
MK
16003 fi
16004fi
16005
496c0e1b
JB
16006# If the user explicitly request the gdbserver to be built, verify that
16007# we were in fact able to enable it.
16008if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then
16009 as_fn_error "Automatic gdbserver build is not supported for this configuration" "$LINENO" 5
16010fi
16011
393fd4c3
YQ
16012# Check for babeltrace and babeltrace-ctf
16013
16014# Check whether --with-babeltrace was given.
16015if test "${with_babeltrace+set}" = set; then :
16016 withval=$with_babeltrace;
16017else
16018 with_babeltrace=auto
16019fi
16020
16021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltrace" >&5
16022$as_echo_n "checking whether to use babeltrace... " >&6; }
16023{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5
16024$as_echo "$with_babeltrace" >&6; }
16025
16026if test "x$with_babeltrace" = "xno"; then
16027 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&5
16028$as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&2;}
16029else
16030 # Append -Werror to CFLAGS so that configure can catch the warning
16031 # "assignment from incompatible pointer type", which is related to
16032 # the babeltrace change from 1.0.3 to 1.1.0. Babeltrace 1.1.0 works
16033 # in GDB, while babeltrace 1.0.3 is broken.
16034 # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be
16035 # safe to save and restore CFLAGS here.
16036 saved_CFLAGS=$CFLAGS
16037 CFLAGS="$CFLAGS -Werror"
16038
16039
16040
16041
16042
16043
16044
16045
16046 use_additional=yes
16047
16048 acl_save_prefix="$prefix"
16049 prefix="$acl_final_prefix"
16050 acl_save_exec_prefix="$exec_prefix"
16051 exec_prefix="$acl_final_exec_prefix"
16052
16053 eval additional_includedir=\"$includedir\"
16054 eval additional_libdir=\"$libdir\"
16055
16056 exec_prefix="$acl_save_exec_prefix"
16057 prefix="$acl_save_prefix"
16058
16059
16060# Check whether --with-libbabeltrace-prefix was given.
16061if test "${with_libbabeltrace_prefix+set}" = set; then :
16062 withval=$with_libbabeltrace_prefix;
16063 if test "X$withval" = "Xno"; then
16064 use_additional=no
16065 else
16066 if test "X$withval" = "X"; then
16067
16068 acl_save_prefix="$prefix"
16069 prefix="$acl_final_prefix"
16070 acl_save_exec_prefix="$exec_prefix"
16071 exec_prefix="$acl_final_exec_prefix"
16072
16073 eval additional_includedir=\"$includedir\"
16074 eval additional_libdir=\"$libdir\"
16075
16076 exec_prefix="$acl_save_exec_prefix"
16077 prefix="$acl_save_prefix"
16078
16079 else
16080 additional_includedir="$withval/include"
16081 additional_libdir="$withval/lib"
16082 fi
16083 fi
16084
16085fi
16086
16087 LIBBABELTRACE=
16088 LTLIBBABELTRACE=
16089 INCBABELTRACE=
16090 rpathdirs=
16091 ltrpathdirs=
16092 names_already_handled=
16093 names_next_round='babeltrace babeltrace-ctf'
16094 while test -n "$names_next_round"; do
16095 names_this_round="$names_next_round"
16096 names_next_round=
16097 for name in $names_this_round; do
16098 already_handled=
16099 for n in $names_already_handled; do
16100 if test "$n" = "$name"; then
16101 already_handled=yes
16102 break
16103 fi
16104 done
16105 if test -z "$already_handled"; then
16106 names_already_handled="$names_already_handled $name"
16107 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
16108 eval value=\"\$HAVE_LIB$uppername\"
16109 if test -n "$value"; then
16110 if test "$value" = yes; then
16111 eval value=\"\$LIB$uppername\"
16112 test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value"
16113 eval value=\"\$LTLIB$uppername\"
16114 test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value"
16115 else
16116 :
16117 fi
16118 else
16119 found_dir=
16120 found_la=
16121 found_so=
16122 found_a=
16123 if test $use_additional = yes; then
16124 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
16125 found_dir="$additional_libdir"
16126 found_so="$additional_libdir/lib$name.$shlibext"
16127 if test -f "$additional_libdir/lib$name.la"; then
16128 found_la="$additional_libdir/lib$name.la"
16129 fi
16130 else
16131 if test -f "$additional_libdir/lib$name.$libext"; then
16132 found_dir="$additional_libdir"
16133 found_a="$additional_libdir/lib$name.$libext"
16134 if test -f "$additional_libdir/lib$name.la"; then
16135 found_la="$additional_libdir/lib$name.la"
16136 fi
16137 fi
16138 fi
16139 fi
16140 if test "X$found_dir" = "X"; then
16141 for x in $LDFLAGS $LTLIBBABELTRACE; do
16142
16143 acl_save_prefix="$prefix"
16144 prefix="$acl_final_prefix"
16145 acl_save_exec_prefix="$exec_prefix"
16146 exec_prefix="$acl_final_exec_prefix"
16147 eval x=\"$x\"
16148 exec_prefix="$acl_save_exec_prefix"
16149 prefix="$acl_save_prefix"
16150
16151 case "$x" in
16152 -L*)
16153 dir=`echo "X$x" | sed -e 's/^X-L//'`
16154 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
16155 found_dir="$dir"
16156 found_so="$dir/lib$name.$shlibext"
16157 if test -f "$dir/lib$name.la"; then
16158 found_la="$dir/lib$name.la"
16159 fi
16160 else
16161 if test -f "$dir/lib$name.$libext"; then
16162 found_dir="$dir"
16163 found_a="$dir/lib$name.$libext"
16164 if test -f "$dir/lib$name.la"; then
16165 found_la="$dir/lib$name.la"
16166 fi
16167 fi
16168 fi
16169 ;;
16170 esac
16171 if test "X$found_dir" != "X"; then
16172 break
16173 fi
16174 done
16175 fi
16176 if test "X$found_dir" != "X"; then
16177 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name"
16178 if test "X$found_so" != "X"; then
16179 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
16180 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
16181 else
16182 haveit=
16183 for x in $ltrpathdirs; do
16184 if test "X$x" = "X$found_dir"; then
16185 haveit=yes
16186 break
16187 fi
16188 done
16189 if test -z "$haveit"; then
16190 ltrpathdirs="$ltrpathdirs $found_dir"
16191 fi
16192 if test "$hardcode_direct" = yes; then
16193 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
16194 else
16195 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
16196 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
16197 haveit=
16198 for x in $rpathdirs; do
16199 if test "X$x" = "X$found_dir"; then
16200 haveit=yes
16201 break
16202 fi
16203 done
16204 if test -z "$haveit"; then
16205 rpathdirs="$rpathdirs $found_dir"
16206 fi
16207 else
16208 haveit=
16209 for x in $LDFLAGS $LIBBABELTRACE; do
16210
16211 acl_save_prefix="$prefix"
16212 prefix="$acl_final_prefix"
16213 acl_save_exec_prefix="$exec_prefix"
16214 exec_prefix="$acl_final_exec_prefix"
16215 eval x=\"$x\"
16216 exec_prefix="$acl_save_exec_prefix"
16217 prefix="$acl_save_prefix"
16218
16219 if test "X$x" = "X-L$found_dir"; then
16220 haveit=yes
16221 break
16222 fi
16223 done
16224 if test -z "$haveit"; then
16225 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir"
16226 fi
16227 if test "$hardcode_minus_L" != no; then
16228 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
16229 else
16230 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
16231 fi
16232 fi
16233 fi
16234 fi
16235 else
16236 if test "X$found_a" != "X"; then
16237 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a"
16238 else
16239 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name"
16240 fi
16241 fi
16242 additional_includedir=
16243 case "$found_dir" in
16244 */lib | */lib/)
16245 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
16246 additional_includedir="$basedir/include"
16247 ;;
16248 esac
16249 if test "X$additional_includedir" != "X"; then
16250 if test "X$additional_includedir" != "X/usr/include"; then
16251 haveit=
16252 if test "X$additional_includedir" = "X/usr/local/include"; then
16253 if test -n "$GCC"; then
16254 case $host_os in
16255 linux*) haveit=yes;;
16256 esac
16257 fi
16258 fi
16259 if test -z "$haveit"; then
16260 for x in $CPPFLAGS $INCBABELTRACE; do
16261
16262 acl_save_prefix="$prefix"
16263 prefix="$acl_final_prefix"
16264 acl_save_exec_prefix="$exec_prefix"
16265 exec_prefix="$acl_final_exec_prefix"
16266 eval x=\"$x\"
16267 exec_prefix="$acl_save_exec_prefix"
16268 prefix="$acl_save_prefix"
16269
16270 if test "X$x" = "X-I$additional_includedir"; then
16271 haveit=yes
16272 break
16273 fi
16274 done
16275 if test -z "$haveit"; then
16276 if test -d "$additional_includedir"; then
16277 INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir"
16278 fi
16279 fi
16280 fi
16281 fi
16282 fi
16283 if test -n "$found_la"; then
16284 save_libdir="$libdir"
16285 case "$found_la" in
16286 */* | *\\*) . "$found_la" ;;
16287 *) . "./$found_la" ;;
16288 esac
16289 libdir="$save_libdir"
16290 for dep in $dependency_libs; do
16291 case "$dep" in
16292 -L*)
16293 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
16294 if test "X$additional_libdir" != "X/usr/lib"; then
16295 haveit=
16296 if test "X$additional_libdir" = "X/usr/local/lib"; then
16297 if test -n "$GCC"; then
16298 case $host_os in
16299 linux*) haveit=yes;;
16300 esac
16301 fi
16302 fi
16303 if test -z "$haveit"; then
16304 haveit=
16305 for x in $LDFLAGS $LIBBABELTRACE; do
16306
16307 acl_save_prefix="$prefix"
16308 prefix="$acl_final_prefix"
16309 acl_save_exec_prefix="$exec_prefix"
16310 exec_prefix="$acl_final_exec_prefix"
16311 eval x=\"$x\"
16312 exec_prefix="$acl_save_exec_prefix"
16313 prefix="$acl_save_prefix"
16314
16315 if test "X$x" = "X-L$additional_libdir"; then
16316 haveit=yes
16317 break
16318 fi
16319 done
16320 if test -z "$haveit"; then
16321 if test -d "$additional_libdir"; then
16322 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir"
16323 fi
16324 fi
16325 haveit=
16326 for x in $LDFLAGS $LTLIBBABELTRACE; do
16327
16328 acl_save_prefix="$prefix"
16329 prefix="$acl_final_prefix"
16330 acl_save_exec_prefix="$exec_prefix"
16331 exec_prefix="$acl_final_exec_prefix"
16332 eval x=\"$x\"
16333 exec_prefix="$acl_save_exec_prefix"
16334 prefix="$acl_save_prefix"
16335
16336 if test "X$x" = "X-L$additional_libdir"; then
16337 haveit=yes
16338 break
16339 fi
16340 done
16341 if test -z "$haveit"; then
16342 if test -d "$additional_libdir"; then
16343 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir"
16344 fi
16345 fi
16346 fi
16347 fi
16348 ;;
16349 -R*)
16350 dir=`echo "X$dep" | sed -e 's/^X-R//'`
16351 if test "$enable_rpath" != no; then
16352 haveit=
16353 for x in $rpathdirs; do
16354 if test "X$x" = "X$dir"; then
16355 haveit=yes
16356 break
16357 fi
16358 done
16359 if test -z "$haveit"; then
16360 rpathdirs="$rpathdirs $dir"
16361 fi
16362 haveit=
16363 for x in $ltrpathdirs; do
16364 if test "X$x" = "X$dir"; then
16365 haveit=yes
16366 break
16367 fi
16368 done
16369 if test -z "$haveit"; then
16370 ltrpathdirs="$ltrpathdirs $dir"
16371 fi
16372 fi
16373 ;;
16374 -l*)
16375 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
16376 ;;
16377 *.la)
16378 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
16379 ;;
16380 *)
16381 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$dep"
16382 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$dep"
16383 ;;
16384 esac
16385 done
16386 fi
16387 else
16388 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
16389 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name"
16390 fi
16391 fi
16392 fi
16393 done
16394 done
16395 if test "X$rpathdirs" != "X"; then
16396 if test -n "$hardcode_libdir_separator"; then
16397 alldirs=
16398 for found_dir in $rpathdirs; do
16399 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
16400 done
16401 acl_save_libdir="$libdir"
16402 libdir="$alldirs"
16403 eval flag=\"$hardcode_libdir_flag_spec\"
16404 libdir="$acl_save_libdir"
16405 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
16406 else
16407 for found_dir in $rpathdirs; do
16408 acl_save_libdir="$libdir"
16409 libdir="$found_dir"
16410 eval flag=\"$hardcode_libdir_flag_spec\"
16411 libdir="$acl_save_libdir"
16412 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
16413 done
16414 fi
16415 fi
16416 if test "X$ltrpathdirs" != "X"; then
16417 for found_dir in $ltrpathdirs; do
16418 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir"
16419 done
16420 fi
16421
16422
16423 ac_save_CPPFLAGS="$CPPFLAGS"
16424
16425 for element in $INCBABELTRACE; do
16426 haveit=
16427 for x in $CPPFLAGS; do
16428
16429 acl_save_prefix="$prefix"
16430 prefix="$acl_final_prefix"
16431 acl_save_exec_prefix="$exec_prefix"
16432 exec_prefix="$acl_final_exec_prefix"
16433 eval x=\"$x\"
16434 exec_prefix="$acl_save_exec_prefix"
16435 prefix="$acl_save_prefix"
16436
16437 if test "X$x" = "X$element"; then
16438 haveit=yes
16439 break
16440 fi
16441 done
16442 if test -z "$haveit"; then
16443 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
16444 fi
16445 done
16446
16447
16448 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5
16449$as_echo_n "checking for libbabeltrace... " >&6; }
16450if test "${ac_cv_libbabeltrace+set}" = set; then :
16451 $as_echo_n "(cached) " >&6
16452else
16453
16454 ac_save_LIBS="$LIBS"
16455 LIBS="$LIBS $LIBBABELTRACE"
16456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16457/* end confdefs.h. */
16458#include <babeltrace/babeltrace.h>
16459 #include <babeltrace/ctf/events.h>
16460 #include <babeltrace/ctf/iterator.h>
16461int
16462main ()
16463{
16464struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL));
16465 struct bt_ctf_event *event = NULL;
16466 const struct bt_definition *scope;
16467
65c749e7 16468 bt_iter_set_pos (bt_ctf_get_iter (NULL), pos);
393fd4c3
YQ
16469 scope = bt_ctf_get_top_level_scope (event,
16470 BT_STREAM_EVENT_HEADER);
16471 bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id"));
16472
16473 ;
16474 return 0;
16475}
16476_ACEOF
16477if ac_fn_c_try_link "$LINENO"; then :
16478 ac_cv_libbabeltrace=yes
16479else
16480 ac_cv_libbabeltrace=no
16481fi
16482rm -f core conftest.err conftest.$ac_objext \
16483 conftest$ac_exeext conftest.$ac_ext
16484 LIBS="$ac_save_LIBS"
16485
16486fi
16487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5
16488$as_echo "$ac_cv_libbabeltrace" >&6; }
16489 if test "$ac_cv_libbabeltrace" = yes; then
16490 HAVE_LIBBABELTRACE=yes
16491
16492$as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h
16493
16494 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libbabeltrace" >&5
16495$as_echo_n "checking how to link with libbabeltrace... " >&6; }
16496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5
16497$as_echo "$LIBBABELTRACE" >&6; }
16498 else
16499 HAVE_LIBBABELTRACE=no
16500 CPPFLAGS="$ac_save_CPPFLAGS"
16501 LIBBABELTRACE=
16502 LTLIBBABELTRACE=
16503 fi
16504
16505
16506
16507
16508
16509
16510 CFLAGS=$saved_CFLAGS
16511
16512 if test "$HAVE_LIBBABELTRACE" != yes; then
16513 if test "$with_babeltrace" = yes; then
16514 as_fn_error "babeltrace is missing or unusable" "$LINENO" 5
16515 else
16516 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&5
16517$as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&2;}
16518 fi
16519 fi
16520fi
16521
db985757 16522# If nativefile (NAT_FILE) is not set in config/*/*.m[ht] files, we link
2c0fc042 16523# to an empty version.
c906108c
SS
16524
16525files=
16526links=
5a2402b8 16527
c906108c
SS
16528rm -f nm.h
16529if test "${nativefile}" != ""; then
0f475e27
AC
16530 case "${nativefile}" in
16531 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
16532 * ) GDB_NM_FILE="${nativefile}"
16533 esac
5a2402b8
AC
16534 files="${files} ${GDB_NM_FILE}"
16535 links="${links} nm.h"
60ca704f
SE
16536
16537cat >>confdefs.h <<_ACEOF
b78960be 16538#define GDB_NM_FILE "${GDB_NM_FILE}"
bec39cab 16539_ACEOF
5a2402b8 16540
c906108c 16541fi
5a2402b8
AC
16542
16543
bec39cab
AC
16544ac_sources="$files"
16545ac_dests="$links"
16546while test -n "$ac_sources"; do
16547 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
16548 set $ac_sources; ac_source=$1; shift; ac_sources=$*
16549 ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source"
16550done
81ecdfbb 16551ac_config_links="$ac_config_links $ac_config_links_1"
c906108c
SS
16552
16553
c906108c
SS
16554
16555
c906108c 16556
81ecdfbb 16557$as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
bec39cab 16558
bec39cab 16559
b292c783 16560
f6a88844
JM
16561 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
16562 GDB_TRANSFORM_NAME=`echo gdb | sed -e "$gdb_ac_transform"`
16563 if test "x$GDB_TRANSFORM_NAME" = x; then
16564 GDB_TRANSFORM_NAME=gdb
16565 fi
16566
16567
16568
16569 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
16570 GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$gdb_ac_transform"`
16571 if test "x$GCORE_TRANSFORM_NAME" = x; then
16572 GCORE_TRANSFORM_NAME=gcore
16573 fi
16574
b292c783
JK
16575
16576ac_config_files="$ac_config_files gcore"
16577
16578
c971b7fa 16579ac_config_files="$ac_config_files Makefile gdb-gdb.gdb doc/Makefile data-directory/Makefile"
81ecdfbb
RW
16580
16581ac_config_commands="$ac_config_commands default"
89a34d1b 16582
bec39cab
AC
16583cat >confcache <<\_ACEOF
16584# This file is a shell script that caches the results of configure
16585# tests run on this system so they can be shared between configure
16586# scripts and configure runs, see configure's option --config-cache.
16587# It is not useful on other systems. If it contains results you don't
16588# want to keep, you may remove or edit it.
16589#
16590# config.status only pays attention to the cache file if you give it
16591# the --recheck option to rerun configure.
16592#
16593# `ac_cv_env_foo' variables (set or unset) will be overridden when
16594# loading this file, other *unset* `ac_cv_foo' will be assigned the
16595# following values.
16596
16597_ACEOF
16598
16599# The following way of writing the cache mishandles newlines in values,
16600# but we know of no workaround that is simple, portable, and efficient.
81ecdfbb 16601# So, we kill variables containing newlines.
bec39cab
AC
16602# Ultrix sh set writes to stderr and can't be redirected directly,
16603# and sets the high bit in the cache file unless we assign to the vars.
81ecdfbb
RW
16604(
16605 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16606 eval ac_val=\$$ac_var
16607 case $ac_val in #(
16608 *${as_nl}*)
16609 case $ac_var in #(
16610 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16611$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
16612 esac
16613 case $ac_var in #(
16614 _ | IFS | as_nl) ;; #(
16615 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16616 *) { eval $ac_var=; unset $ac_var;} ;;
16617 esac ;;
16618 esac
16619 done
16620
bec39cab 16621 (set) 2>&1 |
81ecdfbb
RW
16622 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16623 *${as_nl}ac_space=\ *)
16624 # `set' does not quote correctly, so add quotes: double-quote
16625 # substitution turns \\\\ into \\, and sed turns \\ into \.
bec39cab
AC
16626 sed -n \
16627 "s/'/'\\\\''/g;
16628 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
81ecdfbb 16629 ;; #(
bec39cab
AC
16630 *)
16631 # `set' quotes correctly as required by POSIX, so do not add quotes.
81ecdfbb 16632 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
bec39cab 16633 ;;
81ecdfbb
RW
16634 esac |
16635 sort
16636) |
bec39cab 16637 sed '
81ecdfbb 16638 /^ac_cv_env_/b end
bec39cab 16639 t clear
81ecdfbb 16640 :clear
bec39cab
AC
16641 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16642 t end
81ecdfbb
RW
16643 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16644 :end' >>confcache
16645if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16646 if test -w "$cache_file"; then
16647 test "x$cache_file" != "x/dev/null" &&
16648 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16649$as_echo "$as_me: updating cache $cache_file" >&6;}
bec39cab
AC
16650 cat confcache >$cache_file
16651 else
81ecdfbb
RW
16652 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16653$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
bec39cab
AC
16654 fi
16655fi
16656rm -f confcache
16657
16658test "x$prefix" = xNONE && prefix=$ac_default_prefix
16659# Let make expand exec_prefix.
16660test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16661
bec39cab
AC
16662DEFS=-DHAVE_CONFIG_H
16663
16664ac_libobjs=
16665ac_ltlibobjs=
16666for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16667 # 1. Remove the extension, and $U if already installed.
81ecdfbb
RW
16668 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
16669 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
16670 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16671 # will be set to the directory where LIBOBJS objects are built.
16672 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16673 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
bec39cab
AC
16674done
16675LIBOBJS=$ac_libobjs
16676
16677LTLIBOBJS=$ac_ltlibobjs
16678
16679
85981d60 16680if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
81ecdfbb
RW
16681 as_fn_error "conditional \"MAINTAINER_MODE\" was never defined.
16682Usually this means the macro was only invoked conditionally." "$LINENO" 5
85981d60 16683fi
a417dc56 16684if test -z "${GMAKE_TRUE}" && test -z "${GMAKE_FALSE}"; then
81ecdfbb
RW
16685 as_fn_error "conditional \"GMAKE\" was never defined.
16686Usually this means the macro was only invoked conditionally." "$LINENO" 5
a417dc56 16687fi
4df42755
DE
16688if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then
16689 as_fn_error "conditional \"HAVE_PYTHON\" was never defined.
16690Usually this means the macro was only invoked conditionally." "$LINENO" 5
16691fi
16692if test -z "${HAVE_GUILE_TRUE}" && test -z "${HAVE_GUILE_FALSE}"; then
16693 as_fn_error "conditional \"HAVE_GUILE\" was never defined.
16694Usually this means the macro was only invoked conditionally." "$LINENO" 5
16695fi
81ecdfbb
RW
16696
16697
bec39cab 16698: ${CONFIG_STATUS=./config.status}
81ecdfbb 16699ac_write_fail=0
bec39cab
AC
16700ac_clean_files_save=$ac_clean_files
16701ac_clean_files="$ac_clean_files $CONFIG_STATUS"
81ecdfbb
RW
16702{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16703$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16704as_write_fail=0
16705cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
bec39cab
AC
16706#! $SHELL
16707# Generated by $as_me.
16708# Run this file to recreate the current configuration.
16709# Compiler output produced by configure, useful for debugging
16710# configure, is in config.log if it exists.
16711
16712debug=false
16713ac_cs_recheck=false
16714ac_cs_silent=false
bec39cab 16715
81ecdfbb
RW
16716SHELL=\${CONFIG_SHELL-$SHELL}
16717export SHELL
16718_ASEOF
16719cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16720## -------------------- ##
16721## M4sh Initialization. ##
16722## -------------------- ##
16723
16724# Be more Bourne compatible
16725DUALCASE=1; export DUALCASE # for MKS sh
16726if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
16727 emulate sh
16728 NULLCMD=:
81ecdfbb 16729 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
16730 # is contrary to our usage. Disable this feature.
16731 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
16732 setopt NO_GLOB_SUBST
16733else
16734 case `(set -o) 2>/dev/null` in #(
16735 *posix*) :
16736 set -o posix ;; #(
16737 *) :
16738 ;;
16739esac
bec39cab 16740fi
bec39cab 16741
81ecdfbb
RW
16742
16743as_nl='
16744'
16745export as_nl
16746# Printing a long string crashes Solaris 7 /usr/bin/printf.
16747as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16748as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16749as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16750# Prefer a ksh shell builtin over an external printf program on Solaris,
16751# but without wasting forks for bash or zsh.
16752if test -z "$BASH_VERSION$ZSH_VERSION" \
16753 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16754 as_echo='print -r --'
16755 as_echo_n='print -rn --'
16756elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16757 as_echo='printf %s\n'
16758 as_echo_n='printf %s'
16759else
16760 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16761 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16762 as_echo_n='/usr/ucb/echo -n'
16763 else
16764 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16765 as_echo_n_body='eval
16766 arg=$1;
16767 case $arg in #(
16768 *"$as_nl"*)
16769 expr "X$arg" : "X\\(.*\\)$as_nl";
16770 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16771 esac;
16772 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16773 '
16774 export as_echo_n_body
16775 as_echo_n='sh -c $as_echo_n_body as_echo'
16776 fi
16777 export as_echo_body
16778 as_echo='sh -c $as_echo_body as_echo'
16779fi
16780
16781# The user is always right.
16782if test "${PATH_SEPARATOR+set}" != set; then
16783 PATH_SEPARATOR=:
16784 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16785 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16786 PATH_SEPARATOR=';'
16787 }
bec39cab
AC
16788fi
16789
16790
81ecdfbb
RW
16791# IFS
16792# We need space, tab and new line, in precisely that order. Quoting is
16793# there to prevent editors from complaining about space-tab.
16794# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16795# splitting by setting IFS to empty value.)
16796IFS=" "" $as_nl"
16797
16798# Find who we are. Look in the path if we contain no directory separator.
16799case $0 in #((
16800 *[\\/]* ) as_myself=$0 ;;
16801 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16802for as_dir in $PATH
16803do
16804 IFS=$as_save_IFS
16805 test -z "$as_dir" && as_dir=.
16806 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16807 done
16808IFS=$as_save_IFS
16809
16810 ;;
16811esac
16812# We did not find ourselves, most probably we were run as `sh COMMAND'
16813# in which case we are not to be found in the path.
16814if test "x$as_myself" = x; then
16815 as_myself=$0
16816fi
16817if test ! -f "$as_myself"; then
16818 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16819 exit 1
16820fi
16821
16822# Unset variables that we do not need and which cause bugs (e.g. in
16823# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16824# suppresses any "Segmentation fault" message there. '((' could
16825# trigger a bug in pdksh 5.2.14.
16826for as_var in BASH_ENV ENV MAIL MAILPATH
16827do eval test x\${$as_var+set} = xset \
16828 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
16829done
bec39cab
AC
16830PS1='$ '
16831PS2='> '
16832PS4='+ '
16833
16834# NLS nuisances.
81ecdfbb
RW
16835LC_ALL=C
16836export LC_ALL
16837LANGUAGE=C
16838export LANGUAGE
16839
16840# CDPATH.
16841(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16842
16843
16844# as_fn_error ERROR [LINENO LOG_FD]
16845# ---------------------------------
16846# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16847# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
16848# script with status $?, using 1 if that was 0.
16849as_fn_error ()
16850{
16851 as_status=$?; test $as_status -eq 0 && as_status=1
16852 if test "$3"; then
16853 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16854 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
16855 fi
16856 $as_echo "$as_me: error: $1" >&2
16857 as_fn_exit $as_status
16858} # as_fn_error
16859
16860
16861# as_fn_set_status STATUS
16862# -----------------------
16863# Set $? to STATUS, without forking.
16864as_fn_set_status ()
16865{
16866 return $1
16867} # as_fn_set_status
16868
16869# as_fn_exit STATUS
16870# -----------------
16871# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16872as_fn_exit ()
16873{
16874 set +e
16875 as_fn_set_status $1
16876 exit $1
16877} # as_fn_exit
16878
16879# as_fn_unset VAR
16880# ---------------
16881# Portably unset VAR.
16882as_fn_unset ()
16883{
16884 { eval $1=; unset $1;}
16885}
16886as_unset=as_fn_unset
16887# as_fn_append VAR VALUE
16888# ----------------------
16889# Append the text in VALUE to the end of the definition contained in VAR. Take
16890# advantage of any shell optimizations that allow amortized linear growth over
16891# repeated appends, instead of the typical quadratic growth present in naive
16892# implementations.
16893if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16894 eval 'as_fn_append ()
16895 {
16896 eval $1+=\$2
16897 }'
16898else
16899 as_fn_append ()
16900 {
16901 eval $1=\$$1\$2
16902 }
16903fi # as_fn_append
16904
16905# as_fn_arith ARG...
16906# ------------------
16907# Perform arithmetic evaluation on the ARGs, and store the result in the
16908# global $as_val. Take advantage of shells that can avoid forks. The arguments
16909# must be portable across $(()) and expr.
16910if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16911 eval 'as_fn_arith ()
16912 {
16913 as_val=$(( $* ))
16914 }'
16915else
16916 as_fn_arith ()
16917 {
16918 as_val=`expr "$@" || test $? -eq 1`
16919 }
16920fi # as_fn_arith
bec39cab 16921
81ecdfbb
RW
16922
16923if expr a : '\(a\)' >/dev/null 2>&1 &&
16924 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
16925 as_expr=expr
16926else
16927 as_expr=false
16928fi
16929
81ecdfbb 16930if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
16931 as_basename=basename
16932else
16933 as_basename=false
16934fi
16935
81ecdfbb
RW
16936if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16937 as_dirname=dirname
16938else
16939 as_dirname=false
16940fi
bec39cab 16941
81ecdfbb 16942as_me=`$as_basename -- "$0" ||
bec39cab
AC
16943$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16944 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
16945 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
16946$as_echo X/"$0" |
16947 sed '/^.*\/\([^/][^/]*\)\/*$/{
16948 s//\1/
16949 q
16950 }
16951 /^X\/\(\/\/\)$/{
16952 s//\1/
16953 q
16954 }
16955 /^X\/\(\/\).*/{
16956 s//\1/
16957 q
16958 }
16959 s/.*/./; q'`
b4e70030 16960
b4e70030
JB
16961# Avoid depending upon Character Ranges.
16962as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16963as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16964as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16965as_cr_digits='0123456789'
16966as_cr_alnum=$as_cr_Letters$as_cr_digits
16967
81ecdfbb
RW
16968ECHO_C= ECHO_N= ECHO_T=
16969case `echo -n x` in #(((((
16970-n*)
16971 case `echo 'xy\c'` in
16972 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
16973 xy) ECHO_C='\c';;
16974 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16975 ECHO_T=' ';;
16976 esac;;
16977*)
16978 ECHO_N='-n';;
bec39cab
AC
16979esac
16980
81ecdfbb
RW
16981rm -f conf$$ conf$$.exe conf$$.file
16982if test -d conf$$.dir; then
16983 rm -f conf$$.dir/conf$$.file
bec39cab 16984else
81ecdfbb
RW
16985 rm -f conf$$.dir
16986 mkdir conf$$.dir 2>/dev/null
bec39cab 16987fi
81ecdfbb
RW
16988if (echo >conf$$.file) 2>/dev/null; then
16989 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 16990 as_ln_s='ln -s'
81ecdfbb
RW
16991 # ... but there are two gotchas:
16992 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16993 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
16994 # In both cases, we have to default to `cp -p'.
16995 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
16996 as_ln_s='cp -p'
16997 elif ln conf$$.file conf$$ 2>/dev/null; then
16998 as_ln_s=ln
16999 else
17000 as_ln_s='cp -p'
b4e70030 17001 fi
bec39cab
AC
17002else
17003 as_ln_s='cp -p'
17004fi
81ecdfbb
RW
17005rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17006rmdir conf$$.dir 2>/dev/null
17007
17008
17009# as_fn_mkdir_p
17010# -------------
17011# Create "$as_dir" as a directory, including parents if necessary.
17012as_fn_mkdir_p ()
17013{
17014
17015 case $as_dir in #(
17016 -*) as_dir=./$as_dir;;
17017 esac
17018 test -d "$as_dir" || eval $as_mkdir_p || {
17019 as_dirs=
17020 while :; do
17021 case $as_dir in #(
17022 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17023 *) as_qdir=$as_dir;;
17024 esac
17025 as_dirs="'$as_qdir' $as_dirs"
17026 as_dir=`$as_dirname -- "$as_dir" ||
17027$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17028 X"$as_dir" : 'X\(//\)[^/]' \| \
17029 X"$as_dir" : 'X\(//\)$' \| \
17030 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17031$as_echo X"$as_dir" |
17032 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17033 s//\1/
17034 q
17035 }
17036 /^X\(\/\/\)[^/].*/{
17037 s//\1/
17038 q
17039 }
17040 /^X\(\/\/\)$/{
17041 s//\1/
17042 q
17043 }
17044 /^X\(\/\).*/{
17045 s//\1/
17046 q
17047 }
17048 s/.*/./; q'`
17049 test -d "$as_dir" && break
17050 done
17051 test -z "$as_dirs" || eval "mkdir $as_dirs"
17052 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
17053
bec39cab 17054
81ecdfbb 17055} # as_fn_mkdir_p
bec39cab 17056if mkdir -p . 2>/dev/null; then
81ecdfbb 17057 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
17058else
17059 test -d ./-p && rmdir ./-p
17060 as_mkdir_p=false
17061fi
17062
81ecdfbb
RW
17063if test -x / >/dev/null 2>&1; then
17064 as_test_x='test -x'
17065else
17066 if ls -dL / >/dev/null 2>&1; then
17067 as_ls_L_option=L
17068 else
17069 as_ls_L_option=
17070 fi
17071 as_test_x='
17072 eval sh -c '\''
17073 if test -d "$1"; then
17074 test -d "$1/.";
17075 else
17076 case $1 in #(
17077 -*)set "./$1";;
17078 esac;
17079 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
17080 ???[sx]*):;;*)false;;esac;fi
17081 '\'' sh
17082 '
17083fi
17084as_executable_p=$as_test_x
bec39cab
AC
17085
17086# Sed expression to map a string onto a valid CPP name.
17087as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
17088
17089# Sed expression to map a string onto a valid variable name.
17090as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
17091
17092
bec39cab 17093exec 6>&1
81ecdfbb
RW
17094## ----------------------------------- ##
17095## Main body of $CONFIG_STATUS script. ##
17096## ----------------------------------- ##
17097_ASEOF
17098test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
17099
17100cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17101# Save the log message, to keep $0 and so on meaningful, and to
bec39cab 17102# report actual input values of CONFIG_FILES etc. instead of their
81ecdfbb
RW
17103# values after options handling.
17104ac_log="
bec39cab 17105This file was extended by $as_me, which was
81ecdfbb 17106generated by GNU Autoconf 2.64. Invocation command line was
bec39cab
AC
17107
17108 CONFIG_FILES = $CONFIG_FILES
17109 CONFIG_HEADERS = $CONFIG_HEADERS
17110 CONFIG_LINKS = $CONFIG_LINKS
17111 CONFIG_COMMANDS = $CONFIG_COMMANDS
17112 $ $0 $@
17113
81ecdfbb
RW
17114on `(hostname || uname -n) 2>/dev/null | sed 1q`
17115"
17116
bec39cab
AC
17117_ACEOF
17118
81ecdfbb
RW
17119case $ac_config_files in *"
17120"*) set x $ac_config_files; shift; ac_config_files=$*;;
17121esac
234b45d4 17122
81ecdfbb
RW
17123case $ac_config_headers in *"
17124"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17125esac
b4e70030 17126
b4e70030 17127
81ecdfbb
RW
17128cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17129# Files that config.status was made for.
17130config_files="$ac_config_files"
17131config_headers="$ac_config_headers"
17132config_links="$ac_config_links"
17133config_commands="$ac_config_commands"
234b45d4 17134
81ecdfbb 17135_ACEOF
b4e70030 17136
81ecdfbb 17137cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab 17138ac_cs_usage="\
81ecdfbb
RW
17139\`$as_me' instantiates files and other configuration actions
17140from templates according to the current configuration. Unless the files
17141and actions are specified as TAGs, all are instantiated by default.
234b45d4 17142
81ecdfbb 17143Usage: $0 [OPTION]... [TAG]...
234b45d4 17144
bec39cab 17145 -h, --help print this help, then exit
81ecdfbb
RW
17146 -V, --version print version number and configuration settings, then exit
17147 -q, --quiet, --silent
17148 do not print progress messages
bec39cab
AC
17149 -d, --debug don't remove temporary files
17150 --recheck update $as_me by reconfiguring in the same conditions
81ecdfbb
RW
17151 --file=FILE[:TEMPLATE]
17152 instantiate the configuration file FILE
17153 --header=FILE[:TEMPLATE]
17154 instantiate the configuration header FILE
234b45d4 17155
bec39cab
AC
17156Configuration files:
17157$config_files
234b45d4 17158
bec39cab
AC
17159Configuration headers:
17160$config_headers
234b45d4 17161
bec39cab
AC
17162Configuration links:
17163$config_links
234b45d4 17164
bec39cab
AC
17165Configuration commands:
17166$config_commands
17167
81ecdfbb 17168Report bugs to the package provider."
b4e70030 17169
81ecdfbb
RW
17170_ACEOF
17171cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab
AC
17172ac_cs_version="\\
17173config.status
81ecdfbb
RW
17174configured by $0, generated by GNU Autoconf 2.64,
17175 with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
bec39cab 17176
81ecdfbb 17177Copyright (C) 2009 Free Software Foundation, Inc.
bec39cab
AC
17178This config.status script is free software; the Free Software Foundation
17179gives unlimited permission to copy, distribute and modify it."
81ecdfbb
RW
17180
17181ac_pwd='$ac_pwd'
17182srcdir='$srcdir'
17183INSTALL='$INSTALL'
81ecdfbb
RW
17184AWK='$AWK'
17185test -n "\$AWK" || AWK=awk
bec39cab
AC
17186_ACEOF
17187
81ecdfbb
RW
17188cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17189# The default lists apply if the user does not specify any file.
bec39cab
AC
17190ac_need_defaults=:
17191while test $# != 0
17192do
17193 case $1 in
17194 --*=*)
81ecdfbb
RW
17195 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17196 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
bec39cab 17197 ac_shift=:
c906108c 17198 ;;
81ecdfbb 17199 *)
bec39cab
AC
17200 ac_option=$1
17201 ac_optarg=$2
17202 ac_shift=shift
c906108c 17203 ;;
bec39cab 17204 esac
c906108c 17205
bec39cab
AC
17206 case $ac_option in
17207 # Handling of the options.
bec39cab
AC
17208 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17209 ac_cs_recheck=: ;;
81ecdfbb
RW
17210 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
17211 $as_echo "$ac_cs_version"; exit ;;
17212 --debug | --debu | --deb | --de | --d | -d )
bec39cab
AC
17213 debug=: ;;
17214 --file | --fil | --fi | --f )
17215 $ac_shift
81ecdfbb
RW
17216 case $ac_optarg in
17217 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17218 esac
17219 as_fn_append CONFIG_FILES " '$ac_optarg'"
bec39cab
AC
17220 ac_need_defaults=false;;
17221 --header | --heade | --head | --hea )
17222 $ac_shift
81ecdfbb
RW
17223 case $ac_optarg in
17224 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17225 esac
17226 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
bec39cab 17227 ac_need_defaults=false;;
81ecdfbb
RW
17228 --he | --h)
17229 # Conflict between --help and --header
17230 as_fn_error "ambiguous option: \`$1'
17231Try \`$0 --help' for more information.";;
17232 --help | --hel | -h )
17233 $as_echo "$ac_cs_usage"; exit ;;
bec39cab
AC
17234 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17235 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17236 ac_cs_silent=: ;;
c906108c 17237
bec39cab 17238 # This is an error.
81ecdfbb
RW
17239 -*) as_fn_error "unrecognized option: \`$1'
17240Try \`$0 --help' for more information." ;;
c906108c 17241
81ecdfbb
RW
17242 *) as_fn_append ac_config_targets " $1"
17243 ac_need_defaults=false ;;
c906108c 17244
bec39cab
AC
17245 esac
17246 shift
17247done
c906108c 17248
bec39cab 17249ac_configure_extra_args=
c906108c 17250
bec39cab
AC
17251if $ac_cs_silent; then
17252 exec 6>/dev/null
17253 ac_configure_extra_args="$ac_configure_extra_args --silent"
17254fi
c906108c 17255
bec39cab 17256_ACEOF
81ecdfbb 17257cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab 17258if \$ac_cs_recheck; then
81ecdfbb
RW
17259 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
17260 shift
17261 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17262 CONFIG_SHELL='$SHELL'
17263 export CONFIG_SHELL
17264 exec "\$@"
bec39cab
AC
17265fi
17266
17267_ACEOF
81ecdfbb
RW
17268cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17269exec 5>>config.log
17270{
17271 echo
17272 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17273## Running $as_me. ##
17274_ASBOX
17275 $as_echo "$ac_log"
17276} >&5
bec39cab 17277
81ecdfbb
RW
17278_ACEOF
17279cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
c906108c 17280#
81ecdfbb 17281# INIT-COMMANDS
c906108c 17282#
a417dc56 17283ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
b4e70030 17284
bec39cab
AC
17285_ACEOF
17286
81ecdfbb 17287cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
4e8d927d 17288
81ecdfbb 17289# Handling of arguments.
bec39cab 17290for ac_config_target in $ac_config_targets
c906108c 17291do
81ecdfbb
RW
17292 case $ac_config_target in
17293 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
17294 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
f997c383 17295 "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
81ecdfbb 17296 "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;;
b292c783 17297 "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;;
81ecdfbb 17298 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
e2207b9a 17299 "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;;
5ae98d25 17300 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
aa2e2d8d 17301 "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
81ecdfbb
RW
17302 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
17303
17304 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
c906108c
SS
17305 esac
17306done
17307
81ecdfbb 17308
bec39cab
AC
17309# If the user did not use the arguments to specify the items to instantiate,
17310# then the envvar interface is used. Set only those that are not.
17311# We use the long form for the default assignment because of an extremely
17312# bizarre bug on SunOS 4.1.3.
17313if $ac_need_defaults; then
17314 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17315 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17316 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
17317 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
17318fi
17319
b4e70030 17320# Have a temporary directory for convenience. Make it in the build tree
81ecdfbb 17321# simply because there is no reason against having it here, and in addition,
b4e70030 17322# creating and moving files from /tmp can sometimes cause problems.
81ecdfbb
RW
17323# Hook for its removal unless debugging.
17324# Note that there is a small window in which the directory will not be cleaned:
17325# after its creation but before its name has been assigned to `$tmp'.
b4e70030
JB
17326$debug ||
17327{
81ecdfbb
RW
17328 tmp=
17329 trap 'exit_status=$?
17330 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
17331' 0
17332 trap 'as_fn_exit 1' 1 2 13 15
17333}
17334# Create a (secure) tmp directory for tmp files.
17335
17336{
17337 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
17338 test -n "$tmp" && test -d "$tmp"
17339} ||
17340{
17341 tmp=./conf$$-$RANDOM
17342 (umask 077 && mkdir "$tmp")
17343} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
17344
17345# Set up the scripts for CONFIG_FILES section.
17346# No need to generate them if there are no CONFIG_FILES.
17347# This happens for instance with `./config.status config.h'.
17348if test -n "$CONFIG_FILES"; then
17349
17350if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
17351 ac_cs_awk_getline=:
17352 ac_cs_awk_pipe_init=
17353 ac_cs_awk_read_file='
17354 while ((getline aline < (F[key])) > 0)
17355 print(aline)
17356 close(F[key])'
17357 ac_cs_awk_pipe_fini=
17358else
17359 ac_cs_awk_getline=false
17360 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
17361 ac_cs_awk_read_file='
17362 print "|#_!!_#|"
17363 print "cat " F[key] " &&"
17364 '$ac_cs_awk_pipe_init
17365 # The final `:' finishes the AND list.
17366 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
17367fi
17368ac_cr=`echo X | tr X '\015'`
17369# On cygwin, bash can eat \r inside `` if the user requested igncr.
17370# But we know of no other shell where ac_cr would be empty at this
17371# point, so we can use a bashism as a fallback.
17372if test "x$ac_cr" = x; then
17373 eval ac_cr=\$\'\\r\'
17374fi
17375ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17376if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
17377 ac_cs_awk_cr='\r'
17378else
17379 ac_cs_awk_cr=$ac_cr
17380fi
17381
17382echo 'BEGIN {' >"$tmp/subs1.awk" &&
17383_ACEOF
17384
17385# Create commands to substitute file output variables.
17386{
17387 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
17388 echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' &&
17389 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
17390 echo "_ACAWK" &&
17391 echo "_ACEOF"
17392} >conf$$files.sh &&
17393. ./conf$$files.sh ||
17394 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
17395rm -f conf$$files.sh
17396
17397{
17398 echo "cat >conf$$subs.awk <<_ACEOF" &&
17399 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17400 echo "_ACEOF"
17401} >conf$$subs.sh ||
17402 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
17403ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
17404ac_delim='%!_!# '
17405for ac_last_try in false false false false false :; do
17406 . ./conf$$subs.sh ||
17407 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
17408
17409 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17410 if test $ac_delim_n = $ac_delim_num; then
17411 break
17412 elif $ac_last_try; then
17413 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
17414 else
17415 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17416 fi
17417done
17418rm -f conf$$subs.sh
17419
17420cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17421cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
17422_ACEOF
17423sed -n '
17424h
17425s/^/S["/; s/!.*/"]=/
17426p
17427g
17428s/^[^!]*!//
17429:repl
17430t repl
17431s/'"$ac_delim"'$//
17432t delim
17433:nl
17434h
17435s/\(.\{148\}\).*/\1/
17436t more1
17437s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17438p
17439n
17440b repl
17441:more1
17442s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17443p
17444g
17445s/.\{148\}//
17446t nl
17447:delim
17448h
17449s/\(.\{148\}\).*/\1/
17450t more2
17451s/["\\]/\\&/g; s/^/"/; s/$/"/
17452p
17453b
17454:more2
17455s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17456p
17457g
17458s/.\{148\}//
17459t delim
17460' <conf$$subs.awk | sed '
17461/^[^""]/{
17462 N
17463 s/\n//
17464}
17465' >>$CONFIG_STATUS || ac_write_fail=1
17466rm -f conf$$subs.awk
17467cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17468_ACAWK
17469cat >>"\$tmp/subs1.awk" <<_ACAWK &&
17470 for (key in S) S_is_set[key] = 1
17471 FS = "\a"
17472 \$ac_cs_awk_pipe_init
17473}
17474{
17475 line = $ 0
17476 nfields = split(line, field, "@")
17477 substed = 0
17478 len = length(field[1])
17479 for (i = 2; i < nfields; i++) {
17480 key = field[i]
17481 keylen = length(key)
17482 if (S_is_set[key]) {
17483 value = S[key]
17484 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17485 len += length(value) + length(field[++i])
17486 substed = 1
17487 } else
17488 len += 1 + keylen
17489 }
17490 if (nfields == 3 && !substed) {
17491 key = field[2]
17492 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
17493 \$ac_cs_awk_read_file
17494 next
17495 }
17496 }
17497 print line
b4e70030 17498}
81ecdfbb
RW
17499\$ac_cs_awk_pipe_fini
17500_ACAWK
17501_ACEOF
17502cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17503if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17504 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17505else
17506 cat
17507fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
17508 || as_fn_error "could not setup config files machinery" "$LINENO" 5
17509_ACEOF
17510
17511# VPATH may cause trouble with some makes, so we remove $(srcdir),
17512# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
17513# trailing colons and then remove the whole line if VPATH becomes empty
17514# (actually we leave an empty line to preserve line numbers).
17515if test "x$srcdir" = x.; then
17516 ac_vpsub='/^[ ]*VPATH[ ]*=/{
17517s/:*\$(srcdir):*/:/
17518s/:*\${srcdir}:*/:/
17519s/:*@srcdir@:*/:/
17520s/^\([^=]*=[ ]*\):*/\1/
17521s/:*$//
17522s/^[^=]*=[ ]*$//
17523}'
17524fi
17525
17526cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17527fi # test -n "$CONFIG_FILES"
17528
17529# Set up the scripts for CONFIG_HEADERS section.
17530# No need to generate them if there are no CONFIG_HEADERS.
17531# This happens for instance with `./config.status Makefile'.
17532if test -n "$CONFIG_HEADERS"; then
17533cat >"$tmp/defines.awk" <<\_ACAWK ||
17534BEGIN {
17535_ACEOF
17536
17537# Transform confdefs.h into an awk script `defines.awk', embedded as
17538# here-document in config.status, that substitutes the proper values into
17539# config.h.in to produce config.h.
4e8d927d 17540
81ecdfbb
RW
17541# Create a delimiter string that does not exist in confdefs.h, to ease
17542# handling of long lines.
17543ac_delim='%!_!# '
17544for ac_last_try in false false :; do
17545 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
17546 if test -z "$ac_t"; then
17547 break
17548 elif $ac_last_try; then
17549 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
17550 else
17551 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17552 fi
17553done
4e8d927d 17554
81ecdfbb
RW
17555# For the awk script, D is an array of macro values keyed by name,
17556# likewise P contains macro parameters if any. Preserve backslash
17557# newline sequences.
17558
17559ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17560sed -n '
17561s/.\{148\}/&'"$ac_delim"'/g
17562t rset
17563:rset
17564s/^[ ]*#[ ]*define[ ][ ]*/ /
17565t def
17566d
17567:def
17568s/\\$//
17569t bsnl
17570s/["\\]/\\&/g
17571s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17572D["\1"]=" \3"/p
17573s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17574d
17575:bsnl
17576s/["\\]/\\&/g
17577s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17578D["\1"]=" \3\\\\\\n"\\/p
17579t cont
17580s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17581t cont
17582d
17583:cont
17584n
17585s/.\{148\}/&'"$ac_delim"'/g
17586t clear
17587:clear
17588s/\\$//
17589t bsnlc
17590s/["\\]/\\&/g; s/^/"/; s/$/"/p
17591d
17592:bsnlc
17593s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17594b cont
17595' <confdefs.h | sed '
17596s/'"$ac_delim"'/"\\\
17597"/g' >>$CONFIG_STATUS || ac_write_fail=1
17598
17599cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17600 for (key in D) D_is_set[key] = 1
17601 FS = "\a"
17602}
17603/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17604 line = \$ 0
17605 split(line, arg, " ")
17606 if (arg[1] == "#") {
17607 defundef = arg[2]
17608 mac1 = arg[3]
17609 } else {
17610 defundef = substr(arg[1], 2)
17611 mac1 = arg[2]
17612 }
17613 split(mac1, mac2, "(") #)
17614 macro = mac2[1]
17615 prefix = substr(line, 1, index(line, defundef) - 1)
17616 if (D_is_set[macro]) {
17617 # Preserve the white space surrounding the "#".
17618 print prefix "define", macro P[macro] D[macro]
17619 next
17620 } else {
17621 # Replace #undef with comments. This is necessary, for example,
17622 # in the case of _POSIX_SOURCE, which is predefined and required
17623 # on some systems where configure will not decide to define it.
17624 if (defundef == "undef") {
17625 print "/*", prefix defundef, macro, "*/"
17626 next
17627 }
17628 }
b4e70030 17629}
81ecdfbb
RW
17630{ print }
17631_ACAWK
b4e70030 17632_ACEOF
81ecdfbb
RW
17633cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17634 as_fn_error "could not setup config headers machinery" "$LINENO" 5
17635fi # test -n "$CONFIG_HEADERS"
4e8d927d 17636
4e8d927d 17637
81ecdfbb
RW
17638eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
17639shift
17640for ac_tag
17641do
17642 case $ac_tag in
17643 :[FHLC]) ac_mode=$ac_tag; continue;;
17644 esac
17645 case $ac_mode$ac_tag in
17646 :[FHL]*:*);;
17647 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
17648 :[FH]-) ac_tag=-:-;;
17649 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17650 esac
17651 ac_save_IFS=$IFS
17652 IFS=:
17653 set x $ac_tag
17654 IFS=$ac_save_IFS
17655 shift
17656 ac_file=$1
17657 shift
4e8d927d 17658
81ecdfbb
RW
17659 case $ac_mode in
17660 :L) ac_source=$1;;
17661 :[FH])
17662 ac_file_inputs=
17663 for ac_f
17664 do
17665 case $ac_f in
17666 -) ac_f="$tmp/stdin";;
17667 *) # Look for the file first in the build tree, then in the source tree
17668 # (if the path is not absolute). The absolute path cannot be DOS-style,
17669 # because $ac_f cannot contain `:'.
17670 test -f "$ac_f" ||
17671 case $ac_f in
17672 [\\/$]*) false;;
17673 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17674 esac ||
17675 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
17676 esac
17677 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17678 as_fn_append ac_file_inputs " '$ac_f'"
17679 done
17680
17681 # Let's still pretend it is `configure' which instantiates (i.e., don't
17682 # use $as_me), people would be surprised to read:
17683 # /* config.h. Generated by config.status. */
17684 configure_input='Generated from '`
17685 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17686 `' by configure.'
17687 if test x"$ac_file" != x-; then
17688 configure_input="$ac_file. $configure_input"
17689 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17690$as_echo "$as_me: creating $ac_file" >&6;}
b4e70030 17691 fi
81ecdfbb
RW
17692 # Neutralize special characters interpreted by sed in replacement strings.
17693 case $configure_input in #(
17694 *\&* | *\|* | *\\* )
17695 ac_sed_conf_input=`$as_echo "$configure_input" |
17696 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17697 *) ac_sed_conf_input=$configure_input;;
17698 esac
4e8d927d 17699
81ecdfbb
RW
17700 case $ac_tag in
17701 *:-:* | *:-) cat >"$tmp/stdin" \
17702 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
17703 esac
17704 ;;
c906108c
SS
17705 esac
17706
81ecdfbb 17707 ac_dir=`$as_dirname -- "$ac_file" ||
bec39cab
AC
17708$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17709 X"$ac_file" : 'X\(//\)[^/]' \| \
17710 X"$ac_file" : 'X\(//\)$' \| \
81ecdfbb
RW
17711 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
17712$as_echo X"$ac_file" |
17713 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17714 s//\1/
17715 q
17716 }
17717 /^X\(\/\/\)[^/].*/{
17718 s//\1/
17719 q
17720 }
17721 /^X\(\/\/\)$/{
17722 s//\1/
17723 q
17724 }
17725 /^X\(\/\).*/{
17726 s//\1/
17727 q
17728 }
17729 s/.*/./; q'`
17730 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
17731 ac_builddir=.
17732
81ecdfbb
RW
17733case "$ac_dir" in
17734.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17735*)
17736 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
17737 # A ".." for each directory in $ac_dir_suffix.
17738 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
17739 case $ac_top_builddir_sub in
17740 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17741 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17742 esac ;;
17743esac
17744ac_abs_top_builddir=$ac_pwd
17745ac_abs_builddir=$ac_pwd$ac_dir_suffix
17746# for backward compatibility:
17747ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
17748
17749case $srcdir in
81ecdfbb 17750 .) # We are building in place.
bec39cab 17751 ac_srcdir=.
81ecdfbb
RW
17752 ac_top_srcdir=$ac_top_builddir_sub
17753 ac_abs_top_srcdir=$ac_pwd ;;
17754 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 17755 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
17756 ac_top_srcdir=$srcdir
17757 ac_abs_top_srcdir=$srcdir ;;
17758 *) # Relative name.
17759 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17760 ac_top_srcdir=$ac_top_build_prefix$srcdir
17761 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 17762esac
81ecdfbb 17763ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 17764
c906108c 17765
81ecdfbb
RW
17766 case $ac_mode in
17767 :F)
17768 #
17769 # CONFIG_FILE
17770 #
c906108c 17771
bec39cab
AC
17772 case $INSTALL in
17773 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
81ecdfbb 17774 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
c906108c 17775 esac
81ecdfbb 17776_ACEOF
121ce6e5 17777
81ecdfbb
RW
17778cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17779# If the template does not know about datarootdir, expand it.
17780# FIXME: This hack should be removed a few years after 2.60.
17781ac_datarootdir_hack=; ac_datarootdir_seen=
17782ac_sed_dataroot='
17783/datarootdir/ {
17784 p
17785 q
17786}
17787/@datadir@/p
17788/@docdir@/p
17789/@infodir@/p
17790/@localedir@/p
17791/@mandir@/p'
17792case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
17793*datarootdir*) ac_datarootdir_seen=yes;;
17794*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
17795 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17796$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
17797_ACEOF
17798cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17799 ac_datarootdir_hack='
17800 s&@datadir@&$datadir&g
17801 s&@docdir@&$docdir&g
17802 s&@infodir@&$infodir&g
17803 s&@localedir@&$localedir&g
17804 s&@mandir@&$mandir&g
17805 s&\\\${datarootdir}&$datarootdir&g' ;;
17806esac
4e8d927d 17807_ACEOF
81ecdfbb
RW
17808
17809# Neutralize VPATH when `$srcdir' = `.'.
17810# Shell code in configure.ac might set extrasub.
17811# FIXME: do we really want to maintain this feature?
17812cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17813ac_sed_extra="$ac_vpsub
bec39cab
AC
17814$extrasub
17815_ACEOF
81ecdfbb 17816cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab
AC
17817:t
17818/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
81ecdfbb
RW
17819s|@configure_input@|$ac_sed_conf_input|;t t
17820s&@top_builddir@&$ac_top_builddir_sub&;t t
17821s&@top_build_prefix@&$ac_top_build_prefix&;t t
17822s&@srcdir@&$ac_srcdir&;t t
17823s&@abs_srcdir@&$ac_abs_srcdir&;t t
17824s&@top_srcdir@&$ac_top_srcdir&;t t
17825s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17826s&@builddir@&$ac_builddir&;t t
17827s&@abs_builddir@&$ac_abs_builddir&;t t
17828s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17829s&@INSTALL@&$ac_INSTALL&;t t
81ecdfbb
RW
17830$ac_datarootdir_hack
17831"
17832eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
17833if $ac_cs_awk_getline; then
17834 $AWK -f "$tmp/subs.awk"
17835else
17836 $AWK -f "$tmp/subs.awk" | $SHELL
17837fi >$tmp/out \
17838 || as_fn_error "could not create $ac_file" "$LINENO" 5
17839
17840test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
17841 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
17842 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
17843 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
17844which seems to be undefined. Please make sure it is defined." >&5
17845$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
17846which seems to be undefined. Please make sure it is defined." >&2;}
17847
17848 rm -f "$tmp/stdin"
bec39cab 17849 case $ac_file in
81ecdfbb
RW
17850 -) cat "$tmp/out" && rm -f "$tmp/out";;
17851 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
17852 esac \
17853 || as_fn_error "could not create $ac_file" "$LINENO" 5
17854 ;;
17855 :H)
17856 #
17857 # CONFIG_HEADER
17858 #
bec39cab 17859 if test x"$ac_file" != x-; then
81ecdfbb
RW
17860 {
17861 $as_echo "/* $configure_input */" \
17862 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
17863 } >"$tmp/config.h" \
17864 || as_fn_error "could not create $ac_file" "$LINENO" 5
17865 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
17866 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17867$as_echo "$as_me: $ac_file is unchanged" >&6;}
bec39cab 17868 else
81ecdfbb
RW
17869 rm -f "$ac_file"
17870 mv "$tmp/config.h" "$ac_file" \
17871 || as_fn_error "could not create $ac_file" "$LINENO" 5
bec39cab
AC
17872 fi
17873 else
81ecdfbb
RW
17874 $as_echo "/* $configure_input */" \
17875 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
17876 || as_fn_error "could not create -" "$LINENO" 5
bec39cab 17877 fi
81ecdfbb
RW
17878 ;;
17879 :L)
17880 #
17881 # CONFIG_LINK
17882 #
c906108c 17883
81ecdfbb
RW
17884 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
17885 :
b4e70030 17886 else
81ecdfbb
RW
17887 # Prefer the file from the source tree if names are identical.
17888 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
17889 ac_source=$srcdir/$ac_source
17890 fi
b4e70030 17891
81ecdfbb
RW
17892 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
17893$as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
b4e70030 17894
81ecdfbb
RW
17895 if test ! -r "$ac_source"; then
17896 as_fn_error "$ac_source: file not found" "$LINENO" 5
17897 fi
17898 rm -f "$ac_file"
bec39cab 17899
81ecdfbb
RW
17900 # Try a relative symlink, then a hard link, then a copy.
17901 case $srcdir in
17902 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
17903 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
17904 esac
17905 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
17906 ln "$ac_source" "$ac_file" 2>/dev/null ||
17907 cp -p "$ac_source" "$ac_file" ||
17908 as_fn_error "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
17909 fi
17910 ;;
17911 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
17912$as_echo "$as_me: executing $ac_file commands" >&6;}
17913 ;;
c906108c 17914 esac
b4e70030 17915
bec39cab 17916
81ecdfbb
RW
17917 case $ac_file$ac_mode in
17918 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
b292c783 17919 "gcore":F) chmod +x gcore ;;
81ecdfbb 17920 "default":C)
c906108c
SS
17921case x$CONFIG_HEADERS in
17922xconfig.h:config.in)
17923echo > stamp-h ;;
17924esac
bec39cab 17925 ;;
81ecdfbb 17926
bec39cab 17927 esac
81ecdfbb 17928done # for ac_tag
c906108c 17929
bec39cab 17930
81ecdfbb 17931as_fn_exit 0
bec39cab 17932_ACEOF
bec39cab
AC
17933ac_clean_files=$ac_clean_files_save
17934
81ecdfbb
RW
17935test $ac_write_fail = 0 ||
17936 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
17937
bec39cab
AC
17938
17939# configure is writing to config.log, and then calls config.status.
17940# config.status does its own redirection, appending to config.log.
17941# Unfortunately, on DOS this fails, as config.log is still kept open
17942# by configure, so config.status won't be able to write to it; its
17943# output is simply discarded. So we exec the FD to /dev/null,
17944# effectively closing config.log, so it can be properly (re)opened and
17945# appended to by config.status. When coming back to configure, we
17946# need to make the FD available again.
17947if test "$no_create" != yes; then
17948 ac_cs_success=:
17949 ac_config_status_args=
17950 test "$silent" = yes &&
17951 ac_config_status_args="$ac_config_status_args --quiet"
17952 exec 5>/dev/null
17953 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
17954 exec 5>>config.log
17955 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17956 # would make configure fail if this is the last instruction.
81ecdfbb 17957 $ac_cs_success || as_fn_exit $?
bec39cab 17958fi
c906108c 17959
bec39cab 17960#
81ecdfbb 17961# CONFIG_SUBDIRS section.
bec39cab 17962#
c906108c
SS
17963if test "$no_recursion" != yes; then
17964
81ecdfbb
RW
17965 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
17966 # so they do not pile up.
c906108c
SS
17967 ac_sub_configure_args=
17968 ac_prev=
fdc59709
PB
17969 eval "set x $ac_configure_args"
17970 shift
17971 for ac_arg
17972 do
c906108c
SS
17973 if test -n "$ac_prev"; then
17974 ac_prev=
17975 continue
17976 fi
bec39cab 17977 case $ac_arg in
c906108c
SS
17978 -cache-file | --cache-file | --cache-fil | --cache-fi \
17979 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
17980 ac_prev=cache_file ;;
17981 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
bec39cab
AC
17982 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
17983 | --c=*)
17984 ;;
17985 --config-cache | -C)
c906108c
SS
17986 ;;
17987 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
17988 ac_prev=srcdir ;;
17989 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
17990 ;;
bec39cab
AC
17991 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
17992 ac_prev=prefix ;;
17993 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
17994 ;;
81ecdfbb
RW
17995 --disable-option-checking)
17996 ;;
fdc59709
PB
17997 *)
17998 case $ac_arg in
81ecdfbb 17999 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 18000 esac
81ecdfbb 18001 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
c906108c
SS
18002 esac
18003 done
18004
bec39cab
AC
18005 # Always prepend --prefix to ensure using the same prefix
18006 # in subdir configurations.
fdc59709
PB
18007 ac_arg="--prefix=$prefix"
18008 case $ac_arg in
81ecdfbb 18009 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 18010 esac
81ecdfbb
RW
18011 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
18012
18013 # Pass --silent
18014 if test "$silent" = yes; then
18015 ac_sub_configure_args="--silent $ac_sub_configure_args"
18016 fi
18017
18018 # Always prepend --disable-option-checking to silence warnings, since
18019 # different subdirs can have different --enable and --with options.
18020 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
bec39cab 18021
b4e70030 18022 ac_popdir=`pwd`
bec39cab 18023 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
c906108c
SS
18024
18025 # Do not complain, so a configure script can configure whichever
18026 # parts of a large source tree are present.
fdc59709 18027 test -d "$srcdir/$ac_dir" || continue
c906108c 18028
81ecdfbb
RW
18029 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
18030 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
18031 $as_echo "$ac_msg" >&6
18032 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
18033 ac_builddir=.
18034
81ecdfbb
RW
18035case "$ac_dir" in
18036.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18037*)
18038 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
18039 # A ".." for each directory in $ac_dir_suffix.
18040 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
18041 case $ac_top_builddir_sub in
18042 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18043 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18044 esac ;;
18045esac
18046ac_abs_top_builddir=$ac_pwd
18047ac_abs_builddir=$ac_pwd$ac_dir_suffix
18048# for backward compatibility:
18049ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
18050
18051case $srcdir in
81ecdfbb 18052 .) # We are building in place.
bec39cab 18053 ac_srcdir=.
81ecdfbb
RW
18054 ac_top_srcdir=$ac_top_builddir_sub
18055 ac_abs_top_srcdir=$ac_pwd ;;
18056 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 18057 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
18058 ac_top_srcdir=$srcdir
18059 ac_abs_top_srcdir=$srcdir ;;
18060 *) # Relative name.
18061 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18062 ac_top_srcdir=$ac_top_build_prefix$srcdir
18063 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 18064esac
81ecdfbb 18065ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
c906108c 18066
c906108c 18067
fdc59709 18068 cd "$ac_dir"
c906108c
SS
18069
18070 # Check for guested configure; otherwise get Cygnus style configure.
fdc59709
PB
18071 if test -f "$ac_srcdir/configure.gnu"; then
18072 ac_sub_configure=$ac_srcdir/configure.gnu
18073 elif test -f "$ac_srcdir/configure"; then
18074 ac_sub_configure=$ac_srcdir/configure
18075 elif test -f "$ac_srcdir/configure.in"; then
18076 # This should be Cygnus configure.
18077 ac_sub_configure=$ac_aux_dir/configure
c906108c 18078 else
81ecdfbb
RW
18079 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
18080$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
c906108c
SS
18081 ac_sub_configure=
18082 fi
18083
18084 # The recursion is here.
18085 if test -n "$ac_sub_configure"; then
c906108c 18086 # Make the cache file name correct relative to the subdirectory.
bec39cab
AC
18087 case $cache_file in
18088 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
81ecdfbb
RW
18089 *) # Relative name.
18090 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
c906108c 18091 esac
c906108c 18092
81ecdfbb
RW
18093 { $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
18094$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
c906108c 18095 # The eval makes quoting arguments work.
fdc59709
PB
18096 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
18097 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
81ecdfbb 18098 as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
c906108c
SS
18099 fi
18100
fdc59709 18101 cd "$ac_popdir"
c906108c
SS
18102 done
18103fi
81ecdfbb
RW
18104if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
18105 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
18106$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
18107fi
c906108c
SS
18108
18109
18110exit 0
This page took 2.571724 seconds and 4 git commands to generate.