]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/configure
Add a gdbarch 'print_auxv_entry' method for FreeBSD ABIs.
[thirdparty/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
a994041d 734COMPILER_CFLAGS
3bc3d82a 735COMPILER
4869db5e
RM
736INSTALL_STRIP_PROGRAM
737STRIP
738install_sh
81ecdfbb
RW
739target_os
740target_vendor
741target_cpu
742target
743host_os
744host_vendor
745host_cpu
746host
747build_os
748build_vendor
749build_cpu
750build
c971b7fa
PA
751EGREP
752GREP
753CPP
3bc3d82a
PA
754ac_ct_CXX
755CXXFLAGS
756CXX
81ecdfbb
RW
757OBJEXT
758EXEEXT
759ac_ct_CC
760CPPFLAGS
761LDFLAGS
762CFLAGS
763CC
764MAINT
765MAINTAINER_MODE_FALSE
766MAINTAINER_MODE_TRUE
767target_alias
768host_alias
769build_alias
770LIBS
771ECHO_T
772ECHO_N
773ECHO_C
774DEFS
775mandir
776localedir
777libdir
778psdir
779pdfdir
780dvidir
781htmldir
782infodir
783docdir
784oldincludedir
785includedir
786localstatedir
787sharedstatedir
788sysconfdir
789datadir
790datarootdir
791libexecdir
792sbindir
793bindir
794program_transform_name
795prefix
796exec_prefix
797PACKAGE_URL
798PACKAGE_BUGREPORT
799PACKAGE_STRING
800PACKAGE_VERSION
801PACKAGE_TARNAME
802PACKAGE_NAME
803PATH_SEPARATOR
804SHELL'
a4ce5b0d 805ac_subst_files='host_makefile_frag'
81ecdfbb
RW
806ac_user_opts='
807enable_option_checking
808enable_maintainer_mode
da2f07f1
JK
809enable_plugins
810enable_largefile
3bc3d82a 811enable_build_with_cxx
81ecdfbb
RW
812with_separate_debug_dir
813with_gdb_datadir
814with_relocated_sources
7349ff92 815with_auto_load_dir
bccbefd2 816with_auto_load_safe_path
81ecdfbb
RW
817enable_targets
818enable_64_bit_bfd
819enable_gdbcli
820enable_gdbmi
821enable_tui
822enable_gdbtk
05e7c244 823with_libunwind_ia64
81ecdfbb
RW
824with_curses
825enable_profiling
826with_pkgversion
827with_bugurl
711a72d3 828with_system_zlib
016a3251
DD
829with_gnu_ld
830enable_rpath
81ecdfbb 831with_libiconv_prefix
478aac75 832with_iconv_bin
81ecdfbb 833with_system_readline
b8e0a31c 834with_jit_reader_dir
81ecdfbb 835with_expat
81ecdfbb
RW
836with_libexpat_prefix
837with_python
ed3ef339 838with_guile
a8db4212 839enable_libmcheck
58bfce93
MM
840with_intel_pt
841with_libipt_prefix
81ecdfbb
RW
842with_included_regex
843with_sysroot
844with_system_gdbinit
845enable_werror
846enable_build_warnings
847enable_gdb_build_warnings
608e2dbb
TT
848with_lzma
849with_liblzma_prefix
81ecdfbb
RW
850with_tcl
851with_tk
852with_x
853enable_sim
854enable_multi_ice
496c0e1b 855enable_gdbserver
393fd4c3
YQ
856with_babeltrace
857with_libbabeltrace_prefix
81ecdfbb
RW
858'
859 ac_precious_vars='build_alias
860host_alias
861target_alias
862CC
863CFLAGS
864LDFLAGS
865LIBS
866CPPFLAGS
3bc3d82a
PA
867CXX
868CXXFLAGS
869CCC
81ecdfbb 870CPP
f06e05e0
JK
871MAKEINFO
872MAKEINFOFLAGS
81ecdfbb
RW
873YACC
874YFLAGS
875XMKMF'
5ae98d25 876ac_subdirs_all='testsuite
81ecdfbb
RW
877gdbtk
878multi-ice
879gdbserver'
c906108c
SS
880
881# Initialize some variables set by options.
bec39cab
AC
882ac_init_help=
883ac_init_version=false
81ecdfbb
RW
884ac_unrecognized_opts=
885ac_unrecognized_sep=
c906108c
SS
886# The variables have the same names as the options, with
887# dashes changed to underlines.
bec39cab 888cache_file=/dev/null
c906108c 889exec_prefix=NONE
c906108c 890no_create=
c906108c
SS
891no_recursion=
892prefix=NONE
893program_prefix=NONE
894program_suffix=NONE
895program_transform_name=s,x,x,
896silent=
897site=
898srcdir=
c906108c
SS
899verbose=
900x_includes=NONE
901x_libraries=NONE
bec39cab
AC
902
903# Installation directory options.
904# These are left unexpanded so users can "make install exec_prefix=/foo"
905# and all the variables that are supposed to be based on exec_prefix
906# by default will actually change.
907# Use braces instead of parens because sh, perl, etc. also accept them.
81ecdfbb 908# (The list follows the same order as the GNU Coding Standards.)
c906108c
SS
909bindir='${exec_prefix}/bin'
910sbindir='${exec_prefix}/sbin'
911libexecdir='${exec_prefix}/libexec'
81ecdfbb
RW
912datarootdir='${prefix}/share'
913datadir='${datarootdir}'
c906108c
SS
914sysconfdir='${prefix}/etc'
915sharedstatedir='${prefix}/com'
916localstatedir='${prefix}/var'
c906108c
SS
917includedir='${prefix}/include'
918oldincludedir='/usr/include'
81ecdfbb
RW
919docdir='${datarootdir}/doc/${PACKAGE}'
920infodir='${datarootdir}/info'
921htmldir='${docdir}'
922dvidir='${docdir}'
923pdfdir='${docdir}'
924psdir='${docdir}'
925libdir='${exec_prefix}/lib'
926localedir='${datarootdir}/locale'
927mandir='${datarootdir}/man'
c906108c 928
c906108c 929ac_prev=
81ecdfbb 930ac_dashdash=
c906108c
SS
931for ac_option
932do
c906108c
SS
933 # If the previous option needs an argument, assign it.
934 if test -n "$ac_prev"; then
81ecdfbb 935 eval $ac_prev=\$ac_option
c906108c
SS
936 ac_prev=
937 continue
938 fi
939
81ecdfbb
RW
940 case $ac_option in
941 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
942 *) ac_optarg=yes ;;
943 esac
c906108c
SS
944
945 # Accept the important Cygnus configure options, so we can diagnose typos.
946
81ecdfbb
RW
947 case $ac_dashdash$ac_option in
948 --)
949 ac_dashdash=yes ;;
c906108c
SS
950
951 -bindir | --bindir | --bindi | --bind | --bin | --bi)
952 ac_prev=bindir ;;
953 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
bec39cab 954 bindir=$ac_optarg ;;
c906108c
SS
955
956 -build | --build | --buil | --bui | --bu)
bec39cab 957 ac_prev=build_alias ;;
c906108c 958 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
bec39cab 959 build_alias=$ac_optarg ;;
c906108c
SS
960
961 -cache-file | --cache-file | --cache-fil | --cache-fi \
962 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
963 ac_prev=cache_file ;;
964 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
965 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
bec39cab
AC
966 cache_file=$ac_optarg ;;
967
968 --config-cache | -C)
969 cache_file=config.cache ;;
c906108c 970
81ecdfbb 971 -datadir | --datadir | --datadi | --datad)
c906108c 972 ac_prev=datadir ;;
81ecdfbb 973 -datadir=* | --datadir=* | --datadi=* | --datad=*)
bec39cab 974 datadir=$ac_optarg ;;
c906108c 975
81ecdfbb
RW
976 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
977 | --dataroo | --dataro | --datar)
978 ac_prev=datarootdir ;;
979 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
980 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
981 datarootdir=$ac_optarg ;;
982
c906108c 983 -disable-* | --disable-*)
81ecdfbb 984 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
c906108c 985 # Reject names that are not valid shell variable names.
81ecdfbb
RW
986 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
987 as_fn_error "invalid feature name: $ac_useropt"
988 ac_useropt_orig=$ac_useropt
989 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
990 case $ac_user_opts in
991 *"
992"enable_$ac_useropt"
993"*) ;;
994 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
995 ac_unrecognized_sep=', ';;
996 esac
997 eval enable_$ac_useropt=no ;;
998
999 -docdir | --docdir | --docdi | --doc | --do)
1000 ac_prev=docdir ;;
1001 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1002 docdir=$ac_optarg ;;
1003
1004 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1005 ac_prev=dvidir ;;
1006 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1007 dvidir=$ac_optarg ;;
c906108c
SS
1008
1009 -enable-* | --enable-*)
81ecdfbb 1010 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
c906108c 1011 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1012 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1013 as_fn_error "invalid feature name: $ac_useropt"
1014 ac_useropt_orig=$ac_useropt
1015 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1016 case $ac_user_opts in
1017 *"
1018"enable_$ac_useropt"
1019"*) ;;
1020 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1021 ac_unrecognized_sep=', ';;
b4e70030 1022 esac
81ecdfbb 1023 eval enable_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1024
1025 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1026 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1027 | --exec | --exe | --ex)
1028 ac_prev=exec_prefix ;;
1029 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1030 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1031 | --exec=* | --exe=* | --ex=*)
bec39cab 1032 exec_prefix=$ac_optarg ;;
c906108c
SS
1033
1034 -gas | --gas | --ga | --g)
1035 # Obsolete; use --with-gas.
1036 with_gas=yes ;;
1037
bec39cab
AC
1038 -help | --help | --hel | --he | -h)
1039 ac_init_help=long ;;
1040 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1041 ac_init_help=recursive ;;
1042 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1043 ac_init_help=short ;;
c906108c
SS
1044
1045 -host | --host | --hos | --ho)
bec39cab 1046 ac_prev=host_alias ;;
c906108c 1047 -host=* | --host=* | --hos=* | --ho=*)
bec39cab 1048 host_alias=$ac_optarg ;;
c906108c 1049
81ecdfbb
RW
1050 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1051 ac_prev=htmldir ;;
1052 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1053 | --ht=*)
1054 htmldir=$ac_optarg ;;
1055
c906108c
SS
1056 -includedir | --includedir | --includedi | --included | --include \
1057 | --includ | --inclu | --incl | --inc)
1058 ac_prev=includedir ;;
1059 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1060 | --includ=* | --inclu=* | --incl=* | --inc=*)
bec39cab 1061 includedir=$ac_optarg ;;
c906108c
SS
1062
1063 -infodir | --infodir | --infodi | --infod | --info | --inf)
1064 ac_prev=infodir ;;
1065 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
bec39cab 1066 infodir=$ac_optarg ;;
c906108c
SS
1067
1068 -libdir | --libdir | --libdi | --libd)
1069 ac_prev=libdir ;;
1070 -libdir=* | --libdir=* | --libdi=* | --libd=*)
bec39cab 1071 libdir=$ac_optarg ;;
c906108c
SS
1072
1073 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1074 | --libexe | --libex | --libe)
1075 ac_prev=libexecdir ;;
1076 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1077 | --libexe=* | --libex=* | --libe=*)
bec39cab 1078 libexecdir=$ac_optarg ;;
c906108c 1079
81ecdfbb
RW
1080 -localedir | --localedir | --localedi | --localed | --locale)
1081 ac_prev=localedir ;;
1082 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1083 localedir=$ac_optarg ;;
1084
c906108c 1085 -localstatedir | --localstatedir | --localstatedi | --localstated \
81ecdfbb 1086 | --localstate | --localstat | --localsta | --localst | --locals)
c906108c
SS
1087 ac_prev=localstatedir ;;
1088 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
81ecdfbb 1089 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
bec39cab 1090 localstatedir=$ac_optarg ;;
c906108c
SS
1091
1092 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1093 ac_prev=mandir ;;
1094 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
bec39cab 1095 mandir=$ac_optarg ;;
c906108c
SS
1096
1097 -nfp | --nfp | --nf)
1098 # Obsolete; use --without-fp.
1099 with_fp=no ;;
1100
1101 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
bec39cab 1102 | --no-cr | --no-c | -n)
c906108c
SS
1103 no_create=yes ;;
1104
1105 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1106 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1107 no_recursion=yes ;;
1108
1109 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1110 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1111 | --oldin | --oldi | --old | --ol | --o)
1112 ac_prev=oldincludedir ;;
1113 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1114 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1115 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
bec39cab 1116 oldincludedir=$ac_optarg ;;
c906108c
SS
1117
1118 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1119 ac_prev=prefix ;;
1120 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
bec39cab 1121 prefix=$ac_optarg ;;
c906108c
SS
1122
1123 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1124 | --program-pre | --program-pr | --program-p)
1125 ac_prev=program_prefix ;;
1126 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1127 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
bec39cab 1128 program_prefix=$ac_optarg ;;
c906108c
SS
1129
1130 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1131 | --program-suf | --program-su | --program-s)
1132 ac_prev=program_suffix ;;
1133 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1134 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
bec39cab 1135 program_suffix=$ac_optarg ;;
c906108c
SS
1136
1137 -program-transform-name | --program-transform-name \
1138 | --program-transform-nam | --program-transform-na \
1139 | --program-transform-n | --program-transform- \
1140 | --program-transform | --program-transfor \
1141 | --program-transfo | --program-transf \
1142 | --program-trans | --program-tran \
1143 | --progr-tra | --program-tr | --program-t)
1144 ac_prev=program_transform_name ;;
1145 -program-transform-name=* | --program-transform-name=* \
1146 | --program-transform-nam=* | --program-transform-na=* \
1147 | --program-transform-n=* | --program-transform-=* \
1148 | --program-transform=* | --program-transfor=* \
1149 | --program-transfo=* | --program-transf=* \
1150 | --program-trans=* | --program-tran=* \
1151 | --progr-tra=* | --program-tr=* | --program-t=*)
bec39cab 1152 program_transform_name=$ac_optarg ;;
c906108c 1153
81ecdfbb
RW
1154 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1155 ac_prev=pdfdir ;;
1156 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1157 pdfdir=$ac_optarg ;;
1158
1159 -psdir | --psdir | --psdi | --psd | --ps)
1160 ac_prev=psdir ;;
1161 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1162 psdir=$ac_optarg ;;
1163
c906108c
SS
1164 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1165 | -silent | --silent | --silen | --sile | --sil)
1166 silent=yes ;;
1167
1168 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1169 ac_prev=sbindir ;;
1170 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1171 | --sbi=* | --sb=*)
bec39cab 1172 sbindir=$ac_optarg ;;
c906108c
SS
1173
1174 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1175 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1176 | --sharedst | --shareds | --shared | --share | --shar \
1177 | --sha | --sh)
1178 ac_prev=sharedstatedir ;;
1179 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1180 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1181 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1182 | --sha=* | --sh=*)
bec39cab 1183 sharedstatedir=$ac_optarg ;;
c906108c
SS
1184
1185 -site | --site | --sit)
1186 ac_prev=site ;;
1187 -site=* | --site=* | --sit=*)
bec39cab 1188 site=$ac_optarg ;;
3ace7edb 1189
c906108c
SS
1190 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1191 ac_prev=srcdir ;;
1192 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
bec39cab 1193 srcdir=$ac_optarg ;;
c906108c
SS
1194
1195 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1196 | --syscon | --sysco | --sysc | --sys | --sy)
1197 ac_prev=sysconfdir ;;
1198 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1199 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
bec39cab 1200 sysconfdir=$ac_optarg ;;
c906108c
SS
1201
1202 -target | --target | --targe | --targ | --tar | --ta | --t)
bec39cab 1203 ac_prev=target_alias ;;
c906108c 1204 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
bec39cab 1205 target_alias=$ac_optarg ;;
c906108c
SS
1206
1207 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1208 verbose=yes ;;
1209
bec39cab
AC
1210 -version | --version | --versio | --versi | --vers | -V)
1211 ac_init_version=: ;;
c906108c
SS
1212
1213 -with-* | --with-*)
81ecdfbb 1214 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
c906108c 1215 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1216 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1217 as_fn_error "invalid package name: $ac_useropt"
1218 ac_useropt_orig=$ac_useropt
1219 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1220 case $ac_user_opts in
1221 *"
1222"with_$ac_useropt"
1223"*) ;;
1224 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1225 ac_unrecognized_sep=', ';;
b4e70030 1226 esac
81ecdfbb 1227 eval with_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1228
1229 -without-* | --without-*)
81ecdfbb 1230 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
c906108c 1231 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1232 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1233 as_fn_error "invalid package name: $ac_useropt"
1234 ac_useropt_orig=$ac_useropt
1235 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1236 case $ac_user_opts in
1237 *"
1238"with_$ac_useropt"
1239"*) ;;
1240 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1241 ac_unrecognized_sep=', ';;
1242 esac
1243 eval with_$ac_useropt=no ;;
c906108c
SS
1244
1245 --x)
1246 # Obsolete; use --with-x.
1247 with_x=yes ;;
1248
1249 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1250 | --x-incl | --x-inc | --x-in | --x-i)
1251 ac_prev=x_includes ;;
1252 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1253 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
bec39cab 1254 x_includes=$ac_optarg ;;
c906108c
SS
1255
1256 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1257 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1258 ac_prev=x_libraries ;;
1259 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1260 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
bec39cab 1261 x_libraries=$ac_optarg ;;
c906108c 1262
81ecdfbb
RW
1263 -*) as_fn_error "unrecognized option: \`$ac_option'
1264Try \`$0 --help' for more information."
c906108c
SS
1265 ;;
1266
bec39cab
AC
1267 *=*)
1268 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1269 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1270 case $ac_envvar in #(
1271 '' | [0-9]* | *[!_$as_cr_alnum]* )
1272 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1273 esac
1274 eval $ac_envvar=\$ac_optarg
bec39cab
AC
1275 export $ac_envvar ;;
1276
c906108c 1277 *)
bec39cab 1278 # FIXME: should be removed in autoconf 3.0.
81ecdfbb 1279 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
bec39cab 1280 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
81ecdfbb 1281 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
bec39cab 1282 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
c906108c
SS
1283 ;;
1284
1285 esac
1286done
1287
1288if test -n "$ac_prev"; then
bec39cab 1289 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
81ecdfbb 1290 as_fn_error "missing argument to $ac_option"
c906108c 1291fi
c906108c 1292
81ecdfbb
RW
1293if test -n "$ac_unrecognized_opts"; then
1294 case $enable_option_checking in
1295 no) ;;
1296 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
1297 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
b4e70030 1298 esac
81ecdfbb 1299fi
b4e70030 1300
81ecdfbb
RW
1301# Check all directory arguments for consistency.
1302for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1303 datadir sysconfdir sharedstatedir localstatedir includedir \
1304 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1305 libdir localedir mandir
b4e70030 1306do
81ecdfbb
RW
1307 eval ac_val=\$$ac_var
1308 # Remove trailing slashes.
1309 case $ac_val in
1310 */ )
1311 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1312 eval $ac_var=\$ac_val;;
1313 esac
1314 # Be sure to have absolute directory names.
b4e70030 1315 case $ac_val in
81ecdfbb
RW
1316 [\\/$]* | ?:[\\/]* ) continue;;
1317 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
c906108c 1318 esac
81ecdfbb 1319 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
c906108c
SS
1320done
1321
bec39cab
AC
1322# There might be people who depend on the old broken behavior: `$host'
1323# used to hold the argument of --host etc.
1324# FIXME: To remove some day.
1325build=$build_alias
1326host=$host_alias
1327target=$target_alias
1328
1329# FIXME: To remove some day.
1330if test "x$host_alias" != x; then
1331 if test "x$build_alias" = x; then
1332 cross_compiling=maybe
81ecdfbb 1333 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
bec39cab
AC
1334 If a cross compiler is detected then cross compile mode will be used." >&2
1335 elif test "x$build_alias" != "x$host_alias"; then
1336 cross_compiling=yes
1337 fi
1338fi
c906108c 1339
bec39cab
AC
1340ac_tool_prefix=
1341test -n "$host_alias" && ac_tool_prefix=$host_alias-
1342
1343test "$silent" = yes && exec 6>/dev/null
c906108c 1344
c906108c 1345
81ecdfbb
RW
1346ac_pwd=`pwd` && test -n "$ac_pwd" &&
1347ac_ls_di=`ls -di .` &&
1348ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1349 as_fn_error "working directory cannot be determined"
1350test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1351 as_fn_error "pwd does not report name of working directory"
1352
1353
c906108c
SS
1354# Find the source files, if location was not specified.
1355if test -z "$srcdir"; then
1356 ac_srcdir_defaulted=yes
81ecdfbb
RW
1357 # Try the directory containing this script, then the parent directory.
1358 ac_confdir=`$as_dirname -- "$as_myself" ||
1359$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1360 X"$as_myself" : 'X\(//\)[^/]' \| \
1361 X"$as_myself" : 'X\(//\)$' \| \
1362 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1363$as_echo X"$as_myself" |
1364 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1365 s//\1/
1366 q
1367 }
1368 /^X\(\/\/\)[^/].*/{
1369 s//\1/
1370 q
1371 }
1372 /^X\(\/\/\)$/{
1373 s//\1/
1374 q
1375 }
1376 /^X\(\/\).*/{
1377 s//\1/
1378 q
1379 }
1380 s/.*/./; q'`
c906108c 1381 srcdir=$ac_confdir
81ecdfbb 1382 if test ! -r "$srcdir/$ac_unique_file"; then
c906108c
SS
1383 srcdir=..
1384 fi
1385else
1386 ac_srcdir_defaulted=no
1387fi
81ecdfbb
RW
1388if test ! -r "$srcdir/$ac_unique_file"; then
1389 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1390 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
1391fi
1392ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1393ac_abs_confdir=`(
1394 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
1395 pwd)`
1396# When building in place, set srcdir=.
1397if test "$ac_abs_confdir" = "$ac_pwd"; then
1398 srcdir=.
1399fi
1400# Remove unnecessary trailing slashes from srcdir.
1401# Double slashes in file names in object file debugging info
1402# mess up M-x gdb in Emacs.
1403case $srcdir in
1404*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1405esac
1406for ac_var in $ac_precious_vars; do
1407 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1408 eval ac_env_${ac_var}_value=\$${ac_var}
1409 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1410 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1411done
c906108c 1412
bec39cab
AC
1413#
1414# Report the --help message.
1415#
1416if test "$ac_init_help" = "long"; then
1417 # Omit some internal or obsolete options to make the list less imposing.
1418 # This message is too long to be a string in the A/UX 3.1 sh.
1419 cat <<_ACEOF
1420\`configure' configures this package to adapt to many kinds of systems.
1421
1422Usage: $0 [OPTION]... [VAR=VALUE]...
1423
1424To assign environment variables (e.g., CC, CFLAGS...), specify them as
1425VAR=VALUE. See below for descriptions of some of the useful variables.
1426
1427Defaults for the options are specified in brackets.
1428
1429Configuration:
1430 -h, --help display this help and exit
1431 --help=short display options specific to this package
1432 --help=recursive display the short help of all the included packages
1433 -V, --version display version information and exit
1434 -q, --quiet, --silent do not print \`checking...' messages
1435 --cache-file=FILE cache test results in FILE [disabled]
1436 -C, --config-cache alias for \`--cache-file=config.cache'
1437 -n, --no-create do not create output files
1438 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1439
bec39cab
AC
1440Installation directories:
1441 --prefix=PREFIX install architecture-independent files in PREFIX
81ecdfbb 1442 [$ac_default_prefix]
bec39cab 1443 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
81ecdfbb 1444 [PREFIX]
bec39cab
AC
1445
1446By default, \`make install' will install all the files in
1447\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1448an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1449for instance \`--prefix=\$HOME'.
1450
1451For better control, use the options below.
1452
1453Fine tuning of the installation directories:
81ecdfbb
RW
1454 --bindir=DIR user executables [EPREFIX/bin]
1455 --sbindir=DIR system admin executables [EPREFIX/sbin]
1456 --libexecdir=DIR program executables [EPREFIX/libexec]
1457 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1458 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1459 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1460 --libdir=DIR object code libraries [EPREFIX/lib]
1461 --includedir=DIR C header files [PREFIX/include]
1462 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1463 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1464 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1465 --infodir=DIR info documentation [DATAROOTDIR/info]
1466 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1467 --mandir=DIR man documentation [DATAROOTDIR/man]
1468 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1469 --htmldir=DIR html documentation [DOCDIR]
1470 --dvidir=DIR dvi documentation [DOCDIR]
1471 --pdfdir=DIR pdf documentation [DOCDIR]
1472 --psdir=DIR ps documentation [DOCDIR]
bec39cab
AC
1473_ACEOF
1474
1475 cat <<\_ACEOF
1476
9009e1ae
MR
1477Program names:
1478 --program-prefix=PREFIX prepend PREFIX to installed program names
1479 --program-suffix=SUFFIX append SUFFIX to installed program names
1480 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1481
bec39cab
AC
1482X features:
1483 --x-includes=DIR X include files are in DIR
1484 --x-libraries=DIR X library files are in DIR
1485
1486System types:
1487 --build=BUILD configure for building on BUILD [guessed]
1488 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1489 --target=TARGET configure for building compilers for TARGET [HOST]
1490_ACEOF
1491fi
1492
1493if test -n "$ac_init_help"; then
1494
1495 cat <<\_ACEOF
1496
1497Optional Features:
81ecdfbb 1498 --disable-option-checking ignore unrecognized --enable/--with options
bec39cab
AC
1499 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1500 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
85981d60
AC
1501 --enable-maintainer-mode enable make rules and dependencies not useful
1502 (and sometimes confusing) to the casual installer
2974be62 1503 --enable-plugins Enable support for plugins
da2f07f1 1504 --disable-largefile omit support for large files
3bc3d82a 1505 --enable-build-with-cxx build with C++ compiler instead of C compiler
a1220294
TT
1506 --enable-targets=TARGETS
1507 alternative target configurations
c0993dbe 1508 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
bec39cab
AC
1509 --disable-gdbcli disable command-line interface (CLI)
1510 --disable-gdbmi disable machine-interface (MI)
1511 --enable-tui enable full-screen terminal user interface (TUI)
1512 --enable-gdbtk enable gdbtk graphical user interface (GUI)
1513 --enable-profiling enable profiling of GDB
3841debe 1514 --disable-rpath do not hardcode runtime library paths
17ef446e 1515 --enable-libmcheck Try linking with -lmcheck if available
a1220294 1516 --enable-werror treat compile warnings as errors
32c1c914 1517 --enable-build-warnings enable build-time compiler warnings if gcc is used
a1220294 1518 --enable-gdb-build-warnings
32c1c914 1519 enable GDB specific build-time compiler warnings if
a1220294 1520 gcc is used
32c1c914 1521 --enable-sim link gdb with simulator
bec39cab 1522 --enable-multi-ice build the multi-ice-gdb-server
496c0e1b
JB
1523 --enable-gdbserver automatically build gdbserver (yes/no/auto, default
1524 is auto)
bec39cab
AC
1525
1526Optional Packages:
1527 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1528 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
a1220294 1529 --with-separate-debug-dir=PATH
32c1c914 1530 look for global separate debug info in this path
62e4f60c 1531 [LIBDIR/debug]
b14b1491
TT
1532 --with-gdb-datadir=PATH look for global separate data files in this path
1533 [DATADIR/gdb]
29b0e8a2 1534 --with-relocated-sources=PATH
32c1c914 1535 automatically relocate this path for source files
7349ff92 1536 --with-auto-load-dir=PATH
aff139ff 1537 directories from which to load auto-loaded scripts
1564a261 1538 [$debugdir:$datadir/auto-load]
bccbefd2 1539 --with-auto-load-safe-path=PATH
aff139ff 1540 directories safe to hold auto-loaded files
7349ff92 1541 [--with-auto-load-dir]
bccbefd2
JK
1542 --without-auto-load-safe-path
1543 do not restrict auto-loaded files locations
05e7c244 1544 --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets
cb01cfba
JB
1545 --with-curses use the curses library instead of the termcap
1546 library
c16158bc
JM
1547 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
1548 --with-bugurl=URL Direct users to URL to report a bug
711a72d3 1549 --with-system-zlib use installed libz
016a3251
DD
1550 --with-gnu-ld assume the C compiler uses GNU ld default=no
1551 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
1552 --without-libiconv-prefix don't search for libiconv in includedir and libdir
478aac75 1553 --with-iconv-bin=PATH specify where to find the iconv program
6a30b0a5 1554 --with-system-readline use installed readline library
b8e0a31c
SD
1555 --with-jit-reader-dir=PATH
1556 directory to load the JIT readers from
5c39566f 1557 --with-expat include expat support (auto/yes/no)
3841debe
DJ
1558 --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib
1559 --without-libexpat-prefix don't search for libexpat in includedir and libdir
0c4a4063
DE
1560 --with-python[=PYTHON] include python support
1561 (auto/yes/no/<python-program>)
ed3ef339
DE
1562 --with-guile[=GUILE] include guile support
1563 (auto/yes/no/<guile-version>/<pkg-config-program>)
bc504a31 1564 --with-intel-pt include Intel Processor Trace support (auto/yes/no)
58bfce93
MM
1565 --with-libipt-prefix[=DIR] search for libipt in DIR/include and DIR/lib
1566 --without-libipt-prefix don't search for libipt in includedir and libdir
a1220294
TT
1567 --without-included-regex
1568 don't use included regex; this is the default on
1569 systems with version 2 of the GNU C library (use
1570 with caution on other system)
81ecdfbb 1571 --with-sysroot[=DIR] search for usr/lib et al within DIR
b14b1491 1572 --with-system-gdbinit=PATH
32c1c914 1573 automatically load a system-wide gdbinit file
608e2dbb
TT
1574 --with-lzma support lzma compression (auto/yes/no)
1575 --with-liblzma-prefix[=DIR] search for liblzma in DIR/include and DIR/lib
1576 --without-liblzma-prefix don't search for liblzma in includedir and libdir
5062cc19
KS
1577 --with-tcl directory containing tcl configuration (tclConfig.sh)
1578 --with-tk directory containing tk configuration (tkConfig.sh)
bec39cab 1579 --with-x use the X Window System
393fd4c3
YQ
1580 --with-babeltrace include babeltrace support (auto/yes/no)
1581 --with-libbabeltrace-prefix[=DIR] search for libbabeltrace in DIR/include and DIR/lib
1582 --without-libbabeltrace-prefix don't search for libbabeltrace in includedir and libdir
bec39cab
AC
1583
1584Some influential environment variables:
1585 CC C compiler command
1586 CFLAGS C compiler flags
1587 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1588 nonstandard directory <lib dir>
81ecdfbb
RW
1589 LIBS libraries to pass to the linker, e.g. -l<library>
1590 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1591 you have headers in a nonstandard directory <include dir>
3bc3d82a
PA
1592 CXX C++ compiler command
1593 CXXFLAGS C++ compiler flags
bec39cab 1594 CPP C preprocessor
f06e05e0
JK
1595 MAKEINFO Parent configure detects if it is of sufficient version.
1596 MAKEINFOFLAGS
1597 Parameters for MAKEINFO.
81ecdfbb
RW
1598 YACC The `Yet Another C Compiler' implementation to use. Defaults to
1599 the first program found out of: `bison -y', `byacc', `yacc'.
1600 YFLAGS The list of arguments that will be passed by default to $YACC.
1601 This script will default YFLAGS to the empty string to avoid a
1602 default value of `-d' given by some make applications.
1603 XMKMF Path to xmkmf, Makefile generator for X Window System
bec39cab
AC
1604
1605Use these variables to override the choices made by `configure' or to help
1606it to find libraries and programs with nonstandard names/locations.
1607
81ecdfbb 1608Report bugs to the package provider.
bec39cab 1609_ACEOF
81ecdfbb 1610ac_status=$?
bec39cab
AC
1611fi
1612
1613if test "$ac_init_help" = "recursive"; then
1614 # If there are subdirs, report their specific --help.
bec39cab 1615 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
81ecdfbb
RW
1616 test -d "$ac_dir" ||
1617 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1618 continue
bec39cab
AC
1619 ac_builddir=.
1620
81ecdfbb
RW
1621case "$ac_dir" in
1622.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1623*)
1624 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1625 # A ".." for each directory in $ac_dir_suffix.
1626 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1627 case $ac_top_builddir_sub in
1628 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1629 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1630 esac ;;
1631esac
1632ac_abs_top_builddir=$ac_pwd
1633ac_abs_builddir=$ac_pwd$ac_dir_suffix
1634# for backward compatibility:
1635ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
1636
1637case $srcdir in
81ecdfbb 1638 .) # We are building in place.
bec39cab 1639 ac_srcdir=.
81ecdfbb
RW
1640 ac_top_srcdir=$ac_top_builddir_sub
1641 ac_abs_top_srcdir=$ac_pwd ;;
1642 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 1643 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
1644 ac_top_srcdir=$srcdir
1645 ac_abs_top_srcdir=$srcdir ;;
1646 *) # Relative name.
1647 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1648 ac_top_srcdir=$ac_top_build_prefix$srcdir
1649 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 1650esac
81ecdfbb 1651ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 1652
81ecdfbb
RW
1653 cd "$ac_dir" || { ac_status=$?; continue; }
1654 # Check for guested configure.
1655 if test -f "$ac_srcdir/configure.gnu"; then
1656 echo &&
1657 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1658 elif test -f "$ac_srcdir/configure"; then
1659 echo &&
1660 $SHELL "$ac_srcdir/configure" --help=recursive
3ace7edb 1661 else
81ecdfbb
RW
1662 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1663 fi || ac_status=$?
1664 cd "$ac_pwd" || { ac_status=$?; break; }
bec39cab
AC
1665 done
1666fi
1667
81ecdfbb 1668test -n "$ac_init_help" && exit $ac_status
bec39cab
AC
1669if $ac_init_version; then
1670 cat <<\_ACEOF
81ecdfbb
RW
1671configure
1672generated by GNU Autoconf 2.64
bec39cab 1673
81ecdfbb 1674Copyright (C) 2009 Free Software Foundation, Inc.
bec39cab
AC
1675This configure script is free software; the Free Software Foundation
1676gives unlimited permission to copy, distribute and modify it.
1677_ACEOF
81ecdfbb 1678 exit
bec39cab 1679fi
bec39cab 1680
81ecdfbb
RW
1681## ------------------------ ##
1682## Autoconf initialization. ##
1683## ------------------------ ##
bec39cab 1684
81ecdfbb
RW
1685# ac_fn_c_try_compile LINENO
1686# --------------------------
1687# Try to compile conftest.$ac_ext, and return whether this succeeded.
1688ac_fn_c_try_compile ()
1689{
1690 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1691 rm -f conftest.$ac_objext
1692 if { { ac_try="$ac_compile"
1693case "(($ac_try" in
1694 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1695 *) ac_try_echo=$ac_try;;
1696esac
1697eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1698$as_echo "$ac_try_echo"; } >&5
1699 (eval "$ac_compile") 2>conftest.err
1700 ac_status=$?
1701 if test -s conftest.err; then
1702 grep -v '^ *+' conftest.err >conftest.er1
1703 cat conftest.er1 >&5
1704 mv -f conftest.er1 conftest.err
1705 fi
1706 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1707 test $ac_status = 0; } && {
1708 test -z "$ac_c_werror_flag" ||
1709 test ! -s conftest.err
1710 } && test -s conftest.$ac_objext; then :
1711 ac_retval=0
1712else
1713 $as_echo "$as_me: failed program was:" >&5
1714sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1715
81ecdfbb
RW
1716 ac_retval=1
1717fi
1718 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1719 return $ac_retval
1720
1721} # ac_fn_c_try_compile
1722
3bc3d82a
PA
1723# ac_fn_cxx_try_compile LINENO
1724# ----------------------------
1725# Try to compile conftest.$ac_ext, and return whether this succeeded.
1726ac_fn_cxx_try_compile ()
1727{
1728 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1729 rm -f conftest.$ac_objext
1730 if { { ac_try="$ac_compile"
1731case "(($ac_try" in
1732 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1733 *) ac_try_echo=$ac_try;;
1734esac
1735eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1736$as_echo "$ac_try_echo"; } >&5
1737 (eval "$ac_compile") 2>conftest.err
1738 ac_status=$?
1739 if test -s conftest.err; then
1740 grep -v '^ *+' conftest.err >conftest.er1
1741 cat conftest.er1 >&5
1742 mv -f conftest.er1 conftest.err
1743 fi
1744 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1745 test $ac_status = 0; } && {
1746 test -z "$ac_cxx_werror_flag" ||
1747 test ! -s conftest.err
1748 } && test -s conftest.$ac_objext; then :
1749 ac_retval=0
1750else
1751 $as_echo "$as_me: failed program was:" >&5
1752sed 's/^/| /' conftest.$ac_ext >&5
1753
1754 ac_retval=1
1755fi
1756 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1757 return $ac_retval
1758
1759} # ac_fn_cxx_try_compile
1760
81ecdfbb
RW
1761# ac_fn_c_try_cpp LINENO
1762# ----------------------
1763# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1764ac_fn_c_try_cpp ()
bec39cab 1765{
81ecdfbb
RW
1766 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1767 if { { ac_try="$ac_cpp conftest.$ac_ext"
1768case "(($ac_try" in
1769 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1770 *) ac_try_echo=$ac_try;;
1771esac
1772eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1773$as_echo "$ac_try_echo"; } >&5
1774 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1775 ac_status=$?
1776 if test -s conftest.err; then
1777 grep -v '^ *+' conftest.err >conftest.er1
1778 cat conftest.er1 >&5
1779 mv -f conftest.er1 conftest.err
1780 fi
1781 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1782 test $ac_status = 0; } >/dev/null && {
1783 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1784 test ! -s conftest.err
1785 }; then :
1786 ac_retval=0
1787else
1788 $as_echo "$as_me: failed program was:" >&5
1789sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1790
81ecdfbb
RW
1791 ac_retval=1
1792fi
1793 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1794 return $ac_retval
bec39cab 1795
81ecdfbb 1796} # ac_fn_c_try_cpp
bec39cab 1797
81ecdfbb
RW
1798# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1799# -------------------------------------------------------
1800# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1801# the include files in INCLUDES and setting the cache variable VAR
1802# accordingly.
1803ac_fn_c_check_header_mongrel ()
1804{
1805 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1806 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1807 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1808$as_echo_n "checking for $2... " >&6; }
1809if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1810 $as_echo_n "(cached) " >&6
1811fi
1812eval ac_res=\$$3
1813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1814$as_echo "$ac_res" >&6; }
1815else
1816 # Is the header compilable?
1817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1818$as_echo_n "checking $2 usability... " >&6; }
1819cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1820/* end confdefs.h. */
1821$4
1822#include <$2>
1823_ACEOF
1824if ac_fn_c_try_compile "$LINENO"; then :
1825 ac_header_compiler=yes
1826else
1827 ac_header_compiler=no
1828fi
1829rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1830{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1831$as_echo "$ac_header_compiler" >&6; }
bec39cab 1832
81ecdfbb
RW
1833# Is the header present?
1834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1835$as_echo_n "checking $2 presence... " >&6; }
1836cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1837/* end confdefs.h. */
1838#include <$2>
1839_ACEOF
1840if ac_fn_c_try_cpp "$LINENO"; then :
1841 ac_header_preproc=yes
1842else
1843 ac_header_preproc=no
1844fi
1845rm -f conftest.err conftest.$ac_ext
1846{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1847$as_echo "$ac_header_preproc" >&6; }
bec39cab 1848
81ecdfbb
RW
1849# So? What about this header?
1850case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1851 yes:no: )
1852 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1853$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1854 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1855$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1856 ;;
1857 no:yes:* )
1858 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1859$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1860 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1861$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1862 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1863$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1864 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1865$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1866 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1867$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1868 ;;
1869esac
1870 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1871$as_echo_n "checking for $2... " >&6; }
1872if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1873 $as_echo_n "(cached) " >&6
1874else
1875 eval "$3=\$ac_header_compiler"
1876fi
1877eval ac_res=\$$3
1878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1879$as_echo "$ac_res" >&6; }
1880fi
1881 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 1882
81ecdfbb 1883} # ac_fn_c_check_header_mongrel
bec39cab 1884
81ecdfbb
RW
1885# ac_fn_c_try_run LINENO
1886# ----------------------
1887# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1888# that executables *can* be run.
1889ac_fn_c_try_run ()
1890{
1891 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1892 if { { ac_try="$ac_link"
1893case "(($ac_try" in
1894 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1895 *) ac_try_echo=$ac_try;;
1896esac
1897eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1898$as_echo "$ac_try_echo"; } >&5
1899 (eval "$ac_link") 2>&5
1900 ac_status=$?
1901 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1902 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1903 { { case "(($ac_try" in
1904 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1905 *) ac_try_echo=$ac_try;;
1906esac
1907eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1908$as_echo "$ac_try_echo"; } >&5
1909 (eval "$ac_try") 2>&5
1910 ac_status=$?
1911 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1912 test $ac_status = 0; }; }; then :
1913 ac_retval=0
1914else
1915 $as_echo "$as_me: program exited with status $ac_status" >&5
1916 $as_echo "$as_me: failed program was:" >&5
1917sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1918
81ecdfbb
RW
1919 ac_retval=$ac_status
1920fi
1921 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1922 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1923 return $ac_retval
bec39cab 1924
81ecdfbb 1925} # ac_fn_c_try_run
bec39cab 1926
81ecdfbb
RW
1927# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1928# -------------------------------------------------------
1929# Tests whether HEADER exists and can be compiled using the include files in
1930# INCLUDES, setting the cache variable VAR accordingly.
1931ac_fn_c_check_header_compile ()
1932{
1933 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1935$as_echo_n "checking for $2... " >&6; }
1936if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1937 $as_echo_n "(cached) " >&6
1938else
1939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1940/* end confdefs.h. */
1941$4
1942#include <$2>
bec39cab 1943_ACEOF
81ecdfbb
RW
1944if ac_fn_c_try_compile "$LINENO"; then :
1945 eval "$3=yes"
1946else
1947 eval "$3=no"
1948fi
1949rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1950fi
1951eval ac_res=\$$3
1952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1953$as_echo "$ac_res" >&6; }
1954 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 1955
81ecdfbb 1956} # ac_fn_c_check_header_compile
bec39cab 1957
2974be62
AM
1958# ac_fn_c_try_link LINENO
1959# -----------------------
1960# Try to link conftest.$ac_ext, and return whether this succeeded.
1961ac_fn_c_try_link ()
1962{
1963 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1964 rm -f conftest.$ac_objext conftest$ac_exeext
1965 if { { ac_try="$ac_link"
1966case "(($ac_try" in
1967 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1968 *) ac_try_echo=$ac_try;;
1969esac
1970eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1971$as_echo "$ac_try_echo"; } >&5
1972 (eval "$ac_link") 2>conftest.err
1973 ac_status=$?
1974 if test -s conftest.err; then
1975 grep -v '^ *+' conftest.err >conftest.er1
1976 cat conftest.er1 >&5
1977 mv -f conftest.er1 conftest.err
1978 fi
1979 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1980 test $ac_status = 0; } && {
1981 test -z "$ac_c_werror_flag" ||
1982 test ! -s conftest.err
1983 } && test -s conftest$ac_exeext && {
1984 test "$cross_compiling" = yes ||
1985 $as_test_x conftest$ac_exeext
1986 }; then :
1987 ac_retval=0
1988else
1989 $as_echo "$as_me: failed program was:" >&5
1990sed 's/^/| /' conftest.$ac_ext >&5
1991
1992 ac_retval=1
1993fi
1994 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1995 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1996 # interfere with the next link command; also delete a directory that is
1997 # left behind by Apple's compiler. We do this before executing the actions.
1998 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1999 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2000 return $ac_retval
2001
2002} # ac_fn_c_try_link
2003
81ecdfbb
RW
2004# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2005# --------------------------------------------
2006# Tries to find the compile-time value of EXPR in a program that includes
2007# INCLUDES, setting VAR accordingly. Returns whether the value could be
2008# computed
2009ac_fn_c_compute_int ()
2010{
2011 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2012 if test "$cross_compiling" = yes; then
2013 # Depending upon the size, compute the lo and hi bounds.
2014cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2015/* end confdefs.h. */
2016$4
2017int
2018main ()
2019{
2020static int test_array [1 - 2 * !(($2) >= 0)];
2021test_array [0] = 0
bec39cab 2022
81ecdfbb
RW
2023 ;
2024 return 0;
2025}
2026_ACEOF
2027if ac_fn_c_try_compile "$LINENO"; then :
2028 ac_lo=0 ac_mid=0
2029 while :; do
2030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2031/* end confdefs.h. */
2032$4
2033int
2034main ()
2035{
2036static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2037test_array [0] = 0
bec39cab 2038
81ecdfbb
RW
2039 ;
2040 return 0;
2041}
2042_ACEOF
2043if ac_fn_c_try_compile "$LINENO"; then :
2044 ac_hi=$ac_mid; break
2045else
2046 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2047 if test $ac_lo -le $ac_mid; then
2048 ac_lo= ac_hi=
2049 break
2050 fi
2051 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
c906108c 2052fi
81ecdfbb
RW
2053rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2054 done
c906108c 2055else
81ecdfbb
RW
2056 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2057/* end confdefs.h. */
2058$4
2059int
2060main ()
2061{
2062static int test_array [1 - 2 * !(($2) < 0)];
2063test_array [0] = 0
bec39cab 2064
81ecdfbb
RW
2065 ;
2066 return 0;
2067}
2068_ACEOF
2069if ac_fn_c_try_compile "$LINENO"; then :
2070 ac_hi=-1 ac_mid=-1
2071 while :; do
2072 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2073/* end confdefs.h. */
2074$4
2075int
2076main ()
2077{
2078static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2079test_array [0] = 0
bec39cab 2080
81ecdfbb
RW
2081 ;
2082 return 0;
2083}
2084_ACEOF
2085if ac_fn_c_try_compile "$LINENO"; then :
2086 ac_lo=$ac_mid; break
2087else
2088 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2089 if test $ac_mid -le $ac_hi; then
2090 ac_lo= ac_hi=
2091 break
2092 fi
2093 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2094fi
2095rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2096 done
2097else
2098 ac_lo= ac_hi=
2099fi
2100rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2101fi
2102rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2103# Binary search between lo and hi bounds.
2104while test "x$ac_lo" != "x$ac_hi"; do
2105 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2106 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2107/* end confdefs.h. */
2108$4
2109int
2110main ()
2111{
2112static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2113test_array [0] = 0
bec39cab 2114
81ecdfbb
RW
2115 ;
2116 return 0;
2117}
2118_ACEOF
2119if ac_fn_c_try_compile "$LINENO"; then :
2120 ac_hi=$ac_mid
2121else
2122 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2123fi
2124rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2125done
2126case $ac_lo in #((
2127?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2128'') ac_retval=1 ;;
2129esac
2130 else
2131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2132/* end confdefs.h. */
2133$4
2134static long int longval () { return $2; }
2135static unsigned long int ulongval () { return $2; }
2136#include <stdio.h>
2137#include <stdlib.h>
2138int
2139main ()
2140{
bec39cab 2141
81ecdfbb
RW
2142 FILE *f = fopen ("conftest.val", "w");
2143 if (! f)
2144 return 1;
2145 if (($2) < 0)
2146 {
2147 long int i = longval ();
2148 if (i != ($2))
2149 return 1;
2150 fprintf (f, "%ld", i);
2151 }
2152 else
2153 {
2154 unsigned long int i = ulongval ();
2155 if (i != ($2))
2156 return 1;
2157 fprintf (f, "%lu", i);
2158 }
2159 /* Do not output a trailing newline, as this causes \r\n confusion
2160 on some platforms. */
2161 return ferror (f) || fclose (f) != 0;
bec39cab 2162
81ecdfbb
RW
2163 ;
2164 return 0;
2165}
2166_ACEOF
2167if ac_fn_c_try_run "$LINENO"; then :
2168 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2169else
2170 ac_retval=1
2171fi
2172rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2173 conftest.$ac_objext conftest.beam conftest.$ac_ext
2174rm -f conftest.val
bec39cab 2175
81ecdfbb
RW
2176 fi
2177 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2178 return $ac_retval
bec39cab 2179
81ecdfbb 2180} # ac_fn_c_compute_int
bec39cab 2181
55a8c076
YQ
2182# ac_fn_c_check_func LINENO FUNC VAR
2183# ----------------------------------
2184# Tests whether FUNC exists, setting the cache variable VAR accordingly
2185ac_fn_c_check_func ()
81ecdfbb
RW
2186{
2187 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2188 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2189$as_echo_n "checking for $2... " >&6; }
2190if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2191 $as_echo_n "(cached) " >&6
2192else
81ecdfbb
RW
2193 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2194/* end confdefs.h. */
55a8c076
YQ
2195/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2196 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2197#define $2 innocuous_$2
2198
2199/* System header to define __stub macros and hopefully few prototypes,
2200 which can conflict with char $2 (); below.
2201 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2202 <limits.h> exists even on freestanding compilers. */
2203
2204#ifdef __STDC__
2205# include <limits.h>
2206#else
2207# include <assert.h>
2208#endif
2209
2210#undef $2
2211
2212/* Override any GCC internal prototype to avoid an error.
2213 Use char because int might match the return type of a GCC
2214 builtin and then its argument prototype would still apply. */
2215#ifdef __cplusplus
2216extern "C"
2217#endif
2218char $2 ();
2219/* The GNU C library defines this for functions which it implements
2220 to always fail with ENOSYS. Some functions are actually named
2221 something starting with __ and the normal name is an alias. */
2222#if defined __stub_$2 || defined __stub___$2
2223choke me
2224#endif
2225
2226int
2227main ()
2228{
2229return $2 ();
2230 ;
2231 return 0;
2232}
2233_ACEOF
2234if ac_fn_c_try_link "$LINENO"; then :
2235 eval "$3=yes"
2236else
2237 eval "$3=no"
2238fi
2239rm -f core conftest.err conftest.$ac_objext \
2240 conftest$ac_exeext conftest.$ac_ext
2241fi
2242eval ac_res=\$$3
2243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2244$as_echo "$ac_res" >&6; }
2245 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2246
2247} # ac_fn_c_check_func
2248
07697489
PA
2249# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2250# -------------------------------------------
2251# Tests whether TYPE exists after having included INCLUDES, setting cache
2252# variable VAR accordingly.
2253ac_fn_c_check_type ()
2254{
2255 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2257$as_echo_n "checking for $2... " >&6; }
2258if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2259 $as_echo_n "(cached) " >&6
2260else
2261 eval "$3=no"
2262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2263/* end confdefs.h. */
2264$4
2265int
2266main ()
2267{
2268if (sizeof ($2))
2269 return 0;
2270 ;
2271 return 0;
2272}
2273_ACEOF
2274if ac_fn_c_try_compile "$LINENO"; then :
2275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2276/* end confdefs.h. */
2277$4
2278int
2279main ()
2280{
2281if (sizeof (($2)))
2282 return 0;
2283 ;
2284 return 0;
2285}
2286_ACEOF
2287if ac_fn_c_try_compile "$LINENO"; then :
2288
2289else
2290 eval "$3=yes"
2291fi
2292rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2293fi
2294rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2295fi
2296eval ac_res=\$$3
2297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2298$as_echo "$ac_res" >&6; }
2299 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2300
2301} # ac_fn_c_check_type
2302
770d76d7
PA
2303# ac_fn_c_check_decl LINENO SYMBOL VAR
2304# ------------------------------------
2305# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2306ac_fn_c_check_decl ()
2307{
2308 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2309 as_decl_name=`echo $2|sed 's/ *(.*//'`
2310 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2311 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2312$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2313if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2314 $as_echo_n "(cached) " >&6
2315else
2316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2317/* end confdefs.h. */
2318$4
2319int
2320main ()
2321{
2322#ifndef $as_decl_name
2323#ifdef __cplusplus
2324 (void) $as_decl_use;
2325#else
2326 (void) $as_decl_name;
2327#endif
2328#endif
2329
2330 ;
2331 return 0;
2332}
2333_ACEOF
2334if ac_fn_c_try_compile "$LINENO"; then :
2335 eval "$3=yes"
2336else
2337 eval "$3=no"
2338fi
2339rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2340fi
2341eval ac_res=\$$3
2342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2343$as_echo "$ac_res" >&6; }
2344 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2345
2346} # ac_fn_c_check_decl
2347
55a8c076
YQ
2348# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2349# ----------------------------------------------------
2350# Tries to find if the field MEMBER exists in type AGGR, after including
2351# INCLUDES, setting cache variable VAR accordingly.
2352ac_fn_c_check_member ()
2353{
2354 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2355 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2356$as_echo_n "checking for $2.$3... " >&6; }
2357if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
2358 $as_echo_n "(cached) " >&6
2359else
2360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2361/* end confdefs.h. */
2362$5
2363int
2364main ()
2365{
2366static $2 ac_aggr;
2367if (ac_aggr.$3)
2368return 0;
2369 ;
2370 return 0;
2371}
2372_ACEOF
2373if ac_fn_c_try_compile "$LINENO"; then :
2374 eval "$4=yes"
2375else
2376 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2377/* end confdefs.h. */
2378$5
2379int
2380main ()
2381{
2382static $2 ac_aggr;
2383if (sizeof ac_aggr.$3)
2384return 0;
2385 ;
2386 return 0;
2387}
2388_ACEOF
2389if ac_fn_c_try_compile "$LINENO"; then :
2390 eval "$4=yes"
2391else
2392 eval "$4=no"
2393fi
2394rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2395fi
2396rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2397fi
2398eval ac_res=\$$4
2399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2400$as_echo "$ac_res" >&6; }
2401 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2402
2403} # ac_fn_c_check_member
81ecdfbb
RW
2404cat >config.log <<_ACEOF
2405This file contains any messages produced by compilers while
2406running configure, to aid debugging if configure makes a mistake.
d5af19ba 2407
81ecdfbb
RW
2408It was created by $as_me, which was
2409generated by GNU Autoconf 2.64. Invocation command line was
b4e70030 2410
81ecdfbb 2411 $ $0 $@
413ccac7 2412
81ecdfbb
RW
2413_ACEOF
2414exec 5>>config.log
2415{
2416cat <<_ASUNAME
2417## --------- ##
2418## Platform. ##
2419## --------- ##
413ccac7 2420
81ecdfbb
RW
2421hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2422uname -m = `(uname -m) 2>/dev/null || echo unknown`
2423uname -r = `(uname -r) 2>/dev/null || echo unknown`
2424uname -s = `(uname -s) 2>/dev/null || echo unknown`
2425uname -v = `(uname -v) 2>/dev/null || echo unknown`
85981d60 2426
81ecdfbb
RW
2427/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2428/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
413ccac7 2429
81ecdfbb
RW
2430/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2431/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2432/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2433/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2434/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2435/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2436/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
c906108c 2437
81ecdfbb 2438_ASUNAME
bec39cab 2439
bec39cab
AC
2440as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2441for as_dir in $PATH
2442do
2443 IFS=$as_save_IFS
2444 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2445 $as_echo "PATH: $as_dir"
2446 done
2447IFS=$as_save_IFS
bec39cab 2448
81ecdfbb 2449} >&5
bec39cab 2450
81ecdfbb 2451cat >&5 <<_ACEOF
bec39cab 2452
bec39cab 2453
81ecdfbb
RW
2454## ----------- ##
2455## Core tests. ##
2456## ----------- ##
2457
2458_ACEOF
2459
2460
2461# Keep a trace of the command line.
2462# Strip out --no-create and --no-recursion so they do not pile up.
2463# Strip out --silent because we don't want to record it for future runs.
2464# Also quote any args containing shell meta-characters.
2465# Make two passes to allow for proper duplicate-argument suppression.
2466ac_configure_args=
2467ac_configure_args0=
2468ac_configure_args1=
2469ac_must_keep_next=false
2470for ac_pass in 1 2
2471do
2472 for ac_arg
2473 do
2474 case $ac_arg in
2475 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2476 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2477 | -silent | --silent | --silen | --sile | --sil)
2478 continue ;;
2479 *\'*)
2480 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2481 esac
2482 case $ac_pass in
2483 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2484 2)
2485 as_fn_append ac_configure_args1 " '$ac_arg'"
2486 if test $ac_must_keep_next = true; then
2487 ac_must_keep_next=false # Got value, back to normal.
2488 else
2489 case $ac_arg in
2490 *=* | --config-cache | -C | -disable-* | --disable-* \
2491 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2492 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2493 | -with-* | --with-* | -without-* | --without-* | --x)
2494 case "$ac_configure_args0 " in
2495 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2496 esac
2497 ;;
2498 -* ) ac_must_keep_next=true ;;
2499 esac
2500 fi
2501 as_fn_append ac_configure_args " '$ac_arg'"
2502 ;;
2503 esac
2504 done
2505done
2506{ ac_configure_args0=; unset ac_configure_args0;}
2507{ ac_configure_args1=; unset ac_configure_args1;}
2508
2509# When interrupted or exit'd, cleanup temporary files, and complete
2510# config.log. We remove comments because anyway the quotes in there
2511# would cause problems or look ugly.
2512# WARNING: Use '\'' to represent an apostrophe within the trap.
2513# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2514trap 'exit_status=$?
2515 # Save into config.log some information that might help in debugging.
2516 {
2517 echo
2518
2519 cat <<\_ASBOX
2520## ---------------- ##
2521## Cache variables. ##
2522## ---------------- ##
2523_ASBOX
2524 echo
2525 # The following way of writing the cache mishandles newlines in values,
2526(
2527 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2528 eval ac_val=\$$ac_var
2529 case $ac_val in #(
2530 *${as_nl}*)
2531 case $ac_var in #(
2532 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2533$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2534 esac
2535 case $ac_var in #(
2536 _ | IFS | as_nl) ;; #(
2537 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2538 *) { eval $ac_var=; unset $ac_var;} ;;
2539 esac ;;
2540 esac
2541 done
2542 (set) 2>&1 |
2543 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2544 *${as_nl}ac_space=\ *)
2545 sed -n \
2546 "s/'\''/'\''\\\\'\'''\''/g;
2547 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2548 ;; #(
2549 *)
2550 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2551 ;;
2552 esac |
2553 sort
2554)
2555 echo
2556
2557 cat <<\_ASBOX
2558## ----------------- ##
2559## Output variables. ##
2560## ----------------- ##
2561_ASBOX
2562 echo
2563 for ac_var in $ac_subst_vars
2564 do
2565 eval ac_val=\$$ac_var
2566 case $ac_val in
2567 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2568 esac
2569 $as_echo "$ac_var='\''$ac_val'\''"
2570 done | sort
2571 echo
2572
2573 if test -n "$ac_subst_files"; then
2574 cat <<\_ASBOX
2575## ------------------- ##
2576## File substitutions. ##
2577## ------------------- ##
2578_ASBOX
2579 echo
2580 for ac_var in $ac_subst_files
2581 do
2582 eval ac_val=\$$ac_var
2583 case $ac_val in
2584 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2585 esac
2586 $as_echo "$ac_var='\''$ac_val'\''"
2587 done | sort
2588 echo
2589 fi
2590
2591 if test -s confdefs.h; then
2592 cat <<\_ASBOX
2593## ----------- ##
2594## confdefs.h. ##
2595## ----------- ##
2596_ASBOX
2597 echo
2598 cat confdefs.h
2599 echo
2600 fi
2601 test "$ac_signal" != 0 &&
2602 $as_echo "$as_me: caught signal $ac_signal"
2603 $as_echo "$as_me: exit $exit_status"
2604 } >&5
2605 rm -f core *.core core.conftest.* &&
2606 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2607 exit $exit_status
2608' 0
2609for ac_signal in 1 2 13 15; do
2610 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2611done
2612ac_signal=0
2613
2614# confdefs.h avoids OS command line length limits that DEFS can exceed.
2615rm -f -r conftest* confdefs.h
2616
2617$as_echo "/* confdefs.h */" > confdefs.h
2618
2619# Predefined preprocessor variables.
2620
2621cat >>confdefs.h <<_ACEOF
2622#define PACKAGE_NAME "$PACKAGE_NAME"
2623_ACEOF
2624
2625cat >>confdefs.h <<_ACEOF
2626#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2627_ACEOF
2628
2629cat >>confdefs.h <<_ACEOF
2630#define PACKAGE_VERSION "$PACKAGE_VERSION"
2631_ACEOF
2632
2633cat >>confdefs.h <<_ACEOF
2634#define PACKAGE_STRING "$PACKAGE_STRING"
2635_ACEOF
2636
2637cat >>confdefs.h <<_ACEOF
2638#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2639_ACEOF
2640
2641cat >>confdefs.h <<_ACEOF
2642#define PACKAGE_URL "$PACKAGE_URL"
2643_ACEOF
2644
2645
2646# Let the site file select an alternate cache file if it wants to.
2647# Prefer an explicitly selected file to automatically selected ones.
2648ac_site_file1=NONE
2649ac_site_file2=NONE
2650if test -n "$CONFIG_SITE"; then
2651 ac_site_file1=$CONFIG_SITE
2652elif test "x$prefix" != xNONE; then
2653 ac_site_file1=$prefix/share/config.site
2654 ac_site_file2=$prefix/etc/config.site
2655else
2656 ac_site_file1=$ac_default_prefix/share/config.site
2657 ac_site_file2=$ac_default_prefix/etc/config.site
2658fi
2659for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2660do
2661 test "x$ac_site_file" = xNONE && continue
2662 if test -r "$ac_site_file"; then
2663 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2664$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2665 sed 's/^/| /' "$ac_site_file" >&5
2666 . "$ac_site_file"
2667 fi
2668done
2669
2670if test -r "$cache_file"; then
2671 # Some versions of bash will fail to source /dev/null (special
2672 # files actually), so we avoid doing that.
2673 if test -f "$cache_file"; then
2674 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2675$as_echo "$as_me: loading cache $cache_file" >&6;}
2676 case $cache_file in
2677 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2678 *) . "./$cache_file";;
2679 esac
2680 fi
2681else
2682 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2683$as_echo "$as_me: creating cache $cache_file" >&6;}
2684 >$cache_file
bec39cab
AC
2685fi
2686
81ecdfbb
RW
2687# Check that the precious variables saved in the cache have kept the same
2688# value.
2689ac_cache_corrupted=false
2690for ac_var in $ac_precious_vars; do
2691 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2692 eval ac_new_set=\$ac_env_${ac_var}_set
2693 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2694 eval ac_new_val=\$ac_env_${ac_var}_value
2695 case $ac_old_set,$ac_new_set in
2696 set,)
2697 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2698$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2699 ac_cache_corrupted=: ;;
2700 ,set)
2701 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2702$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2703 ac_cache_corrupted=: ;;
2704 ,);;
2705 *)
2706 if test "x$ac_old_val" != "x$ac_new_val"; then
2707 # differences in whitespace do not lead to failure.
2708 ac_old_val_w=`echo x $ac_old_val`
2709 ac_new_val_w=`echo x $ac_new_val`
2710 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2711 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2712$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2713 ac_cache_corrupted=:
2714 else
2715 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2716$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2717 eval $ac_var=\$ac_old_val
2718 fi
2719 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2720$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2721 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2722$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2723 fi;;
2724 esac
2725 # Pass precious variables to config.status.
2726 if test "$ac_new_set" = set; then
2727 case $ac_new_val in
2728 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2729 *) ac_arg=$ac_var=$ac_new_val ;;
2730 esac
2731 case " $ac_configure_args " in
2732 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2733 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2734 esac
2735 fi
2736done
2737if $ac_cache_corrupted; then
2738 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2739$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2740 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2741$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2742 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2743fi
2744## -------------------- ##
2745## Main body of script. ##
2746## -------------------- ##
2747
2748ac_ext=c
2749ac_cpp='$CPP $CPPFLAGS'
2750ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2751ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2752ac_compiler_gnu=$ac_cv_c_compiler_gnu
2753
2754
2755
2756
2757
2758ac_config_headers="$ac_config_headers config.h:config.in"
2759
2760
2761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2762$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2763 # Check whether --enable-maintainer-mode was given.
2764if test "${enable_maintainer_mode+set}" = set; then :
2765 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2766else
2767 USE_MAINTAINER_MODE=no
2768fi
2769
2770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
2771$as_echo "$USE_MAINTAINER_MODE" >&6; }
2772 if test $USE_MAINTAINER_MODE = yes; then
2773 MAINTAINER_MODE_TRUE=
2774 MAINTAINER_MODE_FALSE='#'
2775else
2776 MAINTAINER_MODE_TRUE='#'
2777 MAINTAINER_MODE_FALSE=
2778fi
2779
2780 MAINT=$MAINTAINER_MODE_TRUE
2781
2782
2783
17ef446e 2784# Set the 'development' global.
270c9937 2785. $srcdir/../bfd/development.sh
f5f1cdb6 2786
81ecdfbb
RW
2787ac_ext=c
2788ac_cpp='$CPP $CPPFLAGS'
2789ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2790ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2791ac_compiler_gnu=$ac_cv_c_compiler_gnu
2792if test -n "$ac_tool_prefix"; then
2793 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2794set dummy ${ac_tool_prefix}gcc; ac_word=$2
2795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2796$as_echo_n "checking for $ac_word... " >&6; }
2797if test "${ac_cv_prog_CC+set}" = set; then :
2798 $as_echo_n "(cached) " >&6
c906108c
SS
2799else
2800 if test -n "$CC"; then
2801 ac_cv_prog_CC="$CC" # Let the user override the test.
2802else
bec39cab
AC
2803as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2804for as_dir in $PATH
2805do
2806 IFS=$as_save_IFS
2807 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2808 for ac_exec_ext in '' $ac_executable_extensions; do
2809 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2810 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2811 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2812 break 2
2813 fi
2814done
81ecdfbb
RW
2815 done
2816IFS=$as_save_IFS
bec39cab 2817
c906108c
SS
2818fi
2819fi
bec39cab 2820CC=$ac_cv_prog_CC
c906108c 2821if test -n "$CC"; then
81ecdfbb
RW
2822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2823$as_echo "$CC" >&6; }
c906108c 2824else
81ecdfbb
RW
2825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2826$as_echo "no" >&6; }
c906108c
SS
2827fi
2828
81ecdfbb 2829
b4e70030
JB
2830fi
2831if test -z "$ac_cv_prog_CC"; then
2832 ac_ct_CC=$CC
81ecdfbb
RW
2833 # Extract the first word of "gcc", so it can be a program name with args.
2834set dummy gcc; ac_word=$2
2835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2836$as_echo_n "checking for $ac_word... " >&6; }
2837if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
2838 $as_echo_n "(cached) " >&6
b4e70030
JB
2839else
2840 if test -n "$ac_ct_CC"; then
2841 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2842else
2843as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2844for as_dir in $PATH
2845do
2846 IFS=$as_save_IFS
2847 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2848 for ac_exec_ext in '' $ac_executable_extensions; do
2849 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2850 ac_cv_prog_ac_ct_CC="gcc"
2851 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b4e70030 2852 break 2
4e8d927d 2853 fi
b4e70030 2854done
81ecdfbb
RW
2855 done
2856IFS=$as_save_IFS
b4e70030
JB
2857
2858fi
2859fi
2860ac_ct_CC=$ac_cv_prog_ac_ct_CC
2861if test -n "$ac_ct_CC"; then
81ecdfbb
RW
2862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2863$as_echo "$ac_ct_CC" >&6; }
b4e70030 2864else
81ecdfbb
RW
2865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2866$as_echo "no" >&6; }
b4e70030
JB
2867fi
2868
81ecdfbb
RW
2869 if test "x$ac_ct_CC" = x; then
2870 CC=""
2871 else
2872 case $cross_compiling:$ac_tool_warned in
2873yes:)
2874{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2875$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2876ac_tool_warned=yes ;;
2877esac
2878 CC=$ac_ct_CC
2879 fi
b4e70030
JB
2880else
2881 CC="$ac_cv_prog_CC"
2882fi
2883
c906108c 2884if test -z "$CC"; then
81ecdfbb
RW
2885 if test -n "$ac_tool_prefix"; then
2886 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2887set dummy ${ac_tool_prefix}cc; ac_word=$2
2888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2889$as_echo_n "checking for $ac_word... " >&6; }
2890if test "${ac_cv_prog_CC+set}" = set; then :
2891 $as_echo_n "(cached) " >&6
c906108c
SS
2892else
2893 if test -n "$CC"; then
2894 ac_cv_prog_CC="$CC" # Let the user override the test.
2895else
bec39cab
AC
2896as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2897for as_dir in $PATH
2898do
2899 IFS=$as_save_IFS
2900 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2901 for ac_exec_ext in '' $ac_executable_extensions; do
2902 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2903 ac_cv_prog_CC="${ac_tool_prefix}cc"
2904 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2905 break 2
2906 fi
2907done
81ecdfbb
RW
2908 done
2909IFS=$as_save_IFS
2910
2911fi
2912fi
2913CC=$ac_cv_prog_CC
2914if test -n "$CC"; then
2915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2916$as_echo "$CC" >&6; }
2917else
2918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2919$as_echo "no" >&6; }
2920fi
2921
2922
2923 fi
2924fi
2925if test -z "$CC"; then
2926 # Extract the first word of "cc", so it can be a program name with args.
2927set dummy cc; ac_word=$2
2928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2929$as_echo_n "checking for $ac_word... " >&6; }
2930if test "${ac_cv_prog_CC+set}" = set; then :
2931 $as_echo_n "(cached) " >&6
2932else
2933 if test -n "$CC"; then
2934 ac_cv_prog_CC="$CC" # Let the user override the test.
2935else
2936 ac_prog_rejected=no
2937as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2938for as_dir in $PATH
2939do
2940 IFS=$as_save_IFS
2941 test -z "$as_dir" && as_dir=.
2942 for ac_exec_ext in '' $ac_executable_extensions; do
2943 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2944 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2945 ac_prog_rejected=yes
2946 continue
2947 fi
2948 ac_cv_prog_CC="cc"
2949 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2950 break 2
2951 fi
2952done
2953 done
2954IFS=$as_save_IFS
bec39cab 2955
c906108c
SS
2956if test $ac_prog_rejected = yes; then
2957 # We found a bogon in the path, so make sure we never use it.
2958 set dummy $ac_cv_prog_CC
2959 shift
bec39cab 2960 if test $# != 0; then
c906108c
SS
2961 # We chose a different compiler from the bogus one.
2962 # However, it has the same basename, so the bogon will be chosen
2963 # first if we set CC to just the basename; use the full file name.
2964 shift
bec39cab 2965 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
c906108c
SS
2966 fi
2967fi
2968fi
2969fi
bec39cab 2970CC=$ac_cv_prog_CC
c906108c 2971if test -n "$CC"; then
81ecdfbb
RW
2972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2973$as_echo "$CC" >&6; }
c906108c 2974else
81ecdfbb
RW
2975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2976$as_echo "no" >&6; }
c906108c
SS
2977fi
2978
81ecdfbb 2979
bec39cab
AC
2980fi
2981if test -z "$CC"; then
2982 if test -n "$ac_tool_prefix"; then
81ecdfbb 2983 for ac_prog in cl.exe
bec39cab
AC
2984 do
2985 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2986set dummy $ac_tool_prefix$ac_prog; ac_word=$2
81ecdfbb
RW
2987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2988$as_echo_n "checking for $ac_word... " >&6; }
2989if test "${ac_cv_prog_CC+set}" = set; then :
2990 $as_echo_n "(cached) " >&6
c906108c
SS
2991else
2992 if test -n "$CC"; then
2993 ac_cv_prog_CC="$CC" # Let the user override the test.
2994else
bec39cab
AC
2995as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2996for as_dir in $PATH
2997do
2998 IFS=$as_save_IFS
2999 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
3000 for ac_exec_ext in '' $ac_executable_extensions; do
3001 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 3002 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
81ecdfbb 3003 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
3004 break 2
3005 fi
3006done
81ecdfbb
RW
3007 done
3008IFS=$as_save_IFS
bec39cab 3009
c906108c
SS
3010fi
3011fi
bec39cab 3012CC=$ac_cv_prog_CC
c906108c 3013if test -n "$CC"; then
81ecdfbb
RW
3014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3015$as_echo "$CC" >&6; }
c906108c 3016else
81ecdfbb
RW
3017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3018$as_echo "no" >&6; }
c906108c 3019fi
bec39cab 3020
81ecdfbb 3021
bec39cab
AC
3022 test -n "$CC" && break
3023 done
3024fi
3025if test -z "$CC"; then
3026 ac_ct_CC=$CC
81ecdfbb 3027 for ac_prog in cl.exe
bec39cab
AC
3028do
3029 # Extract the first word of "$ac_prog", so it can be a program name with args.
3030set dummy $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_ac_ct_CC+set}" = set; then :
3034 $as_echo_n "(cached) " >&6
bec39cab
AC
3035else
3036 if test -n "$ac_ct_CC"; then
3037 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3038else
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_ac_ct_CC="$ac_prog"
81ecdfbb 3047 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab 3048 break 2
c906108c 3049 fi
bec39cab 3050done
81ecdfbb
RW
3051 done
3052IFS=$as_save_IFS
bec39cab
AC
3053
3054fi
3055fi
3056ac_ct_CC=$ac_cv_prog_ac_ct_CC
3057if test -n "$ac_ct_CC"; then
81ecdfbb
RW
3058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3059$as_echo "$ac_ct_CC" >&6; }
bec39cab 3060else
81ecdfbb
RW
3061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3062$as_echo "no" >&6; }
c906108c
SS
3063fi
3064
81ecdfbb 3065
bec39cab
AC
3066 test -n "$ac_ct_CC" && break
3067done
c906108c 3068
81ecdfbb
RW
3069 if test "x$ac_ct_CC" = x; then
3070 CC=""
3071 else
3072 case $cross_compiling:$ac_tool_warned in
3073yes:)
3074{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3075$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3076ac_tool_warned=yes ;;
3077esac
3078 CC=$ac_ct_CC
3079 fi
bec39cab
AC
3080fi
3081
3082fi
3083
3084
81ecdfbb
RW
3085test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3086$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3087as_fn_error "no acceptable C compiler found in \$PATH
3088See \`config.log' for more details." "$LINENO" 5; }
bec39cab
AC
3089
3090# Provide some information about the compiler.
81ecdfbb
RW
3091$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3092set X $ac_compile
3093ac_compiler=$2
3094for ac_option in --version -v -V -qversion; do
3095 { { ac_try="$ac_compiler $ac_option >&5"
3096case "(($ac_try" in
3097 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3098 *) ac_try_echo=$ac_try;;
3099esac
3100eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3101$as_echo "$ac_try_echo"; } >&5
3102 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
bec39cab 3103 ac_status=$?
81ecdfbb
RW
3104 if test -s conftest.err; then
3105 sed '10a\
3106... rest of stderr output deleted ...
3107 10q' conftest.err >conftest.er1
3108 cat conftest.er1 >&5
3109 rm -f conftest.er1 conftest.err
3110 fi
3111 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3112 test $ac_status = 0; }
3113done
bec39cab 3114
81ecdfbb 3115cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3116/* end confdefs.h. */
3117
3118int
3119main ()
3120{
3121
3122 ;
3123 return 0;
3124}
3125_ACEOF
3126ac_clean_files_save=$ac_clean_files
81ecdfbb 3127ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out"
bec39cab
AC
3128# Try to create an executable without -o first, disregard a.out.
3129# It will help us diagnose broken compilers, and finding out an intuition
3130# of exeext.
81ecdfbb
RW
3131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3132$as_echo_n "checking for C compiler default output file name... " >&6; }
3133ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3134
3135# The possible output files:
3136ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3137
3138ac_rmfiles=
3139for ac_file in $ac_files
3140do
3141 case $ac_file in
3142 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3143 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3144 esac
3145done
3146rm -f $ac_rmfiles
3147
3148if { { ac_try="$ac_link_default"
3149case "(($ac_try" in
3150 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3151 *) ac_try_echo=$ac_try;;
3152esac
3153eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3154$as_echo "$ac_try_echo"; } >&5
3155 (eval "$ac_link_default") 2>&5
3156 ac_status=$?
3157 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3158 test $ac_status = 0; }; then :
3159 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3160# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3161# in a Makefile. We should not override ac_cv_exeext if it was cached,
3162# so that the user can short-circuit this test for compilers unknown to
3163# Autoconf.
3164for ac_file in $ac_files ''
bec39cab
AC
3165do
3166 test -f "$ac_file" || continue
3167 case $ac_file in
81ecdfbb 3168 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
b4e70030
JB
3169 ;;
3170 [ab].out )
3171 # We found the default executable, but exeext='' is most
3172 # certainly right.
3173 break;;
3174 *.* )
81ecdfbb
RW
3175 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3176 then :; else
3177 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3178 fi
3179 # We set ac_cv_exeext here because the later test for it is not
3180 # safe: cross compilers may not add the suffix if given an `-o'
3181 # argument, so we may need to know it at that point already.
3182 # Even if this section looks crufty: it has the advantage of
3183 # actually working.
b4e70030
JB
3184 break;;
3185 * )
3186 break;;
bec39cab
AC
3187 esac
3188done
81ecdfbb
RW
3189test "$ac_cv_exeext" = no && ac_cv_exeext=
3190
bec39cab 3191else
81ecdfbb
RW
3192 ac_file=''
3193fi
3194{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3195$as_echo "$ac_file" >&6; }
3196if test -z "$ac_file"; then :
3197 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3198sed 's/^/| /' conftest.$ac_ext >&5
3199
81ecdfbb
RW
3200{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3201$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3202{ as_fn_set_status 77
3203as_fn_error "C compiler cannot create executables
3204See \`config.log' for more details." "$LINENO" 5; }; }
bec39cab 3205fi
b4e70030 3206ac_exeext=$ac_cv_exeext
b4e70030 3207
81ecdfbb 3208# Check that the compiler produces executables we can run. If not, either
bec39cab 3209# the compiler is broken, or we cross compile.
81ecdfbb
RW
3210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3211$as_echo_n "checking whether the C compiler works... " >&6; }
bec39cab
AC
3212# If not cross compiling, check that we can run a simple program.
3213if test "$cross_compiling" != yes; then
3214 if { ac_try='./$ac_file'
81ecdfbb
RW
3215 { { case "(($ac_try" in
3216 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3217 *) ac_try_echo=$ac_try;;
3218esac
3219eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3220$as_echo "$ac_try_echo"; } >&5
3221 (eval "$ac_try") 2>&5
bec39cab 3222 ac_status=$?
81ecdfbb
RW
3223 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3224 test $ac_status = 0; }; }; then
bec39cab 3225 cross_compiling=no
c906108c 3226 else
bec39cab
AC
3227 if test "$cross_compiling" = maybe; then
3228 cross_compiling=yes
3229 else
81ecdfbb
RW
3230 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3231$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3232as_fn_error "cannot run C compiled programs.
bec39cab 3233If you meant to cross compile, use \`--host'.
81ecdfbb 3234See \`config.log' for more details." "$LINENO" 5; }
bec39cab 3235 fi
c906108c 3236 fi
bec39cab 3237fi
81ecdfbb
RW
3238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3239$as_echo "yes" >&6; }
bec39cab 3240
81ecdfbb 3241rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out
b4e70030 3242ac_clean_files=$ac_clean_files_save
81ecdfbb 3243# Check that the compiler produces executables we can run. If not, either
b4e70030 3244# the compiler is broken, or we cross compile.
81ecdfbb
RW
3245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3246$as_echo_n "checking whether we are cross compiling... " >&6; }
3247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3248$as_echo "$cross_compiling" >&6; }
3249
3250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3251$as_echo_n "checking for suffix of executables... " >&6; }
3252if { { ac_try="$ac_link"
3253case "(($ac_try" in
3254 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3255 *) ac_try_echo=$ac_try;;
3256esac
3257eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3258$as_echo "$ac_try_echo"; } >&5
3259 (eval "$ac_link") 2>&5
bec39cab 3260 ac_status=$?
81ecdfbb
RW
3261 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3262 test $ac_status = 0; }; then :
b4e70030
JB
3263 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3264# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3265# work properly (i.e., refer to `conftest.exe'), while it won't with
3266# `rm'.
3267for ac_file in conftest.exe conftest conftest.*; do
3268 test -f "$ac_file" || continue
3269 case $ac_file in
81ecdfbb 3270 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
b4e70030 3271 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
b4e70030
JB
3272 break;;
3273 * ) break;;
3274 esac
3275done
c906108c 3276else
81ecdfbb
RW
3277 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3278$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3279as_fn_error "cannot compute suffix of executables: cannot compile and link
3280See \`config.log' for more details." "$LINENO" 5; }
c906108c 3281fi
b4e70030 3282rm -f conftest$ac_cv_exeext
81ecdfbb
RW
3283{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3284$as_echo "$ac_cv_exeext" >&6; }
c906108c 3285
b4e70030 3286rm -f conftest.$ac_ext
bec39cab
AC
3287EXEEXT=$ac_cv_exeext
3288ac_exeext=$EXEEXT
81ecdfbb
RW
3289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3290$as_echo_n "checking for suffix of object files... " >&6; }
3291if test "${ac_cv_objext+set}" = set; then :
3292 $as_echo_n "(cached) " >&6
bec39cab 3293else
81ecdfbb 3294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
3295/* end confdefs.h. */
3296
3297int
3298main ()
3299{
3300
3301 ;
3302 return 0;
3303}
3304_ACEOF
3305rm -f conftest.o conftest.obj
81ecdfbb
RW
3306if { { ac_try="$ac_compile"
3307case "(($ac_try" in
3308 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3309 *) ac_try_echo=$ac_try;;
3310esac
3311eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3312$as_echo "$ac_try_echo"; } >&5
3313 (eval "$ac_compile") 2>&5
3314 ac_status=$?
3315 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3316 test $ac_status = 0; }; then :
3317 for ac_file in conftest.o conftest.obj conftest.*; do
3318 test -f "$ac_file" || continue;
bec39cab 3319 case $ac_file in
81ecdfbb 3320 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
bec39cab
AC
3321 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3322 break;;
3323 esac
3324done
c906108c 3325else
81ecdfbb 3326 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3327sed 's/^/| /' conftest.$ac_ext >&5
3328
81ecdfbb
RW
3329{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3330$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3331as_fn_error "cannot compute suffix of object files: cannot compile
3332See \`config.log' for more details." "$LINENO" 5; }
c906108c 3333fi
b4e70030 3334rm -f conftest.$ac_cv_objext conftest.$ac_ext
bec39cab 3335fi
81ecdfbb
RW
3336{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3337$as_echo "$ac_cv_objext" >&6; }
bec39cab
AC
3338OBJEXT=$ac_cv_objext
3339ac_objext=$OBJEXT
81ecdfbb
RW
3340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3341$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3342if test "${ac_cv_c_compiler_gnu+set}" = set; then :
3343 $as_echo_n "(cached) " >&6
c906108c 3344else
81ecdfbb 3345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3346/* end confdefs.h. */
3347
3348int
3349main ()
3350{
3351#ifndef __GNUC__
3352 choke me
3353#endif
3354
3355 ;
3356 return 0;
3357}
3358_ACEOF
81ecdfbb 3359if ac_fn_c_try_compile "$LINENO"; then :
bec39cab
AC
3360 ac_compiler_gnu=yes
3361else
81ecdfbb 3362 ac_compiler_gnu=no
bec39cab 3363fi
81ecdfbb 3364rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab
AC
3365ac_cv_c_compiler_gnu=$ac_compiler_gnu
3366
3367fi
81ecdfbb
RW
3368{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3369$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3370if test $ac_compiler_gnu = yes; then
3371 GCC=yes
3372else
3373 GCC=
3374fi
bec39cab
AC
3375ac_test_CFLAGS=${CFLAGS+set}
3376ac_save_CFLAGS=$CFLAGS
81ecdfbb
RW
3377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3378$as_echo_n "checking whether $CC accepts -g... " >&6; }
3379if test "${ac_cv_prog_cc_g+set}" = set; then :
3380 $as_echo_n "(cached) " >&6
bec39cab 3381else
81ecdfbb
RW
3382 ac_save_c_werror_flag=$ac_c_werror_flag
3383 ac_c_werror_flag=yes
3384 ac_cv_prog_cc_g=no
3385 CFLAGS="-g"
3386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3387/* end confdefs.h. */
3388
3389int
3390main ()
3391{
3392
3393 ;
3394 return 0;
3395}
3396_ACEOF
81ecdfbb 3397if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
3398 ac_cv_prog_cc_g=yes
3399else
81ecdfbb
RW
3400 CFLAGS=""
3401 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3402/* end confdefs.h. */
3403
3404int
3405main ()
3406{
3407
3408 ;
3409 return 0;
3410}
3411_ACEOF
3412if ac_fn_c_try_compile "$LINENO"; then :
3413
3414else
3415 ac_c_werror_flag=$ac_save_c_werror_flag
3416 CFLAGS="-g"
3417 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3418/* end confdefs.h. */
3419
3420int
3421main ()
3422{
c906108c 3423
81ecdfbb
RW
3424 ;
3425 return 0;
3426}
3427_ACEOF
3428if ac_fn_c_try_compile "$LINENO"; then :
3429 ac_cv_prog_cc_g=yes
3430fi
3431rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3432fi
3433rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4e8d927d 3434fi
81ecdfbb
RW
3435rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3436 ac_c_werror_flag=$ac_save_c_werror_flag
bec39cab 3437fi
81ecdfbb
RW
3438{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3439$as_echo "$ac_cv_prog_cc_g" >&6; }
c906108c 3440if test "$ac_test_CFLAGS" = set; then
bec39cab 3441 CFLAGS=$ac_save_CFLAGS
c906108c
SS
3442elif test $ac_cv_prog_cc_g = yes; then
3443 if test "$GCC" = yes; then
3444 CFLAGS="-g -O2"
3445 else
3446 CFLAGS="-g"
3447 fi
3448else
3449 if test "$GCC" = yes; then
3450 CFLAGS="-O2"
3451 else
3452 CFLAGS=
3453 fi
3454fi
81ecdfbb
RW
3455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3456$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3457if test "${ac_cv_prog_cc_c89+set}" = set; then :
3458 $as_echo_n "(cached) " >&6
bec39cab 3459else
81ecdfbb 3460 ac_cv_prog_cc_c89=no
bec39cab 3461ac_save_CC=$CC
81ecdfbb 3462cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3463/* end confdefs.h. */
c906108c
SS
3464#include <stdarg.h>
3465#include <stdio.h>
3466#include <sys/types.h>
3467#include <sys/stat.h>
3468/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3469struct buf { int x; };
3470FILE * (*rcsopen) (struct buf *, struct stat *, int);
3471static char *e (p, i)
3472 char **p;
3473 int i;
3474{
3475 return p[i];
3476}
3477static char *f (char * (*g) (char **, int), char **p, ...)
3478{
3479 char *s;
3480 va_list v;
3481 va_start (v,p);
3482 s = g (p, va_arg (v,int));
3483 va_end (v);
3484 return s;
3485}
bec39cab
AC
3486
3487/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3488 function prototypes and stuff, but not '\xHH' hex character constants.
3489 These don't provoke an error unfortunately, instead are silently treated
81ecdfbb 3490 as 'x'. The following induces an error, until -std is added to get
bec39cab
AC
3491 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3492 array size at least. It's necessary to write '\x00'==0 to get something
81ecdfbb 3493 that's true only with -std. */
bec39cab
AC
3494int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3495
81ecdfbb
RW
3496/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3497 inside strings and character constants. */
3498#define FOO(x) 'x'
3499int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3500
c906108c
SS
3501int test (int i, double x);
3502struct s1 {int (*f) (int a);};
3503struct s2 {int (*f) (double a);};
3504int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3505int argc;
3506char **argv;
bec39cab
AC
3507int
3508main ()
3509{
c906108c 3510return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
bec39cab
AC
3511 ;
3512 return 0;
3513}
3514_ACEOF
81ecdfbb
RW
3515for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3516 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
bec39cab
AC
3517do
3518 CC="$ac_save_CC $ac_arg"
81ecdfbb
RW
3519 if ac_fn_c_try_compile "$LINENO"; then :
3520 ac_cv_prog_cc_c89=$ac_arg
c906108c 3521fi
81ecdfbb
RW
3522rm -f core conftest.err conftest.$ac_objext
3523 test "x$ac_cv_prog_cc_c89" != "xno" && break
c906108c 3524done
81ecdfbb 3525rm -f conftest.$ac_ext
bec39cab 3526CC=$ac_save_CC
c906108c
SS
3527
3528fi
81ecdfbb
RW
3529# AC_CACHE_VAL
3530case "x$ac_cv_prog_cc_c89" in
3531 x)
3532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3533$as_echo "none needed" >&6; } ;;
3534 xno)
3535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3536$as_echo "unsupported" >&6; } ;;
bec39cab 3537 *)
81ecdfbb
RW
3538 CC="$CC $ac_cv_prog_cc_c89"
3539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3540$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
c906108c 3541esac
81ecdfbb 3542if test "x$ac_cv_prog_cc_c89" != xno; then :
c906108c 3543
b4e70030
JB
3544fi
3545
bec39cab
AC
3546ac_ext=c
3547ac_cpp='$CPP $CPPFLAGS'
3548ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3549ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3550ac_compiler_gnu=$ac_cv_c_compiler_gnu
c906108c 3551
3bc3d82a
PA
3552ac_ext=cpp
3553ac_cpp='$CXXCPP $CPPFLAGS'
3554ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3555ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3556ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3557if test -z "$CXX"; then
3558 if test -n "$CCC"; then
3559 CXX=$CCC
3560 else
3561 if test -n "$ac_tool_prefix"; then
3562 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3563 do
3564 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3565set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3567$as_echo_n "checking for $ac_word... " >&6; }
3568if test "${ac_cv_prog_CXX+set}" = set; then :
3569 $as_echo_n "(cached) " >&6
3570else
3571 if test -n "$CXX"; then
3572 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3573else
3574as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3575for as_dir in $PATH
3576do
3577 IFS=$as_save_IFS
3578 test -z "$as_dir" && as_dir=.
3579 for ac_exec_ext in '' $ac_executable_extensions; do
3580 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3581 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3582 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3583 break 2
3584 fi
3585done
3586 done
3587IFS=$as_save_IFS
3588
3589fi
3590fi
3591CXX=$ac_cv_prog_CXX
3592if test -n "$CXX"; then
3593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
3594$as_echo "$CXX" >&6; }
3595else
3596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3597$as_echo "no" >&6; }
3598fi
3599
3600
3601 test -n "$CXX" && break
3602 done
3603fi
3604if test -z "$CXX"; then
3605 ac_ct_CXX=$CXX
3606 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3607do
3608 # Extract the first word of "$ac_prog", so it can be a program name with args.
3609set dummy $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_ac_ct_CXX+set}" = set; then :
3613 $as_echo_n "(cached) " >&6
3614else
3615 if test -n "$ac_ct_CXX"; then
3616 ac_cv_prog_ac_ct_CXX="$ac_ct_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_ac_ct_CXX="$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
3635ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3636if test -n "$ac_ct_CXX"; then
3637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
3638$as_echo "$ac_ct_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 "$ac_ct_CXX" && break
3646done
3647
3648 if test "x$ac_ct_CXX" = x; then
3649 CXX="g++"
3650 else
3651 case $cross_compiling:$ac_tool_warned in
3652yes:)
3653{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3654$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3655ac_tool_warned=yes ;;
3656esac
3657 CXX=$ac_ct_CXX
3658 fi
3659fi
3660
3661 fi
3662fi
3663# Provide some information about the compiler.
3664$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
3665set X $ac_compile
3666ac_compiler=$2
3667for ac_option in --version -v -V -qversion; do
3668 { { ac_try="$ac_compiler $ac_option >&5"
3669case "(($ac_try" in
3670 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3671 *) ac_try_echo=$ac_try;;
3672esac
3673eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3674$as_echo "$ac_try_echo"; } >&5
3675 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3676 ac_status=$?
3677 if test -s conftest.err; then
3678 sed '10a\
3679... rest of stderr output deleted ...
3680 10q' conftest.err >conftest.er1
3681 cat conftest.er1 >&5
3682 rm -f conftest.er1 conftest.err
3683 fi
3684 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3685 test $ac_status = 0; }
3686done
3687
3688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
3689$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
3690if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
3691 $as_echo_n "(cached) " >&6
3692else
3693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3694/* end confdefs.h. */
3695
3696int
3697main ()
3698{
3699#ifndef __GNUC__
3700 choke me
3701#endif
3702
3703 ;
3704 return 0;
3705}
3706_ACEOF
3707if ac_fn_cxx_try_compile "$LINENO"; then :
3708 ac_compiler_gnu=yes
3709else
3710 ac_compiler_gnu=no
3711fi
3712rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3713ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3714
3715fi
3716{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
3717$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
3718if test $ac_compiler_gnu = yes; then
3719 GXX=yes
3720else
3721 GXX=
3722fi
3723ac_test_CXXFLAGS=${CXXFLAGS+set}
3724ac_save_CXXFLAGS=$CXXFLAGS
3725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
3726$as_echo_n "checking whether $CXX accepts -g... " >&6; }
3727if test "${ac_cv_prog_cxx_g+set}" = set; then :
3728 $as_echo_n "(cached) " >&6
3729else
3730 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
3731 ac_cxx_werror_flag=yes
3732 ac_cv_prog_cxx_g=no
3733 CXXFLAGS="-g"
3734 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3735/* end confdefs.h. */
3736
3737int
3738main ()
3739{
3740
3741 ;
3742 return 0;
3743}
3744_ACEOF
3745if ac_fn_cxx_try_compile "$LINENO"; then :
3746 ac_cv_prog_cxx_g=yes
3747else
3748 CXXFLAGS=""
3749 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3750/* end confdefs.h. */
3751
3752int
3753main ()
3754{
3755
3756 ;
3757 return 0;
3758}
3759_ACEOF
3760if ac_fn_cxx_try_compile "$LINENO"; then :
3761
3762else
3763 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3764 CXXFLAGS="-g"
3765 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3766/* end confdefs.h. */
3767
3768int
3769main ()
3770{
3771
3772 ;
3773 return 0;
3774}
3775_ACEOF
3776if ac_fn_cxx_try_compile "$LINENO"; then :
3777 ac_cv_prog_cxx_g=yes
3778fi
3779rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3780fi
3781rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3782fi
3783rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3784 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3785fi
3786{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
3787$as_echo "$ac_cv_prog_cxx_g" >&6; }
3788if test "$ac_test_CXXFLAGS" = set; then
3789 CXXFLAGS=$ac_save_CXXFLAGS
3790elif test $ac_cv_prog_cxx_g = yes; then
3791 if test "$GXX" = yes; then
3792 CXXFLAGS="-g -O2"
3793 else
3794 CXXFLAGS="-g"
3795 fi
3796else
3797 if test "$GXX" = yes; then
3798 CXXFLAGS="-O2"
3799 else
3800 CXXFLAGS=
3801 fi
3802fi
3803ac_ext=c
3804ac_cpp='$CPP $CPPFLAGS'
3805ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3806ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3807ac_compiler_gnu=$ac_cv_c_compiler_gnu
3808
3809
60ca704f 3810
bec39cab
AC
3811ac_ext=c
3812ac_cpp='$CPP $CPPFLAGS'
3813ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3814ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3815ac_compiler_gnu=$ac_cv_c_compiler_gnu
81ecdfbb
RW
3816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3817$as_echo_n "checking how to run the C preprocessor... " >&6; }
bec39cab
AC
3818# On Suns, sometimes $CPP names a directory.
3819if test -n "$CPP" && test -d "$CPP"; then
3820 CPP=
8bb2c122 3821fi
bec39cab 3822if test -z "$CPP"; then
81ecdfbb
RW
3823 if test "${ac_cv_prog_CPP+set}" = set; then :
3824 $as_echo_n "(cached) " >&6
bec39cab
AC
3825else
3826 # Double quotes because CPP needs to be expanded
3827 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3828 do
3829 ac_preproc_ok=false
3830for ac_c_preproc_warn_flag in '' yes
3831do
3832 # Use a header file that comes with gcc, so configuring glibc
3833 # with a fresh cross-compiler works.
3834 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3835 # <limits.h> exists even on freestanding compilers.
3836 # On the NeXT, cc -E runs the code through the compiler's parser,
3837 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3839/* end confdefs.h. */
3840#ifdef __STDC__
3841# include <limits.h>
3842#else
3843# include <assert.h>
3844#endif
3845 Syntax error
3846_ACEOF
81ecdfbb 3847if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3848
81ecdfbb 3849else
bec39cab
AC
3850 # Broken: fails on valid input.
3851continue
3852fi
3853rm -f conftest.err conftest.$ac_ext
3854
81ecdfbb 3855 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3856 # can be detected and how.
81ecdfbb 3857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3858/* end confdefs.h. */
3859#include <ac_nonexistent.h>
3860_ACEOF
81ecdfbb 3861if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3862 # Broken: success on invalid input.
3863continue
8bb2c122 3864else
bec39cab
AC
3865 # Passes both tests.
3866ac_preproc_ok=:
3867break
8bb2c122 3868fi
bec39cab 3869rm -f conftest.err conftest.$ac_ext
8bb2c122 3870
bec39cab
AC
3871done
3872# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3873rm -f conftest.err conftest.$ac_ext
81ecdfbb 3874if $ac_preproc_ok; then :
bec39cab
AC
3875 break
3876fi
8bb2c122 3877
bec39cab
AC
3878 done
3879 ac_cv_prog_CPP=$CPP
ddc9cd0f 3880
c906108c 3881fi
bec39cab
AC
3882 CPP=$ac_cv_prog_CPP
3883else
3884 ac_cv_prog_CPP=$CPP
c906108c 3885fi
81ecdfbb
RW
3886{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3887$as_echo "$CPP" >&6; }
bec39cab
AC
3888ac_preproc_ok=false
3889for ac_c_preproc_warn_flag in '' yes
3890do
3891 # Use a header file that comes with gcc, so configuring glibc
3892 # with a fresh cross-compiler works.
3893 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3894 # <limits.h> exists even on freestanding compilers.
3895 # On the NeXT, cc -E runs the code through the compiler's parser,
3896 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3898/* end confdefs.h. */
3899#ifdef __STDC__
3900# include <limits.h>
3901#else
3902# include <assert.h>
3903#endif
3904 Syntax error
3905_ACEOF
81ecdfbb 3906if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3907
81ecdfbb 3908else
bec39cab
AC
3909 # Broken: fails on valid input.
3910continue
3911fi
3912rm -f conftest.err conftest.$ac_ext
3913
81ecdfbb 3914 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3915 # can be detected and how.
81ecdfbb 3916 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3917/* end confdefs.h. */
3918#include <ac_nonexistent.h>
3919_ACEOF
81ecdfbb 3920if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3921 # Broken: success on invalid input.
3922continue
c906108c 3923else
bec39cab
AC
3924 # Passes both tests.
3925ac_preproc_ok=:
3926break
c906108c 3927fi
bec39cab 3928rm -f conftest.err conftest.$ac_ext
c906108c 3929
bec39cab
AC
3930done
3931# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3932rm -f conftest.err conftest.$ac_ext
81ecdfbb
RW
3933if $ac_preproc_ok; then :
3934
c906108c 3935else
81ecdfbb
RW
3936 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3937$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3938as_fn_error "C preprocessor \"$CPP\" fails sanity check
3939See \`config.log' for more details." "$LINENO" 5; }
c906108c 3940fi
c906108c 3941
bec39cab
AC
3942ac_ext=c
3943ac_cpp='$CPP $CPPFLAGS'
3944ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3945ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3946ac_compiler_gnu=$ac_cv_c_compiler_gnu
3947
3948
81ecdfbb
RW
3949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3950$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3951if test "${ac_cv_path_GREP+set}" = set; then :
3952 $as_echo_n "(cached) " >&6
4e8d927d 3953else
81ecdfbb
RW
3954 if test -z "$GREP"; then
3955 ac_path_GREP_found=false
3956 # Loop through the user's path and test for each of PROGNAME-LIST
3957 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3958for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3959do
3960 IFS=$as_save_IFS
3961 test -z "$as_dir" && as_dir=.
3962 for ac_prog in grep ggrep; do
3963 for ac_exec_ext in '' $ac_executable_extensions; do
3964 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3965 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3966# Check for GNU ac_path_GREP and select it if it is found.
3967 # Check for GNU $ac_path_GREP
3968case `"$ac_path_GREP" --version 2>&1` in
3969*GNU*)
3970 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3971*)
3972 ac_count=0
3973 $as_echo_n 0123456789 >"conftest.in"
3974 while :
3975 do
3976 cat "conftest.in" "conftest.in" >"conftest.tmp"
3977 mv "conftest.tmp" "conftest.in"
3978 cp "conftest.in" "conftest.nl"
3979 $as_echo 'GREP' >> "conftest.nl"
3980 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3981 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3982 as_fn_arith $ac_count + 1 && ac_count=$as_val
3983 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3984 # Best one so far, save it but keep looking for a better one
3985 ac_cv_path_GREP="$ac_path_GREP"
3986 ac_path_GREP_max=$ac_count
bec39cab 3987 fi
81ecdfbb
RW
3988 # 10*(2^10) chars as input seems more than enough
3989 test $ac_count -gt 10 && break
3990 done
3991 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3992esac
bec39cab 3993
81ecdfbb
RW
3994 $ac_path_GREP_found && break 3
3995 done
3996 done
3997 done
3998IFS=$as_save_IFS
3999 if test -z "$ac_cv_path_GREP"; then
4000 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4001 fi
c906108c 4002else
81ecdfbb 4003 ac_cv_path_GREP=$GREP
c906108c 4004fi
c906108c 4005
81ecdfbb
RW
4006fi
4007{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4008$as_echo "$ac_cv_path_GREP" >&6; }
4009 GREP="$ac_cv_path_GREP"
c906108c 4010
c906108c 4011
81ecdfbb
RW
4012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4013$as_echo_n "checking for egrep... " >&6; }
4014if test "${ac_cv_path_EGREP+set}" = set; then :
4015 $as_echo_n "(cached) " >&6
783e057b 4016else
81ecdfbb
RW
4017 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4018 then ac_cv_path_EGREP="$GREP -E"
4019 else
4020 if test -z "$EGREP"; then
4021 ac_path_EGREP_found=false
4022 # Loop through the user's path and test for each of PROGNAME-LIST
4023 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4024for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
783e057b
DJ
4025do
4026 IFS=$as_save_IFS
4027 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
4028 for ac_prog in egrep; do
4029 for ac_exec_ext in '' $ac_executable_extensions; do
4030 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4031 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4032# Check for GNU ac_path_EGREP and select it if it is found.
4033 # Check for GNU $ac_path_EGREP
4034case `"$ac_path_EGREP" --version 2>&1` in
4035*GNU*)
4036 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4037*)
4038 ac_count=0
4039 $as_echo_n 0123456789 >"conftest.in"
4040 while :
4041 do
4042 cat "conftest.in" "conftest.in" >"conftest.tmp"
4043 mv "conftest.tmp" "conftest.in"
4044 cp "conftest.in" "conftest.nl"
4045 $as_echo 'EGREP' >> "conftest.nl"
4046 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4047 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4048 as_fn_arith $ac_count + 1 && ac_count=$as_val
4049 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4050 # Best one so far, save it but keep looking for a better one
4051 ac_cv_path_EGREP="$ac_path_EGREP"
4052 ac_path_EGREP_max=$ac_count
4053 fi
4054 # 10*(2^10) chars as input seems more than enough
4055 test $ac_count -gt 10 && break
4056 done
4057 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4058esac
bec39cab 4059
81ecdfbb
RW
4060 $ac_path_EGREP_found && break 3
4061 done
4062 done
4063 done
4064IFS=$as_save_IFS
4065 if test -z "$ac_cv_path_EGREP"; then
4066 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
783e057b 4067 fi
783e057b 4068else
81ecdfbb 4069 ac_cv_path_EGREP=$EGREP
783e057b
DJ
4070fi
4071
81ecdfbb 4072 fi
783e057b 4073fi
81ecdfbb
RW
4074{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4075$as_echo "$ac_cv_path_EGREP" >&6; }
4076 EGREP="$ac_cv_path_EGREP"
4077
783e057b 4078
81ecdfbb
RW
4079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4080$as_echo_n "checking for ANSI C header files... " >&6; }
4081if test "${ac_cv_header_stdc+set}" = set; then :
4082 $as_echo_n "(cached) " >&6
783e057b 4083else
81ecdfbb 4084 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 4085/* end confdefs.h. */
783e057b 4086#include <stdlib.h>
bec39cab 4087#include <stdarg.h>
783e057b
DJ
4088#include <string.h>
4089#include <float.h>
c906108c 4090
bec39cab
AC
4091int
4092main ()
4093{
c906108c 4094
bec39cab
AC
4095 ;
4096 return 0;
4097}
4098_ACEOF
81ecdfbb 4099if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4100 ac_cv_header_stdc=yes
c906108c 4101else
81ecdfbb 4102 ac_cv_header_stdc=no
c906108c 4103fi
81ecdfbb 4104rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 4105
783e057b
DJ
4106if test $ac_cv_header_stdc = yes; then
4107 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
81ecdfbb 4108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4109/* end confdefs.h. */
4110#include <string.h>
c906108c 4111
783e057b
DJ
4112_ACEOF
4113if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4114 $EGREP "memchr" >/dev/null 2>&1; then :
4115
c906108c 4116else
783e057b 4117 ac_cv_header_stdc=no
c906108c 4118fi
783e057b 4119rm -f conftest*
c906108c
SS
4120
4121fi
4122
783e057b
DJ
4123if test $ac_cv_header_stdc = yes; then
4124 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
81ecdfbb 4125 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4126/* end confdefs.h. */
4127#include <stdlib.h>
bec39cab 4128
783e057b
DJ
4129_ACEOF
4130if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4131 $EGREP "free" >/dev/null 2>&1; then :
4132
bec39cab 4133else
783e057b 4134 ac_cv_header_stdc=no
bec39cab 4135fi
783e057b 4136rm -f conftest*
bec39cab
AC
4137
4138fi
bec39cab 4139
783e057b
DJ
4140if test $ac_cv_header_stdc = yes; then
4141 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
81ecdfbb 4142 if test "$cross_compiling" = yes; then :
783e057b 4143 :
bec39cab 4144else
81ecdfbb 4145 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4146/* end confdefs.h. */
4147#include <ctype.h>
81ecdfbb 4148#include <stdlib.h>
783e057b
DJ
4149#if ((' ' & 0x0FF) == 0x020)
4150# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4151# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4152#else
4153# define ISLOWER(c) \
4154 (('a' <= (c) && (c) <= 'i') \
4155 || ('j' <= (c) && (c) <= 'r') \
4156 || ('s' <= (c) && (c) <= 'z'))
4157# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4158#endif
4159
4160#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4161int
4162main ()
4163{
4164 int i;
4165 for (i = 0; i < 256; i++)
4166 if (XOR (islower (i), ISLOWER (i))
4167 || toupper (i) != TOUPPER (i))
81ecdfbb
RW
4168 return 2;
4169 return 0;
783e057b
DJ
4170}
4171_ACEOF
81ecdfbb 4172if ac_fn_c_try_run "$LINENO"; then :
783e057b 4173
81ecdfbb
RW
4174else
4175 ac_cv_header_stdc=no
783e057b 4176fi
81ecdfbb
RW
4177rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4178 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 4179fi
81ecdfbb 4180
783e057b
DJ
4181fi
4182fi
81ecdfbb
RW
4183{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4184$as_echo "$ac_cv_header_stdc" >&6; }
783e057b
DJ
4185if test $ac_cv_header_stdc = yes; then
4186
81ecdfbb 4187$as_echo "#define STDC_HEADERS 1" >>confdefs.h
783e057b
DJ
4188
4189fi
4190
4191# On IRIX 5.3, sys/types and inttypes.h are conflicting.
783e057b
DJ
4192for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4193 inttypes.h stdint.h unistd.h
81ecdfbb
RW
4194do :
4195 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4196ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4197"
4198eval as_val=\$$as_ac_Header
4199 if test "x$as_val" = x""yes; then :
783e057b 4200 cat >>confdefs.h <<_ACEOF
81ecdfbb 4201#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
783e057b
DJ
4202_ACEOF
4203
4204fi
4205
4206done
4207
4208
4209
81ecdfbb
RW
4210 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4211if test "x$ac_cv_header_minix_config_h" = x""yes; then :
783e057b
DJ
4212 MINIX=yes
4213else
4214 MINIX=
4215fi
4216
4217
4218 if test "$MINIX" = yes; then
4219
81ecdfbb 4220$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
783e057b
DJ
4221
4222
81ecdfbb 4223$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
783e057b
DJ
4224
4225
81ecdfbb 4226$as_echo "#define _MINIX 1" >>confdefs.h
783e057b
DJ
4227
4228 fi
4229
4230
81ecdfbb
RW
4231 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4232$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4233if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
4234 $as_echo_n "(cached) " >&6
783e057b 4235else
81ecdfbb 4236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4237/* end confdefs.h. */
4238
c971b7fa
PA
4239# define __EXTENSIONS__ 1
4240 $ac_includes_default
783e057b
DJ
4241int
4242main ()
4243{
4244
4245 ;
4246 return 0;
4247}
4248_ACEOF
81ecdfbb 4249if ac_fn_c_try_compile "$LINENO"; then :
783e057b
DJ
4250 ac_cv_safe_to_define___extensions__=yes
4251else
81ecdfbb 4252 ac_cv_safe_to_define___extensions__=no
783e057b 4253fi
81ecdfbb 4254rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b 4255fi
81ecdfbb
RW
4256{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4257$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
783e057b 4258 test $ac_cv_safe_to_define___extensions__ = yes &&
81ecdfbb 4259 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
783e057b 4260
81ecdfbb 4261 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
783e057b 4262
81ecdfbb 4263 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
783e057b 4264
81ecdfbb 4265 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
783e057b 4266
81ecdfbb 4267 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
783e057b
DJ
4268
4269
c971b7fa
PA
4270ac_aux_dir=
4271for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4272 for ac_t in install-sh install.sh shtool; do
4273 if test -f "$ac_dir/$ac_t"; then
4274 ac_aux_dir=$ac_dir
4275 ac_install_sh="$ac_aux_dir/$ac_t -c"
4276 break 2
4277 fi
4278 done
4279done
4280if test -z "$ac_aux_dir"; then
4281 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
4282fi
770d76d7 4283
c971b7fa
PA
4284# These three variables are undocumented and unsupported,
4285# and are intended to be withdrawn in a future Autoconf release.
4286# They can cause serious problems if a builder's source tree is in a directory
4287# whose full name contains unusual characters.
4288ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4289ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4290ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
770d76d7 4291
770d76d7 4292
c971b7fa
PA
4293# Make sure we can run config.sub.
4294$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
4295 as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
770d76d7 4296
c971b7fa
PA
4297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4298$as_echo_n "checking build system type... " >&6; }
4299if test "${ac_cv_build+set}" = set; then :
4300 $as_echo_n "(cached) " >&6
770d76d7 4301else
c971b7fa
PA
4302 ac_build_alias=$build_alias
4303test "x$ac_build_alias" = x &&
4304 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4305test "x$ac_build_alias" = x &&
4306 as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
4307ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
4308 as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
4309
770d76d7 4310fi
c971b7fa
PA
4311{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4312$as_echo "$ac_cv_build" >&6; }
4313case $ac_cv_build in
4314*-*-*) ;;
4315*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
770d76d7 4316esac
c971b7fa
PA
4317build=$ac_cv_build
4318ac_save_IFS=$IFS; IFS='-'
4319set x $ac_cv_build
4320shift
4321build_cpu=$1
4322build_vendor=$2
4323shift; shift
4324# Remember, the first character of IFS is used to create $*,
4325# except with old shells:
4326build_os=$*
4327IFS=$ac_save_IFS
4328case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
770d76d7
PA
4329
4330
c971b7fa
PA
4331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4332$as_echo_n "checking host system type... " >&6; }
4333if test "${ac_cv_host+set}" = set; then :
81ecdfbb
RW
4334 $as_echo_n "(cached) " >&6
4335else
c971b7fa
PA
4336 if test "x$host_alias" = x; then
4337 ac_cv_host=$ac_cv_build
81ecdfbb 4338else
c971b7fa
PA
4339 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
4340 as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
81ecdfbb 4341fi
81ecdfbb
RW
4342
4343fi
c971b7fa
PA
4344{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4345$as_echo "$ac_cv_host" >&6; }
4346case $ac_cv_host in
4347*-*-*) ;;
4348*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
81ecdfbb 4349esac
c971b7fa
PA
4350host=$ac_cv_host
4351ac_save_IFS=$IFS; IFS='-'
4352set x $ac_cv_host
4353shift
4354host_cpu=$1
4355host_vendor=$2
4356shift; shift
4357# Remember, the first character of IFS is used to create $*,
4358# except with old shells:
4359host_os=$*
4360IFS=$ac_save_IFS
4361case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3388710e
JM
4362
4363
4364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4365$as_echo_n "checking target system type... " >&6; }
4366if test "${ac_cv_target+set}" = set; then :
4367 $as_echo_n "(cached) " >&6
4368else
4369 if test "x$target_alias" = x; then
4370 ac_cv_target=$ac_cv_host
4371else
4372 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
4373 as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
4374fi
4375
4376fi
4377{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4378$as_echo "$ac_cv_target" >&6; }
4379case $ac_cv_target in
4380*-*-*) ;;
4381*) as_fn_error "invalid value of canonical target" "$LINENO" 5;;
4382esac
4383target=$ac_cv_target
4384ac_save_IFS=$IFS; IFS='-'
4385set x $ac_cv_target
4386shift
4387target_cpu=$1
4388target_vendor=$2
4389shift; shift
4390# Remember, the first character of IFS is used to create $*,
4391# except with old shells:
4392target_os=$*
4393IFS=$ac_save_IFS
4394case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4395
4396
4397# The aliases save the names the user supplied, while $host etc.
4398# will get canonicalized.
4399test -n "$target_alias" &&
4400 test "$program_prefix$program_suffix$program_transform_name" = \
4401 NONENONEs,x,x, &&
4402 program_prefix=${target_alias}-
4403
4404# The tests for host and target for $enable_largefile require
4405# canonical names.
4406
4407
81ecdfbb 4408
da2f07f1
JK
4409# As the $enable_largefile decision depends on --enable-plugins we must set it
4410# even in directories otherwise not depending on the $plugins option.
4411
4412
2974be62
AM
4413 maybe_plugins=no
4414 for ac_header in dlfcn.h
4415do :
4416 ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
4417"
4418if test "x$ac_cv_header_dlfcn_h" = x""yes; then :
4419 cat >>confdefs.h <<_ACEOF
4420#define HAVE_DLFCN_H 1
4421_ACEOF
4422 maybe_plugins=yes
4423fi
4424
4425done
4426
4427 for ac_header in windows.h
4428do :
4429 ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
4430"
4431if test "x$ac_cv_header_windows_h" = x""yes; then :
4432 cat >>confdefs.h <<_ACEOF
4433#define HAVE_WINDOWS_H 1
4434_ACEOF
4435 maybe_plugins=yes
4436fi
4437
4438done
4439
4440
4441 # Check whether --enable-plugins was given.
da2f07f1
JK
4442if test "${enable_plugins+set}" = set; then :
4443 enableval=$enable_plugins; case "${enableval}" in
2974be62
AM
4444 no) plugins=no ;;
4445 *) plugins=yes
4446 if test "$maybe_plugins" != "yes" ; then
4447 as_fn_error "Building with plugin support requires a host that supports dlopen." "$LINENO" 5
4448 fi ;;
4449 esac
da2f07f1 4450else
2974be62
AM
4451 plugins=$maybe_plugins
4452
da2f07f1
JK
4453fi
4454
2974be62
AM
4455 if test "$plugins" = "yes"; then
4456 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
4457$as_echo_n "checking for library containing dlopen... " >&6; }
4458if test "${ac_cv_search_dlopen+set}" = set; then :
4459 $as_echo_n "(cached) " >&6
4460else
4461 ac_func_search_save_LIBS=$LIBS
4462cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4463/* end confdefs.h. */
4464
4465/* Override any GCC internal prototype to avoid an error.
4466 Use char because int might match the return type of a GCC
4467 builtin and then its argument prototype would still apply. */
4468#ifdef __cplusplus
4469extern "C"
4470#endif
4471char dlopen ();
4472int
4473main ()
4474{
4475return dlopen ();
4476 ;
4477 return 0;
4478}
4479_ACEOF
4480for ac_lib in '' dl; do
4481 if test -z "$ac_lib"; then
4482 ac_res="none required"
4483 else
4484 ac_res=-l$ac_lib
4485 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4486 fi
4487 if ac_fn_c_try_link "$LINENO"; then :
4488 ac_cv_search_dlopen=$ac_res
4489fi
4490rm -f core conftest.err conftest.$ac_objext \
4491 conftest$ac_exeext
4492 if test "${ac_cv_search_dlopen+set}" = set; then :
4493 break
4494fi
4495done
4496if test "${ac_cv_search_dlopen+set}" = set; then :
4497
4498else
4499 ac_cv_search_dlopen=no
4500fi
4501rm conftest.$ac_ext
4502LIBS=$ac_func_search_save_LIBS
4503fi
4504{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
4505$as_echo "$ac_cv_search_dlopen" >&6; }
4506ac_res=$ac_cv_search_dlopen
4507if test "$ac_res" != no; then :
4508 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4509
4510fi
4511
4512 fi
da2f07f1
JK
4513
4514
4515case "${host}" in
4516 sparc-*-solaris*|i[3-7]86-*-solaris*)
4517 # On native 32bit sparc and ia32 solaris, large-file and procfs support
4518 # are mutually exclusive; and without procfs support, the bfd/ elf module
4519 # cannot provide certain routines such as elfcore_write_prpsinfo
4520 # or elfcore_write_prstatus. So unless the user explicitly requested
4521 # large-file support through the --enable-largefile switch, disable
4522 # large-file support in favor of procfs support.
4523 test "${target}" = "${host}" -a "x$plugins" = xno \
4524 && : ${enable_largefile="no"}
4525 ;;
4526esac
4527
4528# Check whether --enable-largefile was given.
4529if test "${enable_largefile+set}" = set; then :
4530 enableval=$enable_largefile;
4531fi
4532
4533if test "$enable_largefile" != no; then
4534
4535 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4536$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
4537if test "${ac_cv_sys_largefile_CC+set}" = set; then :
4538 $as_echo_n "(cached) " >&6
4539else
4540 ac_cv_sys_largefile_CC=no
4541 if test "$GCC" != yes; then
4542 ac_save_CC=$CC
4543 while :; do
4544 # IRIX 6.2 and later do not support large files by default,
4545 # so use the C compiler's -n32 option if that helps.
4546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4547/* end confdefs.h. */
4548#include <sys/types.h>
4549 /* Check that off_t can represent 2**63 - 1 correctly.
4550 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4551 since some C++ compilers masquerading as C compilers
4552 incorrectly reject 9223372036854775807. */
4553#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4554 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4555 && LARGE_OFF_T % 2147483647 == 1)
4556 ? 1 : -1];
4557int
4558main ()
4559{
4560
4561 ;
4562 return 0;
4563}
4564_ACEOF
4565 if ac_fn_c_try_compile "$LINENO"; then :
4566 break
4567fi
4568rm -f core conftest.err conftest.$ac_objext
4569 CC="$CC -n32"
4570 if ac_fn_c_try_compile "$LINENO"; then :
4571 ac_cv_sys_largefile_CC=' -n32'; break
4572fi
4573rm -f core conftest.err conftest.$ac_objext
4574 break
4575 done
4576 CC=$ac_save_CC
4577 rm -f conftest.$ac_ext
4578 fi
4579fi
4580{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4581$as_echo "$ac_cv_sys_largefile_CC" >&6; }
4582 if test "$ac_cv_sys_largefile_CC" != no; then
4583 CC=$CC$ac_cv_sys_largefile_CC
4584 fi
4585
4586 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4587$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
4588if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
4589 $as_echo_n "(cached) " >&6
4590else
4591 while :; do
4592 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4593/* end confdefs.h. */
4594#include <sys/types.h>
4595 /* Check that off_t can represent 2**63 - 1 correctly.
4596 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4597 since some C++ compilers masquerading as C compilers
4598 incorrectly reject 9223372036854775807. */
4599#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4600 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4601 && LARGE_OFF_T % 2147483647 == 1)
4602 ? 1 : -1];
4603int
4604main ()
4605{
4606
4607 ;
4608 return 0;
4609}
4610_ACEOF
4611if ac_fn_c_try_compile "$LINENO"; then :
4612 ac_cv_sys_file_offset_bits=no; break
4613fi
4614rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4615 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4616/* end confdefs.h. */
4617#define _FILE_OFFSET_BITS 64
4618#include <sys/types.h>
4619 /* Check that off_t can represent 2**63 - 1 correctly.
4620 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4621 since some C++ compilers masquerading as C compilers
4622 incorrectly reject 9223372036854775807. */
4623#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4624 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4625 && LARGE_OFF_T % 2147483647 == 1)
4626 ? 1 : -1];
4627int
4628main ()
4629{
4630
4631 ;
4632 return 0;
4633}
4634_ACEOF
4635if ac_fn_c_try_compile "$LINENO"; then :
4636 ac_cv_sys_file_offset_bits=64; break
4637fi
4638rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4639 ac_cv_sys_file_offset_bits=unknown
4640 break
4641done
4642fi
4643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4644$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4645case $ac_cv_sys_file_offset_bits in #(
4646 no | unknown) ;;
4647 *)
4648cat >>confdefs.h <<_ACEOF
4649#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4650_ACEOF
4651;;
4652esac
4653rm -rf conftest*
4654 if test $ac_cv_sys_file_offset_bits = unknown; then
4655 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4656$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
4657if test "${ac_cv_sys_large_files+set}" = set; then :
4658 $as_echo_n "(cached) " >&6
4659else
4660 while :; do
4661 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4662/* end confdefs.h. */
4663#include <sys/types.h>
4664 /* Check that off_t can represent 2**63 - 1 correctly.
4665 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4666 since some C++ compilers masquerading as C compilers
4667 incorrectly reject 9223372036854775807. */
4668#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4669 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4670 && LARGE_OFF_T % 2147483647 == 1)
4671 ? 1 : -1];
4672int
4673main ()
4674{
4675
4676 ;
4677 return 0;
4678}
4679_ACEOF
4680if ac_fn_c_try_compile "$LINENO"; then :
4681 ac_cv_sys_large_files=no; break
4682fi
4683rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4684 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4685/* end confdefs.h. */
4686#define _LARGE_FILES 1
4687#include <sys/types.h>
4688 /* Check that off_t can represent 2**63 - 1 correctly.
4689 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4690 since some C++ compilers masquerading as C compilers
4691 incorrectly reject 9223372036854775807. */
4692#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4693 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4694 && LARGE_OFF_T % 2147483647 == 1)
4695 ? 1 : -1];
4696int
4697main ()
4698{
4699
4700 ;
4701 return 0;
4702}
4703_ACEOF
4704if ac_fn_c_try_compile "$LINENO"; then :
4705 ac_cv_sys_large_files=1; break
4706fi
4707rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4708 ac_cv_sys_large_files=unknown
4709 break
4710done
4711fi
4712{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4713$as_echo "$ac_cv_sys_large_files" >&6; }
4714case $ac_cv_sys_large_files in #(
4715 no | unknown) ;;
4716 *)
4717cat >>confdefs.h <<_ACEOF
4718#define _LARGE_FILES $ac_cv_sys_large_files
4719_ACEOF
4720;;
4721esac
4722rm -rf conftest*
4723 fi
4724fi
4725
4726
4727
81ecdfbb
RW
4728
4729
4730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5
4731$as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; }
4732if test "${am_cv_prog_cc_stdc+set}" = set; then :
4733 $as_echo_n "(cached) " >&6
4734else
4735 am_cv_prog_cc_stdc=no
4736ac_save_CC="$CC"
4737# Don't try gcc -ansi; that turns off useful extensions and
4738# breaks some systems' header files.
4739# AIX -qlanglvl=ansi
4740# Ultrix and OSF/1 -std1
4741# HP-UX 10.20 and later -Ae
4742# HP-UX older versions -Aa -D_HPUX_SOURCE
4743# SVR4 -Xc -D__EXTENSIONS__
4744for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4745do
783e057b 4746 CC="$ac_save_CC $ac_arg"
81ecdfbb 4747 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4748/* end confdefs.h. */
4749#include <stdarg.h>
4750#include <stdio.h>
4751#include <sys/types.h>
4752#include <sys/stat.h>
4753/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4754struct buf { int x; };
4755FILE * (*rcsopen) (struct buf *, struct stat *, int);
4756static char *e (p, i)
4757 char **p;
4758 int i;
4759{
4760 return p[i];
4761}
4762static char *f (char * (*g) (char **, int), char **p, ...)
4763{
4764 char *s;
4765 va_list v;
4766 va_start (v,p);
4767 s = g (p, va_arg (v,int));
4768 va_end (v);
4769 return s;
4770}
4771int test (int i, double x);
4772struct s1 {int (*f) (int a);};
4773struct s2 {int (*f) (double a);};
4774int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4775int argc;
4776char **argv;
4777
4778int
4779main ()
4780{
4781
4782return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4783
4784 ;
4785 return 0;
4786}
4787_ACEOF
81ecdfbb 4788if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4789 am_cv_prog_cc_stdc="$ac_arg"; break
783e057b 4790fi
81ecdfbb 4791rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
4792done
4793CC="$ac_save_CC"
4794
4795fi
4796
4797if test -z "$am_cv_prog_cc_stdc"; then
81ecdfbb
RW
4798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4799$as_echo "none needed" >&6; }
783e057b 4800else
81ecdfbb
RW
4801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5
4802$as_echo "$am_cv_prog_cc_stdc" >&6; }
783e057b
DJ
4803fi
4804case "x$am_cv_prog_cc_stdc" in
4805 x|xno) ;;
4806 *) CC="$CC $am_cv_prog_cc_stdc" ;;
4807esac
4808
4869db5e
RM
4809# expand $ac_aux_dir to an absolute path
4810am_aux_dir=`cd $ac_aux_dir && pwd`
4811
4812if test x"${install_sh}" != xset; then
4813 case $am_aux_dir in
4814 *\ * | *\ *)
4815 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
4816 *)
4817 install_sh="\${SHELL} $am_aux_dir/install-sh"
4818 esac
4819fi
4820
4821# Installed binaries are usually stripped using `strip' when the user
4822# run `make install-strip'. However `strip' might not be the right
4823# tool to use in cross-compilation environments, therefore Automake
4824# will honor the `STRIP' environment variable to overrule this program.
4825if test "$cross_compiling" != no; then
4826 if test -n "$ac_tool_prefix"; then
4827 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4828set dummy ${ac_tool_prefix}strip; ac_word=$2
4829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4830$as_echo_n "checking for $ac_word... " >&6; }
4831if test "${ac_cv_prog_STRIP+set}" = set; then :
4832 $as_echo_n "(cached) " >&6
4833else
4834 if test -n "$STRIP"; then
4835 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4836else
4837as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4838for as_dir in $PATH
4839do
4840 IFS=$as_save_IFS
4841 test -z "$as_dir" && as_dir=.
4842 for ac_exec_ext in '' $ac_executable_extensions; do
4843 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4844 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4845 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4846 break 2
4847 fi
4848done
4849 done
4850IFS=$as_save_IFS
4851
4852fi
4853fi
4854STRIP=$ac_cv_prog_STRIP
4855if test -n "$STRIP"; then
4856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
4857$as_echo "$STRIP" >&6; }
4858else
4859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4860$as_echo "no" >&6; }
4861fi
4862
4863
4864fi
4865if test -z "$ac_cv_prog_STRIP"; then
4866 ac_ct_STRIP=$STRIP
4867 # Extract the first word of "strip", so it can be a program name with args.
4868set dummy strip; ac_word=$2
4869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4870$as_echo_n "checking for $ac_word... " >&6; }
4871if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
4872 $as_echo_n "(cached) " >&6
4873else
4874 if test -n "$ac_ct_STRIP"; then
4875 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
4876else
4877as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4878for as_dir in $PATH
4879do
4880 IFS=$as_save_IFS
4881 test -z "$as_dir" && as_dir=.
4882 for ac_exec_ext in '' $ac_executable_extensions; do
4883 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4884 ac_cv_prog_ac_ct_STRIP="strip"
4885 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4886 break 2
4887 fi
4888done
4889 done
4890IFS=$as_save_IFS
4891
4892fi
4893fi
4894ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
4895if test -n "$ac_ct_STRIP"; then
4896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
4897$as_echo "$ac_ct_STRIP" >&6; }
4898else
4899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4900$as_echo "no" >&6; }
4901fi
4902
4903 if test "x$ac_ct_STRIP" = x; then
4904 STRIP=":"
4905 else
4906 case $cross_compiling:$ac_tool_warned in
4907yes:)
4908{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4909$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4910ac_tool_warned=yes ;;
4911esac
4912 STRIP=$ac_ct_STRIP
4913 fi
4914else
4915 STRIP="$ac_cv_prog_STRIP"
4916fi
4917
4918fi
4919INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
4920
783e057b
DJ
4921
4922ac_aux_dir=
81ecdfbb
RW
4923for ac_dir in .. "$srcdir"/..; do
4924 for ac_t in install-sh install.sh shtool; do
4925 if test -f "$ac_dir/$ac_t"; then
4926 ac_aux_dir=$ac_dir
4927 ac_install_sh="$ac_aux_dir/$ac_t -c"
4928 break 2
4929 fi
4930 done
783e057b
DJ
4931done
4932if test -z "$ac_aux_dir"; then
81ecdfbb 4933 as_fn_error "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
783e057b 4934fi
81ecdfbb
RW
4935
4936# These three variables are undocumented and unsupported,
4937# and are intended to be withdrawn in a future Autoconf release.
4938# They can cause serious problems if a builder's source tree is in a directory
4939# whose full name contains unusual characters.
4940ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4941ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4942ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4943
783e057b 4944
783e057b 4945
9009e1ae
MR
4946test "$program_prefix" != NONE &&
4947 program_transform_name="s&^&$program_prefix&;$program_transform_name"
4948# Use a double $ so make ignores it.
4949test "$program_suffix" != NONE &&
4950 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
4951# Double any \ or $.
4952# By default was `s,x,x', remove it if useless.
4953ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
4954program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
4955
81ecdfbb 4956
3bc3d82a
PA
4957# See if we are building with C++, and substitute COMPILER.
4958
4959 # Check whether --enable-build-with-cxx was given.
4960if test "${enable_build_with_cxx+set}" = set; then :
4961 enableval=$enable_build_with_cxx; case $enableval in
4962 yes | no)
4963 ;;
4964 *)
4965 as_fn_error "bad value $enableval for --enable-build-with-cxx" "$LINENO" 5 ;;
4966 esac
4967else
a2358508 4968 enable_build_with_cxx=yes
3bc3d82a
PA
4969fi
4970
4971
4972 if test "$enable_build_with_cxx" = "yes"; then
dad44a1f 4973 COMPILER='$(CXX)'
a994041d 4974 COMPILER_CFLAGS='$(CXXFLAGS)'
3bc3d82a
PA
4975 else
4976 COMPILER='$(CC)'
a994041d 4977 COMPILER_CFLAGS='$(CFLAGS)'
3bc3d82a
PA
4978 fi
4979
4980
4981
a994041d 4982
a417dc56
RW
4983# Dependency checking.
4984rm -rf .tst 2>/dev/null
4985mkdir .tst 2>/dev/null
4986if test -d .tst; then
4987 am__leading_dot=.
4988else
4989 am__leading_dot=_
4990fi
4991rmdir .tst 2>/dev/null
4992
4993DEPDIR="${am__leading_dot}deps"
4994
81ecdfbb 4995ac_config_commands="$ac_config_commands depdir"
a417dc56
RW
4996
4997
4998depcc="$CC" am_compiler_list=
4999
5000am_depcomp=$ac_aux_dir/depcomp
81ecdfbb
RW
5001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
5002$as_echo_n "checking dependency style of $depcc... " >&6; }
5003if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
5004 $as_echo_n "(cached) " >&6
a417dc56
RW
5005else
5006 if test -f "$am_depcomp"; then
5007 # We make a subdir and do the tests there. Otherwise we can end up
5008 # making bogus files that we don't know about and never remove. For
5009 # instance it was reported that on HP-UX the gcc test will end up
5010 # making a dummy file named `D' -- because `-MD' means `put the output
5011 # in D'.
5012 mkdir conftest.dir
5013 # Copy depcomp to subdir because otherwise we won't find it if we're
5014 # using a relative directory.
5015 cp "$am_depcomp" conftest.dir
5016 cd conftest.dir
5017 # We will build objects and dependencies in a subdirectory because
5018 # it helps to detect inapplicable dependency modes. For instance
5019 # both Tru64's cc and ICC support -MD to output dependencies as a
5020 # side effect of compilation, but ICC will put the dependencies in
5021 # the current directory while Tru64 will put them in the object
5022 # directory.
5023 mkdir sub
5024
5025 am_cv_CC_dependencies_compiler_type=none
5026 if test "$am_compiler_list" = ""; then
5027 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
5028 fi
5029 for depmode in $am_compiler_list; do
5030 if test $depmode = none; then break; fi
5031
81ecdfbb 5032 $as_echo "$as_me:$LINENO: trying $depmode" >&5
a417dc56
RW
5033 # Setup a source with many dependencies, because some compilers
5034 # like to wrap large dependency lists on column 80 (with \), and
5035 # we should not choose a depcomp mode which is confused by this.
5036 #
5037 # We need to recreate these files for each test, as the compiler may
5038 # overwrite some of them when testing with obscure command lines.
5039 # This happens at least with the AIX C compiler.
5040 : > sub/conftest.c
5041 for i in 1 2 3 4 5 6; do
5042 echo '#include "conftst'$i'.h"' >> sub/conftest.c
5043 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
5044 # Solaris 8's {/usr,}/bin/sh.
5045 touch sub/conftst$i.h
5046 done
5047 echo "include sub/conftest.Po" > confmf
5048
5049 # We check with `-c' and `-o' for the sake of the "dashmstdout"
5050 # mode. It turns out that the SunPro C++ compiler does not properly
5051 # handle `-M -o', and we need to detect this.
5052 depcmd="depmode=$depmode \
5053 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
5054 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
5055 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
5056 echo "| $depcmd" | sed -e 's/ */ /g' >&5
5057 if env $depcmd > conftest.err 2>&1 &&
5058 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
5059 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
5060 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
5061 # icc doesn't choke on unknown options, it will just issue warnings
5062 # or remarks (even with -Werror). So we grep stderr for any message
5063 # that says an option was ignored or not supported.
5064 # When given -MP, icc 7.0 and 7.1 complain thusly:
5065 # icc: Command line warning: ignoring option '-M'; no argument required
5066 # The diagnosis changed in icc 8.0:
5067 # icc: Command line remark: option '-MP' not supported
5068 if (grep 'ignoring option' conftest.err ||
5069 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
5070 am_cv_CC_dependencies_compiler_type=$depmode
81ecdfbb 5071 $as_echo "$as_me:$LINENO: success" >&5
a417dc56
RW
5072 break
5073 fi
5074 fi
81ecdfbb 5075 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
a417dc56
RW
5076 sed -e 's/^/| /' < conftest.err >&5
5077 done
5078
5079 cd ..
5080 rm -rf conftest.dir
5081else
5082 am_cv_CC_dependencies_compiler_type=none
5083fi
5084
5085fi
81ecdfbb
RW
5086{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
5087$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
a417dc56 5088if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
81ecdfbb 5089then as_fn_error "no usable dependency style found" "$LINENO" 5
a417dc56
RW
5090else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
5091
5092fi
5093
5094
5095# Check for the 'make' the user wants to use.
5096for ac_prog in make
5097do
5098 # Extract the first word of "$ac_prog", so it can be a program name with args.
5099set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
5100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5101$as_echo_n "checking for $ac_word... " >&6; }
5102if test "${ac_cv_prog_MAKE+set}" = set; then :
5103 $as_echo_n "(cached) " >&6
a417dc56
RW
5104else
5105 if test -n "$MAKE"; then
5106 ac_cv_prog_MAKE="$MAKE" # Let the user override the test.
5107else
5108as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5109for as_dir in $PATH
5110do
5111 IFS=$as_save_IFS
5112 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5113 for ac_exec_ext in '' $ac_executable_extensions; do
5114 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
a417dc56 5115 ac_cv_prog_MAKE="$ac_prog"
81ecdfbb 5116 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
a417dc56
RW
5117 break 2
5118 fi
5119done
81ecdfbb
RW
5120 done
5121IFS=$as_save_IFS
a417dc56
RW
5122
5123fi
5124fi
5125MAKE=$ac_cv_prog_MAKE
5126if test -n "$MAKE"; then
81ecdfbb
RW
5127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
5128$as_echo "$MAKE" >&6; }
a417dc56 5129else
81ecdfbb
RW
5130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5131$as_echo "no" >&6; }
a417dc56
RW
5132fi
5133
81ecdfbb 5134
a417dc56
RW
5135 test -n "$MAKE" && break
5136done
5137
5138MAKE_IS_GNU=
5139case "`$MAKE --version 2>&1 | sed 1q`" in
5140 *GNU*)
5141 MAKE_IS_GNU=yes
5142 ;;
5143esac
81ecdfbb 5144 if test "$MAKE_IS_GNU" = yes; then
a417dc56
RW
5145 GMAKE_TRUE=
5146 GMAKE_FALSE='#'
5147else
5148 GMAKE_TRUE='#'
5149 GMAKE_FALSE=
5150fi
5151
81ecdfbb
RW
5152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
5153$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
5154set x ${MAKE-make}
5155ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
5156if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
5157 $as_echo_n "(cached) " >&6
a417dc56
RW
5158else
5159 cat >conftest.make <<\_ACEOF
81ecdfbb 5160SHELL = /bin/sh
a417dc56 5161all:
81ecdfbb 5162 @echo '@@@%%%=$(MAKE)=@@@%%%'
a417dc56
RW
5163_ACEOF
5164# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
81ecdfbb
RW
5165case `${MAKE-make} -f conftest.make 2>/dev/null` in
5166 *@@@%%%=?*=@@@%%%*)
5167 eval ac_cv_prog_make_${ac_make}_set=yes;;
5168 *)
5169 eval ac_cv_prog_make_${ac_make}_set=no;;
5170esac
a417dc56
RW
5171rm -f conftest.make
5172fi
81ecdfbb
RW
5173if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
5174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5175$as_echo "yes" >&6; }
a417dc56
RW
5176 SET_MAKE=
5177else
81ecdfbb
RW
5178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5179$as_echo "no" >&6; }
a417dc56
RW
5180 SET_MAKE="MAKE=${MAKE-make}"
5181fi
5182
5183
648d586d
JB
5184gnulib_extra_configure_args=
5185# If large-file support is disabled, make sure gnulib does the same.
5186if test "$enable_largefile" = no; then
5187gnulib_extra_configure_args="$gnulib_extra_configure_args --disable-largefile"
5188fi
5189
c971b7fa
PA
5190# Configure gnulib. We need to build gnulib under some other
5191# directory not "gnulib", to avoid the problem of both GDB and
5192# GDBserver wanting to build it in the same directory, when building
5193# in the source dir.
783e057b 5194
c971b7fa
PA
5195 in_src="gnulib"
5196 in_build="build-gnulib"
648d586d 5197 in_extra_args="$gnulib_extra_configure_args"
c971b7fa
PA
5198
5199 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
5200 # so they do not pile up.
5201 ac_sub_configure_args=
5202 ac_prev=
5203 eval "set x $ac_configure_args"
5204 shift
5205 for ac_arg
5206 do
5207 if test -n "$ac_prev"; then
5208 ac_prev=
5209 continue
5210 fi
5211 case $ac_arg in
5212 -cache-file | --cache-file | --cache-fil | --cache-fi \
5213 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
5214 ac_prev=cache_file ;;
5215 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
5216 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
5217 | --c=*)
5218 ;;
5219 --config-cache | -C)
5220 ;;
5221 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
5222 ac_prev=srcdir ;;
5223 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
5224 ;;
5225 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
5226 ac_prev=prefix ;;
5227 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
5228 ;;
5229 --disable-option-checking)
5230 ;;
5231 *)
5232 case $ac_arg in
5233 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
5234 esac
5235 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
5236 esac
5237 done
5238
5239 # Always prepend --prefix to ensure using the same prefix
5240 # in subdir configurations.
5241 ac_arg="--prefix=$prefix"
5242 case $ac_arg in
5243 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
5244 esac
5245 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
5246
5247 # Pass --silent
5248 if test "$silent" = yes; then
5249 ac_sub_configure_args="--silent $ac_sub_configure_args"
5250 fi
5251
5252 # Always prepend --disable-option-checking to silence warnings, since
5253 # different subdirs can have different --enable and --with options.
5254 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
5255
5256 ac_popdir=`pwd`
5257 ac_dir=$in_build
5258
5259 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
5260 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
5261 $as_echo "$ac_msg" >&6
5262 as_dir="$ac_dir"; as_fn_mkdir_p
5263
38ea300a
PA
5264 case $srcdir in
5265 [\\/]* | ?:[\\/]* )
5266 ac_srcdir=$srcdir/$in_src ;;
5267 *) # Relative name.
5268 ac_srcdir=../$srcdir/$in_src ;;
5269 esac
c971b7fa
PA
5270
5271 cd "$ac_dir"
5272
5273 ac_sub_configure=$ac_srcdir/configure
5274
5275 # Make the cache file name correct relative to the subdirectory.
5276 case $cache_file in
5277 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
5278 *) # Relative name.
5279 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
5280 esac
5281
648d586d
JB
5282 if test -n "$in_extra_args"; then
5283 # Add the extra args at the end.
5284 ac_sub_configure_args="$ac_sub_configure_args $in_extra_args"
5285 fi
5286
c971b7fa
PA
5287 { $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
5288$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
5289 # The eval makes quoting arguments work.
5290 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
5291 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
5292 as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
5293
5294 cd "$ac_popdir"
783e057b 5295
c971b7fa
PA
5296
5297
5298CONFIG_OBS=
5299CONFIG_DEPS=
5300CONFIG_SRCS=
5301ENABLE_CFLAGS=
5302
5303CONFIG_ALL=
5304CONFIG_CLEAN=
5305CONFIG_INSTALL=
5306CONFIG_UNINSTALL=
5307
5308# If we haven't got the data from the intl directory,
5309# assume NLS is disabled.
5310USE_NLS=no
5311LIBINTL=
5312LIBINTL_DEP=
5313INCINTL=
5314XGETTEXT=
5315GMSGFMT=
5316POSUB=
783e057b
DJ
5317
5318if test -f ../intl/config.intl; then
5319 . ../intl/config.intl
5320fi
81ecdfbb
RW
5321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
5322$as_echo_n "checking whether NLS is requested... " >&6; }
783e057b 5323if test x"$USE_NLS" != xyes; then
81ecdfbb
RW
5324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5325$as_echo "no" >&6; }
783e057b 5326else
81ecdfbb
RW
5327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5328$as_echo "yes" >&6; }
783e057b 5329
81ecdfbb 5330$as_echo "#define ENABLE_NLS 1" >>confdefs.h
783e057b
DJ
5331
5332
81ecdfbb
RW
5333 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
5334$as_echo_n "checking for catalogs to be installed... " >&6; }
783e057b
DJ
5335 # Look for .po and .gmo files in the source directory.
5336 CATALOGS=
5337 XLINGUAS=
5338 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
5339 # If there aren't any .gmo files the shell will give us the
5340 # literal string "../path/to/srcdir/po/*.gmo" which has to be
5341 # weeded out.
5342 case "$cat" in *\**)
5343 continue;;
5344 esac
5345 # The quadruple backslash is collapsed to a double backslash
5346 # by the backticks, then collapsed again by the double quotes,
5347 # leaving us with one backslash in the sed expression (right
5348 # before the dot that mustn't act as a wildcard).
c971b7fa
PA
5349 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
5350 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
5351 # The user is allowed to set LINGUAS to a list of languages to
5352 # install catalogs for. If it's empty that means "all of them."
5353 if test "x$LINGUAS" = x; then
5354 CATALOGS="$CATALOGS $cat"
5355 XLINGUAS="$XLINGUAS $lang"
5356 else
5357 case "$LINGUAS" in *$lang*)
5358 CATALOGS="$CATALOGS $cat"
5359 XLINGUAS="$XLINGUAS $lang"
5360 ;;
5361 esac
e28b3332
DJ
5362 fi
5363 done
c971b7fa
PA
5364 LINGUAS="$XLINGUAS"
5365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
5366$as_echo "$LINGUAS" >&6; }
5367
5368
5369 DATADIRNAME=share
5370
5371 INSTOBJEXT=.mo
5372
5373 GENCAT=gencat
5374
5375 CATOBJEXT=.gmo
e28b3332 5376
e28b3332
DJ
5377fi
5378
c971b7fa
PA
5379localedir='${datadir}/locale'
5380
5381
5382if test x"$USE_NLS" = xyes; then
5383 CONFIG_ALL="$CONFIG_ALL all-po"
5384 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
5385 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
5386 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
e28b3332 5387fi
e28b3332 5388
c971b7fa
PA
5389GNULIB=build-gnulib/import
5390
5391# For Makefile dependencies.
5392GNULIB_STDINT_H=
5393if test x"$STDINT_H" != x; then
5394 GNULIB_STDINT_H=$GNULIB/$STDINT_H
e28b3332
DJ
5395fi
5396
5397
c971b7fa
PA
5398PACKAGE=gdb
5399
5400cat >>confdefs.h <<_ACEOF
5401#define PACKAGE "$PACKAGE"
5402_ACEOF
5403
5404
5405
5406# We never need to detect it in this sub-configure.
5407# But preserve it for config.status --recheck.
5408
5409
5410
5411MAKEINFO_EXTRA_FLAGS=""
5412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5
5413$as_echo_n "checking whether $MAKEINFO supports @click... " >&6; }
5414if test "${gdb_cv_have_makeinfo_click+set}" = set; then :
5415 $as_echo_n "(cached) " >&6
5416else
5417 echo '@clicksequence{a @click{} b}' >conftest.texinfo
5418 if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then
5419 gdb_cv_have_makeinfo_click=yes
5420 else
5421 gdb_cv_have_makeinfo_click=no
5422 fi
5423fi
5424{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5
5425$as_echo "$gdb_cv_have_makeinfo_click" >&6; }
5426if test x"$gdb_cv_have_makeinfo_click" = xyes; then
5427 MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK"
5428fi
e28b3332
DJ
5429
5430
bec39cab
AC
5431
5432
81ecdfbb
RW
5433# Check whether --with-separate-debug-dir was given.
5434if test "${with_separate_debug_dir+set}" = set; then :
5435 withval=$with_separate_debug_dir;
b14b1491
TT
5436 DEBUGDIR=$withval
5437else
5438 DEBUGDIR=${libdir}/debug
81ecdfbb
RW
5439fi
5440
20e95c23 5441
783e057b
DJ
5442 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5443 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 5444 ac_define_dir=`eval echo $DEBUGDIR`
783e057b 5445 ac_define_dir=`eval echo $ac_define_dir`
20e95c23 5446
783e057b
DJ
5447cat >>confdefs.h <<_ACEOF
5448#define DEBUGDIR "$ac_define_dir"
20e95c23 5449_ACEOF
20e95c23 5450
20e95c23 5451
20e95c23 5452
0c4a4063 5453
b14b1491
TT
5454 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
5455 if test "x$prefix" = xNONE; then
5456 test_prefix=/usr/local
5457 else
5458 test_prefix=$prefix
5459 fi
783e057b 5460 else
b14b1491 5461 test_prefix=$exec_prefix
783e057b 5462 fi
b14b1491
TT
5463 value=0
5464 case ${ac_define_dir} in
5465 "${test_prefix}"|"${test_prefix}/"*|\
5466 '${exec_prefix}'|'${exec_prefix}/'*)
5467 value=1
5468 ;;
5469 esac
5470
5471cat >>confdefs.h <<_ACEOF
5472#define DEBUGDIR_RELOCATABLE $value
5473_ACEOF
5474
5475
5476
0c4a4063 5477
f83d8a90
DE
5478# We can't pass paths as command line arguments.
5479# Mingw32 tries to be clever and will convert the paths for us.
5480# For example -DBINDIR="/usr/local/bin" passed on the command line may get
5481# converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin".
5482# This breaks GDB's relocatable path conversions since paths passed in
5483# config.h would not get so translated, the path prefixes no longer match.
5484
5485 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5486 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5487 ac_define_dir=`eval echo $bindir`
5488 ac_define_dir=`eval echo $ac_define_dir`
5489
5490cat >>confdefs.h <<_ACEOF
5491#define BINDIR "$ac_define_dir"
5492_ACEOF
5493
5494
5495
b14b1491
TT
5496# GDB's datadir relocation
5497
5498
5499
81ecdfbb
RW
5500# Check whether --with-gdb-datadir was given.
5501if test "${with_gdb_datadir+set}" = set; then :
5502 withval=$with_gdb_datadir;
b14b1491 5503 GDB_DATADIR=$withval
20e95c23 5504else
b14b1491 5505 GDB_DATADIR=${datadir}/gdb
81ecdfbb
RW
5506fi
5507
20e95c23 5508
b14b1491
TT
5509 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5510 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5511 ac_define_dir=`eval echo $GDB_DATADIR`
5512 ac_define_dir=`eval echo $ac_define_dir`
5513
5514cat >>confdefs.h <<_ACEOF
5515#define GDB_DATADIR "$ac_define_dir"
20e95c23
DJ
5516_ACEOF
5517
b14b1491
TT
5518
5519
0c4a4063 5520
b14b1491
TT
5521 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
5522 if test "x$prefix" = xNONE; then
5523 test_prefix=/usr/local
5524 else
5525 test_prefix=$prefix
5526 fi
5527 else
5528 test_prefix=$exec_prefix
5529 fi
5530 value=0
5531 case ${ac_define_dir} in
5532 "${test_prefix}"|"${test_prefix}/"*|\
5533 '${exec_prefix}'|'${exec_prefix}/'*)
5534 value=1
5535 ;;
5536 esac
5537
5538cat >>confdefs.h <<_ACEOF
5539#define GDB_DATADIR_RELOCATABLE $value
5540_ACEOF
5541
5542
783e057b 5543
20e95c23 5544
0c4a4063 5545
81ecdfbb
RW
5546# Check whether --with-relocated-sources was given.
5547if test "${with_relocated_sources+set}" = set; then :
5548 withval=$with_relocated_sources; reloc_srcdir="${withval}"
29b0e8a2
JM
5549
5550 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5551 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5552 ac_define_dir=`eval echo $reloc_srcdir`
5553 ac_define_dir=`eval echo $ac_define_dir`
5554
5555cat >>confdefs.h <<_ACEOF
5556#define RELOC_SRCDIR "$ac_define_dir"
5557_ACEOF
5558
5559
5560
81ecdfbb
RW
5561fi
5562
29b0e8a2 5563
7349ff92
JK
5564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5
5565$as_echo_n "checking for default auto-load directory... " >&6; }
5566
5567# Check whether --with-auto-load-dir was given.
5568if test "${with_auto_load_dir+set}" = set; then :
5569 withval=$with_auto_load_dir;
5570else
1564a261 5571 with_auto_load_dir='$debugdir:$datadir/auto-load'
7349ff92
JK
5572fi
5573
1564a261 5574escape_dir=`echo $with_auto_load_dir | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'`
7349ff92
JK
5575
5576 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5577 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5578 ac_define_dir=`eval echo $escape_dir`
5579 ac_define_dir=`eval echo $ac_define_dir`
5580
5581cat >>confdefs.h <<_ACEOF
5582#define AUTO_LOAD_DIR "$ac_define_dir"
5583_ACEOF
5584
5585
5586{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5
5587$as_echo "$with_auto_load_dir" >&6; }
5588
bccbefd2
JK
5589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5
5590$as_echo_n "checking for default auto-load safe-path... " >&6; }
5591
5592# Check whether --with-auto-load-safe-path was given.
5593if test "${with_auto_load_safe_path+set}" = set; then :
5594 withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then
6dea1fbd
JK
5595 with_auto_load_safe_path="/"
5596 fi
bccbefd2 5597else
7349ff92 5598 with_auto_load_safe_path="$with_auto_load_dir"
bccbefd2
JK
5599fi
5600
1564a261 5601escape_dir=`echo $with_auto_load_safe_path | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'`
bccbefd2
JK
5602
5603 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5604 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6dea1fbd 5605 ac_define_dir=`eval echo $escape_dir`
bccbefd2
JK
5606 ac_define_dir=`eval echo $ac_define_dir`
5607
5608cat >>confdefs.h <<_ACEOF
6dea1fbd 5609#define AUTO_LOAD_SAFE_PATH "$ac_define_dir"
bccbefd2
JK
5610_ACEOF
5611
5612
5613{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
5614$as_echo "$with_auto_load_safe_path" >&6; }
5615
29b0e8a2 5616
20e95c23 5617
5ae98d25 5618subdirs="$subdirs testsuite"
20e95c23
DJ
5619
5620
783e057b 5621# Check whether to support alternative target configurations
81ecdfbb
RW
5622# Check whether --enable-targets was given.
5623if test "${enable_targets+set}" = set; then :
5624 enableval=$enable_targets; case "${enableval}" in
5625 yes | "") as_fn_error "enable-targets option must specify target names or 'all'" "$LINENO" 5
783e057b
DJ
5626 ;;
5627 no) enable_targets= ;;
5628 *) enable_targets=$enableval ;;
5629esac
81ecdfbb
RW
5630fi
5631
20e95c23 5632
783e057b 5633# Check whether to enable 64-bit support on 32-bit hosts
81ecdfbb
RW
5634# Check whether --enable-64-bit-bfd was given.
5635if test "${enable_64_bit_bfd+set}" = set; then :
5636 enableval=$enable_64_bit_bfd; case "${enableval}" in
783e057b
DJ
5637 yes) want64=true ;;
5638 no) want64=false ;;
81ecdfbb 5639 *) as_fn_error "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
783e057b
DJ
5640esac
5641else
5642 want64=false
81ecdfbb
RW
5643fi
5644
783e057b
DJ
5645# Provide defaults for some variables set by the per-host and per-target
5646# configuration.
5647gdb_host_obs=posix-hdep.o
20e95c23 5648
783e057b
DJ
5649if test "${target}" = "${host}"; then
5650 gdb_native=yes
5651else
5652 gdb_native=no
5653fi
20e95c23 5654
783e057b 5655. $srcdir/configure.host
20e95c23 5656
fb23d554
SDJ
5657# Add in the common host objects.
5658. $srcdir/common/common.host
5659gdb_host_obs="$gdb_host_obs $common_host_obs"
5660
783e057b 5661# Accumulate some settings from configure.tgt over all enabled targets
20e95c23 5662
783e057b
DJ
5663TARGET_OBS=
5664all_targets=
b292c783 5665HAVE_NATIVE_GCORE_TARGET=
20e95c23 5666
783e057b 5667for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
20e95c23 5668do
783e057b
DJ
5669 if test "$targ_alias" = "all"; then
5670 all_targets=true
5671 else
5672 # Canonicalize the secondary target names.
5673 result=`$ac_config_sub $targ_alias 2>/dev/null`
5674 if test -n "$result"; then
5675 targ=$result
5676 else
5677 targ=$targ_alias
5678 fi
20e95c23 5679
783e057b 5680 . ${srcdir}/configure.tgt
20e95c23 5681
bf307134
JB
5682 if test -z "${gdb_target_obs}"; then :
5683 as_fn_error "configuration ${targ} is unsupported." "$LINENO" 5
5684fi
5685
783e057b
DJ
5686 # Target-specific object files
5687 for i in ${gdb_target_obs}; do
5688 case " $TARGET_OBS " in
5689 *" ${i} "*) ;;
5690 *)
5691 TARGET_OBS="$TARGET_OBS ${i}"
5692 ;;
5693 esac
5694 done
20e95c23 5695
783e057b
DJ
5696 # Check whether this target needs 64-bit CORE_ADDR
5697 if test x${want64} = xfalse; then
5698 . ${srcdir}/../bfd/config.bfd
5699 fi
b292c783
JK
5700
5701 # Check whether this target is native and supports gcore.
5702 if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \
5703 && $gdb_have_gcore; then
5704 HAVE_NATIVE_GCORE_TARGET=1
5705 fi
783e057b 5706 fi
20e95c23
DJ
5707done
5708
783e057b
DJ
5709if test x${all_targets} = xtrue; then
5710
5711 # We want all 64-bit targets if we either:
5712 # - run on a 64-bit host or
5713 # - already require 64-bit support for some other target or
5714 # - the --enable-64-bit-bfd option was supplied
5715 # Otherwise we only support all 32-bit targets.
5716 #
5717 # NOTE: This test must be in sync with the corresponding
5718 # tests in BFD!
20e95c23 5719
783e057b 5720 if test x${want64} = xfalse; then
81ecdfbb
RW
5721 # The cast to long int works around a bug in the HP C Compiler
5722# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5723# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5724# This bug is HP SR number 8606223364.
5725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
5726$as_echo_n "checking size of long... " >&6; }
5727if test "${ac_cv_sizeof_long+set}" = set; then :
5728 $as_echo_n "(cached) " >&6
c0993dbe 5729else
81ecdfbb 5730 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
c0993dbe 5731
81ecdfbb
RW
5732else
5733 if test "$ac_cv_type_long" = yes; then
5734 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5735$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5736{ as_fn_set_status 77
5737as_fn_error "cannot compute sizeof (long)
5738See \`config.log' for more details." "$LINENO" 5; }; }
5739 else
5740 ac_cv_sizeof_long=0
5741 fi
c0993dbe 5742fi
81ecdfbb 5743
c0993dbe 5744fi
81ecdfbb
RW
5745{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
5746$as_echo "$ac_cv_sizeof_long" >&6; }
c0993dbe 5747
c0993dbe 5748
c0993dbe 5749
c0993dbe
UW
5750cat >>confdefs.h <<_ACEOF
5751#define SIZEOF_LONG $ac_cv_sizeof_long
5752_ACEOF
5753
5754
5755 if test "x${ac_cv_sizeof_long}" = "x8"; then
5756 want64=true
5757 fi
5758 fi
5759 if test x${want64} = xtrue; then
5760 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
5761 else
5762 TARGET_OBS='$(ALL_TARGET_OBS)'
5763 fi
5764fi
5765
5766
5767
b292c783 5768
c0993dbe
UW
5769# For other settings, only the main target counts.
5770gdb_sim=
5771gdb_osabi=
5772build_gdbserver=
5773targ=$target; . ${srcdir}/configure.tgt
5774
5775# Fetch the default architecture and default target vector from BFD.
5776targ=$target; . $srcdir/../bfd/config.bfd
5777
5778# We only want the first architecture, so strip off the others if
5779# there is more than one.
5780targ_archs=`echo $targ_archs | sed 's/ .*//'`
5781
5782if test "x$targ_archs" != x; then
5783
5784cat >>confdefs.h <<_ACEOF
5785#define DEFAULT_BFD_ARCH $targ_archs
5786_ACEOF
5787
5788fi
5789if test "x$targ_defvec" != x; then
5790
5791cat >>confdefs.h <<_ACEOF
5792#define DEFAULT_BFD_VEC $targ_defvec
5793_ACEOF
5794
5795fi
5796
c0993dbe
UW
5797# The CLI cannot be disabled yet, but may be in the future.
5798
5799# Enable CLI.
81ecdfbb
RW
5800# Check whether --enable-gdbcli was given.
5801if test "${enable_gdbcli+set}" = set; then :
5802 enableval=$enable_gdbcli; case $enableval in
c0993dbe
UW
5803 yes)
5804 ;;
5805 no)
81ecdfbb 5806 as_fn_error "the command-line interface cannot be disabled yet" "$LINENO" 5 ;;
c0993dbe 5807 *)
81ecdfbb 5808 as_fn_error "bad value $enableval for --enable-gdbcli" "$LINENO" 5 ;;
c0993dbe
UW
5809 esac
5810else
5811 enable_gdbcli=yes
81ecdfbb
RW
5812fi
5813
c0993dbe
UW
5814if test x"$enable_gdbcli" = xyes; then
5815 if test -d $srcdir/cli; then
5816 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
5817 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
5818 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
5819 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
5820 fi
5821fi
5822
5823# Enable MI.
81ecdfbb
RW
5824# Check whether --enable-gdbmi was given.
5825if test "${enable_gdbmi+set}" = set; then :
5826 enableval=$enable_gdbmi; case $enableval in
c0993dbe
UW
5827 yes | no)
5828 ;;
5829 *)
81ecdfbb 5830 as_fn_error "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
c0993dbe
UW
5831 esac
5832else
5833 enable_gdbmi=yes
81ecdfbb
RW
5834fi
5835
c0993dbe
UW
5836if test x"$enable_gdbmi" = xyes; then
5837 if test -d $srcdir/mi; then
5838 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
5839 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
5840 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
5841 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
5842 fi
5843fi
5844
5845# Enable TUI.
81ecdfbb
RW
5846# Check whether --enable-tui was given.
5847if test "${enable_tui+set}" = set; then :
5848 enableval=$enable_tui; case $enableval in
3ca64bd3 5849 yes | no | auto)
c0993dbe
UW
5850 ;;
5851 *)
81ecdfbb 5852 as_fn_error "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
c0993dbe
UW
5853 esac
5854else
3ca64bd3 5855 enable_tui=auto
81ecdfbb
RW
5856fi
5857
c0993dbe
UW
5858
5859# Enable gdbtk.
81ecdfbb
RW
5860# Check whether --enable-gdbtk was given.
5861if test "${enable_gdbtk+set}" = set; then :
5862 enableval=$enable_gdbtk; case $enableval in
c0993dbe
UW
5863 yes | no)
5864 ;;
5865 *)
81ecdfbb 5866 as_fn_error "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
c0993dbe
UW
5867 esac
5868else
5062cc19 5869 if test -d $srcdir/gdbtk; then
c0993dbe
UW
5870 enable_gdbtk=yes
5871 else
5872 enable_gdbtk=no
5873 fi
81ecdfbb
RW
5874fi
5875
c0993dbe
UW
5876# We unconditionally disable gdbtk tests on selected platforms.
5877case $host_os in
5878 go32* | windows*)
81ecdfbb
RW
5879 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
5880$as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
c0993dbe
UW
5881 enable_gdbtk=no ;;
5882esac
5883
05e7c244 5884# Libunwind support for ia64.
bec39cab 5885
05e7c244
JK
5886
5887# Check whether --with-libunwind-ia64 was given.
5888if test "${with_libunwind_ia64+set}" = set; then :
5889 withval=$with_libunwind_ia64;
bec39cab 5890else
05e7c244
JK
5891 with_libunwind_ia64=auto
5892fi
bec39cab 5893
05e7c244
JK
5894
5895# Backward compatibility option.
5896if test "${with_libunwind+set}" = set; then
5897 if test x"$with_libunwind_ia64" != xauto; then
5898 as_fn_error "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5
5899 fi
5900 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5
5901$as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;}
5902 with_libunwind_ia64="$with_libunwind"
5903fi
5904
5905case "$with_libunwind_ia64" in
5906 yes | no)
5907 ;;
5908 auto)
5909 for ac_header in libunwind-ia64.h
81ecdfbb 5910do :
b54a8fd7
PA
5911 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
5912if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
bec39cab 5913 cat >>confdefs.h <<_ACEOF
b54a8fd7 5914#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
5915_ACEOF
5916
5917fi
5918
5919done
5920
05e7c244
JK
5921 with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h
5922 ;;
5923 *)
5924 as_fn_error "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5
5925 ;;
5926esac
bec39cab 5927
05e7c244 5928if test x"$with_libunwind_ia64" = xyes; then
b54a8fd7 5929 for ac_header in libunwind-ia64.h
81ecdfbb 5930do :
b54a8fd7
PA
5931 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
5932if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
bec39cab 5933 cat >>confdefs.h <<_ACEOF
b54a8fd7 5934#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
5935_ACEOF
5936
5937fi
5938
5939done
5940
05e7c244
JK
5941 if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then
5942 as_fn_error "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5
5943 fi
5944 CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o"
5945 CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o"
5946 CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c"
a9322a30
TT
5947fi
5948
cb01cfba
JB
5949opt_curses=no
5950
81ecdfbb
RW
5951# Check whether --with-curses was given.
5952if test "${with_curses+set}" = set; then :
5953 withval=$with_curses; opt_curses=$withval
5954fi
5955
cb01cfba 5956
76a39ba7 5957prefer_curses=no
cb01cfba 5958if test "$opt_curses" = "yes"; then
76a39ba7 5959 prefer_curses=yes
cb01cfba
JB
5960fi
5961
a9322a30 5962# Profiling support.
81ecdfbb
RW
5963# Check whether --enable-profiling was given.
5964if test "${enable_profiling+set}" = set; then :
5965 enableval=$enable_profiling; case $enableval in
a9322a30
TT
5966 yes | no)
5967 ;;
5968 *)
81ecdfbb 5969 as_fn_error "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
a9322a30
TT
5970 esac
5971else
5972 enable_profiling=no
81ecdfbb 5973fi
bec39cab 5974
a9322a30
TT
5975
5976for ac_func in monstartup _mcleanup
81ecdfbb
RW
5977do :
5978 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
5979ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
5980eval as_val=\$$as_ac_var
5981 if test "x$as_val" = x""yes; then :
5982 cat >>confdefs.h <<_ACEOF
5983#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 5984_ACEOF
a9322a30 5985
81ecdfbb
RW
5986fi
5987done
a9322a30 5988
81ecdfbb
RW
5989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
5990$as_echo_n "checking for _etext... " >&6; }
5991if test "${ac_cv_var__etext+set}" = set; then :
5992 $as_echo_n "(cached) " >&6
5993else
5994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5995/* end confdefs.h. */
5996#include <stdlib.h>
5997extern char _etext;
a9322a30
TT
5998
5999int
6000main ()
6001{
6002free (&_etext);
6003 ;
6004 return 0;
6005}
bec39cab 6006_ACEOF
81ecdfbb 6007if ac_fn_c_try_link "$LINENO"; then :
a9322a30 6008 ac_cv_var__etext=yes
bec39cab 6009else
81ecdfbb 6010 ac_cv_var__etext=no
bec39cab 6011fi
81ecdfbb
RW
6012rm -f core conftest.err conftest.$ac_objext \
6013 conftest$ac_exeext conftest.$ac_ext
bec39cab 6014fi
81ecdfbb
RW
6015{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
6016$as_echo "$ac_cv_var__etext" >&6; }
a9322a30 6017if test $ac_cv_var__etext = yes; then
60ca704f 6018
81ecdfbb 6019$as_echo "#define HAVE__ETEXT 1" >>confdefs.h
bec39cab 6020
bec39cab 6021fi
81ecdfbb
RW
6022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
6023$as_echo_n "checking for etext... " >&6; }
6024if test "${ac_cv_var_etext+set}" = set; then :
6025 $as_echo_n "(cached) " >&6
bec39cab 6026else
81ecdfbb 6027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6028/* end confdefs.h. */
a9322a30
TT
6029#include <stdlib.h>
6030extern char etext;
bec39cab
AC
6031
6032int
6033main ()
6034{
a9322a30 6035free (&etext);
bec39cab
AC
6036 ;
6037 return 0;
6038}
6039_ACEOF
81ecdfbb 6040if ac_fn_c_try_link "$LINENO"; then :
a9322a30 6041 ac_cv_var_etext=yes
bec39cab 6042else
81ecdfbb 6043 ac_cv_var_etext=no
bec39cab 6044fi
81ecdfbb
RW
6045rm -f core conftest.err conftest.$ac_objext \
6046 conftest$ac_exeext conftest.$ac_ext
bec39cab 6047fi
81ecdfbb
RW
6048{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
6049$as_echo "$ac_cv_var_etext" >&6; }
a9322a30
TT
6050if test $ac_cv_var_etext = yes; then
6051
81ecdfbb 6052$as_echo "#define HAVE_ETEXT 1" >>confdefs.h
bec39cab
AC
6053
6054fi
a9322a30
TT
6055if test "$enable_profiling" = yes ; then
6056 if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
81ecdfbb 6057 as_fn_error "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
a9322a30
TT
6058 fi
6059 PROFILE_CFLAGS=-pg
6060 OLD_CFLAGS="$CFLAGS"
6061 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
bec39cab 6062
81ecdfbb
RW
6063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
6064$as_echo_n "checking whether $CC supports -pg... " >&6; }
6065if test "${ac_cv_cc_supports_pg+set}" = set; then :
6066 $as_echo_n "(cached) " >&6
bec39cab 6067else
81ecdfbb 6068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6069/* end confdefs.h. */
bec39cab
AC
6070
6071int
6072main ()
6073{
a9322a30 6074int x;
bec39cab
AC
6075 ;
6076 return 0;
6077}
6078_ACEOF
81ecdfbb 6079if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 6080 ac_cv_cc_supports_pg=yes
bec39cab 6081else
81ecdfbb 6082 ac_cv_cc_supports_pg=no
bec39cab 6083fi
81ecdfbb 6084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 6085fi
81ecdfbb
RW
6086{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
6087$as_echo "$ac_cv_cc_supports_pg" >&6; }
bec39cab 6088
a9322a30 6089 if test $ac_cv_cc_supports_pg = no; then
81ecdfbb 6090 as_fn_error "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
a9322a30 6091 fi
bec39cab 6092
a9322a30 6093 CFLAGS="$OLD_CFLAGS"
bec39cab
AC
6094fi
6095
c16158bc
JM
6096
6097
81ecdfbb
RW
6098# Check whether --with-pkgversion was given.
6099if test "${with_pkgversion+set}" = set; then :
6100 withval=$with_pkgversion; case "$withval" in
6101 yes) as_fn_error "package version not specified" "$LINENO" 5 ;;
c16158bc
JM
6102 no) PKGVERSION= ;;
6103 *) PKGVERSION="($withval) " ;;
6104 esac
6105else
6106 PKGVERSION="(GDB) "
6107
81ecdfbb 6108fi
c16158bc
JM
6109
6110
6111
6112
81ecdfbb
RW
6113
6114# Check whether --with-bugurl was given.
6115if test "${with_bugurl+set}" = set; then :
6116 withval=$with_bugurl; case "$withval" in
6117 yes) as_fn_error "bug URL not specified" "$LINENO" 5 ;;
c16158bc
JM
6118 no) BUGURL=
6119 ;;
6120 *) BUGURL="$withval"
6121 ;;
6122 esac
6123else
6124 BUGURL="http://www.gnu.org/software/gdb/bugs/"
6125
81ecdfbb
RW
6126fi
6127
c16158bc
JM
6128 case ${BUGURL} in
6129 "")
6130 REPORT_BUGS_TO=
6131 REPORT_BUGS_TEXI=
6132 ;;
6133 *)
6134 REPORT_BUGS_TO="<$BUGURL>"
6135 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
6136 ;;
6137 esac;
6138
6139
6140
6141
6142cat >>confdefs.h <<_ACEOF
6143#define PKGVERSION "$PKGVERSION"
6144_ACEOF
6145
6146
6147cat >>confdefs.h <<_ACEOF
6148#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
6149_ACEOF
6150
6151
bec39cab
AC
6152# --------------------- #
6153# Checks for programs. #
6154# --------------------- #
6155
6156for ac_prog in gawk mawk nawk awk
6157do
6158 # Extract the first word of "$ac_prog", so it can be a program name with args.
6159set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
6160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6161$as_echo_n "checking for $ac_word... " >&6; }
6162if test "${ac_cv_prog_AWK+set}" = set; then :
6163 $as_echo_n "(cached) " >&6
bec39cab
AC
6164else
6165 if test -n "$AWK"; then
6166 ac_cv_prog_AWK="$AWK" # Let the user override the test.
6167else
6168as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6169for as_dir in $PATH
6170do
6171 IFS=$as_save_IFS
6172 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6173 for ac_exec_ext in '' $ac_executable_extensions; do
6174 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6175 ac_cv_prog_AWK="$ac_prog"
81ecdfbb 6176 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6177 break 2
6178 fi
6179done
81ecdfbb
RW
6180 done
6181IFS=$as_save_IFS
bec39cab
AC
6182
6183fi
6184fi
6185AWK=$ac_cv_prog_AWK
6186if test -n "$AWK"; then
81ecdfbb
RW
6187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
6188$as_echo "$AWK" >&6; }
bec39cab 6189else
81ecdfbb
RW
6190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6191$as_echo "no" >&6; }
bec39cab
AC
6192fi
6193
bec39cab 6194
81ecdfbb 6195 test -n "$AWK" && break
bec39cab
AC
6196done
6197
c971b7fa
PA
6198# Find a good install program. We prefer a C program (faster),
6199# so one script is as good as another. But avoid the broken or
6200# incompatible versions:
6201# SysV /etc/install, /usr/sbin/install
6202# SunOS /usr/etc/install
6203# IRIX /sbin/install
6204# AIX /bin/install
6205# AmigaOS /C/install, which installs bootblocks on floppy discs
6206# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6207# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6208# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6209# OS/2's system install, which has a completely different semantic
6210# ./install, which can be erroneously created by make from ./install.sh.
6211# Reject install programs that cannot install multiple files.
6212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6213$as_echo_n "checking for a BSD-compatible install... " >&6; }
6214if test -z "$INSTALL"; then
6215if test "${ac_cv_path_install+set}" = set; then :
6216 $as_echo_n "(cached) " >&6
6217else
6218 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6219for as_dir in $PATH
6220do
6221 IFS=$as_save_IFS
6222 test -z "$as_dir" && as_dir=.
6223 # Account for people who put trailing slashes in PATH elements.
6224case $as_dir/ in #((
6225 ./ | .// | /[cC]/* | \
6226 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
6227 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
6228 /usr/ucb/* ) ;;
6229 *)
6230 # OSF1 and SCO ODT 3.0 have their own names for install.
6231 # Don't use installbsd from OSF since it installs stuff as root
6232 # by default.
6233 for ac_prog in ginstall scoinst install; do
6234 for ac_exec_ext in '' $ac_executable_extensions; do
6235 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
6236 if test $ac_prog = install &&
6237 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6238 # AIX install. It has an incompatible calling convention.
6239 :
6240 elif test $ac_prog = install &&
6241 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6242 # program-specific install script used by HP pwplus--don't use.
6243 :
6244 else
6245 rm -rf conftest.one conftest.two conftest.dir
6246 echo one > conftest.one
6247 echo two > conftest.two
6248 mkdir conftest.dir
6249 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6250 test -s conftest.one && test -s conftest.two &&
6251 test -s conftest.dir/conftest.one &&
6252 test -s conftest.dir/conftest.two
6253 then
6254 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6255 break 3
6256 fi
6257 fi
6258 fi
6259 done
6260 done
6261 ;;
6262esac
6263
6264 done
6265IFS=$as_save_IFS
6266
6267rm -rf conftest.one conftest.two conftest.dir
6268
6269fi
6270 if test "${ac_cv_path_install+set}" = set; then
6271 INSTALL=$ac_cv_path_install
6272 else
6273 # As a last resort, use the slow shell script. Don't cache a
6274 # value for INSTALL within a source directory, because that will
6275 # break other packages using the cache if that directory is
6276 # removed, or if the value is a relative name.
6277 INSTALL=$ac_install_sh
6278 fi
6279fi
6280{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6281$as_echo "$INSTALL" >&6; }
6282
6283# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6284# It thinks the first close brace ends the variable substitution.
6285test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6286
6287test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6288
6289test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
bec39cab 6290
81ecdfbb
RW
6291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
6292$as_echo_n "checking whether ln -s works... " >&6; }
bec39cab
AC
6293LN_S=$as_ln_s
6294if test "$LN_S" = "ln -s"; then
81ecdfbb
RW
6295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6296$as_echo "yes" >&6; }
bec39cab 6297else
81ecdfbb
RW
6298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
6299$as_echo "no, using $LN_S" >&6; }
bec39cab
AC
6300fi
6301
6302if test -n "$ac_tool_prefix"; then
6303 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6304set dummy ${ac_tool_prefix}ranlib; ac_word=$2
81ecdfbb
RW
6305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6306$as_echo_n "checking for $ac_word... " >&6; }
6307if test "${ac_cv_prog_RANLIB+set}" = set; then :
6308 $as_echo_n "(cached) " >&6
bec39cab
AC
6309else
6310 if test -n "$RANLIB"; then
6311 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6312else
6313as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6314for as_dir in $PATH
6315do
6316 IFS=$as_save_IFS
6317 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6318 for ac_exec_ext in '' $ac_executable_extensions; do
6319 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6320 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
81ecdfbb 6321 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6322 break 2
6323 fi
6324done
81ecdfbb
RW
6325 done
6326IFS=$as_save_IFS
bec39cab
AC
6327
6328fi
6329fi
6330RANLIB=$ac_cv_prog_RANLIB
6331if test -n "$RANLIB"; then
81ecdfbb
RW
6332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6333$as_echo "$RANLIB" >&6; }
bec39cab 6334else
81ecdfbb
RW
6335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6336$as_echo "no" >&6; }
bec39cab
AC
6337fi
6338
81ecdfbb 6339
bec39cab
AC
6340fi
6341if test -z "$ac_cv_prog_RANLIB"; then
6342 ac_ct_RANLIB=$RANLIB
6343 # Extract the first word of "ranlib", so it can be a program name with args.
6344set dummy ranlib; ac_word=$2
81ecdfbb
RW
6345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6346$as_echo_n "checking for $ac_word... " >&6; }
6347if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
6348 $as_echo_n "(cached) " >&6
bec39cab
AC
6349else
6350 if test -n "$ac_ct_RANLIB"; then
6351 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6352else
6353as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6354for as_dir in $PATH
6355do
6356 IFS=$as_save_IFS
6357 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6358 for ac_exec_ext in '' $ac_executable_extensions; do
6359 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6360 ac_cv_prog_ac_ct_RANLIB="ranlib"
81ecdfbb 6361 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6362 break 2
6363 fi
6364done
81ecdfbb
RW
6365 done
6366IFS=$as_save_IFS
bec39cab 6367
bec39cab
AC
6368fi
6369fi
6370ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6371if test -n "$ac_ct_RANLIB"; then
81ecdfbb
RW
6372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6373$as_echo "$ac_ct_RANLIB" >&6; }
bec39cab 6374else
81ecdfbb
RW
6375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6376$as_echo "no" >&6; }
bec39cab
AC
6377fi
6378
81ecdfbb
RW
6379 if test "x$ac_ct_RANLIB" = x; then
6380 RANLIB=":"
6381 else
6382 case $cross_compiling:$ac_tool_warned in
6383yes:)
6384{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6385$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6386ac_tool_warned=yes ;;
6387esac
6388 RANLIB=$ac_ct_RANLIB
6389 fi
bec39cab
AC
6390else
6391 RANLIB="$ac_cv_prog_RANLIB"
6392fi
6393
6394for ac_prog in 'bison -y' byacc
6395do
6396 # Extract the first word of "$ac_prog", so it can be a program name with args.
6397set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
6398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6399$as_echo_n "checking for $ac_word... " >&6; }
6400if test "${ac_cv_prog_YACC+set}" = set; then :
6401 $as_echo_n "(cached) " >&6
bec39cab
AC
6402else
6403 if test -n "$YACC"; then
6404 ac_cv_prog_YACC="$YACC" # Let the user override the test.
6405else
6406as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6407for as_dir in $PATH
6408do
6409 IFS=$as_save_IFS
6410 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6411 for ac_exec_ext in '' $ac_executable_extensions; do
6412 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6413 ac_cv_prog_YACC="$ac_prog"
81ecdfbb 6414 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6415 break 2
6416 fi
6417done
81ecdfbb
RW
6418 done
6419IFS=$as_save_IFS
bec39cab
AC
6420
6421fi
6422fi
6423YACC=$ac_cv_prog_YACC
6424if test -n "$YACC"; then
81ecdfbb
RW
6425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
6426$as_echo "$YACC" >&6; }
bec39cab 6427else
81ecdfbb
RW
6428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6429$as_echo "no" >&6; }
bec39cab
AC
6430fi
6431
81ecdfbb 6432
bec39cab
AC
6433 test -n "$YACC" && break
6434done
6435test -n "$YACC" || YACC="yacc"
6436
6437
6438if test -n "$ac_tool_prefix"; then
6439 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6440set dummy ${ac_tool_prefix}ar; ac_word=$2
81ecdfbb
RW
6441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6442$as_echo_n "checking for $ac_word... " >&6; }
6443if test "${ac_cv_prog_AR+set}" = set; then :
6444 $as_echo_n "(cached) " >&6
bec39cab
AC
6445else
6446 if test -n "$AR"; then
6447 ac_cv_prog_AR="$AR" # Let the user override the test.
6448else
6449as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6450for as_dir in $PATH
6451do
6452 IFS=$as_save_IFS
6453 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6454 for ac_exec_ext in '' $ac_executable_extensions; do
6455 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6456 ac_cv_prog_AR="${ac_tool_prefix}ar"
81ecdfbb 6457 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6458 break 2
6459 fi
6460done
81ecdfbb
RW
6461 done
6462IFS=$as_save_IFS
bec39cab
AC
6463
6464fi
6465fi
6466AR=$ac_cv_prog_AR
6467if test -n "$AR"; then
81ecdfbb
RW
6468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6469$as_echo "$AR" >&6; }
bec39cab 6470else
81ecdfbb
RW
6471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6472$as_echo "no" >&6; }
bec39cab
AC
6473fi
6474
81ecdfbb 6475
bec39cab
AC
6476fi
6477if test -z "$ac_cv_prog_AR"; then
6478 ac_ct_AR=$AR
6479 # Extract the first word of "ar", so it can be a program name with args.
6480set dummy ar; ac_word=$2
81ecdfbb
RW
6481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6482$as_echo_n "checking for $ac_word... " >&6; }
6483if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
6484 $as_echo_n "(cached) " >&6
bec39cab
AC
6485else
6486 if test -n "$ac_ct_AR"; then
6487 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6488else
6489as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6490for as_dir in $PATH
6491do
6492 IFS=$as_save_IFS
6493 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6494 for ac_exec_ext in '' $ac_executable_extensions; do
6495 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6496 ac_cv_prog_ac_ct_AR="ar"
81ecdfbb 6497 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6498 break 2
6499 fi
6500done
81ecdfbb
RW
6501 done
6502IFS=$as_save_IFS
bec39cab
AC
6503
6504fi
6505fi
6506ac_ct_AR=$ac_cv_prog_ac_ct_AR
6507if test -n "$ac_ct_AR"; then
81ecdfbb
RW
6508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6509$as_echo "$ac_ct_AR" >&6; }
bec39cab 6510else
81ecdfbb
RW
6511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6512$as_echo "no" >&6; }
bec39cab
AC
6513fi
6514
81ecdfbb
RW
6515 if test "x$ac_ct_AR" = x; then
6516 AR=""
6517 else
6518 case $cross_compiling:$ac_tool_warned in
6519yes:)
6520{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6521$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6522ac_tool_warned=yes ;;
6523esac
6524 AR=$ac_ct_AR
6525 fi
bec39cab
AC
6526else
6527 AR="$ac_cv_prog_AR"
6528fi
6529
6530if test -n "$ac_tool_prefix"; then
6531 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
6532set dummy ${ac_tool_prefix}dlltool; ac_word=$2
81ecdfbb
RW
6533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6534$as_echo_n "checking for $ac_word... " >&6; }
6535if test "${ac_cv_prog_DLLTOOL+set}" = set; then :
6536 $as_echo_n "(cached) " >&6
bec39cab
AC
6537else
6538 if test -n "$DLLTOOL"; then
6539 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
6540else
6541as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6542for as_dir in $PATH
6543do
6544 IFS=$as_save_IFS
6545 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6546 for ac_exec_ext in '' $ac_executable_extensions; do
6547 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6548 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
81ecdfbb 6549 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6550 break 2
6551 fi
6552done
81ecdfbb
RW
6553 done
6554IFS=$as_save_IFS
bec39cab
AC
6555
6556fi
6557fi
6558DLLTOOL=$ac_cv_prog_DLLTOOL
6559if test -n "$DLLTOOL"; then
81ecdfbb
RW
6560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
6561$as_echo "$DLLTOOL" >&6; }
bec39cab 6562else
81ecdfbb
RW
6563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6564$as_echo "no" >&6; }
bec39cab
AC
6565fi
6566
81ecdfbb 6567
bec39cab
AC
6568fi
6569if test -z "$ac_cv_prog_DLLTOOL"; then
6570 ac_ct_DLLTOOL=$DLLTOOL
6571 # Extract the first word of "dlltool", so it can be a program name with args.
6572set dummy dlltool; ac_word=$2
81ecdfbb
RW
6573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6574$as_echo_n "checking for $ac_word... " >&6; }
6575if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then :
6576 $as_echo_n "(cached) " >&6
bec39cab
AC
6577else
6578 if test -n "$ac_ct_DLLTOOL"; then
6579 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
6580else
6581as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6582for as_dir in $PATH
6583do
6584 IFS=$as_save_IFS
6585 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6586 for ac_exec_ext in '' $ac_executable_extensions; do
6587 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6588 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
81ecdfbb 6589 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6590 break 2
6591 fi
6592done
81ecdfbb
RW
6593 done
6594IFS=$as_save_IFS
bec39cab
AC
6595
6596fi
6597fi
6598ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
6599if test -n "$ac_ct_DLLTOOL"; then
81ecdfbb
RW
6600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
6601$as_echo "$ac_ct_DLLTOOL" >&6; }
bec39cab 6602else
81ecdfbb
RW
6603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6604$as_echo "no" >&6; }
bec39cab
AC
6605fi
6606
81ecdfbb
RW
6607 if test "x$ac_ct_DLLTOOL" = x; then
6608 DLLTOOL=""
6609 else
6610 case $cross_compiling:$ac_tool_warned in
6611yes:)
6612{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6613$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6614ac_tool_warned=yes ;;
6615esac
6616 DLLTOOL=$ac_ct_DLLTOOL
6617 fi
bec39cab
AC
6618else
6619 DLLTOOL="$ac_cv_prog_DLLTOOL"
6620fi
6621
6622if test -n "$ac_tool_prefix"; then
6623 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
6624set dummy ${ac_tool_prefix}windres; ac_word=$2
81ecdfbb
RW
6625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6626$as_echo_n "checking for $ac_word... " >&6; }
6627if test "${ac_cv_prog_WINDRES+set}" = set; then :
6628 $as_echo_n "(cached) " >&6
bec39cab
AC
6629else
6630 if test -n "$WINDRES"; then
6631 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
6632else
6633as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6634for as_dir in $PATH
6635do
6636 IFS=$as_save_IFS
6637 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6638 for ac_exec_ext in '' $ac_executable_extensions; do
6639 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6640 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
81ecdfbb 6641 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6642 break 2
6643 fi
6644done
81ecdfbb
RW
6645 done
6646IFS=$as_save_IFS
bec39cab
AC
6647
6648fi
6649fi
6650WINDRES=$ac_cv_prog_WINDRES
6651if test -n "$WINDRES"; then
81ecdfbb
RW
6652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
6653$as_echo "$WINDRES" >&6; }
bec39cab 6654else
81ecdfbb
RW
6655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6656$as_echo "no" >&6; }
bec39cab
AC
6657fi
6658
81ecdfbb 6659
bec39cab
AC
6660fi
6661if test -z "$ac_cv_prog_WINDRES"; then
6662 ac_ct_WINDRES=$WINDRES
6663 # Extract the first word of "windres", so it can be a program name with args.
6664set dummy windres; ac_word=$2
81ecdfbb
RW
6665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6666$as_echo_n "checking for $ac_word... " >&6; }
6667if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then :
6668 $as_echo_n "(cached) " >&6
bec39cab
AC
6669else
6670 if test -n "$ac_ct_WINDRES"; then
6671 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
6672else
6673as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6674for as_dir in $PATH
6675do
6676 IFS=$as_save_IFS
6677 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6678 for ac_exec_ext in '' $ac_executable_extensions; do
6679 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6680 ac_cv_prog_ac_ct_WINDRES="windres"
81ecdfbb 6681 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6682 break 2
6683 fi
6684done
81ecdfbb
RW
6685 done
6686IFS=$as_save_IFS
bec39cab
AC
6687
6688fi
6689fi
6690ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
6691if test -n "$ac_ct_WINDRES"; then
81ecdfbb
RW
6692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
6693$as_echo "$ac_ct_WINDRES" >&6; }
bec39cab 6694else
81ecdfbb
RW
6695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6696$as_echo "no" >&6; }
c906108c 6697fi
bec39cab 6698
81ecdfbb
RW
6699 if test "x$ac_ct_WINDRES" = x; then
6700 WINDRES=""
6701 else
6702 case $cross_compiling:$ac_tool_warned in
6703yes:)
6704{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6705$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6706ac_tool_warned=yes ;;
6707esac
6708 WINDRES=$ac_ct_WINDRES
6709 fi
c906108c 6710else
bec39cab 6711 WINDRES="$ac_cv_prog_WINDRES"
c906108c
SS
6712fi
6713
bec39cab 6714
036c3acb
TS
6715case $host_os in
6716 gnu*)
6717 # Needed for GNU Hurd hosts.
6718 if test -n "$ac_tool_prefix"; then
bec39cab
AC
6719 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
6720set dummy ${ac_tool_prefix}mig; ac_word=$2
81ecdfbb
RW
6721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6722$as_echo_n "checking for $ac_word... " >&6; }
6723if test "${ac_cv_prog_MIG+set}" = set; then :
6724 $as_echo_n "(cached) " >&6
c906108c 6725else
bec39cab
AC
6726 if test -n "$MIG"; then
6727 ac_cv_prog_MIG="$MIG" # Let the user override the test.
6728else
6729as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6730for as_dir in $PATH
6731do
6732 IFS=$as_save_IFS
6733 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6734 for ac_exec_ext in '' $ac_executable_extensions; do
6735 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6736 ac_cv_prog_MIG="${ac_tool_prefix}mig"
81ecdfbb 6737 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6738 break 2
6739 fi
6740done
81ecdfbb
RW
6741 done
6742IFS=$as_save_IFS
bec39cab 6743
c906108c 6744fi
bec39cab
AC
6745fi
6746MIG=$ac_cv_prog_MIG
6747if test -n "$MIG"; then
81ecdfbb
RW
6748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
6749$as_echo "$MIG" >&6; }
c906108c 6750else
81ecdfbb
RW
6751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6752$as_echo "no" >&6; }
c906108c
SS
6753fi
6754
81ecdfbb 6755
bec39cab
AC
6756fi
6757if test -z "$ac_cv_prog_MIG"; then
6758 ac_ct_MIG=$MIG
6759 # Extract the first word of "mig", so it can be a program name with args.
6760set dummy mig; ac_word=$2
81ecdfbb
RW
6761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6762$as_echo_n "checking for $ac_word... " >&6; }
6763if test "${ac_cv_prog_ac_ct_MIG+set}" = set; then :
6764 $as_echo_n "(cached) " >&6
bec39cab
AC
6765else
6766 if test -n "$ac_ct_MIG"; then
6767 ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
6768else
6769as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6770for as_dir in $PATH
6771do
6772 IFS=$as_save_IFS
6773 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6774 for ac_exec_ext in '' $ac_executable_extensions; do
6775 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6776 ac_cv_prog_ac_ct_MIG="mig"
81ecdfbb 6777 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6778 break 2
6779 fi
6780done
81ecdfbb
RW
6781 done
6782IFS=$as_save_IFS
c906108c 6783
bec39cab
AC
6784fi
6785fi
6786ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
6787if test -n "$ac_ct_MIG"; then
81ecdfbb
RW
6788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
6789$as_echo "$ac_ct_MIG" >&6; }
bec39cab 6790else
81ecdfbb
RW
6791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6792$as_echo "no" >&6; }
bec39cab 6793fi
c906108c 6794
81ecdfbb
RW
6795 if test "x$ac_ct_MIG" = x; then
6796 MIG=""
6797 else
6798 case $cross_compiling:$ac_tool_warned in
6799yes:)
6800{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6801$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6802ac_tool_warned=yes ;;
6803esac
6804 MIG=$ac_ct_MIG
6805 fi
bec39cab
AC
6806else
6807 MIG="$ac_cv_prog_MIG"
6808fi
c906108c 6809
036c3acb
TS
6810 if test x"$MIG" = x; then
6811 as_fn_error "MIG not found but required for $host hosts" "$LINENO" 5
6812 fi
6813 ;;
6814esac
c906108c 6815
bec39cab
AC
6816# ---------------------- #
6817# Checks for libraries. #
6818# ---------------------- #
c906108c 6819
bec39cab 6820# We might need to link with -lm; most simulators need it.
81ecdfbb
RW
6821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
6822$as_echo_n "checking for main in -lm... " >&6; }
6823if test "${ac_cv_lib_m_main+set}" = set; then :
6824 $as_echo_n "(cached) " >&6
bec39cab
AC
6825else
6826 ac_check_lib_save_LIBS=$LIBS
6827LIBS="-lm $LIBS"
81ecdfbb 6828cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6829/* end confdefs.h. */
c906108c 6830
c906108c 6831
bec39cab
AC
6832int
6833main ()
6834{
81ecdfbb 6835return main ();
bec39cab
AC
6836 ;
6837 return 0;
6838}
6839_ACEOF
81ecdfbb 6840if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
6841 ac_cv_lib_m_main=yes
6842else
81ecdfbb 6843 ac_cv_lib_m_main=no
bec39cab 6844fi
81ecdfbb
RW
6845rm -f core conftest.err conftest.$ac_objext \
6846 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
6847LIBS=$ac_check_lib_save_LIBS
6848fi
81ecdfbb
RW
6849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
6850$as_echo "$ac_cv_lib_m_main" >&6; }
6851if test "x$ac_cv_lib_m_main" = x""yes; then :
bec39cab
AC
6852 cat >>confdefs.h <<_ACEOF
6853#define HAVE_LIBM 1
6854_ACEOF
6855
6856 LIBS="-lm $LIBS"
c906108c 6857
c906108c 6858fi
bec39cab
AC
6859
6860
6861# We need to link with -lw to get `wctype' on Solaris before Solaris
6862# 2.6. Solaris 2.6 and beyond have this function in libc, and have a
6863# libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
6864# is known to have this problem). Therefore we avoid libw if we can.
81ecdfbb
RW
6865ac_fn_c_check_func "$LINENO" "wctype" "ac_cv_func_wctype"
6866if test "x$ac_cv_func_wctype" = x""yes; then :
bec39cab 6867
c906108c 6868else
81ecdfbb
RW
6869 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype in -lw" >&5
6870$as_echo_n "checking for wctype in -lw... " >&6; }
6871if test "${ac_cv_lib_w_wctype+set}" = set; then :
6872 $as_echo_n "(cached) " >&6
bec39cab
AC
6873else
6874 ac_check_lib_save_LIBS=$LIBS
6875LIBS="-lw $LIBS"
81ecdfbb 6876cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6877/* end confdefs.h. */
c906108c 6878
81ecdfbb
RW
6879/* Override any GCC internal prototype to avoid an error.
6880 Use char because int might match the return type of a GCC
6881 builtin and then its argument prototype would still apply. */
bec39cab
AC
6882#ifdef __cplusplus
6883extern "C"
6884#endif
bec39cab
AC
6885char wctype ();
6886int
6887main ()
6888{
81ecdfbb 6889return wctype ();
bec39cab
AC
6890 ;
6891 return 0;
6892}
6893_ACEOF
81ecdfbb 6894if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
6895 ac_cv_lib_w_wctype=yes
6896else
81ecdfbb 6897 ac_cv_lib_w_wctype=no
bec39cab 6898fi
81ecdfbb
RW
6899rm -f core conftest.err conftest.$ac_objext \
6900 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
6901LIBS=$ac_check_lib_save_LIBS
6902fi
81ecdfbb
RW
6903{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_w_wctype" >&5
6904$as_echo "$ac_cv_lib_w_wctype" >&6; }
6905if test "x$ac_cv_lib_w_wctype" = x""yes; then :
bec39cab
AC
6906 cat >>confdefs.h <<_ACEOF
6907#define HAVE_LIBW 1
6908_ACEOF
c906108c 6909
bec39cab 6910 LIBS="-lw $LIBS"
c906108c 6911
bec39cab 6912fi
c906108c 6913
bec39cab 6914fi
c906108c 6915
ddc9cd0f 6916
bec39cab 6917# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
81ecdfbb
RW
6918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
6919$as_echo_n "checking for library containing gethostbyname... " >&6; }
6920if test "${ac_cv_search_gethostbyname+set}" = set; then :
6921 $as_echo_n "(cached) " >&6
bec39cab
AC
6922else
6923 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6924cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6925/* end confdefs.h. */
ddc9cd0f 6926
81ecdfbb
RW
6927/* Override any GCC internal prototype to avoid an error.
6928 Use char because int might match the return type of a GCC
6929 builtin and then its argument prototype would still apply. */
bec39cab
AC
6930#ifdef __cplusplus
6931extern "C"
6932#endif
bec39cab
AC
6933char gethostbyname ();
6934int
6935main ()
6936{
81ecdfbb 6937return gethostbyname ();
bec39cab
AC
6938 ;
6939 return 0;
6940}
6941_ACEOF
81ecdfbb
RW
6942for ac_lib in '' nsl; do
6943 if test -z "$ac_lib"; then
6944 ac_res="none required"
6945 else
6946 ac_res=-l$ac_lib
b4e70030 6947 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
6948 fi
6949 if ac_fn_c_try_link "$LINENO"; then :
6950 ac_cv_search_gethostbyname=$ac_res
6951fi
6952rm -f core conftest.err conftest.$ac_objext \
6953 conftest$ac_exeext
6954 if test "${ac_cv_search_gethostbyname+set}" = set; then :
6955 break
6956fi
6957done
6958if test "${ac_cv_search_gethostbyname+set}" = set; then :
ddc9cd0f 6959
bec39cab 6960else
81ecdfbb 6961 ac_cv_search_gethostbyname=no
bec39cab 6962fi
81ecdfbb 6963rm conftest.$ac_ext
bec39cab
AC
6964LIBS=$ac_func_search_save_LIBS
6965fi
81ecdfbb
RW
6966{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
6967$as_echo "$ac_cv_search_gethostbyname" >&6; }
6968ac_res=$ac_cv_search_gethostbyname
6969if test "$ac_res" != no; then :
6970 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
96baa820 6971
bec39cab 6972fi
96baa820 6973
c906108c 6974
b4e70030 6975# Some systems (e.g. Solaris) have `socketpair' in libsocket.
81ecdfbb
RW
6976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
6977$as_echo_n "checking for library containing socketpair... " >&6; }
6978if test "${ac_cv_search_socketpair+set}" = set; then :
6979 $as_echo_n "(cached) " >&6
b4e70030
JB
6980else
6981 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6982cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
6983/* end confdefs.h. */
6984
81ecdfbb
RW
6985/* Override any GCC internal prototype to avoid an error.
6986 Use char because int might match the return type of a GCC
6987 builtin and then its argument prototype would still apply. */
b4e70030
JB
6988#ifdef __cplusplus
6989extern "C"
6990#endif
b4e70030
JB
6991char socketpair ();
6992int
6993main ()
6994{
81ecdfbb 6995return socketpair ();
b4e70030
JB
6996 ;
6997 return 0;
6998}
6999_ACEOF
81ecdfbb
RW
7000for ac_lib in '' socket; do
7001 if test -z "$ac_lib"; then
7002 ac_res="none required"
7003 else
7004 ac_res=-l$ac_lib
b4e70030 7005 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
7006 fi
7007 if ac_fn_c_try_link "$LINENO"; then :
7008 ac_cv_search_socketpair=$ac_res
7009fi
7010rm -f core conftest.err conftest.$ac_objext \
7011 conftest$ac_exeext
7012 if test "${ac_cv_search_socketpair+set}" = set; then :
7013 break
7014fi
7015done
7016if test "${ac_cv_search_socketpair+set}" = set; then :
b4e70030 7017
b4e70030 7018else
81ecdfbb 7019 ac_cv_search_socketpair=no
b4e70030 7020fi
81ecdfbb 7021rm conftest.$ac_ext
b4e70030
JB
7022LIBS=$ac_func_search_save_LIBS
7023fi
81ecdfbb
RW
7024{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
7025$as_echo "$ac_cv_search_socketpair" >&6; }
7026ac_res=$ac_cv_search_socketpair
7027if test "$ac_res" != no; then :
7028 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
b4e70030
JB
7029
7030fi
7031
7032
233a11ab 7033# Link in zlib if we can. This allows us to read compressed debug sections.
b040ad30 7034
711a72d3 7035 # Use the system's zlib library.
39f3de7c
L
7036 zlibdir="-L\$(top_builddir)/../zlib"
7037 zlibinc="-I\$(top_srcdir)/../zlib"
b040ad30 7038
711a72d3
L
7039# Check whether --with-system-zlib was given.
7040if test "${with_system_zlib+set}" = set; then :
afa59b79
L
7041 withval=$with_system_zlib; if test x$with_system_zlib = xyes ; then
7042 zlibdir=
7043 zlibinc=
7044 fi
b040ad30 7045
233a11ab 7046fi
233a11ab 7047
233a11ab 7048
233a11ab 7049
b040ad30 7050
233a11ab 7051
25268153 7052# On FreeBSD we may need libutil for kinfo_getvmmap (used by fbsd-nat.c).
37773e78 7053# On GNU/kFreeBSD systems, FreeBSD libutil is renamed to libutil-freebsd.
25268153
JB
7054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getvmmap" >&5
7055$as_echo_n "checking for library containing kinfo_getvmmap... " >&6; }
7056if test "${ac_cv_search_kinfo_getvmmap+set}" = set; then :
7057 $as_echo_n "(cached) " >&6
7058else
7059 ac_func_search_save_LIBS=$LIBS
7060cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7061/* end confdefs.h. */
7062
7063/* Override any GCC internal prototype to avoid an error.
7064 Use char because int might match the return type of a GCC
7065 builtin and then its argument prototype would still apply. */
7066#ifdef __cplusplus
7067extern "C"
7068#endif
7069char kinfo_getvmmap ();
7070int
7071main ()
7072{
7073return kinfo_getvmmap ();
7074 ;
7075 return 0;
7076}
7077_ACEOF
37773e78 7078for ac_lib in '' util util-freebsd; do
25268153
JB
7079 if test -z "$ac_lib"; then
7080 ac_res="none required"
7081 else
7082 ac_res=-l$ac_lib
7083 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7084 fi
7085 if ac_fn_c_try_link "$LINENO"; then :
7086 ac_cv_search_kinfo_getvmmap=$ac_res
7087fi
7088rm -f core conftest.err conftest.$ac_objext \
7089 conftest$ac_exeext
7090 if test "${ac_cv_search_kinfo_getvmmap+set}" = set; then :
7091 break
7092fi
7093done
7094if test "${ac_cv_search_kinfo_getvmmap+set}" = set; then :
7095
7096else
7097 ac_cv_search_kinfo_getvmmap=no
7098fi
7099rm conftest.$ac_ext
7100LIBS=$ac_func_search_save_LIBS
7101fi
7102{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getvmmap" >&5
7103$as_echo "$ac_cv_search_kinfo_getvmmap" >&6; }
7104ac_res=$ac_cv_search_kinfo_getvmmap
7105if test "$ac_res" != no; then :
7106 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7107
7108$as_echo "#define HAVE_KINFO_GETVMMAP 1" >>confdefs.h
7109
7110fi
7111
7112
77f120bf 7113
016a3251
DD
7114 if test "X$prefix" = "XNONE"; then
7115 acl_final_prefix="$ac_default_prefix"
7116 else
7117 acl_final_prefix="$prefix"
7118 fi
7119 if test "X$exec_prefix" = "XNONE"; then
7120 acl_final_exec_prefix='${prefix}'
7121 else
7122 acl_final_exec_prefix="$exec_prefix"
7123 fi
7124 acl_save_prefix="$prefix"
7125 prefix="$acl_final_prefix"
7126 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
7127 prefix="$acl_save_prefix"
7128
7129
7130# Check whether --with-gnu-ld was given.
7131if test "${with_gnu_ld+set}" = set; then :
7132 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
7133else
7134 with_gnu_ld=no
7135fi
7136
7137# Prepare PATH_SEPARATOR.
7138# The user is always right.
7139if test "${PATH_SEPARATOR+set}" != set; then
7140 echo "#! /bin/sh" >conf$$.sh
7141 echo "exit 0" >>conf$$.sh
7142 chmod +x conf$$.sh
7143 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
7144 PATH_SEPARATOR=';'
7145 else
7146 PATH_SEPARATOR=:
7147 fi
7148 rm -f conf$$.sh
7149fi
7150ac_prog=ld
7151if test "$GCC" = yes; then
7152 # Check if gcc -print-prog-name=ld gives a path.
7153 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
7154$as_echo_n "checking for ld used by GCC... " >&6; }
7155 case $host in
7156 *-*-mingw*)
7157 # gcc leaves a trailing carriage return which upsets mingw
7158 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
7159 *)
7160 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
7161 esac
7162 case $ac_prog in
7163 # Accept absolute paths.
7164 [\\/]* | [A-Za-z]:[\\/]*)
7165 re_direlt='/[^/][^/]*/\.\./'
7166 # Canonicalize the path of ld
7167 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
7168 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
7169 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
7170 done
7171 test -z "$LD" && LD="$ac_prog"
7172 ;;
7173 "")
7174 # If it fails, then pretend we aren't using GCC.
7175 ac_prog=ld
7176 ;;
7177 *)
7178 # If it is relative, then search for the first ld in PATH.
7179 with_gnu_ld=unknown
7180 ;;
7181 esac
7182elif test "$with_gnu_ld" = yes; then
7183 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
7184$as_echo_n "checking for GNU ld... " >&6; }
7185else
7186 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
7187$as_echo_n "checking for non-GNU ld... " >&6; }
7188fi
7189if test "${acl_cv_path_LD+set}" = set; then :
7190 $as_echo_n "(cached) " >&6
7191else
7192 if test -z "$LD"; then
7193 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
7194 for ac_dir in $PATH; do
7195 test -z "$ac_dir" && ac_dir=.
7196 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
7197 acl_cv_path_LD="$ac_dir/$ac_prog"
7198 # Check to see if the program is GNU ld. I'd rather use --version,
7199 # but apparently some GNU ld's only accept -v.
7200 # Break only if it was the GNU/non-GNU ld that we prefer.
7201 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
7202 test "$with_gnu_ld" != no && break
7203 else
7204 test "$with_gnu_ld" != yes && break
7205 fi
7206 fi
7207 done
7208 IFS="$ac_save_ifs"
7209else
7210 acl_cv_path_LD="$LD" # Let the user override the test with a path.
7211fi
7212fi
7213
7214LD="$acl_cv_path_LD"
7215if test -n "$LD"; then
7216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
7217$as_echo "$LD" >&6; }
7218else
7219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7220$as_echo "no" >&6; }
7221fi
7222test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
7223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
7224$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
7225if test "${acl_cv_prog_gnu_ld+set}" = set; then :
7226 $as_echo_n "(cached) " >&6
7227else
7228 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
7229if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
7230 acl_cv_prog_gnu_ld=yes
7231else
7232 acl_cv_prog_gnu_ld=no
7233fi
7234fi
7235{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
7236$as_echo "$acl_cv_prog_gnu_ld" >&6; }
7237with_gnu_ld=$acl_cv_prog_gnu_ld
7238
7239
7240
7241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
7242$as_echo_n "checking for shared library run path origin... " >&6; }
7243if test "${acl_cv_rpath+set}" = set; then :
7244 $as_echo_n "(cached) " >&6
7245else
7246
7247 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
7248 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
7249 . ./conftest.sh
7250 rm -f ./conftest.sh
7251 acl_cv_rpath=done
7252
7253fi
7254{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
7255$as_echo "$acl_cv_rpath" >&6; }
7256 wl="$acl_cv_wl"
7257 libext="$acl_cv_libext"
7258 shlibext="$acl_cv_shlibext"
7259 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
7260 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
7261 hardcode_direct="$acl_cv_hardcode_direct"
7262 hardcode_minus_L="$acl_cv_hardcode_minus_L"
7263 # Check whether --enable-rpath was given.
7264if test "${enable_rpath+set}" = set; then :
7265 enableval=$enable_rpath; :
7266else
7267 enable_rpath=yes
7268fi
7269
7270
7271
7272
7273
7274
7275
7276
7277 use_additional=yes
7278
7279 acl_save_prefix="$prefix"
7280 prefix="$acl_final_prefix"
7281 acl_save_exec_prefix="$exec_prefix"
7282 exec_prefix="$acl_final_exec_prefix"
7283
7284 eval additional_includedir=\"$includedir\"
7285 eval additional_libdir=\"$libdir\"
7286
7287 exec_prefix="$acl_save_exec_prefix"
7288 prefix="$acl_save_prefix"
77f120bf 7289
6c7a06a3 7290
81ecdfbb
RW
7291# Check whether --with-libiconv-prefix was given.
7292if test "${with_libiconv_prefix+set}" = set; then :
7293 withval=$with_libiconv_prefix;
016a3251
DD
7294 if test "X$withval" = "Xno"; then
7295 use_additional=no
7296 else
7297 if test "X$withval" = "X"; then
7298
7299 acl_save_prefix="$prefix"
7300 prefix="$acl_final_prefix"
7301 acl_save_exec_prefix="$exec_prefix"
7302 exec_prefix="$acl_final_exec_prefix"
7303
7304 eval additional_includedir=\"$includedir\"
7305 eval additional_libdir=\"$libdir\"
7306
7307 exec_prefix="$acl_save_exec_prefix"
7308 prefix="$acl_save_prefix"
7309
7310 else
7311 additional_includedir="$withval/include"
7312 additional_libdir="$withval/lib"
7313 fi
7314 fi
6c7a06a3 7315
81ecdfbb
RW
7316fi
7317
016a3251
DD
7318 LIBICONV=
7319 LTLIBICONV=
7320 INCICONV=
7321 rpathdirs=
7322 ltrpathdirs=
7323 names_already_handled=
7324 names_next_round='iconv '
7325 while test -n "$names_next_round"; do
7326 names_this_round="$names_next_round"
7327 names_next_round=
7328 for name in $names_this_round; do
7329 already_handled=
7330 for n in $names_already_handled; do
7331 if test "$n" = "$name"; then
7332 already_handled=yes
7333 break
7334 fi
7335 done
7336 if test -z "$already_handled"; then
7337 names_already_handled="$names_already_handled $name"
7338 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
7339 eval value=\"\$HAVE_LIB$uppername\"
7340 if test -n "$value"; then
7341 if test "$value" = yes; then
7342 eval value=\"\$LIB$uppername\"
7343 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
7344 eval value=\"\$LTLIB$uppername\"
7345 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
7346 else
7347 :
7348 fi
7349 else
7350 found_dir=
7351 found_la=
7352 found_so=
7353 found_a=
7354 if test $use_additional = yes; then
7355 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
7356 found_dir="$additional_libdir"
7357 found_so="$additional_libdir/lib$name.$shlibext"
7358 if test -f "$additional_libdir/lib$name.la"; then
7359 found_la="$additional_libdir/lib$name.la"
7360 fi
7361 else
7362 if test -f "$additional_libdir/lib$name.$libext"; then
7363 found_dir="$additional_libdir"
7364 found_a="$additional_libdir/lib$name.$libext"
7365 if test -f "$additional_libdir/lib$name.la"; then
7366 found_la="$additional_libdir/lib$name.la"
7367 fi
7368 fi
7369 fi
7370 fi
7371 if test "X$found_dir" = "X"; then
7372 for x in $LDFLAGS $LTLIBICONV; do
7373
7374 acl_save_prefix="$prefix"
7375 prefix="$acl_final_prefix"
7376 acl_save_exec_prefix="$exec_prefix"
7377 exec_prefix="$acl_final_exec_prefix"
7378 eval x=\"$x\"
7379 exec_prefix="$acl_save_exec_prefix"
7380 prefix="$acl_save_prefix"
7381
7382 case "$x" in
7383 -L*)
7384 dir=`echo "X$x" | sed -e 's/^X-L//'`
7385 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
7386 found_dir="$dir"
7387 found_so="$dir/lib$name.$shlibext"
7388 if test -f "$dir/lib$name.la"; then
7389 found_la="$dir/lib$name.la"
7390 fi
7391 else
7392 if test -f "$dir/lib$name.$libext"; then
7393 found_dir="$dir"
7394 found_a="$dir/lib$name.$libext"
7395 if test -f "$dir/lib$name.la"; then
7396 found_la="$dir/lib$name.la"
7397 fi
7398 fi
7399 fi
7400 ;;
7401 esac
7402 if test "X$found_dir" != "X"; then
7403 break
7404 fi
7405 done
7406 fi
7407 if test "X$found_dir" != "X"; then
7408 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
7409 if test "X$found_so" != "X"; then
7410 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
7411 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
7412 else
7413 haveit=
7414 for x in $ltrpathdirs; do
7415 if test "X$x" = "X$found_dir"; then
7416 haveit=yes
7417 break
7418 fi
7419 done
7420 if test -z "$haveit"; then
7421 ltrpathdirs="$ltrpathdirs $found_dir"
7422 fi
7423 if test "$hardcode_direct" = yes; then
7424 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
7425 else
7426 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
7427 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
7428 haveit=
7429 for x in $rpathdirs; do
7430 if test "X$x" = "X$found_dir"; then
7431 haveit=yes
7432 break
7433 fi
7434 done
7435 if test -z "$haveit"; then
7436 rpathdirs="$rpathdirs $found_dir"
7437 fi
7438 else
7439 haveit=
7440 for x in $LDFLAGS $LIBICONV; do
7441
7442 acl_save_prefix="$prefix"
7443 prefix="$acl_final_prefix"
7444 acl_save_exec_prefix="$exec_prefix"
7445 exec_prefix="$acl_final_exec_prefix"
7446 eval x=\"$x\"
7447 exec_prefix="$acl_save_exec_prefix"
7448 prefix="$acl_save_prefix"
7449
7450 if test "X$x" = "X-L$found_dir"; then
7451 haveit=yes
7452 break
7453 fi
7454 done
7455 if test -z "$haveit"; then
7456 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
7457 fi
7458 if test "$hardcode_minus_L" != no; then
7459 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
7460 else
7461 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
7462 fi
7463 fi
7464 fi
7465 fi
7466 else
7467 if test "X$found_a" != "X"; then
7468 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
7469 else
7470 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
7471 fi
7472 fi
7473 additional_includedir=
7474 case "$found_dir" in
7475 */lib | */lib/)
7476 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
7477 additional_includedir="$basedir/include"
7478 ;;
7479 esac
7480 if test "X$additional_includedir" != "X"; then
7481 if test "X$additional_includedir" != "X/usr/include"; then
7482 haveit=
7483 if test "X$additional_includedir" = "X/usr/local/include"; then
7484 if test -n "$GCC"; then
7485 case $host_os in
7486 linux*) haveit=yes;;
7487 esac
7488 fi
7489 fi
7490 if test -z "$haveit"; then
7491 for x in $CPPFLAGS $INCICONV; do
7492
7493 acl_save_prefix="$prefix"
7494 prefix="$acl_final_prefix"
7495 acl_save_exec_prefix="$exec_prefix"
7496 exec_prefix="$acl_final_exec_prefix"
7497 eval x=\"$x\"
7498 exec_prefix="$acl_save_exec_prefix"
7499 prefix="$acl_save_prefix"
7500
7501 if test "X$x" = "X-I$additional_includedir"; then
7502 haveit=yes
7503 break
7504 fi
7505 done
7506 if test -z "$haveit"; then
7507 if test -d "$additional_includedir"; then
7508 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
7509 fi
7510 fi
7511 fi
7512 fi
7513 fi
7514 if test -n "$found_la"; then
7515 save_libdir="$libdir"
7516 case "$found_la" in
7517 */* | *\\*) . "$found_la" ;;
7518 *) . "./$found_la" ;;
7519 esac
7520 libdir="$save_libdir"
7521 for dep in $dependency_libs; do
7522 case "$dep" in
7523 -L*)
7524 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
7525 if test "X$additional_libdir" != "X/usr/lib"; then
7526 haveit=
7527 if test "X$additional_libdir" = "X/usr/local/lib"; then
7528 if test -n "$GCC"; then
7529 case $host_os in
7530 linux*) haveit=yes;;
7531 esac
7532 fi
7533 fi
7534 if test -z "$haveit"; then
7535 haveit=
7536 for x in $LDFLAGS $LIBICONV; do
7537
7538 acl_save_prefix="$prefix"
7539 prefix="$acl_final_prefix"
7540 acl_save_exec_prefix="$exec_prefix"
7541 exec_prefix="$acl_final_exec_prefix"
7542 eval x=\"$x\"
7543 exec_prefix="$acl_save_exec_prefix"
7544 prefix="$acl_save_prefix"
7545
7546 if test "X$x" = "X-L$additional_libdir"; then
7547 haveit=yes
7548 break
7549 fi
7550 done
7551 if test -z "$haveit"; then
7552 if test -d "$additional_libdir"; then
7553 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
7554 fi
7555 fi
7556 haveit=
7557 for x in $LDFLAGS $LTLIBICONV; do
7558
7559 acl_save_prefix="$prefix"
7560 prefix="$acl_final_prefix"
7561 acl_save_exec_prefix="$exec_prefix"
7562 exec_prefix="$acl_final_exec_prefix"
7563 eval x=\"$x\"
7564 exec_prefix="$acl_save_exec_prefix"
7565 prefix="$acl_save_prefix"
7566
7567 if test "X$x" = "X-L$additional_libdir"; then
7568 haveit=yes
7569 break
7570 fi
7571 done
7572 if test -z "$haveit"; then
7573 if test -d "$additional_libdir"; then
7574 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
7575 fi
7576 fi
7577 fi
7578 fi
7579 ;;
7580 -R*)
7581 dir=`echo "X$dep" | sed -e 's/^X-R//'`
7582 if test "$enable_rpath" != no; then
7583 haveit=
7584 for x in $rpathdirs; do
7585 if test "X$x" = "X$dir"; then
7586 haveit=yes
7587 break
7588 fi
7589 done
7590 if test -z "$haveit"; then
7591 rpathdirs="$rpathdirs $dir"
7592 fi
7593 haveit=
7594 for x in $ltrpathdirs; do
7595 if test "X$x" = "X$dir"; then
7596 haveit=yes
7597 break
7598 fi
7599 done
7600 if test -z "$haveit"; then
7601 ltrpathdirs="$ltrpathdirs $dir"
7602 fi
7603 fi
7604 ;;
7605 -l*)
7606 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
7607 ;;
7608 *.la)
7609 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
7610 ;;
7611 *)
7612 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
7613 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
7614 ;;
7615 esac
7616 done
7617 fi
7618 else
7619 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
7620 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
7621 fi
7622 fi
7623 fi
7624 done
7625 done
7626 if test "X$rpathdirs" != "X"; then
7627 if test -n "$hardcode_libdir_separator"; then
7628 alldirs=
7629 for found_dir in $rpathdirs; do
7630 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
7631 done
7632 acl_save_libdir="$libdir"
7633 libdir="$alldirs"
7634 eval flag=\"$hardcode_libdir_flag_spec\"
7635 libdir="$acl_save_libdir"
7636 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
7637 else
7638 for found_dir in $rpathdirs; do
7639 acl_save_libdir="$libdir"
7640 libdir="$found_dir"
7641 eval flag=\"$hardcode_libdir_flag_spec\"
7642 libdir="$acl_save_libdir"
7643 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
7644 done
7645 fi
7646 fi
7647 if test "X$ltrpathdirs" != "X"; then
7648 for found_dir in $ltrpathdirs; do
7649 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
7650 done
7651 fi
7652
7653
7654
7655
7656
6c7a06a3 7657
6c7a06a3 7658
81ecdfbb
RW
7659 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
7660$as_echo_n "checking for iconv... " >&6; }
7661if test "${am_cv_func_iconv+set}" = set; then :
7662 $as_echo_n "(cached) " >&6
d542061a 7663else
6c7a06a3
TT
7664
7665 am_cv_func_iconv="no, consider installing GNU libiconv"
7666 am_cv_lib_iconv=no
016a3251
DD
7667 am_save_CPPFLAGS="$CPPFLAGS"
7668 CPPFLAGS="$CPPFLAGS $INCICONV"
7669 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 7670/* end confdefs.h. */
6c7a06a3
TT
7671#include <stdlib.h>
7672#include <iconv.h>
d542061a
UW
7673int
7674main ()
7675{
6c7a06a3 7676iconv_t cd = iconv_open("","");
016a3251
DD
7677 iconv(cd,NULL,NULL,NULL,NULL);
7678 iconv_close(cd);
d542061a
UW
7679 ;
7680 return 0;
7681}
7682_ACEOF
81ecdfbb 7683if ac_fn_c_try_link "$LINENO"; then :
016a3251 7684 am_cv_func_iconv=yes
d542061a 7685fi
81ecdfbb
RW
7686rm -f core conftest.err conftest.$ac_objext \
7687 conftest$ac_exeext conftest.$ac_ext
016a3251 7688 CPPFLAGS="$am_save_CPPFLAGS"
94ae1714 7689
016a3251
DD
7690 if test "$am_cv_func_iconv" != yes && test -d ../libiconv; then
7691 for _libs in .libs _libs; do
7692 am_save_CPPFLAGS="$CPPFLAGS"
7693 am_save_LIBS="$LIBS"
7694 CPPFLAGS="$CPPFLAGS -I../libiconv/include"
7695 LIBS="$LIBS ../libiconv/lib/$_libs/libiconv.a"
7696 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 7697/* end confdefs.h. */
6c7a06a3
TT
7698#include <stdlib.h>
7699#include <iconv.h>
d542061a
UW
7700int
7701main ()
7702{
6c7a06a3 7703iconv_t cd = iconv_open("","");
016a3251
DD
7704 iconv(cd,NULL,NULL,NULL,NULL);
7705 iconv_close(cd);
d542061a
UW
7706 ;
7707 return 0;
7708}
7709_ACEOF
81ecdfbb 7710if ac_fn_c_try_link "$LINENO"; then :
016a3251
DD
7711 INCICONV="-I../libiconv/include"
7712 LIBICONV='${top_builddir}'/../libiconv/lib/$_libs/libiconv.a
7713 LTLIBICONV='${top_builddir}'/../libiconv/lib/libiconv.la
7714 am_cv_lib_iconv=yes
7715 am_cv_func_iconv=yes
d542061a 7716fi
81ecdfbb
RW
7717rm -f core conftest.err conftest.$ac_objext \
7718 conftest$ac_exeext conftest.$ac_ext
016a3251
DD
7719 CPPFLAGS="$am_save_CPPFLAGS"
7720 LIBS="$am_save_LIBS"
7721 if test "$am_cv_func_iconv" = "yes"; then
7722 break
7723 fi
7724 done
77f120bf 7725 fi
94ae1714 7726
4edb1e84 7727 if test "$am_cv_func_iconv" != yes; then
6c7a06a3 7728 am_save_CPPFLAGS="$CPPFLAGS"
4edb1e84 7729 am_save_LIBS="$LIBS"
016a3251
DD
7730 CPPFLAGS="$LIBS $INCICONV"
7731 LIBS="$LIBS $LIBICONV"
81ecdfbb 7732 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7733/* end confdefs.h. */
6c7a06a3
TT
7734#include <stdlib.h>
7735#include <iconv.h>
bec39cab
AC
7736int
7737main ()
7738{
6c7a06a3
TT
7739iconv_t cd = iconv_open("","");
7740 iconv(cd,NULL,NULL,NULL,NULL);
7741 iconv_close(cd);
bec39cab
AC
7742 ;
7743 return 0;
7744}
7745_ACEOF
81ecdfbb 7746if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 7747 am_cv_lib_iconv=yes
6c7a06a3 7748 am_cv_func_iconv=yes
627af7ea 7749fi
81ecdfbb
RW
7750rm -f core conftest.err conftest.$ac_objext \
7751 conftest$ac_exeext conftest.$ac_ext
fc3b640d 7752 CPPFLAGS="$am_save_CPPFLAGS"
016a3251 7753 LIBS="$am_save_LIBS"
6c7a06a3
TT
7754 fi
7755
7756fi
81ecdfbb
RW
7757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
7758$as_echo "$am_cv_func_iconv" >&6; }
016a3251
DD
7759 if test "$am_cv_func_iconv" = yes; then
7760
7761$as_echo "#define HAVE_ICONV 1" >>confdefs.h
94ae1714 7762
016a3251 7763 fi
fc3b640d 7764 if test "$am_cv_lib_iconv" = yes; then
016a3251
DD
7765
7766 for element in $INCICONV; do
7767 haveit=
7768 for x in $CPPFLAGS; do
7769
7770 acl_save_prefix="$prefix"
7771 prefix="$acl_final_prefix"
7772 acl_save_exec_prefix="$exec_prefix"
7773 exec_prefix="$acl_final_exec_prefix"
7774 eval x=\"$x\"
7775 exec_prefix="$acl_save_exec_prefix"
7776 prefix="$acl_save_prefix"
7777
7778 if test "X$x" = "X$element"; then
7779 haveit=yes
7780 break
7781 fi
7782 done
7783 if test -z "$haveit"; then
7784 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
7785 fi
7786 done
7787
7788 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
7789$as_echo_n "checking how to link with libiconv... " >&6; }
7790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
7791$as_echo "$LIBICONV" >&6; }
94ae1714 7792 else
016a3251
DD
7793 LIBICONV=
7794 LTLIBICONV=
fc3b640d 7795 fi
94ae1714 7796
6c7a06a3 7797
6c7a06a3 7798
016a3251 7799 if test "$am_cv_func_iconv" = yes; then
81ecdfbb
RW
7800 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
7801$as_echo_n "checking for iconv declaration... " >&6; }
7802 if test "${am_cv_proto_iconv+set}" = set; then :
7803 $as_echo_n "(cached) " >&6
6c7a06a3
TT
7804else
7805
81ecdfbb 7806 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
7807/* end confdefs.h. */
7808
6c7a06a3
TT
7809#include <stdlib.h>
7810#include <iconv.h>
7811extern
b4e70030 7812#ifdef __cplusplus
6c7a06a3 7813"C"
b4e70030 7814#endif
6c7a06a3
TT
7815#if defined(__STDC__) || defined(__cplusplus)
7816size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
7817#else
7818size_t iconv();
7819#endif
7820
b4e70030
JB
7821int
7822main ()
7823{
6c7a06a3 7824
b4e70030
JB
7825 ;
7826 return 0;
7827}
7828_ACEOF
81ecdfbb 7829if ac_fn_c_try_compile "$LINENO"; then :
6c7a06a3 7830 am_cv_proto_iconv_arg1=""
4e8d927d 7831else
81ecdfbb 7832 am_cv_proto_iconv_arg1="const"
b4e70030 7833fi
81ecdfbb 7834rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6c7a06a3
TT
7835 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);"
7836fi
7837
7838 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
81ecdfbb 7839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
6c7a06a3 7840 }$am_cv_proto_iconv" >&5
81ecdfbb
RW
7841$as_echo "${ac_t:-
7842 }$am_cv_proto_iconv" >&6; }
6c7a06a3
TT
7843
7844cat >>confdefs.h <<_ACEOF
7845#define ICONV_CONST $am_cv_proto_iconv_arg1
7846_ACEOF
7847
7848 fi
6c7a06a3
TT
7849
7850
478aac75
DE
7851# GDB may fork/exec the iconv program to get the list of supported character
7852# sets. Allow the user to specify where to find it.
7853# There are several factors affecting the choice of option name:
7854# - There is already --with-libiconv-prefix but we can't use it, it specifies
7855# the build-time location of libiconv files.
7856# - The program we need to find is iconv, which comes with glibc. The user
7857# doesn't necessarily have libiconv installed. Therefore naming this
7858# --with-libiconv-foo feels wrong.
7859# - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is
7860# defined to work on directories not files (though it really doesn't know
7861# the difference).
7862# - Calling this --with-iconv-prefix is perceived to cause too much confusion
7863# with --with-libiconv-prefix.
7864# Putting these together is why the option name is --with-iconv-bin.
7865
7866
7867# Check whether --with-iconv-bin was given.
7868if test "${with_iconv_bin+set}" = set; then :
7869 withval=$with_iconv_bin; iconv_bin="${withval}"
7870
7871cat >>confdefs.h <<_ACEOF
7872#define ICONV_BIN "${iconv_bin}"
7873_ACEOF
7874
7875
7876 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
7877 if test "x$prefix" = xNONE; then
7878 test_prefix=/usr/local
7879 else
7880 test_prefix=$prefix
7881 fi
7882 else
7883 test_prefix=$exec_prefix
7884 fi
7885 value=0
7886 case ${iconv_bin} in
7887 "${test_prefix}"|"${test_prefix}/"*|\
7888 '${exec_prefix}'|'${exec_prefix}/'*)
7889 value=1
7890 ;;
7891 esac
7892
7893cat >>confdefs.h <<_ACEOF
7894#define ICONV_BIN_RELOCATABLE $value
7895_ACEOF
7896
7897
7898
7899fi
7900
7901
cb01cfba 7902# For the TUI, we need enhanced curses functionality.
bd8a8e1b 7903if test x"$enable_tui" != xno; then
cb01cfba
JB
7904 prefer_curses=yes
7905fi
7906
7907curses_found=no
7908if test x"$prefer_curses" = xyes; then
7909 # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
7910 # curses library because the latter might not provide all the
7911 # functionality we need. However, this leads to problems on systems
7912 # where the linker searches /usr/local/lib, but the compiler doesn't
7913 # search /usr/local/include, if ncurses is installed in /usr/local. A
7914 # default installation of ncurses on alpha*-dec-osf* will lead to such
7915 # a situation.
81ecdfbb
RW
7916 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
7917$as_echo_n "checking for library containing waddstr... " >&6; }
7918if test "${ac_cv_search_waddstr+set}" = set; then :
7919 $as_echo_n "(cached) " >&6
6c7a06a3
TT
7920else
7921 ac_func_search_save_LIBS=$LIBS
81ecdfbb 7922cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
7923/* end confdefs.h. */
7924
81ecdfbb
RW
7925/* Override any GCC internal prototype to avoid an error.
7926 Use char because int might match the return type of a GCC
7927 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
7928#ifdef __cplusplus
7929extern "C"
7930#endif
6c7a06a3
TT
7931char waddstr ();
7932int
7933main ()
7934{
81ecdfbb 7935return waddstr ();
6c7a06a3
TT
7936 ;
7937 return 0;
7938}
7939_ACEOF
81ecdfbb
RW
7940for ac_lib in '' ncurses cursesX curses; do
7941 if test -z "$ac_lib"; then
7942 ac_res="none required"
7943 else
7944 ac_res=-l$ac_lib
7945 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7946 fi
7947 if ac_fn_c_try_link "$LINENO"; then :
7948 ac_cv_search_waddstr=$ac_res
7949fi
7950rm -f core conftest.err conftest.$ac_objext \
7951 conftest$ac_exeext
7952 if test "${ac_cv_search_waddstr+set}" = set; then :
7953 break
7954fi
7955done
7956if test "${ac_cv_search_waddstr+set}" = set; then :
7957
6c7a06a3 7958else
81ecdfbb
RW
7959 ac_cv_search_waddstr=no
7960fi
7961rm conftest.$ac_ext
7962LIBS=$ac_func_search_save_LIBS
7963fi
7964{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
7965$as_echo "$ac_cv_search_waddstr" >&6; }
7966ac_res=$ac_cv_search_waddstr
7967if test "$ac_res" != no; then :
7968 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3
TT
7969
7970fi
7971
7972
cb01cfba
JB
7973 if test "$ac_cv_search_waddstr" != no; then
7974 curses_found=yes
7975 fi
7976fi
7977
7978# Check whether we should enable the TUI, but only do so if we really
7979# can.
7980if test x"$enable_tui" != xno; then
7981 if test -d $srcdir/tui; then
7982 if test "$curses_found" != no; then
6c7a06a3
TT
7983 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
7984 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
7985 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
7986 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
6c7a06a3
TT
7987 else
7988 if test x"$enable_tui" = xyes; then
81ecdfbb 7989 as_fn_error "no enhanced curses library found; disable TUI" "$LINENO" 5
6c7a06a3 7990 else
81ecdfbb
RW
7991 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
7992$as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
6c7a06a3
TT
7993 fi
7994 fi
7995 fi
7996fi
7997
7998# Since GDB uses Readline, we need termcap functionality. In many
7999# cases this will be provided by the curses library, but some systems
8000# have a seperate termcap library, or no curses library at all.
8001
8002case $host_os in
8003 cygwin*)
8004 if test -d $srcdir/libtermcap; then
8005 LIBS="../libtermcap/libtermcap.a $LIBS"
8006 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
8007 fi ;;
8008 go32* | *djgpp*)
8009 ac_cv_search_tgetent="none required"
8010 ;;
6c7a06a3
TT
8011esac
8012
8013# These are the libraries checked by Readline.
81ecdfbb
RW
8014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
8015$as_echo_n "checking for library containing tgetent... " >&6; }
8016if test "${ac_cv_search_tgetent+set}" = set; then :
8017 $as_echo_n "(cached) " >&6
6c7a06a3
TT
8018else
8019 ac_func_search_save_LIBS=$LIBS
81ecdfbb 8020cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
8021/* end confdefs.h. */
8022
81ecdfbb
RW
8023/* Override any GCC internal prototype to avoid an error.
8024 Use char because int might match the return type of a GCC
8025 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
8026#ifdef __cplusplus
8027extern "C"
8028#endif
6c7a06a3
TT
8029char tgetent ();
8030int
8031main ()
8032{
81ecdfbb 8033return tgetent ();
6c7a06a3
TT
8034 ;
8035 return 0;
8036}
8037_ACEOF
81ecdfbb
RW
8038for ac_lib in '' termcap tinfo curses ncurses; do
8039 if test -z "$ac_lib"; then
8040 ac_res="none required"
8041 else
8042 ac_res=-l$ac_lib
6c7a06a3 8043 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
8044 fi
8045 if ac_fn_c_try_link "$LINENO"; then :
8046 ac_cv_search_tgetent=$ac_res
8047fi
8048rm -f core conftest.err conftest.$ac_objext \
8049 conftest$ac_exeext
8050 if test "${ac_cv_search_tgetent+set}" = set; then :
8051 break
8052fi
8053done
8054if test "${ac_cv_search_tgetent+set}" = set; then :
6c7a06a3 8055
6c7a06a3 8056else
81ecdfbb 8057 ac_cv_search_tgetent=no
6c7a06a3 8058fi
81ecdfbb 8059rm conftest.$ac_ext
6c7a06a3
TT
8060LIBS=$ac_func_search_save_LIBS
8061fi
81ecdfbb
RW
8062{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
8063$as_echo "$ac_cv_search_tgetent" >&6; }
8064ac_res=$ac_cv_search_tgetent
8065if test "$ac_res" != no; then :
8066 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3 8067
06825bd1
MK
8068fi
8069
06825bd1 8070
bec39cab 8071if test "$ac_cv_search_tgetent" = no; then
7a85168d 8072 CONFIG_OBS="$CONFIG_OBS stub-termcap.o"
8ee53726
MK
8073fi
8074
3841debe 8075
81ecdfbb
RW
8076# Check whether --with-system-readline was given.
8077if test "${with_system_readline+set}" = set; then :
8078 withval=$with_system_readline;
8079fi
6a30b0a5 8080
6a30b0a5
AS
8081
8082if test "$with_system_readline" = yes; then
8083 READLINE=-lreadline
8084 READLINE_DEPS=
8085 READLINE_CFLAGS=
39037522 8086 READLINE_TEXI_INCFLAG=
6a30b0a5
AS
8087else
8088 READLINE='$(READLINE_DIR)/libreadline.a'
8089 READLINE_DEPS='$(READLINE)'
8090 READLINE_CFLAGS='-I$(READLINE_SRC)/..'
39037522 8091 READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
6a30b0a5
AS
8092fi
8093
8094
8095
8096
8097
f997c383
SD
8098# Generate jit-reader.h
8099
8100# This is typedeffed to GDB_CORE_ADDR in jit-reader.h
8101TARGET_PTR=
8102
8103# The cast to long int works around a bug in the HP C Compiler
8104# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8105# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8106# This bug is HP SR number 8606223364.
8107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5
8108$as_echo_n "checking size of unsigned long long... " >&6; }
8109if test "${ac_cv_sizeof_unsigned_long_long+set}" = set; then :
8110 $as_echo_n "(cached) " >&6
8111else
8112 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then :
8113
8114else
8115 if test "$ac_cv_type_unsigned_long_long" = yes; then
8116 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8117$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8118{ as_fn_set_status 77
8119as_fn_error "cannot compute sizeof (unsigned long long)
8120See \`config.log' for more details." "$LINENO" 5; }; }
8121 else
8122 ac_cv_sizeof_unsigned_long_long=0
8123 fi
8124fi
8125
8126fi
8127{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5
8128$as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; }
8129
8130
8131
8132cat >>confdefs.h <<_ACEOF
8133#define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
8134_ACEOF
8135
8136
8137# The cast to long int works around a bug in the HP C Compiler
8138# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8139# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8140# This bug is HP SR number 8606223364.
8141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
8142$as_echo_n "checking size of unsigned long... " >&6; }
8143if test "${ac_cv_sizeof_unsigned_long+set}" = set; then :
8144 $as_echo_n "(cached) " >&6
8145else
8146 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then :
8147
8148else
8149 if test "$ac_cv_type_unsigned_long" = yes; then
8150 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8151$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8152{ as_fn_set_status 77
8153as_fn_error "cannot compute sizeof (unsigned long)
8154See \`config.log' for more details." "$LINENO" 5; }; }
8155 else
8156 ac_cv_sizeof_unsigned_long=0
8157 fi
8158fi
8159
8160fi
8161{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
8162$as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
8163
8164
8165
8166cat >>confdefs.h <<_ACEOF
8167#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
8168_ACEOF
8169
8170
8171# The cast to long int works around a bug in the HP C Compiler
8172# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8173# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8174# This bug is HP SR number 8606223364.
8175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5
8176$as_echo_n "checking size of unsigned __int128... " >&6; }
8177if test "${ac_cv_sizeof_unsigned___int128+set}" = set; then :
8178 $as_echo_n "(cached) " >&6
8179else
8180 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then :
8181
8182else
8183 if test "$ac_cv_type_unsigned___int128" = yes; then
8184 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8185$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8186{ as_fn_set_status 77
8187as_fn_error "cannot compute sizeof (unsigned __int128)
8188See \`config.log' for more details." "$LINENO" 5; }; }
8189 else
8190 ac_cv_sizeof_unsigned___int128=0
8191 fi
8192fi
8193
8194fi
8195{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5
8196$as_echo "$ac_cv_sizeof_unsigned___int128" >&6; }
8197
8198
8199
8200cat >>confdefs.h <<_ACEOF
8201#define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128
8202_ACEOF
8203
8204
8205
8206if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
8207 TARGET_PTR="unsigned long"
8208elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
8209 TARGET_PTR="unsigned long long"
8210elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
8211 TARGET_PTR="unsigned __int128"
8212else
8213 TARGET_PTR="unsigned long"
8214fi
8215
8216
8217ac_config_files="$ac_config_files jit-reader.h:jit-reader.in"
8218
8219
a2d08b9e
SD
8220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
8221$as_echo_n "checking for library containing dlopen... " >&6; }
8222if test "${ac_cv_search_dlopen+set}" = set; then :
8223 $as_echo_n "(cached) " >&6
8224else
8225 ac_func_search_save_LIBS=$LIBS
8226cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8227/* end confdefs.h. */
8228
8229/* Override any GCC internal prototype to avoid an error.
8230 Use char because int might match the return type of a GCC
8231 builtin and then its argument prototype would still apply. */
8232#ifdef __cplusplus
8233extern "C"
8234#endif
8235char dlopen ();
8236int
8237main ()
8238{
8239return dlopen ();
8240 ;
8241 return 0;
8242}
8243_ACEOF
8244for ac_lib in '' dl; do
8245 if test -z "$ac_lib"; then
8246 ac_res="none required"
8247 else
8248 ac_res=-l$ac_lib
8249 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8250 fi
8251 if ac_fn_c_try_link "$LINENO"; then :
8252 ac_cv_search_dlopen=$ac_res
8253fi
8254rm -f core conftest.err conftest.$ac_objext \
8255 conftest$ac_exeext
8256 if test "${ac_cv_search_dlopen+set}" = set; then :
8257 break
8258fi
8259done
8260if test "${ac_cv_search_dlopen+set}" = set; then :
8261
8262else
8263 ac_cv_search_dlopen=no
8264fi
8265rm conftest.$ac_ext
8266LIBS=$ac_func_search_save_LIBS
8267fi
8268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
8269$as_echo "$ac_cv_search_dlopen" >&6; }
8270ac_res=$ac_cv_search_dlopen
8271if test "$ac_res" != no; then :
8272 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8273
8274fi
8275
8276
39037522 8277
b8e0a31c
SD
8278
8279# Check whether --with-jit-reader-dir was given.
8280if test "${with_jit_reader_dir+set}" = set; then :
8281 withval=$with_jit_reader_dir;
8282 JIT_READER_DIR=$withval
8283else
8284 JIT_READER_DIR=${libdir}/gdb
8285fi
8286
8287
8288 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
8289 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
8290 ac_define_dir=`eval echo $JIT_READER_DIR`
8291 ac_define_dir=`eval echo $ac_define_dir`
8292
8293cat >>confdefs.h <<_ACEOF
8294#define JIT_READER_DIR "$ac_define_dir"
8295_ACEOF
8296
8297
8298
8299
8300 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
8301 if test "x$prefix" = xNONE; then
8302 test_prefix=/usr/local
8303 else
8304 test_prefix=$prefix
8305 fi
8306 else
8307 test_prefix=$exec_prefix
8308 fi
8309 value=0
8310 case ${ac_define_dir} in
8311 "${test_prefix}"|"${test_prefix}/"*|\
8312 '${exec_prefix}'|'${exec_prefix}/'*)
8313 value=1
8314 ;;
8315 esac
8316
8317cat >>confdefs.h <<_ACEOF
8318#define JIT_READER_DIR_RELOCATABLE $value
8319_ACEOF
8320
8321
8322
8323
8324
81ecdfbb
RW
8325# Check whether --with-expat was given.
8326if test "${with_expat+set}" = set; then :
8327 withval=$with_expat;
5c39566f
DJ
8328else
8329 with_expat=auto
81ecdfbb
RW
8330fi
8331
8332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
8333$as_echo_n "checking whether to use expat... " >&6; }
8334{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
8335$as_echo "$with_expat" >&6; }
5c39566f
DJ
8336
8337if test "${with_expat}" = no; then
81ecdfbb
RW
8338 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
8339$as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
5c39566f
DJ
8340 HAVE_LIBEXPAT=no
8341else
8342
3841debe
DJ
8343
8344
8345
8346
8347
8348
8349
8350 use_additional=yes
8351
8352 acl_save_prefix="$prefix"
8353 prefix="$acl_final_prefix"
8354 acl_save_exec_prefix="$exec_prefix"
8355 exec_prefix="$acl_final_exec_prefix"
8356
8357 eval additional_includedir=\"$includedir\"
8358 eval additional_libdir=\"$libdir\"
8359
8360 exec_prefix="$acl_save_exec_prefix"
8361 prefix="$acl_save_prefix"
8362
8363
81ecdfbb
RW
8364# Check whether --with-libexpat-prefix was given.
8365if test "${with_libexpat_prefix+set}" = set; then :
8366 withval=$with_libexpat_prefix;
3841debe
DJ
8367 if test "X$withval" = "Xno"; then
8368 use_additional=no
8369 else
8370 if test "X$withval" = "X"; then
8371
8372 acl_save_prefix="$prefix"
8373 prefix="$acl_final_prefix"
8374 acl_save_exec_prefix="$exec_prefix"
8375 exec_prefix="$acl_final_exec_prefix"
8376
8377 eval additional_includedir=\"$includedir\"
8378 eval additional_libdir=\"$libdir\"
8379
8380 exec_prefix="$acl_save_exec_prefix"
8381 prefix="$acl_save_prefix"
8382
8383 else
8384 additional_includedir="$withval/include"
8385 additional_libdir="$withval/lib"
8386 fi
8387 fi
8388
81ecdfbb
RW
8389fi
8390
3841debe
DJ
8391 LIBEXPAT=
8392 LTLIBEXPAT=
8393 INCEXPAT=
8394 rpathdirs=
8395 ltrpathdirs=
8396 names_already_handled=
8397 names_next_round='expat '
8398 while test -n "$names_next_round"; do
8399 names_this_round="$names_next_round"
8400 names_next_round=
8401 for name in $names_this_round; do
8402 already_handled=
8403 for n in $names_already_handled; do
8404 if test "$n" = "$name"; then
8405 already_handled=yes
8406 break
8407 fi
8408 done
8409 if test -z "$already_handled"; then
8410 names_already_handled="$names_already_handled $name"
8411 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
8412 eval value=\"\$HAVE_LIB$uppername\"
8413 if test -n "$value"; then
8414 if test "$value" = yes; then
8415 eval value=\"\$LIB$uppername\"
8416 test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
8417 eval value=\"\$LTLIB$uppername\"
8418 test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
8419 else
8420 :
8421 fi
8422 else
8423 found_dir=
8424 found_la=
8425 found_so=
8426 found_a=
8427 if test $use_additional = yes; then
8428 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
8429 found_dir="$additional_libdir"
8430 found_so="$additional_libdir/lib$name.$shlibext"
8431 if test -f "$additional_libdir/lib$name.la"; then
8432 found_la="$additional_libdir/lib$name.la"
8433 fi
8434 else
8435 if test -f "$additional_libdir/lib$name.$libext"; then
8436 found_dir="$additional_libdir"
8437 found_a="$additional_libdir/lib$name.$libext"
8438 if test -f "$additional_libdir/lib$name.la"; then
8439 found_la="$additional_libdir/lib$name.la"
8440 fi
8441 fi
8442 fi
8443 fi
8444 if test "X$found_dir" = "X"; then
8445 for x in $LDFLAGS $LTLIBEXPAT; do
8446
8447 acl_save_prefix="$prefix"
8448 prefix="$acl_final_prefix"
8449 acl_save_exec_prefix="$exec_prefix"
8450 exec_prefix="$acl_final_exec_prefix"
8451 eval x=\"$x\"
8452 exec_prefix="$acl_save_exec_prefix"
8453 prefix="$acl_save_prefix"
8454
8455 case "$x" in
8456 -L*)
8457 dir=`echo "X$x" | sed -e 's/^X-L//'`
8458 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
8459 found_dir="$dir"
8460 found_so="$dir/lib$name.$shlibext"
8461 if test -f "$dir/lib$name.la"; then
8462 found_la="$dir/lib$name.la"
8463 fi
8464 else
8465 if test -f "$dir/lib$name.$libext"; then
8466 found_dir="$dir"
8467 found_a="$dir/lib$name.$libext"
8468 if test -f "$dir/lib$name.la"; then
8469 found_la="$dir/lib$name.la"
8470 fi
8471 fi
8472 fi
8473 ;;
8474 esac
8475 if test "X$found_dir" != "X"; then
8476 break
8477 fi
8478 done
8479 fi
8480 if test "X$found_dir" != "X"; then
8481 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
8482 if test "X$found_so" != "X"; then
8483 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
8484 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
8485 else
8486 haveit=
8487 for x in $ltrpathdirs; do
8488 if test "X$x" = "X$found_dir"; then
8489 haveit=yes
8490 break
8491 fi
8492 done
8493 if test -z "$haveit"; then
8494 ltrpathdirs="$ltrpathdirs $found_dir"
8495 fi
8496 if test "$hardcode_direct" = yes; then
8497 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
8498 else
8499 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
8500 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
8501 haveit=
8502 for x in $rpathdirs; do
8503 if test "X$x" = "X$found_dir"; then
8504 haveit=yes
8505 break
8506 fi
8507 done
8508 if test -z "$haveit"; then
8509 rpathdirs="$rpathdirs $found_dir"
8510 fi
8511 else
8512 haveit=
8513 for x in $LDFLAGS $LIBEXPAT; do
8514
8515 acl_save_prefix="$prefix"
8516 prefix="$acl_final_prefix"
8517 acl_save_exec_prefix="$exec_prefix"
8518 exec_prefix="$acl_final_exec_prefix"
8519 eval x=\"$x\"
8520 exec_prefix="$acl_save_exec_prefix"
8521 prefix="$acl_save_prefix"
8522
8523 if test "X$x" = "X-L$found_dir"; then
8524 haveit=yes
8525 break
8526 fi
8527 done
8528 if test -z "$haveit"; then
8529 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
8530 fi
8531 if test "$hardcode_minus_L" != no; then
8532 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
8533 else
8534 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
8535 fi
8536 fi
8537 fi
8538 fi
8539 else
8540 if test "X$found_a" != "X"; then
8541 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
8542 else
8543 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
8544 fi
8545 fi
8546 additional_includedir=
8547 case "$found_dir" in
8548 */lib | */lib/)
8549 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
8550 additional_includedir="$basedir/include"
8551 ;;
8552 esac
8553 if test "X$additional_includedir" != "X"; then
8554 if test "X$additional_includedir" != "X/usr/include"; then
8555 haveit=
8556 if test "X$additional_includedir" = "X/usr/local/include"; then
8557 if test -n "$GCC"; then
8558 case $host_os in
8559 linux*) haveit=yes;;
8560 esac
8561 fi
8562 fi
8563 if test -z "$haveit"; then
8564 for x in $CPPFLAGS $INCEXPAT; do
8565
8566 acl_save_prefix="$prefix"
8567 prefix="$acl_final_prefix"
8568 acl_save_exec_prefix="$exec_prefix"
8569 exec_prefix="$acl_final_exec_prefix"
8570 eval x=\"$x\"
8571 exec_prefix="$acl_save_exec_prefix"
8572 prefix="$acl_save_prefix"
8573
8574 if test "X$x" = "X-I$additional_includedir"; then
8575 haveit=yes
8576 break
8577 fi
8578 done
8579 if test -z "$haveit"; then
8580 if test -d "$additional_includedir"; then
8581 INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
8582 fi
8583 fi
8584 fi
8585 fi
8586 fi
8587 if test -n "$found_la"; then
8588 save_libdir="$libdir"
8589 case "$found_la" in
8590 */* | *\\*) . "$found_la" ;;
8591 *) . "./$found_la" ;;
8592 esac
8593 libdir="$save_libdir"
8594 for dep in $dependency_libs; do
8595 case "$dep" in
8596 -L*)
8597 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
8598 if test "X$additional_libdir" != "X/usr/lib"; then
8599 haveit=
8600 if test "X$additional_libdir" = "X/usr/local/lib"; then
8601 if test -n "$GCC"; then
8602 case $host_os in
8603 linux*) haveit=yes;;
8604 esac
8605 fi
8606 fi
8607 if test -z "$haveit"; then
8608 haveit=
8609 for x in $LDFLAGS $LIBEXPAT; do
8610
8611 acl_save_prefix="$prefix"
8612 prefix="$acl_final_prefix"
8613 acl_save_exec_prefix="$exec_prefix"
8614 exec_prefix="$acl_final_exec_prefix"
8615 eval x=\"$x\"
8616 exec_prefix="$acl_save_exec_prefix"
8617 prefix="$acl_save_prefix"
8618
8619 if test "X$x" = "X-L$additional_libdir"; then
8620 haveit=yes
8621 break
8622 fi
8623 done
8624 if test -z "$haveit"; then
8625 if test -d "$additional_libdir"; then
8626 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
8627 fi
8628 fi
8629 haveit=
8630 for x in $LDFLAGS $LTLIBEXPAT; do
8631
8632 acl_save_prefix="$prefix"
8633 prefix="$acl_final_prefix"
8634 acl_save_exec_prefix="$exec_prefix"
8635 exec_prefix="$acl_final_exec_prefix"
8636 eval x=\"$x\"
8637 exec_prefix="$acl_save_exec_prefix"
8638 prefix="$acl_save_prefix"
8639
8640 if test "X$x" = "X-L$additional_libdir"; then
8641 haveit=yes
8642 break
8643 fi
8644 done
8645 if test -z "$haveit"; then
8646 if test -d "$additional_libdir"; then
8647 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
8648 fi
8649 fi
8650 fi
8651 fi
8652 ;;
8653 -R*)
8654 dir=`echo "X$dep" | sed -e 's/^X-R//'`
8655 if test "$enable_rpath" != no; then
8656 haveit=
8657 for x in $rpathdirs; do
8658 if test "X$x" = "X$dir"; then
8659 haveit=yes
8660 break
8661 fi
8662 done
8663 if test -z "$haveit"; then
8664 rpathdirs="$rpathdirs $dir"
8665 fi
8666 haveit=
8667 for x in $ltrpathdirs; do
8668 if test "X$x" = "X$dir"; then
8669 haveit=yes
8670 break
8671 fi
8672 done
8673 if test -z "$haveit"; then
8674 ltrpathdirs="$ltrpathdirs $dir"
8675 fi
8676 fi
8677 ;;
8678 -l*)
8679 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
8680 ;;
8681 *.la)
8682 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
8683 ;;
8684 *)
8685 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
8686 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
8687 ;;
81ecdfbb
RW
8688 esac
8689 done
8690 fi
8691 else
8692 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
8693 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
8694 fi
8695 fi
8696 fi
8697 done
8698 done
8699 if test "X$rpathdirs" != "X"; then
8700 if test -n "$hardcode_libdir_separator"; then
8701 alldirs=
8702 for found_dir in $rpathdirs; do
8703 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
8704 done
8705 acl_save_libdir="$libdir"
8706 libdir="$alldirs"
8707 eval flag=\"$hardcode_libdir_flag_spec\"
8708 libdir="$acl_save_libdir"
8709 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
8710 else
8711 for found_dir in $rpathdirs; do
8712 acl_save_libdir="$libdir"
8713 libdir="$found_dir"
8714 eval flag=\"$hardcode_libdir_flag_spec\"
8715 libdir="$acl_save_libdir"
8716 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
8717 done
8718 fi
8719 fi
8720 if test "X$ltrpathdirs" != "X"; then
8721 for found_dir in $ltrpathdirs; do
8722 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
8723 done
8724 fi
a9322a30
TT
8725
8726
81ecdfbb 8727 ac_save_CPPFLAGS="$CPPFLAGS"
a9322a30 8728
81ecdfbb
RW
8729 for element in $INCEXPAT; do
8730 haveit=
8731 for x in $CPPFLAGS; do
a9322a30 8732
81ecdfbb
RW
8733 acl_save_prefix="$prefix"
8734 prefix="$acl_final_prefix"
8735 acl_save_exec_prefix="$exec_prefix"
8736 exec_prefix="$acl_final_exec_prefix"
8737 eval x=\"$x\"
8738 exec_prefix="$acl_save_exec_prefix"
8739 prefix="$acl_save_prefix"
a8111142 8740
81ecdfbb
RW
8741 if test "X$x" = "X$element"; then
8742 haveit=yes
8743 break
8744 fi
8745 done
8746 if test -z "$haveit"; then
8747 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
8748 fi
8749 done
a9322a30
TT
8750
8751
81ecdfbb
RW
8752 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
8753$as_echo_n "checking for libexpat... " >&6; }
8754if test "${ac_cv_libexpat+set}" = set; then :
8755 $as_echo_n "(cached) " >&6
bec39cab 8756else
bec39cab 8757
81ecdfbb
RW
8758 ac_save_LIBS="$LIBS"
8759 LIBS="$LIBS $LIBEXPAT"
8760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8761/* end confdefs.h. */
81ecdfbb
RW
8762#include "expat.h"
8763int
8764main ()
8765{
8766XML_Parser p = XML_ParserCreate (0);
8767 ;
8768 return 0;
8769}
bec39cab 8770_ACEOF
81ecdfbb
RW
8771if ac_fn_c_try_link "$LINENO"; then :
8772 ac_cv_libexpat=yes
c906108c 8773else
81ecdfbb 8774 ac_cv_libexpat=no
bec39cab 8775fi
81ecdfbb
RW
8776rm -f core conftest.err conftest.$ac_objext \
8777 conftest$ac_exeext conftest.$ac_ext
8778 LIBS="$ac_save_LIBS"
c906108c 8779
95ca63c4 8780fi
81ecdfbb
RW
8781{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
8782$as_echo "$ac_cv_libexpat" >&6; }
8783 if test "$ac_cv_libexpat" = yes; then
8784 HAVE_LIBEXPAT=yes
bec39cab 8785
81ecdfbb 8786$as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
bec39cab 8787
81ecdfbb
RW
8788 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
8789$as_echo_n "checking how to link with libexpat... " >&6; }
8790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
8791$as_echo "$LIBEXPAT" >&6; }
8792 else
8793 HAVE_LIBEXPAT=no
8794 CPPFLAGS="$ac_save_CPPFLAGS"
8795 LIBEXPAT=
8796 LTLIBEXPAT=
8797 fi
95ca63c4
CF
8798
8799
8800
7cb9022a
MK
8801
8802
bec39cab 8803
81ecdfbb
RW
8804 if test "$HAVE_LIBEXPAT" != yes; then
8805 if test "$with_expat" = yes; then
8806 as_fn_error "expat is missing or unusable" "$LINENO" 5
8807 else
8808 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
8809$as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
8810 fi
8811 else
8812 save_LIBS=$LIBS
8813 LIBS="$LIBS $LIBEXPAT"
8814 for ac_func in XML_StopParser
8815do :
8816 ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
8817if test "x$ac_cv_func_XML_StopParser" = x""yes; then :
bec39cab 8818 cat >>confdefs.h <<_ACEOF
81ecdfbb 8819#define HAVE_XML_STOPPARSER 1
bec39cab 8820_ACEOF
95ca63c4 8821
bec39cab 8822fi
bec39cab 8823done
95ca63c4 8824
81ecdfbb
RW
8825 LIBS=$save_LIBS
8826 fi
a9322a30
TT
8827fi
8828
d344e670
DE
8829# --------------------- #
8830# Check for libpython. #
8831# --------------------- #
8832
a9322a30 8833
a9322a30
TT
8834
8835
ec685c5e 8836
0c4a4063 8837
81ecdfbb
RW
8838# Check whether --with-python was given.
8839if test "${with_python+set}" = set; then :
8840 withval=$with_python;
bec39cab 8841else
81ecdfbb 8842 with_python=auto
bec39cab 8843fi
bec39cab 8844
81ecdfbb
RW
8845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
8846$as_echo_n "checking whether to use python... " >&6; }
8847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
8848$as_echo "$with_python" >&6; }
9a156167 8849
81ecdfbb
RW
8850if test "${with_python}" = no; then
8851 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
8852$as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
8853 have_libpython=no
bec39cab 8854else
81ecdfbb 8855 case "${with_python}" in
8c85a4e2 8856 [\\/]* | ?:[\\/]*)
ec685c5e
DE
8857 if test -d ${with_python}; then
8858 # Assume the python binary is ${with_python}/bin/python.
ec685c5e 8859 python_prog="${with_python}/bin/python"
0c4a4063 8860 python_prefix=
9c4ea6c5
JB
8861 # If python does not exit ${with_python}/bin, then try in
8862 # ${with_python}. On Windows/MinGW, this is where the Python
8863 # executable is.
8864 if test ! -x "${python_prog}"; then
8865 python_prog="${with_python}/python"
8866 python_prefix=
8867 fi
e7a30f46 8868 if test ! -x "${python_prog}"; then
ec685c5e
DE
8869 # Fall back to gdb 7.0/7.1 behaviour.
8870 python_prog=missing
0c4a4063 8871 python_prefix=${with_python}
ec685c5e 8872 fi
e7a30f46 8873 elif test -x "${with_python}"; then
ec685c5e
DE
8874 # While we can't run python compiled for $host (unless host == build),
8875 # the user could write a script that provides the needed information,
8876 # so we support that.
ec685c5e 8877 python_prog=${with_python}
0c4a4063 8878 python_prefix=
ec685c5e
DE
8879 else
8880 as_fn_error "invalid value for --with-python" "$LINENO" 5
8881 fi
81ecdfbb 8882 ;;
ec685c5e
DE
8883 */*)
8884 # Disallow --with-python=foo/bar.
81ecdfbb
RW
8885 as_fn_error "invalid value for --with-python" "$LINENO" 5
8886 ;;
ec685c5e
DE
8887 *)
8888 # The user has either specified auto, yes, or the name of the python
8889 # program assumed to be in $PATH.
8890 python_prefix=
8891 case "${with_python}" in
8892 yes | auto)
8893 if test ${build} = ${host}; then
8894 # Extract the first word of "python", so it can be a program name with args.
8895set dummy python; ac_word=$2
8896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8897$as_echo_n "checking for $ac_word... " >&6; }
8898if test "${ac_cv_path_python_prog_path+set}" = set; then :
8899 $as_echo_n "(cached) " >&6
8900else
8901 case $python_prog_path in
8902 [\\/]* | ?:[\\/]*)
8903 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
8904 ;;
8905 *)
8906 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8907for as_dir in $PATH
8908do
8909 IFS=$as_save_IFS
8910 test -z "$as_dir" && as_dir=.
8911 for ac_exec_ext in '' $ac_executable_extensions; do
8912 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8913 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
8914 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8915 break 2
8916 fi
8917done
8918 done
8919IFS=$as_save_IFS
8920
8921 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
8922 ;;
8923esac
8924fi
8925python_prog_path=$ac_cv_path_python_prog_path
8926if test -n "$python_prog_path"; then
8927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
8928$as_echo "$python_prog_path" >&6; }
8929else
8930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8931$as_echo "no" >&6; }
8932fi
8933
8934
8935 if test "${python_prog_path}" = missing; then
8936 python_prog=missing
8937 else
8938 python_prog=${python_prog_path}
8939 fi
8940 else
8941 # Not much we can do except assume the cross-compiler will find the
8942 # right files.
8943 python_prog=missing
8944 fi
8945 ;;
8946 *)
8947 # While we can't run python compiled for $host (unless host == build),
8948 # the user could write a script that provides the needed information,
8949 # so we support that.
8950 python_prog="${with_python}"
8951 # Extract the first word of "${python_prog}", so it can be a program name with args.
8952set dummy ${python_prog}; ac_word=$2
8953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8954$as_echo_n "checking for $ac_word... " >&6; }
8955if test "${ac_cv_path_python_prog_path+set}" = set; then :
8956 $as_echo_n "(cached) " >&6
8957else
8958 case $python_prog_path in
8959 [\\/]* | ?:[\\/]*)
8960 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
8961 ;;
8962 *)
8963 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8964for as_dir in $PATH
8965do
8966 IFS=$as_save_IFS
8967 test -z "$as_dir" && as_dir=.
8968 for ac_exec_ext in '' $ac_executable_extensions; do
8969 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8970 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
8971 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8972 break 2
8973 fi
8974done
8975 done
8976IFS=$as_save_IFS
8977
8978 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
8979 ;;
8980esac
8981fi
8982python_prog_path=$ac_cv_path_python_prog_path
8983if test -n "$python_prog_path"; then
8984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
8985$as_echo "$python_prog_path" >&6; }
8986else
8987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8988$as_echo "no" >&6; }
8989fi
8990
8991
8992 if test "${python_prog_path}" = missing; then
8993 as_fn_error "unable to find python program ${python_prog}" "$LINENO" 5
8994 fi
8995 ;;
8996 esac
81ecdfbb
RW
8997 esac
8998
ec685c5e 8999 if test "${python_prog}" != missing; then
e7a30f46
DE
9000 # We have a python program to use, but it may be too old.
9001 # Don't flag an error for --with-python=auto (the default).
9002 have_python_config=yes
ec685c5e
DE
9003 python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
9004 if test $? != 0; then
e7a30f46
DE
9005 have_python_config=failed
9006 if test "${with_python}" != auto; then
9007 as_fn_error "failure running python-config --includes" "$LINENO" 5
9008 fi
ec685c5e
DE
9009 fi
9010 python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
9011 if test $? != 0; then
e7a30f46
DE
9012 have_python_config=failed
9013 if test "${with_python}" != auto; then
9014 as_fn_error "failure running python-config --ldflags" "$LINENO" 5
9015 fi
ec685c5e 9016 fi
0c4a4063
DE
9017 python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
9018 if test $? != 0; then
e7a30f46
DE
9019 have_python_config=failed
9020 if test "${with_python}" != auto; then
9021 as_fn_error "failure running python-config --exec-prefix" "$LINENO" 5
9022 fi
0c4a4063 9023 fi
ec685c5e 9024 else
ac534cba
JB
9025 # We do not have a python executable we can use to determine where
9026 # to find the Python headers and libs. We cannot guess the include
9027 # path from the python_prefix either, because that include path
9028 # depends on the Python version. So, there is nothing much we can
9029 # do except assume that the compiler will be able to find those files.
9030 python_includes=
9031 python_libs=
0c4a4063 9032 have_python_config=no
ec685c5e 9033 fi
bec39cab 9034
ec685c5e
DE
9035 # If we have python-config, only try the configuration it provides.
9036 # Otherwise fallback on the old way of trying different versions of
9037 # python in turn.
81ecdfbb 9038
ec685c5e
DE
9039 have_libpython=no
9040 if test "${have_python_config}" = yes; then
c1039e3c
JB
9041 # Determine the Python version by extracting "-lpython<version>"
9042 # part of the python_libs. <version> is usually X.Y with X and Y
9043 # being decimal numbers, but can also be XY (seen on Windows).
9044 #
9045 # The extraction is performed using sed with a regular expression.
9046 # Initially, the regexp used was using the '?' quantifier to make
9047 # the dot in the version number optional. Unfortunately, this
9048 # does not work with non-GNU versions of sed because, because of
9049 # what looks like a limitation (the '?' quantifier does not work
9050 # with back-references). We work around this limitation by using
9051 # the '*' quantifier instead. It means that, in theory, we might
9052 # match unexpected version strings such as "-lpython2..7", but
9053 # this seems unlikely in practice. And even if that happens,
9054 # an error will be triggered later on, when checking that version
9055 # number.
ec685c5e 9056 python_version=`echo " ${python_libs} " \
c1039e3c 9057 | sed -e 's,^.* -l\(python[0-9]*[.]*[0-9]*\).*$,\1,'`
0c4a4063
DE
9058 case "${python_version}" in
9059 python*)
ec685c5e
DE
9060
9061 version=${python_version}
9062
9063 new_CPPFLAGS=${python_includes}
9064 new_LIBS=${python_libs}
81ecdfbb
RW
9065 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
9066$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 9067 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 9068 save_LIBS=$LIBS
ec685c5e
DE
9069 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9070 LIBS="$LIBS $new_LIBS"
9071 found_usable_python=no
81ecdfbb 9072 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9073/* end confdefs.h. */
ac534cba 9074#include "Python.h"
81ecdfbb
RW
9075int
9076main ()
9077{
9078Py_Initialize ();
9079 ;
9080 return 0;
9081}
bec39cab 9082_ACEOF
81ecdfbb 9083if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
9084 have_libpython=${version}
9085 found_usable_python=yes
ac534cba
JB
9086 PYTHON_CPPFLAGS=$new_CPPFLAGS
9087 PYTHON_LIBS=$new_LIBS
9a156167 9088fi
81ecdfbb
RW
9089rm -f core conftest.err conftest.$ac_objext \
9090 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
9091 CPPFLAGS=$save_CPPFLAGS
9092 LIBS=$save_LIBS
ec685c5e
DE
9093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
9094$as_echo "${found_usable_python}" >&6; }
9a156167 9095
0c4a4063
DE
9096 ;;
9097 *)
ec685c5e 9098 as_fn_error "unable to determine python version from ${python_libs}" "$LINENO" 5
0c4a4063
DE
9099 ;;
9100 esac
e7a30f46 9101 elif test "${have_python_config}" != failed; then
ec685c5e 9102 if test "${have_libpython}" = no; then
9a156167 9103
420697bb
TT
9104 version=python2.7
9105
9106 new_CPPFLAGS=${python_includes}
9107 new_LIBS="${python_libs} -lpython2.7"
9108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
9109$as_echo_n "checking for ${version}... " >&6; }
9110 save_CPPFLAGS=$CPPFLAGS
9111 save_LIBS=$LIBS
9112 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9113 LIBS="$LIBS $new_LIBS"
9114 found_usable_python=no
9115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9116/* end confdefs.h. */
ac534cba 9117#include "Python.h"
420697bb
TT
9118int
9119main ()
9120{
9121Py_Initialize ();
9122 ;
9123 return 0;
9124}
9125_ACEOF
9126if ac_fn_c_try_link "$LINENO"; then :
9127 have_libpython=${version}
9128 found_usable_python=yes
ac534cba
JB
9129 PYTHON_CPPFLAGS=$new_CPPFLAGS
9130 PYTHON_LIBS=$new_LIBS
420697bb
TT
9131fi
9132rm -f core conftest.err conftest.$ac_objext \
9133 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
9134 CPPFLAGS=$save_CPPFLAGS
9135 LIBS=$save_LIBS
420697bb
TT
9136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
9137$as_echo "${found_usable_python}" >&6; }
9138
9139 fi
9140 if test "${have_libpython}" = no; then
9141
ec685c5e
DE
9142 version=python2.6
9143
9144 new_CPPFLAGS=${python_includes}
9145 new_LIBS="${python_libs} -lpython2.6"
9146 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
9147$as_echo_n "checking for ${version}... " >&6; }
9148 save_CPPFLAGS=$CPPFLAGS
9149 save_LIBS=$LIBS
9150 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9151 LIBS="$LIBS $new_LIBS"
9152 found_usable_python=no
9153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9154/* end confdefs.h. */
ac534cba 9155#include "Python.h"
ec685c5e
DE
9156int
9157main ()
9158{
9159Py_Initialize ();
9160 ;
9161 return 0;
9162}
9163_ACEOF
9164if ac_fn_c_try_link "$LINENO"; then :
9165 have_libpython=${version}
9166 found_usable_python=yes
ac534cba
JB
9167 PYTHON_CPPFLAGS=$new_CPPFLAGS
9168 PYTHON_LIBS=$new_LIBS
ec685c5e
DE
9169fi
9170rm -f core conftest.err conftest.$ac_objext \
9171 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
9172 CPPFLAGS=$save_CPPFLAGS
9173 LIBS=$save_LIBS
ec685c5e
DE
9174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
9175$as_echo "${found_usable_python}" >&6; }
9a156167 9176
81ecdfbb 9177 fi
ec685c5e 9178 if test ${have_libpython} = no; then
9a156167 9179
81ecdfbb 9180 version=python2.5
9a156167 9181
ec685c5e
DE
9182 new_CPPFLAGS=${python_includes}
9183 new_LIBS="${python_libs} -lpython2.5"
81ecdfbb
RW
9184 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
9185$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 9186 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 9187 save_LIBS=$LIBS
ec685c5e
DE
9188 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9189 LIBS="$LIBS $new_LIBS"
9190 found_usable_python=no
81ecdfbb 9191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 9192/* end confdefs.h. */
ac534cba 9193#include "Python.h"
81ecdfbb
RW
9194int
9195main ()
9196{
9197Py_Initialize ();
9198 ;
9199 return 0;
9200}
436868fb 9201_ACEOF
81ecdfbb 9202if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
9203 have_libpython=${version}
9204 found_usable_python=yes
ac534cba
JB
9205 PYTHON_CPPFLAGS=$new_CPPFLAGS
9206 PYTHON_LIBS=$new_LIBS
436868fb 9207fi
81ecdfbb
RW
9208rm -f core conftest.err conftest.$ac_objext \
9209 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
9210 CPPFLAGS=$save_CPPFLAGS
9211 LIBS=$save_LIBS
ec685c5e
DE
9212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
9213$as_echo "${found_usable_python}" >&6; }
a9322a30 9214
81ecdfbb 9215 fi
ec685c5e 9216 if test ${have_libpython} = no; then
a9322a30 9217
81ecdfbb 9218 version=python2.4
a9322a30 9219
ec685c5e
DE
9220 new_CPPFLAGS=${python_includes}
9221 new_LIBS="${python_libs} -lpython2.4"
81ecdfbb
RW
9222 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
9223$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 9224 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 9225 save_LIBS=$LIBS
ec685c5e
DE
9226 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9227 LIBS="$LIBS $new_LIBS"
9228 found_usable_python=no
81ecdfbb 9229 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 9230/* end confdefs.h. */
ac534cba 9231#include "Python.h"
a9322a30
TT
9232int
9233main ()
9234{
81ecdfbb 9235Py_Initialize ();
a9322a30
TT
9236 ;
9237 return 0;
9238}
436868fb 9239_ACEOF
81ecdfbb 9240if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
9241 have_libpython=${version}
9242 found_usable_python=yes
ac534cba
JB
9243 PYTHON_CPPFLAGS=$new_CPPFLAGS
9244 PYTHON_LIBS=$new_LIBS
436868fb 9245fi
81ecdfbb
RW
9246rm -f core conftest.err conftest.$ac_objext \
9247 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
9248 CPPFLAGS=$save_CPPFLAGS
9249 LIBS=$save_LIBS
ec685c5e
DE
9250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
9251$as_echo "${found_usable_python}" >&6; }
81ecdfbb 9252
ec685c5e
DE
9253 fi
9254 fi
9c4ea6c5 9255 if test "${have_libpython}" = python2.7 -o "${have_libpython}" = python27; then
11763c18
TT
9256
9257$as_echo "#define HAVE_LIBPYTHON2_7 1" >>confdefs.h
9258
9c4ea6c5 9259 elif test "${have_libpython}" = python2.6 -o "${have_libpython}" = python26; then
ec685c5e
DE
9260
9261$as_echo "#define HAVE_LIBPYTHON2_6 1" >>confdefs.h
9262
9c4ea6c5 9263 elif test "${have_libpython}" = python2.5 -o "${have_libpython}" = python25; then
ec685c5e
DE
9264
9265$as_echo "#define HAVE_LIBPYTHON2_5 1" >>confdefs.h
9266
9c4ea6c5 9267 elif test "${have_libpython}" = python2.4 -o "${have_libpython}" = python24; then
81ecdfbb
RW
9268
9269$as_echo "#define HAVE_LIBPYTHON2_4 1" >>confdefs.h
9270
81ecdfbb 9271 fi
ec685c5e
DE
9272
9273 if test "${have_libpython}" = no; then
81ecdfbb
RW
9274 case "${with_python}" in
9275 yes)
9276 as_fn_error "python is missing or unusable" "$LINENO" 5
9277 ;;
9278 auto)
9279 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
9280$as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
9281 ;;
9282 *)
9283 as_fn_error "no usable python found at ${with_python}" "$LINENO" 5
9284 ;;
9285 esac
0c4a4063
DE
9286 else
9287 if test -n "${python_prefix}"; then
9288
9289cat >>confdefs.h <<_ACEOF
9290#define WITH_PYTHON_PATH "${python_prefix}"
9291_ACEOF
9292
9293
9294 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
9295 if test "x$prefix" = xNONE; then
9296 test_prefix=/usr/local
9297 else
9298 test_prefix=$prefix
9299 fi
9300 else
9301 test_prefix=$exec_prefix
9302 fi
9303 value=0
9304 case ${python_prefix} in
9305 "${test_prefix}"|"${test_prefix}/"*|\
9306 '${exec_prefix}'|'${exec_prefix}/'*)
9307 value=1
9308 ;;
9309 esac
9310
9311cat >>confdefs.h <<_ACEOF
9312#define PYTHON_PATH_RELOCATABLE $value
9313_ACEOF
9314
9315
9316 fi
81ecdfbb 9317 fi
436868fb 9318fi
436868fb 9319
ec685c5e 9320if test "${have_libpython}" != no; then
436868fb 9321
81ecdfbb 9322$as_echo "#define HAVE_PYTHON 1" >>confdefs.h
436868fb 9323
81ecdfbb
RW
9324 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
9325 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
9326 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
94f7449c 9327 CONFIG_INSTALL="$CONFIG_INSTALL install-python"
81ecdfbb 9328 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
436868fb 9329
81ecdfbb
RW
9330 # Flags needed to compile Python code (taken from python-config --cflags).
9331 # We cannot call python-config directly because it will output whatever was
9332 # used when compiling the Python interpreter itself, including flags which
9333 # would make the python-related objects be compiled differently from the
9334 # rest of GDB (e.g., -O2 and -fPIC).
9335 if test "${GCC}" = yes; then
9336 tentative_python_cflags="-fno-strict-aliasing -DNDEBUG -fwrapv"
9337 fi
436868fb 9338
81ecdfbb
RW
9339 if test "x${tentative_python_cflags}" != x; then
9340 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
9341$as_echo_n "checking compiler flags for python code... " >&6; }
9342 for flag in ${tentative_python_cflags}; do
9343 # Check that the compiler accepts it
9344 saved_CFLAGS="$CFLAGS"
9345 CFLAGS="$CFLAGS $flag"
9346 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9347/* end confdefs.h. */
81ecdfbb 9348
a9322a30
TT
9349int
9350main ()
9351{
a9322a30
TT
9352
9353 ;
9354 return 0;
9355}
bec39cab 9356_ACEOF
81ecdfbb
RW
9357if ac_fn_c_try_compile "$LINENO"; then :
9358 PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
bec39cab 9359fi
81ecdfbb
RW
9360rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9361 CFLAGS="$saved_CFLAGS"
9362 done
9363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
9364$as_echo "${PYTHON_CFLAGS}" >&6; }
9365 fi
043b6510 9366
c83393b9
JB
9367 # On x64 Windows, Python's include headers, and pyconfig.h in
9368 # particular, rely on MS_WIN64 macro to detect that it's a 64bit
9369 # version of Windows. Unfortunately, MS_WIN64 is only defined if
9370 # _MSC_VER, a Microsoft-specific macro, is defined. So, when
9371 # building on x64 Windows with GCC, we define MS_WIN64 ourselves.
9372 # The issue was reported to the Python community, but still isn't
9373 # solved as of 2012-10-02 (http://bugs.python.org/issue4709).
9374
043b6510 9375 case "$gdb_host" in
c83393b9
JB
9376 mingw64)
9377 if test "${GCC}" = yes; then
9378 CPPFLAGS="$CPPFLAGS -DMS_WIN64"
9379 fi
9380 ;;
043b6510 9381 esac
a8db4212
YPK
9382
9383 # Note that "python -m threading" cannot be used to check for
9384 # threading support due to a bug in Python 2.7.3
9385 # (http://bugs.python.org/issue15567).
9386 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether python supports threads" >&5
9387$as_echo_n "checking whether python supports threads... " >&6; }
9388 saved_CPPFLAGS="${CPPFLAGS}"
9389 CPPFLAGS="${PYTHON_CPPFLAGS}"
9390 # Note that the test is reversed so that python_has_threads=yes on
9391 # unexpected failures.
9392 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9393/* end confdefs.h. */
9394
9395#include <Python.h>
9396#ifdef WITH_THREAD
9397# error
9398#endif
9399
9400_ACEOF
9401if ac_fn_c_try_cpp "$LINENO"; then :
9402 python_has_threads=no
9403else
9404 python_has_threads=yes
9405fi
9406rm -f conftest.err conftest.$ac_ext
9407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_has_threads}" >&5
9408$as_echo "${python_has_threads}" >&6; }
9409 CPPFLAGS="${saved_CPPFLAGS}"
81ecdfbb 9410else
6dddc817
DE
9411 # Even if Python support is not compiled in, we need to have this file
9412 # included so that the "python" command, et.al., still exists.
9413 CONFIG_OBS="$CONFIG_OBS python.o"
9414 CONFIG_SRCS="$CONFIG_SRCS python/python.c"
a9322a30 9415fi
9a156167 9416
a4a1c157
PA
9417# Work around Python http://bugs.python.org/issue10112. See also
9418# http://bugs.python.org/issue11410, otherwise -Wl,--dynamic-list has
9419# no effect. Note that the only test after this that uses Python is
9420# the -rdynamic/-Wl,--dynamic-list test, and we do want that one to be
9421# run without -export-dynamic too.
9422PYTHON_LIBS=`echo $PYTHON_LIBS | sed -e 's/-Xlinker -export-dynamic//'`
9423
9424
ed3ef339
DE
9425
9426
4df42755
DE
9427 if test "${have_libpython}" != no; then
9428 HAVE_PYTHON_TRUE=
9429 HAVE_PYTHON_FALSE='#'
9430else
9431 HAVE_PYTHON_TRUE='#'
9432 HAVE_PYTHON_FALSE=
9433fi
9434
ed3ef339
DE
9435
9436# -------------------- #
9437# Check for libguile. #
9438# -------------------- #
9439
9440
e1402065
DE
9441
9442
9443
9444
9445# Check whether --with-guile was given.
9446if test "${with_guile+set}" = set; then :
9447 withval=$with_guile;
9448else
9449 with_guile=auto
9450fi
9451
9452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use guile" >&5
9453$as_echo_n "checking whether to use guile... " >&6; }
9454{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_guile" >&5
9455$as_echo "$with_guile" >&6; }
9456
ed3ef339
DE
9457# Extract the first word of "pkg-config", so it can be a program name with args.
9458set dummy pkg-config; ac_word=$2
9459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9460$as_echo_n "checking for $ac_word... " >&6; }
9461if test "${ac_cv_path_pkg_config_prog_path+set}" = set; then :
9462 $as_echo_n "(cached) " >&6
9463else
9464 case $pkg_config_prog_path in
9465 [\\/]* | ?:[\\/]*)
9466 ac_cv_path_pkg_config_prog_path="$pkg_config_prog_path" # Let the user override the test with a path.
9467 ;;
9468 *)
9469 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9470for as_dir in $PATH
9471do
9472 IFS=$as_save_IFS
9473 test -z "$as_dir" && as_dir=.
9474 for ac_exec_ext in '' $ac_executable_extensions; do
9475 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9476 ac_cv_path_pkg_config_prog_path="$as_dir/$ac_word$ac_exec_ext"
9477 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9478 break 2
9479 fi
9480done
9481 done
9482IFS=$as_save_IFS
9483
9484 test -z "$ac_cv_path_pkg_config_prog_path" && ac_cv_path_pkg_config_prog_path="missing"
9485 ;;
9486esac
9487fi
9488pkg_config_prog_path=$ac_cv_path_pkg_config_prog_path
9489if test -n "$pkg_config_prog_path"; then
9490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config_prog_path" >&5
9491$as_echo "$pkg_config_prog_path" >&6; }
9492else
9493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9494$as_echo "no" >&6; }
9495fi
9496
9497
9498
214ab2da 9499try_guile_versions="guile-2.2 guile-2.0"
ed3ef339
DE
9500have_libguile=no
9501case "${with_guile}" in
9502no)
9503 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: guile support disabled; some features will be unavailable." >&5
9504$as_echo "$as_me: WARNING: guile support disabled; some features will be unavailable." >&2;}
9505 ;;
9506auto)
e1402065
DE
9507 if test "${pkg_config_prog_path}" = "missing"; then
9508 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found, guile support disabled" >&5
9509$as_echo "$as_me: WARNING: pkg-config not found, guile support disabled" >&2;}
9510 else
ed3ef339
DE
9511
9512 pkg_config=${pkg_config_prog_path}
9513 guile_version_list=${try_guile_versions}
9514 flag_errors=no
9515
ed3ef339
DE
9516 found_usable_guile=checking
9517 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
9518$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
9519 for guile_version in ${guile_version_list}; do
9520 ${pkg_config} --exists ${guile_version} 2>/dev/null
9521 if test $? != 0; then
9522 continue
9523 fi
9524 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
9525 if test $? != 0; then
9526 as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
9527 fi
9528 new_LIBS=`${pkg_config} --libs ${guile_version}`
9529 if test $? != 0; then
9530 as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
9531 fi
9532 found_usable_guile=${guile_version}
9533 break
9534 done
9535 if test "${found_usable_guile}" = "checking"; then
9536 if test "${flag_errors}" = "yes"; then
9537 as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
9538 else
9539 found_usable_guile=no
9540 fi
9541 fi
9542 if test "${found_usable_guile}" != no; then
9543 save_CPPFLAGS=$CPPFLAGS
9544 save_LIBS=$LIBS
9545 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9546 LIBS="$LIBS $new_LIBS"
9547 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9548/* end confdefs.h. */
9549#include "libguile.h"
9550int
9551main ()
9552{
9553scm_init_guile ();
9554 ;
9555 return 0;
9556}
9557_ACEOF
9558if ac_fn_c_try_link "$LINENO"; then :
9559 have_libguile=yes
9560 GUILE_CPPFLAGS=$new_CPPFLAGS
9561 GUILE_LIBS=$new_LIBS
9562else
9563 found_usable_guile=no
9564fi
9565rm -f core conftest.err conftest.$ac_objext \
9566 conftest$ac_exeext conftest.$ac_ext
92fab5a6
AW
9567 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
9568if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then :
9569
9570$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
9571
9572
9573fi
9574
ed3ef339
DE
9575 CPPFLAGS=$save_CPPFLAGS
9576 LIBS=$save_LIBS
9577 if test "${found_usable_guile}" = no; then
9578 if test "${flag_errors}" = yes; then
9579 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9580$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9581as_fn_error "linking guile version ${guile_version} test program failed
9582See \`config.log' for more details." "$LINENO" 5; }
9583 fi
9584 fi
9585 fi
9586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
9587$as_echo "${found_usable_guile}" >&6; }
9588
e1402065 9589 fi
ed3ef339
DE
9590 ;;
9591yes)
e1402065
DE
9592 if test "${pkg_config_prog_path}" = "missing"; then
9593 as_fn_error "pkg-config not found" "$LINENO" 5
9594 fi
ed3ef339
DE
9595
9596 pkg_config=${pkg_config_prog_path}
9597 guile_version_list=${try_guile_versions}
9598 flag_errors=yes
9599
ed3ef339
DE
9600 found_usable_guile=checking
9601 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
9602$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
9603 for guile_version in ${guile_version_list}; do
9604 ${pkg_config} --exists ${guile_version} 2>/dev/null
9605 if test $? != 0; then
9606 continue
9607 fi
9608 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
9609 if test $? != 0; then
9610 as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
9611 fi
9612 new_LIBS=`${pkg_config} --libs ${guile_version}`
9613 if test $? != 0; then
9614 as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
9615 fi
9616 found_usable_guile=${guile_version}
9617 break
9618 done
9619 if test "${found_usable_guile}" = "checking"; then
9620 if test "${flag_errors}" = "yes"; then
9621 as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
9622 else
9623 found_usable_guile=no
9624 fi
9625 fi
9626 if test "${found_usable_guile}" != no; then
9627 save_CPPFLAGS=$CPPFLAGS
9628 save_LIBS=$LIBS
9629 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9630 LIBS="$LIBS $new_LIBS"
9631 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9632/* end confdefs.h. */
9633#include "libguile.h"
9634int
9635main ()
9636{
9637scm_init_guile ();
9638 ;
9639 return 0;
9640}
9641_ACEOF
9642if ac_fn_c_try_link "$LINENO"; then :
9643 have_libguile=yes
9644 GUILE_CPPFLAGS=$new_CPPFLAGS
9645 GUILE_LIBS=$new_LIBS
9646else
9647 found_usable_guile=no
9648fi
9649rm -f core conftest.err conftest.$ac_objext \
9650 conftest$ac_exeext conftest.$ac_ext
92fab5a6
AW
9651 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
9652if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then :
9653
9654$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
9655
9656
9657fi
9658
ed3ef339
DE
9659 CPPFLAGS=$save_CPPFLAGS
9660 LIBS=$save_LIBS
9661 if test "${found_usable_guile}" = no; then
9662 if test "${flag_errors}" = yes; then
9663 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9664$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9665as_fn_error "linking guile version ${guile_version} test program failed
9666See \`config.log' for more details." "$LINENO" 5; }
9667 fi
9668 fi
9669 fi
9670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
9671$as_echo "${found_usable_guile}" >&6; }
9672
9673 ;;
9674[\\/]* | ?:[\\/]*)
e1402065 9675 if test -x "${with_guile}"; then
ed3ef339
DE
9676
9677 pkg_config=${with_guile}
9678 guile_version_list=${try_guile_versions}
9679 flag_errors=yes
9680
ed3ef339
DE
9681 found_usable_guile=checking
9682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
9683$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
9684 for guile_version in ${guile_version_list}; do
9685 ${pkg_config} --exists ${guile_version} 2>/dev/null
9686 if test $? != 0; then
9687 continue
9688 fi
9689 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
9690 if test $? != 0; then
9691 as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
9692 fi
9693 new_LIBS=`${pkg_config} --libs ${guile_version}`
9694 if test $? != 0; then
9695 as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
9696 fi
9697 found_usable_guile=${guile_version}
9698 break
9699 done
9700 if test "${found_usable_guile}" = "checking"; then
9701 if test "${flag_errors}" = "yes"; then
9702 as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
9703 else
9704 found_usable_guile=no
9705 fi
9706 fi
9707 if test "${found_usable_guile}" != no; then
9708 save_CPPFLAGS=$CPPFLAGS
9709 save_LIBS=$LIBS
9710 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9711 LIBS="$LIBS $new_LIBS"
9712 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9713/* end confdefs.h. */
9714#include "libguile.h"
9715int
9716main ()
9717{
9718scm_init_guile ();
9719 ;
9720 return 0;
9721}
9722_ACEOF
9723if ac_fn_c_try_link "$LINENO"; then :
9724 have_libguile=yes
9725 GUILE_CPPFLAGS=$new_CPPFLAGS
9726 GUILE_LIBS=$new_LIBS
9727else
9728 found_usable_guile=no
9729fi
9730rm -f core conftest.err conftest.$ac_objext \
9731 conftest$ac_exeext conftest.$ac_ext
92fab5a6
AW
9732 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
9733if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then :
9734
9735$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
9736
9737
9738fi
9739
ed3ef339
DE
9740 CPPFLAGS=$save_CPPFLAGS
9741 LIBS=$save_LIBS
9742 if test "${found_usable_guile}" = no; then
9743 if test "${flag_errors}" = yes; then
9744 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9745$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9746as_fn_error "linking guile version ${guile_version} test program failed
9747See \`config.log' for more details." "$LINENO" 5; }
9748 fi
9749 fi
9750 fi
9751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
9752$as_echo "${found_usable_guile}" >&6; }
9753
e1402065
DE
9754 else
9755 as_fn_error "Guile config program not executable: ${with_guile}" "$LINENO" 5
9756 fi
ed3ef339
DE
9757 ;;
9758"" | */*)
9759 # Disallow --with=guile="" and --with-guile=foo/bar.
9760 as_fn_error "invalid value for --with-guile" "$LINENO" 5
9761 ;;
9762*)
9763 # A space separate list of guile versions to try, in order.
e1402065
DE
9764 if test "${pkg_config_prog_path}" = "missing"; then
9765 as_fn_error "pkg-config not found" "$LINENO" 5
9766 fi
ed3ef339
DE
9767
9768 pkg_config=${pkg_config_prog_path}
9769 guile_version_list=${with_guile}
9770 flag_errors=yes
9771
ed3ef339
DE
9772 found_usable_guile=checking
9773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
9774$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
9775 for guile_version in ${guile_version_list}; do
9776 ${pkg_config} --exists ${guile_version} 2>/dev/null
9777 if test $? != 0; then
9778 continue
9779 fi
9780 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
9781 if test $? != 0; then
9782 as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
9783 fi
9784 new_LIBS=`${pkg_config} --libs ${guile_version}`
9785 if test $? != 0; then
9786 as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
9787 fi
9788 found_usable_guile=${guile_version}
9789 break
9790 done
9791 if test "${found_usable_guile}" = "checking"; then
9792 if test "${flag_errors}" = "yes"; then
9793 as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
9794 else
9795 found_usable_guile=no
9796 fi
9797 fi
9798 if test "${found_usable_guile}" != no; then
9799 save_CPPFLAGS=$CPPFLAGS
9800 save_LIBS=$LIBS
9801 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9802 LIBS="$LIBS $new_LIBS"
9803 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9804/* end confdefs.h. */
9805#include "libguile.h"
9806int
9807main ()
9808{
9809scm_init_guile ();
9810 ;
9811 return 0;
9812}
9813_ACEOF
9814if ac_fn_c_try_link "$LINENO"; then :
9815 have_libguile=yes
9816 GUILE_CPPFLAGS=$new_CPPFLAGS
9817 GUILE_LIBS=$new_LIBS
9818else
9819 found_usable_guile=no
9820fi
9821rm -f core conftest.err conftest.$ac_objext \
9822 conftest$ac_exeext conftest.$ac_ext
92fab5a6
AW
9823 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
9824if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then :
9825
9826$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
9827
9828
9829fi
9830
ed3ef339
DE
9831 CPPFLAGS=$save_CPPFLAGS
9832 LIBS=$save_LIBS
9833 if test "${found_usable_guile}" = no; then
9834 if test "${flag_errors}" = yes; then
9835 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9836$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9837as_fn_error "linking guile version ${guile_version} test program failed
9838See \`config.log' for more details." "$LINENO" 5; }
9839 fi
9840 fi
9841 fi
9842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
9843$as_echo "${found_usable_guile}" >&6; }
9844
9845 ;;
9846esac
9847
e76c5d17 9848if test "${have_libguile}" != no; then
d342a0da
DE
9849 case "${with_guile}" in
9850 [\\/]* | ?:[\\/]*)
e76c5d17
DE
9851
9852 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
9853$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
9854if test "${ac_cv_guild_program_name+set}" = set; then :
9855 $as_echo_n "(cached) " >&6
9856else
d342a0da 9857 ac_cv_guild_program_name="`"${with_guile}" --variable guild "${guile_version}"`"
e76c5d17
DE
9858
9859 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
9860 # the 'guild' and 'bindir' variables. In that case, try to guess
9861 # what the program name is, at the risk of getting it wrong if
9862 # Guile was configured with '--program-suffix' or similar.
9863 if test "x$ac_cv_guild_program_name" = "x"; then
d342a0da 9864 guile_exec_prefix="`"${with_guile}" --variable exec_prefix "${guile_version}"`"
e76c5d17
DE
9865 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
9866 fi
9867
9868fi
9869{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
9870$as_echo "$ac_cv_guild_program_name" >&6; }
9871
9872 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
9873 as_fn_error "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
9874 fi
9875
9876 GUILD="$ac_cv_guild_program_name"
9877
9878
d342a0da
DE
9879 ;;
9880 *)
9881
9882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
9883$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
9884if test "${ac_cv_guild_program_name+set}" = set; then :
9885 $as_echo_n "(cached) " >&6
9886else
9887 ac_cv_guild_program_name="`"${pkg_config_prog_path}" --variable guild "${guile_version}"`"
9888
9889 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
9890 # the 'guild' and 'bindir' variables. In that case, try to guess
9891 # what the program name is, at the risk of getting it wrong if
9892 # Guile was configured with '--program-suffix' or similar.
9893 if test "x$ac_cv_guild_program_name" = "x"; then
9894 guile_exec_prefix="`"${pkg_config_prog_path}" --variable exec_prefix "${guile_version}"`"
9895 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
9896 fi
9897
9898fi
9899{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
9900$as_echo "$ac_cv_guild_program_name" >&6; }
9901
9902 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
9903 as_fn_error "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
9904 fi
9905
9906 GUILD="$ac_cv_guild_program_name"
9907
9908
9909 ;;
9910 esac
e76c5d17
DE
9911
9912
9913 if test "$cross_compiling" = no; then
9914 GUILD_TARGET_FLAG=
9915 else
9916 GUILD_TARGET_FLAG="--target=$host"
9917 fi
9918
9919
9920
9921
9922 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether guild supports this host" >&5
9923$as_echo_n "checking whether guild supports this host... " >&6; }
9924if test "${ac_cv_guild_ok+set}" = set; then :
9925 $as_echo_n "(cached) " >&6
9926else
9927 echo "$ac_cv_guild_program_name compile $GUILD_TARGET_FLAG -o conftest.go $srcdir/guile/lib/gdb/support.scm" >&5
9928 if "$ac_cv_guild_program_name" compile $GUILD_TARGET_FLAG -o conftest.go "$srcdir/guile/lib/gdb/support.scm" >&5 2>&5; then
9929 ac_cv_guild_ok=yes
9930 else
9931 ac_cv_guild_ok=no
9932 fi
9933fi
9934{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_ok" >&5
9935$as_echo "$ac_cv_guild_ok" >&6; }
9936
9937 if test "$ac_cv_guild_ok" = no; then
9938 have_libguile=no
9939 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling guile support" >&5
9940$as_echo "$as_me: WARNING: disabling guile support" >&2;}
9941 fi
9942fi
9943
ed3ef339
DE
9944if test "${have_libguile}" != no; then
9945
9946$as_echo "#define HAVE_GUILE 1" >>confdefs.h
9947
9948 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_GUILE_OBS)"
9949 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_GUILE_DEPS)"
9950 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_GUILE_SRCS)"
9951 CONFIG_INSTALL="$CONFIG_INSTALL install-guile"
9952 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_GUILE_CFLAGS)"
16954d5d
LC
9953
9954 save_LIBS="$LIBS"
9955 save_CPPFLAGS="$CPPFLAGS"
9956 LIBS="$GUILE_LIBS"
9957 CPPFLAGS="$GUILE_CPPFLAGS"
9958 for ac_func in scm_new_smob
9959do :
9960 ac_fn_c_check_func "$LINENO" "scm_new_smob" "ac_cv_func_scm_new_smob"
9961if test "x$ac_cv_func_scm_new_smob" = x""yes; then :
9962 cat >>confdefs.h <<_ACEOF
9963#define HAVE_SCM_NEW_SMOB 1
9964_ACEOF
9965
9966fi
9967done
9968
9969 LIBS="$save_LIBS"
9970 CPPFLAGS="$save_CPPFLAGS"
ed3ef339
DE
9971else
9972 # Even if Guile support is not compiled in, we need to have these files
9973 # included.
9974 CONFIG_OBS="$CONFIG_OBS guile.o"
9975 CONFIG_SRCS="$CONFIG_SRCS guile/guile.c"
9976fi
9a156167 9977
ac534cba 9978
4df42755
DE
9979 if test "${have_libguile}" != no; then
9980 HAVE_GUILE_TRUE=
9981 HAVE_GUILE_FALSE='#'
9982else
9983 HAVE_GUILE_TRUE='#'
9984 HAVE_GUILE_FALSE=
9985fi
9986
ac534cba 9987
d344e670
DE
9988# --------------------- #
9989# Check for libmcheck. #
9990# --------------------- #
9991
a8db4212
YPK
9992# Enable -lmcheck by default (it provides cheap-enough memory mangling),
9993# but turn it off if Python is enabled with threads, since -lmcheck is
9994# not thread safe (http://sourceware.org/bugzilla/show_bug.cgi?id=9939),
9995# and for releases.
17ef446e
PA
9996if test \( "${have_libpython}" = "no" -o "${python_has_threads}" = "no" \) \
9997 && $development; then
9998 libmcheck_default=yes
9999else
10000 libmcheck_default=no
a8db4212
YPK
10001fi
10002
17ef446e
PA
10003 # Check whether --enable-libmcheck was given.
10004if test "${enable_libmcheck+set}" = set; then :
10005 enableval=$enable_libmcheck; case "${enableval}" in
10006 yes | y) ENABLE_LIBMCHECK="yes" ;;
10007 no | n) ENABLE_LIBMCHECK="no" ;;
10008 *) as_fn_error "bad value ${enableval} for --enable-libmcheck" "$LINENO" 5 ;;
10009 esac
10010fi
10011
10012
10013 if test -z "${ENABLE_LIBMCHECK}"; then
10014 ENABLE_LIBMCHECK=${libmcheck_default}
a8db4212 10015 fi
17ef446e
PA
10016
10017 if test "$ENABLE_LIBMCHECK" = "yes" ; then
10018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lmcheck" >&5
a8db4212
YPK
10019$as_echo_n "checking for main in -lmcheck... " >&6; }
10020if test "${ac_cv_lib_mcheck_main+set}" = set; then :
10021 $as_echo_n "(cached) " >&6
10022else
10023 ac_check_lib_save_LIBS=$LIBS
10024LIBS="-lmcheck $LIBS"
10025cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10026/* end confdefs.h. */
10027
10028
10029int
10030main ()
10031{
10032return main ();
10033 ;
10034 return 0;
10035}
10036_ACEOF
10037if ac_fn_c_try_link "$LINENO"; then :
10038 ac_cv_lib_mcheck_main=yes
10039else
10040 ac_cv_lib_mcheck_main=no
10041fi
10042rm -f core conftest.err conftest.$ac_objext \
10043 conftest$ac_exeext conftest.$ac_ext
10044LIBS=$ac_check_lib_save_LIBS
10045fi
10046{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mcheck_main" >&5
10047$as_echo "$ac_cv_lib_mcheck_main" >&6; }
10048if test "x$ac_cv_lib_mcheck_main" = x""yes; then :
10049 cat >>confdefs.h <<_ACEOF
10050#define HAVE_LIBMCHECK 1
10051_ACEOF
10052
10053 LIBS="-lmcheck $LIBS"
10054
10055fi
10056
17ef446e
PA
10057 fi
10058
10059
10060if test "$ENABLE_LIBMCHECK" = "yes" \
10061 -a "${have_libpython}" != "no" \
10062 -a "${python_has_threads}" = "yes" ; then
10063 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&5
10064$as_echo "$as_me: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&2;}
a8db4212
YPK
10065fi
10066
58bfce93
MM
10067
10068# Check whether --with-intel_pt was given.
10069if test "${with_intel_pt+set}" = set; then :
10070 withval=$with_intel_pt;
10071else
10072 with_intel_pt=auto
10073fi
10074
10075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5
10076$as_echo_n "checking whether to use intel pt... " >&6; }
10077{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5
10078$as_echo "$with_intel_pt" >&6; }
10079
10080if test "${with_intel_pt}" = no; then
bc504a31
PA
10081 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&5
10082$as_echo "$as_me: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&2;}
58bfce93
MM
10083 HAVE_LIBIPT=no
10084else
5599c404
MM
10085 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10086/* end confdefs.h. */
10087
10088#include <linux/perf_event.h>
10089#ifndef PERF_ATTR_SIZE_VER5
10090# error
10091#endif
10092
10093_ACEOF
10094if ac_fn_c_try_cpp "$LINENO"; then :
10095 perf_event=yes
10096else
10097 perf_event=no
10098fi
10099rm -f conftest.err conftest.$ac_ext
10100 if test "$perf_event" != yes; then
10101 if test "$with_intel_pt" = yes; then
10102 as_fn_error "linux/perf_event.h missing or too old" "$LINENO" 5
10103 else
10104 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5
10105$as_echo "$as_me: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&2;}
10106 fi
10107 fi
10108
58bfce93
MM
10109
10110
10111
10112
10113
10114
10115
10116
10117 use_additional=yes
10118
10119 acl_save_prefix="$prefix"
10120 prefix="$acl_final_prefix"
10121 acl_save_exec_prefix="$exec_prefix"
10122 exec_prefix="$acl_final_exec_prefix"
10123
10124 eval additional_includedir=\"$includedir\"
10125 eval additional_libdir=\"$libdir\"
10126
10127 exec_prefix="$acl_save_exec_prefix"
10128 prefix="$acl_save_prefix"
10129
10130
10131# Check whether --with-libipt-prefix was given.
10132if test "${with_libipt_prefix+set}" = set; then :
10133 withval=$with_libipt_prefix;
10134 if test "X$withval" = "Xno"; then
10135 use_additional=no
10136 else
10137 if test "X$withval" = "X"; then
10138
10139 acl_save_prefix="$prefix"
10140 prefix="$acl_final_prefix"
10141 acl_save_exec_prefix="$exec_prefix"
10142 exec_prefix="$acl_final_exec_prefix"
10143
10144 eval additional_includedir=\"$includedir\"
10145 eval additional_libdir=\"$libdir\"
10146
10147 exec_prefix="$acl_save_exec_prefix"
10148 prefix="$acl_save_prefix"
10149
10150 else
10151 additional_includedir="$withval/include"
10152 additional_libdir="$withval/lib"
10153 fi
10154 fi
10155
10156fi
10157
10158 LIBIPT=
10159 LTLIBIPT=
10160 INCIPT=
10161 rpathdirs=
10162 ltrpathdirs=
10163 names_already_handled=
10164 names_next_round='ipt '
10165 while test -n "$names_next_round"; do
10166 names_this_round="$names_next_round"
10167 names_next_round=
10168 for name in $names_this_round; do
10169 already_handled=
10170 for n in $names_already_handled; do
10171 if test "$n" = "$name"; then
10172 already_handled=yes
10173 break
10174 fi
10175 done
10176 if test -z "$already_handled"; then
10177 names_already_handled="$names_already_handled $name"
10178 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
10179 eval value=\"\$HAVE_LIB$uppername\"
10180 if test -n "$value"; then
10181 if test "$value" = yes; then
10182 eval value=\"\$LIB$uppername\"
10183 test -z "$value" || LIBIPT="${LIBIPT}${LIBIPT:+ }$value"
10184 eval value=\"\$LTLIB$uppername\"
10185 test -z "$value" || LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$value"
10186 else
10187 :
10188 fi
10189 else
10190 found_dir=
10191 found_la=
10192 found_so=
10193 found_a=
10194 if test $use_additional = yes; then
10195 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
10196 found_dir="$additional_libdir"
10197 found_so="$additional_libdir/lib$name.$shlibext"
10198 if test -f "$additional_libdir/lib$name.la"; then
10199 found_la="$additional_libdir/lib$name.la"
10200 fi
10201 else
10202 if test -f "$additional_libdir/lib$name.$libext"; then
10203 found_dir="$additional_libdir"
10204 found_a="$additional_libdir/lib$name.$libext"
10205 if test -f "$additional_libdir/lib$name.la"; then
10206 found_la="$additional_libdir/lib$name.la"
10207 fi
10208 fi
10209 fi
10210 fi
10211 if test "X$found_dir" = "X"; then
10212 for x in $LDFLAGS $LTLIBIPT; do
10213
10214 acl_save_prefix="$prefix"
10215 prefix="$acl_final_prefix"
10216 acl_save_exec_prefix="$exec_prefix"
10217 exec_prefix="$acl_final_exec_prefix"
10218 eval x=\"$x\"
10219 exec_prefix="$acl_save_exec_prefix"
10220 prefix="$acl_save_prefix"
10221
10222 case "$x" in
10223 -L*)
10224 dir=`echo "X$x" | sed -e 's/^X-L//'`
10225 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
10226 found_dir="$dir"
10227 found_so="$dir/lib$name.$shlibext"
10228 if test -f "$dir/lib$name.la"; then
10229 found_la="$dir/lib$name.la"
10230 fi
10231 else
10232 if test -f "$dir/lib$name.$libext"; then
10233 found_dir="$dir"
10234 found_a="$dir/lib$name.$libext"
10235 if test -f "$dir/lib$name.la"; then
10236 found_la="$dir/lib$name.la"
10237 fi
10238 fi
10239 fi
10240 ;;
10241 esac
10242 if test "X$found_dir" != "X"; then
10243 break
10244 fi
10245 done
10246 fi
10247 if test "X$found_dir" != "X"; then
10248 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$found_dir -l$name"
10249 if test "X$found_so" != "X"; then
10250 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
10251 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
10252 else
10253 haveit=
10254 for x in $ltrpathdirs; do
10255 if test "X$x" = "X$found_dir"; then
10256 haveit=yes
10257 break
10258 fi
10259 done
10260 if test -z "$haveit"; then
10261 ltrpathdirs="$ltrpathdirs $found_dir"
10262 fi
10263 if test "$hardcode_direct" = yes; then
10264 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
10265 else
10266 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
10267 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
10268 haveit=
10269 for x in $rpathdirs; do
10270 if test "X$x" = "X$found_dir"; then
10271 haveit=yes
10272 break
10273 fi
10274 done
10275 if test -z "$haveit"; then
10276 rpathdirs="$rpathdirs $found_dir"
10277 fi
10278 else
10279 haveit=
10280 for x in $LDFLAGS $LIBIPT; do
10281
10282 acl_save_prefix="$prefix"
10283 prefix="$acl_final_prefix"
10284 acl_save_exec_prefix="$exec_prefix"
10285 exec_prefix="$acl_final_exec_prefix"
10286 eval x=\"$x\"
10287 exec_prefix="$acl_save_exec_prefix"
10288 prefix="$acl_save_prefix"
10289
10290 if test "X$x" = "X-L$found_dir"; then
10291 haveit=yes
10292 break
10293 fi
10294 done
10295 if test -z "$haveit"; then
10296 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir"
10297 fi
10298 if test "$hardcode_minus_L" != no; then
10299 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
10300 else
10301 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
10302 fi
10303 fi
10304 fi
10305 fi
10306 else
10307 if test "X$found_a" != "X"; then
10308 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_a"
10309 else
10310 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir -l$name"
10311 fi
10312 fi
10313 additional_includedir=
10314 case "$found_dir" in
10315 */lib | */lib/)
10316 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
10317 additional_includedir="$basedir/include"
10318 ;;
10319 esac
10320 if test "X$additional_includedir" != "X"; then
10321 if test "X$additional_includedir" != "X/usr/include"; then
10322 haveit=
10323 if test "X$additional_includedir" = "X/usr/local/include"; then
10324 if test -n "$GCC"; then
10325 case $host_os in
10326 linux*) haveit=yes;;
10327 esac
10328 fi
10329 fi
10330 if test -z "$haveit"; then
10331 for x in $CPPFLAGS $INCIPT; do
10332
10333 acl_save_prefix="$prefix"
10334 prefix="$acl_final_prefix"
10335 acl_save_exec_prefix="$exec_prefix"
10336 exec_prefix="$acl_final_exec_prefix"
10337 eval x=\"$x\"
10338 exec_prefix="$acl_save_exec_prefix"
10339 prefix="$acl_save_prefix"
10340
10341 if test "X$x" = "X-I$additional_includedir"; then
10342 haveit=yes
10343 break
10344 fi
10345 done
10346 if test -z "$haveit"; then
10347 if test -d "$additional_includedir"; then
10348 INCIPT="${INCIPT}${INCIPT:+ }-I$additional_includedir"
10349 fi
10350 fi
10351 fi
10352 fi
10353 fi
10354 if test -n "$found_la"; then
10355 save_libdir="$libdir"
10356 case "$found_la" in
10357 */* | *\\*) . "$found_la" ;;
10358 *) . "./$found_la" ;;
10359 esac
10360 libdir="$save_libdir"
10361 for dep in $dependency_libs; do
10362 case "$dep" in
10363 -L*)
10364 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10365 if test "X$additional_libdir" != "X/usr/lib"; then
10366 haveit=
10367 if test "X$additional_libdir" = "X/usr/local/lib"; then
10368 if test -n "$GCC"; then
10369 case $host_os in
10370 linux*) haveit=yes;;
10371 esac
10372 fi
10373 fi
10374 if test -z "$haveit"; then
10375 haveit=
10376 for x in $LDFLAGS $LIBIPT; do
10377
10378 acl_save_prefix="$prefix"
10379 prefix="$acl_final_prefix"
10380 acl_save_exec_prefix="$exec_prefix"
10381 exec_prefix="$acl_final_exec_prefix"
10382 eval x=\"$x\"
10383 exec_prefix="$acl_save_exec_prefix"
10384 prefix="$acl_save_prefix"
10385
10386 if test "X$x" = "X-L$additional_libdir"; then
10387 haveit=yes
10388 break
10389 fi
10390 done
10391 if test -z "$haveit"; then
10392 if test -d "$additional_libdir"; then
10393 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$additional_libdir"
10394 fi
10395 fi
10396 haveit=
10397 for x in $LDFLAGS $LTLIBIPT; do
10398
10399 acl_save_prefix="$prefix"
10400 prefix="$acl_final_prefix"
10401 acl_save_exec_prefix="$exec_prefix"
10402 exec_prefix="$acl_final_exec_prefix"
10403 eval x=\"$x\"
10404 exec_prefix="$acl_save_exec_prefix"
10405 prefix="$acl_save_prefix"
10406
10407 if test "X$x" = "X-L$additional_libdir"; then
10408 haveit=yes
10409 break
10410 fi
10411 done
10412 if test -z "$haveit"; then
10413 if test -d "$additional_libdir"; then
10414 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$additional_libdir"
10415 fi
10416 fi
10417 fi
10418 fi
10419 ;;
10420 -R*)
10421 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10422 if test "$enable_rpath" != no; then
10423 haveit=
10424 for x in $rpathdirs; do
10425 if test "X$x" = "X$dir"; then
10426 haveit=yes
10427 break
10428 fi
10429 done
10430 if test -z "$haveit"; then
10431 rpathdirs="$rpathdirs $dir"
10432 fi
10433 haveit=
10434 for x in $ltrpathdirs; do
10435 if test "X$x" = "X$dir"; then
10436 haveit=yes
10437 break
10438 fi
10439 done
10440 if test -z "$haveit"; then
10441 ltrpathdirs="$ltrpathdirs $dir"
10442 fi
10443 fi
10444 ;;
10445 -l*)
10446 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10447 ;;
10448 *.la)
10449 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10450 ;;
10451 *)
10452 LIBIPT="${LIBIPT}${LIBIPT:+ }$dep"
10453 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$dep"
10454 ;;
10455 esac
10456 done
10457 fi
10458 else
10459 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
10460 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l$name"
10461 fi
10462 fi
10463 fi
10464 done
10465 done
10466 if test "X$rpathdirs" != "X"; then
10467 if test -n "$hardcode_libdir_separator"; then
10468 alldirs=
10469 for found_dir in $rpathdirs; do
10470 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10471 done
10472 acl_save_libdir="$libdir"
10473 libdir="$alldirs"
10474 eval flag=\"$hardcode_libdir_flag_spec\"
10475 libdir="$acl_save_libdir"
10476 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
10477 else
10478 for found_dir in $rpathdirs; do
10479 acl_save_libdir="$libdir"
10480 libdir="$found_dir"
10481 eval flag=\"$hardcode_libdir_flag_spec\"
10482 libdir="$acl_save_libdir"
10483 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
10484 done
10485 fi
10486 fi
10487 if test "X$ltrpathdirs" != "X"; then
10488 for found_dir in $ltrpathdirs; do
10489 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-R$found_dir"
10490 done
10491 fi
10492
10493
10494 ac_save_CPPFLAGS="$CPPFLAGS"
10495
10496 for element in $INCIPT; do
10497 haveit=
10498 for x in $CPPFLAGS; do
10499
10500 acl_save_prefix="$prefix"
10501 prefix="$acl_final_prefix"
10502 acl_save_exec_prefix="$exec_prefix"
10503 exec_prefix="$acl_final_exec_prefix"
10504 eval x=\"$x\"
10505 exec_prefix="$acl_save_exec_prefix"
10506 prefix="$acl_save_prefix"
10507
10508 if test "X$x" = "X$element"; then
10509 haveit=yes
10510 break
10511 fi
10512 done
10513 if test -z "$haveit"; then
10514 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10515 fi
10516 done
10517
10518
10519 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libipt" >&5
10520$as_echo_n "checking for libipt... " >&6; }
10521if test "${ac_cv_libipt+set}" = set; then :
10522 $as_echo_n "(cached) " >&6
10523else
10524
10525 ac_save_LIBS="$LIBS"
10526 LIBS="$LIBS $LIBIPT"
10527 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10528/* end confdefs.h. */
10529#include "intel-pt.h"
10530int
10531main ()
10532{
10533pt_insn_alloc_decoder (0);
10534 ;
10535 return 0;
10536}
10537_ACEOF
10538if ac_fn_c_try_link "$LINENO"; then :
10539 ac_cv_libipt=yes
10540else
10541 ac_cv_libipt=no
10542fi
10543rm -f core conftest.err conftest.$ac_objext \
10544 conftest$ac_exeext conftest.$ac_ext
10545 LIBS="$ac_save_LIBS"
10546
10547fi
10548{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libipt" >&5
10549$as_echo "$ac_cv_libipt" >&6; }
10550 if test "$ac_cv_libipt" = yes; then
10551 HAVE_LIBIPT=yes
10552
10553$as_echo "#define HAVE_LIBIPT 1" >>confdefs.h
10554
10555 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libipt" >&5
10556$as_echo_n "checking how to link with libipt... " >&6; }
10557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBIPT" >&5
10558$as_echo "$LIBIPT" >&6; }
10559 else
10560 HAVE_LIBIPT=no
10561 CPPFLAGS="$ac_save_CPPFLAGS"
10562 LIBIPT=
10563 LTLIBIPT=
10564 fi
10565
10566
10567
10568
10569
10570
10571 if test "$HAVE_LIBIPT" != yes; then
10572 if test "$with_intel_pt" = yes; then
10573 as_fn_error "libipt is missing or unusable" "$LINENO" 5
10574 else
10575 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5
10576$as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be unavailable." >&2;}
10577 fi
10578 fi
10579fi
10580
81ecdfbb
RW
10581# ------------------------- #
10582# Checks for header files. #
10583# ------------------------- #
c890192f 10584
81ecdfbb
RW
10585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
10586$as_echo_n "checking for ANSI C header files... " >&6; }
10587if test "${ac_cv_header_stdc+set}" = set; then :
10588 $as_echo_n "(cached) " >&6
bec39cab 10589else
81ecdfbb 10590 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10591/* end confdefs.h. */
81ecdfbb
RW
10592#include <stdlib.h>
10593#include <stdarg.h>
10594#include <string.h>
10595#include <float.h>
10596
a9322a30
TT
10597int
10598main ()
10599{
a9322a30
TT
10600
10601 ;
10602 return 0;
10603}
bec39cab 10604_ACEOF
81ecdfbb
RW
10605if ac_fn_c_try_compile "$LINENO"; then :
10606 ac_cv_header_stdc=yes
bec39cab 10607else
81ecdfbb 10608 ac_cv_header_stdc=no
a9322a30 10609fi
81ecdfbb 10610rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 10611
81ecdfbb
RW
10612if test $ac_cv_header_stdc = yes; then
10613 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10614 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10615/* end confdefs.h. */
10616#include <string.h>
bec39cab 10617
81ecdfbb
RW
10618_ACEOF
10619if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10620 $EGREP "memchr" >/dev/null 2>&1; then :
bec39cab 10621
bec39cab 10622else
81ecdfbb
RW
10623 ac_cv_header_stdc=no
10624fi
10625rm -f conftest*
10626
10627fi
10628
10629if test $ac_cv_header_stdc = yes; then
10630 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10631 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10632/* end confdefs.h. */
10633#include <stdlib.h>
10634
bec39cab 10635_ACEOF
81ecdfbb
RW
10636if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10637 $EGREP "free" >/dev/null 2>&1; then :
06825bd1 10638
81ecdfbb
RW
10639else
10640 ac_cv_header_stdc=no
10641fi
10642rm -f conftest*
bec39cab 10643
bec39cab 10644fi
81ecdfbb
RW
10645
10646if test $ac_cv_header_stdc = yes; then
10647 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10648 if test "$cross_compiling" = yes; then :
10649 :
bec39cab 10650else
81ecdfbb 10651 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10652/* end confdefs.h. */
81ecdfbb
RW
10653#include <ctype.h>
10654#include <stdlib.h>
10655#if ((' ' & 0x0FF) == 0x020)
10656# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10657# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10658#else
10659# define ISLOWER(c) \
10660 (('a' <= (c) && (c) <= 'i') \
10661 || ('j' <= (c) && (c) <= 'r') \
10662 || ('s' <= (c) && (c) <= 'z'))
10663# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10664#endif
10665
10666#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
a9322a30
TT
10667int
10668main ()
10669{
81ecdfbb
RW
10670 int i;
10671 for (i = 0; i < 256; i++)
10672 if (XOR (islower (i), ISLOWER (i))
10673 || toupper (i) != TOUPPER (i))
10674 return 2;
a9322a30
TT
10675 return 0;
10676}
bec39cab 10677_ACEOF
81ecdfbb
RW
10678if ac_fn_c_try_run "$LINENO"; then :
10679
bec39cab 10680else
81ecdfbb
RW
10681 ac_cv_header_stdc=no
10682fi
10683rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10684 conftest.$ac_objext conftest.beam conftest.$ac_ext
10685fi
bec39cab 10686
bec39cab 10687fi
a9322a30 10688fi
81ecdfbb
RW
10689{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
10690$as_echo "$ac_cv_header_stdc" >&6; }
10691if test $ac_cv_header_stdc = yes; then
bec39cab 10692
81ecdfbb 10693$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5ee754fc 10694
81ecdfbb 10695fi
bec39cab 10696
81ecdfbb 10697# elf_hp.h is for HP/UX 64-bit shared library support.
9467110b 10698for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
161d1bec 10699 thread_db.h \
0080a2f6 10700 sys/fault.h \
81ecdfbb
RW
10701 sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
10702 sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
10703 sys/reg.h sys/debugreg.h sys/select.h sys/syscall.h \
9467110b 10704 termios.h termio.h \
3447c057 10705 sgtty.h elf_hp.h \
9467110b 10706 dlfcn.h
81ecdfbb
RW
10707do :
10708 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10709ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
10710eval as_val=\$$as_ac_Header
10711 if test "x$as_val" = x""yes; then :
bec39cab 10712 cat >>confdefs.h <<_ACEOF
81ecdfbb 10713#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 10714_ACEOF
c906108c 10715
bec39cab 10716fi
81ecdfbb
RW
10717
10718done
10719
81ecdfbb
RW
10720for ac_header in sys/proc.h
10721do :
10722 ac_fn_c_check_header_compile "$LINENO" "sys/proc.h" "ac_cv_header_sys_proc_h" "#if HAVE_SYS_PARAM_H
10723# include <sys/param.h>
10724#endif
c906108c 10725
81ecdfbb
RW
10726"
10727if test "x$ac_cv_header_sys_proc_h" = x""yes; then :
bec39cab 10728 cat >>confdefs.h <<_ACEOF
81ecdfbb 10729#define HAVE_SYS_PROC_H 1
bec39cab 10730_ACEOF
5ee754fc 10731
bec39cab 10732fi
81ecdfbb
RW
10733
10734done
10735
10736for ac_header in sys/user.h
10737do :
10738 ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
10739# include <sys/param.h>
a9322a30
TT
10740#endif
10741
81ecdfbb
RW
10742"
10743if test "x$ac_cv_header_sys_user_h" = x""yes; then :
10744 cat >>confdefs.h <<_ACEOF
10745#define HAVE_SYS_USER_H 1
bec39cab 10746_ACEOF
bec39cab 10747
a9322a30 10748fi
bec39cab 10749
81ecdfbb 10750done
5ee754fc 10751
5ee754fc 10752
81ecdfbb
RW
10753# On Solaris 2.[789], we need to define _MSE_INT_H to avoid a clash
10754# between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
10755# think that we don't have <curses.h> if we're using GCC.
10756case $host_os in
10757 solaris2.[789])
10758 if test "$GCC" = yes; then
10759
10760$as_echo "#define _MSE_INT_H 1" >>confdefs.h
10761
10762 fi ;;
10763esac
10764for ac_header in curses.h cursesX.h ncurses.h ncurses/ncurses.h ncurses/term.h
10765do :
10766 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10767ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
10768eval as_val=\$$as_ac_Header
10769 if test "x$as_val" = x""yes; then :
bec39cab 10770 cat >>confdefs.h <<_ACEOF
81ecdfbb 10771#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 10772_ACEOF
5ee754fc
MK
10773
10774fi
10775
81ecdfbb 10776done
bec39cab 10777
81ecdfbb
RW
10778for ac_header in term.h
10779do :
10780 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
10781# include <curses.h>
10782#endif
bec39cab 10783
81ecdfbb
RW
10784"
10785if test "x$ac_cv_header_term_h" = x""yes; then :
10786 cat >>confdefs.h <<_ACEOF
10787#define HAVE_TERM_H 1
a8111142 10788_ACEOF
a8111142 10789
a8111142 10790fi
a8111142 10791
81ecdfbb 10792done
a8111142
TT
10793
10794
81ecdfbb
RW
10795# ------------------------- #
10796# Checks for declarations. #
10797# ------------------------- #
a9322a30 10798
07697489
PA
10799
10800 # Check for presence and size of long long.
10801 ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
10802if test "x$ac_cv_type_long_long" = x""yes; then :
10803
10804cat >>confdefs.h <<_ACEOF
10805#define HAVE_LONG_LONG 1
10806_ACEOF
10807
10808# The cast to long int works around a bug in the HP C Compiler
10809# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10810# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10811# This bug is HP SR number 8606223364.
10812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
10813$as_echo_n "checking size of long long... " >&6; }
10814if test "${ac_cv_sizeof_long_long+set}" = set; then :
10815 $as_echo_n "(cached) " >&6
10816else
10817 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
10818
10819else
10820 if test "$ac_cv_type_long_long" = yes; then
10821 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10822$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10823{ as_fn_set_status 77
10824as_fn_error "cannot compute sizeof (long long)
10825See \`config.log' for more details." "$LINENO" 5; }; }
10826 else
10827 ac_cv_sizeof_long_long=0
10828 fi
10829fi
10830
10831fi
10832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
10833$as_echo "$ac_cv_sizeof_long_long" >&6; }
10834
10835
10836
10837cat >>confdefs.h <<_ACEOF
10838#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
10839_ACEOF
10840
10841
10842fi
10843
10844
10845 ac_fn_c_check_decl "$LINENO" "basename(char *)" "ac_cv_have_decl_basename_char_p_" "$ac_includes_default"
10846if test "x$ac_cv_have_decl_basename_char_p_" = x""yes; then :
10847 ac_have_decl=1
10848else
10849 ac_have_decl=0
10850fi
10851
10852cat >>confdefs.h <<_ACEOF
10853#define HAVE_DECL_BASENAME $ac_have_decl
10854_ACEOF
10855ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default"
10856if test "x$ac_cv_have_decl_ffs" = x""yes; then :
10857 ac_have_decl=1
10858else
10859 ac_have_decl=0
10860fi
10861
10862cat >>confdefs.h <<_ACEOF
10863#define HAVE_DECL_FFS $ac_have_decl
10864_ACEOF
10865ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default"
10866if test "x$ac_cv_have_decl_asprintf" = x""yes; then :
10867 ac_have_decl=1
10868else
10869 ac_have_decl=0
10870fi
10871
10872cat >>confdefs.h <<_ACEOF
10873#define HAVE_DECL_ASPRINTF $ac_have_decl
10874_ACEOF
10875ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
10876if test "x$ac_cv_have_decl_vasprintf" = x""yes; then :
10877 ac_have_decl=1
10878else
10879 ac_have_decl=0
10880fi
10881
10882cat >>confdefs.h <<_ACEOF
10883#define HAVE_DECL_VASPRINTF $ac_have_decl
10884_ACEOF
10885ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
10886if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
10887 ac_have_decl=1
10888else
10889 ac_have_decl=0
10890fi
10891
10892cat >>confdefs.h <<_ACEOF
10893#define HAVE_DECL_SNPRINTF $ac_have_decl
10894_ACEOF
10895ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
10896if test "x$ac_cv_have_decl_vsnprintf" = x""yes; then :
10897 ac_have_decl=1
10898else
10899 ac_have_decl=0
10900fi
10901
10902cat >>confdefs.h <<_ACEOF
10903#define HAVE_DECL_VSNPRINTF $ac_have_decl
10904_ACEOF
10905
10906 ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default"
10907if test "x$ac_cv_have_decl_strtol" = x""yes; then :
10908 ac_have_decl=1
10909else
10910 ac_have_decl=0
10911fi
10912
10913cat >>confdefs.h <<_ACEOF
10914#define HAVE_DECL_STRTOL $ac_have_decl
10915_ACEOF
10916ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default"
10917if test "x$ac_cv_have_decl_strtoul" = x""yes; then :
10918 ac_have_decl=1
10919else
10920 ac_have_decl=0
10921fi
10922
10923cat >>confdefs.h <<_ACEOF
10924#define HAVE_DECL_STRTOUL $ac_have_decl
10925_ACEOF
10926ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
10927if test "x$ac_cv_have_decl_strtoll" = x""yes; then :
10928 ac_have_decl=1
10929else
10930 ac_have_decl=0
10931fi
10932
10933cat >>confdefs.h <<_ACEOF
10934#define HAVE_DECL_STRTOLL $ac_have_decl
10935_ACEOF
10936ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
10937if test "x$ac_cv_have_decl_strtoull" = x""yes; then :
10938 ac_have_decl=1
10939else
10940 ac_have_decl=0
10941fi
10942
10943cat >>confdefs.h <<_ACEOF
10944#define HAVE_DECL_STRTOULL $ac_have_decl
10945_ACEOF
10946
10947 ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default"
10948if test "x$ac_cv_have_decl_strverscmp" = x""yes; then :
10949 ac_have_decl=1
10950else
10951 ac_have_decl=0
10952fi
10953
10954cat >>confdefs.h <<_ACEOF
10955#define HAVE_DECL_STRVERSCMP $ac_have_decl
10956_ACEOF
10957
10958
10959
81ecdfbb
RW
10960ac_fn_c_check_decl "$LINENO" "free" "ac_cv_have_decl_free" "$ac_includes_default"
10961if test "x$ac_cv_have_decl_free" = x""yes; then :
10962 ac_have_decl=1
bec39cab 10963else
81ecdfbb
RW
10964 ac_have_decl=0
10965fi
10966
10967cat >>confdefs.h <<_ACEOF
10968#define HAVE_DECL_FREE $ac_have_decl
bec39cab 10969_ACEOF
81ecdfbb
RW
10970ac_fn_c_check_decl "$LINENO" "malloc" "ac_cv_have_decl_malloc" "$ac_includes_default"
10971if test "x$ac_cv_have_decl_malloc" = x""yes; then :
10972 ac_have_decl=1
10973else
10974 ac_have_decl=0
10975fi
10976
10977cat >>confdefs.h <<_ACEOF
10978#define HAVE_DECL_MALLOC $ac_have_decl
bec39cab 10979_ACEOF
81ecdfbb
RW
10980ac_fn_c_check_decl "$LINENO" "realloc" "ac_cv_have_decl_realloc" "$ac_includes_default"
10981if test "x$ac_cv_have_decl_realloc" = x""yes; then :
10982 ac_have_decl=1
bec39cab 10983else
81ecdfbb
RW
10984 ac_have_decl=0
10985fi
bec39cab 10986
81ecdfbb
RW
10987cat >>confdefs.h <<_ACEOF
10988#define HAVE_DECL_REALLOC $ac_have_decl
bec39cab 10989_ACEOF
81ecdfbb
RW
10990ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
10991if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
10992 ac_have_decl=1
10993else
10994 ac_have_decl=0
5ee754fc 10995fi
81ecdfbb
RW
10996
10997cat >>confdefs.h <<_ACEOF
10998#define HAVE_DECL_SNPRINTF $ac_have_decl
a9322a30 10999_ACEOF
5ee754fc 11000
5ee754fc 11001
81ecdfbb
RW
11002 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
11003$as_echo_n "checking for LC_MESSAGES... " >&6; }
11004if test "${am_cv_val_LC_MESSAGES+set}" = set; then :
11005 $as_echo_n "(cached) " >&6
bec39cab 11006else
81ecdfbb 11007 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11008/* end confdefs.h. */
81ecdfbb 11009#include <locale.h>
a9322a30
TT
11010int
11011main ()
11012{
81ecdfbb 11013return LC_MESSAGES
a9322a30
TT
11014 ;
11015 return 0;
11016}
bec39cab 11017_ACEOF
81ecdfbb
RW
11018if ac_fn_c_try_link "$LINENO"; then :
11019 am_cv_val_LC_MESSAGES=yes
bec39cab 11020else
81ecdfbb
RW
11021 am_cv_val_LC_MESSAGES=no
11022fi
11023rm -f core conftest.err conftest.$ac_objext \
11024 conftest$ac_exeext conftest.$ac_ext
11025fi
11026{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
11027$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
11028 if test $am_cv_val_LC_MESSAGES = yes; then
bec39cab 11029
81ecdfbb
RW
11030$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
11031
11032 fi
11033
11034
11035# ----------------------- #
11036# Checks for structures. #
11037# ----------------------- #
11038
11039ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
11040if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
11041
11042cat >>confdefs.h <<_ACEOF
11043#define HAVE_STRUCT_STAT_ST_BLOCKS 1
7eb368b3 11044_ACEOF
7eb368b3 11045
81ecdfbb 11046
7eb368b3 11047fi
81ecdfbb
RW
11048ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
11049if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
7eb368b3 11050
a9322a30
TT
11051cat >>confdefs.h <<_ACEOF
11052#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
7eb368b3
NR
11053_ACEOF
11054
a9322a30 11055
7eb368b3
NR
11056fi
11057
7eb368b3 11058
a9322a30
TT
11059# ------------------ #
11060# Checks for types. #
11061# ------------------ #
7eb368b3 11062
81ecdfbb 11063ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
a9322a30
TT
11064#include <sys/socket.h>
11065
81ecdfbb
RW
11066"
11067if test "x$ac_cv_type_socklen_t" = x""yes; then :
bec39cab 11068
a9322a30
TT
11069cat >>confdefs.h <<_ACEOF
11070#define HAVE_SOCKLEN_T 1
11071_ACEOF
11072
11073
11074fi
11075
11076
11077# ------------------------------------- #
11078# Checks for compiler characteristics. #
11079# ------------------------------------- #
11080
81ecdfbb
RW
11081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11082$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
11083if test "${ac_cv_c_const+set}" = set; then :
11084 $as_echo_n "(cached) " >&6
a9322a30 11085else
81ecdfbb 11086 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11087/* end confdefs.h. */
a9322a30
TT
11088
11089int
11090main ()
11091{
11092/* FIXME: Include the comments suggested by Paul. */
11093#ifndef __cplusplus
11094 /* Ultrix mips cc rejects this. */
11095 typedef int charset[2];
81ecdfbb 11096 const charset cs;
a9322a30 11097 /* SunOS 4.1.1 cc rejects this. */
81ecdfbb
RW
11098 char const *const *pcpcc;
11099 char **ppc;
a9322a30
TT
11100 /* NEC SVR4.0.2 mips cc rejects this. */
11101 struct point {int x, y;};
11102 static struct point const zero = {0,0};
11103 /* AIX XL C 1.02.0.0 rejects this.
11104 It does not let you subtract one const X* pointer from another in
11105 an arm of an if-expression whose if-part is not a constant
11106 expression */
11107 const char *g = "string";
81ecdfbb 11108 pcpcc = &g + (g ? g-g : 0);
a9322a30 11109 /* HPUX 7.0 cc rejects these. */
81ecdfbb
RW
11110 ++pcpcc;
11111 ppc = (char**) pcpcc;
11112 pcpcc = (char const *const *) ppc;
a9322a30
TT
11113 { /* SCO 3.2v4 cc rejects this. */
11114 char *t;
11115 char const *s = 0 ? (char *) 0 : (char const *) 0;
11116
11117 *t++ = 0;
81ecdfbb 11118 if (s) return 0;
a9322a30
TT
11119 }
11120 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11121 int x[] = {25, 17};
11122 const int *foo = &x[0];
11123 ++foo;
11124 }
11125 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11126 typedef const int *iptr;
11127 iptr p = 0;
11128 ++p;
11129 }
11130 { /* AIX XL C 1.02.0.0 rejects this saying
11131 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11132 struct s { int j; const int *ap[3]; };
11133 struct s *b; b->j = 5;
11134 }
11135 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11136 const int foo = 10;
81ecdfbb 11137 if (!foo) return 0;
a9322a30 11138 }
81ecdfbb 11139 return !cs[0] && !zero.x;
a9322a30
TT
11140#endif
11141
11142 ;
11143 return 0;
11144}
bec39cab 11145_ACEOF
81ecdfbb 11146if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 11147 ac_cv_c_const=yes
5ee754fc 11148else
81ecdfbb 11149 ac_cv_c_const=no
5ee754fc 11150fi
81ecdfbb 11151rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 11152fi
81ecdfbb
RW
11153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11154$as_echo "$ac_cv_c_const" >&6; }
a9322a30 11155if test $ac_cv_c_const = no; then
bec39cab 11156
81ecdfbb 11157$as_echo "#define const /**/" >>confdefs.h
bec39cab 11158
5ee754fc 11159fi
bec39cab 11160
81ecdfbb
RW
11161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
11162$as_echo_n "checking for inline... " >&6; }
11163if test "${ac_cv_c_inline+set}" = set; then :
11164 $as_echo_n "(cached) " >&6
bec39cab 11165else
a9322a30
TT
11166 ac_cv_c_inline=no
11167for ac_kw in inline __inline__ __inline; do
81ecdfbb 11168 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11169/* end confdefs.h. */
a9322a30
TT
11170#ifndef __cplusplus
11171typedef int foo_t;
11172static $ac_kw foo_t static_foo () {return 0; }
11173$ac_kw foo_t foo () {return 0; }
11174#endif
11175
bec39cab 11176_ACEOF
81ecdfbb
RW
11177if ac_fn_c_try_compile "$LINENO"; then :
11178 ac_cv_c_inline=$ac_kw
bec39cab 11179fi
81ecdfbb
RW
11180rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11181 test "$ac_cv_c_inline" != no && break
a9322a30 11182done
bec39cab 11183
5ee754fc 11184fi
81ecdfbb
RW
11185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
11186$as_echo "$ac_cv_c_inline" >&6; }
5ee754fc 11187
a9322a30
TT
11188case $ac_cv_c_inline in
11189 inline | yes) ;;
11190 *)
11191 case $ac_cv_c_inline in
11192 no) ac_val=;;
11193 *) ac_val=$ac_cv_c_inline;;
11194 esac
11195 cat >>confdefs.h <<_ACEOF
11196#ifndef __cplusplus
11197#define inline $ac_val
11198#endif
11199_ACEOF
bec39cab
AC
11200 ;;
11201esac
bec39cab 11202
81ecdfbb
RW
11203 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
11204$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
11205if test "${ac_cv_c_bigendian+set}" = set; then :
11206 $as_echo_n "(cached) " >&6
bec39cab 11207else
81ecdfbb
RW
11208 ac_cv_c_bigendian=unknown
11209 # See if we're dealing with a universal compiler.
11210 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11211/* end confdefs.h. */
11212#ifndef __APPLE_CC__
11213 not a universal capable compiler
11214 #endif
11215 typedef int dummy;
11216
11217_ACEOF
11218if ac_fn_c_try_compile "$LINENO"; then :
11219
11220 # Check for potential -arch flags. It is not universal unless
11221 # there are at least two -arch flags with different values.
11222 ac_arch=
11223 ac_prev=
11224 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
11225 if test -n "$ac_prev"; then
11226 case $ac_word in
11227 i?86 | x86_64 | ppc | ppc64)
11228 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
11229 ac_arch=$ac_word
11230 else
11231 ac_cv_c_bigendian=universal
11232 break
11233 fi
11234 ;;
11235 esac
11236 ac_prev=
11237 elif test "x$ac_word" = "x-arch"; then
11238 ac_prev=arch
11239 fi
11240 done
11241fi
11242rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11243 if test $ac_cv_c_bigendian = unknown; then
11244 # See if sys/param.h defines the BYTE_ORDER macro.
11245 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11246/* end confdefs.h. */
a9322a30 11247#include <sys/types.h>
81ecdfbb 11248 #include <sys/param.h>
a9322a30
TT
11249
11250int
11251main ()
11252{
81ecdfbb
RW
11253#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
11254 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
11255 && LITTLE_ENDIAN)
11256 bogus endian macros
11257 #endif
a9322a30
TT
11258
11259 ;
11260 return 0;
11261}
bec39cab 11262_ACEOF
81ecdfbb 11263if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 11264 # It does; now see whether it defined to BIG_ENDIAN or not.
81ecdfbb 11265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11266/* end confdefs.h. */
a9322a30 11267#include <sys/types.h>
81ecdfbb 11268 #include <sys/param.h>
a9322a30
TT
11269
11270int
11271main ()
11272{
11273#if BYTE_ORDER != BIG_ENDIAN
81ecdfbb
RW
11274 not big endian
11275 #endif
a9322a30
TT
11276
11277 ;
11278 return 0;
11279}
bec39cab 11280_ACEOF
81ecdfbb 11281if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 11282 ac_cv_c_bigendian=yes
5ee754fc 11283else
81ecdfbb 11284 ac_cv_c_bigendian=no
5ee754fc 11285fi
81ecdfbb
RW
11286rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11287fi
11288rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11289 fi
11290 if test $ac_cv_c_bigendian = unknown; then
11291 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
11292 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11293/* end confdefs.h. */
11294#include <limits.h>
bec39cab 11295
81ecdfbb
RW
11296int
11297main ()
11298{
11299#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
11300 bogus endian macros
11301 #endif
11302
11303 ;
11304 return 0;
11305}
7eb368b3 11306_ACEOF
81ecdfbb
RW
11307if ac_fn_c_try_compile "$LINENO"; then :
11308 # It does; now see whether it defined to _BIG_ENDIAN or not.
11309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7eb368b3 11310/* end confdefs.h. */
81ecdfbb
RW
11311#include <limits.h>
11312
7eb368b3
NR
11313int
11314main ()
11315{
81ecdfbb
RW
11316#ifndef _BIG_ENDIAN
11317 not big endian
11318 #endif
11319
7eb368b3
NR
11320 ;
11321 return 0;
11322}
11323_ACEOF
81ecdfbb 11324if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 11325 ac_cv_c_bigendian=yes
81ecdfbb
RW
11326else
11327 ac_cv_c_bigendian=no
a9322a30 11328fi
81ecdfbb 11329rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30 11330fi
81ecdfbb
RW
11331rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11332 fi
11333 if test $ac_cv_c_bigendian = unknown; then
11334 # Compile a test program.
11335 if test "$cross_compiling" = yes; then :
11336 # Try to guess by grepping values from an object file.
11337 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11338/* end confdefs.h. */
11339short int ascii_mm[] =
11340 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
11341 short int ascii_ii[] =
11342 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
11343 int use_ascii (int i) {
11344 return ascii_mm[i] + ascii_ii[i];
11345 }
11346 short int ebcdic_ii[] =
11347 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
11348 short int ebcdic_mm[] =
11349 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
11350 int use_ebcdic (int i) {
11351 return ebcdic_mm[i] + ebcdic_ii[i];
11352 }
11353 extern int foo;
7eb368b3 11354
81ecdfbb
RW
11355int
11356main ()
11357{
11358return use_ascii (foo) == use_ebcdic (foo);
11359 ;
11360 return 0;
11361}
11362_ACEOF
11363if ac_fn_c_try_compile "$LINENO"; then :
11364 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
11365 ac_cv_c_bigendian=yes
11366 fi
11367 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
11368 if test "$ac_cv_c_bigendian" = unknown; then
11369 ac_cv_c_bigendian=no
11370 else
11371 # finding both strings is unlikely to happen, but who knows?
11372 ac_cv_c_bigendian=unknown
11373 fi
11374 fi
7eb368b3 11375fi
81ecdfbb 11376rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 11377else
81ecdfbb 11378 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11379/* end confdefs.h. */
81ecdfbb 11380$ac_includes_default
d3ea6809
MM
11381int
11382main ()
11383{
81ecdfbb
RW
11384
11385 /* Are we little or big endian? From Harbison&Steele. */
11386 union
11387 {
11388 long int l;
11389 char c[sizeof (long int)];
11390 } u;
11391 u.l = 1;
11392 return u.c[sizeof (long int) - 1] == 1;
11393
11394 ;
11395 return 0;
d3ea6809
MM
11396}
11397_ACEOF
81ecdfbb 11398if ac_fn_c_try_run "$LINENO"; then :
a9322a30 11399 ac_cv_c_bigendian=no
d3ea6809 11400else
81ecdfbb 11401 ac_cv_c_bigendian=yes
d3ea6809 11402fi
81ecdfbb
RW
11403rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11404 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 11405fi
a9322a30 11406
81ecdfbb
RW
11407 fi
11408fi
11409{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
11410$as_echo "$ac_cv_c_bigendian" >&6; }
11411 case $ac_cv_c_bigendian in #(
11412 yes)
11413 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
11414;; #(
11415 no)
11416 ;; #(
11417 universal)
11418
11419$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
11420
11421 ;; #(
11422 *)
11423 as_fn_error "unknown endianness
11424 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
11425 esac
d3ea6809
MM
11426
11427
a9322a30
TT
11428# ------------------------------ #
11429# Checks for library functions. #
11430# ------------------------------ #
d3ea6809 11431
a9322a30 11432for ac_header in stdlib.h unistd.h
81ecdfbb
RW
11433do :
11434 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11435ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
11436eval as_val=\$$as_ac_Header
11437 if test "x$as_val" = x""yes; then :
bec39cab 11438 cat >>confdefs.h <<_ACEOF
81ecdfbb 11439#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 11440_ACEOF
b757528f 11441
b757528f 11442fi
bec39cab 11443
a9322a30 11444done
a3828db0 11445
a9322a30 11446for ac_func in getpagesize
81ecdfbb
RW
11447do :
11448 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
11449if test "x$ac_cv_func_getpagesize" = x""yes; then :
bec39cab 11450 cat >>confdefs.h <<_ACEOF
81ecdfbb 11451#define HAVE_GETPAGESIZE 1
bec39cab 11452_ACEOF
bcb3dc3d 11453
bcb3dc3d
MK
11454fi
11455done
11456
81ecdfbb
RW
11457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
11458$as_echo_n "checking for working mmap... " >&6; }
11459if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then :
11460 $as_echo_n "(cached) " >&6
a9322a30 11461else
81ecdfbb 11462 if test "$cross_compiling" = yes; then :
a9322a30 11463 ac_cv_func_mmap_fixed_mapped=no
bec39cab 11464else
81ecdfbb 11465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11466/* end confdefs.h. */
a9322a30
TT
11467$ac_includes_default
11468/* malloc might have been renamed as rpl_malloc. */
11469#undef malloc
bec39cab 11470
a9322a30
TT
11471/* Thanks to Mike Haertel and Jim Avera for this test.
11472 Here is a matrix of mmap possibilities:
11473 mmap private not fixed
11474 mmap private fixed at somewhere currently unmapped
11475 mmap private fixed at somewhere already mapped
11476 mmap shared not fixed
11477 mmap shared fixed at somewhere currently unmapped
11478 mmap shared fixed at somewhere already mapped
11479 For private mappings, we should verify that changes cannot be read()
11480 back from the file, nor mmap's back from the file at a different
11481 address. (There have been systems where private was not correctly
11482 implemented like the infamous i386 svr4.0, and systems where the
11483 VM page cache was not coherent with the file system buffer cache
11484 like early versions of FreeBSD and possibly contemporary NetBSD.)
11485 For shared mappings, we should conversely verify that changes get
11486 propagated back to all the places they're supposed to be.
bec39cab 11487
a9322a30
TT
11488 Grep wants private fixed already mapped.
11489 The main things grep needs to know about mmap are:
11490 * does it exist and is it safe to write into the mmap'd area
11491 * how to use it (BSD variants) */
8b9cf735 11492
a9322a30
TT
11493#include <fcntl.h>
11494#include <sys/mman.h>
8b9cf735 11495
81ecdfbb 11496#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
a9322a30 11497char *malloc ();
a3828db0
MK
11498#endif
11499
a9322a30 11500/* This mess was copied from the GNU getpagesize.h. */
81ecdfbb 11501#ifndef HAVE_GETPAGESIZE
a9322a30 11502/* Assume that all systems that can run configure have sys/param.h. */
81ecdfbb 11503# ifndef HAVE_SYS_PARAM_H
a9322a30
TT
11504# define HAVE_SYS_PARAM_H 1
11505# endif
11506
11507# ifdef _SC_PAGESIZE
11508# define getpagesize() sysconf(_SC_PAGESIZE)
11509# else /* no _SC_PAGESIZE */
81ecdfbb 11510# ifdef HAVE_SYS_PARAM_H
a9322a30
TT
11511# include <sys/param.h>
11512# ifdef EXEC_PAGESIZE
11513# define getpagesize() EXEC_PAGESIZE
11514# else /* no EXEC_PAGESIZE */
11515# ifdef NBPG
11516# define getpagesize() NBPG * CLSIZE
11517# ifndef CLSIZE
11518# define CLSIZE 1
11519# endif /* no CLSIZE */
11520# else /* no NBPG */
11521# ifdef NBPC
11522# define getpagesize() NBPC
11523# else /* no NBPC */
11524# ifdef PAGESIZE
11525# define getpagesize() PAGESIZE
11526# endif /* PAGESIZE */
11527# endif /* no NBPC */
11528# endif /* no NBPG */
11529# endif /* no EXEC_PAGESIZE */
11530# else /* no HAVE_SYS_PARAM_H */
11531# define getpagesize() 8192 /* punt totally */
11532# endif /* no HAVE_SYS_PARAM_H */
11533# endif /* no _SC_PAGESIZE */
11534
11535#endif /* no HAVE_GETPAGESIZE */
11536
bec39cab
AC
11537int
11538main ()
11539{
a9322a30
TT
11540 char *data, *data2, *data3;
11541 int i, pagesize;
11542 int fd;
11543
11544 pagesize = getpagesize ();
11545
11546 /* First, make a file with some known garbage in it. */
11547 data = (char *) malloc (pagesize);
11548 if (!data)
81ecdfbb 11549 return 1;
a9322a30
TT
11550 for (i = 0; i < pagesize; ++i)
11551 *(data + i) = rand ();
11552 umask (0);
11553 fd = creat ("conftest.mmap", 0600);
11554 if (fd < 0)
81ecdfbb 11555 return 1;
a9322a30 11556 if (write (fd, data, pagesize) != pagesize)
81ecdfbb 11557 return 1;
a9322a30
TT
11558 close (fd);
11559
11560 /* Next, try to mmap the file at a fixed address which already has
11561 something else allocated at it. If we can, also make sure that
11562 we see the same garbage. */
11563 fd = open ("conftest.mmap", O_RDWR);
11564 if (fd < 0)
81ecdfbb 11565 return 1;
a9322a30
TT
11566 data2 = (char *) malloc (2 * pagesize);
11567 if (!data2)
81ecdfbb
RW
11568 return 1;
11569 data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
a9322a30
TT
11570 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
11571 MAP_PRIVATE | MAP_FIXED, fd, 0L))
81ecdfbb 11572 return 1;
a9322a30
TT
11573 for (i = 0; i < pagesize; ++i)
11574 if (*(data + i) != *(data2 + i))
81ecdfbb 11575 return 1;
a9322a30
TT
11576
11577 /* Finally, make sure that changes to the mapped area do not
11578 percolate back to the file as seen by read(). (This is a bug on
11579 some variants of i386 svr4.0.) */
11580 for (i = 0; i < pagesize; ++i)
11581 *(data2 + i) = *(data2 + i) + 1;
11582 data3 = (char *) malloc (pagesize);
11583 if (!data3)
81ecdfbb 11584 return 1;
a9322a30 11585 if (read (fd, data3, pagesize) != pagesize)
81ecdfbb 11586 return 1;
a9322a30
TT
11587 for (i = 0; i < pagesize; ++i)
11588 if (*(data + i) != *(data3 + i))
81ecdfbb 11589 return 1;
a9322a30 11590 close (fd);
81ecdfbb 11591 return 0;
bec39cab
AC
11592}
11593_ACEOF
81ecdfbb 11594if ac_fn_c_try_run "$LINENO"; then :
a9322a30 11595 ac_cv_func_mmap_fixed_mapped=yes
086ec9eb 11596else
81ecdfbb 11597 ac_cv_func_mmap_fixed_mapped=no
a3828db0 11598fi
81ecdfbb
RW
11599rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11600 conftest.$ac_objext conftest.beam conftest.$ac_ext
a3828db0 11601fi
81ecdfbb 11602
a9322a30 11603fi
81ecdfbb
RW
11604{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
11605$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
a9322a30
TT
11606if test $ac_cv_func_mmap_fixed_mapped = yes; then
11607
81ecdfbb 11608$as_echo "#define HAVE_MMAP 1" >>confdefs.h
a3828db0 11609
086ec9eb 11610fi
a9322a30 11611rm -f conftest.mmap
a3828db0 11612
81ecdfbb
RW
11613ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
11614if test "x$ac_cv_type_pid_t" = x""yes; then :
bec39cab 11615
a9322a30
TT
11616else
11617
11618cat >>confdefs.h <<_ACEOF
11619#define pid_t int
bec39cab 11620_ACEOF
086ec9eb
MK
11621
11622fi
11623
81ecdfbb
RW
11624for ac_header in vfork.h
11625do :
11626 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
11627if test "x$ac_cv_header_vfork_h" = x""yes; then :
a3828db0 11628 cat >>confdefs.h <<_ACEOF
81ecdfbb 11629#define HAVE_VFORK_H 1
bec39cab 11630_ACEOF
c906108c
SS
11631
11632fi
a9322a30 11633
a3828db0 11634done
c906108c 11635
a9322a30 11636for ac_func in fork vfork
81ecdfbb
RW
11637do :
11638 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11639ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11640eval as_val=\$$as_ac_var
11641 if test "x$as_val" = x""yes; then :
a3828db0 11642 cat >>confdefs.h <<_ACEOF
81ecdfbb 11643#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 11644_ACEOF
b83266a0 11645
97bf5e38 11646fi
a3828db0 11647done
b83266a0 11648
a9322a30 11649if test "x$ac_cv_func_fork" = xyes; then
81ecdfbb
RW
11650 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
11651$as_echo_n "checking for working fork... " >&6; }
11652if test "${ac_cv_func_fork_works+set}" = set; then :
11653 $as_echo_n "(cached) " >&6
a9322a30 11654else
81ecdfbb 11655 if test "$cross_compiling" = yes; then :
a9322a30
TT
11656 ac_cv_func_fork_works=cross
11657else
81ecdfbb
RW
11658 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11659/* end confdefs.h. */
11660$ac_includes_default
11661int
11662main ()
11663{
11664
11665 /* By Ruediger Kuhlmann. */
11666 return fork () < 0;
11667
11668 ;
11669 return 0;
11670}
a9322a30 11671_ACEOF
81ecdfbb 11672if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
11673 ac_cv_func_fork_works=yes
11674else
81ecdfbb 11675 ac_cv_func_fork_works=no
a9322a30 11676fi
81ecdfbb
RW
11677rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11678 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 11679fi
81ecdfbb 11680
a9322a30 11681fi
81ecdfbb
RW
11682{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
11683$as_echo "$ac_cv_func_fork_works" >&6; }
a9322a30
TT
11684
11685else
11686 ac_cv_func_fork_works=$ac_cv_func_fork
11687fi
11688if test "x$ac_cv_func_fork_works" = xcross; then
11689 case $host in
11690 *-*-amigaos* | *-*-msdosdjgpp*)
11691 # Override, as these systems have only a dummy fork() stub
11692 ac_cv_func_fork_works=no
11693 ;;
11694 *)
11695 ac_cv_func_fork_works=yes
11696 ;;
11697 esac
81ecdfbb
RW
11698 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
11699$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
a9322a30
TT
11700fi
11701ac_cv_func_vfork_works=$ac_cv_func_vfork
11702if test "x$ac_cv_func_vfork" = xyes; then
81ecdfbb
RW
11703 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
11704$as_echo_n "checking for working vfork... " >&6; }
11705if test "${ac_cv_func_vfork_works+set}" = set; then :
11706 $as_echo_n "(cached) " >&6
a9322a30 11707else
81ecdfbb 11708 if test "$cross_compiling" = yes; then :
a9322a30
TT
11709 ac_cv_func_vfork_works=cross
11710else
81ecdfbb 11711 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30
TT
11712/* end confdefs.h. */
11713/* Thanks to Paul Eggert for this test. */
81ecdfbb 11714$ac_includes_default
a9322a30 11715#include <sys/wait.h>
81ecdfbb 11716#ifdef HAVE_VFORK_H
a9322a30
TT
11717# include <vfork.h>
11718#endif
11719/* On some sparc systems, changes by the child to local and incoming
11720 argument registers are propagated back to the parent. The compiler
11721 is told about this with #include <vfork.h>, but some compilers
11722 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
11723 static variable whose address is put into a register that is
11724 clobbered by the vfork. */
11725static void
11726#ifdef __cplusplus
11727sparc_address_test (int arg)
11728# else
11729sparc_address_test (arg) int arg;
11730#endif
11731{
11732 static pid_t child;
11733 if (!child) {
11734 child = vfork ();
11735 if (child < 0) {
11736 perror ("vfork");
11737 _exit(2);
11738 }
11739 if (!child) {
11740 arg = getpid();
11741 write(-1, "", 0);
11742 _exit (arg);
11743 }
11744 }
11745}
11746
11747int
11748main ()
11749{
11750 pid_t parent = getpid ();
11751 pid_t child;
11752
11753 sparc_address_test (0);
11754
11755 child = vfork ();
11756
11757 if (child == 0) {
11758 /* Here is another test for sparc vfork register problems. This
11759 test uses lots of local variables, at least as many local
11760 variables as main has allocated so far including compiler
11761 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
11762 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
11763 reuse the register of parent for one of the local variables,
11764 since it will think that parent can't possibly be used any more
11765 in this routine. Assigning to the local variable will thus
11766 munge parent in the parent process. */
11767 pid_t
11768 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
11769 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
11770 /* Convince the compiler that p..p7 are live; otherwise, it might
11771 use the same hardware register for all 8 local variables. */
11772 if (p != p1 || p != p2 || p != p3 || p != p4
11773 || p != p5 || p != p6 || p != p7)
11774 _exit(1);
11775
11776 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
11777 from child file descriptors. If the child closes a descriptor
11778 before it execs or exits, this munges the parent's descriptor
11779 as well. Test for this by closing stdout in the child. */
11780 _exit(close(fileno(stdout)) != 0);
11781 } else {
11782 int status;
11783 struct stat st;
11784
11785 while (wait(&status) != child)
11786 ;
81ecdfbb 11787 return (
a9322a30
TT
11788 /* Was there some problem with vforking? */
11789 child < 0
11790
11791 /* Did the child fail? (This shouldn't happen.) */
11792 || status
11793
11794 /* Did the vfork/compiler bug occur? */
11795 || parent != getpid()
11796
11797 /* Did the file descriptor bug occur? */
11798 || fstat(fileno(stdout), &st) != 0
11799 );
11800 }
11801}
11802_ACEOF
81ecdfbb 11803if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
11804 ac_cv_func_vfork_works=yes
11805else
81ecdfbb 11806 ac_cv_func_vfork_works=no
a9322a30 11807fi
81ecdfbb
RW
11808rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11809 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 11810fi
81ecdfbb 11811
a9322a30 11812fi
81ecdfbb
RW
11813{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
11814$as_echo "$ac_cv_func_vfork_works" >&6; }
a9322a30
TT
11815
11816fi;
11817if test "x$ac_cv_func_fork_works" = xcross; then
11818 ac_cv_func_vfork_works=$ac_cv_func_vfork
81ecdfbb
RW
11819 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
11820$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
a9322a30
TT
11821fi
11822
11823if test "x$ac_cv_func_vfork_works" = xyes; then
11824
81ecdfbb 11825$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
a9322a30
TT
11826
11827else
11828
81ecdfbb 11829$as_echo "#define vfork fork" >>confdefs.h
a9322a30
TT
11830
11831fi
11832if test "x$ac_cv_func_fork_works" = xyes; then
11833
81ecdfbb 11834$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
a9322a30
TT
11835
11836fi
11837
cdf43629 11838for ac_func in getauxval getrusage getuid getgid \
bdca27a2 11839 pipe poll pread pread64 pwrite resize_term \
7313baad 11840 sbrk setpgid setpgrp setsid \
9467110b 11841 sigaction sigprocmask sigsetmask socketpair \
110ed339 11842 ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
3332aaf2 11843 setrlimit getrlimit posix_madvise waitpid \
4b8b5e72 11844 ptrace64 sigaltstack mkdtemp setns
81ecdfbb
RW
11845do :
11846 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11847ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11848eval as_val=\$$as_ac_var
11849 if test "x$as_val" = x""yes; then :
6c7a06a3 11850 cat >>confdefs.h <<_ACEOF
81ecdfbb 11851#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6c7a06a3
TT
11852_ACEOF
11853
11854fi
11855done
11856
11857
81ecdfbb
RW
11858 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
11859$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
11860if test "${am_cv_langinfo_codeset+set}" = set; then :
11861 $as_echo_n "(cached) " >&6
6c7a06a3 11862else
81ecdfbb 11863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
11864/* end confdefs.h. */
11865#include <langinfo.h>
11866int
11867main ()
11868{
11869char* cs = nl_langinfo(CODESET);
bec39cab
AC
11870 ;
11871 return 0;
11872}
11873_ACEOF
81ecdfbb 11874if ac_fn_c_try_link "$LINENO"; then :
6c7a06a3 11875 am_cv_langinfo_codeset=yes
a4db0f07 11876else
81ecdfbb 11877 am_cv_langinfo_codeset=no
a4db0f07 11878fi
81ecdfbb
RW
11879rm -f core conftest.err conftest.$ac_objext \
11880 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 11881
a4db0f07 11882fi
81ecdfbb
RW
11883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
11884$as_echo "$am_cv_langinfo_codeset" >&6; }
6c7a06a3
TT
11885 if test $am_cv_langinfo_codeset = yes; then
11886
81ecdfbb 11887$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
a4db0f07 11888
6c7a06a3 11889 fi
c906108c 11890
06825bd1 11891
3266f10b
TT
11892 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
11893$as_echo_n "checking for ANSI C header files... " >&6; }
11894if test "${ac_cv_header_stdc+set}" = set; then :
11895 $as_echo_n "(cached) " >&6
11896else
11897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11898/* end confdefs.h. */
11899#include <stdlib.h>
11900#include <stdarg.h>
11901#include <string.h>
11902#include <float.h>
11903
11904int
11905main ()
11906{
11907
11908 ;
11909 return 0;
11910}
11911_ACEOF
11912if ac_fn_c_try_compile "$LINENO"; then :
11913 ac_cv_header_stdc=yes
11914else
11915 ac_cv_header_stdc=no
11916fi
11917rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11918
11919if test $ac_cv_header_stdc = yes; then
11920 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11921 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11922/* end confdefs.h. */
11923#include <string.h>
11924
11925_ACEOF
11926if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11927 $EGREP "memchr" >/dev/null 2>&1; then :
11928
11929else
11930 ac_cv_header_stdc=no
11931fi
11932rm -f conftest*
11933
11934fi
11935
11936if test $ac_cv_header_stdc = yes; then
11937 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11939/* end confdefs.h. */
11940#include <stdlib.h>
11941
11942_ACEOF
11943if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11944 $EGREP "free" >/dev/null 2>&1; then :
11945
11946else
11947 ac_cv_header_stdc=no
11948fi
11949rm -f conftest*
11950
11951fi
11952
11953if test $ac_cv_header_stdc = yes; then
11954 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11955 if test "$cross_compiling" = yes; then :
11956 :
11957else
11958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11959/* end confdefs.h. */
11960#include <ctype.h>
11961#include <stdlib.h>
11962#if ((' ' & 0x0FF) == 0x020)
11963# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11964# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11965#else
11966# define ISLOWER(c) \
11967 (('a' <= (c) && (c) <= 'i') \
11968 || ('j' <= (c) && (c) <= 'r') \
11969 || ('s' <= (c) && (c) <= 'z'))
11970# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11971#endif
11972
11973#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11974int
11975main ()
11976{
11977 int i;
11978 for (i = 0; i < 256; i++)
11979 if (XOR (islower (i), ISLOWER (i))
11980 || toupper (i) != TOUPPER (i))
11981 return 2;
11982 return 0;
11983}
11984_ACEOF
11985if ac_fn_c_try_run "$LINENO"; then :
11986
11987else
11988 ac_cv_header_stdc=no
11989fi
11990rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11991 conftest.$ac_objext conftest.beam conftest.$ac_ext
11992fi
11993
11994fi
11995fi
11996{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
11997$as_echo "$ac_cv_header_stdc" >&6; }
11998if test $ac_cv_header_stdc = yes; then
11999
12000$as_echo "#define STDC_HEADERS 1" >>confdefs.h
12001
3266f10b
TT
12002fi
12003
12004 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
12005# for constant arguments. Useless!
12006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
12007$as_echo_n "checking for working alloca.h... " >&6; }
12008if test "${ac_cv_working_alloca_h+set}" = set; then :
12009 $as_echo_n "(cached) " >&6
12010else
12011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12012/* end confdefs.h. */
12013#include <alloca.h>
12014int
12015main ()
12016{
12017char *p = (char *) alloca (2 * sizeof (int));
12018 if (p) return 0;
12019 ;
12020 return 0;
12021}
12022_ACEOF
12023if ac_fn_c_try_link "$LINENO"; then :
12024 ac_cv_working_alloca_h=yes
12025else
12026 ac_cv_working_alloca_h=no
12027fi
12028rm -f core conftest.err conftest.$ac_objext \
12029 conftest$ac_exeext conftest.$ac_ext
12030fi
12031{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
12032$as_echo "$ac_cv_working_alloca_h" >&6; }
12033if test $ac_cv_working_alloca_h = yes; then
12034
12035$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
12036
12037fi
12038
12039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
12040$as_echo_n "checking for alloca... " >&6; }
12041if test "${ac_cv_func_alloca_works+set}" = set; then :
12042 $as_echo_n "(cached) " >&6
12043else
12044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12045/* end confdefs.h. */
12046#ifdef __GNUC__
12047# define alloca __builtin_alloca
12048#else
12049# ifdef _MSC_VER
12050# include <malloc.h>
12051# define alloca _alloca
12052# else
12053# ifdef HAVE_ALLOCA_H
12054# include <alloca.h>
12055# else
12056# ifdef _AIX
12057 #pragma alloca
12058# else
12059# ifndef alloca /* predefined by HP cc +Olibcalls */
12060char *alloca ();
12061# endif
12062# endif
12063# endif
12064# endif
12065#endif
12066
12067int
12068main ()
12069{
12070char *p = (char *) alloca (1);
12071 if (p) return 0;
12072 ;
12073 return 0;
12074}
12075_ACEOF
12076if ac_fn_c_try_link "$LINENO"; then :
12077 ac_cv_func_alloca_works=yes
12078else
12079 ac_cv_func_alloca_works=no
12080fi
12081rm -f core conftest.err conftest.$ac_objext \
12082 conftest$ac_exeext conftest.$ac_ext
12083fi
12084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
12085$as_echo "$ac_cv_func_alloca_works" >&6; }
12086
12087if test $ac_cv_func_alloca_works = yes; then
12088
12089$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
12090
12091else
12092 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
12093# that cause trouble. Some versions do not even contain alloca or
12094# contain a buggy version. If you still want to use their alloca,
12095# use ar to extract alloca.o from them instead of compiling alloca.c.
12096
12097ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
12098
12099$as_echo "#define C_ALLOCA 1" >>confdefs.h
12100
12101
12102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
12103$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
12104if test "${ac_cv_os_cray+set}" = set; then :
12105 $as_echo_n "(cached) " >&6
12106else
12107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12108/* end confdefs.h. */
12109#if defined CRAY && ! defined CRAY2
12110webecray
12111#else
12112wenotbecray
12113#endif
12114
12115_ACEOF
12116if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12117 $EGREP "webecray" >/dev/null 2>&1; then :
12118 ac_cv_os_cray=yes
12119else
12120 ac_cv_os_cray=no
12121fi
12122rm -f conftest*
12123
12124fi
12125{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
12126$as_echo "$ac_cv_os_cray" >&6; }
12127if test $ac_cv_os_cray = yes; then
12128 for ac_func in _getb67 GETB67 getb67; do
12129 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12130ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12131eval as_val=\$$as_ac_var
12132 if test "x$as_val" = x""yes; then :
12133
12134cat >>confdefs.h <<_ACEOF
12135#define CRAY_STACKSEG_END $ac_func
12136_ACEOF
12137
12138 break
12139fi
12140
12141 done
12142fi
12143
12144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
12145$as_echo_n "checking stack direction for C alloca... " >&6; }
12146if test "${ac_cv_c_stack_direction+set}" = set; then :
12147 $as_echo_n "(cached) " >&6
12148else
12149 if test "$cross_compiling" = yes; then :
12150 ac_cv_c_stack_direction=0
12151else
12152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12153/* end confdefs.h. */
12154$ac_includes_default
12155int
12156find_stack_direction ()
12157{
12158 static char *addr = 0;
12159 auto char dummy;
12160 if (addr == 0)
12161 {
12162 addr = &dummy;
12163 return find_stack_direction ();
12164 }
12165 else
12166 return (&dummy > addr) ? 1 : -1;
12167}
12168
12169int
12170main ()
12171{
12172 return find_stack_direction () < 0;
12173}
12174_ACEOF
12175if ac_fn_c_try_run "$LINENO"; then :
12176 ac_cv_c_stack_direction=1
12177else
12178 ac_cv_c_stack_direction=-1
12179fi
12180rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12181 conftest.$ac_objext conftest.beam conftest.$ac_ext
12182fi
12183
12184fi
12185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
12186$as_echo "$ac_cv_c_stack_direction" >&6; }
12187cat >>confdefs.h <<_ACEOF
12188#define STACK_DIRECTION $ac_cv_c_stack_direction
12189_ACEOF
12190
12191
12192fi
12193
12194
12195
12196 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
12197$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
12198if test "${am_cv_langinfo_codeset+set}" = set; then :
12199 $as_echo_n "(cached) " >&6
12200else
12201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12202/* end confdefs.h. */
12203#include <langinfo.h>
12204int
12205main ()
12206{
12207char* cs = nl_langinfo(CODESET);
12208 ;
12209 return 0;
12210}
12211_ACEOF
12212if ac_fn_c_try_link "$LINENO"; then :
12213 am_cv_langinfo_codeset=yes
12214else
12215 am_cv_langinfo_codeset=no
12216fi
12217rm -f core conftest.err conftest.$ac_objext \
12218 conftest$ac_exeext conftest.$ac_ext
12219
12220fi
12221{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
12222$as_echo "$am_cv_langinfo_codeset" >&6; }
12223 if test $am_cv_langinfo_codeset = yes; then
12224
12225$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
12226
12227 fi
12228
12229
a3d08894 12230 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
12231do :
12232 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12233ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12234eval as_val=\$$as_ac_Header
12235 if test "x$as_val" = x""yes; then :
12236 cat >>confdefs.h <<_ACEOF
12237#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12238_ACEOF
12239
12240fi
12241
12242done
12243
12244
12245 for ac_func in fdwalk getrlimit pipe pipe2 socketpair
12246do :
12247 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12248ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12249eval as_val=\$$as_ac_var
12250 if test "x$as_val" = x""yes; then :
12251 cat >>confdefs.h <<_ACEOF
12252#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12253_ACEOF
12254
12255fi
12256done
12257
12258
12259 ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default"
12260if test "x$ac_cv_have_decl_strerror" = x""yes; then :
12261 ac_have_decl=1
12262else
12263 ac_have_decl=0
12264fi
12265
12266cat >>confdefs.h <<_ACEOF
12267#define HAVE_DECL_STRERROR $ac_have_decl
12268_ACEOF
12269ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
12270if test "x$ac_cv_have_decl_strstr" = x""yes; then :
12271 ac_have_decl=1
12272else
12273 ac_have_decl=0
12274fi
12275
12276cat >>confdefs.h <<_ACEOF
12277#define HAVE_DECL_STRSTR $ac_have_decl
12278_ACEOF
12279
12280
e9bcb658
GB
12281 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
12282$as_echo_n "checking for sigsetjmp... " >&6; }
12283if test "${gdb_cv_func_sigsetjmp+set}" = set; then :
12284 $as_echo_n "(cached) " >&6
12285else
12286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12287/* end confdefs.h. */
12288
12289#include <setjmp.h>
12290
12291int
12292main ()
12293{
12294sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
12295 ;
12296 return 0;
12297}
12298_ACEOF
12299if ac_fn_c_try_compile "$LINENO"; then :
12300 gdb_cv_func_sigsetjmp=yes
12301else
12302 gdb_cv_func_sigsetjmp=no
12303fi
12304rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12305fi
12306{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
12307$as_echo "$gdb_cv_func_sigsetjmp" >&6; }
12308if test $gdb_cv_func_sigsetjmp = yes; then
12309
12310$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
12311
12312fi
12313
3266f10b 12314
54019719
PA
12315# Check the return and argument types of ptrace.
12316
12317
54019719
PA
12318for ac_header in sys/ptrace.h ptrace.h
12319do :
12320 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12321ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12322eval as_val=\$$as_ac_Header
12323 if test "x$as_val" = x""yes; then :
12324 cat >>confdefs.h <<_ACEOF
12325#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12326_ACEOF
12327
12328fi
12329
12330done
12331
12332
a3828db0 12333gdb_ptrace_headers='
4ff70b84 12334#include <sys/types.h>
a3828db0
MK
12335#if HAVE_SYS_PTRACE_H
12336# include <sys/ptrace.h>
12337#endif
12338#if HAVE_UNISTD_H
12339# include <unistd.h>
12340#endif
12341'
12342# There is no point in checking if we don't have a prototype.
9b30624b 12343ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers
81ecdfbb
RW
12344"
12345if test "x$ac_cv_have_decl_ptrace" = x""yes; then :
12346 ac_have_decl=1
06825bd1 12347else
81ecdfbb 12348 ac_have_decl=0
06825bd1 12349fi
06825bd1 12350
a3828db0 12351cat >>confdefs.h <<_ACEOF
81ecdfbb 12352#define HAVE_DECL_PTRACE $ac_have_decl
a3828db0 12353_ACEOF
81ecdfbb 12354if test $ac_have_decl = 1; then :
bec39cab 12355
a3828db0 12356else
a3828db0
MK
12357
12358 : ${gdb_cv_func_ptrace_ret='int'}
12359 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
12360
06825bd1
MK
12361fi
12362
064ef605
DJ
12363# Check return type. Varargs (used on GNU/Linux) conflict with the
12364# empty argument list, so check for that explicitly.
81ecdfbb
RW
12365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
12366$as_echo_n "checking return type of ptrace... " >&6; }
12367if test "${gdb_cv_func_ptrace_ret+set}" = set; then :
12368 $as_echo_n "(cached) " >&6
bec39cab 12369else
81ecdfbb 12370 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12371/* end confdefs.h. */
a3828db0 12372$gdb_ptrace_headers
bec39cab
AC
12373int
12374main ()
12375{
064ef605
DJ
12376extern long ptrace (enum __ptrace_request, ...);
12377 ;
12378 return 0;
12379}
12380_ACEOF
9b30624b 12381if ac_fn_c_try_compile "$LINENO"; then :
064ef605
DJ
12382 gdb_cv_func_ptrace_ret='long'
12383else
81ecdfbb 12384 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
12385/* end confdefs.h. */
12386$gdb_ptrace_headers
12387int
12388main ()
12389{
a3828db0 12390extern int ptrace ();
bec39cab
AC
12391 ;
12392 return 0;
12393}
12394_ACEOF
9b30624b 12395if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12396 gdb_cv_func_ptrace_ret='int'
70f9f479 12397else
81ecdfbb 12398 gdb_cv_func_ptrace_ret='long'
70f9f479 12399fi
81ecdfbb 12400rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
70f9f479 12401fi
81ecdfbb 12402rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
064ef605 12403fi
81ecdfbb
RW
12404{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
12405$as_echo "$gdb_cv_func_ptrace_ret" >&6; }
bec39cab 12406
a3828db0
MK
12407cat >>confdefs.h <<_ACEOF
12408#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
bec39cab 12409_ACEOF
70f9f479 12410
a3828db0 12411# Check argument types.
81ecdfbb
RW
12412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
12413$as_echo_n "checking types of arguments for ptrace... " >&6; }
12414if test "${gdb_cv_func_ptrace_args+set}" = set; then :
12415 $as_echo_n "(cached) " >&6
bec39cab 12416else
a3828db0 12417
81ecdfbb 12418 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
12419/* end confdefs.h. */
12420$gdb_ptrace_headers
12421int
12422main ()
12423{
12424extern long ptrace (enum __ptrace_request, ...);
12425 ;
12426 return 0;
12427}
12428_ACEOF
9b30624b 12429if ac_fn_c_try_compile "$LINENO"; then :
54019719 12430 gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long'
064ef605 12431else
064ef605 12432
a3828db0
MK
12433for gdb_arg1 in 'int' 'long'; do
12434 for gdb_arg2 in 'pid_t' 'int' 'long'; do
5ed10e6e 12435 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
96d7229d 12436 for gdb_arg4 in 'int' 'long' 'void *'; do
81ecdfbb 12437 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12438/* end confdefs.h. */
a3828db0 12439$gdb_ptrace_headers
bec39cab
AC
12440int
12441main ()
12442{
a3828db0
MK
12443
12444extern $gdb_cv_func_ptrace_ret
12445 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
12446
bec39cab
AC
12447 ;
12448 return 0;
12449}
12450_ACEOF
9b30624b 12451if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
12452 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
12453 break 4;
5c7f2947 12454fi
81ecdfbb 12455rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0 12456 for gdb_arg5 in 'int *' 'int' 'long'; do
81ecdfbb 12457 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12458/* end confdefs.h. */
a3828db0 12459$gdb_ptrace_headers
bec39cab
AC
12460int
12461main ()
12462{
a3828db0
MK
12463
12464extern $gdb_cv_func_ptrace_ret
12465 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
12466
bec39cab
AC
12467 ;
12468 return 0;
12469}
12470_ACEOF
9b30624b 12471if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
12472
12473gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
12474 break 5;
78434e59 12475fi
81ecdfbb 12476rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0
MK
12477 done
12478 done
12479 done
12480 done
12481done
12482# Provide a safe default value.
12483: ${gdb_cv_func_ptrace_args='int,int,long,long'}
12484
064ef605 12485fi
81ecdfbb 12486rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
78434e59 12487fi
81ecdfbb
RW
12488{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
12489$as_echo "$gdb_cv_func_ptrace_args" >&6; }
a3828db0
MK
12490ac_save_IFS=$IFS; IFS=','
12491set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
12492IFS=$ac_save_IFS
12493shift
bec39cab 12494
54019719
PA
12495cat >>confdefs.h <<_ACEOF
12496#define PTRACE_TYPE_ARG1 $1
12497_ACEOF
12498
12499
a3828db0
MK
12500cat >>confdefs.h <<_ACEOF
12501#define PTRACE_TYPE_ARG3 $3
12502_ACEOF
12503
96d7229d
LM
12504
12505cat >>confdefs.h <<_ACEOF
12506#define PTRACE_TYPE_ARG4 $4
12507_ACEOF
12508
a3828db0
MK
12509if test -n "$5"; then
12510
12511cat >>confdefs.h <<_ACEOF
12512#define PTRACE_TYPE_ARG5 $5
bec39cab 12513_ACEOF
78434e59
MK
12514
12515fi
12516
54019719 12517
a3828db0 12518if test "$cross_compiling" = no; then
81ecdfbb
RW
12519 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
12520$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
12521if test "${ac_cv_func_setpgrp_void+set}" = set; then :
12522 $as_echo_n "(cached) " >&6
a3828db0 12523else
81ecdfbb
RW
12524 if test "$cross_compiling" = yes; then :
12525 as_fn_error "cannot check setpgrp when cross compiling" "$LINENO" 5
bec39cab 12526else
81ecdfbb 12527 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12528/* end confdefs.h. */
81ecdfbb 12529$ac_includes_default
bec39cab
AC
12530int
12531main ()
12532{
a3828db0
MK
12533/* If this system has a BSD-style setpgrp which takes arguments,
12534 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
12535 exit successfully. */
81ecdfbb 12536 return setpgrp (1,1) != -1;
bec39cab
AC
12537 ;
12538 return 0;
12539}
12540_ACEOF
81ecdfbb 12541if ac_fn_c_try_run "$LINENO"; then :
a3828db0 12542 ac_cv_func_setpgrp_void=no
c906108c 12543else
81ecdfbb 12544 ac_cv_func_setpgrp_void=yes
c906108c 12545fi
81ecdfbb
RW
12546rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12547 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 12548fi
81ecdfbb 12549
a3828db0 12550fi
81ecdfbb
RW
12551{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
12552$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0
MK
12553if test $ac_cv_func_setpgrp_void = yes; then
12554
81ecdfbb 12555$as_echo "#define SETPGRP_VOID 1" >>confdefs.h
97bf5e38
MK
12556
12557fi
a3828db0
MK
12558
12559else
81ecdfbb
RW
12560 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
12561$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
12562if test "${ac_cv_func_setpgrp_void+set}" = set; then :
12563 $as_echo_n "(cached) " >&6
97bf5e38 12564else
81ecdfbb 12565 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12566/* end confdefs.h. */
a3828db0
MK
12567
12568#include <unistd.h>
12569
bec39cab
AC
12570int
12571main ()
12572{
a3828db0
MK
12573
12574 if (setpgrp(1,1) == -1)
12575 exit (0);
12576 else
12577 exit (1);
12578
bec39cab
AC
12579 ;
12580 return 0;
12581}
12582_ACEOF
81ecdfbb 12583if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12584 ac_cv_func_setpgrp_void=no
c906108c 12585else
81ecdfbb 12586 ac_cv_func_setpgrp_void=yes
c906108c 12587fi
81ecdfbb 12588rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 12589fi
81ecdfbb
RW
12590{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
12591$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0 12592if test $ac_cv_func_setpgrp_void = yes; then
81ecdfbb 12593 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
c3f6f71d 12594
a3828db0 12595fi
c906108c
SS
12596fi
12597
db1ff28b
JK
12598# Assume we'll default to using the included libiberty regex.
12599gdb_use_included_regex=yes
12600
12601# However, if the system regex is GNU regex, then default to *not*
12602# using the included regex.
12603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5
12604$as_echo_n "checking for GNU regex... " >&6; }
12605if test "${gdb_cv_have_gnu_regex+set}" = set; then :
12606 $as_echo_n "(cached) " >&6
12607else
12608 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12609/* end confdefs.h. */
12610#include <gnu-versions.h>
12611int
12612main ()
12613{
12614#define REGEX_INTERFACE_VERSION 1
12615#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
12616# error "Version mismatch"
12617#endif
12618 ;
12619 return 0;
12620}
12621_ACEOF
12622if ac_fn_c_try_compile "$LINENO"; then :
12623 gdb_cv_have_gnu_regex=yes
12624else
12625 gdb_cv_have_gnu_regex=no
12626fi
12627rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12628fi
12629{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
12630$as_echo "$gdb_cv_have_gnu_regex" >&6; }
12631if test $gdb_cv_have_gnu_regex = yes; then
12632 gdb_use_included_regex=no
12633fi
12634
12635
12636# Check whether --with-included-regex was given.
12637if test "${with_included_regex+set}" = set; then :
12638 withval=$with_included_regex; gdb_with_regex=$withval
12639else
12640 gdb_with_regex=$gdb_use_included_regex
12641fi
12642
12643if test "$gdb_with_regex" = yes; then
12644
12645$as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h
12646
12647fi
12648
81ecdfbb
RW
12649# Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
12650ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
12651#include <sys/proc.h>
12652
12653"
12654if test "x$ac_cv_member_struct_thread_td_pcb" = x""yes; then :
c906108c 12655
5c45e068 12656cat >>confdefs.h <<_ACEOF
a3828db0 12657#define HAVE_STRUCT_THREAD_TD_PCB 1
bec39cab 12658_ACEOF
c906108c 12659
5c45e068 12660
97bf5e38 12661fi
c906108c 12662
5c45e068 12663
a3828db0 12664# See if <sys/lwp.h> defines `struct lwp`.
81ecdfbb
RW
12665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
12666$as_echo_n "checking for struct lwp... " >&6; }
12667if test "${gdb_cv_struct_lwp+set}" = set; then :
12668 $as_echo_n "(cached) " >&6
bec39cab 12669else
81ecdfbb 12670 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12671/* end confdefs.h. */
a3828db0
MK
12672#include <sys/param.h>
12673#include <sys/lwp.h>
bec39cab
AC
12674int
12675main ()
12676{
a3828db0 12677struct lwp l;
bec39cab
AC
12678 ;
12679 return 0;
12680}
12681_ACEOF
81ecdfbb 12682if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12683 gdb_cv_struct_lwp=yes
c906108c 12684else
81ecdfbb 12685 gdb_cv_struct_lwp=no
c906108c 12686fi
81ecdfbb 12687rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 12688fi
81ecdfbb
RW
12689{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
12690$as_echo "$gdb_cv_struct_lwp" >&6; }
a3828db0 12691if test $gdb_cv_struct_lwp = yes; then
c906108c 12692
81ecdfbb 12693$as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
c906108c 12694
97bf5e38 12695fi
c906108c 12696
a3828db0 12697# See if <machine/reg.h> degines `struct reg'.
81ecdfbb
RW
12698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
12699$as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
12700if test "${gdb_cv_struct_reg+set}" = set; then :
12701 $as_echo_n "(cached) " >&6
bec39cab 12702else
81ecdfbb 12703 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12704/* end confdefs.h. */
a3828db0
MK
12705#include <sys/types.h>
12706#include <machine/reg.h>
bec39cab
AC
12707int
12708main ()
12709{
a3828db0 12710struct reg r;
bec39cab
AC
12711 ;
12712 return 0;
12713}
12714_ACEOF
81ecdfbb 12715if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12716 gdb_cv_struct_reg=yes
27ca5dad 12717else
81ecdfbb 12718 gdb_cv_struct_reg=no
27ca5dad 12719fi
81ecdfbb 12720rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27ca5dad 12721fi
81ecdfbb
RW
12722{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
12723$as_echo "$gdb_cv_struct_reg" >&6; }
a3828db0 12724if test $gdb_cv_struct_reg = yes; then
bec39cab 12725
81ecdfbb 12726$as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
27ca5dad
MC
12727
12728fi
97bf5e38 12729
a3828db0
MK
12730# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
12731# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
a6e69c1f
JB
12732ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <sys/types.h>
12733#include <machine/reg.h>
81ecdfbb
RW
12734"
12735if test "x$ac_cv_member_struct_reg_r_fs" = x""yes; then :
5c45e068
MK
12736
12737cat >>confdefs.h <<_ACEOF
a3828db0 12738#define HAVE_STRUCT_REG_R_FS 1
bec39cab 12739_ACEOF
3862412b 12740
5c45e068 12741
97bf5e38 12742fi
a6e69c1f
JB
12743ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <sys/types.h>
12744#include <machine/reg.h>
81ecdfbb
RW
12745"
12746if test "x$ac_cv_member_struct_reg_r_gs" = x""yes; then :
5c45e068
MK
12747
12748cat >>confdefs.h <<_ACEOF
a3828db0 12749#define HAVE_STRUCT_REG_R_GS 1
bec39cab 12750_ACEOF
3862412b 12751
5c45e068 12752
97bf5e38 12753fi
3862412b 12754
5c45e068 12755
6fea9e18
L
12756# See if <sys/user.h> supports the %fs_base and %gs_bas amd64 segment registers.
12757# Older amd64 Linux's don't have the fs_base and gs_base members of
12758# `struct user_regs_struct'.
12759ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "fs_base" "ac_cv_member_struct_user_regs_struct_fs_base" "#include <sys/user.h>
12760"
12761if test "x$ac_cv_member_struct_user_regs_struct_fs_base" = x""yes; then :
12762
12763cat >>confdefs.h <<_ACEOF
12764#define HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE 1
12765_ACEOF
12766
12767
12768fi
12769ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "gs_base" "ac_cv_member_struct_user_regs_struct_gs_base" "#include <sys/user.h>
12770"
12771if test "x$ac_cv_member_struct_user_regs_struct_gs_base" = x""yes; then :
12772
12773cat >>confdefs.h <<_ACEOF
12774#define HAVE_STRUCT_USER_REGS_STRUCT_GS_BASE 1
12775_ACEOF
12776
12777
12778fi
12779
12780
a3828db0 12781# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
81ecdfbb
RW
12782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
12783$as_echo_n "checking for PTRACE_GETREGS... " >&6; }
12784if test "${gdb_cv_have_ptrace_getregs+set}" = set; then :
12785 $as_echo_n "(cached) " >&6
451928c5 12786else
81ecdfbb 12787 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12788/* end confdefs.h. */
a3828db0 12789#include <sys/ptrace.h>
bec39cab
AC
12790int
12791main ()
12792{
a3828db0 12793PTRACE_GETREGS;
bec39cab
AC
12794 ;
12795 return 0;
12796}
12797_ACEOF
81ecdfbb 12798if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12799 gdb_cv_have_ptrace_getregs=yes
451928c5 12800else
81ecdfbb 12801 gdb_cv_have_ptrace_getregs=no
451928c5 12802fi
81ecdfbb 12803rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
12804fi
12805
81ecdfbb
RW
12806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
12807$as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
a3828db0 12808if test $gdb_cv_have_ptrace_getregs = yes; then
60ca704f 12809
81ecdfbb 12810$as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
451928c5 12811
97bf5e38 12812fi
451928c5 12813
a3828db0 12814# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
81ecdfbb
RW
12815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
12816$as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
12817if test "${gdb_cv_have_ptrace_getfpxregs+set}" = set; then :
12818 $as_echo_n "(cached) " >&6
451928c5 12819else
81ecdfbb 12820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12821/* end confdefs.h. */
a3828db0 12822#include <sys/ptrace.h>
bec39cab
AC
12823int
12824main ()
12825{
a3828db0 12826PTRACE_GETFPXREGS;
bec39cab
AC
12827 ;
12828 return 0;
12829}
12830_ACEOF
81ecdfbb 12831if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12832 gdb_cv_have_ptrace_getfpxregs=yes
451928c5 12833else
81ecdfbb 12834 gdb_cv_have_ptrace_getfpxregs=no
451928c5 12835fi
81ecdfbb 12836rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
12837fi
12838
81ecdfbb
RW
12839{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
12840$as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
a3828db0 12841if test $gdb_cv_have_ptrace_getfpxregs = yes; then
60ca704f 12842
81ecdfbb 12843$as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
451928c5 12844
97bf5e38 12845fi
451928c5 12846
a3828db0 12847# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
81ecdfbb
RW
12848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
12849$as_echo_n "checking for PT_GETDBREGS... " >&6; }
12850if test "${gdb_cv_have_pt_getdbregs+set}" = set; then :
12851 $as_echo_n "(cached) " >&6
3862412b 12852else
81ecdfbb 12853 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12854/* end confdefs.h. */
a3828db0
MK
12855#include <sys/types.h>
12856#include <sys/ptrace.h>
bec39cab
AC
12857int
12858main ()
12859{
a3828db0 12860PT_GETDBREGS;
bec39cab
AC
12861 ;
12862 return 0;
12863}
12864_ACEOF
81ecdfbb 12865if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12866 gdb_cv_have_pt_getdbregs=yes
3862412b 12867else
81ecdfbb 12868 gdb_cv_have_pt_getdbregs=no
3862412b 12869fi
81ecdfbb 12870rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
12871fi
12872
81ecdfbb
RW
12873{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
12874$as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
a3828db0 12875if test $gdb_cv_have_pt_getdbregs = yes; then
60ca704f 12876
81ecdfbb 12877$as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
3862412b 12878
97bf5e38 12879fi
3862412b 12880
a3828db0 12881# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
81ecdfbb
RW
12882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
12883$as_echo_n "checking for PT_GETXMMREGS... " >&6; }
12884if test "${gdb_cv_have_pt_getxmmregs+set}" = set; then :
12885 $as_echo_n "(cached) " >&6
3862412b 12886else
81ecdfbb 12887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12888/* end confdefs.h. */
a3828db0
MK
12889#include <sys/types.h>
12890#include <sys/ptrace.h>
bec39cab
AC
12891int
12892main ()
12893{
a3828db0 12894PT_GETXMMREGS;
bec39cab
AC
12895 ;
12896 return 0;
12897}
12898_ACEOF
81ecdfbb 12899if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12900 gdb_cv_have_pt_getxmmregs=yes
3862412b 12901else
81ecdfbb 12902 gdb_cv_have_pt_getxmmregs=no
3862412b 12903fi
81ecdfbb 12904rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
12905fi
12906
81ecdfbb
RW
12907{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
12908$as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
a3828db0 12909if test $gdb_cv_have_pt_getxmmregs = yes; then
60ca704f 12910
81ecdfbb 12911$as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
3862412b 12912
97bf5e38 12913fi
3862412b 12914
6e9567fe
JB
12915# See if <sys/ptrace.h> supports LWP names on FreeBSD
12916# Older FreeBSD versions don't have the pl_tdname member of
12917# `struct ptrace_lwpinfo'.
12918ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_tdname" "ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" "#include <sys/ptrace.h>
12919"
12920if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" = x""yes; then :
12921
12922cat >>confdefs.h <<_ACEOF
12923#define HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME 1
12924_ACEOF
12925
12926
12927fi
12928
12929
12930
05b4bd79 12931# Detect which type of /proc is in use, such as for Solaris.
97bf5e38
MK
12932
12933if test "${target}" = "${host}"; then
12934 case "${host}" in
7b00db47 12935 *-*-sysv4.2* | *-*-sysv5* )
60ca704f 12936
81ecdfbb 12937$as_echo "#define NEW_PROC_API 1" >>confdefs.h
97bf5e38
MK
12938
12939 ;;
c162e8c9 12940 *-*-solaris2.[6789] | *-*-solaris2.1[0-9]*)
60ca704f 12941
81ecdfbb 12942$as_echo "#define NEW_PROC_API 1" >>confdefs.h
c960c18f
AC
12943
12944 ;;
12945 mips-sgi-irix5*)
12946 # Work around <sys/proc.h> needing _KMEMUSER problem on IRIX 5.
60ca704f 12947
81ecdfbb 12948$as_echo "#define _KMEMUSER 1" >>confdefs.h
97bf5e38
MK
12949
12950 ;;
12951 esac
12952fi
12953
12954if test "$ac_cv_header_sys_procfs_h" = yes; then
81ecdfbb
RW
12955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
12956$as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
12957 if test "${bfd_cv_have_sys_procfs_type_gregset_t+set}" = set; then :
12958 $as_echo_n "(cached) " >&6
596c9d4b 12959else
81ecdfbb 12960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12961/* end confdefs.h. */
596c9d4b
KB
12962
12963#define _SYSCALL32
d30c5336
JK
12964/* Needed for new procfs interface on sparc-solaris. */
12965#define _STRUCTURED_PROC 1
596c9d4b 12966#include <sys/procfs.h>
bec39cab
AC
12967int
12968main ()
12969{
97bf5e38 12970gregset_t avar
bec39cab
AC
12971 ;
12972 return 0;
12973}
12974_ACEOF
81ecdfbb 12975if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 12976 bfd_cv_have_sys_procfs_type_gregset_t=yes
596c9d4b 12977else
81ecdfbb 12978 bfd_cv_have_sys_procfs_type_gregset_t=no
bec39cab 12979
596c9d4b 12980fi
81ecdfbb 12981rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
12982fi
12983
97bf5e38 12984 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
bec39cab 12985
81ecdfbb 12986$as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
596c9d4b
KB
12987
12988 fi
81ecdfbb
RW
12989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
12990$as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
451928c5 12991
81ecdfbb
RW
12992 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
12993$as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
12994 if test "${bfd_cv_have_sys_procfs_type_fpregset_t+set}" = set; then :
12995 $as_echo_n "(cached) " >&6
d84dd0c5 12996else
81ecdfbb 12997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12998/* end confdefs.h. */
97bf5e38
MK
12999
13000#define _SYSCALL32
d30c5336
JK
13001/* Needed for new procfs interface on sparc-solaris. */
13002#define _STRUCTURED_PROC 1
d84dd0c5 13003#include <sys/procfs.h>
bec39cab
AC
13004int
13005main ()
13006{
97bf5e38 13007fpregset_t avar
bec39cab
AC
13008 ;
13009 return 0;
13010}
13011_ACEOF
81ecdfbb 13012if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13013 bfd_cv_have_sys_procfs_type_fpregset_t=yes
d84dd0c5 13014else
81ecdfbb 13015 bfd_cv_have_sys_procfs_type_fpregset_t=no
bec39cab 13016
d84dd0c5 13017fi
81ecdfbb 13018rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d84dd0c5
MK
13019fi
13020
97bf5e38 13021 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
bec39cab 13022
81ecdfbb 13023$as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
d84dd0c5 13024
97bf5e38 13025 fi
81ecdfbb
RW
13026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
13027$as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
d84dd0c5 13028
81ecdfbb
RW
13029 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
13030$as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
13031 if test "${bfd_cv_have_sys_procfs_type_prgregset_t+set}" = set; then :
13032 $as_echo_n "(cached) " >&6
c906108c 13033else
81ecdfbb 13034 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13035/* end confdefs.h. */
c906108c 13036
97bf5e38 13037#define _SYSCALL32
d30c5336
JK
13038/* Needed for new procfs interface on sparc-solaris. */
13039#define _STRUCTURED_PROC 1
97bf5e38 13040#include <sys/procfs.h>
bec39cab
AC
13041int
13042main ()
13043{
97bf5e38 13044prgregset_t avar
bec39cab
AC
13045 ;
13046 return 0;
13047}
13048_ACEOF
81ecdfbb 13049if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13050 bfd_cv_have_sys_procfs_type_prgregset_t=yes
c906108c 13051else
81ecdfbb 13052 bfd_cv_have_sys_procfs_type_prgregset_t=no
bec39cab 13053
c906108c 13054fi
81ecdfbb 13055rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13056fi
13057
97bf5e38 13058 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
bec39cab 13059
81ecdfbb 13060$as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
c906108c 13061
97bf5e38 13062 fi
81ecdfbb
RW
13063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
13064$as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
c906108c 13065
81ecdfbb
RW
13066 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
13067$as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
13068 if test "${bfd_cv_have_sys_procfs_type_prfpregset_t+set}" = set; then :
13069 $as_echo_n "(cached) " >&6
d45fe813 13070else
81ecdfbb 13071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13072/* end confdefs.h. */
97bf5e38
MK
13073
13074#define _SYSCALL32
d30c5336
JK
13075/* Needed for new procfs interface on sparc-solaris. */
13076#define _STRUCTURED_PROC 1
97bf5e38 13077#include <sys/procfs.h>
bec39cab
AC
13078int
13079main ()
13080{
97bf5e38 13081prfpregset_t avar
bec39cab
AC
13082 ;
13083 return 0;
13084}
13085_ACEOF
81ecdfbb 13086if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13087 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
d45fe813 13088else
81ecdfbb 13089 bfd_cv_have_sys_procfs_type_prfpregset_t=no
bec39cab 13090
d45fe813 13091fi
81ecdfbb 13092rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
13093fi
13094
97bf5e38 13095 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
bec39cab 13096
81ecdfbb 13097$as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
d45fe813 13098
97bf5e38 13099 fi
81ecdfbb
RW
13100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
13101$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
d45fe813 13102
81ecdfbb
RW
13103 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
13104$as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
13105 if test "${bfd_cv_have_sys_procfs_type_prgregset32_t+set}" = set; then :
13106 $as_echo_n "(cached) " >&6
d45fe813 13107else
81ecdfbb 13108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13109/* end confdefs.h. */
97bf5e38
MK
13110
13111#define _SYSCALL32
d30c5336
JK
13112/* Needed for new procfs interface on sparc-solaris. */
13113#define _STRUCTURED_PROC 1
97bf5e38 13114#include <sys/procfs.h>
bec39cab
AC
13115int
13116main ()
13117{
97bf5e38 13118prgregset32_t avar
bec39cab
AC
13119 ;
13120 return 0;
13121}
13122_ACEOF
81ecdfbb 13123if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13124 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
d45fe813 13125else
81ecdfbb 13126 bfd_cv_have_sys_procfs_type_prgregset32_t=no
bec39cab 13127
d45fe813 13128fi
81ecdfbb 13129rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
13130fi
13131
97bf5e38 13132 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
bec39cab 13133
81ecdfbb 13134$as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
d45fe813 13135
97bf5e38 13136 fi
81ecdfbb
RW
13137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
13138$as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
d45fe813 13139
81ecdfbb
RW
13140 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
13141$as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
13142 if test "${bfd_cv_have_sys_procfs_type_lwpid_t+set}" = set; then :
13143 $as_echo_n "(cached) " >&6
d45fe813 13144else
81ecdfbb 13145 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13146/* end confdefs.h. */
97bf5e38 13147
d45fe813 13148#define _SYSCALL32
d30c5336
JK
13149/* Needed for new procfs interface on sparc-solaris. */
13150#define _STRUCTURED_PROC 1
97bf5e38 13151#include <sys/procfs.h>
bec39cab
AC
13152int
13153main ()
13154{
97bf5e38 13155lwpid_t avar
bec39cab
AC
13156 ;
13157 return 0;
13158}
13159_ACEOF
81ecdfbb 13160if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13161 bfd_cv_have_sys_procfs_type_lwpid_t=yes
d45fe813 13162else
81ecdfbb 13163 bfd_cv_have_sys_procfs_type_lwpid_t=no
bec39cab 13164
d45fe813 13165fi
81ecdfbb 13166rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
13167fi
13168
97bf5e38 13169 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
bec39cab 13170
81ecdfbb 13171$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
d45fe813 13172
97bf5e38 13173 fi
81ecdfbb
RW
13174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
13175$as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
c906108c 13176
81ecdfbb
RW
13177 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
13178$as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
13179 if test "${bfd_cv_have_sys_procfs_type_psaddr_t+set}" = set; then :
13180 $as_echo_n "(cached) " >&6
c906108c 13181else
81ecdfbb 13182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13183/* end confdefs.h. */
c906108c 13184
97bf5e38 13185#define _SYSCALL32
d30c5336
JK
13186/* Needed for new procfs interface on sparc-solaris. */
13187#define _STRUCTURED_PROC 1
97bf5e38 13188#include <sys/procfs.h>
bec39cab
AC
13189int
13190main ()
13191{
97bf5e38 13192psaddr_t avar
bec39cab
AC
13193 ;
13194 return 0;
13195}
13196_ACEOF
81ecdfbb 13197if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13198 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c 13199else
81ecdfbb 13200 bfd_cv_have_sys_procfs_type_psaddr_t=no
bec39cab 13201
c906108c 13202fi
81ecdfbb 13203rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13204fi
13205
97bf5e38 13206 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
bec39cab 13207
81ecdfbb 13208$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
c906108c 13209
97bf5e38 13210 fi
81ecdfbb
RW
13211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
13212$as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
c906108c 13213
81ecdfbb
RW
13214 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prsysent_t in sys/procfs.h" >&5
13215$as_echo_n "checking for prsysent_t in sys/procfs.h... " >&6; }
13216 if test "${bfd_cv_have_sys_procfs_type_prsysent_t+set}" = set; then :
13217 $as_echo_n "(cached) " >&6
c906108c 13218else
81ecdfbb 13219 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13220/* end confdefs.h. */
c906108c 13221
97bf5e38 13222#define _SYSCALL32
d30c5336
JK
13223/* Needed for new procfs interface on sparc-solaris. */
13224#define _STRUCTURED_PROC 1
97bf5e38 13225#include <sys/procfs.h>
bec39cab
AC
13226int
13227main ()
13228{
97bf5e38 13229prsysent_t avar
bec39cab
AC
13230 ;
13231 return 0;
13232}
13233_ACEOF
81ecdfbb 13234if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13235 bfd_cv_have_sys_procfs_type_prsysent_t=yes
c906108c 13236else
81ecdfbb 13237 bfd_cv_have_sys_procfs_type_prsysent_t=no
bec39cab 13238
c906108c 13239fi
81ecdfbb 13240rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13241fi
13242
97bf5e38 13243 if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
bec39cab 13244
81ecdfbb 13245$as_echo "#define HAVE_PRSYSENT_T 1" >>confdefs.h
c906108c 13246
97bf5e38 13247 fi
81ecdfbb
RW
13248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prsysent_t" >&5
13249$as_echo "$bfd_cv_have_sys_procfs_type_prsysent_t" >&6; }
c906108c 13250
81ecdfbb
RW
13251 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigset_t in sys/procfs.h" >&5
13252$as_echo_n "checking for pr_sigset_t in sys/procfs.h... " >&6; }
13253 if test "${bfd_cv_have_sys_procfs_type_pr_sigset_t+set}" = set; then :
13254 $as_echo_n "(cached) " >&6
c906108c 13255else
81ecdfbb 13256 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13257/* end confdefs.h. */
c906108c 13258
97bf5e38 13259#define _SYSCALL32
d30c5336
JK
13260/* Needed for new procfs interface on sparc-solaris. */
13261#define _STRUCTURED_PROC 1
97bf5e38 13262#include <sys/procfs.h>
bec39cab
AC
13263int
13264main ()
13265{
97bf5e38 13266pr_sigset_t avar
bec39cab
AC
13267 ;
13268 return 0;
13269}
13270_ACEOF
81ecdfbb 13271if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13272 bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
c906108c 13273else
81ecdfbb 13274 bfd_cv_have_sys_procfs_type_pr_sigset_t=no
bec39cab 13275
c906108c 13276fi
81ecdfbb 13277rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13278fi
13279
97bf5e38 13280 if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
bec39cab 13281
81ecdfbb 13282$as_echo "#define HAVE_PR_SIGSET_T 1" >>confdefs.h
c906108c 13283
97bf5e38 13284 fi
81ecdfbb
RW
13285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigset_t" >&5
13286$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigset_t" >&6; }
c906108c 13287
81ecdfbb
RW
13288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigaction64_t in sys/procfs.h" >&5
13289$as_echo_n "checking for pr_sigaction64_t in sys/procfs.h... " >&6; }
13290 if test "${bfd_cv_have_sys_procfs_type_pr_sigaction64_t+set}" = set; then :
13291 $as_echo_n "(cached) " >&6
c906108c 13292else
81ecdfbb 13293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13294/* end confdefs.h. */
c906108c 13295
97bf5e38 13296#define _SYSCALL32
d30c5336
JK
13297/* Needed for new procfs interface on sparc-solaris. */
13298#define _STRUCTURED_PROC 1
97bf5e38 13299#include <sys/procfs.h>
bec39cab
AC
13300int
13301main ()
13302{
97bf5e38 13303pr_sigaction64_t avar
bec39cab
AC
13304 ;
13305 return 0;
13306}
13307_ACEOF
81ecdfbb 13308if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13309 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
c906108c 13310else
81ecdfbb 13311 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
bec39cab 13312
c906108c 13313fi
81ecdfbb 13314rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13315fi
13316
97bf5e38 13317 if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
bec39cab 13318
81ecdfbb 13319$as_echo "#define HAVE_PR_SIGACTION64_T 1" >>confdefs.h
c906108c 13320
97bf5e38 13321 fi
81ecdfbb
RW
13322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&5
13323$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&6; }
97bf5e38 13324
81ecdfbb
RW
13325 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_siginfo64_t in sys/procfs.h" >&5
13326$as_echo_n "checking for pr_siginfo64_t in sys/procfs.h... " >&6; }
13327 if test "${bfd_cv_have_sys_procfs_type_pr_siginfo64_t+set}" = set; then :
13328 $as_echo_n "(cached) " >&6
97bf5e38 13329else
81ecdfbb 13330 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13331/* end confdefs.h. */
97bf5e38
MK
13332
13333#define _SYSCALL32
d30c5336
JK
13334/* Needed for new procfs interface on sparc-solaris. */
13335#define _STRUCTURED_PROC 1
97bf5e38 13336#include <sys/procfs.h>
bec39cab
AC
13337int
13338main ()
13339{
97bf5e38 13340pr_siginfo64_t avar
bec39cab
AC
13341 ;
13342 return 0;
13343}
13344_ACEOF
81ecdfbb 13345if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
13346 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
13347else
81ecdfbb 13348 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
bec39cab 13349
97bf5e38 13350fi
81ecdfbb 13351rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 13352fi
c906108c 13353
97bf5e38 13354 if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
bec39cab 13355
81ecdfbb 13356$as_echo "#define HAVE_PR_SIGINFO64_T 1" >>confdefs.h
c906108c 13357
97bf5e38 13358 fi
81ecdfbb
RW
13359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&5
13360$as_echo "$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&6; }
bec39cab
AC
13361
13362
97bf5e38
MK
13363
13364
13365
97bf5e38 13366 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
81ecdfbb
RW
13367 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether prfpregset_t type is broken" >&5
13368$as_echo_n "checking whether prfpregset_t type is broken... " >&6; }
13369 if test "${gdb_cv_prfpregset_t_broken+set}" = set; then :
13370 $as_echo_n "(cached) " >&6
c906108c 13371else
81ecdfbb 13372 if test "$cross_compiling" = yes; then :
97bf5e38 13373 gdb_cv_prfpregset_t_broken=yes
c906108c 13374else
81ecdfbb 13375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13376/* end confdefs.h. */
97bf5e38
MK
13377#include <sys/procfs.h>
13378 int main ()
13379 {
13380 if (sizeof (prfpregset_t) == sizeof (void *))
13381 return 1;
13382 return 0;
13383 }
bec39cab 13384_ACEOF
81ecdfbb 13385if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 13386 gdb_cv_prfpregset_t_broken=no
81ecdfbb
RW
13387else
13388 gdb_cv_prfpregset_t_broken=yes
c906108c 13389fi
81ecdfbb
RW
13390rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13391 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 13392fi
81ecdfbb 13393
c906108c
SS
13394fi
13395
81ecdfbb
RW
13396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_prfpregset_t_broken" >&5
13397$as_echo "$gdb_cv_prfpregset_t_broken" >&6; }
97bf5e38 13398 if test $gdb_cv_prfpregset_t_broken = yes; then
60ca704f 13399
81ecdfbb 13400$as_echo "#define PRFPREGSET_T_BROKEN 1" >>confdefs.h
c906108c 13401
97bf5e38
MK
13402 fi
13403 fi
c906108c 13404fi
c906108c 13405
bc8bcb4b 13406# Check if the compiler supports the `long long' type.
c906108c 13407
81ecdfbb
RW
13408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
13409$as_echo_n "checking for long long support in compiler... " >&6; }
13410if test "${gdb_cv_c_long_long+set}" = set; then :
13411 $as_echo_n "(cached) " >&6
97bf5e38 13412else
81ecdfbb 13413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13414/* end confdefs.h. */
bc8bcb4b 13415extern long long foo;
bec39cab
AC
13416int
13417main ()
13418{
bc8bcb4b 13419switch (foo & 2) { case 0: return 1; }
bec39cab
AC
13420 ;
13421 return 0;
13422}
13423_ACEOF
81ecdfbb 13424if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
13425 gdb_cv_c_long_long=yes
13426else
81ecdfbb 13427 gdb_cv_c_long_long=no
97bf5e38 13428fi
81ecdfbb 13429rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 13430fi
81ecdfbb
RW
13431{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
13432$as_echo "$gdb_cv_c_long_long" >&6; }
74a0d9f6
JK
13433if test $gdb_cv_c_long_long != yes; then
13434 # libdecnumber requires long long.
13435 as_fn_error "Compiler must support long long for GDB." "$LINENO" 5
97bf5e38
MK
13436fi
13437
bc8bcb4b 13438# Check if the compiler and runtime support printing long longs.
97bf5e38 13439
81ecdfbb
RW
13440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
13441$as_echo_n "checking for long long support in printf... " >&6; }
13442if test "${gdb_cv_printf_has_long_long+set}" = set; then :
13443 $as_echo_n "(cached) " >&6
97bf5e38 13444else
81ecdfbb 13445 if test "$cross_compiling" = yes; then :
97bf5e38
MK
13446 gdb_cv_printf_has_long_long=no
13447else
81ecdfbb 13448 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13449/* end confdefs.h. */
bc8bcb4b
MK
13450$ac_includes_default
13451int
13452main ()
13453{
13454char buf[32];
97bf5e38
MK
13455 long long l = 0;
13456 l = (l << 16) + 0x0123;
13457 l = (l << 16) + 0x4567;
13458 l = (l << 16) + 0x89ab;
13459 l = (l << 16) + 0xcdef;
13460 sprintf (buf, "0x%016llx", l);
13461 return (strcmp ("0x0123456789abcdef", buf));
bc8bcb4b
MK
13462 ;
13463 return 0;
c906108c 13464}
bec39cab 13465_ACEOF
81ecdfbb 13466if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
13467 gdb_cv_printf_has_long_long=yes
13468else
81ecdfbb 13469 gdb_cv_printf_has_long_long=no
97bf5e38 13470fi
81ecdfbb
RW
13471rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13472 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 13473fi
81ecdfbb 13474
97bf5e38 13475fi
81ecdfbb
RW
13476{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
13477$as_echo "$gdb_cv_printf_has_long_long" >&6; }
97bf5e38 13478if test $gdb_cv_printf_has_long_long = yes; then
bc8bcb4b 13479
81ecdfbb 13480$as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
97bf5e38
MK
13481
13482fi
97bf5e38 13483
1a619819
LM
13484# Check if the compiler and runtime support printing decfloats.
13485
81ecdfbb
RW
13486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
13487$as_echo_n "checking for decfloat support in printf... " >&6; }
13488if test "${gdb_cv_printf_has_decfloat+set}" = set; then :
13489 $as_echo_n "(cached) " >&6
1a619819 13490else
81ecdfbb 13491 if test "$cross_compiling" = yes; then :
1a619819
LM
13492 gdb_cv_printf_has_decfloat=no
13493else
81ecdfbb 13494 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1a619819
LM
13495/* end confdefs.h. */
13496$ac_includes_default
13497int
13498main ()
13499{
13500char buf[64];
13501 _Decimal32 d32 = 1.2345df;
13502 _Decimal64 d64 = 1.2345dd;
13503 _Decimal128 d128 = 1.2345dl;
13504 sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
13505 return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
13506 ;
13507 return 0;
13508}
13509_ACEOF
81ecdfbb 13510if ac_fn_c_try_run "$LINENO"; then :
1a619819
LM
13511 gdb_cv_printf_has_decfloat=yes
13512else
81ecdfbb 13513 gdb_cv_printf_has_decfloat=no
1a619819 13514fi
81ecdfbb
RW
13515rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13516 conftest.$ac_objext conftest.beam conftest.$ac_ext
1a619819 13517fi
81ecdfbb 13518
1a619819 13519fi
81ecdfbb
RW
13520{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
13521$as_echo "$gdb_cv_printf_has_decfloat" >&6; }
1a619819
LM
13522if test $gdb_cv_printf_has_decfloat = yes; then
13523
81ecdfbb 13524$as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
1a619819
LM
13525
13526fi
13527
bc8bcb4b
MK
13528# Check if the compiler supports the `long double' type. We can't use
13529# AC_C_LONG_DOUBLE because that one does additional checks on the
13530# constants defined in <float.h> that fail on some systems,
13531# e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
97bf5e38 13532
81ecdfbb
RW
13533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
13534$as_echo_n "checking for long double support in compiler... " >&6; }
13535if test "${gdb_cv_c_long_double+set}" = set; then :
13536 $as_echo_n "(cached) " >&6
97bf5e38 13537else
81ecdfbb 13538 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13539/* end confdefs.h. */
97bf5e38 13540long double foo;
bec39cab 13541_ACEOF
81ecdfbb 13542if ac_fn_c_try_compile "$LINENO"; then :
bc8bcb4b 13543 gdb_cv_c_long_double=yes
97bf5e38 13544else
81ecdfbb 13545 gdb_cv_c_long_double=no
97bf5e38 13546fi
81ecdfbb 13547rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 13548fi
81ecdfbb
RW
13549{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
13550$as_echo "$gdb_cv_c_long_double" >&6; }
bc8bcb4b 13551if test $gdb_cv_c_long_double = yes; then
c906108c 13552
81ecdfbb 13553$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
13554
13555fi
13556
bc8bcb4b 13557# Check if the compiler and runtime support printing long doubles.
97bf5e38 13558
81ecdfbb
RW
13559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
13560$as_echo_n "checking for long double support in printf... " >&6; }
13561if test "${gdb_cv_printf_has_long_double+set}" = set; then :
13562 $as_echo_n "(cached) " >&6
97bf5e38 13563else
81ecdfbb 13564 if test "$cross_compiling" = yes; then :
97bf5e38
MK
13565 gdb_cv_printf_has_long_double=no
13566else
81ecdfbb 13567 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13568/* end confdefs.h. */
bc8bcb4b
MK
13569$ac_includes_default
13570int
13571main ()
13572{
13573char buf[16];
97bf5e38
MK
13574 long double f = 3.141592653;
13575 sprintf (buf, "%Lg", f);
13576 return (strncmp ("3.14159", buf, 7));
bc8bcb4b
MK
13577 ;
13578 return 0;
97bf5e38 13579}
bec39cab 13580_ACEOF
81ecdfbb 13581if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 13582 gdb_cv_printf_has_long_double=yes
c906108c 13583else
81ecdfbb 13584 gdb_cv_printf_has_long_double=no
c906108c 13585fi
81ecdfbb
RW
13586rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13587 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 13588fi
81ecdfbb 13589
c906108c 13590fi
81ecdfbb
RW
13591{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
13592$as_echo "$gdb_cv_printf_has_long_double" >&6; }
97bf5e38 13593if test $gdb_cv_printf_has_long_double = yes; then
bc8bcb4b 13594
81ecdfbb 13595$as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
13596
13597fi
97bf5e38 13598
bc8bcb4b 13599# Check if the compiler and runtime support scanning long doubles.
97bf5e38 13600
81ecdfbb
RW
13601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
13602$as_echo_n "checking for long double support in scanf... " >&6; }
13603if test "${gdb_cv_scanf_has_long_double+set}" = set; then :
13604 $as_echo_n "(cached) " >&6
97bf5e38 13605else
81ecdfbb 13606 if test "$cross_compiling" = yes; then :
97bf5e38
MK
13607 gdb_cv_scanf_has_long_double=no
13608else
81ecdfbb 13609 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13610/* end confdefs.h. */
bc8bcb4b
MK
13611#include <stdio.h>
13612int
13613main ()
13614{
13615char *buf = "3.141592653";
97bf5e38
MK
13616 long double f = 0;
13617 sscanf (buf, "%Lg", &f);
13618 return !(f > 3.14159 && f < 3.14160);
bc8bcb4b
MK
13619 ;
13620 return 0;
97bf5e38 13621}
bec39cab 13622_ACEOF
81ecdfbb 13623if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
13624 gdb_cv_scanf_has_long_double=yes
13625else
81ecdfbb 13626 gdb_cv_scanf_has_long_double=no
97bf5e38 13627fi
81ecdfbb
RW
13628rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13629 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 13630fi
81ecdfbb 13631
c906108c 13632fi
81ecdfbb
RW
13633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
13634$as_echo "$gdb_cv_scanf_has_long_double" >&6; }
97bf5e38 13635if test $gdb_cv_scanf_has_long_double = yes; then
bc8bcb4b 13636
81ecdfbb 13637$as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
13638
13639fi
c906108c 13640
438013df
AO
13641case ${host_os} in
13642aix*)
81ecdfbb
RW
13643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
13644$as_echo_n "checking for -bbigtoc option... " >&6; }
13645if test "${gdb_cv_bigtoc+set}" = set; then :
13646 $as_echo_n "(cached) " >&6
438013df 13647else
bec39cab 13648
438013df
AO
13649 SAVE_LDFLAGS=$LDFLAGS
13650
13651 case $GCC in
13652 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
13653 *) gdb_cv_bigtoc=-bbigtoc ;;
13654 esac
13655
13656 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
81ecdfbb 13657 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13658/* end confdefs.h. */
438013df 13659
bec39cab
AC
13660int
13661main ()
13662{
438013df 13663int i;
bec39cab
AC
13664 ;
13665 return 0;
13666}
13667_ACEOF
81ecdfbb 13668if ac_fn_c_try_link "$LINENO"; then :
bec39cab 13669
81ecdfbb
RW
13670else
13671 gdb_cv_bigtoc=
438013df 13672fi
81ecdfbb
RW
13673rm -f core conftest.err conftest.$ac_objext \
13674 conftest$ac_exeext conftest.$ac_ext
ec76baa5 13675 LDFLAGS="${SAVE_LDFLAGS}"
438013df 13676
bec39cab 13677fi
81ecdfbb
RW
13678{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
13679$as_echo "$gdb_cv_bigtoc" >&6; }
438013df
AO
13680 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
13681 ;;
13682esac
13683
38f6b338 13684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
f6528abd 13685$as_echo_n "checking for the dynamic export flag... " >&6; }
38f6b338
JK
13686dynamic_list=false
13687if test "${gdb_native}" = yes; then
13688 # The dynamically loaded libthread_db needs access to symbols in the gdb
13689 # executable. Older GNU ld supports --export-dynamic but --dynamic-list
13690 # may not be supported there.
13691 old_LDFLAGS="$LDFLAGS"
13692 # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
13693 RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
13694 LDFLAGS="$LDFLAGS $RDYNAMIC"
13695 if test "${have_libpython}" = no; then
13696 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f6528abd
JK
13697/* end confdefs.h. */
13698
13699int
13700main ()
13701{
13702
13703 ;
13704 return 0;
13705}
13706_ACEOF
13707if ac_fn_c_try_link "$LINENO"; then :
3bebe2f2
JK
13708 dynamic_list=true
13709fi
13710rm -f core conftest.err conftest.$ac_objext \
13711 conftest$ac_exeext conftest.$ac_ext
38f6b338
JK
13712 else
13713 # Workaround http://bugs.python.org/issue4434 where static
13714 # libpythonX.Y.a would get its symbols required for
13715 # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
13716 # Problem does not happen for the recommended libpythonX.Y.so linkage.
a4a1c157
PA
13717
13718 # Note the workaround for Python
13719 # http://bugs.python.org/issue10112 earlier has removed
13720 # -export-dynamic from PYTHON_LIBS. That's exactly what we want
13721 # here too, as otherwise it'd make this -Wl,--dynamic-list test
13722 # always pass.
38f6b338
JK
13723 old_CFLAGS="$CFLAGS"
13724 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
8c1fb155
JK
13725 old_LIBS="$LIBS"
13726 LIBS="$LIBS $PYTHON_LIBS"
1b4f615e
PA
13727 old_CPPFLAGS="$CPPFLAGS"
13728 CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
38f6b338 13729 if test "$cross_compiling" = yes; then :
3bebe2f2 13730 true
f6528abd 13731else
3bebe2f2
JK
13732 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13733/* end confdefs.h. */
1b4f615e 13734#include "Python.h"
3bebe2f2
JK
13735int
13736main ()
13737{
13738int err;
38f6b338
JK
13739 Py_Initialize ();
13740 err = PyRun_SimpleString ("import itertools\n");
13741 Py_Finalize ();
13742 return err == 0 ? 0 : 1;
3bebe2f2
JK
13743 ;
13744 return 0;
13745}
13746_ACEOF
13747if ac_fn_c_try_run "$LINENO"; then :
13748 dynamic_list=true
13749fi
13750rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13751 conftest.$ac_objext conftest.beam conftest.$ac_ext
13752fi
13753
8c1fb155 13754 LIBS="$old_LIBS"
38f6b338 13755 CFLAGS="$old_CFLAGS"
1b4f615e 13756 CPPFLAGS="$old_CPPFLAGS"
38f6b338
JK
13757 fi
13758 LDFLAGS="$old_LDFLAGS"
13759fi
13760if $dynamic_list; then
13761 found="-Wl,--dynamic-list"
13762 RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
f6528abd 13763else
38f6b338
JK
13764 found="-rdynamic"
13765 RDYNAMIC="-rdynamic"
f6528abd 13766fi
f6528abd 13767
38f6b338 13768{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
f6528abd 13769$as_echo "$found" >&6; }
0407b3f1 13770
f6528abd 13771
0407b3f1 13772if test ${build} = ${host} -a ${host} = ${target} ; then
c906108c 13773 case ${host_os} in
c906108c 13774 solaris*)
d92419e5
JB
13775 # See if thread_db library is around for Solaris thread debugging.
13776 # Note that we must explicitly test for version 1 of the library
13777 # because version 0 (present on Solaris 2.4 or earlier) doesn't have
13778 # the same API.
81ecdfbb
RW
13779 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris thread debugging library" >&5
13780$as_echo_n "checking for Solaris thread debugging library... " >&6; }
c906108c 13781 if test -f /usr/lib/libthread_db.so.1 ; then
81ecdfbb
RW
13782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13783$as_echo "yes" >&6; }
60ca704f 13784
81ecdfbb 13785$as_echo "#define HAVE_THREAD_DB_LIB 1" >>confdefs.h
c906108c 13786
3483b318 13787 CONFIG_OBS="${CONFIG_OBS} sol-thread.o"
c906108c 13788 CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
81ecdfbb
RW
13789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
13790$as_echo_n "checking for dlopen in -ldl... " >&6; }
13791if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
13792 $as_echo_n "(cached) " >&6
c906108c 13793else
bec39cab 13794 ac_check_lib_save_LIBS=$LIBS
c906108c 13795LIBS="-ldl $LIBS"
81ecdfbb 13796cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
13797/* end confdefs.h. */
13798
81ecdfbb
RW
13799/* Override any GCC internal prototype to avoid an error.
13800 Use char because int might match the return type of a GCC
13801 builtin and then its argument prototype would still apply. */
bec39cab
AC
13802#ifdef __cplusplus
13803extern "C"
13804#endif
bec39cab
AC
13805char dlopen ();
13806int
13807main ()
13808{
81ecdfbb 13809return dlopen ();
bec39cab
AC
13810 ;
13811 return 0;
13812}
13813_ACEOF
81ecdfbb 13814if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
13815 ac_cv_lib_dl_dlopen=yes
13816else
81ecdfbb 13817 ac_cv_lib_dl_dlopen=no
bec39cab 13818fi
81ecdfbb
RW
13819rm -f core conftest.err conftest.$ac_objext \
13820 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
13821LIBS=$ac_check_lib_save_LIBS
13822fi
81ecdfbb
RW
13823{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
13824$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
13825if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
bec39cab
AC
13826 cat >>confdefs.h <<_ACEOF
13827#define HAVE_LIBDL 1
13828_ACEOF
c906108c
SS
13829
13830 LIBS="-ldl $LIBS"
13831
c906108c
SS
13832fi
13833
f6528abd 13834 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} $RDYNAMIC"
c906108c
SS
13835 # Sun randomly tweaked the prototypes in <proc_service.h>
13836 # at one point.
81ecdfbb
RW
13837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if <proc_service.h> is old" >&5
13838$as_echo_n "checking if <proc_service.h> is old... " >&6; }
13839 if test "${gdb_cv_proc_service_is_old+set}" = set; then :
13840 $as_echo_n "(cached) " >&6
c906108c 13841else
bec39cab 13842
81ecdfbb 13843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13844/* end confdefs.h. */
c906108c
SS
13845
13846 #include <proc_service.h>
13847 ps_err_e ps_pdwrite
13848 (struct ps_prochandle*, psaddr_t, const void*, size_t);
c906108c 13849
bec39cab
AC
13850int
13851main ()
13852{
13853
13854 ;
13855 return 0;
13856}
13857_ACEOF
81ecdfbb 13858if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
13859 gdb_cv_proc_service_is_old=no
13860else
81ecdfbb 13861 gdb_cv_proc_service_is_old=yes
c906108c 13862fi
81ecdfbb 13863rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 13864
c906108c
SS
13865fi
13866
81ecdfbb
RW
13867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_proc_service_is_old" >&5
13868$as_echo "$gdb_cv_proc_service_is_old" >&6; }
c906108c 13869 if test $gdb_cv_proc_service_is_old = yes; then
60ca704f 13870
81ecdfbb 13871$as_echo "#define PROC_SERVICE_IS_OLD 1" >>confdefs.h
c906108c
SS
13872
13873 fi
13874 else
81ecdfbb
RW
13875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13876$as_echo "no" >&6; }
c906108c
SS
13877 fi
13878 ;;
d92419e5 13879 aix*)
81ecdfbb
RW
13880 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
13881$as_echo_n "checking for AiX thread debugging library... " >&6; }
13882 if test "${gdb_cv_have_aix_thread_debug+set}" = set; then :
13883 $as_echo_n "(cached) " >&6
bec39cab 13884else
81ecdfbb 13885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13886/* end confdefs.h. */
d92419e5 13887#include <sys/pthdebug.h>
bec39cab
AC
13888int
13889main ()
13890{
d92419e5
JB
13891#ifndef PTHDB_VERSION_3
13892 #error
13893 #endif
bec39cab
AC
13894 ;
13895 return 0;
13896}
13897_ACEOF
81ecdfbb 13898if ac_fn_c_try_compile "$LINENO"; then :
d92419e5
JB
13899 gdb_cv_have_aix_thread_debug=yes
13900else
81ecdfbb 13901 gdb_cv_have_aix_thread_debug=no
d92419e5 13902fi
81ecdfbb 13903rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d92419e5
JB
13904fi
13905
81ecdfbb
RW
13906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
13907$as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
d92419e5
JB
13908 if test $gdb_cv_have_aix_thread_debug = yes; then
13909 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
3483b318 13910 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
7f533142 13911 LIBS="$LIBS -lpthdebug"
d645e32e
JB
13912
13913 # Older versions of AIX do not provide the declaration for
13914 # the getthrds function (it appears that it was introduced
13915 # with AIX 6.x).
13916 ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h>
13917"
13918if test "x$ac_cv_have_decl_getthrds" = x""yes; then :
13919 ac_have_decl=1
13920else
13921 ac_have_decl=0
13922fi
13923
13924cat >>confdefs.h <<_ACEOF
13925#define HAVE_DECL_GETTHRDS $ac_have_decl
13926_ACEOF
13927
d92419e5
JB
13928 fi
13929 ;;
c906108c 13930 esac
bec39cab 13931
c906108c
SS
13932fi
13933
3f47be5c 13934if test "x$ac_cv_header_thread_db_h" = "xyes"; then
81ecdfbb
RW
13935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
13936$as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
13937if test "${gdb_cv_thread_db_h_has_td_notalloc+set}" = set; then :
13938 $as_echo_n "(cached) " >&6
bec39cab 13939else
81ecdfbb 13940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13941/* end confdefs.h. */
3f47be5c 13942#include <thread_db.h>
bec39cab
AC
13943int
13944main ()
13945{
3f47be5c 13946int i = TD_NOTALLOC;
bec39cab
AC
13947 ;
13948 return 0;
13949}
13950_ACEOF
81ecdfbb 13951if ac_fn_c_try_compile "$LINENO"; then :
3f47be5c
EZ
13952 gdb_cv_thread_db_h_has_td_notalloc=yes
13953else
81ecdfbb 13954 gdb_cv_thread_db_h_has_td_notalloc=no
bec39cab 13955
3f47be5c 13956fi
81ecdfbb 13957rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3f47be5c 13958
bec39cab 13959fi
81ecdfbb
RW
13960{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
13961$as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
13962 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
13963$as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
13964if test "${gdb_cv_thread_db_h_has_td_version+set}" = set; then :
13965 $as_echo_n "(cached) " >&6
59f80f10 13966else
81ecdfbb 13967 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
13968/* end confdefs.h. */
13969#include <thread_db.h>
13970int
13971main ()
13972{
13973int i = TD_VERSION;
13974 ;
13975 return 0;
13976}
13977_ACEOF
81ecdfbb 13978if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
13979 gdb_cv_thread_db_h_has_td_version=yes
13980else
81ecdfbb 13981 gdb_cv_thread_db_h_has_td_version=no
59f80f10
DJ
13982
13983fi
81ecdfbb 13984rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
13985
13986fi
81ecdfbb
RW
13987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
13988$as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
13989 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
13990$as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
13991if test "${gdb_cv_thread_db_h_has_td_notls+set}" = set; then :
13992 $as_echo_n "(cached) " >&6
59f80f10 13993else
81ecdfbb 13994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
13995/* end confdefs.h. */
13996#include <thread_db.h>
13997int
13998main ()
13999{
14000int i = TD_NOTLS;
14001 ;
14002 return 0;
14003}
14004_ACEOF
81ecdfbb 14005if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
14006 gdb_cv_thread_db_h_has_td_notls=yes
14007else
81ecdfbb 14008 gdb_cv_thread_db_h_has_td_notls=no
59f80f10
DJ
14009
14010fi
81ecdfbb 14011rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
14012
14013fi
81ecdfbb
RW
14014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
14015$as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
3f47be5c
EZ
14016fi
14017if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
bec39cab 14018
81ecdfbb 14019$as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
3f47be5c 14020
59f80f10
DJ
14021fi
14022if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
14023
81ecdfbb 14024$as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
59f80f10
DJ
14025
14026fi
14027if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
14028
81ecdfbb 14029$as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
59f80f10 14030
3f47be5c
EZ
14031fi
14032
81ecdfbb
RW
14033ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
14034"
14035if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = x""yes; then :
14036 ac_have_decl=1
10568435 14037else
81ecdfbb 14038 ac_have_decl=0
10568435 14039fi
10568435
JK
14040
14041cat >>confdefs.h <<_ACEOF
81ecdfbb 14042#define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
10568435
JK
14043_ACEOF
14044
14045
81ecdfbb
RW
14046if test "$cross_compiling" = yes; then :
14047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
14048/* end confdefs.h. */
14049#include <sys/personality.h>
14050int
14051main ()
14052{
14053
14054# if !HAVE_DECL_ADDR_NO_RANDOMIZE
14055# define ADDR_NO_RANDOMIZE 0x0040000
14056# endif
14057 /* Test the flag could be set and stays set. */
14058 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
14059 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
14060 return 1
14061 ;
14062 return 0;
14063}
14064_ACEOF
81ecdfbb 14065if ac_fn_c_try_link "$LINENO"; then :
10568435
JK
14066 have_personality=true
14067else
81ecdfbb 14068 have_personality=false
10568435 14069fi
81ecdfbb
RW
14070rm -f core conftest.err conftest.$ac_objext \
14071 conftest$ac_exeext conftest.$ac_ext
10568435 14072else
81ecdfbb 14073 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
14074/* end confdefs.h. */
14075#include <sys/personality.h>
14076int
14077main ()
14078{
14079
14080# if !HAVE_DECL_ADDR_NO_RANDOMIZE
14081# define ADDR_NO_RANDOMIZE 0x0040000
14082# endif
14083 /* Test the flag could be set and stays set. */
14084 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
14085 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
14086 return 1
14087 ;
14088 return 0;
14089}
14090_ACEOF
81ecdfbb 14091if ac_fn_c_try_run "$LINENO"; then :
10568435
JK
14092 have_personality=true
14093else
81ecdfbb 14094 have_personality=false
10568435 14095fi
81ecdfbb
RW
14096rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14097 conftest.$ac_objext conftest.beam conftest.$ac_ext
10568435 14098fi
81ecdfbb 14099
10568435
JK
14100if $have_personality
14101then
14102
81ecdfbb 14103$as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
10568435
JK
14104
14105fi
14106
e655c1a2
PA
14107case $host_os in
14108 go32* | *djgpp*)
14109 gdbinit=gdb.ini
14110 ;;
14111 *)
14112 gdbinit=.gdbinit
14113 ;;
14114esac
14115
14116cat >>confdefs.h <<_ACEOF
14117#define GDBINIT "$gdbinit"
14118_ACEOF
14119
14120
fb40c209 14121
f83d8a90
DE
14122# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
14123# except that the argument to --with-sysroot is optional.
14124# --with-sysroot (or --with-sysroot=yes) sets the default sysroot path.
14125if test "x$with_sysroot" = xyes; then
14126 with_sysroot="${exec_prefix}/${target_alias}/sys-root"
14127fi
bec39cab 14128
81ecdfbb
RW
14129# Check whether --with-sysroot was given.
14130if test "${with_sysroot+set}" = set; then :
f83d8a90
DE
14131 withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval
14132else
14133 TARGET_SYSTEM_ROOT=
14134fi
030292b7 14135
030292b7 14136
f83d8a90
DE
14137 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
14138 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14139 ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT`
14140 ac_define_dir=`eval echo $ac_define_dir`
030292b7 14141
f83d8a90
DE
14142cat >>confdefs.h <<_ACEOF
14143#define TARGET_SYSTEM_ROOT "$ac_define_dir"
14144_ACEOF
bec39cab 14145
030292b7 14146
b14b1491 14147
f83d8a90
DE
14148
14149 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
14150 if test "x$prefix" = xNONE; then
14151 test_prefix=/usr/local
14152 else
14153 test_prefix=$prefix
14154 fi
14155 else
14156 test_prefix=$exec_prefix
14157 fi
14158 value=0
14159 case ${ac_define_dir} in
14160 "${test_prefix}"|"${test_prefix}/"*|\
14161 '${exec_prefix}'|'${exec_prefix}/'*)
14162 value=1
14163 ;;
14164 esac
14165
14166cat >>confdefs.h <<_ACEOF
14167#define TARGET_SYSTEM_ROOT_RELOCATABLE $value
14168_ACEOF
030292b7
DJ
14169
14170
14171
16e7150e 14172
16e7150e 14173
81ecdfbb
RW
14174# Check whether --with-system-gdbinit was given.
14175if test "${with_system_gdbinit+set}" = set; then :
14176 withval=$with_system_gdbinit;
b14b1491
TT
14177 SYSTEM_GDBINIT=$withval
14178else
14179 SYSTEM_GDBINIT=
81ecdfbb
RW
14180fi
14181
16e7150e
JG
14182
14183 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
14184 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 14185 ac_define_dir=`eval echo $SYSTEM_GDBINIT`
16e7150e
JG
14186 ac_define_dir=`eval echo $ac_define_dir`
14187
14188cat >>confdefs.h <<_ACEOF
14189#define SYSTEM_GDBINIT "$ac_define_dir"
14190_ACEOF
14191
14192
14193
0c4a4063 14194
b14b1491
TT
14195 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
14196 if test "x$prefix" = xNONE; then
14197 test_prefix=/usr/local
14198 else
14199 test_prefix=$prefix
14200 fi
14201 else
14202 test_prefix=$exec_prefix
14203 fi
14204 value=0
14205 case ${ac_define_dir} in
14206 "${test_prefix}"|"${test_prefix}/"*|\
14207 '${exec_prefix}'|'${exec_prefix}/'*)
14208 value=1
14209 ;;
14210 esac
16e7150e 14211
b14b1491
TT
14212cat >>confdefs.h <<_ACEOF
14213#define SYSTEM_GDBINIT_RELOCATABLE $value
16e7150e
JG
14214_ACEOF
14215
b14b1491 14216
16e7150e 14217
0c4a4063 14218
b835bb52 14219
9b30624b 14220
81ecdfbb
RW
14221# Check whether --enable-werror was given.
14222if test "${enable_werror+set}" = set; then :
14223 enableval=$enable_werror; case "${enableval}" in
094a342e
MK
14224 yes | y) ERROR_ON_WARNING="yes" ;;
14225 no | n) ERROR_ON_WARNING="no" ;;
81ecdfbb 14226 *) as_fn_error "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
094a342e 14227 esac
81ecdfbb
RW
14228fi
14229
094a342e 14230
9a084706
PA
14231# Enable -Werror by default when using gcc. Turn it off for releases.
14232if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
094a342e
MK
14233 ERROR_ON_WARNING=yes
14234fi
14235
14236WERROR_CFLAGS=""
14237if test "${ERROR_ON_WARNING}" = yes ; then
14238 WERROR_CFLAGS="-Werror"
14239fi
14240
3bc3d82a 14241# These options work in either C or C++ modes.
aac331e4 14242build_warnings="-Wall -Wpointer-arith \
1cb5e2a4 14243-Wno-unused -Wunused-value -Wunused-function \
aac331e4
PA
14244-Wno-switch -Wno-char-subscripts \
14245-Wempty-body"
a3b362c4 14246
3bc3d82a
PA
14247# Now add in C and C++ specific options, depending on mode.
14248if test "$enable_build_with_cxx" = "yes"; then
14249 build_warnings="$build_warnings -Wno-sign-compare -Wno-write-strings \
14250-Wno-narrowing"
14251else
aac331e4
PA
14252 build_warnings="$build_warnings -Wpointer-sign -Wmissing-prototypes \
14253-Wdeclaration-after-statement -Wmissing-parameter-type \
14254-Wold-style-declaration -Wold-style-definition"
3bc3d82a
PA
14255fi
14256
3526781e
DJ
14257# Enable -Wno-format by default when using gcc on mingw since many
14258# GCC versions complain about %I64.
14259case "${host}" in
14260 *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;;
d3685d60 14261 *) build_warnings="$build_warnings -Wformat-nonliteral" ;;
3526781e
DJ
14262esac
14263
81ecdfbb
RW
14264# Check whether --enable-build-warnings was given.
14265if test "${enable_build_warnings+set}" = set; then :
14266 enableval=$enable_build_warnings; case "${enableval}" in
c906108c
SS
14267 yes) ;;
14268 no) build_warnings="-w";;
14269 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
14270 build_warnings="${build_warnings} ${t}";;
14271 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
14272 build_warnings="${t} ${build_warnings}";;
14273 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
14274esac
d4f3574e 14275if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 14276 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 14277fi
81ecdfbb
RW
14278fi
14279# Check whether --enable-gdb-build-warnings was given.
14280if test "${enable_gdb_build_warnings+set}" = set; then :
14281 enableval=$enable_gdb_build_warnings; case "${enableval}" in
3b851bce
AC
14282 yes) ;;
14283 no) build_warnings="-w";;
14284 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
14285 build_warnings="${build_warnings} ${t}";;
14286 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
14287 build_warnings="${t} ${build_warnings}";;
14288 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
14289esac
14290if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
14291 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
14292fi
81ecdfbb 14293fi
3bc3d82a
PA
14294
14295# The set of warnings supported by a C++ compiler is not the same as
14296# of the C compiler.
14297if test "$enable_build_with_cxx" = "yes"; then
14298 ac_ext=cpp
14299ac_cpp='$CXXCPP $CPPFLAGS'
14300ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14301ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14302ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14303
14304fi
14305
81ecdfbb 14306WARN_CFLAGS=""
c906108c
SS
14307if test "x${build_warnings}" != x -a "x$GCC" = xyes
14308then
81ecdfbb
RW
14309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
14310$as_echo_n "checking compiler warning flags... " >&6; }
746a987d
AC
14311 # Separate out the -Werror flag as some files just cannot be
14312 # compiled with it enabled.
14313 for w in ${build_warnings}; do
7544db95
PA
14314 # GCC does not complain about -Wno-unknown-warning. Invert
14315 # and test -Wunknown-warning instead.
14316 case $w in
14317 -Wno-*)
14318 wtest=`echo $w | sed 's/-Wno-/-W/g'` ;;
14319 *)
14320 wtest=$w ;;
14321 esac
14322
746a987d
AC
14323 case $w in
14324 -Werr*) WERROR_CFLAGS=-Werror ;;
3bc3d82a
PA
14325 *)
14326 # Check whether GCC accepts it.
4536bbc6 14327 saved_CFLAGS="$CFLAGS"
7544db95 14328 CFLAGS="$CFLAGS $wtest"
3bc3d82a 14329 saved_CXXFLAGS="$CXXFLAGS"
7544db95 14330 CXXFLAGS="$CXXFLAGS $wtest"
54019719 14331 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14332/* end confdefs.h. */
4536bbc6 14333
bec39cab
AC
14334int
14335main ()
14336{
4536bbc6 14337
bec39cab
AC
14338 ;
14339 return 0;
14340}
14341_ACEOF
3bc3d82a 14342if ac_fn_cxx_try_compile "$LINENO"; then :
4536bbc6 14343 WARN_CFLAGS="${WARN_CFLAGS} $w"
4536bbc6 14344fi
81ecdfbb 14345rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4536bbc6 14346 CFLAGS="$saved_CFLAGS"
3bc3d82a 14347 CXXFLAGS="$saved_CXXFLAGS"
746a987d
AC
14348 esac
14349 done
81ecdfbb
RW
14350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
14351$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
c906108c
SS
14352fi
14353
14354
104c1213 14355
3bc3d82a
PA
14356if test "$enable_build_with_cxx" = "yes"; then
14357 ac_ext=c
14358ac_cpp='$CPP $CPPFLAGS'
14359ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14360ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14361ac_compiler_gnu=$ac_cv_c_compiler_gnu
14362
14363fi
14364
b835bb52 14365
7a292a7a 14366# In the Cygwin environment, we need some additional flags.
81ecdfbb
RW
14367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
14368$as_echo_n "checking for cygwin... " >&6; }
14369if test "${gdb_cv_os_cygwin+set}" = set; then :
14370 $as_echo_n "(cached) " >&6
bec39cab 14371else
81ecdfbb 14372 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14373/* end confdefs.h. */
7a292a7a
SS
14374
14375#if defined (__CYGWIN__) || defined (__CYGWIN32__)
14376lose
14377#endif
bec39cab 14378_ACEOF
7a292a7a 14379if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
92a021de 14380 $EGREP "^lose$" >/dev/null 2>&1; then :
7a292a7a
SS
14381 gdb_cv_os_cygwin=yes
14382else
7a292a7a
SS
14383 gdb_cv_os_cygwin=no
14384fi
14385rm -f conftest*
14386
14387fi
81ecdfbb
RW
14388{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
14389$as_echo "$gdb_cv_os_cygwin" >&6; }
7a292a7a 14390
aff38e61 14391
3eb25fda 14392SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
aff38e61 14393case ${host} in
95cbc983
AC
14394 *go32* ) SER_HARDWIRE=ser-go32.o ;;
14395 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
0ea3f30e 14396 *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
aff38e61
AC
14397esac
14398
14399
cd0fc7c3
SS
14400# libreadline needs libuser32.a in a cygwin environment
14401WIN32LIBS=
14402if test x$gdb_cv_os_cygwin = xyes; then
c5394b80
JM
14403 WIN32LIBS="-luser32"
14404 case "${target}" in
14405 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
14406 ;;
14407 esac
cd0fc7c3 14408fi
c906108c 14409
b4505029
MM
14410# The ser-tcp.c module requires sockets.
14411case ${host} in
14412 *mingw32*)
14413
81ecdfbb 14414$as_echo "#define USE_WIN32API 1" >>confdefs.h
b4505029
MM
14415
14416 WIN32LIBS="$WIN32LIBS -lws2_32"
14417 ;;
14418esac
14419
7a292a7a 14420
31d99776 14421# Add ELF support to GDB, but only if BFD includes ELF support.
def63ff0
TT
14422
14423 OLD_CFLAGS=$CFLAGS
14424 OLD_LDFLAGS=$LDFLAGS
14425 OLD_LIBS=$LIBS
14426 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
14427 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
14428 # always want our bfd.
14429 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
5a2d4533
L
14430 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
14431 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
def63ff0 14432 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
711a72d3 14433 LIBS="-lbfd -liberty -lz $intl $LIBS"
def63ff0 14434 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
81ecdfbb
RW
14435$as_echo_n "checking for ELF support in BFD... " >&6; }
14436if test "${gdb_cv_var_elf+set}" = set; then :
14437 $as_echo_n "(cached) " >&6
31d99776 14438else
81ecdfbb 14439 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31d99776
DJ
14440/* end confdefs.h. */
14441#include <stdlib.h>
def63ff0
TT
14442 #include "bfd.h"
14443 #include "elf-bfd.h"
31d99776
DJ
14444
14445int
14446main ()
14447{
def63ff0 14448return bfd_get_elf_phdr_upper_bound (NULL);
31d99776
DJ
14449 ;
14450 return 0;
14451}
14452_ACEOF
81ecdfbb 14453if ac_fn_c_try_link "$LINENO"; then :
31d99776
DJ
14454 gdb_cv_var_elf=yes
14455else
81ecdfbb 14456 gdb_cv_var_elf=no
31d99776 14457fi
81ecdfbb
RW
14458rm -f core conftest.err conftest.$ac_objext \
14459 conftest$ac_exeext conftest.$ac_ext
31d99776 14460fi
81ecdfbb
RW
14461{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
14462$as_echo "$gdb_cv_var_elf" >&6; }
def63ff0
TT
14463 CFLAGS=$OLD_CFLAGS
14464 LDFLAGS=$OLD_LDFLAGS
14465 LIBS=$OLD_LIBS
31d99776 14466if test $gdb_cv_var_elf = yes; then
d4777acb 14467 CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o dtrace-probe.o"
31d99776 14468
81ecdfbb 14469$as_echo "#define HAVE_ELF 1" >>confdefs.h
31d99776 14470
075ff26d
JK
14471 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
14472 if test "$plugins" = "yes"; then
a48b32c0
L
14473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
14474$as_echo_n "checking for library containing dlopen... " >&6; }
14475if test "${ac_cv_search_dlopen+set}" = set; then :
14476 $as_echo_n "(cached) " >&6
14477else
14478 ac_func_search_save_LIBS=$LIBS
14479cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14480/* end confdefs.h. */
14481
14482/* Override any GCC internal prototype to avoid an error.
14483 Use char because int might match the return type of a GCC
14484 builtin and then its argument prototype would still apply. */
14485#ifdef __cplusplus
14486extern "C"
14487#endif
14488char dlopen ();
14489int
14490main ()
14491{
14492return dlopen ();
14493 ;
14494 return 0;
14495}
14496_ACEOF
14497for ac_lib in '' dl; do
14498 if test -z "$ac_lib"; then
14499 ac_res="none required"
14500 else
14501 ac_res=-l$ac_lib
14502 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
14503 fi
14504 if ac_fn_c_try_link "$LINENO"; then :
14505 ac_cv_search_dlopen=$ac_res
14506fi
14507rm -f core conftest.err conftest.$ac_objext \
14508 conftest$ac_exeext
14509 if test "${ac_cv_search_dlopen+set}" = set; then :
14510 break
14511fi
14512done
14513if test "${ac_cv_search_dlopen+set}" = set; then :
14514
14515else
14516 ac_cv_search_dlopen=no
14517fi
14518rm conftest.$ac_ext
14519LIBS=$ac_func_search_save_LIBS
14520fi
14521{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
14522$as_echo "$ac_cv_search_dlopen" >&6; }
14523ac_res=$ac_cv_search_dlopen
14524if test "$ac_res" != no; then :
14525 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14526
14527fi
14528
075ff26d 14529 fi
31d99776 14530fi
31d99776 14531
4f05add4
TT
14532# Add macho support to GDB, but only if BFD includes it.
14533
14534 OLD_CFLAGS=$CFLAGS
14535 OLD_LDFLAGS=$LDFLAGS
14536 OLD_LIBS=$LIBS
14537 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
14538 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
14539 # always want our bfd.
14540 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
5a2d4533
L
14541 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
14542 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
4f05add4 14543 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
711a72d3 14544 LIBS="-lbfd -liberty -lz $intl $LIBS"
4f05add4
TT
14545 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5
14546$as_echo_n "checking for Mach-O support in BFD... " >&6; }
14547if test "${gdb_cv_var_macho+set}" = set; then :
14548 $as_echo_n "(cached) " >&6
14549else
14550 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14551/* end confdefs.h. */
14552#include <stdlib.h>
14553 #include "bfd.h"
14554 #include "mach-o.h"
14555
14556int
14557main ()
14558{
14559return bfd_mach_o_lookup_command (NULL, 0, NULL);
14560 ;
14561 return 0;
14562}
14563_ACEOF
14564if ac_fn_c_try_link "$LINENO"; then :
14565 gdb_cv_var_macho=yes
14566else
14567 gdb_cv_var_macho=no
14568fi
14569rm -f core conftest.err conftest.$ac_objext \
14570 conftest$ac_exeext conftest.$ac_ext
14571fi
14572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5
14573$as_echo "$gdb_cv_var_macho" >&6; }
14574 CFLAGS=$OLD_CFLAGS
14575 LDFLAGS=$OLD_LDFLAGS
14576 LIBS=$OLD_LIBS
14577if test $gdb_cv_var_macho = yes; then
14578 CONFIG_OBS="$CONFIG_OBS machoread.o"
14579fi
14580
121ce6e5
DJ
14581# Add any host-specific objects to GDB.
14582CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
14583
608e2dbb
TT
14584# If building on ELF, look for lzma support for embedded compressed debug info.
14585if test $gdb_cv_var_elf = yes; then
14586
14587# Check whether --with-lzma was given.
14588if test "${with_lzma+set}" = set; then :
14589 withval=$with_lzma;
14590else
14591 with_lzma=auto
14592fi
14593
14594 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5
14595$as_echo_n "checking whether to use lzma... " >&6; }
14596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5
14597$as_echo "$with_lzma" >&6; }
14598
14599 if test "${with_lzma}" != no; then
14600
14601
14602
14603
14604
14605
14606
14607
14608 use_additional=yes
14609
14610 acl_save_prefix="$prefix"
14611 prefix="$acl_final_prefix"
14612 acl_save_exec_prefix="$exec_prefix"
14613 exec_prefix="$acl_final_exec_prefix"
14614
14615 eval additional_includedir=\"$includedir\"
14616 eval additional_libdir=\"$libdir\"
14617
14618 exec_prefix="$acl_save_exec_prefix"
14619 prefix="$acl_save_prefix"
14620
14621
14622# Check whether --with-liblzma-prefix was given.
14623if test "${with_liblzma_prefix+set}" = set; then :
14624 withval=$with_liblzma_prefix;
14625 if test "X$withval" = "Xno"; then
14626 use_additional=no
14627 else
14628 if test "X$withval" = "X"; then
14629
14630 acl_save_prefix="$prefix"
14631 prefix="$acl_final_prefix"
14632 acl_save_exec_prefix="$exec_prefix"
14633 exec_prefix="$acl_final_exec_prefix"
14634
14635 eval additional_includedir=\"$includedir\"
14636 eval additional_libdir=\"$libdir\"
14637
14638 exec_prefix="$acl_save_exec_prefix"
14639 prefix="$acl_save_prefix"
14640
14641 else
14642 additional_includedir="$withval/include"
14643 additional_libdir="$withval/lib"
14644 fi
14645 fi
14646
14647fi
14648
14649 LIBLZMA=
14650 LTLIBLZMA=
14651 INCLZMA=
14652 rpathdirs=
14653 ltrpathdirs=
14654 names_already_handled=
14655 names_next_round='lzma '
14656 while test -n "$names_next_round"; do
14657 names_this_round="$names_next_round"
14658 names_next_round=
14659 for name in $names_this_round; do
14660 already_handled=
14661 for n in $names_already_handled; do
14662 if test "$n" = "$name"; then
14663 already_handled=yes
14664 break
14665 fi
14666 done
14667 if test -z "$already_handled"; then
14668 names_already_handled="$names_already_handled $name"
14669 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
14670 eval value=\"\$HAVE_LIB$uppername\"
14671 if test -n "$value"; then
14672 if test "$value" = yes; then
14673 eval value=\"\$LIB$uppername\"
14674 test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value"
14675 eval value=\"\$LTLIB$uppername\"
14676 test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value"
14677 else
14678 :
14679 fi
14680 else
14681 found_dir=
14682 found_la=
14683 found_so=
14684 found_a=
14685 if test $use_additional = yes; then
14686 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
14687 found_dir="$additional_libdir"
14688 found_so="$additional_libdir/lib$name.$shlibext"
14689 if test -f "$additional_libdir/lib$name.la"; then
14690 found_la="$additional_libdir/lib$name.la"
14691 fi
14692 else
14693 if test -f "$additional_libdir/lib$name.$libext"; then
14694 found_dir="$additional_libdir"
14695 found_a="$additional_libdir/lib$name.$libext"
14696 if test -f "$additional_libdir/lib$name.la"; then
14697 found_la="$additional_libdir/lib$name.la"
14698 fi
14699 fi
14700 fi
14701 fi
14702 if test "X$found_dir" = "X"; then
14703 for x in $LDFLAGS $LTLIBLZMA; do
14704
14705 acl_save_prefix="$prefix"
14706 prefix="$acl_final_prefix"
14707 acl_save_exec_prefix="$exec_prefix"
14708 exec_prefix="$acl_final_exec_prefix"
14709 eval x=\"$x\"
14710 exec_prefix="$acl_save_exec_prefix"
14711 prefix="$acl_save_prefix"
14712
14713 case "$x" in
14714 -L*)
14715 dir=`echo "X$x" | sed -e 's/^X-L//'`
14716 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
14717 found_dir="$dir"
14718 found_so="$dir/lib$name.$shlibext"
14719 if test -f "$dir/lib$name.la"; then
14720 found_la="$dir/lib$name.la"
14721 fi
14722 else
14723 if test -f "$dir/lib$name.$libext"; then
14724 found_dir="$dir"
14725 found_a="$dir/lib$name.$libext"
14726 if test -f "$dir/lib$name.la"; then
14727 found_la="$dir/lib$name.la"
14728 fi
14729 fi
14730 fi
14731 ;;
14732 esac
14733 if test "X$found_dir" != "X"; then
14734 break
14735 fi
14736 done
14737 fi
14738 if test "X$found_dir" != "X"; then
14739 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name"
14740 if test "X$found_so" != "X"; then
14741 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
14742 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
14743 else
14744 haveit=
14745 for x in $ltrpathdirs; do
14746 if test "X$x" = "X$found_dir"; then
14747 haveit=yes
14748 break
14749 fi
14750 done
14751 if test -z "$haveit"; then
14752 ltrpathdirs="$ltrpathdirs $found_dir"
14753 fi
14754 if test "$hardcode_direct" = yes; then
14755 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
14756 else
14757 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
14758 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
14759 haveit=
14760 for x in $rpathdirs; do
14761 if test "X$x" = "X$found_dir"; then
14762 haveit=yes
14763 break
14764 fi
14765 done
14766 if test -z "$haveit"; then
14767 rpathdirs="$rpathdirs $found_dir"
14768 fi
14769 else
14770 haveit=
14771 for x in $LDFLAGS $LIBLZMA; do
14772
14773 acl_save_prefix="$prefix"
14774 prefix="$acl_final_prefix"
14775 acl_save_exec_prefix="$exec_prefix"
14776 exec_prefix="$acl_final_exec_prefix"
14777 eval x=\"$x\"
14778 exec_prefix="$acl_save_exec_prefix"
14779 prefix="$acl_save_prefix"
14780
14781 if test "X$x" = "X-L$found_dir"; then
14782 haveit=yes
14783 break
14784 fi
14785 done
14786 if test -z "$haveit"; then
14787 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir"
14788 fi
14789 if test "$hardcode_minus_L" != no; then
14790 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
14791 else
14792 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
14793 fi
14794 fi
14795 fi
14796 fi
14797 else
14798 if test "X$found_a" != "X"; then
14799 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a"
14800 else
14801 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name"
14802 fi
14803 fi
14804 additional_includedir=
14805 case "$found_dir" in
14806 */lib | */lib/)
14807 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
14808 additional_includedir="$basedir/include"
14809 ;;
14810 esac
14811 if test "X$additional_includedir" != "X"; then
14812 if test "X$additional_includedir" != "X/usr/include"; then
14813 haveit=
14814 if test "X$additional_includedir" = "X/usr/local/include"; then
14815 if test -n "$GCC"; then
14816 case $host_os in
14817 linux*) haveit=yes;;
14818 esac
14819 fi
14820 fi
14821 if test -z "$haveit"; then
14822 for x in $CPPFLAGS $INCLZMA; do
14823
14824 acl_save_prefix="$prefix"
14825 prefix="$acl_final_prefix"
14826 acl_save_exec_prefix="$exec_prefix"
14827 exec_prefix="$acl_final_exec_prefix"
14828 eval x=\"$x\"
14829 exec_prefix="$acl_save_exec_prefix"
14830 prefix="$acl_save_prefix"
14831
14832 if test "X$x" = "X-I$additional_includedir"; then
14833 haveit=yes
14834 break
14835 fi
14836 done
14837 if test -z "$haveit"; then
14838 if test -d "$additional_includedir"; then
14839 INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir"
14840 fi
14841 fi
14842 fi
14843 fi
14844 fi
14845 if test -n "$found_la"; then
14846 save_libdir="$libdir"
14847 case "$found_la" in
14848 */* | *\\*) . "$found_la" ;;
14849 *) . "./$found_la" ;;
14850 esac
14851 libdir="$save_libdir"
14852 for dep in $dependency_libs; do
14853 case "$dep" in
14854 -L*)
14855 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
14856 if test "X$additional_libdir" != "X/usr/lib"; then
14857 haveit=
14858 if test "X$additional_libdir" = "X/usr/local/lib"; then
14859 if test -n "$GCC"; then
14860 case $host_os in
14861 linux*) haveit=yes;;
14862 esac
14863 fi
14864 fi
14865 if test -z "$haveit"; then
14866 haveit=
14867 for x in $LDFLAGS $LIBLZMA; do
14868
14869 acl_save_prefix="$prefix"
14870 prefix="$acl_final_prefix"
14871 acl_save_exec_prefix="$exec_prefix"
14872 exec_prefix="$acl_final_exec_prefix"
14873 eval x=\"$x\"
14874 exec_prefix="$acl_save_exec_prefix"
14875 prefix="$acl_save_prefix"
14876
14877 if test "X$x" = "X-L$additional_libdir"; then
14878 haveit=yes
14879 break
14880 fi
14881 done
14882 if test -z "$haveit"; then
14883 if test -d "$additional_libdir"; then
14884 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir"
14885 fi
14886 fi
14887 haveit=
14888 for x in $LDFLAGS $LTLIBLZMA; do
14889
14890 acl_save_prefix="$prefix"
14891 prefix="$acl_final_prefix"
14892 acl_save_exec_prefix="$exec_prefix"
14893 exec_prefix="$acl_final_exec_prefix"
14894 eval x=\"$x\"
14895 exec_prefix="$acl_save_exec_prefix"
14896 prefix="$acl_save_prefix"
14897
14898 if test "X$x" = "X-L$additional_libdir"; then
14899 haveit=yes
14900 break
14901 fi
14902 done
14903 if test -z "$haveit"; then
14904 if test -d "$additional_libdir"; then
14905 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir"
14906 fi
14907 fi
14908 fi
14909 fi
14910 ;;
14911 -R*)
14912 dir=`echo "X$dep" | sed -e 's/^X-R//'`
14913 if test "$enable_rpath" != no; then
14914 haveit=
14915 for x in $rpathdirs; do
14916 if test "X$x" = "X$dir"; then
14917 haveit=yes
14918 break
14919 fi
14920 done
14921 if test -z "$haveit"; then
14922 rpathdirs="$rpathdirs $dir"
14923 fi
14924 haveit=
14925 for x in $ltrpathdirs; do
14926 if test "X$x" = "X$dir"; then
14927 haveit=yes
14928 break
14929 fi
14930 done
14931 if test -z "$haveit"; then
14932 ltrpathdirs="$ltrpathdirs $dir"
14933 fi
14934 fi
14935 ;;
14936 -l*)
14937 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
14938 ;;
14939 *.la)
14940 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
14941 ;;
14942 *)
14943 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep"
14944 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep"
14945 ;;
14946 esac
14947 done
14948 fi
14949 else
14950 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
14951 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name"
14952 fi
14953 fi
14954 fi
14955 done
14956 done
14957 if test "X$rpathdirs" != "X"; then
14958 if test -n "$hardcode_libdir_separator"; then
14959 alldirs=
14960 for found_dir in $rpathdirs; do
14961 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
14962 done
14963 acl_save_libdir="$libdir"
14964 libdir="$alldirs"
14965 eval flag=\"$hardcode_libdir_flag_spec\"
14966 libdir="$acl_save_libdir"
14967 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
14968 else
14969 for found_dir in $rpathdirs; do
14970 acl_save_libdir="$libdir"
14971 libdir="$found_dir"
14972 eval flag=\"$hardcode_libdir_flag_spec\"
14973 libdir="$acl_save_libdir"
14974 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
14975 done
14976 fi
14977 fi
14978 if test "X$ltrpathdirs" != "X"; then
14979 for found_dir in $ltrpathdirs; do
14980 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir"
14981 done
14982 fi
14983
14984
14985 ac_save_CPPFLAGS="$CPPFLAGS"
14986
14987 for element in $INCLZMA; do
14988 haveit=
14989 for x in $CPPFLAGS; do
14990
14991 acl_save_prefix="$prefix"
14992 prefix="$acl_final_prefix"
14993 acl_save_exec_prefix="$exec_prefix"
14994 exec_prefix="$acl_final_exec_prefix"
14995 eval x=\"$x\"
14996 exec_prefix="$acl_save_exec_prefix"
14997 prefix="$acl_save_prefix"
14998
14999 if test "X$x" = "X$element"; then
15000 haveit=yes
15001 break
15002 fi
15003 done
15004 if test -z "$haveit"; then
15005 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
15006 fi
15007 done
15008
15009
15010 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5
15011$as_echo_n "checking for liblzma... " >&6; }
15012if test "${ac_cv_liblzma+set}" = set; then :
15013 $as_echo_n "(cached) " >&6
15014else
15015
15016 ac_save_LIBS="$LIBS"
15017 LIBS="$LIBS $LIBLZMA"
15018 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15019/* end confdefs.h. */
15020#include "lzma.h"
15021int
15022main ()
15023{
15024lzma_index_iter iter;
15025 lzma_index_iter_init (&iter, 0);
15026 lzma_mf_is_supported (LZMA_MF_HC3);
15027 ;
15028 return 0;
15029}
15030_ACEOF
15031if ac_fn_c_try_link "$LINENO"; then :
15032 ac_cv_liblzma=yes
15033else
15034 ac_cv_liblzma=no
15035fi
15036rm -f core conftest.err conftest.$ac_objext \
15037 conftest$ac_exeext conftest.$ac_ext
15038 LIBS="$ac_save_LIBS"
15039
15040fi
15041{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5
15042$as_echo "$ac_cv_liblzma" >&6; }
15043 if test "$ac_cv_liblzma" = yes; then
15044 HAVE_LIBLZMA=yes
15045
15046$as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h
15047
15048 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5
15049$as_echo_n "checking how to link with liblzma... " >&6; }
15050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5
15051$as_echo "$LIBLZMA" >&6; }
15052 else
15053 HAVE_LIBLZMA=no
15054 CPPFLAGS="$ac_save_CPPFLAGS"
15055 LIBLZMA=
15056 LTLIBLZMA=
15057 fi
15058
15059
15060
15061
15062
15063
15064 if test "$HAVE_LIBLZMA" != yes; then
15065 if test "$with_lzma" = yes; then
15066 as_fn_error "missing liblzma for --with-lzma" "$LINENO" 5
15067 fi
15068 fi
15069 fi
15070fi
15071
3fc11d3e
JM
15072LIBGUI="../libgui/src/libgui.a"
15073GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
15074
15075
7a292a7a 15076
3fc11d3e
JM
15077WIN32LDAPP=
15078
15079
15080
d91670b9 15081case "${host}" in
686a5eed 15082*-*-cygwin* | *-*-mingw* )
d91670b9
CV
15083 configdir="win"
15084 ;;
15085*)
15086 configdir="unix"
15087 ;;
15088esac
3fc11d3e
JM
15089
15090GDBTKLIBS=
15091if test "${enable_gdbtk}" = "yes"; then
15092
d1c3b63a
KS
15093 # Gdbtk must have an absolute path to srcdir in order to run
15094 # properly when not installed.
15095 here=`pwd`
15096 cd ${srcdir}
15097 GDBTK_SRC_DIR=`pwd`
15098 cd $here
15099
bec39cab 15100
5062cc19
KS
15101 #
15102 # Ok, lets find the tcl configuration
15103 # First, look for one uninstalled.
15104 # the alternative search directory is invoked by --with-tcl
15105 #
3fc11d3e 15106
5062cc19
KS
15107 if test x"${no_tcl}" = x ; then
15108 # we reset no_tcl in case something fails here
15109 no_tcl=true
bec39cab 15110
81ecdfbb
RW
15111# Check whether --with-tcl was given.
15112if test "${with_tcl+set}" = set; then :
15113 withval=$with_tcl; with_tclconfig=${withval}
15114fi
15115
15116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
15117$as_echo_n "checking for Tcl configuration... " >&6; }
15118 if test "${ac_cv_c_tclconfig+set}" = set; then :
15119 $as_echo_n "(cached) " >&6
3fc11d3e 15120else
bec39cab 15121
3fc11d3e 15122
5062cc19
KS
15123 # First check to see if --with-tcl was specified.
15124 case "${host}" in
15125 *-*-cygwin*) platDir="win" ;;
15126 *) platDir="unix" ;;
15127 esac
15128 if test x"${with_tclconfig}" != x ; then
15129 if test -f "${with_tclconfig}/tclConfig.sh" ; then
15130 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
15131 else
81ecdfbb 15132 as_fn_error "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
5062cc19
KS
15133 fi
15134 fi
15135
15136 # then check for a private Tcl installation
15137 if test x"${ac_cv_c_tclconfig}" = x ; then
15138 for i in \
15139 ../tcl \
15140 `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
15141 `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
15142 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
15143 ../../tcl \
15144 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
15145 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
15146 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
15147 ../../../tcl \
15148 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
15149 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
15150 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
15151 if test -f "$i/$platDir/tclConfig.sh" ; then
15152 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
15153 break
15154 fi
15155 done
15156 fi
15157
15158 # on Darwin, check in Framework installation locations
15159 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
15160 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
15161 `ls -d /Library/Frameworks 2>/dev/null` \
15162 `ls -d /Network/Library/Frameworks 2>/dev/null` \
15163 `ls -d /System/Library/Frameworks 2>/dev/null` \
15164 ; do
15165 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
15166 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
15167 break
15168 fi
15169 done
15170 fi
15171
15172 # check in a few common install locations
15173 if test x"${ac_cv_c_tclconfig}" = x ; then
15174 for i in `ls -d ${libdir} 2>/dev/null` \
15175 `ls -d ${exec_prefix}/lib 2>/dev/null` \
15176 `ls -d ${prefix}/lib 2>/dev/null` \
15177 `ls -d /usr/local/lib 2>/dev/null` \
15178 `ls -d /usr/contrib/lib 2>/dev/null` \
15179 `ls -d /usr/lib 2>/dev/null` \
15180 ; do
15181 if test -f "$i/tclConfig.sh" ; then
15182 ac_cv_c_tclconfig=`(cd $i; pwd)`
15183 break
15184 fi
15185 done
15186 fi
3fc11d3e 15187
5062cc19
KS
15188 # check in a few other private locations
15189 if test x"${ac_cv_c_tclconfig}" = x ; then
15190 for i in \
15191 ${srcdir}/../tcl \
15192 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
15193 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
15194 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
15195 if test -f "$i/$platDir/tclConfig.sh" ; then
15196 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
15197 break
15198 fi
15199 done
15200 fi
bec39cab 15201
3fc11d3e
JM
15202fi
15203
5062cc19
KS
15204
15205 if test x"${ac_cv_c_tclconfig}" = x ; then
15206 TCL_BIN_DIR="# no Tcl configs found"
81ecdfbb
RW
15207 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
15208$as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
5062cc19
KS
15209 else
15210 no_tcl=
15211 TCL_BIN_DIR=${ac_cv_c_tclconfig}
81ecdfbb
RW
15212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
15213$as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
5062cc19
KS
15214 fi
15215 fi
3fc11d3e 15216
bec39cab 15217
85541719
DE
15218 # If $no_tk is nonempty, then we can't do Tk, and there is no
15219 # point to doing Tcl.
bec39cab 15220
5062cc19
KS
15221 #
15222 # Ok, lets find the tk configuration
15223 # First, look for one uninstalled.
15224 # the alternative search directory is invoked by --with-tk
15225 #
3fc11d3e 15226
5062cc19
KS
15227 if test x"${no_tk}" = x ; then
15228 # we reset no_tk in case something fails here
15229 no_tk=true
bec39cab 15230
81ecdfbb
RW
15231# Check whether --with-tk was given.
15232if test "${with_tk+set}" = set; then :
15233 withval=$with_tk; with_tkconfig=${withval}
15234fi
15235
15236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
15237$as_echo_n "checking for Tk configuration... " >&6; }
15238 if test "${ac_cv_c_tkconfig+set}" = set; then :
15239 $as_echo_n "(cached) " >&6
bec39cab 15240else
3fc11d3e
JM
15241
15242
5062cc19
KS
15243 # First check to see if --with-tkconfig was specified.
15244 if test x"${with_tkconfig}" != x ; then
15245 if test -f "${with_tkconfig}/tkConfig.sh" ; then
15246 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
15247 else
81ecdfbb 15248 as_fn_error "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
5062cc19
KS
15249 fi
15250 fi
3fc11d3e 15251
5062cc19
KS
15252 # then check for a private Tk library
15253 case "${host}" in
15254 *-*-cygwin*) platDir="win" ;;
15255 *) platDir="unix" ;;
15256 esac
15257 if test x"${ac_cv_c_tkconfig}" = x ; then
15258 for i in \
15259 ../tk \
15260 `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
15261 `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
15262 `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
15263 ../../tk \
15264 `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
15265 `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
15266 `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
15267 ../../../tk \
15268 `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
15269 `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
15270 `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
15271 if test -f "$i/$platDir/tkConfig.sh" ; then
15272 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
15273 break
15274 fi
15275 done
15276 fi
15277
15278 # on Darwin, check in Framework installation locations
15279 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
15280 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
15281 `ls -d /Library/Frameworks 2>/dev/null` \
15282 `ls -d /Network/Library/Frameworks 2>/dev/null` \
15283 `ls -d /System/Library/Frameworks 2>/dev/null` \
15284 ; do
15285 if test -f "$i/Tk.framework/tkConfig.sh" ; then
15286 ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
15287 break
15288 fi
15289 done
15290 fi
15291
15292 # check in a few common install locations
15293 if test x"${ac_cv_c_tkconfig}" = x ; then
15294 for i in `ls -d ${libdir} 2>/dev/null` \
15295 `ls -d ${exec_prefix}/lib 2>/dev/null` \
15296 `ls -d ${prefix}/lib 2>/dev/null` \
15297 `ls -d /usr/local/lib 2>/dev/null` \
15298 `ls -d /usr/contrib/lib 2>/dev/null` \
15299 `ls -d /usr/lib 2>/dev/null` \
15300 ; do
15301 if test -f "$i/tkConfig.sh" ; then
15302 ac_cv_c_tkconfig=`(cd $i; pwd)`
15303 break
15304 fi
15305 done
15306 fi
15307 # check in a few other private locations
15308 if test x"${ac_cv_c_tkconfig}" = x ; then
15309 for i in \
15310 ${srcdir}/../tk \
15311 `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
15312 `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
15313 `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
15314 if test -f "$i/$platDir/tkConfig.sh" ; then
15315 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
15316 break
15317 fi
15318 done
15319 fi
3fc11d3e 15320
3fc11d3e
JM
15321fi
15322
15323
5062cc19
KS
15324 if test x"${ac_cv_c_tkconfig}" = x ; then
15325 TK_BIN_DIR="# no Tk configs found"
81ecdfbb
RW
15326 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
15327$as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
5062cc19
KS
15328 else
15329 no_tk=
15330 TK_BIN_DIR=${ac_cv_c_tkconfig}
81ecdfbb
RW
15331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
15332$as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
5062cc19 15333 fi
3fc11d3e 15334 fi
dd2504ab 15335
dd2504ab 15336
85541719
DE
15337 if test -z "${no_tcl}" -a -z "${no_tk}"; then
15338
81ecdfbb
RW
15339 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
15340$as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
85541719
DE
15341
15342 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
81ecdfbb
RW
15343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
15344$as_echo "loading" >&6; }
85541719
DE
15345 . ${TCL_BIN_DIR}/tclConfig.sh
15346 else
81ecdfbb
RW
15347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
15348$as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
85541719
DE
15349 fi
15350
15351 # eval is required to do the TCL_DBGX substitution
15352 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
15353 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
15354
15355 # If the TCL_BIN_DIR is the build directory (not the install directory),
15356 # then set the common variable name to the value of the build variables.
15357 # For example, the variable TCL_LIB_SPEC will be set to the value
15358 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
15359 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
15360 # installed and uninstalled version of Tcl.
15361 if test -f "${TCL_BIN_DIR}/Makefile" ; then
15362 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
15363 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
15364 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
15365 elif test "`uname -s`" = "Darwin"; then
15366 # If Tcl was built as a framework, attempt to use the libraries
15367 # from the framework at the given location so that linking works
a68ffae9 15368 # against Tcl.framework installed in an arbitrary location.
85541719
DE
15369 case ${TCL_DEFS} in
15370 *TCL_FRAMEWORK*)
15371 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
15372 for i in "`cd ${TCL_BIN_DIR}; pwd`" \
15373 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
15374 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
15375 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
15376 break
15377 fi
15378 done
15379 fi
15380 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
15381 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
15382 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
15383 fi
15384 ;;
15385 esac
15386 fi
15387
15388 # eval is required to do the TCL_DBGX substitution
15389 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
15390 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
15391 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
15392 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
15393
15394
15395
15396
15397
15398
15399
15400
15401
15402
15403
15404
15405
15406
15407
15408 # Check for in-tree tcl
15409 here=`pwd`
15410 cd ${srcdir}/..
15411 topdir=`pwd`
15412 cd ${here}
15413
15414 intree="no"
15415 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
15416 intree="yes"
15417 fi
15418
15419 # Find Tcl private headers
15420 if test x"${intree}" = xno; then
15421
81ecdfbb
RW
15422 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
15423$as_echo_n "checking for Tcl private headers... " >&6; }
85541719
DE
15424 private_dir=""
15425 dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
15426 if test -f ${dir}/tclInt.h ; then
15427 private_dir=${dir}
15428 fi
15429
15430 if test x"${private_dir}" = x; then
81ecdfbb 15431 as_fn_error "could not find private Tcl headers" "$LINENO" 5
85541719
DE
15432 else
15433 TCL_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
15434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
15435$as_echo "${private_dir}" >&6; }
85541719
DE
15436 fi
15437
15438 TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
15439 TCL_LIBRARY="${TCL_LIB_SPEC}"
15440 TCL_DEPS=""
15441 else
15442 # If building tcl in the same src tree, private headers
15443 # are not needed, but we need to be sure to use the right
15444 # headers library
15445 TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
15446 TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
15447 TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
15448 fi
15449
15450
15451
15452
15453
81ecdfbb
RW
15454 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
15455$as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
dd2504ab 15456
5062cc19 15457 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
81ecdfbb
RW
15458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
15459$as_echo "loading" >&6; }
5062cc19 15460 . ${TK_BIN_DIR}/tkConfig.sh
3fc11d3e 15461 else
81ecdfbb
RW
15462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
15463$as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
3fc11d3e 15464 fi
bec39cab 15465
5062cc19
KS
15466 # eval is required to do the TK_DBGX substitution
15467 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
15468 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
15469
15470 # If the TK_BIN_DIR is the build directory (not the install directory),
15471 # then set the common variable name to the value of the build variables.
15472 # For example, the variable TK_LIB_SPEC will be set to the value
15473 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
15474 # instead of TK_BUILD_LIB_SPEC since it will work with both an
15475 # installed and uninstalled version of Tcl.
85541719 15476 if test -f "${TK_BIN_DIR}/Makefile" ; then
5062cc19
KS
15477 TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
15478 TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
15479 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
15480 elif test "`uname -s`" = "Darwin"; then
15481 # If Tk was built as a framework, attempt to use the libraries
15482 # from the framework at the given location so that linking works
a68ffae9 15483 # against Tk.framework installed in an arbitrary location.
5062cc19
KS
15484 case ${TK_DEFS} in
15485 *TK_FRAMEWORK*)
85541719 15486 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
5062cc19
KS
15487 for i in "`cd ${TK_BIN_DIR}; pwd`" \
15488 "`cd ${TK_BIN_DIR}/../..; pwd`"; do
15489 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
15490 TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
15491 break
15492 fi
15493 done
15494 fi
85541719 15495 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
5062cc19
KS
15496 TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
15497 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
15498 fi
15499 ;;
15500 esac
3fc11d3e
JM
15501 fi
15502
5062cc19
KS
15503 # eval is required to do the TK_DBGX substitution
15504 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
15505 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
15506 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
15507 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
3fc11d3e 15508
3fc11d3e
JM
15509
15510
bec39cab
AC
15511
15512
15513
15514
15515
15516
15517
3fc11d3e 15518
3fc11d3e 15519
bec39cab 15520
bec39cab 15521
85541719
DE
15522 # Check for in-tree Tk
15523 intree="no"
15524 if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
15525 intree="yes"
15526 fi
3fc11d3e 15527
85541719
DE
15528 # Find Tk private headers
15529 if test x"${intree}" = xno; then
3fc11d3e 15530
81ecdfbb
RW
15531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
15532$as_echo_n "checking for Tk private headers... " >&6; }
5062cc19
KS
15533 private_dir=""
15534 dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
15535 if test -f ${dir}/tkInt.h; then
15536 private_dir=${dir}
3fc11d3e 15537 fi
bec39cab 15538
5062cc19 15539 if test x"${private_dir}" = x; then
81ecdfbb 15540 as_fn_error "could not find Tk private headers" "$LINENO" 5
3fc11d3e 15541 else
5062cc19 15542 TK_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
15543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
15544$as_echo "${private_dir}" >&6; }
3fc11d3e 15545 fi
3fc11d3e 15546
85541719
DE
15547 TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
15548 TK_LIBRARY=${TK_LIB_SPEC}
15549 TK_DEPS=""
15550 else
15551 TK_INCLUDE="-I${TK_SRC_DIR}/generic"
15552 TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
15553 TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
15554 fi
3fc11d3e
JM
15555
15556
3fc11d3e
JM
15557
15558
3fc11d3e 15559
85541719 15560 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e 15561
85541719
DE
15562 # Include some libraries that Tcl and Tk want.
15563 TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
15564 # Yes, the ordering seems wrong here. But it isn't.
15565 # TK_LIBS is the list of libraries that need to be linked
15566 # after Tcl/Tk. Note that this isn't put into LIBS. If it
15567 # were in LIBS then any link tests after this point would
15568 # try to include things like `$(LIBGUI)', which wouldn't work.
15569 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5 15570
85541719
DE
15571 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
15572 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
15573 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
15574 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
15575 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
15576 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
15577 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
3fc11d3e 15578
85541719
DE
15579 if test x$gdb_cv_os_cygwin = xyes; then
15580 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
15581 WIN32LDAPP="-Wl,--subsystem,console"
15582 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
3fc11d3e 15583 fi
ffc6a242 15584
81ecdfbb 15585 subdirs="$subdirs gdbtk"
3ace7edb 15586
85541719 15587 fi
3fc11d3e
JM
15588fi
15589
15590
15591
15592
15593
15594
15595
15596
81ecdfbb
RW
15597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
15598$as_echo_n "checking for X... " >&6; }
bec39cab 15599
c906108c 15600
81ecdfbb
RW
15601# Check whether --with-x was given.
15602if test "${with_x+set}" = set; then :
15603 withval=$with_x;
15604fi
c906108c
SS
15605
15606# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
15607if test "x$with_x" = xno; then
15608 # The user explicitly disabled X.
15609 have_x=disabled
15610else
81ecdfbb
RW
15611 case $x_includes,$x_libraries in #(
15612 *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
15613 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
15614 $as_echo_n "(cached) " >&6
c906108c
SS
15615else
15616 # One or both of the vars are not set, and there is no cached value.
bec39cab 15617ac_x_includes=no ac_x_libraries=no
81ecdfbb 15618rm -f -r conftest.dir
bec39cab
AC
15619if mkdir conftest.dir; then
15620 cd conftest.dir
bec39cab 15621 cat >Imakefile <<'_ACEOF'
81ecdfbb
RW
15622incroot:
15623 @echo incroot='${INCROOT}'
15624usrlibdir:
15625 @echo usrlibdir='${USRLIBDIR}'
15626libdir:
15627 @echo libdir='${LIBDIR}'
15628_ACEOF
15629 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
c906108c 15630 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
81ecdfbb
RW
15631 for ac_var in incroot usrlibdir libdir; do
15632 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
15633 done
c906108c 15634 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
81ecdfbb
RW
15635 for ac_extension in a so sl dylib la dll; do
15636 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
15637 test -f "$ac_im_libdir/libX11.$ac_extension"; then
bec39cab 15638 ac_im_usrlibdir=$ac_im_libdir; break
c906108c
SS
15639 fi
15640 done
15641 # Screen out bogus values from the imake configuration. They are
15642 # bogus both because they are the default anyway, and because
15643 # using them would break gcc on systems where it needs fixed includes.
bec39cab 15644 case $ac_im_incroot in
81ecdfbb 15645 /usr/include) ac_x_includes= ;;
bec39cab 15646 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
c906108c 15647 esac
bec39cab 15648 case $ac_im_usrlibdir in
81ecdfbb 15649 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
bec39cab 15650 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
c906108c
SS
15651 esac
15652 fi
15653 cd ..
81ecdfbb 15654 rm -f -r conftest.dir
c906108c
SS
15655fi
15656
bec39cab
AC
15657# Standard set of common directories for X headers.
15658# Check X11 before X11Rn because it is often a symlink to the current release.
15659ac_x_header_dirs='
15660/usr/X11/include
81ecdfbb 15661/usr/X11R7/include
bec39cab
AC
15662/usr/X11R6/include
15663/usr/X11R5/include
15664/usr/X11R4/include
15665
15666/usr/include/X11
81ecdfbb 15667/usr/include/X11R7
bec39cab
AC
15668/usr/include/X11R6
15669/usr/include/X11R5
15670/usr/include/X11R4
15671
15672/usr/local/X11/include
81ecdfbb 15673/usr/local/X11R7/include
bec39cab
AC
15674/usr/local/X11R6/include
15675/usr/local/X11R5/include
15676/usr/local/X11R4/include
15677
15678/usr/local/include/X11
81ecdfbb 15679/usr/local/include/X11R7
bec39cab
AC
15680/usr/local/include/X11R6
15681/usr/local/include/X11R5
15682/usr/local/include/X11R4
15683
15684/usr/X386/include
15685/usr/x386/include
15686/usr/XFree86/include/X11
15687
15688/usr/include
15689/usr/local/include
15690/usr/unsupported/include
15691/usr/athena/include
15692/usr/local/x11r5/include
15693/usr/lpp/Xamples/include
15694
15695/usr/openwin/include
15696/usr/openwin/share/include'
15697
15698if test "$ac_x_includes" = no; then
81ecdfbb 15699 # Guess where to find include files, by looking for Xlib.h.
c906108c 15700 # First, try using that file with no special directory specified.
81ecdfbb 15701 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15702/* end confdefs.h. */
81ecdfbb 15703#include <X11/Xlib.h>
bec39cab 15704_ACEOF
81ecdfbb 15705if ac_fn_c_try_cpp "$LINENO"; then :
c906108c
SS
15706 # We can compile using X headers with no special include directory.
15707ac_x_includes=
15708else
bec39cab 15709 for ac_dir in $ac_x_header_dirs; do
81ecdfbb 15710 if test -r "$ac_dir/X11/Xlib.h"; then
bec39cab
AC
15711 ac_x_includes=$ac_dir
15712 break
15713 fi
15714done
c906108c 15715fi
bec39cab
AC
15716rm -f conftest.err conftest.$ac_ext
15717fi # $ac_x_includes = no
c906108c 15718
bec39cab 15719if test "$ac_x_libraries" = no; then
c906108c 15720 # Check for the libraries.
c906108c
SS
15721 # See if we find them without any special options.
15722 # Don't add to $LIBS permanently.
bec39cab 15723 ac_save_LIBS=$LIBS
81ecdfbb
RW
15724 LIBS="-lX11 $LIBS"
15725 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15726/* end confdefs.h. */
81ecdfbb 15727#include <X11/Xlib.h>
bec39cab
AC
15728int
15729main ()
15730{
81ecdfbb 15731XrmInitialize ()
bec39cab
AC
15732 ;
15733 return 0;
15734}
15735_ACEOF
81ecdfbb 15736if ac_fn_c_try_link "$LINENO"; then :
bec39cab 15737 LIBS=$ac_save_LIBS
c906108c
SS
15738# We can link X programs with no special library path.
15739ac_x_libraries=
15740else
81ecdfbb
RW
15741 LIBS=$ac_save_LIBS
15742for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
c906108c 15743do
bec39cab 15744 # Don't even attempt the hair of trying to link an X program!
81ecdfbb
RW
15745 for ac_extension in a so sl dylib la dll; do
15746 if test -r "$ac_dir/libX11.$ac_extension"; then
c906108c
SS
15747 ac_x_libraries=$ac_dir
15748 break 2
15749 fi
15750 done
15751done
15752fi
81ecdfbb
RW
15753rm -f core conftest.err conftest.$ac_objext \
15754 conftest$ac_exeext conftest.$ac_ext
bec39cab 15755fi # $ac_x_libraries = no
c906108c 15756
81ecdfbb
RW
15757case $ac_x_includes,$ac_x_libraries in #(
15758 no,* | *,no | *\'*)
15759 # Didn't find X, or a directory has "'" in its name.
15760 ac_cv_have_x="have_x=no";; #(
15761 *)
15762 # Record where we found X for the cache.
15763 ac_cv_have_x="have_x=yes\
15764 ac_x_includes='$ac_x_includes'\
15765 ac_x_libraries='$ac_x_libraries'"
15766esac
c906108c 15767fi
81ecdfbb
RW
15768;; #(
15769 *) have_x=yes;;
15770 esac
c906108c
SS
15771 eval "$ac_cv_have_x"
15772fi # $with_x != no
15773
15774if test "$have_x" != yes; then
81ecdfbb
RW
15775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
15776$as_echo "$have_x" >&6; }
c906108c
SS
15777 no_x=yes
15778else
15779 # If each of the values was on the command line, it overrides each guess.
15780 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
15781 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
15782 # Update the cache value to reflect the command line values.
81ecdfbb
RW
15783 ac_cv_have_x="have_x=yes\
15784 ac_x_includes='$x_includes'\
15785 ac_x_libraries='$x_libraries'"
15786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
15787$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
c906108c
SS
15788fi
15789
15790
bec39cab 15791# Unlike the sim directory, whether a simulator is linked is controlled by
9b624dbe 15792# presence of a gdb_sim definition in the target configure.tgt entry.
7a292a7a
SS
15793# This code just checks for a few cases where we'd like to ignore those
15794# definitions, even when they're present in the '.mt' file. These cases
15795# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 15796# not part of the source tree.
7a292a7a 15797#
81ecdfbb
RW
15798# Check whether --enable-sim was given.
15799if test "${enable_sim+set}" = set; then :
15800 enableval=$enable_sim; echo "enable_sim = $enable_sim";
7a292a7a
SS
15801 echo "enableval = ${enableval}";
15802 case "${enableval}" in
15803 yes) ignore_sim=false ;;
15804 no) ignore_sim=true ;;
15805 *) ignore_sim=false ;;
15806 esac
15807else
15808 ignore_sim=false
81ecdfbb
RW
15809fi
15810
7a292a7a
SS
15811
15812if test ! -d "${srcdir}/../sim"; then
15813 ignore_sim=true
15814fi
15815
9b624dbe
UW
15816SIM=
15817SIM_OBS=
15818if test "${ignore_sim}" = "false"; then
15819 if test x"${gdb_sim}" != x ; then
15820 SIM="${gdb_sim}"
15821 SIM_OBS="remote-sim.o"
60ca704f 15822
81ecdfbb 15823$as_echo "#define WITH_SIM 1" >>confdefs.h
7a292a7a 15824
976102cd
PA
15825
15826 # Some tdep code should only be compiled in when the ppc sim is
15827 # built. PR sim/13418.
15828 case $target in
15829 powerpc*-*-*)
15830
15831$as_echo "#define WITH_PPC_SIM 1" >>confdefs.h
15832
15833 ;;
15834 esac
9b624dbe 15835 fi
7a292a7a
SS
15836fi
15837
15838
15839
c906108c
SS
15840
15841
15842
15843
15844
15845
dfcd3bfb 15846
e56ac5c3
AC
15847
15848
b3a90332
AC
15849
15850
c35f4ffc 15851# List of host floatformats.
bec39cab
AC
15852
15853cat >>confdefs.h <<_ACEOF
c35f4ffc 15854#define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
bec39cab 15855_ACEOF
c35f4ffc 15856
bec39cab
AC
15857
15858cat >>confdefs.h <<_ACEOF
c35f4ffc 15859#define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
bec39cab
AC
15860_ACEOF
15861
c35f4ffc 15862
bec39cab 15863cat >>confdefs.h <<_ACEOF
c35f4ffc 15864#define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
bec39cab 15865_ACEOF
c35f4ffc
AC
15866
15867
c906108c
SS
15868# target_subdir is used by the testsuite to find the target libraries.
15869target_subdir=
15870if test "${host}" != "${target}"; then
15871 target_subdir="${target_alias}/"
15872fi
15873
15874
15875frags=
771b4502 15876if test "${gdb_native}" = "yes"; then
0dad8a66
MK
15877 host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
15878 if test ! -f ${host_makefile_frag}; then
81ecdfbb 15879 as_fn_error "\"*** Gdb does not support native target ${host}\"" "$LINENO" 5
0dad8a66
MK
15880 fi
15881 frags="$frags $host_makefile_frag"
15882else
15883 host_makefile_frag=/dev/null
c906108c 15884fi
c906108c 15885
c906108c
SS
15886
15887
15888
771b4502 15889if test "${gdb_native}" = "yes"; then
a85f51e7
DJ
15890# We pick this up from the host configuration file (.mh) because we
15891# do not have a native configuration Makefile fragment.
c906108c
SS
15892nativefile=`sed -n '
15893s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
15894' ${host_makefile_frag}`
c906108c
SS
15895fi
15896
15897
b00a8037 15898if test x"${gdb_osabi}" != x ; then
bec39cab
AC
15899
15900cat >>confdefs.h <<_ACEOF
b00a8037 15901#define GDB_OSABI_DEFAULT $gdb_osabi
bec39cab 15902_ACEOF
b00a8037
DJ
15903
15904fi
15905
8dcde887 15906# Enable multi-ice-gdb-server.
81ecdfbb
RW
15907# Check whether --enable-multi-ice was given.
15908if test "${enable_multi_ice+set}" = set; then :
15909 enableval=$enable_multi_ice; case $enableval in
8dcde887
MK
15910 yes | no)
15911 ;;
81ecdfbb 15912 *) as_fn_error "bad value $enableval for --enable-multi-ice" "$LINENO" 5 ;;
8dcde887 15913 esac
81ecdfbb 15914fi
b4e70030 15915
81ecdfbb
RW
15916if test "x$enable_multi_ice" = xyes; then
15917 subdirs="$subdirs multi-ice"
3ace7edb 15918
a85f51e7
DJ
15919fi
15920
496c0e1b
JB
15921# Check whether --enable-gdbserver was given.
15922if test "${enable_gdbserver+set}" = set; then :
15923 enableval=$enable_gdbserver; case "${enableval}" in
15924 yes| no|auto) ;;
15925 *) as_fn_error "bad value ${enableval} for --enable-gdbserver option" "$LINENO" 5 ;;
15926esac
15927else
15928 enable_gdbserver=auto
15929fi
15930
15931
15932# We only build gdbserver automatically in a native configuration, and
15933# only if the user did not explicitly disable its build.
15934if test "$gdb_native" = "yes" -a "$enable_gdbserver" != "no"; then
81ecdfbb
RW
15935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5
15936$as_echo_n "checking whether gdbserver is supported on this host... " >&6; }
8dcde887 15937 if test "x$build_gdbserver" = xyes; then
81ecdfbb
RW
15938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15939$as_echo "yes" >&6; }
15940 subdirs="$subdirs gdbserver"
3ace7edb 15941
496c0e1b 15942 gdbserver_build_enabled=yes
8dcde887 15943 else
81ecdfbb
RW
15944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15945$as_echo "no" >&6; }
8dcde887
MK
15946 fi
15947fi
15948
496c0e1b
JB
15949# If the user explicitly request the gdbserver to be built, verify that
15950# we were in fact able to enable it.
15951if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then
15952 as_fn_error "Automatic gdbserver build is not supported for this configuration" "$LINENO" 5
15953fi
15954
393fd4c3
YQ
15955# Check for babeltrace and babeltrace-ctf
15956
15957# Check whether --with-babeltrace was given.
15958if test "${with_babeltrace+set}" = set; then :
15959 withval=$with_babeltrace;
15960else
15961 with_babeltrace=auto
15962fi
15963
15964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltrace" >&5
15965$as_echo_n "checking whether to use babeltrace... " >&6; }
15966{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5
15967$as_echo "$with_babeltrace" >&6; }
15968
15969if test "x$with_babeltrace" = "xno"; then
15970 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&5
15971$as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&2;}
15972else
15973 # Append -Werror to CFLAGS so that configure can catch the warning
15974 # "assignment from incompatible pointer type", which is related to
15975 # the babeltrace change from 1.0.3 to 1.1.0. Babeltrace 1.1.0 works
15976 # in GDB, while babeltrace 1.0.3 is broken.
15977 # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be
15978 # safe to save and restore CFLAGS here.
15979 saved_CFLAGS=$CFLAGS
15980 CFLAGS="$CFLAGS -Werror"
15981
15982
15983
15984
15985
15986
15987
15988
15989 use_additional=yes
15990
15991 acl_save_prefix="$prefix"
15992 prefix="$acl_final_prefix"
15993 acl_save_exec_prefix="$exec_prefix"
15994 exec_prefix="$acl_final_exec_prefix"
15995
15996 eval additional_includedir=\"$includedir\"
15997 eval additional_libdir=\"$libdir\"
15998
15999 exec_prefix="$acl_save_exec_prefix"
16000 prefix="$acl_save_prefix"
16001
16002
16003# Check whether --with-libbabeltrace-prefix was given.
16004if test "${with_libbabeltrace_prefix+set}" = set; then :
16005 withval=$with_libbabeltrace_prefix;
16006 if test "X$withval" = "Xno"; then
16007 use_additional=no
16008 else
16009 if test "X$withval" = "X"; then
16010
16011 acl_save_prefix="$prefix"
16012 prefix="$acl_final_prefix"
16013 acl_save_exec_prefix="$exec_prefix"
16014 exec_prefix="$acl_final_exec_prefix"
16015
16016 eval additional_includedir=\"$includedir\"
16017 eval additional_libdir=\"$libdir\"
16018
16019 exec_prefix="$acl_save_exec_prefix"
16020 prefix="$acl_save_prefix"
16021
16022 else
16023 additional_includedir="$withval/include"
16024 additional_libdir="$withval/lib"
16025 fi
16026 fi
16027
16028fi
16029
16030 LIBBABELTRACE=
16031 LTLIBBABELTRACE=
16032 INCBABELTRACE=
16033 rpathdirs=
16034 ltrpathdirs=
16035 names_already_handled=
16036 names_next_round='babeltrace babeltrace-ctf'
16037 while test -n "$names_next_round"; do
16038 names_this_round="$names_next_round"
16039 names_next_round=
16040 for name in $names_this_round; do
16041 already_handled=
16042 for n in $names_already_handled; do
16043 if test "$n" = "$name"; then
16044 already_handled=yes
16045 break
16046 fi
16047 done
16048 if test -z "$already_handled"; then
16049 names_already_handled="$names_already_handled $name"
16050 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
16051 eval value=\"\$HAVE_LIB$uppername\"
16052 if test -n "$value"; then
16053 if test "$value" = yes; then
16054 eval value=\"\$LIB$uppername\"
16055 test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value"
16056 eval value=\"\$LTLIB$uppername\"
16057 test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value"
16058 else
16059 :
16060 fi
16061 else
16062 found_dir=
16063 found_la=
16064 found_so=
16065 found_a=
16066 if test $use_additional = yes; then
16067 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
16068 found_dir="$additional_libdir"
16069 found_so="$additional_libdir/lib$name.$shlibext"
16070 if test -f "$additional_libdir/lib$name.la"; then
16071 found_la="$additional_libdir/lib$name.la"
16072 fi
16073 else
16074 if test -f "$additional_libdir/lib$name.$libext"; then
16075 found_dir="$additional_libdir"
16076 found_a="$additional_libdir/lib$name.$libext"
16077 if test -f "$additional_libdir/lib$name.la"; then
16078 found_la="$additional_libdir/lib$name.la"
16079 fi
16080 fi
16081 fi
16082 fi
16083 if test "X$found_dir" = "X"; then
16084 for x in $LDFLAGS $LTLIBBABELTRACE; do
16085
16086 acl_save_prefix="$prefix"
16087 prefix="$acl_final_prefix"
16088 acl_save_exec_prefix="$exec_prefix"
16089 exec_prefix="$acl_final_exec_prefix"
16090 eval x=\"$x\"
16091 exec_prefix="$acl_save_exec_prefix"
16092 prefix="$acl_save_prefix"
16093
16094 case "$x" in
16095 -L*)
16096 dir=`echo "X$x" | sed -e 's/^X-L//'`
16097 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
16098 found_dir="$dir"
16099 found_so="$dir/lib$name.$shlibext"
16100 if test -f "$dir/lib$name.la"; then
16101 found_la="$dir/lib$name.la"
16102 fi
16103 else
16104 if test -f "$dir/lib$name.$libext"; then
16105 found_dir="$dir"
16106 found_a="$dir/lib$name.$libext"
16107 if test -f "$dir/lib$name.la"; then
16108 found_la="$dir/lib$name.la"
16109 fi
16110 fi
16111 fi
16112 ;;
16113 esac
16114 if test "X$found_dir" != "X"; then
16115 break
16116 fi
16117 done
16118 fi
16119 if test "X$found_dir" != "X"; then
16120 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name"
16121 if test "X$found_so" != "X"; then
16122 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
16123 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
16124 else
16125 haveit=
16126 for x in $ltrpathdirs; do
16127 if test "X$x" = "X$found_dir"; then
16128 haveit=yes
16129 break
16130 fi
16131 done
16132 if test -z "$haveit"; then
16133 ltrpathdirs="$ltrpathdirs $found_dir"
16134 fi
16135 if test "$hardcode_direct" = yes; then
16136 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
16137 else
16138 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
16139 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
16140 haveit=
16141 for x in $rpathdirs; do
16142 if test "X$x" = "X$found_dir"; then
16143 haveit=yes
16144 break
16145 fi
16146 done
16147 if test -z "$haveit"; then
16148 rpathdirs="$rpathdirs $found_dir"
16149 fi
16150 else
16151 haveit=
16152 for x in $LDFLAGS $LIBBABELTRACE; do
16153
16154 acl_save_prefix="$prefix"
16155 prefix="$acl_final_prefix"
16156 acl_save_exec_prefix="$exec_prefix"
16157 exec_prefix="$acl_final_exec_prefix"
16158 eval x=\"$x\"
16159 exec_prefix="$acl_save_exec_prefix"
16160 prefix="$acl_save_prefix"
16161
16162 if test "X$x" = "X-L$found_dir"; then
16163 haveit=yes
16164 break
16165 fi
16166 done
16167 if test -z "$haveit"; then
16168 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir"
16169 fi
16170 if test "$hardcode_minus_L" != no; then
16171 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
16172 else
16173 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
16174 fi
16175 fi
16176 fi
16177 fi
16178 else
16179 if test "X$found_a" != "X"; then
16180 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a"
16181 else
16182 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name"
16183 fi
16184 fi
16185 additional_includedir=
16186 case "$found_dir" in
16187 */lib | */lib/)
16188 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
16189 additional_includedir="$basedir/include"
16190 ;;
16191 esac
16192 if test "X$additional_includedir" != "X"; then
16193 if test "X$additional_includedir" != "X/usr/include"; then
16194 haveit=
16195 if test "X$additional_includedir" = "X/usr/local/include"; then
16196 if test -n "$GCC"; then
16197 case $host_os in
16198 linux*) haveit=yes;;
16199 esac
16200 fi
16201 fi
16202 if test -z "$haveit"; then
16203 for x in $CPPFLAGS $INCBABELTRACE; do
16204
16205 acl_save_prefix="$prefix"
16206 prefix="$acl_final_prefix"
16207 acl_save_exec_prefix="$exec_prefix"
16208 exec_prefix="$acl_final_exec_prefix"
16209 eval x=\"$x\"
16210 exec_prefix="$acl_save_exec_prefix"
16211 prefix="$acl_save_prefix"
16212
16213 if test "X$x" = "X-I$additional_includedir"; then
16214 haveit=yes
16215 break
16216 fi
16217 done
16218 if test -z "$haveit"; then
16219 if test -d "$additional_includedir"; then
16220 INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir"
16221 fi
16222 fi
16223 fi
16224 fi
16225 fi
16226 if test -n "$found_la"; then
16227 save_libdir="$libdir"
16228 case "$found_la" in
16229 */* | *\\*) . "$found_la" ;;
16230 *) . "./$found_la" ;;
16231 esac
16232 libdir="$save_libdir"
16233 for dep in $dependency_libs; do
16234 case "$dep" in
16235 -L*)
16236 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
16237 if test "X$additional_libdir" != "X/usr/lib"; then
16238 haveit=
16239 if test "X$additional_libdir" = "X/usr/local/lib"; then
16240 if test -n "$GCC"; then
16241 case $host_os in
16242 linux*) haveit=yes;;
16243 esac
16244 fi
16245 fi
16246 if test -z "$haveit"; then
16247 haveit=
16248 for x in $LDFLAGS $LIBBABELTRACE; do
16249
16250 acl_save_prefix="$prefix"
16251 prefix="$acl_final_prefix"
16252 acl_save_exec_prefix="$exec_prefix"
16253 exec_prefix="$acl_final_exec_prefix"
16254 eval x=\"$x\"
16255 exec_prefix="$acl_save_exec_prefix"
16256 prefix="$acl_save_prefix"
16257
16258 if test "X$x" = "X-L$additional_libdir"; then
16259 haveit=yes
16260 break
16261 fi
16262 done
16263 if test -z "$haveit"; then
16264 if test -d "$additional_libdir"; then
16265 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir"
16266 fi
16267 fi
16268 haveit=
16269 for x in $LDFLAGS $LTLIBBABELTRACE; do
16270
16271 acl_save_prefix="$prefix"
16272 prefix="$acl_final_prefix"
16273 acl_save_exec_prefix="$exec_prefix"
16274 exec_prefix="$acl_final_exec_prefix"
16275 eval x=\"$x\"
16276 exec_prefix="$acl_save_exec_prefix"
16277 prefix="$acl_save_prefix"
16278
16279 if test "X$x" = "X-L$additional_libdir"; then
16280 haveit=yes
16281 break
16282 fi
16283 done
16284 if test -z "$haveit"; then
16285 if test -d "$additional_libdir"; then
16286 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir"
16287 fi
16288 fi
16289 fi
16290 fi
16291 ;;
16292 -R*)
16293 dir=`echo "X$dep" | sed -e 's/^X-R//'`
16294 if test "$enable_rpath" != no; then
16295 haveit=
16296 for x in $rpathdirs; do
16297 if test "X$x" = "X$dir"; then
16298 haveit=yes
16299 break
16300 fi
16301 done
16302 if test -z "$haveit"; then
16303 rpathdirs="$rpathdirs $dir"
16304 fi
16305 haveit=
16306 for x in $ltrpathdirs; do
16307 if test "X$x" = "X$dir"; then
16308 haveit=yes
16309 break
16310 fi
16311 done
16312 if test -z "$haveit"; then
16313 ltrpathdirs="$ltrpathdirs $dir"
16314 fi
16315 fi
16316 ;;
16317 -l*)
16318 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
16319 ;;
16320 *.la)
16321 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
16322 ;;
16323 *)
16324 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$dep"
16325 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$dep"
16326 ;;
16327 esac
16328 done
16329 fi
16330 else
16331 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
16332 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name"
16333 fi
16334 fi
16335 fi
16336 done
16337 done
16338 if test "X$rpathdirs" != "X"; then
16339 if test -n "$hardcode_libdir_separator"; then
16340 alldirs=
16341 for found_dir in $rpathdirs; do
16342 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
16343 done
16344 acl_save_libdir="$libdir"
16345 libdir="$alldirs"
16346 eval flag=\"$hardcode_libdir_flag_spec\"
16347 libdir="$acl_save_libdir"
16348 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
16349 else
16350 for found_dir in $rpathdirs; do
16351 acl_save_libdir="$libdir"
16352 libdir="$found_dir"
16353 eval flag=\"$hardcode_libdir_flag_spec\"
16354 libdir="$acl_save_libdir"
16355 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
16356 done
16357 fi
16358 fi
16359 if test "X$ltrpathdirs" != "X"; then
16360 for found_dir in $ltrpathdirs; do
16361 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir"
16362 done
16363 fi
16364
16365
16366 ac_save_CPPFLAGS="$CPPFLAGS"
16367
16368 for element in $INCBABELTRACE; do
16369 haveit=
16370 for x in $CPPFLAGS; do
16371
16372 acl_save_prefix="$prefix"
16373 prefix="$acl_final_prefix"
16374 acl_save_exec_prefix="$exec_prefix"
16375 exec_prefix="$acl_final_exec_prefix"
16376 eval x=\"$x\"
16377 exec_prefix="$acl_save_exec_prefix"
16378 prefix="$acl_save_prefix"
16379
16380 if test "X$x" = "X$element"; then
16381 haveit=yes
16382 break
16383 fi
16384 done
16385 if test -z "$haveit"; then
16386 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
16387 fi
16388 done
16389
16390
16391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5
16392$as_echo_n "checking for libbabeltrace... " >&6; }
16393if test "${ac_cv_libbabeltrace+set}" = set; then :
16394 $as_echo_n "(cached) " >&6
16395else
16396
16397 ac_save_LIBS="$LIBS"
16398 LIBS="$LIBS $LIBBABELTRACE"
16399 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16400/* end confdefs.h. */
16401#include <babeltrace/babeltrace.h>
16402 #include <babeltrace/ctf/events.h>
16403 #include <babeltrace/ctf/iterator.h>
16404int
16405main ()
16406{
16407struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL));
16408 struct bt_ctf_event *event = NULL;
16409 const struct bt_definition *scope;
16410
2d681be4 16411 pos.type = BT_SEEK_BEGIN;
65c749e7 16412 bt_iter_set_pos (bt_ctf_get_iter (NULL), pos);
393fd4c3
YQ
16413 scope = bt_ctf_get_top_level_scope (event,
16414 BT_STREAM_EVENT_HEADER);
16415 bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id"));
16416
16417 ;
16418 return 0;
16419}
16420_ACEOF
16421if ac_fn_c_try_link "$LINENO"; then :
16422 ac_cv_libbabeltrace=yes
16423else
16424 ac_cv_libbabeltrace=no
16425fi
16426rm -f core conftest.err conftest.$ac_objext \
16427 conftest$ac_exeext conftest.$ac_ext
16428 LIBS="$ac_save_LIBS"
16429
16430fi
16431{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5
16432$as_echo "$ac_cv_libbabeltrace" >&6; }
16433 if test "$ac_cv_libbabeltrace" = yes; then
16434 HAVE_LIBBABELTRACE=yes
16435
16436$as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h
16437
16438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libbabeltrace" >&5
16439$as_echo_n "checking how to link with libbabeltrace... " >&6; }
16440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5
16441$as_echo "$LIBBABELTRACE" >&6; }
16442 else
16443 HAVE_LIBBABELTRACE=no
16444 CPPFLAGS="$ac_save_CPPFLAGS"
16445 LIBBABELTRACE=
16446 LTLIBBABELTRACE=
16447 fi
16448
16449
16450
16451
16452
16453
16454 CFLAGS=$saved_CFLAGS
16455
16456 if test "$HAVE_LIBBABELTRACE" != yes; then
16457 if test "$with_babeltrace" = yes; then
16458 as_fn_error "babeltrace is missing or unusable" "$LINENO" 5
16459 else
16460 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&5
16461$as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&2;}
16462 fi
16463 fi
16464fi
16465
db985757 16466# If nativefile (NAT_FILE) is not set in config/*/*.m[ht] files, we link
2c0fc042 16467# to an empty version.
c906108c
SS
16468
16469files=
16470links=
5a2402b8 16471
c906108c
SS
16472rm -f nm.h
16473if test "${nativefile}" != ""; then
0f475e27
AC
16474 case "${nativefile}" in
16475 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
16476 * ) GDB_NM_FILE="${nativefile}"
16477 esac
5a2402b8
AC
16478 files="${files} ${GDB_NM_FILE}"
16479 links="${links} nm.h"
60ca704f
SE
16480
16481cat >>confdefs.h <<_ACEOF
b78960be 16482#define GDB_NM_FILE "${GDB_NM_FILE}"
bec39cab 16483_ACEOF
5a2402b8 16484
c906108c 16485fi
5a2402b8
AC
16486
16487
bec39cab
AC
16488ac_sources="$files"
16489ac_dests="$links"
16490while test -n "$ac_sources"; do
16491 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
16492 set $ac_sources; ac_source=$1; shift; ac_sources=$*
16493 ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source"
16494done
81ecdfbb 16495ac_config_links="$ac_config_links $ac_config_links_1"
c906108c
SS
16496
16497
c906108c
SS
16498
16499
c906108c 16500
81ecdfbb 16501$as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
bec39cab 16502
bec39cab 16503
dcd1f979
TT
16504if $development; then
16505
16506$as_echo "#define GDB_SELF_TEST 1" >>confdefs.h
16507
16508fi
16509
b292c783 16510
f6a88844
JM
16511 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
16512 GDB_TRANSFORM_NAME=`echo gdb | sed -e "$gdb_ac_transform"`
16513 if test "x$GDB_TRANSFORM_NAME" = x; then
16514 GDB_TRANSFORM_NAME=gdb
16515 fi
16516
16517
16518
16519 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
16520 GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$gdb_ac_transform"`
16521 if test "x$GCORE_TRANSFORM_NAME" = x; then
16522 GCORE_TRANSFORM_NAME=gcore
16523 fi
16524
b292c783
JK
16525
16526ac_config_files="$ac_config_files gcore"
16527
c971b7fa 16528ac_config_files="$ac_config_files Makefile gdb-gdb.gdb doc/Makefile data-directory/Makefile"
81ecdfbb 16529
89a34d1b 16530
bec39cab
AC
16531cat >confcache <<\_ACEOF
16532# This file is a shell script that caches the results of configure
16533# tests run on this system so they can be shared between configure
16534# scripts and configure runs, see configure's option --config-cache.
16535# It is not useful on other systems. If it contains results you don't
16536# want to keep, you may remove or edit it.
16537#
16538# config.status only pays attention to the cache file if you give it
16539# the --recheck option to rerun configure.
16540#
16541# `ac_cv_env_foo' variables (set or unset) will be overridden when
16542# loading this file, other *unset* `ac_cv_foo' will be assigned the
16543# following values.
16544
16545_ACEOF
16546
16547# The following way of writing the cache mishandles newlines in values,
16548# but we know of no workaround that is simple, portable, and efficient.
81ecdfbb 16549# So, we kill variables containing newlines.
bec39cab
AC
16550# Ultrix sh set writes to stderr and can't be redirected directly,
16551# and sets the high bit in the cache file unless we assign to the vars.
81ecdfbb
RW
16552(
16553 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16554 eval ac_val=\$$ac_var
16555 case $ac_val in #(
16556 *${as_nl}*)
16557 case $ac_var in #(
16558 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16559$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
16560 esac
16561 case $ac_var in #(
16562 _ | IFS | as_nl) ;; #(
16563 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16564 *) { eval $ac_var=; unset $ac_var;} ;;
16565 esac ;;
16566 esac
16567 done
16568
bec39cab 16569 (set) 2>&1 |
81ecdfbb
RW
16570 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16571 *${as_nl}ac_space=\ *)
16572 # `set' does not quote correctly, so add quotes: double-quote
16573 # substitution turns \\\\ into \\, and sed turns \\ into \.
bec39cab
AC
16574 sed -n \
16575 "s/'/'\\\\''/g;
16576 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
81ecdfbb 16577 ;; #(
bec39cab
AC
16578 *)
16579 # `set' quotes correctly as required by POSIX, so do not add quotes.
81ecdfbb 16580 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
bec39cab 16581 ;;
81ecdfbb
RW
16582 esac |
16583 sort
16584) |
bec39cab 16585 sed '
81ecdfbb 16586 /^ac_cv_env_/b end
bec39cab 16587 t clear
81ecdfbb 16588 :clear
bec39cab
AC
16589 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16590 t end
81ecdfbb
RW
16591 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16592 :end' >>confcache
16593if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16594 if test -w "$cache_file"; then
16595 test "x$cache_file" != "x/dev/null" &&
16596 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16597$as_echo "$as_me: updating cache $cache_file" >&6;}
bec39cab
AC
16598 cat confcache >$cache_file
16599 else
81ecdfbb
RW
16600 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16601$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
bec39cab
AC
16602 fi
16603fi
16604rm -f confcache
16605
16606test "x$prefix" = xNONE && prefix=$ac_default_prefix
16607# Let make expand exec_prefix.
16608test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16609
bec39cab
AC
16610DEFS=-DHAVE_CONFIG_H
16611
16612ac_libobjs=
16613ac_ltlibobjs=
16614for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16615 # 1. Remove the extension, and $U if already installed.
81ecdfbb
RW
16616 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
16617 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
16618 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16619 # will be set to the directory where LIBOBJS objects are built.
16620 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16621 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
bec39cab
AC
16622done
16623LIBOBJS=$ac_libobjs
16624
16625LTLIBOBJS=$ac_ltlibobjs
16626
16627
85981d60 16628if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
81ecdfbb
RW
16629 as_fn_error "conditional \"MAINTAINER_MODE\" was never defined.
16630Usually this means the macro was only invoked conditionally." "$LINENO" 5
85981d60 16631fi
a417dc56 16632if test -z "${GMAKE_TRUE}" && test -z "${GMAKE_FALSE}"; then
81ecdfbb
RW
16633 as_fn_error "conditional \"GMAKE\" was never defined.
16634Usually this means the macro was only invoked conditionally." "$LINENO" 5
a417dc56 16635fi
4df42755
DE
16636if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then
16637 as_fn_error "conditional \"HAVE_PYTHON\" was never defined.
16638Usually this means the macro was only invoked conditionally." "$LINENO" 5
16639fi
16640if test -z "${HAVE_GUILE_TRUE}" && test -z "${HAVE_GUILE_FALSE}"; then
16641 as_fn_error "conditional \"HAVE_GUILE\" was never defined.
16642Usually this means the macro was only invoked conditionally." "$LINENO" 5
16643fi
81ecdfbb
RW
16644
16645
bec39cab 16646: ${CONFIG_STATUS=./config.status}
81ecdfbb 16647ac_write_fail=0
bec39cab
AC
16648ac_clean_files_save=$ac_clean_files
16649ac_clean_files="$ac_clean_files $CONFIG_STATUS"
81ecdfbb
RW
16650{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16651$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16652as_write_fail=0
16653cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
bec39cab
AC
16654#! $SHELL
16655# Generated by $as_me.
16656# Run this file to recreate the current configuration.
16657# Compiler output produced by configure, useful for debugging
16658# configure, is in config.log if it exists.
16659
16660debug=false
16661ac_cs_recheck=false
16662ac_cs_silent=false
bec39cab 16663
81ecdfbb
RW
16664SHELL=\${CONFIG_SHELL-$SHELL}
16665export SHELL
16666_ASEOF
16667cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16668## -------------------- ##
16669## M4sh Initialization. ##
16670## -------------------- ##
16671
16672# Be more Bourne compatible
16673DUALCASE=1; export DUALCASE # for MKS sh
16674if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
16675 emulate sh
16676 NULLCMD=:
81ecdfbb 16677 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
16678 # is contrary to our usage. Disable this feature.
16679 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
16680 setopt NO_GLOB_SUBST
16681else
16682 case `(set -o) 2>/dev/null` in #(
16683 *posix*) :
16684 set -o posix ;; #(
16685 *) :
16686 ;;
16687esac
bec39cab 16688fi
bec39cab 16689
81ecdfbb
RW
16690
16691as_nl='
16692'
16693export as_nl
16694# Printing a long string crashes Solaris 7 /usr/bin/printf.
16695as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16696as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16697as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16698# Prefer a ksh shell builtin over an external printf program on Solaris,
16699# but without wasting forks for bash or zsh.
16700if test -z "$BASH_VERSION$ZSH_VERSION" \
16701 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16702 as_echo='print -r --'
16703 as_echo_n='print -rn --'
16704elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16705 as_echo='printf %s\n'
16706 as_echo_n='printf %s'
16707else
16708 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16709 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16710 as_echo_n='/usr/ucb/echo -n'
16711 else
16712 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16713 as_echo_n_body='eval
16714 arg=$1;
16715 case $arg in #(
16716 *"$as_nl"*)
16717 expr "X$arg" : "X\\(.*\\)$as_nl";
16718 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16719 esac;
16720 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16721 '
16722 export as_echo_n_body
16723 as_echo_n='sh -c $as_echo_n_body as_echo'
16724 fi
16725 export as_echo_body
16726 as_echo='sh -c $as_echo_body as_echo'
16727fi
16728
16729# The user is always right.
16730if test "${PATH_SEPARATOR+set}" != set; then
16731 PATH_SEPARATOR=:
16732 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16733 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16734 PATH_SEPARATOR=';'
16735 }
bec39cab
AC
16736fi
16737
16738
81ecdfbb
RW
16739# IFS
16740# We need space, tab and new line, in precisely that order. Quoting is
16741# there to prevent editors from complaining about space-tab.
16742# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16743# splitting by setting IFS to empty value.)
16744IFS=" "" $as_nl"
16745
16746# Find who we are. Look in the path if we contain no directory separator.
16747case $0 in #((
16748 *[\\/]* ) as_myself=$0 ;;
16749 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16750for as_dir in $PATH
16751do
16752 IFS=$as_save_IFS
16753 test -z "$as_dir" && as_dir=.
16754 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16755 done
16756IFS=$as_save_IFS
16757
16758 ;;
16759esac
16760# We did not find ourselves, most probably we were run as `sh COMMAND'
16761# in which case we are not to be found in the path.
16762if test "x$as_myself" = x; then
16763 as_myself=$0
16764fi
16765if test ! -f "$as_myself"; then
16766 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16767 exit 1
16768fi
16769
16770# Unset variables that we do not need and which cause bugs (e.g. in
16771# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16772# suppresses any "Segmentation fault" message there. '((' could
16773# trigger a bug in pdksh 5.2.14.
16774for as_var in BASH_ENV ENV MAIL MAILPATH
16775do eval test x\${$as_var+set} = xset \
16776 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
16777done
bec39cab
AC
16778PS1='$ '
16779PS2='> '
16780PS4='+ '
16781
16782# NLS nuisances.
81ecdfbb
RW
16783LC_ALL=C
16784export LC_ALL
16785LANGUAGE=C
16786export LANGUAGE
16787
16788# CDPATH.
16789(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16790
16791
16792# as_fn_error ERROR [LINENO LOG_FD]
16793# ---------------------------------
16794# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16795# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
16796# script with status $?, using 1 if that was 0.
16797as_fn_error ()
16798{
16799 as_status=$?; test $as_status -eq 0 && as_status=1
16800 if test "$3"; then
16801 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16802 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
16803 fi
16804 $as_echo "$as_me: error: $1" >&2
16805 as_fn_exit $as_status
16806} # as_fn_error
16807
16808
16809# as_fn_set_status STATUS
16810# -----------------------
16811# Set $? to STATUS, without forking.
16812as_fn_set_status ()
16813{
16814 return $1
16815} # as_fn_set_status
16816
16817# as_fn_exit STATUS
16818# -----------------
16819# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16820as_fn_exit ()
16821{
16822 set +e
16823 as_fn_set_status $1
16824 exit $1
16825} # as_fn_exit
16826
16827# as_fn_unset VAR
16828# ---------------
16829# Portably unset VAR.
16830as_fn_unset ()
16831{
16832 { eval $1=; unset $1;}
16833}
16834as_unset=as_fn_unset
16835# as_fn_append VAR VALUE
16836# ----------------------
16837# Append the text in VALUE to the end of the definition contained in VAR. Take
16838# advantage of any shell optimizations that allow amortized linear growth over
16839# repeated appends, instead of the typical quadratic growth present in naive
16840# implementations.
16841if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16842 eval 'as_fn_append ()
16843 {
16844 eval $1+=\$2
16845 }'
16846else
16847 as_fn_append ()
16848 {
16849 eval $1=\$$1\$2
16850 }
16851fi # as_fn_append
16852
16853# as_fn_arith ARG...
16854# ------------------
16855# Perform arithmetic evaluation on the ARGs, and store the result in the
16856# global $as_val. Take advantage of shells that can avoid forks. The arguments
16857# must be portable across $(()) and expr.
16858if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16859 eval 'as_fn_arith ()
16860 {
16861 as_val=$(( $* ))
16862 }'
16863else
16864 as_fn_arith ()
16865 {
16866 as_val=`expr "$@" || test $? -eq 1`
16867 }
16868fi # as_fn_arith
bec39cab 16869
81ecdfbb
RW
16870
16871if expr a : '\(a\)' >/dev/null 2>&1 &&
16872 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
16873 as_expr=expr
16874else
16875 as_expr=false
16876fi
16877
81ecdfbb 16878if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
16879 as_basename=basename
16880else
16881 as_basename=false
16882fi
16883
81ecdfbb
RW
16884if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16885 as_dirname=dirname
16886else
16887 as_dirname=false
16888fi
bec39cab 16889
81ecdfbb 16890as_me=`$as_basename -- "$0" ||
bec39cab
AC
16891$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16892 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
16893 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
16894$as_echo X/"$0" |
16895 sed '/^.*\/\([^/][^/]*\)\/*$/{
16896 s//\1/
16897 q
16898 }
16899 /^X\/\(\/\/\)$/{
16900 s//\1/
16901 q
16902 }
16903 /^X\/\(\/\).*/{
16904 s//\1/
16905 q
16906 }
16907 s/.*/./; q'`
b4e70030 16908
b4e70030
JB
16909# Avoid depending upon Character Ranges.
16910as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16911as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16912as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16913as_cr_digits='0123456789'
16914as_cr_alnum=$as_cr_Letters$as_cr_digits
16915
81ecdfbb
RW
16916ECHO_C= ECHO_N= ECHO_T=
16917case `echo -n x` in #(((((
16918-n*)
16919 case `echo 'xy\c'` in
16920 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
16921 xy) ECHO_C='\c';;
16922 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16923 ECHO_T=' ';;
16924 esac;;
16925*)
16926 ECHO_N='-n';;
bec39cab
AC
16927esac
16928
81ecdfbb
RW
16929rm -f conf$$ conf$$.exe conf$$.file
16930if test -d conf$$.dir; then
16931 rm -f conf$$.dir/conf$$.file
bec39cab 16932else
81ecdfbb
RW
16933 rm -f conf$$.dir
16934 mkdir conf$$.dir 2>/dev/null
bec39cab 16935fi
81ecdfbb
RW
16936if (echo >conf$$.file) 2>/dev/null; then
16937 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 16938 as_ln_s='ln -s'
81ecdfbb
RW
16939 # ... but there are two gotchas:
16940 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16941 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
16942 # In both cases, we have to default to `cp -p'.
16943 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
16944 as_ln_s='cp -p'
16945 elif ln conf$$.file conf$$ 2>/dev/null; then
16946 as_ln_s=ln
16947 else
16948 as_ln_s='cp -p'
b4e70030 16949 fi
bec39cab
AC
16950else
16951 as_ln_s='cp -p'
16952fi
81ecdfbb
RW
16953rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16954rmdir conf$$.dir 2>/dev/null
16955
16956
16957# as_fn_mkdir_p
16958# -------------
16959# Create "$as_dir" as a directory, including parents if necessary.
16960as_fn_mkdir_p ()
16961{
16962
16963 case $as_dir in #(
16964 -*) as_dir=./$as_dir;;
16965 esac
16966 test -d "$as_dir" || eval $as_mkdir_p || {
16967 as_dirs=
16968 while :; do
16969 case $as_dir in #(
16970 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
16971 *) as_qdir=$as_dir;;
16972 esac
16973 as_dirs="'$as_qdir' $as_dirs"
16974 as_dir=`$as_dirname -- "$as_dir" ||
16975$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16976 X"$as_dir" : 'X\(//\)[^/]' \| \
16977 X"$as_dir" : 'X\(//\)$' \| \
16978 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
16979$as_echo X"$as_dir" |
16980 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16981 s//\1/
16982 q
16983 }
16984 /^X\(\/\/\)[^/].*/{
16985 s//\1/
16986 q
16987 }
16988 /^X\(\/\/\)$/{
16989 s//\1/
16990 q
16991 }
16992 /^X\(\/\).*/{
16993 s//\1/
16994 q
16995 }
16996 s/.*/./; q'`
16997 test -d "$as_dir" && break
16998 done
16999 test -z "$as_dirs" || eval "mkdir $as_dirs"
17000 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
17001
bec39cab 17002
81ecdfbb 17003} # as_fn_mkdir_p
bec39cab 17004if mkdir -p . 2>/dev/null; then
81ecdfbb 17005 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
17006else
17007 test -d ./-p && rmdir ./-p
17008 as_mkdir_p=false
17009fi
17010
81ecdfbb
RW
17011if test -x / >/dev/null 2>&1; then
17012 as_test_x='test -x'
17013else
17014 if ls -dL / >/dev/null 2>&1; then
17015 as_ls_L_option=L
17016 else
17017 as_ls_L_option=
17018 fi
17019 as_test_x='
17020 eval sh -c '\''
17021 if test -d "$1"; then
17022 test -d "$1/.";
17023 else
17024 case $1 in #(
17025 -*)set "./$1";;
17026 esac;
17027 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
17028 ???[sx]*):;;*)false;;esac;fi
17029 '\'' sh
17030 '
17031fi
17032as_executable_p=$as_test_x
bec39cab
AC
17033
17034# Sed expression to map a string onto a valid CPP name.
17035as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
17036
17037# Sed expression to map a string onto a valid variable name.
17038as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
17039
17040
bec39cab 17041exec 6>&1
81ecdfbb
RW
17042## ----------------------------------- ##
17043## Main body of $CONFIG_STATUS script. ##
17044## ----------------------------------- ##
17045_ASEOF
17046test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
17047
17048cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17049# Save the log message, to keep $0 and so on meaningful, and to
bec39cab 17050# report actual input values of CONFIG_FILES etc. instead of their
81ecdfbb
RW
17051# values after options handling.
17052ac_log="
bec39cab 17053This file was extended by $as_me, which was
81ecdfbb 17054generated by GNU Autoconf 2.64. Invocation command line was
bec39cab
AC
17055
17056 CONFIG_FILES = $CONFIG_FILES
17057 CONFIG_HEADERS = $CONFIG_HEADERS
17058 CONFIG_LINKS = $CONFIG_LINKS
17059 CONFIG_COMMANDS = $CONFIG_COMMANDS
17060 $ $0 $@
17061
81ecdfbb
RW
17062on `(hostname || uname -n) 2>/dev/null | sed 1q`
17063"
17064
bec39cab
AC
17065_ACEOF
17066
81ecdfbb
RW
17067case $ac_config_files in *"
17068"*) set x $ac_config_files; shift; ac_config_files=$*;;
17069esac
234b45d4 17070
81ecdfbb
RW
17071case $ac_config_headers in *"
17072"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17073esac
b4e70030 17074
b4e70030 17075
81ecdfbb
RW
17076cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17077# Files that config.status was made for.
17078config_files="$ac_config_files"
17079config_headers="$ac_config_headers"
17080config_links="$ac_config_links"
17081config_commands="$ac_config_commands"
234b45d4 17082
81ecdfbb 17083_ACEOF
b4e70030 17084
81ecdfbb 17085cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab 17086ac_cs_usage="\
81ecdfbb
RW
17087\`$as_me' instantiates files and other configuration actions
17088from templates according to the current configuration. Unless the files
17089and actions are specified as TAGs, all are instantiated by default.
234b45d4 17090
81ecdfbb 17091Usage: $0 [OPTION]... [TAG]...
234b45d4 17092
bec39cab 17093 -h, --help print this help, then exit
81ecdfbb
RW
17094 -V, --version print version number and configuration settings, then exit
17095 -q, --quiet, --silent
17096 do not print progress messages
bec39cab
AC
17097 -d, --debug don't remove temporary files
17098 --recheck update $as_me by reconfiguring in the same conditions
81ecdfbb
RW
17099 --file=FILE[:TEMPLATE]
17100 instantiate the configuration file FILE
17101 --header=FILE[:TEMPLATE]
17102 instantiate the configuration header FILE
234b45d4 17103
bec39cab
AC
17104Configuration files:
17105$config_files
234b45d4 17106
bec39cab
AC
17107Configuration headers:
17108$config_headers
234b45d4 17109
bec39cab
AC
17110Configuration links:
17111$config_links
234b45d4 17112
bec39cab
AC
17113Configuration commands:
17114$config_commands
17115
81ecdfbb 17116Report bugs to the package provider."
b4e70030 17117
81ecdfbb
RW
17118_ACEOF
17119cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab
AC
17120ac_cs_version="\\
17121config.status
81ecdfbb
RW
17122configured by $0, generated by GNU Autoconf 2.64,
17123 with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
bec39cab 17124
81ecdfbb 17125Copyright (C) 2009 Free Software Foundation, Inc.
bec39cab
AC
17126This config.status script is free software; the Free Software Foundation
17127gives unlimited permission to copy, distribute and modify it."
81ecdfbb
RW
17128
17129ac_pwd='$ac_pwd'
17130srcdir='$srcdir'
17131INSTALL='$INSTALL'
81ecdfbb
RW
17132AWK='$AWK'
17133test -n "\$AWK" || AWK=awk
bec39cab
AC
17134_ACEOF
17135
81ecdfbb
RW
17136cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17137# The default lists apply if the user does not specify any file.
bec39cab
AC
17138ac_need_defaults=:
17139while test $# != 0
17140do
17141 case $1 in
17142 --*=*)
81ecdfbb
RW
17143 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17144 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
bec39cab 17145 ac_shift=:
c906108c 17146 ;;
81ecdfbb 17147 *)
bec39cab
AC
17148 ac_option=$1
17149 ac_optarg=$2
17150 ac_shift=shift
c906108c 17151 ;;
bec39cab 17152 esac
c906108c 17153
bec39cab
AC
17154 case $ac_option in
17155 # Handling of the options.
bec39cab
AC
17156 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17157 ac_cs_recheck=: ;;
81ecdfbb
RW
17158 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
17159 $as_echo "$ac_cs_version"; exit ;;
17160 --debug | --debu | --deb | --de | --d | -d )
bec39cab
AC
17161 debug=: ;;
17162 --file | --fil | --fi | --f )
17163 $ac_shift
81ecdfbb
RW
17164 case $ac_optarg in
17165 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17166 esac
17167 as_fn_append CONFIG_FILES " '$ac_optarg'"
bec39cab
AC
17168 ac_need_defaults=false;;
17169 --header | --heade | --head | --hea )
17170 $ac_shift
81ecdfbb
RW
17171 case $ac_optarg in
17172 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17173 esac
17174 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
bec39cab 17175 ac_need_defaults=false;;
81ecdfbb
RW
17176 --he | --h)
17177 # Conflict between --help and --header
17178 as_fn_error "ambiguous option: \`$1'
17179Try \`$0 --help' for more information.";;
17180 --help | --hel | -h )
17181 $as_echo "$ac_cs_usage"; exit ;;
bec39cab
AC
17182 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17183 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17184 ac_cs_silent=: ;;
c906108c 17185
bec39cab 17186 # This is an error.
81ecdfbb
RW
17187 -*) as_fn_error "unrecognized option: \`$1'
17188Try \`$0 --help' for more information." ;;
c906108c 17189
81ecdfbb
RW
17190 *) as_fn_append ac_config_targets " $1"
17191 ac_need_defaults=false ;;
c906108c 17192
bec39cab
AC
17193 esac
17194 shift
17195done
c906108c 17196
bec39cab 17197ac_configure_extra_args=
c906108c 17198
bec39cab
AC
17199if $ac_cs_silent; then
17200 exec 6>/dev/null
17201 ac_configure_extra_args="$ac_configure_extra_args --silent"
17202fi
c906108c 17203
bec39cab 17204_ACEOF
81ecdfbb 17205cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab 17206if \$ac_cs_recheck; then
81ecdfbb
RW
17207 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
17208 shift
17209 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17210 CONFIG_SHELL='$SHELL'
17211 export CONFIG_SHELL
17212 exec "\$@"
bec39cab
AC
17213fi
17214
17215_ACEOF
81ecdfbb
RW
17216cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17217exec 5>>config.log
17218{
17219 echo
17220 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17221## Running $as_me. ##
17222_ASBOX
17223 $as_echo "$ac_log"
17224} >&5
bec39cab 17225
81ecdfbb
RW
17226_ACEOF
17227cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
c906108c 17228#
81ecdfbb 17229# INIT-COMMANDS
c906108c 17230#
a417dc56 17231ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
b4e70030 17232
bec39cab
AC
17233_ACEOF
17234
81ecdfbb 17235cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
4e8d927d 17236
81ecdfbb 17237# Handling of arguments.
bec39cab 17238for ac_config_target in $ac_config_targets
c906108c 17239do
81ecdfbb
RW
17240 case $ac_config_target in
17241 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
17242 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
f997c383 17243 "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
81ecdfbb 17244 "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;;
b292c783 17245 "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;;
81ecdfbb 17246 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
e2207b9a 17247 "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;;
5ae98d25 17248 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
aa2e2d8d 17249 "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
81ecdfbb
RW
17250
17251 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
c906108c
SS
17252 esac
17253done
17254
81ecdfbb 17255
bec39cab
AC
17256# If the user did not use the arguments to specify the items to instantiate,
17257# then the envvar interface is used. Set only those that are not.
17258# We use the long form for the default assignment because of an extremely
17259# bizarre bug on SunOS 4.1.3.
17260if $ac_need_defaults; then
17261 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17262 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17263 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
17264 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
17265fi
17266
b4e70030 17267# Have a temporary directory for convenience. Make it in the build tree
81ecdfbb 17268# simply because there is no reason against having it here, and in addition,
b4e70030 17269# creating and moving files from /tmp can sometimes cause problems.
81ecdfbb
RW
17270# Hook for its removal unless debugging.
17271# Note that there is a small window in which the directory will not be cleaned:
17272# after its creation but before its name has been assigned to `$tmp'.
b4e70030
JB
17273$debug ||
17274{
81ecdfbb
RW
17275 tmp=
17276 trap 'exit_status=$?
17277 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
17278' 0
17279 trap 'as_fn_exit 1' 1 2 13 15
17280}
17281# Create a (secure) tmp directory for tmp files.
17282
17283{
17284 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
17285 test -n "$tmp" && test -d "$tmp"
17286} ||
17287{
17288 tmp=./conf$$-$RANDOM
17289 (umask 077 && mkdir "$tmp")
17290} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
17291
17292# Set up the scripts for CONFIG_FILES section.
17293# No need to generate them if there are no CONFIG_FILES.
17294# This happens for instance with `./config.status config.h'.
17295if test -n "$CONFIG_FILES"; then
17296
17297if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
17298 ac_cs_awk_getline=:
17299 ac_cs_awk_pipe_init=
17300 ac_cs_awk_read_file='
17301 while ((getline aline < (F[key])) > 0)
17302 print(aline)
17303 close(F[key])'
17304 ac_cs_awk_pipe_fini=
17305else
17306 ac_cs_awk_getline=false
17307 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
17308 ac_cs_awk_read_file='
17309 print "|#_!!_#|"
17310 print "cat " F[key] " &&"
17311 '$ac_cs_awk_pipe_init
17312 # The final `:' finishes the AND list.
17313 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
17314fi
17315ac_cr=`echo X | tr X '\015'`
17316# On cygwin, bash can eat \r inside `` if the user requested igncr.
17317# But we know of no other shell where ac_cr would be empty at this
17318# point, so we can use a bashism as a fallback.
17319if test "x$ac_cr" = x; then
17320 eval ac_cr=\$\'\\r\'
17321fi
17322ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17323if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
17324 ac_cs_awk_cr='\r'
17325else
17326 ac_cs_awk_cr=$ac_cr
17327fi
17328
17329echo 'BEGIN {' >"$tmp/subs1.awk" &&
17330_ACEOF
17331
17332# Create commands to substitute file output variables.
17333{
17334 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
17335 echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' &&
17336 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
17337 echo "_ACAWK" &&
17338 echo "_ACEOF"
17339} >conf$$files.sh &&
17340. ./conf$$files.sh ||
17341 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
17342rm -f conf$$files.sh
17343
17344{
17345 echo "cat >conf$$subs.awk <<_ACEOF" &&
17346 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17347 echo "_ACEOF"
17348} >conf$$subs.sh ||
17349 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
17350ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
17351ac_delim='%!_!# '
17352for ac_last_try in false false false false false :; do
17353 . ./conf$$subs.sh ||
17354 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
17355
17356 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17357 if test $ac_delim_n = $ac_delim_num; then
17358 break
17359 elif $ac_last_try; then
17360 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
17361 else
17362 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17363 fi
17364done
17365rm -f conf$$subs.sh
17366
17367cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17368cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
17369_ACEOF
17370sed -n '
17371h
17372s/^/S["/; s/!.*/"]=/
17373p
17374g
17375s/^[^!]*!//
17376:repl
17377t repl
17378s/'"$ac_delim"'$//
17379t delim
17380:nl
17381h
17382s/\(.\{148\}\).*/\1/
17383t more1
17384s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17385p
17386n
17387b repl
17388:more1
17389s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17390p
17391g
17392s/.\{148\}//
17393t nl
17394:delim
17395h
17396s/\(.\{148\}\).*/\1/
17397t more2
17398s/["\\]/\\&/g; s/^/"/; s/$/"/
17399p
17400b
17401:more2
17402s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17403p
17404g
17405s/.\{148\}//
17406t delim
17407' <conf$$subs.awk | sed '
17408/^[^""]/{
17409 N
17410 s/\n//
17411}
17412' >>$CONFIG_STATUS || ac_write_fail=1
17413rm -f conf$$subs.awk
17414cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17415_ACAWK
17416cat >>"\$tmp/subs1.awk" <<_ACAWK &&
17417 for (key in S) S_is_set[key] = 1
17418 FS = "\a"
17419 \$ac_cs_awk_pipe_init
17420}
17421{
17422 line = $ 0
17423 nfields = split(line, field, "@")
17424 substed = 0
17425 len = length(field[1])
17426 for (i = 2; i < nfields; i++) {
17427 key = field[i]
17428 keylen = length(key)
17429 if (S_is_set[key]) {
17430 value = S[key]
17431 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17432 len += length(value) + length(field[++i])
17433 substed = 1
17434 } else
17435 len += 1 + keylen
17436 }
17437 if (nfields == 3 && !substed) {
17438 key = field[2]
17439 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
17440 \$ac_cs_awk_read_file
17441 next
17442 }
17443 }
17444 print line
b4e70030 17445}
81ecdfbb
RW
17446\$ac_cs_awk_pipe_fini
17447_ACAWK
17448_ACEOF
17449cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17450if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17451 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17452else
17453 cat
17454fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
17455 || as_fn_error "could not setup config files machinery" "$LINENO" 5
17456_ACEOF
17457
17458# VPATH may cause trouble with some makes, so we remove $(srcdir),
17459# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
17460# trailing colons and then remove the whole line if VPATH becomes empty
17461# (actually we leave an empty line to preserve line numbers).
17462if test "x$srcdir" = x.; then
17463 ac_vpsub='/^[ ]*VPATH[ ]*=/{
17464s/:*\$(srcdir):*/:/
17465s/:*\${srcdir}:*/:/
17466s/:*@srcdir@:*/:/
17467s/^\([^=]*=[ ]*\):*/\1/
17468s/:*$//
17469s/^[^=]*=[ ]*$//
17470}'
17471fi
17472
17473cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17474fi # test -n "$CONFIG_FILES"
17475
17476# Set up the scripts for CONFIG_HEADERS section.
17477# No need to generate them if there are no CONFIG_HEADERS.
17478# This happens for instance with `./config.status Makefile'.
17479if test -n "$CONFIG_HEADERS"; then
17480cat >"$tmp/defines.awk" <<\_ACAWK ||
17481BEGIN {
17482_ACEOF
17483
17484# Transform confdefs.h into an awk script `defines.awk', embedded as
17485# here-document in config.status, that substitutes the proper values into
17486# config.h.in to produce config.h.
4e8d927d 17487
81ecdfbb
RW
17488# Create a delimiter string that does not exist in confdefs.h, to ease
17489# handling of long lines.
17490ac_delim='%!_!# '
17491for ac_last_try in false false :; do
17492 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
17493 if test -z "$ac_t"; then
17494 break
17495 elif $ac_last_try; then
17496 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
17497 else
17498 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17499 fi
17500done
4e8d927d 17501
81ecdfbb
RW
17502# For the awk script, D is an array of macro values keyed by name,
17503# likewise P contains macro parameters if any. Preserve backslash
17504# newline sequences.
17505
17506ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17507sed -n '
17508s/.\{148\}/&'"$ac_delim"'/g
17509t rset
17510:rset
17511s/^[ ]*#[ ]*define[ ][ ]*/ /
17512t def
17513d
17514:def
17515s/\\$//
17516t bsnl
17517s/["\\]/\\&/g
17518s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17519D["\1"]=" \3"/p
17520s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17521d
17522:bsnl
17523s/["\\]/\\&/g
17524s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17525D["\1"]=" \3\\\\\\n"\\/p
17526t cont
17527s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17528t cont
17529d
17530:cont
17531n
17532s/.\{148\}/&'"$ac_delim"'/g
17533t clear
17534:clear
17535s/\\$//
17536t bsnlc
17537s/["\\]/\\&/g; s/^/"/; s/$/"/p
17538d
17539:bsnlc
17540s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17541b cont
17542' <confdefs.h | sed '
17543s/'"$ac_delim"'/"\\\
17544"/g' >>$CONFIG_STATUS || ac_write_fail=1
17545
17546cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17547 for (key in D) D_is_set[key] = 1
17548 FS = "\a"
17549}
17550/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17551 line = \$ 0
17552 split(line, arg, " ")
17553 if (arg[1] == "#") {
17554 defundef = arg[2]
17555 mac1 = arg[3]
17556 } else {
17557 defundef = substr(arg[1], 2)
17558 mac1 = arg[2]
17559 }
17560 split(mac1, mac2, "(") #)
17561 macro = mac2[1]
17562 prefix = substr(line, 1, index(line, defundef) - 1)
17563 if (D_is_set[macro]) {
17564 # Preserve the white space surrounding the "#".
17565 print prefix "define", macro P[macro] D[macro]
17566 next
17567 } else {
17568 # Replace #undef with comments. This is necessary, for example,
17569 # in the case of _POSIX_SOURCE, which is predefined and required
17570 # on some systems where configure will not decide to define it.
17571 if (defundef == "undef") {
17572 print "/*", prefix defundef, macro, "*/"
17573 next
17574 }
17575 }
b4e70030 17576}
81ecdfbb
RW
17577{ print }
17578_ACAWK
b4e70030 17579_ACEOF
81ecdfbb
RW
17580cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17581 as_fn_error "could not setup config headers machinery" "$LINENO" 5
17582fi # test -n "$CONFIG_HEADERS"
4e8d927d 17583
4e8d927d 17584
81ecdfbb
RW
17585eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
17586shift
17587for ac_tag
17588do
17589 case $ac_tag in
17590 :[FHLC]) ac_mode=$ac_tag; continue;;
17591 esac
17592 case $ac_mode$ac_tag in
17593 :[FHL]*:*);;
17594 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
17595 :[FH]-) ac_tag=-:-;;
17596 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17597 esac
17598 ac_save_IFS=$IFS
17599 IFS=:
17600 set x $ac_tag
17601 IFS=$ac_save_IFS
17602 shift
17603 ac_file=$1
17604 shift
4e8d927d 17605
81ecdfbb
RW
17606 case $ac_mode in
17607 :L) ac_source=$1;;
17608 :[FH])
17609 ac_file_inputs=
17610 for ac_f
17611 do
17612 case $ac_f in
17613 -) ac_f="$tmp/stdin";;
17614 *) # Look for the file first in the build tree, then in the source tree
17615 # (if the path is not absolute). The absolute path cannot be DOS-style,
17616 # because $ac_f cannot contain `:'.
17617 test -f "$ac_f" ||
17618 case $ac_f in
17619 [\\/$]*) false;;
17620 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17621 esac ||
17622 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
17623 esac
17624 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17625 as_fn_append ac_file_inputs " '$ac_f'"
17626 done
17627
17628 # Let's still pretend it is `configure' which instantiates (i.e., don't
17629 # use $as_me), people would be surprised to read:
17630 # /* config.h. Generated by config.status. */
17631 configure_input='Generated from '`
17632 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17633 `' by configure.'
17634 if test x"$ac_file" != x-; then
17635 configure_input="$ac_file. $configure_input"
17636 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17637$as_echo "$as_me: creating $ac_file" >&6;}
b4e70030 17638 fi
81ecdfbb
RW
17639 # Neutralize special characters interpreted by sed in replacement strings.
17640 case $configure_input in #(
17641 *\&* | *\|* | *\\* )
17642 ac_sed_conf_input=`$as_echo "$configure_input" |
17643 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17644 *) ac_sed_conf_input=$configure_input;;
17645 esac
4e8d927d 17646
81ecdfbb
RW
17647 case $ac_tag in
17648 *:-:* | *:-) cat >"$tmp/stdin" \
17649 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
17650 esac
17651 ;;
c906108c
SS
17652 esac
17653
81ecdfbb 17654 ac_dir=`$as_dirname -- "$ac_file" ||
bec39cab
AC
17655$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17656 X"$ac_file" : 'X\(//\)[^/]' \| \
17657 X"$ac_file" : 'X\(//\)$' \| \
81ecdfbb
RW
17658 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
17659$as_echo X"$ac_file" |
17660 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17661 s//\1/
17662 q
17663 }
17664 /^X\(\/\/\)[^/].*/{
17665 s//\1/
17666 q
17667 }
17668 /^X\(\/\/\)$/{
17669 s//\1/
17670 q
17671 }
17672 /^X\(\/\).*/{
17673 s//\1/
17674 q
17675 }
17676 s/.*/./; q'`
17677 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
17678 ac_builddir=.
17679
81ecdfbb
RW
17680case "$ac_dir" in
17681.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17682*)
17683 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
17684 # A ".." for each directory in $ac_dir_suffix.
17685 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
17686 case $ac_top_builddir_sub in
17687 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17688 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17689 esac ;;
17690esac
17691ac_abs_top_builddir=$ac_pwd
17692ac_abs_builddir=$ac_pwd$ac_dir_suffix
17693# for backward compatibility:
17694ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
17695
17696case $srcdir in
81ecdfbb 17697 .) # We are building in place.
bec39cab 17698 ac_srcdir=.
81ecdfbb
RW
17699 ac_top_srcdir=$ac_top_builddir_sub
17700 ac_abs_top_srcdir=$ac_pwd ;;
17701 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 17702 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
17703 ac_top_srcdir=$srcdir
17704 ac_abs_top_srcdir=$srcdir ;;
17705 *) # Relative name.
17706 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17707 ac_top_srcdir=$ac_top_build_prefix$srcdir
17708 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 17709esac
81ecdfbb 17710ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 17711
c906108c 17712
81ecdfbb
RW
17713 case $ac_mode in
17714 :F)
17715 #
17716 # CONFIG_FILE
17717 #
c906108c 17718
bec39cab
AC
17719 case $INSTALL in
17720 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
81ecdfbb 17721 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
c906108c 17722 esac
81ecdfbb 17723_ACEOF
121ce6e5 17724
81ecdfbb
RW
17725cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17726# If the template does not know about datarootdir, expand it.
17727# FIXME: This hack should be removed a few years after 2.60.
17728ac_datarootdir_hack=; ac_datarootdir_seen=
17729ac_sed_dataroot='
17730/datarootdir/ {
17731 p
17732 q
17733}
17734/@datadir@/p
17735/@docdir@/p
17736/@infodir@/p
17737/@localedir@/p
17738/@mandir@/p'
17739case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
17740*datarootdir*) ac_datarootdir_seen=yes;;
17741*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
17742 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17743$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
17744_ACEOF
17745cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17746 ac_datarootdir_hack='
17747 s&@datadir@&$datadir&g
17748 s&@docdir@&$docdir&g
17749 s&@infodir@&$infodir&g
17750 s&@localedir@&$localedir&g
17751 s&@mandir@&$mandir&g
17752 s&\\\${datarootdir}&$datarootdir&g' ;;
17753esac
4e8d927d 17754_ACEOF
81ecdfbb
RW
17755
17756# Neutralize VPATH when `$srcdir' = `.'.
17757# Shell code in configure.ac might set extrasub.
17758# FIXME: do we really want to maintain this feature?
17759cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17760ac_sed_extra="$ac_vpsub
bec39cab
AC
17761$extrasub
17762_ACEOF
81ecdfbb 17763cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab
AC
17764:t
17765/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
81ecdfbb
RW
17766s|@configure_input@|$ac_sed_conf_input|;t t
17767s&@top_builddir@&$ac_top_builddir_sub&;t t
17768s&@top_build_prefix@&$ac_top_build_prefix&;t t
17769s&@srcdir@&$ac_srcdir&;t t
17770s&@abs_srcdir@&$ac_abs_srcdir&;t t
17771s&@top_srcdir@&$ac_top_srcdir&;t t
17772s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17773s&@builddir@&$ac_builddir&;t t
17774s&@abs_builddir@&$ac_abs_builddir&;t t
17775s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17776s&@INSTALL@&$ac_INSTALL&;t t
81ecdfbb
RW
17777$ac_datarootdir_hack
17778"
17779eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
17780if $ac_cs_awk_getline; then
17781 $AWK -f "$tmp/subs.awk"
17782else
17783 $AWK -f "$tmp/subs.awk" | $SHELL
17784fi >$tmp/out \
17785 || as_fn_error "could not create $ac_file" "$LINENO" 5
17786
17787test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
17788 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
17789 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
17790 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
17791which seems to be undefined. Please make sure it is defined." >&5
17792$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
17793which seems to be undefined. Please make sure it is defined." >&2;}
17794
17795 rm -f "$tmp/stdin"
bec39cab 17796 case $ac_file in
81ecdfbb
RW
17797 -) cat "$tmp/out" && rm -f "$tmp/out";;
17798 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
17799 esac \
17800 || as_fn_error "could not create $ac_file" "$LINENO" 5
17801 ;;
17802 :H)
17803 #
17804 # CONFIG_HEADER
17805 #
bec39cab 17806 if test x"$ac_file" != x-; then
81ecdfbb
RW
17807 {
17808 $as_echo "/* $configure_input */" \
17809 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
17810 } >"$tmp/config.h" \
17811 || as_fn_error "could not create $ac_file" "$LINENO" 5
17812 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
17813 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17814$as_echo "$as_me: $ac_file is unchanged" >&6;}
bec39cab 17815 else
81ecdfbb
RW
17816 rm -f "$ac_file"
17817 mv "$tmp/config.h" "$ac_file" \
17818 || as_fn_error "could not create $ac_file" "$LINENO" 5
bec39cab
AC
17819 fi
17820 else
81ecdfbb
RW
17821 $as_echo "/* $configure_input */" \
17822 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
17823 || as_fn_error "could not create -" "$LINENO" 5
bec39cab 17824 fi
81ecdfbb
RW
17825 ;;
17826 :L)
17827 #
17828 # CONFIG_LINK
17829 #
c906108c 17830
81ecdfbb
RW
17831 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
17832 :
b4e70030 17833 else
81ecdfbb
RW
17834 # Prefer the file from the source tree if names are identical.
17835 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
17836 ac_source=$srcdir/$ac_source
17837 fi
b4e70030 17838
81ecdfbb
RW
17839 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
17840$as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
b4e70030 17841
81ecdfbb
RW
17842 if test ! -r "$ac_source"; then
17843 as_fn_error "$ac_source: file not found" "$LINENO" 5
17844 fi
17845 rm -f "$ac_file"
bec39cab 17846
81ecdfbb
RW
17847 # Try a relative symlink, then a hard link, then a copy.
17848 case $srcdir in
17849 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
17850 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
17851 esac
17852 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
17853 ln "$ac_source" "$ac_file" 2>/dev/null ||
17854 cp -p "$ac_source" "$ac_file" ||
17855 as_fn_error "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
17856 fi
17857 ;;
17858 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
17859$as_echo "$as_me: executing $ac_file commands" >&6;}
17860 ;;
c906108c 17861 esac
b4e70030 17862
bec39cab 17863
81ecdfbb
RW
17864 case $ac_file$ac_mode in
17865 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
b292c783 17866 "gcore":F) chmod +x gcore ;;
1e94266c
SM
17867 "Makefile":F)
17868case x$CONFIG_HEADERS in
17869xconfig.h:config.in)
17870echo > stamp-h ;;
17871esac
17872 ;;
17873 "gdb-gdb.gdb":F)
17874case x$CONFIG_HEADERS in
17875xconfig.h:config.in)
17876echo > stamp-h ;;
17877esac
17878 ;;
17879 "doc/Makefile":F)
17880case x$CONFIG_HEADERS in
17881xconfig.h:config.in)
17882echo > stamp-h ;;
17883esac
17884 ;;
17885 "data-directory/Makefile":F)
c906108c
SS
17886case x$CONFIG_HEADERS in
17887xconfig.h:config.in)
17888echo > stamp-h ;;
17889esac
bec39cab 17890 ;;
81ecdfbb 17891
bec39cab 17892 esac
81ecdfbb 17893done # for ac_tag
c906108c 17894
bec39cab 17895
81ecdfbb 17896as_fn_exit 0
bec39cab 17897_ACEOF
bec39cab
AC
17898ac_clean_files=$ac_clean_files_save
17899
81ecdfbb
RW
17900test $ac_write_fail = 0 ||
17901 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
17902
bec39cab
AC
17903
17904# configure is writing to config.log, and then calls config.status.
17905# config.status does its own redirection, appending to config.log.
17906# Unfortunately, on DOS this fails, as config.log is still kept open
17907# by configure, so config.status won't be able to write to it; its
17908# output is simply discarded. So we exec the FD to /dev/null,
17909# effectively closing config.log, so it can be properly (re)opened and
17910# appended to by config.status. When coming back to configure, we
17911# need to make the FD available again.
17912if test "$no_create" != yes; then
17913 ac_cs_success=:
17914 ac_config_status_args=
17915 test "$silent" = yes &&
17916 ac_config_status_args="$ac_config_status_args --quiet"
17917 exec 5>/dev/null
17918 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
17919 exec 5>>config.log
17920 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17921 # would make configure fail if this is the last instruction.
81ecdfbb 17922 $ac_cs_success || as_fn_exit $?
bec39cab 17923fi
c906108c 17924
bec39cab 17925#
81ecdfbb 17926# CONFIG_SUBDIRS section.
bec39cab 17927#
c906108c
SS
17928if test "$no_recursion" != yes; then
17929
81ecdfbb
RW
17930 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
17931 # so they do not pile up.
c906108c
SS
17932 ac_sub_configure_args=
17933 ac_prev=
fdc59709
PB
17934 eval "set x $ac_configure_args"
17935 shift
17936 for ac_arg
17937 do
c906108c
SS
17938 if test -n "$ac_prev"; then
17939 ac_prev=
17940 continue
17941 fi
bec39cab 17942 case $ac_arg in
c906108c
SS
17943 -cache-file | --cache-file | --cache-fil | --cache-fi \
17944 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
17945 ac_prev=cache_file ;;
17946 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
bec39cab
AC
17947 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
17948 | --c=*)
17949 ;;
17950 --config-cache | -C)
c906108c
SS
17951 ;;
17952 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
17953 ac_prev=srcdir ;;
17954 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
17955 ;;
bec39cab
AC
17956 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
17957 ac_prev=prefix ;;
17958 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
17959 ;;
81ecdfbb
RW
17960 --disable-option-checking)
17961 ;;
fdc59709
PB
17962 *)
17963 case $ac_arg in
81ecdfbb 17964 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 17965 esac
81ecdfbb 17966 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
c906108c
SS
17967 esac
17968 done
17969
bec39cab
AC
17970 # Always prepend --prefix to ensure using the same prefix
17971 # in subdir configurations.
fdc59709
PB
17972 ac_arg="--prefix=$prefix"
17973 case $ac_arg in
81ecdfbb 17974 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 17975 esac
81ecdfbb
RW
17976 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
17977
17978 # Pass --silent
17979 if test "$silent" = yes; then
17980 ac_sub_configure_args="--silent $ac_sub_configure_args"
17981 fi
17982
17983 # Always prepend --disable-option-checking to silence warnings, since
17984 # different subdirs can have different --enable and --with options.
17985 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
bec39cab 17986
b4e70030 17987 ac_popdir=`pwd`
bec39cab 17988 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
c906108c
SS
17989
17990 # Do not complain, so a configure script can configure whichever
17991 # parts of a large source tree are present.
fdc59709 17992 test -d "$srcdir/$ac_dir" || continue
c906108c 17993
81ecdfbb
RW
17994 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
17995 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
17996 $as_echo "$ac_msg" >&6
17997 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
17998 ac_builddir=.
17999
81ecdfbb
RW
18000case "$ac_dir" in
18001.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18002*)
18003 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
18004 # A ".." for each directory in $ac_dir_suffix.
18005 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
18006 case $ac_top_builddir_sub in
18007 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18008 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18009 esac ;;
18010esac
18011ac_abs_top_builddir=$ac_pwd
18012ac_abs_builddir=$ac_pwd$ac_dir_suffix
18013# for backward compatibility:
18014ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
18015
18016case $srcdir in
81ecdfbb 18017 .) # We are building in place.
bec39cab 18018 ac_srcdir=.
81ecdfbb
RW
18019 ac_top_srcdir=$ac_top_builddir_sub
18020 ac_abs_top_srcdir=$ac_pwd ;;
18021 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 18022 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
18023 ac_top_srcdir=$srcdir
18024 ac_abs_top_srcdir=$srcdir ;;
18025 *) # Relative name.
18026 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18027 ac_top_srcdir=$ac_top_build_prefix$srcdir
18028 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 18029esac
81ecdfbb 18030ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
c906108c 18031
c906108c 18032
fdc59709 18033 cd "$ac_dir"
c906108c
SS
18034
18035 # Check for guested configure; otherwise get Cygnus style configure.
fdc59709
PB
18036 if test -f "$ac_srcdir/configure.gnu"; then
18037 ac_sub_configure=$ac_srcdir/configure.gnu
18038 elif test -f "$ac_srcdir/configure"; then
18039 ac_sub_configure=$ac_srcdir/configure
18040 elif test -f "$ac_srcdir/configure.in"; then
18041 # This should be Cygnus configure.
18042 ac_sub_configure=$ac_aux_dir/configure
c906108c 18043 else
81ecdfbb
RW
18044 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
18045$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
c906108c
SS
18046 ac_sub_configure=
18047 fi
18048
18049 # The recursion is here.
18050 if test -n "$ac_sub_configure"; then
c906108c 18051 # Make the cache file name correct relative to the subdirectory.
bec39cab
AC
18052 case $cache_file in
18053 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
81ecdfbb
RW
18054 *) # Relative name.
18055 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
c906108c 18056 esac
c906108c 18057
81ecdfbb
RW
18058 { $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
18059$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
c906108c 18060 # The eval makes quoting arguments work.
fdc59709
PB
18061 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
18062 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
81ecdfbb 18063 as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
c906108c
SS
18064 fi
18065
fdc59709 18066 cd "$ac_popdir"
c906108c
SS
18067 done
18068fi
81ecdfbb
RW
18069if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
18070 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
18071$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
18072fi
c906108c 18073