[C++] Fix -Winvalid-offsetof warnings with g++ 4.4
[deliverable/binutils-gdb.git] / gdb / configure
CommitLineData
c906108c 1#! /bin/sh
c906108c 2# Guess values for system-dependent variables and create Makefiles.
81ecdfbb
RW
3# Generated by GNU Autoconf 2.64.
4#
5# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
6# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
7# Foundation, Inc.
c906108c
SS
8#
9# This configure script is free software; the Free Software Foundation
10# gives unlimited permission to copy, distribute and modify it.
81ecdfbb
RW
11## -------------------- ##
12## M4sh Initialization. ##
13## -------------------- ##
bec39cab 14
81ecdfbb
RW
15# Be more Bourne compatible
16DUALCASE=1; export DUALCASE # for MKS sh
17if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
18 emulate sh
19 NULLCMD=:
81ecdfbb 20 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
21 # is contrary to our usage. Disable this feature.
22 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
23 setopt NO_GLOB_SUBST
24else
25 case `(set -o) 2>/dev/null` in #(
26 *posix*) :
27 set -o posix ;; #(
28 *) :
29 ;;
30esac
bec39cab 31fi
bec39cab 32
81ecdfbb
RW
33
34as_nl='
35'
36export as_nl
37# Printing a long string crashes Solaris 7 /usr/bin/printf.
38as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
39as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
40as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
41# Prefer a ksh shell builtin over an external printf program on Solaris,
42# but without wasting forks for bash or zsh.
43if test -z "$BASH_VERSION$ZSH_VERSION" \
44 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
45 as_echo='print -r --'
46 as_echo_n='print -rn --'
47elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
48 as_echo='printf %s\n'
49 as_echo_n='printf %s'
50else
51 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
52 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53 as_echo_n='/usr/ucb/echo -n'
54 else
55 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
56 as_echo_n_body='eval
57 arg=$1;
58 case $arg in #(
59 *"$as_nl"*)
60 expr "X$arg" : "X\\(.*\\)$as_nl";
61 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
62 esac;
63 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
64 '
65 export as_echo_n_body
66 as_echo_n='sh -c $as_echo_n_body as_echo'
67 fi
68 export as_echo_body
69 as_echo='sh -c $as_echo_body as_echo'
70fi
71
72# The user is always right.
73if test "${PATH_SEPARATOR+set}" != set; then
74 PATH_SEPARATOR=:
75 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
76 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
77 PATH_SEPARATOR=';'
78 }
bec39cab
AC
79fi
80
81
81ecdfbb
RW
82# IFS
83# We need space, tab and new line, in precisely that order. Quoting is
84# there to prevent editors from complaining about space-tab.
85# (If _AS_PATH_WALK were called with IFS unset, it would disable word
86# splitting by setting IFS to empty value.)
87IFS=" "" $as_nl"
88
89# Find who we are. Look in the path if we contain no directory separator.
90case $0 in #((
91 *[\\/]* ) as_myself=$0 ;;
92 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
93for as_dir in $PATH
94do
95 IFS=$as_save_IFS
96 test -z "$as_dir" && as_dir=.
97 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
98 done
99IFS=$as_save_IFS
100
101 ;;
102esac
103# We did not find ourselves, most probably we were run as `sh COMMAND'
104# in which case we are not to be found in the path.
105if test "x$as_myself" = x; then
106 as_myself=$0
107fi
108if test ! -f "$as_myself"; then
109 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
110 exit 1
111fi
112
113# Unset variables that we do not need and which cause bugs (e.g. in
114# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
115# suppresses any "Segmentation fault" message there. '((' could
116# trigger a bug in pdksh 5.2.14.
117for as_var in BASH_ENV ENV MAIL MAILPATH
118do eval test x\${$as_var+set} = xset \
119 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
120done
bec39cab
AC
121PS1='$ '
122PS2='> '
123PS4='+ '
124
125# NLS nuisances.
81ecdfbb
RW
126LC_ALL=C
127export LC_ALL
128LANGUAGE=C
129export LANGUAGE
130
131# CDPATH.
132(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
133
134if test "x$CONFIG_SHELL" = x; then
135 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
136 emulate sh
137 NULLCMD=:
138 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
139 # is contrary to our usage. Disable this feature.
140 alias -g '\${1+\"\$@\"}'='\"\$@\"'
141 setopt NO_GLOB_SUBST
142else
143 case \`(set -o) 2>/dev/null\` in #(
144 *posix*) :
145 set -o posix ;; #(
146 *) :
147 ;;
148esac
149fi
150"
151 as_required="as_fn_return () { (exit \$1); }
152as_fn_success () { as_fn_return 0; }
153as_fn_failure () { as_fn_return 1; }
154as_fn_ret_success () { return 0; }
155as_fn_ret_failure () { return 1; }
156
157exitcode=0
158as_fn_success || { exitcode=1; echo as_fn_success failed.; }
159as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
160as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
161as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
162if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
163
164else
165 exitcode=1; echo positional parameters were not saved.
166fi
167test x\$exitcode = x0 || exit 1"
168 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
169 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
170 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
171 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
172test \$(( 1 + 1 )) = 2 || exit 1"
173 if (eval "$as_required") 2>/dev/null; then :
174 as_have_required=yes
175else
176 as_have_required=no
177fi
178 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
179
180else
181 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
182as_found=false
183for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
bec39cab 184do
81ecdfbb
RW
185 IFS=$as_save_IFS
186 test -z "$as_dir" && as_dir=.
187 as_found=:
188 case $as_dir in #(
189 /*)
190 for as_base in sh bash ksh sh5; do
191 # Try only shells that exist, to save several forks.
192 as_shell=$as_dir/$as_base
193 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
194 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
195 CONFIG_SHELL=$as_shell as_have_required=yes
196 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
197 break 2
198fi
199fi
200 done;;
201 esac
202 as_found=false
203done
204$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
205 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
206 CONFIG_SHELL=$SHELL as_have_required=yes
207fi; }
208IFS=$as_save_IFS
209
210
211 if test "x$CONFIG_SHELL" != x; then :
212 # We cannot yet assume a decent shell, so we have to provide a
213 # neutralization value for shells without unset; and this also
214 # works around shells that cannot unset nonexistent variables.
215 BASH_ENV=/dev/null
216 ENV=/dev/null
217 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
218 export CONFIG_SHELL
219 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
220fi
221
222 if test x$as_have_required = xno; then :
223 $as_echo "$0: This script requires a shell more modern than all"
224 $as_echo "$0: the shells that I found on your system."
225 if test x${ZSH_VERSION+set} = xset ; then
226 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
227 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
bec39cab 228 else
81ecdfbb
RW
229 $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
230$0: including any error possibly output before this
231$0: message. Then install a modern shell, or manually run
232$0: the script under such a shell if you do have one."
bec39cab 233 fi
81ecdfbb
RW
234 exit 1
235fi
236fi
237fi
238SHELL=${CONFIG_SHELL-/bin/sh}
239export SHELL
240# Unset more variables known to interfere with behavior of common tools.
241CLICOLOR_FORCE= GREP_OPTIONS=
242unset CLICOLOR_FORCE GREP_OPTIONS
243
244## --------------------- ##
245## M4sh Shell Functions. ##
246## --------------------- ##
247# as_fn_unset VAR
248# ---------------
249# Portably unset VAR.
250as_fn_unset ()
251{
252 { eval $1=; unset $1;}
253}
254as_unset=as_fn_unset
255
256# as_fn_set_status STATUS
257# -----------------------
258# Set $? to STATUS, without forking.
259as_fn_set_status ()
260{
261 return $1
262} # as_fn_set_status
bec39cab 263
81ecdfbb
RW
264# as_fn_exit STATUS
265# -----------------
266# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
267as_fn_exit ()
268{
269 set +e
270 as_fn_set_status $1
271 exit $1
272} # as_fn_exit
273
274# as_fn_mkdir_p
275# -------------
276# Create "$as_dir" as a directory, including parents if necessary.
277as_fn_mkdir_p ()
278{
279
280 case $as_dir in #(
281 -*) as_dir=./$as_dir;;
282 esac
283 test -d "$as_dir" || eval $as_mkdir_p || {
284 as_dirs=
285 while :; do
286 case $as_dir in #(
287 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
288 *) as_qdir=$as_dir;;
289 esac
290 as_dirs="'$as_qdir' $as_dirs"
291 as_dir=`$as_dirname -- "$as_dir" ||
292$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
293 X"$as_dir" : 'X\(//\)[^/]' \| \
294 X"$as_dir" : 'X\(//\)$' \| \
295 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
296$as_echo X"$as_dir" |
297 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
298 s//\1/
299 q
300 }
301 /^X\(\/\/\)[^/].*/{
302 s//\1/
303 q
304 }
305 /^X\(\/\/\)$/{
306 s//\1/
307 q
308 }
309 /^X\(\/\).*/{
310 s//\1/
311 q
312 }
313 s/.*/./; q'`
314 test -d "$as_dir" && break
315 done
316 test -z "$as_dirs" || eval "mkdir $as_dirs"
317 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
318
319
320} # as_fn_mkdir_p
321# as_fn_append VAR VALUE
322# ----------------------
323# Append the text in VALUE to the end of the definition contained in VAR. Take
324# advantage of any shell optimizations that allow amortized linear growth over
325# repeated appends, instead of the typical quadratic growth present in naive
326# implementations.
327if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
328 eval 'as_fn_append ()
329 {
330 eval $1+=\$2
331 }'
332else
333 as_fn_append ()
334 {
335 eval $1=\$$1\$2
336 }
337fi # as_fn_append
338
339# as_fn_arith ARG...
340# ------------------
341# Perform arithmetic evaluation on the ARGs, and store the result in the
342# global $as_val. Take advantage of shells that can avoid forks. The arguments
343# must be portable across $(()) and expr.
344if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
345 eval 'as_fn_arith ()
346 {
347 as_val=$(( $* ))
348 }'
349else
350 as_fn_arith ()
351 {
352 as_val=`expr "$@" || test $? -eq 1`
353 }
354fi # as_fn_arith
355
356
357# as_fn_error ERROR [LINENO LOG_FD]
358# ---------------------------------
359# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
360# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
361# script with status $?, using 1 if that was 0.
362as_fn_error ()
363{
364 as_status=$?; test $as_status -eq 0 && as_status=1
365 if test "$3"; then
366 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
367 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
368 fi
369 $as_echo "$as_me: error: $1" >&2
370 as_fn_exit $as_status
371} # as_fn_error
372
373if expr a : '\(a\)' >/dev/null 2>&1 &&
374 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
375 as_expr=expr
376else
377 as_expr=false
378fi
379
81ecdfbb 380if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
381 as_basename=basename
382else
383 as_basename=false
384fi
385
81ecdfbb
RW
386if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
387 as_dirname=dirname
388else
389 as_dirname=false
390fi
bec39cab 391
81ecdfbb 392as_me=`$as_basename -- "$0" ||
bec39cab
AC
393$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
394 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
395 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
396$as_echo X/"$0" |
397 sed '/^.*\/\([^/][^/]*\)\/*$/{
398 s//\1/
399 q
400 }
401 /^X\/\(\/\/\)$/{
402 s//\1/
403 q
404 }
405 /^X\/\(\/\).*/{
406 s//\1/
407 q
408 }
409 s/.*/./; q'`
bec39cab 410
b4e70030
JB
411# Avoid depending upon Character Ranges.
412as_cr_letters='abcdefghijklmnopqrstuvwxyz'
413as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
414as_cr_Letters=$as_cr_letters$as_cr_LETTERS
415as_cr_digits='0123456789'
416as_cr_alnum=$as_cr_Letters$as_cr_digits
4e8d927d 417
bec39cab 418
81ecdfbb
RW
419 as_lineno_1=$LINENO as_lineno_1a=$LINENO
420 as_lineno_2=$LINENO as_lineno_2a=$LINENO
421 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
422 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
423 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
424 sed -n '
425 p
426 /[$]LINENO/=
427 ' <$as_myself |
bec39cab 428 sed '
81ecdfbb
RW
429 s/[$]LINENO.*/&-/
430 t lineno
431 b
432 :lineno
bec39cab 433 N
81ecdfbb
RW
434 :loop
435 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
bec39cab 436 t loop
81ecdfbb 437 s/-\n.*//
bec39cab 438 ' >$as_me.lineno &&
81ecdfbb
RW
439 chmod +x "$as_me.lineno" ||
440 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
bec39cab
AC
441
442 # Don't try to exec as it changes $[0], causing all sort of problems
443 # (the dirname of $[0] is not the place where we might find the
81ecdfbb
RW
444 # original and so on. Autoconf is especially sensitive to this).
445 . "./$as_me.lineno"
bec39cab
AC
446 # Exit status is that of the last command.
447 exit
448}
449
81ecdfbb
RW
450ECHO_C= ECHO_N= ECHO_T=
451case `echo -n x` in #(((((
452-n*)
453 case `echo 'xy\c'` in
454 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
455 xy) ECHO_C='\c';;
456 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
457 ECHO_T=' ';;
458 esac;;
459*)
460 ECHO_N='-n';;
bec39cab
AC
461esac
462
81ecdfbb
RW
463rm -f conf$$ conf$$.exe conf$$.file
464if test -d conf$$.dir; then
465 rm -f conf$$.dir/conf$$.file
bec39cab 466else
81ecdfbb
RW
467 rm -f conf$$.dir
468 mkdir conf$$.dir 2>/dev/null
bec39cab 469fi
81ecdfbb
RW
470if (echo >conf$$.file) 2>/dev/null; then
471 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 472 as_ln_s='ln -s'
81ecdfbb
RW
473 # ... but there are two gotchas:
474 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
475 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
476 # In both cases, we have to default to `cp -p'.
477 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
478 as_ln_s='cp -p'
479 elif ln conf$$.file conf$$ 2>/dev/null; then
480 as_ln_s=ln
481 else
482 as_ln_s='cp -p'
b4e70030 483 fi
bec39cab
AC
484else
485 as_ln_s='cp -p'
486fi
81ecdfbb
RW
487rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
488rmdir conf$$.dir 2>/dev/null
bec39cab
AC
489
490if mkdir -p . 2>/dev/null; then
81ecdfbb 491 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
492else
493 test -d ./-p && rmdir ./-p
494 as_mkdir_p=false
495fi
496
81ecdfbb
RW
497if test -x / >/dev/null 2>&1; then
498 as_test_x='test -x'
499else
500 if ls -dL / >/dev/null 2>&1; then
501 as_ls_L_option=L
502 else
503 as_ls_L_option=
504 fi
505 as_test_x='
506 eval sh -c '\''
507 if test -d "$1"; then
508 test -d "$1/.";
509 else
510 case $1 in #(
511 -*)set "./$1";;
512 esac;
513 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
514 ???[sx]*):;;*)false;;esac;fi
515 '\'' sh
516 '
517fi
518as_executable_p=$as_test_x
bec39cab
AC
519
520# Sed expression to map a string onto a valid CPP name.
521as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
522
523# Sed expression to map a string onto a valid variable name.
524as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
525
526
81ecdfbb 527exec 7<&0 </dev/null 6>&1
c906108c 528
bec39cab
AC
529# Name of the host.
530# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
531# so uname gets run too.
532ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
533
bec39cab
AC
534#
535# Initializations.
536#
c906108c 537ac_default_prefix=/usr/local
81ecdfbb 538ac_clean_files=
bec39cab 539ac_config_libobj_dir=.
81ecdfbb 540LIBOBJS=
bec39cab
AC
541cross_compiling=no
542subdirs=
543MFLAGS=
544MAKEFLAGS=
b4e70030 545
bec39cab
AC
546# Identity of this package.
547PACKAGE_NAME=
548PACKAGE_TARNAME=
549PACKAGE_VERSION=
550PACKAGE_STRING=
551PACKAGE_BUGREPORT=
81ecdfbb 552PACKAGE_URL=
bec39cab
AC
553
554ac_unique_file="main.c"
555# Factoring default headers for most tests.
556ac_includes_default="\
557#include <stdio.h>
81ecdfbb 558#ifdef HAVE_SYS_TYPES_H
bec39cab
AC
559# include <sys/types.h>
560#endif
81ecdfbb 561#ifdef HAVE_SYS_STAT_H
bec39cab
AC
562# include <sys/stat.h>
563#endif
81ecdfbb 564#ifdef STDC_HEADERS
bec39cab
AC
565# include <stdlib.h>
566# include <stddef.h>
567#else
81ecdfbb 568# ifdef HAVE_STDLIB_H
bec39cab
AC
569# include <stdlib.h>
570# endif
571#endif
81ecdfbb
RW
572#ifdef HAVE_STRING_H
573# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
bec39cab
AC
574# include <memory.h>
575# endif
576# include <string.h>
577#endif
81ecdfbb 578#ifdef HAVE_STRINGS_H
bec39cab
AC
579# include <strings.h>
580#endif
81ecdfbb 581#ifdef HAVE_INTTYPES_H
bec39cab 582# include <inttypes.h>
bec39cab 583#endif
81ecdfbb
RW
584#ifdef HAVE_STDINT_H
585# include <stdint.h>
586#endif
587#ifdef HAVE_UNISTD_H
bec39cab
AC
588# include <unistd.h>
589#endif"
590
81ecdfbb 591enable_option_checking=no
c971b7fa 592ac_subst_vars='LTLIBOBJS
81ecdfbb 593LIBOBJS
b292c783
JK
594GCORE_TRANSFORM_NAME
595GDB_TRANSFORM_NAME
81ecdfbb 596GDB_NM_FILE
393fd4c3
YQ
597LTLIBBABELTRACE
598LIBBABELTRACE
599HAVE_LIBBABELTRACE
81ecdfbb
RW
600frags
601target_subdir
602CONFIG_UNINSTALL
603CONFIG_INSTALL
604CONFIG_CLEAN
605CONFIG_ALL
606CONFIG_SRCS
607CONFIG_DEPS
608CONFIG_OBS
609PROFILE_CFLAGS
610ENABLE_CFLAGS
611SIM_OBS
612SIM
613XMKMF
614GDBTK_SRC_DIR
615GDBTK_CFLAGS
616GDBTKLIBS
617X_LIBS
618X_LDFLAGS
619X_CFLAGS
620TK_XINCLUDES
621TK_DEPS
622TK_LIBRARY
623TK_INCLUDE
624TK_STUB_LIB_SPEC
625TK_STUB_LIB_FLAG
626TK_STUB_LIB_FILE
627TK_LIB_SPEC
628TK_LIB_FLAG
629TK_LIB_FILE
630TK_SRC_DIR
631TK_BIN_DIR
632TK_VERSION
633TCL_DEPS
634TCL_LIBRARY
635TCL_INCLUDE
636TCL_STUB_LIB_SPEC
637TCL_STUB_LIB_FLAG
638TCL_STUB_LIB_FILE
639TCL_LIB_SPEC
640TCL_LIB_FLAG
641TCL_LIB_FILE
642TCL_SRC_DIR
643TCL_BIN_DIR
644TCL_PATCH_LEVEL
645TCL_VERSION
646WIN32LDAPP
647GUI_CFLAGS_X
648LIBGUI
608e2dbb
TT
649LTLIBLZMA
650LIBLZMA
651HAVE_LIBLZMA
81ecdfbb
RW
652WIN32LIBS
653SER_HARDWIRE
654WERROR_CFLAGS
655WARN_CFLAGS
656SYSTEM_GDBINIT
81ecdfbb
RW
657TARGET_SYSTEM_ROOT
658CONFIG_LDFLAGS
f6528abd 659RDYNAMIC
81ecdfbb 660ALLOCA
58bfce93
MM
661LTLIBIPT
662LIBIPT
663HAVE_LIBIPT
4df42755
DE
664HAVE_GUILE_FALSE
665HAVE_GUILE_TRUE
ed3ef339
DE
666GUILE_LIBS
667GUILE_CPPFLAGS
e76c5d17
DE
668GUILD_TARGET_FLAG
669GUILD
ed3ef339 670pkg_config_prog_path
4df42755
DE
671HAVE_PYTHON_FALSE
672HAVE_PYTHON_TRUE
ac534cba
JB
673PYTHON_LIBS
674PYTHON_CPPFLAGS
81ecdfbb 675PYTHON_CFLAGS
ec685c5e 676python_prog_path
81ecdfbb
RW
677LTLIBEXPAT
678LIBEXPAT
679HAVE_LIBEXPAT
b8e0a31c 680JIT_READER_DIR
f997c383 681TARGET_PTR
39037522 682READLINE_TEXI_INCFLAG
81ecdfbb
RW
683READLINE_CFLAGS
684READLINE_DEPS
685READLINE
016a3251
DD
686LTLIBICONV
687LIBICONV
711a72d3
L
688zlibinc
689zlibdir
81ecdfbb
RW
690MIG
691WINDRES
692DLLTOOL
c971b7fa 693AR
81ecdfbb
RW
694YFLAGS
695YACC
c971b7fa 696RANLIB
81ecdfbb 697LN_S
c971b7fa
PA
698INSTALL_DATA
699INSTALL_SCRIPT
700INSTALL_PROGRAM
701AWK
81ecdfbb
RW
702REPORT_BUGS_TEXI
703REPORT_BUGS_TO
704PKGVERSION
b292c783 705HAVE_NATIVE_GCORE_TARGET
81ecdfbb
RW
706TARGET_OBS
707subdirs
708GDB_DATADIR
709DEBUGDIR
5048e516
JK
710MAKEINFO_EXTRA_FLAGS
711MAKEINFOFLAGS
712MAKEINFO
81ecdfbb
RW
713PACKAGE
714GNULIB_STDINT_H
81ecdfbb
RW
715CATOBJEXT
716GENCAT
717INSTOBJEXT
718DATADIRNAME
719CATALOGS
720POSUB
721GMSGFMT
722XGETTEXT
723INCINTL
724LIBINTL_DEP
725LIBINTL
726USE_NLS
727SET_MAKE
728GMAKE_FALSE
729GMAKE_TRUE
730MAKE
731CCDEPMODE
732DEPDIR
733am__leading_dot
3bc3d82a 734COMPILER
4869db5e
RM
735INSTALL_STRIP_PROGRAM
736STRIP
737install_sh
81ecdfbb
RW
738target_os
739target_vendor
740target_cpu
741target
742host_os
743host_vendor
744host_cpu
745host
746build_os
747build_vendor
748build_cpu
749build
c971b7fa
PA
750EGREP
751GREP
752CPP
3bc3d82a
PA
753ac_ct_CXX
754CXXFLAGS
755CXX
81ecdfbb
RW
756OBJEXT
757EXEEXT
758ac_ct_CC
759CPPFLAGS
760LDFLAGS
761CFLAGS
762CC
763MAINT
764MAINTAINER_MODE_FALSE
765MAINTAINER_MODE_TRUE
766target_alias
767host_alias
768build_alias
769LIBS
770ECHO_T
771ECHO_N
772ECHO_C
773DEFS
774mandir
775localedir
776libdir
777psdir
778pdfdir
779dvidir
780htmldir
781infodir
782docdir
783oldincludedir
784includedir
785localstatedir
786sharedstatedir
787sysconfdir
788datadir
789datarootdir
790libexecdir
791sbindir
792bindir
793program_transform_name
794prefix
795exec_prefix
796PACKAGE_URL
797PACKAGE_BUGREPORT
798PACKAGE_STRING
799PACKAGE_VERSION
800PACKAGE_TARNAME
801PACKAGE_NAME
802PATH_SEPARATOR
803SHELL'
a4ce5b0d 804ac_subst_files='host_makefile_frag'
81ecdfbb
RW
805ac_user_opts='
806enable_option_checking
807enable_maintainer_mode
da2f07f1
JK
808enable_plugins
809enable_largefile
3bc3d82a 810enable_build_with_cxx
81ecdfbb
RW
811with_separate_debug_dir
812with_gdb_datadir
813with_relocated_sources
7349ff92 814with_auto_load_dir
bccbefd2 815with_auto_load_safe_path
81ecdfbb
RW
816enable_targets
817enable_64_bit_bfd
818enable_gdbcli
819enable_gdbmi
820enable_tui
821enable_gdbtk
05e7c244 822with_libunwind_ia64
81ecdfbb
RW
823with_curses
824enable_profiling
825with_pkgversion
826with_bugurl
711a72d3 827with_system_zlib
016a3251
DD
828with_gnu_ld
829enable_rpath
81ecdfbb 830with_libiconv_prefix
478aac75 831with_iconv_bin
81ecdfbb 832with_system_readline
b8e0a31c 833with_jit_reader_dir
81ecdfbb 834with_expat
81ecdfbb
RW
835with_libexpat_prefix
836with_python
ed3ef339 837with_guile
a8db4212 838enable_libmcheck
58bfce93
MM
839with_intel_pt
840with_libipt_prefix
81ecdfbb
RW
841with_included_regex
842with_sysroot
843with_system_gdbinit
844enable_werror
845enable_build_warnings
846enable_gdb_build_warnings
608e2dbb
TT
847with_lzma
848with_liblzma_prefix
81ecdfbb
RW
849with_tcl
850with_tk
851with_x
852enable_sim
853enable_multi_ice
496c0e1b 854enable_gdbserver
393fd4c3
YQ
855with_babeltrace
856with_libbabeltrace_prefix
81ecdfbb
RW
857'
858 ac_precious_vars='build_alias
859host_alias
860target_alias
861CC
862CFLAGS
863LDFLAGS
864LIBS
865CPPFLAGS
3bc3d82a
PA
866CXX
867CXXFLAGS
868CCC
81ecdfbb 869CPP
f06e05e0
JK
870MAKEINFO
871MAKEINFOFLAGS
81ecdfbb
RW
872YACC
873YFLAGS
874XMKMF'
5ae98d25 875ac_subdirs_all='testsuite
81ecdfbb
RW
876gdbtk
877multi-ice
878gdbserver'
c906108c
SS
879
880# Initialize some variables set by options.
bec39cab
AC
881ac_init_help=
882ac_init_version=false
81ecdfbb
RW
883ac_unrecognized_opts=
884ac_unrecognized_sep=
c906108c
SS
885# The variables have the same names as the options, with
886# dashes changed to underlines.
bec39cab 887cache_file=/dev/null
c906108c 888exec_prefix=NONE
c906108c 889no_create=
c906108c
SS
890no_recursion=
891prefix=NONE
892program_prefix=NONE
893program_suffix=NONE
894program_transform_name=s,x,x,
895silent=
896site=
897srcdir=
c906108c
SS
898verbose=
899x_includes=NONE
900x_libraries=NONE
bec39cab
AC
901
902# Installation directory options.
903# These are left unexpanded so users can "make install exec_prefix=/foo"
904# and all the variables that are supposed to be based on exec_prefix
905# by default will actually change.
906# Use braces instead of parens because sh, perl, etc. also accept them.
81ecdfbb 907# (The list follows the same order as the GNU Coding Standards.)
c906108c
SS
908bindir='${exec_prefix}/bin'
909sbindir='${exec_prefix}/sbin'
910libexecdir='${exec_prefix}/libexec'
81ecdfbb
RW
911datarootdir='${prefix}/share'
912datadir='${datarootdir}'
c906108c
SS
913sysconfdir='${prefix}/etc'
914sharedstatedir='${prefix}/com'
915localstatedir='${prefix}/var'
c906108c
SS
916includedir='${prefix}/include'
917oldincludedir='/usr/include'
81ecdfbb
RW
918docdir='${datarootdir}/doc/${PACKAGE}'
919infodir='${datarootdir}/info'
920htmldir='${docdir}'
921dvidir='${docdir}'
922pdfdir='${docdir}'
923psdir='${docdir}'
924libdir='${exec_prefix}/lib'
925localedir='${datarootdir}/locale'
926mandir='${datarootdir}/man'
c906108c 927
c906108c 928ac_prev=
81ecdfbb 929ac_dashdash=
c906108c
SS
930for ac_option
931do
c906108c
SS
932 # If the previous option needs an argument, assign it.
933 if test -n "$ac_prev"; then
81ecdfbb 934 eval $ac_prev=\$ac_option
c906108c
SS
935 ac_prev=
936 continue
937 fi
938
81ecdfbb
RW
939 case $ac_option in
940 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
941 *) ac_optarg=yes ;;
942 esac
c906108c
SS
943
944 # Accept the important Cygnus configure options, so we can diagnose typos.
945
81ecdfbb
RW
946 case $ac_dashdash$ac_option in
947 --)
948 ac_dashdash=yes ;;
c906108c
SS
949
950 -bindir | --bindir | --bindi | --bind | --bin | --bi)
951 ac_prev=bindir ;;
952 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
bec39cab 953 bindir=$ac_optarg ;;
c906108c
SS
954
955 -build | --build | --buil | --bui | --bu)
bec39cab 956 ac_prev=build_alias ;;
c906108c 957 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
bec39cab 958 build_alias=$ac_optarg ;;
c906108c
SS
959
960 -cache-file | --cache-file | --cache-fil | --cache-fi \
961 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
962 ac_prev=cache_file ;;
963 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
964 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
bec39cab
AC
965 cache_file=$ac_optarg ;;
966
967 --config-cache | -C)
968 cache_file=config.cache ;;
c906108c 969
81ecdfbb 970 -datadir | --datadir | --datadi | --datad)
c906108c 971 ac_prev=datadir ;;
81ecdfbb 972 -datadir=* | --datadir=* | --datadi=* | --datad=*)
bec39cab 973 datadir=$ac_optarg ;;
c906108c 974
81ecdfbb
RW
975 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
976 | --dataroo | --dataro | --datar)
977 ac_prev=datarootdir ;;
978 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
979 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
980 datarootdir=$ac_optarg ;;
981
c906108c 982 -disable-* | --disable-*)
81ecdfbb 983 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
c906108c 984 # Reject names that are not valid shell variable names.
81ecdfbb
RW
985 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
986 as_fn_error "invalid feature name: $ac_useropt"
987 ac_useropt_orig=$ac_useropt
988 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
989 case $ac_user_opts in
990 *"
991"enable_$ac_useropt"
992"*) ;;
993 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
994 ac_unrecognized_sep=', ';;
995 esac
996 eval enable_$ac_useropt=no ;;
997
998 -docdir | --docdir | --docdi | --doc | --do)
999 ac_prev=docdir ;;
1000 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1001 docdir=$ac_optarg ;;
1002
1003 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1004 ac_prev=dvidir ;;
1005 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1006 dvidir=$ac_optarg ;;
c906108c
SS
1007
1008 -enable-* | --enable-*)
81ecdfbb 1009 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
c906108c 1010 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1011 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1012 as_fn_error "invalid feature name: $ac_useropt"
1013 ac_useropt_orig=$ac_useropt
1014 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1015 case $ac_user_opts in
1016 *"
1017"enable_$ac_useropt"
1018"*) ;;
1019 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1020 ac_unrecognized_sep=', ';;
b4e70030 1021 esac
81ecdfbb 1022 eval enable_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1023
1024 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1025 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1026 | --exec | --exe | --ex)
1027 ac_prev=exec_prefix ;;
1028 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1029 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1030 | --exec=* | --exe=* | --ex=*)
bec39cab 1031 exec_prefix=$ac_optarg ;;
c906108c
SS
1032
1033 -gas | --gas | --ga | --g)
1034 # Obsolete; use --with-gas.
1035 with_gas=yes ;;
1036
bec39cab
AC
1037 -help | --help | --hel | --he | -h)
1038 ac_init_help=long ;;
1039 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1040 ac_init_help=recursive ;;
1041 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1042 ac_init_help=short ;;
c906108c
SS
1043
1044 -host | --host | --hos | --ho)
bec39cab 1045 ac_prev=host_alias ;;
c906108c 1046 -host=* | --host=* | --hos=* | --ho=*)
bec39cab 1047 host_alias=$ac_optarg ;;
c906108c 1048
81ecdfbb
RW
1049 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1050 ac_prev=htmldir ;;
1051 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1052 | --ht=*)
1053 htmldir=$ac_optarg ;;
1054
c906108c
SS
1055 -includedir | --includedir | --includedi | --included | --include \
1056 | --includ | --inclu | --incl | --inc)
1057 ac_prev=includedir ;;
1058 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1059 | --includ=* | --inclu=* | --incl=* | --inc=*)
bec39cab 1060 includedir=$ac_optarg ;;
c906108c
SS
1061
1062 -infodir | --infodir | --infodi | --infod | --info | --inf)
1063 ac_prev=infodir ;;
1064 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
bec39cab 1065 infodir=$ac_optarg ;;
c906108c
SS
1066
1067 -libdir | --libdir | --libdi | --libd)
1068 ac_prev=libdir ;;
1069 -libdir=* | --libdir=* | --libdi=* | --libd=*)
bec39cab 1070 libdir=$ac_optarg ;;
c906108c
SS
1071
1072 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1073 | --libexe | --libex | --libe)
1074 ac_prev=libexecdir ;;
1075 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1076 | --libexe=* | --libex=* | --libe=*)
bec39cab 1077 libexecdir=$ac_optarg ;;
c906108c 1078
81ecdfbb
RW
1079 -localedir | --localedir | --localedi | --localed | --locale)
1080 ac_prev=localedir ;;
1081 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1082 localedir=$ac_optarg ;;
1083
c906108c 1084 -localstatedir | --localstatedir | --localstatedi | --localstated \
81ecdfbb 1085 | --localstate | --localstat | --localsta | --localst | --locals)
c906108c
SS
1086 ac_prev=localstatedir ;;
1087 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
81ecdfbb 1088 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
bec39cab 1089 localstatedir=$ac_optarg ;;
c906108c
SS
1090
1091 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1092 ac_prev=mandir ;;
1093 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
bec39cab 1094 mandir=$ac_optarg ;;
c906108c
SS
1095
1096 -nfp | --nfp | --nf)
1097 # Obsolete; use --without-fp.
1098 with_fp=no ;;
1099
1100 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
bec39cab 1101 | --no-cr | --no-c | -n)
c906108c
SS
1102 no_create=yes ;;
1103
1104 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1105 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1106 no_recursion=yes ;;
1107
1108 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1109 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1110 | --oldin | --oldi | --old | --ol | --o)
1111 ac_prev=oldincludedir ;;
1112 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1113 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1114 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
bec39cab 1115 oldincludedir=$ac_optarg ;;
c906108c
SS
1116
1117 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1118 ac_prev=prefix ;;
1119 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
bec39cab 1120 prefix=$ac_optarg ;;
c906108c
SS
1121
1122 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1123 | --program-pre | --program-pr | --program-p)
1124 ac_prev=program_prefix ;;
1125 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1126 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
bec39cab 1127 program_prefix=$ac_optarg ;;
c906108c
SS
1128
1129 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1130 | --program-suf | --program-su | --program-s)
1131 ac_prev=program_suffix ;;
1132 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1133 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
bec39cab 1134 program_suffix=$ac_optarg ;;
c906108c
SS
1135
1136 -program-transform-name | --program-transform-name \
1137 | --program-transform-nam | --program-transform-na \
1138 | --program-transform-n | --program-transform- \
1139 | --program-transform | --program-transfor \
1140 | --program-transfo | --program-transf \
1141 | --program-trans | --program-tran \
1142 | --progr-tra | --program-tr | --program-t)
1143 ac_prev=program_transform_name ;;
1144 -program-transform-name=* | --program-transform-name=* \
1145 | --program-transform-nam=* | --program-transform-na=* \
1146 | --program-transform-n=* | --program-transform-=* \
1147 | --program-transform=* | --program-transfor=* \
1148 | --program-transfo=* | --program-transf=* \
1149 | --program-trans=* | --program-tran=* \
1150 | --progr-tra=* | --program-tr=* | --program-t=*)
bec39cab 1151 program_transform_name=$ac_optarg ;;
c906108c 1152
81ecdfbb
RW
1153 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1154 ac_prev=pdfdir ;;
1155 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1156 pdfdir=$ac_optarg ;;
1157
1158 -psdir | --psdir | --psdi | --psd | --ps)
1159 ac_prev=psdir ;;
1160 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1161 psdir=$ac_optarg ;;
1162
c906108c
SS
1163 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1164 | -silent | --silent | --silen | --sile | --sil)
1165 silent=yes ;;
1166
1167 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1168 ac_prev=sbindir ;;
1169 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1170 | --sbi=* | --sb=*)
bec39cab 1171 sbindir=$ac_optarg ;;
c906108c
SS
1172
1173 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1174 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1175 | --sharedst | --shareds | --shared | --share | --shar \
1176 | --sha | --sh)
1177 ac_prev=sharedstatedir ;;
1178 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1179 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1180 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1181 | --sha=* | --sh=*)
bec39cab 1182 sharedstatedir=$ac_optarg ;;
c906108c
SS
1183
1184 -site | --site | --sit)
1185 ac_prev=site ;;
1186 -site=* | --site=* | --sit=*)
bec39cab 1187 site=$ac_optarg ;;
3ace7edb 1188
c906108c
SS
1189 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1190 ac_prev=srcdir ;;
1191 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
bec39cab 1192 srcdir=$ac_optarg ;;
c906108c
SS
1193
1194 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1195 | --syscon | --sysco | --sysc | --sys | --sy)
1196 ac_prev=sysconfdir ;;
1197 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1198 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
bec39cab 1199 sysconfdir=$ac_optarg ;;
c906108c
SS
1200
1201 -target | --target | --targe | --targ | --tar | --ta | --t)
bec39cab 1202 ac_prev=target_alias ;;
c906108c 1203 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
bec39cab 1204 target_alias=$ac_optarg ;;
c906108c
SS
1205
1206 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1207 verbose=yes ;;
1208
bec39cab
AC
1209 -version | --version | --versio | --versi | --vers | -V)
1210 ac_init_version=: ;;
c906108c
SS
1211
1212 -with-* | --with-*)
81ecdfbb 1213 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
c906108c 1214 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1215 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1216 as_fn_error "invalid package name: $ac_useropt"
1217 ac_useropt_orig=$ac_useropt
1218 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1219 case $ac_user_opts in
1220 *"
1221"with_$ac_useropt"
1222"*) ;;
1223 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1224 ac_unrecognized_sep=', ';;
b4e70030 1225 esac
81ecdfbb 1226 eval with_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1227
1228 -without-* | --without-*)
81ecdfbb 1229 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
c906108c 1230 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1231 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1232 as_fn_error "invalid package name: $ac_useropt"
1233 ac_useropt_orig=$ac_useropt
1234 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1235 case $ac_user_opts in
1236 *"
1237"with_$ac_useropt"
1238"*) ;;
1239 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1240 ac_unrecognized_sep=', ';;
1241 esac
1242 eval with_$ac_useropt=no ;;
c906108c
SS
1243
1244 --x)
1245 # Obsolete; use --with-x.
1246 with_x=yes ;;
1247
1248 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1249 | --x-incl | --x-inc | --x-in | --x-i)
1250 ac_prev=x_includes ;;
1251 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1252 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
bec39cab 1253 x_includes=$ac_optarg ;;
c906108c
SS
1254
1255 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1256 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1257 ac_prev=x_libraries ;;
1258 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1259 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
bec39cab 1260 x_libraries=$ac_optarg ;;
c906108c 1261
81ecdfbb
RW
1262 -*) as_fn_error "unrecognized option: \`$ac_option'
1263Try \`$0 --help' for more information."
c906108c
SS
1264 ;;
1265
bec39cab
AC
1266 *=*)
1267 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1268 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1269 case $ac_envvar in #(
1270 '' | [0-9]* | *[!_$as_cr_alnum]* )
1271 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1272 esac
1273 eval $ac_envvar=\$ac_optarg
bec39cab
AC
1274 export $ac_envvar ;;
1275
c906108c 1276 *)
bec39cab 1277 # FIXME: should be removed in autoconf 3.0.
81ecdfbb 1278 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
bec39cab 1279 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
81ecdfbb 1280 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
bec39cab 1281 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
c906108c
SS
1282 ;;
1283
1284 esac
1285done
1286
1287if test -n "$ac_prev"; then
bec39cab 1288 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
81ecdfbb 1289 as_fn_error "missing argument to $ac_option"
c906108c 1290fi
c906108c 1291
81ecdfbb
RW
1292if test -n "$ac_unrecognized_opts"; then
1293 case $enable_option_checking in
1294 no) ;;
1295 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
1296 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
b4e70030 1297 esac
81ecdfbb 1298fi
b4e70030 1299
81ecdfbb
RW
1300# Check all directory arguments for consistency.
1301for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1302 datadir sysconfdir sharedstatedir localstatedir includedir \
1303 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1304 libdir localedir mandir
b4e70030 1305do
81ecdfbb
RW
1306 eval ac_val=\$$ac_var
1307 # Remove trailing slashes.
1308 case $ac_val in
1309 */ )
1310 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1311 eval $ac_var=\$ac_val;;
1312 esac
1313 # Be sure to have absolute directory names.
b4e70030 1314 case $ac_val in
81ecdfbb
RW
1315 [\\/$]* | ?:[\\/]* ) continue;;
1316 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
c906108c 1317 esac
81ecdfbb 1318 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
c906108c
SS
1319done
1320
bec39cab
AC
1321# There might be people who depend on the old broken behavior: `$host'
1322# used to hold the argument of --host etc.
1323# FIXME: To remove some day.
1324build=$build_alias
1325host=$host_alias
1326target=$target_alias
1327
1328# FIXME: To remove some day.
1329if test "x$host_alias" != x; then
1330 if test "x$build_alias" = x; then
1331 cross_compiling=maybe
81ecdfbb 1332 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
bec39cab
AC
1333 If a cross compiler is detected then cross compile mode will be used." >&2
1334 elif test "x$build_alias" != "x$host_alias"; then
1335 cross_compiling=yes
1336 fi
1337fi
c906108c 1338
bec39cab
AC
1339ac_tool_prefix=
1340test -n "$host_alias" && ac_tool_prefix=$host_alias-
1341
1342test "$silent" = yes && exec 6>/dev/null
c906108c 1343
c906108c 1344
81ecdfbb
RW
1345ac_pwd=`pwd` && test -n "$ac_pwd" &&
1346ac_ls_di=`ls -di .` &&
1347ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1348 as_fn_error "working directory cannot be determined"
1349test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1350 as_fn_error "pwd does not report name of working directory"
1351
1352
c906108c
SS
1353# Find the source files, if location was not specified.
1354if test -z "$srcdir"; then
1355 ac_srcdir_defaulted=yes
81ecdfbb
RW
1356 # Try the directory containing this script, then the parent directory.
1357 ac_confdir=`$as_dirname -- "$as_myself" ||
1358$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1359 X"$as_myself" : 'X\(//\)[^/]' \| \
1360 X"$as_myself" : 'X\(//\)$' \| \
1361 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1362$as_echo X"$as_myself" |
1363 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1364 s//\1/
1365 q
1366 }
1367 /^X\(\/\/\)[^/].*/{
1368 s//\1/
1369 q
1370 }
1371 /^X\(\/\/\)$/{
1372 s//\1/
1373 q
1374 }
1375 /^X\(\/\).*/{
1376 s//\1/
1377 q
1378 }
1379 s/.*/./; q'`
c906108c 1380 srcdir=$ac_confdir
81ecdfbb 1381 if test ! -r "$srcdir/$ac_unique_file"; then
c906108c
SS
1382 srcdir=..
1383 fi
1384else
1385 ac_srcdir_defaulted=no
1386fi
81ecdfbb
RW
1387if test ! -r "$srcdir/$ac_unique_file"; then
1388 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1389 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
1390fi
1391ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1392ac_abs_confdir=`(
1393 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
1394 pwd)`
1395# When building in place, set srcdir=.
1396if test "$ac_abs_confdir" = "$ac_pwd"; then
1397 srcdir=.
1398fi
1399# Remove unnecessary trailing slashes from srcdir.
1400# Double slashes in file names in object file debugging info
1401# mess up M-x gdb in Emacs.
1402case $srcdir in
1403*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1404esac
1405for ac_var in $ac_precious_vars; do
1406 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1407 eval ac_env_${ac_var}_value=\$${ac_var}
1408 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1409 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1410done
c906108c 1411
bec39cab
AC
1412#
1413# Report the --help message.
1414#
1415if test "$ac_init_help" = "long"; then
1416 # Omit some internal or obsolete options to make the list less imposing.
1417 # This message is too long to be a string in the A/UX 3.1 sh.
1418 cat <<_ACEOF
1419\`configure' configures this package to adapt to many kinds of systems.
1420
1421Usage: $0 [OPTION]... [VAR=VALUE]...
1422
1423To assign environment variables (e.g., CC, CFLAGS...), specify them as
1424VAR=VALUE. See below for descriptions of some of the useful variables.
1425
1426Defaults for the options are specified in brackets.
1427
1428Configuration:
1429 -h, --help display this help and exit
1430 --help=short display options specific to this package
1431 --help=recursive display the short help of all the included packages
1432 -V, --version display version information and exit
1433 -q, --quiet, --silent do not print \`checking...' messages
1434 --cache-file=FILE cache test results in FILE [disabled]
1435 -C, --config-cache alias for \`--cache-file=config.cache'
1436 -n, --no-create do not create output files
1437 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1438
bec39cab
AC
1439Installation directories:
1440 --prefix=PREFIX install architecture-independent files in PREFIX
81ecdfbb 1441 [$ac_default_prefix]
bec39cab 1442 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
81ecdfbb 1443 [PREFIX]
bec39cab
AC
1444
1445By default, \`make install' will install all the files in
1446\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1447an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1448for instance \`--prefix=\$HOME'.
1449
1450For better control, use the options below.
1451
1452Fine tuning of the installation directories:
81ecdfbb
RW
1453 --bindir=DIR user executables [EPREFIX/bin]
1454 --sbindir=DIR system admin executables [EPREFIX/sbin]
1455 --libexecdir=DIR program executables [EPREFIX/libexec]
1456 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1457 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1458 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1459 --libdir=DIR object code libraries [EPREFIX/lib]
1460 --includedir=DIR C header files [PREFIX/include]
1461 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1462 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1463 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1464 --infodir=DIR info documentation [DATAROOTDIR/info]
1465 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1466 --mandir=DIR man documentation [DATAROOTDIR/man]
1467 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1468 --htmldir=DIR html documentation [DOCDIR]
1469 --dvidir=DIR dvi documentation [DOCDIR]
1470 --pdfdir=DIR pdf documentation [DOCDIR]
1471 --psdir=DIR ps documentation [DOCDIR]
bec39cab
AC
1472_ACEOF
1473
1474 cat <<\_ACEOF
1475
9009e1ae
MR
1476Program names:
1477 --program-prefix=PREFIX prepend PREFIX to installed program names
1478 --program-suffix=SUFFIX append SUFFIX to installed program names
1479 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1480
bec39cab
AC
1481X features:
1482 --x-includes=DIR X include files are in DIR
1483 --x-libraries=DIR X library files are in DIR
1484
1485System types:
1486 --build=BUILD configure for building on BUILD [guessed]
1487 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1488 --target=TARGET configure for building compilers for TARGET [HOST]
1489_ACEOF
1490fi
1491
1492if test -n "$ac_init_help"; then
1493
1494 cat <<\_ACEOF
1495
1496Optional Features:
81ecdfbb 1497 --disable-option-checking ignore unrecognized --enable/--with options
bec39cab
AC
1498 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1499 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
85981d60
AC
1500 --enable-maintainer-mode enable make rules and dependencies not useful
1501 (and sometimes confusing) to the casual installer
2974be62 1502 --enable-plugins Enable support for plugins
da2f07f1 1503 --disable-largefile omit support for large files
3bc3d82a 1504 --enable-build-with-cxx build with C++ compiler instead of C compiler
a1220294
TT
1505 --enable-targets=TARGETS
1506 alternative target configurations
c0993dbe 1507 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
bec39cab
AC
1508 --disable-gdbcli disable command-line interface (CLI)
1509 --disable-gdbmi disable machine-interface (MI)
1510 --enable-tui enable full-screen terminal user interface (TUI)
1511 --enable-gdbtk enable gdbtk graphical user interface (GUI)
1512 --enable-profiling enable profiling of GDB
3841debe 1513 --disable-rpath do not hardcode runtime library paths
17ef446e 1514 --enable-libmcheck Try linking with -lmcheck if available
a1220294 1515 --enable-werror treat compile warnings as errors
32c1c914 1516 --enable-build-warnings enable build-time compiler warnings if gcc is used
a1220294 1517 --enable-gdb-build-warnings
32c1c914 1518 enable GDB specific build-time compiler warnings if
a1220294 1519 gcc is used
32c1c914 1520 --enable-sim link gdb with simulator
bec39cab 1521 --enable-multi-ice build the multi-ice-gdb-server
496c0e1b
JB
1522 --enable-gdbserver automatically build gdbserver (yes/no/auto, default
1523 is auto)
bec39cab
AC
1524
1525Optional Packages:
1526 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1527 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
a1220294 1528 --with-separate-debug-dir=PATH
32c1c914 1529 look for global separate debug info in this path
62e4f60c 1530 [LIBDIR/debug]
b14b1491
TT
1531 --with-gdb-datadir=PATH look for global separate data files in this path
1532 [DATADIR/gdb]
29b0e8a2 1533 --with-relocated-sources=PATH
32c1c914 1534 automatically relocate this path for source files
7349ff92 1535 --with-auto-load-dir=PATH
aff139ff 1536 directories from which to load auto-loaded scripts
1564a261 1537 [$debugdir:$datadir/auto-load]
bccbefd2 1538 --with-auto-load-safe-path=PATH
aff139ff 1539 directories safe to hold auto-loaded files
7349ff92 1540 [--with-auto-load-dir]
bccbefd2
JK
1541 --without-auto-load-safe-path
1542 do not restrict auto-loaded files locations
05e7c244 1543 --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets
cb01cfba
JB
1544 --with-curses use the curses library instead of the termcap
1545 library
c16158bc
JM
1546 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
1547 --with-bugurl=URL Direct users to URL to report a bug
711a72d3 1548 --with-system-zlib use installed libz
016a3251
DD
1549 --with-gnu-ld assume the C compiler uses GNU ld default=no
1550 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
1551 --without-libiconv-prefix don't search for libiconv in includedir and libdir
478aac75 1552 --with-iconv-bin=PATH specify where to find the iconv program
6a30b0a5 1553 --with-system-readline use installed readline library
b8e0a31c
SD
1554 --with-jit-reader-dir=PATH
1555 directory to load the JIT readers from
5c39566f 1556 --with-expat include expat support (auto/yes/no)
3841debe
DJ
1557 --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib
1558 --without-libexpat-prefix don't search for libexpat in includedir and libdir
0c4a4063
DE
1559 --with-python[=PYTHON] include python support
1560 (auto/yes/no/<python-program>)
ed3ef339
DE
1561 --with-guile[=GUILE] include guile support
1562 (auto/yes/no/<guile-version>/<pkg-config-program>)
5599c404
MM
1563 --with-intel-pt include Intel(R) Processor Trace support
1564 (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
54019719
PA
2404
2405# ac_fn_cxx_check_decl LINENO SYMBOL VAR
2406# --------------------------------------
2407# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2408ac_fn_cxx_check_decl ()
2409{
2410 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2411 as_decl_name=`echo $2|sed 's/ *(.*//'`
2412 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2413 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2414$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2415if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2416 $as_echo_n "(cached) " >&6
2417else
2418 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2419/* end confdefs.h. */
2420$4
2421int
2422main ()
2423{
2424#ifndef $as_decl_name
2425#ifdef __cplusplus
2426 (void) $as_decl_use;
2427#else
2428 (void) $as_decl_name;
2429#endif
2430#endif
2431
2432 ;
2433 return 0;
2434}
2435_ACEOF
2436if ac_fn_cxx_try_compile "$LINENO"; then :
2437 eval "$3=yes"
2438else
2439 eval "$3=no"
2440fi
2441rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2442fi
2443eval ac_res=\$$3
2444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2445$as_echo "$ac_res" >&6; }
2446 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2447
2448} # ac_fn_cxx_check_decl
81ecdfbb
RW
2449cat >config.log <<_ACEOF
2450This file contains any messages produced by compilers while
2451running configure, to aid debugging if configure makes a mistake.
d5af19ba 2452
81ecdfbb
RW
2453It was created by $as_me, which was
2454generated by GNU Autoconf 2.64. Invocation command line was
b4e70030 2455
81ecdfbb 2456 $ $0 $@
413ccac7 2457
81ecdfbb
RW
2458_ACEOF
2459exec 5>>config.log
2460{
2461cat <<_ASUNAME
2462## --------- ##
2463## Platform. ##
2464## --------- ##
413ccac7 2465
81ecdfbb
RW
2466hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2467uname -m = `(uname -m) 2>/dev/null || echo unknown`
2468uname -r = `(uname -r) 2>/dev/null || echo unknown`
2469uname -s = `(uname -s) 2>/dev/null || echo unknown`
2470uname -v = `(uname -v) 2>/dev/null || echo unknown`
85981d60 2471
81ecdfbb
RW
2472/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2473/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
413ccac7 2474
81ecdfbb
RW
2475/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2476/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2477/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2478/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2479/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2480/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2481/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
c906108c 2482
81ecdfbb 2483_ASUNAME
bec39cab 2484
bec39cab
AC
2485as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2486for as_dir in $PATH
2487do
2488 IFS=$as_save_IFS
2489 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2490 $as_echo "PATH: $as_dir"
2491 done
2492IFS=$as_save_IFS
bec39cab 2493
81ecdfbb 2494} >&5
bec39cab 2495
81ecdfbb 2496cat >&5 <<_ACEOF
bec39cab 2497
bec39cab 2498
81ecdfbb
RW
2499## ----------- ##
2500## Core tests. ##
2501## ----------- ##
2502
2503_ACEOF
2504
2505
2506# Keep a trace of the command line.
2507# Strip out --no-create and --no-recursion so they do not pile up.
2508# Strip out --silent because we don't want to record it for future runs.
2509# Also quote any args containing shell meta-characters.
2510# Make two passes to allow for proper duplicate-argument suppression.
2511ac_configure_args=
2512ac_configure_args0=
2513ac_configure_args1=
2514ac_must_keep_next=false
2515for ac_pass in 1 2
2516do
2517 for ac_arg
2518 do
2519 case $ac_arg in
2520 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2521 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2522 | -silent | --silent | --silen | --sile | --sil)
2523 continue ;;
2524 *\'*)
2525 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2526 esac
2527 case $ac_pass in
2528 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2529 2)
2530 as_fn_append ac_configure_args1 " '$ac_arg'"
2531 if test $ac_must_keep_next = true; then
2532 ac_must_keep_next=false # Got value, back to normal.
2533 else
2534 case $ac_arg in
2535 *=* | --config-cache | -C | -disable-* | --disable-* \
2536 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2537 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2538 | -with-* | --with-* | -without-* | --without-* | --x)
2539 case "$ac_configure_args0 " in
2540 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2541 esac
2542 ;;
2543 -* ) ac_must_keep_next=true ;;
2544 esac
2545 fi
2546 as_fn_append ac_configure_args " '$ac_arg'"
2547 ;;
2548 esac
2549 done
2550done
2551{ ac_configure_args0=; unset ac_configure_args0;}
2552{ ac_configure_args1=; unset ac_configure_args1;}
2553
2554# When interrupted or exit'd, cleanup temporary files, and complete
2555# config.log. We remove comments because anyway the quotes in there
2556# would cause problems or look ugly.
2557# WARNING: Use '\'' to represent an apostrophe within the trap.
2558# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2559trap 'exit_status=$?
2560 # Save into config.log some information that might help in debugging.
2561 {
2562 echo
2563
2564 cat <<\_ASBOX
2565## ---------------- ##
2566## Cache variables. ##
2567## ---------------- ##
2568_ASBOX
2569 echo
2570 # The following way of writing the cache mishandles newlines in values,
2571(
2572 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2573 eval ac_val=\$$ac_var
2574 case $ac_val in #(
2575 *${as_nl}*)
2576 case $ac_var in #(
2577 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2578$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2579 esac
2580 case $ac_var in #(
2581 _ | IFS | as_nl) ;; #(
2582 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2583 *) { eval $ac_var=; unset $ac_var;} ;;
2584 esac ;;
2585 esac
2586 done
2587 (set) 2>&1 |
2588 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2589 *${as_nl}ac_space=\ *)
2590 sed -n \
2591 "s/'\''/'\''\\\\'\'''\''/g;
2592 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2593 ;; #(
2594 *)
2595 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2596 ;;
2597 esac |
2598 sort
2599)
2600 echo
2601
2602 cat <<\_ASBOX
2603## ----------------- ##
2604## Output variables. ##
2605## ----------------- ##
2606_ASBOX
2607 echo
2608 for ac_var in $ac_subst_vars
2609 do
2610 eval ac_val=\$$ac_var
2611 case $ac_val in
2612 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2613 esac
2614 $as_echo "$ac_var='\''$ac_val'\''"
2615 done | sort
2616 echo
2617
2618 if test -n "$ac_subst_files"; then
2619 cat <<\_ASBOX
2620## ------------------- ##
2621## File substitutions. ##
2622## ------------------- ##
2623_ASBOX
2624 echo
2625 for ac_var in $ac_subst_files
2626 do
2627 eval ac_val=\$$ac_var
2628 case $ac_val in
2629 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2630 esac
2631 $as_echo "$ac_var='\''$ac_val'\''"
2632 done | sort
2633 echo
2634 fi
2635
2636 if test -s confdefs.h; then
2637 cat <<\_ASBOX
2638## ----------- ##
2639## confdefs.h. ##
2640## ----------- ##
2641_ASBOX
2642 echo
2643 cat confdefs.h
2644 echo
2645 fi
2646 test "$ac_signal" != 0 &&
2647 $as_echo "$as_me: caught signal $ac_signal"
2648 $as_echo "$as_me: exit $exit_status"
2649 } >&5
2650 rm -f core *.core core.conftest.* &&
2651 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2652 exit $exit_status
2653' 0
2654for ac_signal in 1 2 13 15; do
2655 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2656done
2657ac_signal=0
2658
2659# confdefs.h avoids OS command line length limits that DEFS can exceed.
2660rm -f -r conftest* confdefs.h
2661
2662$as_echo "/* confdefs.h */" > confdefs.h
2663
2664# Predefined preprocessor variables.
2665
2666cat >>confdefs.h <<_ACEOF
2667#define PACKAGE_NAME "$PACKAGE_NAME"
2668_ACEOF
2669
2670cat >>confdefs.h <<_ACEOF
2671#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2672_ACEOF
2673
2674cat >>confdefs.h <<_ACEOF
2675#define PACKAGE_VERSION "$PACKAGE_VERSION"
2676_ACEOF
2677
2678cat >>confdefs.h <<_ACEOF
2679#define PACKAGE_STRING "$PACKAGE_STRING"
2680_ACEOF
2681
2682cat >>confdefs.h <<_ACEOF
2683#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2684_ACEOF
2685
2686cat >>confdefs.h <<_ACEOF
2687#define PACKAGE_URL "$PACKAGE_URL"
2688_ACEOF
2689
2690
2691# Let the site file select an alternate cache file if it wants to.
2692# Prefer an explicitly selected file to automatically selected ones.
2693ac_site_file1=NONE
2694ac_site_file2=NONE
2695if test -n "$CONFIG_SITE"; then
2696 ac_site_file1=$CONFIG_SITE
2697elif test "x$prefix" != xNONE; then
2698 ac_site_file1=$prefix/share/config.site
2699 ac_site_file2=$prefix/etc/config.site
2700else
2701 ac_site_file1=$ac_default_prefix/share/config.site
2702 ac_site_file2=$ac_default_prefix/etc/config.site
2703fi
2704for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2705do
2706 test "x$ac_site_file" = xNONE && continue
2707 if test -r "$ac_site_file"; then
2708 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2709$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2710 sed 's/^/| /' "$ac_site_file" >&5
2711 . "$ac_site_file"
2712 fi
2713done
2714
2715if test -r "$cache_file"; then
2716 # Some versions of bash will fail to source /dev/null (special
2717 # files actually), so we avoid doing that.
2718 if test -f "$cache_file"; then
2719 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2720$as_echo "$as_me: loading cache $cache_file" >&6;}
2721 case $cache_file in
2722 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2723 *) . "./$cache_file";;
2724 esac
2725 fi
2726else
2727 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2728$as_echo "$as_me: creating cache $cache_file" >&6;}
2729 >$cache_file
bec39cab
AC
2730fi
2731
81ecdfbb
RW
2732# Check that the precious variables saved in the cache have kept the same
2733# value.
2734ac_cache_corrupted=false
2735for ac_var in $ac_precious_vars; do
2736 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2737 eval ac_new_set=\$ac_env_${ac_var}_set
2738 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2739 eval ac_new_val=\$ac_env_${ac_var}_value
2740 case $ac_old_set,$ac_new_set in
2741 set,)
2742 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2743$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2744 ac_cache_corrupted=: ;;
2745 ,set)
2746 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2747$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2748 ac_cache_corrupted=: ;;
2749 ,);;
2750 *)
2751 if test "x$ac_old_val" != "x$ac_new_val"; then
2752 # differences in whitespace do not lead to failure.
2753 ac_old_val_w=`echo x $ac_old_val`
2754 ac_new_val_w=`echo x $ac_new_val`
2755 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2756 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2757$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2758 ac_cache_corrupted=:
2759 else
2760 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2761$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2762 eval $ac_var=\$ac_old_val
2763 fi
2764 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2765$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2766 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2767$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2768 fi;;
2769 esac
2770 # Pass precious variables to config.status.
2771 if test "$ac_new_set" = set; then
2772 case $ac_new_val in
2773 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2774 *) ac_arg=$ac_var=$ac_new_val ;;
2775 esac
2776 case " $ac_configure_args " in
2777 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2778 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2779 esac
2780 fi
2781done
2782if $ac_cache_corrupted; then
2783 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2784$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2785 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2786$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2787 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2788fi
2789## -------------------- ##
2790## Main body of script. ##
2791## -------------------- ##
2792
2793ac_ext=c
2794ac_cpp='$CPP $CPPFLAGS'
2795ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2796ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2797ac_compiler_gnu=$ac_cv_c_compiler_gnu
2798
2799
2800
2801
2802
2803ac_config_headers="$ac_config_headers config.h:config.in"
2804
2805
2806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2807$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2808 # Check whether --enable-maintainer-mode was given.
2809if test "${enable_maintainer_mode+set}" = set; then :
2810 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2811else
2812 USE_MAINTAINER_MODE=no
2813fi
2814
2815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
2816$as_echo "$USE_MAINTAINER_MODE" >&6; }
2817 if test $USE_MAINTAINER_MODE = yes; then
2818 MAINTAINER_MODE_TRUE=
2819 MAINTAINER_MODE_FALSE='#'
2820else
2821 MAINTAINER_MODE_TRUE='#'
2822 MAINTAINER_MODE_FALSE=
2823fi
2824
2825 MAINT=$MAINTAINER_MODE_TRUE
2826
2827
2828
17ef446e 2829# Set the 'development' global.
270c9937 2830. $srcdir/../bfd/development.sh
f5f1cdb6 2831
81ecdfbb
RW
2832ac_ext=c
2833ac_cpp='$CPP $CPPFLAGS'
2834ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2835ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2836ac_compiler_gnu=$ac_cv_c_compiler_gnu
2837if test -n "$ac_tool_prefix"; then
2838 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2839set dummy ${ac_tool_prefix}gcc; ac_word=$2
2840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2841$as_echo_n "checking for $ac_word... " >&6; }
2842if test "${ac_cv_prog_CC+set}" = set; then :
2843 $as_echo_n "(cached) " >&6
c906108c
SS
2844else
2845 if test -n "$CC"; then
2846 ac_cv_prog_CC="$CC" # Let the user override the test.
2847else
bec39cab
AC
2848as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2849for as_dir in $PATH
2850do
2851 IFS=$as_save_IFS
2852 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2853 for ac_exec_ext in '' $ac_executable_extensions; do
2854 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2855 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2856 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2857 break 2
2858 fi
2859done
81ecdfbb
RW
2860 done
2861IFS=$as_save_IFS
bec39cab 2862
c906108c
SS
2863fi
2864fi
bec39cab 2865CC=$ac_cv_prog_CC
c906108c 2866if test -n "$CC"; then
81ecdfbb
RW
2867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2868$as_echo "$CC" >&6; }
c906108c 2869else
81ecdfbb
RW
2870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2871$as_echo "no" >&6; }
c906108c
SS
2872fi
2873
81ecdfbb 2874
b4e70030
JB
2875fi
2876if test -z "$ac_cv_prog_CC"; then
2877 ac_ct_CC=$CC
81ecdfbb
RW
2878 # Extract the first word of "gcc", so it can be a program name with args.
2879set dummy gcc; ac_word=$2
2880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2881$as_echo_n "checking for $ac_word... " >&6; }
2882if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
2883 $as_echo_n "(cached) " >&6
b4e70030
JB
2884else
2885 if test -n "$ac_ct_CC"; then
2886 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2887else
2888as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2889for as_dir in $PATH
2890do
2891 IFS=$as_save_IFS
2892 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2893 for ac_exec_ext in '' $ac_executable_extensions; do
2894 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2895 ac_cv_prog_ac_ct_CC="gcc"
2896 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b4e70030 2897 break 2
4e8d927d 2898 fi
b4e70030 2899done
81ecdfbb
RW
2900 done
2901IFS=$as_save_IFS
b4e70030
JB
2902
2903fi
2904fi
2905ac_ct_CC=$ac_cv_prog_ac_ct_CC
2906if test -n "$ac_ct_CC"; then
81ecdfbb
RW
2907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2908$as_echo "$ac_ct_CC" >&6; }
b4e70030 2909else
81ecdfbb
RW
2910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2911$as_echo "no" >&6; }
b4e70030
JB
2912fi
2913
81ecdfbb
RW
2914 if test "x$ac_ct_CC" = x; then
2915 CC=""
2916 else
2917 case $cross_compiling:$ac_tool_warned in
2918yes:)
2919{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2920$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2921ac_tool_warned=yes ;;
2922esac
2923 CC=$ac_ct_CC
2924 fi
b4e70030
JB
2925else
2926 CC="$ac_cv_prog_CC"
2927fi
2928
c906108c 2929if test -z "$CC"; then
81ecdfbb
RW
2930 if test -n "$ac_tool_prefix"; then
2931 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2932set dummy ${ac_tool_prefix}cc; ac_word=$2
2933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2934$as_echo_n "checking for $ac_word... " >&6; }
2935if test "${ac_cv_prog_CC+set}" = set; then :
2936 $as_echo_n "(cached) " >&6
c906108c
SS
2937else
2938 if test -n "$CC"; then
2939 ac_cv_prog_CC="$CC" # Let the user override the test.
2940else
bec39cab
AC
2941as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2942for as_dir in $PATH
2943do
2944 IFS=$as_save_IFS
2945 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2946 for ac_exec_ext in '' $ac_executable_extensions; do
2947 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2948 ac_cv_prog_CC="${ac_tool_prefix}cc"
2949 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2950 break 2
2951 fi
2952done
81ecdfbb
RW
2953 done
2954IFS=$as_save_IFS
2955
2956fi
2957fi
2958CC=$ac_cv_prog_CC
2959if test -n "$CC"; then
2960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2961$as_echo "$CC" >&6; }
2962else
2963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2964$as_echo "no" >&6; }
2965fi
2966
2967
2968 fi
2969fi
2970if test -z "$CC"; then
2971 # Extract the first word of "cc", so it can be a program name with args.
2972set dummy cc; ac_word=$2
2973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2974$as_echo_n "checking for $ac_word... " >&6; }
2975if test "${ac_cv_prog_CC+set}" = set; then :
2976 $as_echo_n "(cached) " >&6
2977else
2978 if test -n "$CC"; then
2979 ac_cv_prog_CC="$CC" # Let the user override the test.
2980else
2981 ac_prog_rejected=no
2982as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2983for as_dir in $PATH
2984do
2985 IFS=$as_save_IFS
2986 test -z "$as_dir" && as_dir=.
2987 for ac_exec_ext in '' $ac_executable_extensions; do
2988 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2989 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2990 ac_prog_rejected=yes
2991 continue
2992 fi
2993 ac_cv_prog_CC="cc"
2994 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2995 break 2
2996 fi
2997done
2998 done
2999IFS=$as_save_IFS
bec39cab 3000
c906108c
SS
3001if test $ac_prog_rejected = yes; then
3002 # We found a bogon in the path, so make sure we never use it.
3003 set dummy $ac_cv_prog_CC
3004 shift
bec39cab 3005 if test $# != 0; then
c906108c
SS
3006 # We chose a different compiler from the bogus one.
3007 # However, it has the same basename, so the bogon will be chosen
3008 # first if we set CC to just the basename; use the full file name.
3009 shift
bec39cab 3010 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
c906108c
SS
3011 fi
3012fi
3013fi
3014fi
bec39cab 3015CC=$ac_cv_prog_CC
c906108c 3016if test -n "$CC"; then
81ecdfbb
RW
3017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3018$as_echo "$CC" >&6; }
c906108c 3019else
81ecdfbb
RW
3020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3021$as_echo "no" >&6; }
c906108c
SS
3022fi
3023
81ecdfbb 3024
bec39cab
AC
3025fi
3026if test -z "$CC"; then
3027 if test -n "$ac_tool_prefix"; then
81ecdfbb 3028 for ac_prog in cl.exe
bec39cab
AC
3029 do
3030 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3031set dummy $ac_tool_prefix$ac_prog; ac_word=$2
81ecdfbb
RW
3032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3033$as_echo_n "checking for $ac_word... " >&6; }
3034if test "${ac_cv_prog_CC+set}" = set; then :
3035 $as_echo_n "(cached) " >&6
c906108c
SS
3036else
3037 if test -n "$CC"; then
3038 ac_cv_prog_CC="$CC" # Let the user override the test.
3039else
bec39cab
AC
3040as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3041for as_dir in $PATH
3042do
3043 IFS=$as_save_IFS
3044 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
3045 for ac_exec_ext in '' $ac_executable_extensions; do
3046 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 3047 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
81ecdfbb 3048 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
3049 break 2
3050 fi
3051done
81ecdfbb
RW
3052 done
3053IFS=$as_save_IFS
bec39cab 3054
c906108c
SS
3055fi
3056fi
bec39cab 3057CC=$ac_cv_prog_CC
c906108c 3058if test -n "$CC"; then
81ecdfbb
RW
3059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3060$as_echo "$CC" >&6; }
c906108c 3061else
81ecdfbb
RW
3062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3063$as_echo "no" >&6; }
c906108c 3064fi
bec39cab 3065
81ecdfbb 3066
bec39cab
AC
3067 test -n "$CC" && break
3068 done
3069fi
3070if test -z "$CC"; then
3071 ac_ct_CC=$CC
81ecdfbb 3072 for ac_prog in cl.exe
bec39cab
AC
3073do
3074 # Extract the first word of "$ac_prog", so it can be a program name with args.
3075set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
3076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3077$as_echo_n "checking for $ac_word... " >&6; }
3078if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3079 $as_echo_n "(cached) " >&6
bec39cab
AC
3080else
3081 if test -n "$ac_ct_CC"; then
3082 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3083else
3084as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3085for as_dir in $PATH
3086do
3087 IFS=$as_save_IFS
3088 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
3089 for ac_exec_ext in '' $ac_executable_extensions; do
3090 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 3091 ac_cv_prog_ac_ct_CC="$ac_prog"
81ecdfbb 3092 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab 3093 break 2
c906108c 3094 fi
bec39cab 3095done
81ecdfbb
RW
3096 done
3097IFS=$as_save_IFS
bec39cab
AC
3098
3099fi
3100fi
3101ac_ct_CC=$ac_cv_prog_ac_ct_CC
3102if test -n "$ac_ct_CC"; then
81ecdfbb
RW
3103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3104$as_echo "$ac_ct_CC" >&6; }
bec39cab 3105else
81ecdfbb
RW
3106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3107$as_echo "no" >&6; }
c906108c
SS
3108fi
3109
81ecdfbb 3110
bec39cab
AC
3111 test -n "$ac_ct_CC" && break
3112done
c906108c 3113
81ecdfbb
RW
3114 if test "x$ac_ct_CC" = x; then
3115 CC=""
3116 else
3117 case $cross_compiling:$ac_tool_warned in
3118yes:)
3119{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3120$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3121ac_tool_warned=yes ;;
3122esac
3123 CC=$ac_ct_CC
3124 fi
bec39cab
AC
3125fi
3126
3127fi
3128
3129
81ecdfbb
RW
3130test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3131$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3132as_fn_error "no acceptable C compiler found in \$PATH
3133See \`config.log' for more details." "$LINENO" 5; }
bec39cab
AC
3134
3135# Provide some information about the compiler.
81ecdfbb
RW
3136$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3137set X $ac_compile
3138ac_compiler=$2
3139for ac_option in --version -v -V -qversion; do
3140 { { ac_try="$ac_compiler $ac_option >&5"
3141case "(($ac_try" in
3142 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3143 *) ac_try_echo=$ac_try;;
3144esac
3145eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3146$as_echo "$ac_try_echo"; } >&5
3147 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
bec39cab 3148 ac_status=$?
81ecdfbb
RW
3149 if test -s conftest.err; then
3150 sed '10a\
3151... rest of stderr output deleted ...
3152 10q' conftest.err >conftest.er1
3153 cat conftest.er1 >&5
3154 rm -f conftest.er1 conftest.err
3155 fi
3156 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3157 test $ac_status = 0; }
3158done
bec39cab 3159
81ecdfbb 3160cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3161/* end confdefs.h. */
3162
3163int
3164main ()
3165{
3166
3167 ;
3168 return 0;
3169}
3170_ACEOF
3171ac_clean_files_save=$ac_clean_files
81ecdfbb 3172ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out"
bec39cab
AC
3173# Try to create an executable without -o first, disregard a.out.
3174# It will help us diagnose broken compilers, and finding out an intuition
3175# of exeext.
81ecdfbb
RW
3176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3177$as_echo_n "checking for C compiler default output file name... " >&6; }
3178ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3179
3180# The possible output files:
3181ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3182
3183ac_rmfiles=
3184for ac_file in $ac_files
3185do
3186 case $ac_file in
3187 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3188 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3189 esac
3190done
3191rm -f $ac_rmfiles
3192
3193if { { ac_try="$ac_link_default"
3194case "(($ac_try" in
3195 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3196 *) ac_try_echo=$ac_try;;
3197esac
3198eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3199$as_echo "$ac_try_echo"; } >&5
3200 (eval "$ac_link_default") 2>&5
3201 ac_status=$?
3202 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3203 test $ac_status = 0; }; then :
3204 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3205# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3206# in a Makefile. We should not override ac_cv_exeext if it was cached,
3207# so that the user can short-circuit this test for compilers unknown to
3208# Autoconf.
3209for ac_file in $ac_files ''
bec39cab
AC
3210do
3211 test -f "$ac_file" || continue
3212 case $ac_file in
81ecdfbb 3213 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
b4e70030
JB
3214 ;;
3215 [ab].out )
3216 # We found the default executable, but exeext='' is most
3217 # certainly right.
3218 break;;
3219 *.* )
81ecdfbb
RW
3220 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3221 then :; else
3222 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3223 fi
3224 # We set ac_cv_exeext here because the later test for it is not
3225 # safe: cross compilers may not add the suffix if given an `-o'
3226 # argument, so we may need to know it at that point already.
3227 # Even if this section looks crufty: it has the advantage of
3228 # actually working.
b4e70030
JB
3229 break;;
3230 * )
3231 break;;
bec39cab
AC
3232 esac
3233done
81ecdfbb
RW
3234test "$ac_cv_exeext" = no && ac_cv_exeext=
3235
bec39cab 3236else
81ecdfbb
RW
3237 ac_file=''
3238fi
3239{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3240$as_echo "$ac_file" >&6; }
3241if test -z "$ac_file"; then :
3242 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3243sed 's/^/| /' conftest.$ac_ext >&5
3244
81ecdfbb
RW
3245{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3246$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3247{ as_fn_set_status 77
3248as_fn_error "C compiler cannot create executables
3249See \`config.log' for more details." "$LINENO" 5; }; }
bec39cab 3250fi
b4e70030 3251ac_exeext=$ac_cv_exeext
b4e70030 3252
81ecdfbb 3253# Check that the compiler produces executables we can run. If not, either
bec39cab 3254# the compiler is broken, or we cross compile.
81ecdfbb
RW
3255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3256$as_echo_n "checking whether the C compiler works... " >&6; }
bec39cab
AC
3257# If not cross compiling, check that we can run a simple program.
3258if test "$cross_compiling" != yes; then
3259 if { ac_try='./$ac_file'
81ecdfbb
RW
3260 { { case "(($ac_try" in
3261 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3262 *) ac_try_echo=$ac_try;;
3263esac
3264eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3265$as_echo "$ac_try_echo"; } >&5
3266 (eval "$ac_try") 2>&5
bec39cab 3267 ac_status=$?
81ecdfbb
RW
3268 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3269 test $ac_status = 0; }; }; then
bec39cab 3270 cross_compiling=no
c906108c 3271 else
bec39cab
AC
3272 if test "$cross_compiling" = maybe; then
3273 cross_compiling=yes
3274 else
81ecdfbb
RW
3275 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3276$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3277as_fn_error "cannot run C compiled programs.
bec39cab 3278If you meant to cross compile, use \`--host'.
81ecdfbb 3279See \`config.log' for more details." "$LINENO" 5; }
bec39cab 3280 fi
c906108c 3281 fi
bec39cab 3282fi
81ecdfbb
RW
3283{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3284$as_echo "yes" >&6; }
bec39cab 3285
81ecdfbb 3286rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out
b4e70030 3287ac_clean_files=$ac_clean_files_save
81ecdfbb 3288# Check that the compiler produces executables we can run. If not, either
b4e70030 3289# the compiler is broken, or we cross compile.
81ecdfbb
RW
3290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3291$as_echo_n "checking whether we are cross compiling... " >&6; }
3292{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3293$as_echo "$cross_compiling" >&6; }
3294
3295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3296$as_echo_n "checking for suffix of executables... " >&6; }
3297if { { ac_try="$ac_link"
3298case "(($ac_try" in
3299 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3300 *) ac_try_echo=$ac_try;;
3301esac
3302eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3303$as_echo "$ac_try_echo"; } >&5
3304 (eval "$ac_link") 2>&5
bec39cab 3305 ac_status=$?
81ecdfbb
RW
3306 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3307 test $ac_status = 0; }; then :
b4e70030
JB
3308 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3309# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3310# work properly (i.e., refer to `conftest.exe'), while it won't with
3311# `rm'.
3312for ac_file in conftest.exe conftest conftest.*; do
3313 test -f "$ac_file" || continue
3314 case $ac_file in
81ecdfbb 3315 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
b4e70030 3316 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
b4e70030
JB
3317 break;;
3318 * ) break;;
3319 esac
3320done
c906108c 3321else
81ecdfbb
RW
3322 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3323$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3324as_fn_error "cannot compute suffix of executables: cannot compile and link
3325See \`config.log' for more details." "$LINENO" 5; }
c906108c 3326fi
b4e70030 3327rm -f conftest$ac_cv_exeext
81ecdfbb
RW
3328{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3329$as_echo "$ac_cv_exeext" >&6; }
c906108c 3330
b4e70030 3331rm -f conftest.$ac_ext
bec39cab
AC
3332EXEEXT=$ac_cv_exeext
3333ac_exeext=$EXEEXT
81ecdfbb
RW
3334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3335$as_echo_n "checking for suffix of object files... " >&6; }
3336if test "${ac_cv_objext+set}" = set; then :
3337 $as_echo_n "(cached) " >&6
bec39cab 3338else
81ecdfbb 3339 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
3340/* end confdefs.h. */
3341
3342int
3343main ()
3344{
3345
3346 ;
3347 return 0;
3348}
3349_ACEOF
3350rm -f conftest.o conftest.obj
81ecdfbb
RW
3351if { { ac_try="$ac_compile"
3352case "(($ac_try" in
3353 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3354 *) ac_try_echo=$ac_try;;
3355esac
3356eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3357$as_echo "$ac_try_echo"; } >&5
3358 (eval "$ac_compile") 2>&5
3359 ac_status=$?
3360 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3361 test $ac_status = 0; }; then :
3362 for ac_file in conftest.o conftest.obj conftest.*; do
3363 test -f "$ac_file" || continue;
bec39cab 3364 case $ac_file in
81ecdfbb 3365 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
bec39cab
AC
3366 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3367 break;;
3368 esac
3369done
c906108c 3370else
81ecdfbb 3371 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3372sed 's/^/| /' conftest.$ac_ext >&5
3373
81ecdfbb
RW
3374{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3375$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3376as_fn_error "cannot compute suffix of object files: cannot compile
3377See \`config.log' for more details." "$LINENO" 5; }
c906108c 3378fi
b4e70030 3379rm -f conftest.$ac_cv_objext conftest.$ac_ext
bec39cab 3380fi
81ecdfbb
RW
3381{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3382$as_echo "$ac_cv_objext" >&6; }
bec39cab
AC
3383OBJEXT=$ac_cv_objext
3384ac_objext=$OBJEXT
81ecdfbb
RW
3385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3386$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3387if test "${ac_cv_c_compiler_gnu+set}" = set; then :
3388 $as_echo_n "(cached) " >&6
c906108c 3389else
81ecdfbb 3390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3391/* end confdefs.h. */
3392
3393int
3394main ()
3395{
3396#ifndef __GNUC__
3397 choke me
3398#endif
3399
3400 ;
3401 return 0;
3402}
3403_ACEOF
81ecdfbb 3404if ac_fn_c_try_compile "$LINENO"; then :
bec39cab
AC
3405 ac_compiler_gnu=yes
3406else
81ecdfbb 3407 ac_compiler_gnu=no
bec39cab 3408fi
81ecdfbb 3409rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab
AC
3410ac_cv_c_compiler_gnu=$ac_compiler_gnu
3411
3412fi
81ecdfbb
RW
3413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3414$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3415if test $ac_compiler_gnu = yes; then
3416 GCC=yes
3417else
3418 GCC=
3419fi
bec39cab
AC
3420ac_test_CFLAGS=${CFLAGS+set}
3421ac_save_CFLAGS=$CFLAGS
81ecdfbb
RW
3422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3423$as_echo_n "checking whether $CC accepts -g... " >&6; }
3424if test "${ac_cv_prog_cc_g+set}" = set; then :
3425 $as_echo_n "(cached) " >&6
bec39cab 3426else
81ecdfbb
RW
3427 ac_save_c_werror_flag=$ac_c_werror_flag
3428 ac_c_werror_flag=yes
3429 ac_cv_prog_cc_g=no
3430 CFLAGS="-g"
3431 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3432/* end confdefs.h. */
3433
3434int
3435main ()
3436{
3437
3438 ;
3439 return 0;
3440}
3441_ACEOF
81ecdfbb 3442if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
3443 ac_cv_prog_cc_g=yes
3444else
81ecdfbb
RW
3445 CFLAGS=""
3446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3447/* end confdefs.h. */
3448
3449int
3450main ()
3451{
3452
3453 ;
3454 return 0;
3455}
3456_ACEOF
3457if ac_fn_c_try_compile "$LINENO"; then :
3458
3459else
3460 ac_c_werror_flag=$ac_save_c_werror_flag
3461 CFLAGS="-g"
3462 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3463/* end confdefs.h. */
3464
3465int
3466main ()
3467{
c906108c 3468
81ecdfbb
RW
3469 ;
3470 return 0;
3471}
3472_ACEOF
3473if ac_fn_c_try_compile "$LINENO"; then :
3474 ac_cv_prog_cc_g=yes
3475fi
3476rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3477fi
3478rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4e8d927d 3479fi
81ecdfbb
RW
3480rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3481 ac_c_werror_flag=$ac_save_c_werror_flag
bec39cab 3482fi
81ecdfbb
RW
3483{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3484$as_echo "$ac_cv_prog_cc_g" >&6; }
c906108c 3485if test "$ac_test_CFLAGS" = set; then
bec39cab 3486 CFLAGS=$ac_save_CFLAGS
c906108c
SS
3487elif test $ac_cv_prog_cc_g = yes; then
3488 if test "$GCC" = yes; then
3489 CFLAGS="-g -O2"
3490 else
3491 CFLAGS="-g"
3492 fi
3493else
3494 if test "$GCC" = yes; then
3495 CFLAGS="-O2"
3496 else
3497 CFLAGS=
3498 fi
3499fi
81ecdfbb
RW
3500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3501$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3502if test "${ac_cv_prog_cc_c89+set}" = set; then :
3503 $as_echo_n "(cached) " >&6
bec39cab 3504else
81ecdfbb 3505 ac_cv_prog_cc_c89=no
bec39cab 3506ac_save_CC=$CC
81ecdfbb 3507cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3508/* end confdefs.h. */
c906108c
SS
3509#include <stdarg.h>
3510#include <stdio.h>
3511#include <sys/types.h>
3512#include <sys/stat.h>
3513/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3514struct buf { int x; };
3515FILE * (*rcsopen) (struct buf *, struct stat *, int);
3516static char *e (p, i)
3517 char **p;
3518 int i;
3519{
3520 return p[i];
3521}
3522static char *f (char * (*g) (char **, int), char **p, ...)
3523{
3524 char *s;
3525 va_list v;
3526 va_start (v,p);
3527 s = g (p, va_arg (v,int));
3528 va_end (v);
3529 return s;
3530}
bec39cab
AC
3531
3532/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3533 function prototypes and stuff, but not '\xHH' hex character constants.
3534 These don't provoke an error unfortunately, instead are silently treated
81ecdfbb 3535 as 'x'. The following induces an error, until -std is added to get
bec39cab
AC
3536 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3537 array size at least. It's necessary to write '\x00'==0 to get something
81ecdfbb 3538 that's true only with -std. */
bec39cab
AC
3539int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3540
81ecdfbb
RW
3541/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3542 inside strings and character constants. */
3543#define FOO(x) 'x'
3544int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3545
c906108c
SS
3546int test (int i, double x);
3547struct s1 {int (*f) (int a);};
3548struct s2 {int (*f) (double a);};
3549int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3550int argc;
3551char **argv;
bec39cab
AC
3552int
3553main ()
3554{
c906108c 3555return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
bec39cab
AC
3556 ;
3557 return 0;
3558}
3559_ACEOF
81ecdfbb
RW
3560for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3561 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
bec39cab
AC
3562do
3563 CC="$ac_save_CC $ac_arg"
81ecdfbb
RW
3564 if ac_fn_c_try_compile "$LINENO"; then :
3565 ac_cv_prog_cc_c89=$ac_arg
c906108c 3566fi
81ecdfbb
RW
3567rm -f core conftest.err conftest.$ac_objext
3568 test "x$ac_cv_prog_cc_c89" != "xno" && break
c906108c 3569done
81ecdfbb 3570rm -f conftest.$ac_ext
bec39cab 3571CC=$ac_save_CC
c906108c
SS
3572
3573fi
81ecdfbb
RW
3574# AC_CACHE_VAL
3575case "x$ac_cv_prog_cc_c89" in
3576 x)
3577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3578$as_echo "none needed" >&6; } ;;
3579 xno)
3580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3581$as_echo "unsupported" >&6; } ;;
bec39cab 3582 *)
81ecdfbb
RW
3583 CC="$CC $ac_cv_prog_cc_c89"
3584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3585$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
c906108c 3586esac
81ecdfbb 3587if test "x$ac_cv_prog_cc_c89" != xno; then :
c906108c 3588
b4e70030
JB
3589fi
3590
bec39cab
AC
3591ac_ext=c
3592ac_cpp='$CPP $CPPFLAGS'
3593ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3594ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3595ac_compiler_gnu=$ac_cv_c_compiler_gnu
c906108c 3596
3bc3d82a
PA
3597ac_ext=cpp
3598ac_cpp='$CXXCPP $CPPFLAGS'
3599ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3600ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3601ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3602if test -z "$CXX"; then
3603 if test -n "$CCC"; then
3604 CXX=$CCC
3605 else
3606 if test -n "$ac_tool_prefix"; then
3607 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3608 do
3609 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3610set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3612$as_echo_n "checking for $ac_word... " >&6; }
3613if test "${ac_cv_prog_CXX+set}" = set; then :
3614 $as_echo_n "(cached) " >&6
3615else
3616 if test -n "$CXX"; then
3617 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3618else
3619as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3620for as_dir in $PATH
3621do
3622 IFS=$as_save_IFS
3623 test -z "$as_dir" && as_dir=.
3624 for ac_exec_ext in '' $ac_executable_extensions; do
3625 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3626 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3627 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3628 break 2
3629 fi
3630done
3631 done
3632IFS=$as_save_IFS
3633
3634fi
3635fi
3636CXX=$ac_cv_prog_CXX
3637if test -n "$CXX"; then
3638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
3639$as_echo "$CXX" >&6; }
3640else
3641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3642$as_echo "no" >&6; }
3643fi
3644
3645
3646 test -n "$CXX" && break
3647 done
3648fi
3649if test -z "$CXX"; then
3650 ac_ct_CXX=$CXX
3651 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3652do
3653 # Extract the first word of "$ac_prog", so it can be a program name with args.
3654set dummy $ac_prog; ac_word=$2
3655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3656$as_echo_n "checking for $ac_word... " >&6; }
3657if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
3658 $as_echo_n "(cached) " >&6
3659else
3660 if test -n "$ac_ct_CXX"; then
3661 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3662else
3663as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3664for as_dir in $PATH
3665do
3666 IFS=$as_save_IFS
3667 test -z "$as_dir" && as_dir=.
3668 for ac_exec_ext in '' $ac_executable_extensions; do
3669 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3670 ac_cv_prog_ac_ct_CXX="$ac_prog"
3671 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3672 break 2
3673 fi
3674done
3675 done
3676IFS=$as_save_IFS
3677
3678fi
3679fi
3680ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3681if test -n "$ac_ct_CXX"; then
3682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
3683$as_echo "$ac_ct_CXX" >&6; }
3684else
3685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3686$as_echo "no" >&6; }
3687fi
3688
3689
3690 test -n "$ac_ct_CXX" && break
3691done
3692
3693 if test "x$ac_ct_CXX" = x; then
3694 CXX="g++"
3695 else
3696 case $cross_compiling:$ac_tool_warned in
3697yes:)
3698{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3699$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3700ac_tool_warned=yes ;;
3701esac
3702 CXX=$ac_ct_CXX
3703 fi
3704fi
3705
3706 fi
3707fi
3708# Provide some information about the compiler.
3709$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
3710set X $ac_compile
3711ac_compiler=$2
3712for ac_option in --version -v -V -qversion; do
3713 { { ac_try="$ac_compiler $ac_option >&5"
3714case "(($ac_try" in
3715 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3716 *) ac_try_echo=$ac_try;;
3717esac
3718eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3719$as_echo "$ac_try_echo"; } >&5
3720 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3721 ac_status=$?
3722 if test -s conftest.err; then
3723 sed '10a\
3724... rest of stderr output deleted ...
3725 10q' conftest.err >conftest.er1
3726 cat conftest.er1 >&5
3727 rm -f conftest.er1 conftest.err
3728 fi
3729 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3730 test $ac_status = 0; }
3731done
3732
3733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
3734$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
3735if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
3736 $as_echo_n "(cached) " >&6
3737else
3738 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3739/* end confdefs.h. */
3740
3741int
3742main ()
3743{
3744#ifndef __GNUC__
3745 choke me
3746#endif
3747
3748 ;
3749 return 0;
3750}
3751_ACEOF
3752if ac_fn_cxx_try_compile "$LINENO"; then :
3753 ac_compiler_gnu=yes
3754else
3755 ac_compiler_gnu=no
3756fi
3757rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3758ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3759
3760fi
3761{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
3762$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
3763if test $ac_compiler_gnu = yes; then
3764 GXX=yes
3765else
3766 GXX=
3767fi
3768ac_test_CXXFLAGS=${CXXFLAGS+set}
3769ac_save_CXXFLAGS=$CXXFLAGS
3770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
3771$as_echo_n "checking whether $CXX accepts -g... " >&6; }
3772if test "${ac_cv_prog_cxx_g+set}" = set; then :
3773 $as_echo_n "(cached) " >&6
3774else
3775 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
3776 ac_cxx_werror_flag=yes
3777 ac_cv_prog_cxx_g=no
3778 CXXFLAGS="-g"
3779 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3780/* end confdefs.h. */
3781
3782int
3783main ()
3784{
3785
3786 ;
3787 return 0;
3788}
3789_ACEOF
3790if ac_fn_cxx_try_compile "$LINENO"; then :
3791 ac_cv_prog_cxx_g=yes
3792else
3793 CXXFLAGS=""
3794 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3795/* end confdefs.h. */
3796
3797int
3798main ()
3799{
3800
3801 ;
3802 return 0;
3803}
3804_ACEOF
3805if ac_fn_cxx_try_compile "$LINENO"; then :
3806
3807else
3808 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3809 CXXFLAGS="-g"
3810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3811/* end confdefs.h. */
3812
3813int
3814main ()
3815{
3816
3817 ;
3818 return 0;
3819}
3820_ACEOF
3821if ac_fn_cxx_try_compile "$LINENO"; then :
3822 ac_cv_prog_cxx_g=yes
3823fi
3824rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3825fi
3826rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3827fi
3828rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3829 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3830fi
3831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
3832$as_echo "$ac_cv_prog_cxx_g" >&6; }
3833if test "$ac_test_CXXFLAGS" = set; then
3834 CXXFLAGS=$ac_save_CXXFLAGS
3835elif test $ac_cv_prog_cxx_g = yes; then
3836 if test "$GXX" = yes; then
3837 CXXFLAGS="-g -O2"
3838 else
3839 CXXFLAGS="-g"
3840 fi
3841else
3842 if test "$GXX" = yes; then
3843 CXXFLAGS="-O2"
3844 else
3845 CXXFLAGS=
3846 fi
3847fi
3848ac_ext=c
3849ac_cpp='$CPP $CPPFLAGS'
3850ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3851ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3852ac_compiler_gnu=$ac_cv_c_compiler_gnu
3853
3854
60ca704f 3855
bec39cab
AC
3856ac_ext=c
3857ac_cpp='$CPP $CPPFLAGS'
3858ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3859ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3860ac_compiler_gnu=$ac_cv_c_compiler_gnu
81ecdfbb
RW
3861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3862$as_echo_n "checking how to run the C preprocessor... " >&6; }
bec39cab
AC
3863# On Suns, sometimes $CPP names a directory.
3864if test -n "$CPP" && test -d "$CPP"; then
3865 CPP=
8bb2c122 3866fi
bec39cab 3867if test -z "$CPP"; then
81ecdfbb
RW
3868 if test "${ac_cv_prog_CPP+set}" = set; then :
3869 $as_echo_n "(cached) " >&6
bec39cab
AC
3870else
3871 # Double quotes because CPP needs to be expanded
3872 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3873 do
3874 ac_preproc_ok=false
3875for ac_c_preproc_warn_flag in '' yes
3876do
3877 # Use a header file that comes with gcc, so configuring glibc
3878 # with a fresh cross-compiler works.
3879 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3880 # <limits.h> exists even on freestanding compilers.
3881 # On the NeXT, cc -E runs the code through the compiler's parser,
3882 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3884/* end confdefs.h. */
3885#ifdef __STDC__
3886# include <limits.h>
3887#else
3888# include <assert.h>
3889#endif
3890 Syntax error
3891_ACEOF
81ecdfbb 3892if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3893
81ecdfbb 3894else
bec39cab
AC
3895 # Broken: fails on valid input.
3896continue
3897fi
3898rm -f conftest.err conftest.$ac_ext
3899
81ecdfbb 3900 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3901 # can be detected and how.
81ecdfbb 3902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3903/* end confdefs.h. */
3904#include <ac_nonexistent.h>
3905_ACEOF
81ecdfbb 3906if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3907 # Broken: success on invalid input.
3908continue
8bb2c122 3909else
bec39cab
AC
3910 # Passes both tests.
3911ac_preproc_ok=:
3912break
8bb2c122 3913fi
bec39cab 3914rm -f conftest.err conftest.$ac_ext
8bb2c122 3915
bec39cab
AC
3916done
3917# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3918rm -f conftest.err conftest.$ac_ext
81ecdfbb 3919if $ac_preproc_ok; then :
bec39cab
AC
3920 break
3921fi
8bb2c122 3922
bec39cab
AC
3923 done
3924 ac_cv_prog_CPP=$CPP
ddc9cd0f 3925
c906108c 3926fi
bec39cab
AC
3927 CPP=$ac_cv_prog_CPP
3928else
3929 ac_cv_prog_CPP=$CPP
c906108c 3930fi
81ecdfbb
RW
3931{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3932$as_echo "$CPP" >&6; }
bec39cab
AC
3933ac_preproc_ok=false
3934for ac_c_preproc_warn_flag in '' yes
3935do
3936 # Use a header file that comes with gcc, so configuring glibc
3937 # with a fresh cross-compiler works.
3938 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3939 # <limits.h> exists even on freestanding compilers.
3940 # On the NeXT, cc -E runs the code through the compiler's parser,
3941 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3943/* end confdefs.h. */
3944#ifdef __STDC__
3945# include <limits.h>
3946#else
3947# include <assert.h>
3948#endif
3949 Syntax error
3950_ACEOF
81ecdfbb 3951if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3952
81ecdfbb 3953else
bec39cab
AC
3954 # Broken: fails on valid input.
3955continue
3956fi
3957rm -f conftest.err conftest.$ac_ext
3958
81ecdfbb 3959 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3960 # can be detected and how.
81ecdfbb 3961 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3962/* end confdefs.h. */
3963#include <ac_nonexistent.h>
3964_ACEOF
81ecdfbb 3965if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3966 # Broken: success on invalid input.
3967continue
c906108c 3968else
bec39cab
AC
3969 # Passes both tests.
3970ac_preproc_ok=:
3971break
c906108c 3972fi
bec39cab 3973rm -f conftest.err conftest.$ac_ext
c906108c 3974
bec39cab
AC
3975done
3976# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3977rm -f conftest.err conftest.$ac_ext
81ecdfbb
RW
3978if $ac_preproc_ok; then :
3979
c906108c 3980else
81ecdfbb
RW
3981 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3982$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3983as_fn_error "C preprocessor \"$CPP\" fails sanity check
3984See \`config.log' for more details." "$LINENO" 5; }
c906108c 3985fi
c906108c 3986
bec39cab
AC
3987ac_ext=c
3988ac_cpp='$CPP $CPPFLAGS'
3989ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3990ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3991ac_compiler_gnu=$ac_cv_c_compiler_gnu
3992
3993
81ecdfbb
RW
3994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3995$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3996if test "${ac_cv_path_GREP+set}" = set; then :
3997 $as_echo_n "(cached) " >&6
4e8d927d 3998else
81ecdfbb
RW
3999 if test -z "$GREP"; then
4000 ac_path_GREP_found=false
4001 # Loop through the user's path and test for each of PROGNAME-LIST
4002 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4003for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4004do
4005 IFS=$as_save_IFS
4006 test -z "$as_dir" && as_dir=.
4007 for ac_prog in grep ggrep; do
4008 for ac_exec_ext in '' $ac_executable_extensions; do
4009 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4010 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4011# Check for GNU ac_path_GREP and select it if it is found.
4012 # Check for GNU $ac_path_GREP
4013case `"$ac_path_GREP" --version 2>&1` in
4014*GNU*)
4015 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4016*)
4017 ac_count=0
4018 $as_echo_n 0123456789 >"conftest.in"
4019 while :
4020 do
4021 cat "conftest.in" "conftest.in" >"conftest.tmp"
4022 mv "conftest.tmp" "conftest.in"
4023 cp "conftest.in" "conftest.nl"
4024 $as_echo 'GREP' >> "conftest.nl"
4025 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4026 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4027 as_fn_arith $ac_count + 1 && ac_count=$as_val
4028 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4029 # Best one so far, save it but keep looking for a better one
4030 ac_cv_path_GREP="$ac_path_GREP"
4031 ac_path_GREP_max=$ac_count
bec39cab 4032 fi
81ecdfbb
RW
4033 # 10*(2^10) chars as input seems more than enough
4034 test $ac_count -gt 10 && break
4035 done
4036 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4037esac
bec39cab 4038
81ecdfbb
RW
4039 $ac_path_GREP_found && break 3
4040 done
4041 done
4042 done
4043IFS=$as_save_IFS
4044 if test -z "$ac_cv_path_GREP"; then
4045 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4046 fi
c906108c 4047else
81ecdfbb 4048 ac_cv_path_GREP=$GREP
c906108c 4049fi
c906108c 4050
81ecdfbb
RW
4051fi
4052{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4053$as_echo "$ac_cv_path_GREP" >&6; }
4054 GREP="$ac_cv_path_GREP"
c906108c 4055
c906108c 4056
81ecdfbb
RW
4057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4058$as_echo_n "checking for egrep... " >&6; }
4059if test "${ac_cv_path_EGREP+set}" = set; then :
4060 $as_echo_n "(cached) " >&6
783e057b 4061else
81ecdfbb
RW
4062 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4063 then ac_cv_path_EGREP="$GREP -E"
4064 else
4065 if test -z "$EGREP"; then
4066 ac_path_EGREP_found=false
4067 # Loop through the user's path and test for each of PROGNAME-LIST
4068 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4069for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
783e057b
DJ
4070do
4071 IFS=$as_save_IFS
4072 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
4073 for ac_prog in egrep; do
4074 for ac_exec_ext in '' $ac_executable_extensions; do
4075 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4076 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4077# Check for GNU ac_path_EGREP and select it if it is found.
4078 # Check for GNU $ac_path_EGREP
4079case `"$ac_path_EGREP" --version 2>&1` in
4080*GNU*)
4081 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4082*)
4083 ac_count=0
4084 $as_echo_n 0123456789 >"conftest.in"
4085 while :
4086 do
4087 cat "conftest.in" "conftest.in" >"conftest.tmp"
4088 mv "conftest.tmp" "conftest.in"
4089 cp "conftest.in" "conftest.nl"
4090 $as_echo 'EGREP' >> "conftest.nl"
4091 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4092 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4093 as_fn_arith $ac_count + 1 && ac_count=$as_val
4094 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4095 # Best one so far, save it but keep looking for a better one
4096 ac_cv_path_EGREP="$ac_path_EGREP"
4097 ac_path_EGREP_max=$ac_count
4098 fi
4099 # 10*(2^10) chars as input seems more than enough
4100 test $ac_count -gt 10 && break
4101 done
4102 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4103esac
bec39cab 4104
81ecdfbb
RW
4105 $ac_path_EGREP_found && break 3
4106 done
4107 done
4108 done
4109IFS=$as_save_IFS
4110 if test -z "$ac_cv_path_EGREP"; then
4111 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
783e057b 4112 fi
783e057b 4113else
81ecdfbb 4114 ac_cv_path_EGREP=$EGREP
783e057b
DJ
4115fi
4116
81ecdfbb 4117 fi
783e057b 4118fi
81ecdfbb
RW
4119{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4120$as_echo "$ac_cv_path_EGREP" >&6; }
4121 EGREP="$ac_cv_path_EGREP"
4122
783e057b 4123
81ecdfbb
RW
4124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4125$as_echo_n "checking for ANSI C header files... " >&6; }
4126if test "${ac_cv_header_stdc+set}" = set; then :
4127 $as_echo_n "(cached) " >&6
783e057b 4128else
81ecdfbb 4129 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 4130/* end confdefs.h. */
783e057b 4131#include <stdlib.h>
bec39cab 4132#include <stdarg.h>
783e057b
DJ
4133#include <string.h>
4134#include <float.h>
c906108c 4135
bec39cab
AC
4136int
4137main ()
4138{
c906108c 4139
bec39cab
AC
4140 ;
4141 return 0;
4142}
4143_ACEOF
81ecdfbb 4144if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4145 ac_cv_header_stdc=yes
c906108c 4146else
81ecdfbb 4147 ac_cv_header_stdc=no
c906108c 4148fi
81ecdfbb 4149rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 4150
783e057b
DJ
4151if test $ac_cv_header_stdc = yes; then
4152 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
81ecdfbb 4153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4154/* end confdefs.h. */
4155#include <string.h>
c906108c 4156
783e057b
DJ
4157_ACEOF
4158if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4159 $EGREP "memchr" >/dev/null 2>&1; then :
4160
c906108c 4161else
783e057b 4162 ac_cv_header_stdc=no
c906108c 4163fi
783e057b 4164rm -f conftest*
c906108c
SS
4165
4166fi
4167
783e057b
DJ
4168if test $ac_cv_header_stdc = yes; then
4169 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
81ecdfbb 4170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4171/* end confdefs.h. */
4172#include <stdlib.h>
bec39cab 4173
783e057b
DJ
4174_ACEOF
4175if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4176 $EGREP "free" >/dev/null 2>&1; then :
4177
bec39cab 4178else
783e057b 4179 ac_cv_header_stdc=no
bec39cab 4180fi
783e057b 4181rm -f conftest*
bec39cab
AC
4182
4183fi
bec39cab 4184
783e057b
DJ
4185if test $ac_cv_header_stdc = yes; then
4186 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
81ecdfbb 4187 if test "$cross_compiling" = yes; then :
783e057b 4188 :
bec39cab 4189else
81ecdfbb 4190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4191/* end confdefs.h. */
4192#include <ctype.h>
81ecdfbb 4193#include <stdlib.h>
783e057b
DJ
4194#if ((' ' & 0x0FF) == 0x020)
4195# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4196# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4197#else
4198# define ISLOWER(c) \
4199 (('a' <= (c) && (c) <= 'i') \
4200 || ('j' <= (c) && (c) <= 'r') \
4201 || ('s' <= (c) && (c) <= 'z'))
4202# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4203#endif
4204
4205#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4206int
4207main ()
4208{
4209 int i;
4210 for (i = 0; i < 256; i++)
4211 if (XOR (islower (i), ISLOWER (i))
4212 || toupper (i) != TOUPPER (i))
81ecdfbb
RW
4213 return 2;
4214 return 0;
783e057b
DJ
4215}
4216_ACEOF
81ecdfbb 4217if ac_fn_c_try_run "$LINENO"; then :
783e057b 4218
81ecdfbb
RW
4219else
4220 ac_cv_header_stdc=no
783e057b 4221fi
81ecdfbb
RW
4222rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4223 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 4224fi
81ecdfbb 4225
783e057b
DJ
4226fi
4227fi
81ecdfbb
RW
4228{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4229$as_echo "$ac_cv_header_stdc" >&6; }
783e057b
DJ
4230if test $ac_cv_header_stdc = yes; then
4231
81ecdfbb 4232$as_echo "#define STDC_HEADERS 1" >>confdefs.h
783e057b
DJ
4233
4234fi
4235
4236# On IRIX 5.3, sys/types and inttypes.h are conflicting.
783e057b
DJ
4237for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4238 inttypes.h stdint.h unistd.h
81ecdfbb
RW
4239do :
4240 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4241ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4242"
4243eval as_val=\$$as_ac_Header
4244 if test "x$as_val" = x""yes; then :
783e057b 4245 cat >>confdefs.h <<_ACEOF
81ecdfbb 4246#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
783e057b
DJ
4247_ACEOF
4248
4249fi
4250
4251done
4252
4253
4254
81ecdfbb
RW
4255 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4256if test "x$ac_cv_header_minix_config_h" = x""yes; then :
783e057b
DJ
4257 MINIX=yes
4258else
4259 MINIX=
4260fi
4261
4262
4263 if test "$MINIX" = yes; then
4264
81ecdfbb 4265$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
783e057b
DJ
4266
4267
81ecdfbb 4268$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
783e057b
DJ
4269
4270
81ecdfbb 4271$as_echo "#define _MINIX 1" >>confdefs.h
783e057b
DJ
4272
4273 fi
4274
4275
81ecdfbb
RW
4276 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4277$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4278if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
4279 $as_echo_n "(cached) " >&6
783e057b 4280else
81ecdfbb 4281 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4282/* end confdefs.h. */
4283
c971b7fa
PA
4284# define __EXTENSIONS__ 1
4285 $ac_includes_default
783e057b
DJ
4286int
4287main ()
4288{
4289
4290 ;
4291 return 0;
4292}
4293_ACEOF
81ecdfbb 4294if ac_fn_c_try_compile "$LINENO"; then :
783e057b
DJ
4295 ac_cv_safe_to_define___extensions__=yes
4296else
81ecdfbb 4297 ac_cv_safe_to_define___extensions__=no
783e057b 4298fi
81ecdfbb 4299rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b 4300fi
81ecdfbb
RW
4301{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4302$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
783e057b 4303 test $ac_cv_safe_to_define___extensions__ = yes &&
81ecdfbb 4304 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
783e057b 4305
81ecdfbb 4306 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
783e057b 4307
81ecdfbb 4308 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
783e057b 4309
81ecdfbb 4310 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
783e057b 4311
81ecdfbb 4312 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
783e057b
DJ
4313
4314
c971b7fa
PA
4315ac_aux_dir=
4316for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4317 for ac_t in install-sh install.sh shtool; do
4318 if test -f "$ac_dir/$ac_t"; then
4319 ac_aux_dir=$ac_dir
4320 ac_install_sh="$ac_aux_dir/$ac_t -c"
4321 break 2
4322 fi
4323 done
4324done
4325if test -z "$ac_aux_dir"; then
4326 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
4327fi
770d76d7 4328
c971b7fa
PA
4329# These three variables are undocumented and unsupported,
4330# and are intended to be withdrawn in a future Autoconf release.
4331# They can cause serious problems if a builder's source tree is in a directory
4332# whose full name contains unusual characters.
4333ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4334ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4335ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
770d76d7 4336
770d76d7 4337
c971b7fa
PA
4338# Make sure we can run config.sub.
4339$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
4340 as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
770d76d7 4341
c971b7fa
PA
4342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4343$as_echo_n "checking build system type... " >&6; }
4344if test "${ac_cv_build+set}" = set; then :
4345 $as_echo_n "(cached) " >&6
770d76d7 4346else
c971b7fa
PA
4347 ac_build_alias=$build_alias
4348test "x$ac_build_alias" = x &&
4349 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4350test "x$ac_build_alias" = x &&
4351 as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
4352ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
4353 as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
4354
770d76d7 4355fi
c971b7fa
PA
4356{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4357$as_echo "$ac_cv_build" >&6; }
4358case $ac_cv_build in
4359*-*-*) ;;
4360*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
770d76d7 4361esac
c971b7fa
PA
4362build=$ac_cv_build
4363ac_save_IFS=$IFS; IFS='-'
4364set x $ac_cv_build
4365shift
4366build_cpu=$1
4367build_vendor=$2
4368shift; shift
4369# Remember, the first character of IFS is used to create $*,
4370# except with old shells:
4371build_os=$*
4372IFS=$ac_save_IFS
4373case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
770d76d7
PA
4374
4375
c971b7fa
PA
4376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4377$as_echo_n "checking host system type... " >&6; }
4378if test "${ac_cv_host+set}" = set; then :
81ecdfbb
RW
4379 $as_echo_n "(cached) " >&6
4380else
c971b7fa
PA
4381 if test "x$host_alias" = x; then
4382 ac_cv_host=$ac_cv_build
81ecdfbb 4383else
c971b7fa
PA
4384 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
4385 as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
81ecdfbb 4386fi
81ecdfbb
RW
4387
4388fi
c971b7fa
PA
4389{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4390$as_echo "$ac_cv_host" >&6; }
4391case $ac_cv_host in
4392*-*-*) ;;
4393*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
81ecdfbb 4394esac
c971b7fa
PA
4395host=$ac_cv_host
4396ac_save_IFS=$IFS; IFS='-'
4397set x $ac_cv_host
4398shift
4399host_cpu=$1
4400host_vendor=$2
4401shift; shift
4402# Remember, the first character of IFS is used to create $*,
4403# except with old shells:
4404host_os=$*
4405IFS=$ac_save_IFS
4406case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3388710e
JM
4407
4408
4409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4410$as_echo_n "checking target system type... " >&6; }
4411if test "${ac_cv_target+set}" = set; then :
4412 $as_echo_n "(cached) " >&6
4413else
4414 if test "x$target_alias" = x; then
4415 ac_cv_target=$ac_cv_host
4416else
4417 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
4418 as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
4419fi
4420
4421fi
4422{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4423$as_echo "$ac_cv_target" >&6; }
4424case $ac_cv_target in
4425*-*-*) ;;
4426*) as_fn_error "invalid value of canonical target" "$LINENO" 5;;
4427esac
4428target=$ac_cv_target
4429ac_save_IFS=$IFS; IFS='-'
4430set x $ac_cv_target
4431shift
4432target_cpu=$1
4433target_vendor=$2
4434shift; shift
4435# Remember, the first character of IFS is used to create $*,
4436# except with old shells:
4437target_os=$*
4438IFS=$ac_save_IFS
4439case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4440
4441
4442# The aliases save the names the user supplied, while $host etc.
4443# will get canonicalized.
4444test -n "$target_alias" &&
4445 test "$program_prefix$program_suffix$program_transform_name" = \
4446 NONENONEs,x,x, &&
4447 program_prefix=${target_alias}-
4448
4449# The tests for host and target for $enable_largefile require
4450# canonical names.
4451
4452
81ecdfbb 4453
da2f07f1
JK
4454# As the $enable_largefile decision depends on --enable-plugins we must set it
4455# even in directories otherwise not depending on the $plugins option.
4456
4457
2974be62
AM
4458 maybe_plugins=no
4459 for ac_header in dlfcn.h
4460do :
4461 ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
4462"
4463if test "x$ac_cv_header_dlfcn_h" = x""yes; then :
4464 cat >>confdefs.h <<_ACEOF
4465#define HAVE_DLFCN_H 1
4466_ACEOF
4467 maybe_plugins=yes
4468fi
4469
4470done
4471
4472 for ac_header in windows.h
4473do :
4474 ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
4475"
4476if test "x$ac_cv_header_windows_h" = x""yes; then :
4477 cat >>confdefs.h <<_ACEOF
4478#define HAVE_WINDOWS_H 1
4479_ACEOF
4480 maybe_plugins=yes
4481fi
4482
4483done
4484
4485
4486 # Check whether --enable-plugins was given.
da2f07f1
JK
4487if test "${enable_plugins+set}" = set; then :
4488 enableval=$enable_plugins; case "${enableval}" in
2974be62
AM
4489 no) plugins=no ;;
4490 *) plugins=yes
4491 if test "$maybe_plugins" != "yes" ; then
4492 as_fn_error "Building with plugin support requires a host that supports dlopen." "$LINENO" 5
4493 fi ;;
4494 esac
da2f07f1 4495else
2974be62
AM
4496 plugins=$maybe_plugins
4497
da2f07f1
JK
4498fi
4499
2974be62
AM
4500 if test "$plugins" = "yes"; then
4501 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
4502$as_echo_n "checking for library containing dlopen... " >&6; }
4503if test "${ac_cv_search_dlopen+set}" = set; then :
4504 $as_echo_n "(cached) " >&6
4505else
4506 ac_func_search_save_LIBS=$LIBS
4507cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4508/* end confdefs.h. */
4509
4510/* Override any GCC internal prototype to avoid an error.
4511 Use char because int might match the return type of a GCC
4512 builtin and then its argument prototype would still apply. */
4513#ifdef __cplusplus
4514extern "C"
4515#endif
4516char dlopen ();
4517int
4518main ()
4519{
4520return dlopen ();
4521 ;
4522 return 0;
4523}
4524_ACEOF
4525for ac_lib in '' dl; do
4526 if test -z "$ac_lib"; then
4527 ac_res="none required"
4528 else
4529 ac_res=-l$ac_lib
4530 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4531 fi
4532 if ac_fn_c_try_link "$LINENO"; then :
4533 ac_cv_search_dlopen=$ac_res
4534fi
4535rm -f core conftest.err conftest.$ac_objext \
4536 conftest$ac_exeext
4537 if test "${ac_cv_search_dlopen+set}" = set; then :
4538 break
4539fi
4540done
4541if test "${ac_cv_search_dlopen+set}" = set; then :
4542
4543else
4544 ac_cv_search_dlopen=no
4545fi
4546rm conftest.$ac_ext
4547LIBS=$ac_func_search_save_LIBS
4548fi
4549{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
4550$as_echo "$ac_cv_search_dlopen" >&6; }
4551ac_res=$ac_cv_search_dlopen
4552if test "$ac_res" != no; then :
4553 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4554
4555fi
4556
4557 fi
da2f07f1
JK
4558
4559
4560case "${host}" in
4561 sparc-*-solaris*|i[3-7]86-*-solaris*)
4562 # On native 32bit sparc and ia32 solaris, large-file and procfs support
4563 # are mutually exclusive; and without procfs support, the bfd/ elf module
4564 # cannot provide certain routines such as elfcore_write_prpsinfo
4565 # or elfcore_write_prstatus. So unless the user explicitly requested
4566 # large-file support through the --enable-largefile switch, disable
4567 # large-file support in favor of procfs support.
4568 test "${target}" = "${host}" -a "x$plugins" = xno \
4569 && : ${enable_largefile="no"}
4570 ;;
4571esac
4572
4573# Check whether --enable-largefile was given.
4574if test "${enable_largefile+set}" = set; then :
4575 enableval=$enable_largefile;
4576fi
4577
4578if test "$enable_largefile" != no; then
4579
4580 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4581$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
4582if test "${ac_cv_sys_largefile_CC+set}" = set; then :
4583 $as_echo_n "(cached) " >&6
4584else
4585 ac_cv_sys_largefile_CC=no
4586 if test "$GCC" != yes; then
4587 ac_save_CC=$CC
4588 while :; do
4589 # IRIX 6.2 and later do not support large files by default,
4590 # so use the C compiler's -n32 option if that helps.
4591 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4592/* end confdefs.h. */
4593#include <sys/types.h>
4594 /* Check that off_t can represent 2**63 - 1 correctly.
4595 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4596 since some C++ compilers masquerading as C compilers
4597 incorrectly reject 9223372036854775807. */
4598#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4599 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4600 && LARGE_OFF_T % 2147483647 == 1)
4601 ? 1 : -1];
4602int
4603main ()
4604{
4605
4606 ;
4607 return 0;
4608}
4609_ACEOF
4610 if ac_fn_c_try_compile "$LINENO"; then :
4611 break
4612fi
4613rm -f core conftest.err conftest.$ac_objext
4614 CC="$CC -n32"
4615 if ac_fn_c_try_compile "$LINENO"; then :
4616 ac_cv_sys_largefile_CC=' -n32'; break
4617fi
4618rm -f core conftest.err conftest.$ac_objext
4619 break
4620 done
4621 CC=$ac_save_CC
4622 rm -f conftest.$ac_ext
4623 fi
4624fi
4625{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4626$as_echo "$ac_cv_sys_largefile_CC" >&6; }
4627 if test "$ac_cv_sys_largefile_CC" != no; then
4628 CC=$CC$ac_cv_sys_largefile_CC
4629 fi
4630
4631 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4632$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
4633if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
4634 $as_echo_n "(cached) " >&6
4635else
4636 while :; do
4637 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4638/* end confdefs.h. */
4639#include <sys/types.h>
4640 /* Check that off_t can represent 2**63 - 1 correctly.
4641 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4642 since some C++ compilers masquerading as C compilers
4643 incorrectly reject 9223372036854775807. */
4644#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4645 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4646 && LARGE_OFF_T % 2147483647 == 1)
4647 ? 1 : -1];
4648int
4649main ()
4650{
4651
4652 ;
4653 return 0;
4654}
4655_ACEOF
4656if ac_fn_c_try_compile "$LINENO"; then :
4657 ac_cv_sys_file_offset_bits=no; break
4658fi
4659rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4660 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4661/* end confdefs.h. */
4662#define _FILE_OFFSET_BITS 64
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_file_offset_bits=64; break
4682fi
4683rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4684 ac_cv_sys_file_offset_bits=unknown
4685 break
4686done
4687fi
4688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4689$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4690case $ac_cv_sys_file_offset_bits in #(
4691 no | unknown) ;;
4692 *)
4693cat >>confdefs.h <<_ACEOF
4694#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4695_ACEOF
4696;;
4697esac
4698rm -rf conftest*
4699 if test $ac_cv_sys_file_offset_bits = unknown; then
4700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4701$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
4702if test "${ac_cv_sys_large_files+set}" = set; then :
4703 $as_echo_n "(cached) " >&6
4704else
4705 while :; do
4706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4707/* end confdefs.h. */
4708#include <sys/types.h>
4709 /* Check that off_t can represent 2**63 - 1 correctly.
4710 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4711 since some C++ compilers masquerading as C compilers
4712 incorrectly reject 9223372036854775807. */
4713#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4714 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4715 && LARGE_OFF_T % 2147483647 == 1)
4716 ? 1 : -1];
4717int
4718main ()
4719{
4720
4721 ;
4722 return 0;
4723}
4724_ACEOF
4725if ac_fn_c_try_compile "$LINENO"; then :
4726 ac_cv_sys_large_files=no; break
4727fi
4728rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4729 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4730/* end confdefs.h. */
4731#define _LARGE_FILES 1
4732#include <sys/types.h>
4733 /* Check that off_t can represent 2**63 - 1 correctly.
4734 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4735 since some C++ compilers masquerading as C compilers
4736 incorrectly reject 9223372036854775807. */
4737#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4738 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4739 && LARGE_OFF_T % 2147483647 == 1)
4740 ? 1 : -1];
4741int
4742main ()
4743{
4744
4745 ;
4746 return 0;
4747}
4748_ACEOF
4749if ac_fn_c_try_compile "$LINENO"; then :
4750 ac_cv_sys_large_files=1; break
4751fi
4752rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4753 ac_cv_sys_large_files=unknown
4754 break
4755done
4756fi
4757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4758$as_echo "$ac_cv_sys_large_files" >&6; }
4759case $ac_cv_sys_large_files in #(
4760 no | unknown) ;;
4761 *)
4762cat >>confdefs.h <<_ACEOF
4763#define _LARGE_FILES $ac_cv_sys_large_files
4764_ACEOF
4765;;
4766esac
4767rm -rf conftest*
4768 fi
4769fi
4770
4771
4772
81ecdfbb
RW
4773
4774
4775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5
4776$as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; }
4777if test "${am_cv_prog_cc_stdc+set}" = set; then :
4778 $as_echo_n "(cached) " >&6
4779else
4780 am_cv_prog_cc_stdc=no
4781ac_save_CC="$CC"
4782# Don't try gcc -ansi; that turns off useful extensions and
4783# breaks some systems' header files.
4784# AIX -qlanglvl=ansi
4785# Ultrix and OSF/1 -std1
4786# HP-UX 10.20 and later -Ae
4787# HP-UX older versions -Aa -D_HPUX_SOURCE
4788# SVR4 -Xc -D__EXTENSIONS__
4789for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4790do
783e057b 4791 CC="$ac_save_CC $ac_arg"
81ecdfbb 4792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4793/* end confdefs.h. */
4794#include <stdarg.h>
4795#include <stdio.h>
4796#include <sys/types.h>
4797#include <sys/stat.h>
4798/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4799struct buf { int x; };
4800FILE * (*rcsopen) (struct buf *, struct stat *, int);
4801static char *e (p, i)
4802 char **p;
4803 int i;
4804{
4805 return p[i];
4806}
4807static char *f (char * (*g) (char **, int), char **p, ...)
4808{
4809 char *s;
4810 va_list v;
4811 va_start (v,p);
4812 s = g (p, va_arg (v,int));
4813 va_end (v);
4814 return s;
4815}
4816int test (int i, double x);
4817struct s1 {int (*f) (int a);};
4818struct s2 {int (*f) (double a);};
4819int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4820int argc;
4821char **argv;
4822
4823int
4824main ()
4825{
4826
4827return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4828
4829 ;
4830 return 0;
4831}
4832_ACEOF
81ecdfbb 4833if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4834 am_cv_prog_cc_stdc="$ac_arg"; break
783e057b 4835fi
81ecdfbb 4836rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
4837done
4838CC="$ac_save_CC"
4839
4840fi
4841
4842if test -z "$am_cv_prog_cc_stdc"; then
81ecdfbb
RW
4843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4844$as_echo "none needed" >&6; }
783e057b 4845else
81ecdfbb
RW
4846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5
4847$as_echo "$am_cv_prog_cc_stdc" >&6; }
783e057b
DJ
4848fi
4849case "x$am_cv_prog_cc_stdc" in
4850 x|xno) ;;
4851 *) CC="$CC $am_cv_prog_cc_stdc" ;;
4852esac
4853
4869db5e
RM
4854# expand $ac_aux_dir to an absolute path
4855am_aux_dir=`cd $ac_aux_dir && pwd`
4856
4857if test x"${install_sh}" != xset; then
4858 case $am_aux_dir in
4859 *\ * | *\ *)
4860 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
4861 *)
4862 install_sh="\${SHELL} $am_aux_dir/install-sh"
4863 esac
4864fi
4865
4866# Installed binaries are usually stripped using `strip' when the user
4867# run `make install-strip'. However `strip' might not be the right
4868# tool to use in cross-compilation environments, therefore Automake
4869# will honor the `STRIP' environment variable to overrule this program.
4870if test "$cross_compiling" != no; then
4871 if test -n "$ac_tool_prefix"; then
4872 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4873set dummy ${ac_tool_prefix}strip; ac_word=$2
4874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4875$as_echo_n "checking for $ac_word... " >&6; }
4876if test "${ac_cv_prog_STRIP+set}" = set; then :
4877 $as_echo_n "(cached) " >&6
4878else
4879 if test -n "$STRIP"; then
4880 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4881else
4882as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4883for as_dir in $PATH
4884do
4885 IFS=$as_save_IFS
4886 test -z "$as_dir" && as_dir=.
4887 for ac_exec_ext in '' $ac_executable_extensions; do
4888 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4889 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4890 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4891 break 2
4892 fi
4893done
4894 done
4895IFS=$as_save_IFS
4896
4897fi
4898fi
4899STRIP=$ac_cv_prog_STRIP
4900if test -n "$STRIP"; then
4901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
4902$as_echo "$STRIP" >&6; }
4903else
4904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4905$as_echo "no" >&6; }
4906fi
4907
4908
4909fi
4910if test -z "$ac_cv_prog_STRIP"; then
4911 ac_ct_STRIP=$STRIP
4912 # Extract the first word of "strip", so it can be a program name with args.
4913set dummy strip; ac_word=$2
4914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4915$as_echo_n "checking for $ac_word... " >&6; }
4916if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
4917 $as_echo_n "(cached) " >&6
4918else
4919 if test -n "$ac_ct_STRIP"; then
4920 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
4921else
4922as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4923for as_dir in $PATH
4924do
4925 IFS=$as_save_IFS
4926 test -z "$as_dir" && as_dir=.
4927 for ac_exec_ext in '' $ac_executable_extensions; do
4928 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4929 ac_cv_prog_ac_ct_STRIP="strip"
4930 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4931 break 2
4932 fi
4933done
4934 done
4935IFS=$as_save_IFS
4936
4937fi
4938fi
4939ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
4940if test -n "$ac_ct_STRIP"; then
4941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
4942$as_echo "$ac_ct_STRIP" >&6; }
4943else
4944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4945$as_echo "no" >&6; }
4946fi
4947
4948 if test "x$ac_ct_STRIP" = x; then
4949 STRIP=":"
4950 else
4951 case $cross_compiling:$ac_tool_warned in
4952yes:)
4953{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4954$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4955ac_tool_warned=yes ;;
4956esac
4957 STRIP=$ac_ct_STRIP
4958 fi
4959else
4960 STRIP="$ac_cv_prog_STRIP"
4961fi
4962
4963fi
4964INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
4965
783e057b
DJ
4966
4967ac_aux_dir=
81ecdfbb
RW
4968for ac_dir in .. "$srcdir"/..; do
4969 for ac_t in install-sh install.sh shtool; do
4970 if test -f "$ac_dir/$ac_t"; then
4971 ac_aux_dir=$ac_dir
4972 ac_install_sh="$ac_aux_dir/$ac_t -c"
4973 break 2
4974 fi
4975 done
783e057b
DJ
4976done
4977if test -z "$ac_aux_dir"; then
81ecdfbb 4978 as_fn_error "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
783e057b 4979fi
81ecdfbb
RW
4980
4981# These three variables are undocumented and unsupported,
4982# and are intended to be withdrawn in a future Autoconf release.
4983# They can cause serious problems if a builder's source tree is in a directory
4984# whose full name contains unusual characters.
4985ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4986ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4987ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4988
783e057b 4989
783e057b 4990
9009e1ae
MR
4991test "$program_prefix" != NONE &&
4992 program_transform_name="s&^&$program_prefix&;$program_transform_name"
4993# Use a double $ so make ignores it.
4994test "$program_suffix" != NONE &&
4995 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
4996# Double any \ or $.
4997# By default was `s,x,x', remove it if useless.
4998ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
4999program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
5000
81ecdfbb 5001
3bc3d82a
PA
5002# See if we are building with C++, and substitute COMPILER.
5003
5004 # Check whether --enable-build-with-cxx was given.
5005if test "${enable_build_with_cxx+set}" = set; then :
5006 enableval=$enable_build_with_cxx; case $enableval in
5007 yes | no)
5008 ;;
5009 *)
5010 as_fn_error "bad value $enableval for --enable-build-with-cxx" "$LINENO" 5 ;;
5011 esac
5012else
5013 enable_build_with_cxx=no
5014fi
5015
5016
5017 if test "$enable_build_with_cxx" = "yes"; then
dad44a1f 5018 COMPILER='$(CXX)'
3bc3d82a
PA
5019 else
5020 COMPILER='$(CC)'
5021 fi
5022
5023
5024
a417dc56
RW
5025# Dependency checking.
5026rm -rf .tst 2>/dev/null
5027mkdir .tst 2>/dev/null
5028if test -d .tst; then
5029 am__leading_dot=.
5030else
5031 am__leading_dot=_
5032fi
5033rmdir .tst 2>/dev/null
5034
5035DEPDIR="${am__leading_dot}deps"
5036
81ecdfbb 5037ac_config_commands="$ac_config_commands depdir"
a417dc56
RW
5038
5039
5040depcc="$CC" am_compiler_list=
5041
5042am_depcomp=$ac_aux_dir/depcomp
81ecdfbb
RW
5043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
5044$as_echo_n "checking dependency style of $depcc... " >&6; }
5045if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
5046 $as_echo_n "(cached) " >&6
a417dc56
RW
5047else
5048 if test -f "$am_depcomp"; then
5049 # We make a subdir and do the tests there. Otherwise we can end up
5050 # making bogus files that we don't know about and never remove. For
5051 # instance it was reported that on HP-UX the gcc test will end up
5052 # making a dummy file named `D' -- because `-MD' means `put the output
5053 # in D'.
5054 mkdir conftest.dir
5055 # Copy depcomp to subdir because otherwise we won't find it if we're
5056 # using a relative directory.
5057 cp "$am_depcomp" conftest.dir
5058 cd conftest.dir
5059 # We will build objects and dependencies in a subdirectory because
5060 # it helps to detect inapplicable dependency modes. For instance
5061 # both Tru64's cc and ICC support -MD to output dependencies as a
5062 # side effect of compilation, but ICC will put the dependencies in
5063 # the current directory while Tru64 will put them in the object
5064 # directory.
5065 mkdir sub
5066
5067 am_cv_CC_dependencies_compiler_type=none
5068 if test "$am_compiler_list" = ""; then
5069 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
5070 fi
5071 for depmode in $am_compiler_list; do
5072 if test $depmode = none; then break; fi
5073
81ecdfbb 5074 $as_echo "$as_me:$LINENO: trying $depmode" >&5
a417dc56
RW
5075 # Setup a source with many dependencies, because some compilers
5076 # like to wrap large dependency lists on column 80 (with \), and
5077 # we should not choose a depcomp mode which is confused by this.
5078 #
5079 # We need to recreate these files for each test, as the compiler may
5080 # overwrite some of them when testing with obscure command lines.
5081 # This happens at least with the AIX C compiler.
5082 : > sub/conftest.c
5083 for i in 1 2 3 4 5 6; do
5084 echo '#include "conftst'$i'.h"' >> sub/conftest.c
5085 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
5086 # Solaris 8's {/usr,}/bin/sh.
5087 touch sub/conftst$i.h
5088 done
5089 echo "include sub/conftest.Po" > confmf
5090
5091 # We check with `-c' and `-o' for the sake of the "dashmstdout"
5092 # mode. It turns out that the SunPro C++ compiler does not properly
5093 # handle `-M -o', and we need to detect this.
5094 depcmd="depmode=$depmode \
5095 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
5096 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
5097 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
5098 echo "| $depcmd" | sed -e 's/ */ /g' >&5
5099 if env $depcmd > conftest.err 2>&1 &&
5100 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
5101 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
5102 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
5103 # icc doesn't choke on unknown options, it will just issue warnings
5104 # or remarks (even with -Werror). So we grep stderr for any message
5105 # that says an option was ignored or not supported.
5106 # When given -MP, icc 7.0 and 7.1 complain thusly:
5107 # icc: Command line warning: ignoring option '-M'; no argument required
5108 # The diagnosis changed in icc 8.0:
5109 # icc: Command line remark: option '-MP' not supported
5110 if (grep 'ignoring option' conftest.err ||
5111 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
5112 am_cv_CC_dependencies_compiler_type=$depmode
81ecdfbb 5113 $as_echo "$as_me:$LINENO: success" >&5
a417dc56
RW
5114 break
5115 fi
5116 fi
81ecdfbb 5117 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
a417dc56
RW
5118 sed -e 's/^/| /' < conftest.err >&5
5119 done
5120
5121 cd ..
5122 rm -rf conftest.dir
5123else
5124 am_cv_CC_dependencies_compiler_type=none
5125fi
5126
5127fi
81ecdfbb
RW
5128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
5129$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
a417dc56 5130if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
81ecdfbb 5131then as_fn_error "no usable dependency style found" "$LINENO" 5
a417dc56
RW
5132else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
5133
5134fi
5135
5136
5137# Check for the 'make' the user wants to use.
5138for ac_prog in make
5139do
5140 # Extract the first word of "$ac_prog", so it can be a program name with args.
5141set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
5142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5143$as_echo_n "checking for $ac_word... " >&6; }
5144if test "${ac_cv_prog_MAKE+set}" = set; then :
5145 $as_echo_n "(cached) " >&6
a417dc56
RW
5146else
5147 if test -n "$MAKE"; then
5148 ac_cv_prog_MAKE="$MAKE" # Let the user override the test.
5149else
5150as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5151for as_dir in $PATH
5152do
5153 IFS=$as_save_IFS
5154 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5155 for ac_exec_ext in '' $ac_executable_extensions; do
5156 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
a417dc56 5157 ac_cv_prog_MAKE="$ac_prog"
81ecdfbb 5158 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
a417dc56
RW
5159 break 2
5160 fi
5161done
81ecdfbb
RW
5162 done
5163IFS=$as_save_IFS
a417dc56
RW
5164
5165fi
5166fi
5167MAKE=$ac_cv_prog_MAKE
5168if test -n "$MAKE"; then
81ecdfbb
RW
5169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
5170$as_echo "$MAKE" >&6; }
a417dc56 5171else
81ecdfbb
RW
5172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5173$as_echo "no" >&6; }
a417dc56
RW
5174fi
5175
81ecdfbb 5176
a417dc56
RW
5177 test -n "$MAKE" && break
5178done
5179
5180MAKE_IS_GNU=
5181case "`$MAKE --version 2>&1 | sed 1q`" in
5182 *GNU*)
5183 MAKE_IS_GNU=yes
5184 ;;
5185esac
81ecdfbb 5186 if test "$MAKE_IS_GNU" = yes; then
a417dc56
RW
5187 GMAKE_TRUE=
5188 GMAKE_FALSE='#'
5189else
5190 GMAKE_TRUE='#'
5191 GMAKE_FALSE=
5192fi
5193
81ecdfbb
RW
5194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
5195$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
5196set x ${MAKE-make}
5197ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
5198if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
5199 $as_echo_n "(cached) " >&6
a417dc56
RW
5200else
5201 cat >conftest.make <<\_ACEOF
81ecdfbb 5202SHELL = /bin/sh
a417dc56 5203all:
81ecdfbb 5204 @echo '@@@%%%=$(MAKE)=@@@%%%'
a417dc56
RW
5205_ACEOF
5206# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
81ecdfbb
RW
5207case `${MAKE-make} -f conftest.make 2>/dev/null` in
5208 *@@@%%%=?*=@@@%%%*)
5209 eval ac_cv_prog_make_${ac_make}_set=yes;;
5210 *)
5211 eval ac_cv_prog_make_${ac_make}_set=no;;
5212esac
a417dc56
RW
5213rm -f conftest.make
5214fi
81ecdfbb
RW
5215if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
5216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5217$as_echo "yes" >&6; }
a417dc56
RW
5218 SET_MAKE=
5219else
81ecdfbb
RW
5220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5221$as_echo "no" >&6; }
a417dc56
RW
5222 SET_MAKE="MAKE=${MAKE-make}"
5223fi
5224
5225
648d586d
JB
5226gnulib_extra_configure_args=
5227# If large-file support is disabled, make sure gnulib does the same.
5228if test "$enable_largefile" = no; then
5229gnulib_extra_configure_args="$gnulib_extra_configure_args --disable-largefile"
5230fi
5231
c971b7fa
PA
5232# Configure gnulib. We need to build gnulib under some other
5233# directory not "gnulib", to avoid the problem of both GDB and
5234# GDBserver wanting to build it in the same directory, when building
5235# in the source dir.
783e057b 5236
c971b7fa
PA
5237 in_src="gnulib"
5238 in_build="build-gnulib"
648d586d 5239 in_extra_args="$gnulib_extra_configure_args"
c971b7fa
PA
5240
5241 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
5242 # so they do not pile up.
5243 ac_sub_configure_args=
5244 ac_prev=
5245 eval "set x $ac_configure_args"
5246 shift
5247 for ac_arg
5248 do
5249 if test -n "$ac_prev"; then
5250 ac_prev=
5251 continue
5252 fi
5253 case $ac_arg in
5254 -cache-file | --cache-file | --cache-fil | --cache-fi \
5255 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
5256 ac_prev=cache_file ;;
5257 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
5258 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
5259 | --c=*)
5260 ;;
5261 --config-cache | -C)
5262 ;;
5263 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
5264 ac_prev=srcdir ;;
5265 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
5266 ;;
5267 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
5268 ac_prev=prefix ;;
5269 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
5270 ;;
5271 --disable-option-checking)
5272 ;;
5273 *)
5274 case $ac_arg in
5275 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
5276 esac
5277 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
5278 esac
5279 done
5280
5281 # Always prepend --prefix to ensure using the same prefix
5282 # in subdir configurations.
5283 ac_arg="--prefix=$prefix"
5284 case $ac_arg in
5285 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
5286 esac
5287 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
5288
5289 # Pass --silent
5290 if test "$silent" = yes; then
5291 ac_sub_configure_args="--silent $ac_sub_configure_args"
5292 fi
5293
5294 # Always prepend --disable-option-checking to silence warnings, since
5295 # different subdirs can have different --enable and --with options.
5296 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
5297
5298 ac_popdir=`pwd`
5299 ac_dir=$in_build
5300
5301 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
5302 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
5303 $as_echo "$ac_msg" >&6
5304 as_dir="$ac_dir"; as_fn_mkdir_p
5305
38ea300a
PA
5306 case $srcdir in
5307 [\\/]* | ?:[\\/]* )
5308 ac_srcdir=$srcdir/$in_src ;;
5309 *) # Relative name.
5310 ac_srcdir=../$srcdir/$in_src ;;
5311 esac
c971b7fa
PA
5312
5313 cd "$ac_dir"
5314
5315 ac_sub_configure=$ac_srcdir/configure
5316
5317 # Make the cache file name correct relative to the subdirectory.
5318 case $cache_file in
5319 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
5320 *) # Relative name.
5321 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
5322 esac
5323
648d586d
JB
5324 if test -n "$in_extra_args"; then
5325 # Add the extra args at the end.
5326 ac_sub_configure_args="$ac_sub_configure_args $in_extra_args"
5327 fi
5328
c971b7fa
PA
5329 { $as_echo "$as_me:${as_lineno-$LINENO}: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5
5330$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
5331 # The eval makes quoting arguments work.
5332 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
5333 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
5334 as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
5335
5336 cd "$ac_popdir"
783e057b 5337
c971b7fa
PA
5338
5339
5340CONFIG_OBS=
5341CONFIG_DEPS=
5342CONFIG_SRCS=
5343ENABLE_CFLAGS=
5344
5345CONFIG_ALL=
5346CONFIG_CLEAN=
5347CONFIG_INSTALL=
5348CONFIG_UNINSTALL=
5349
5350# If we haven't got the data from the intl directory,
5351# assume NLS is disabled.
5352USE_NLS=no
5353LIBINTL=
5354LIBINTL_DEP=
5355INCINTL=
5356XGETTEXT=
5357GMSGFMT=
5358POSUB=
783e057b
DJ
5359
5360if test -f ../intl/config.intl; then
5361 . ../intl/config.intl
5362fi
81ecdfbb
RW
5363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
5364$as_echo_n "checking whether NLS is requested... " >&6; }
783e057b 5365if test x"$USE_NLS" != xyes; then
81ecdfbb
RW
5366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5367$as_echo "no" >&6; }
783e057b 5368else
81ecdfbb
RW
5369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5370$as_echo "yes" >&6; }
783e057b 5371
81ecdfbb 5372$as_echo "#define ENABLE_NLS 1" >>confdefs.h
783e057b
DJ
5373
5374
81ecdfbb
RW
5375 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
5376$as_echo_n "checking for catalogs to be installed... " >&6; }
783e057b
DJ
5377 # Look for .po and .gmo files in the source directory.
5378 CATALOGS=
5379 XLINGUAS=
5380 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
5381 # If there aren't any .gmo files the shell will give us the
5382 # literal string "../path/to/srcdir/po/*.gmo" which has to be
5383 # weeded out.
5384 case "$cat" in *\**)
5385 continue;;
5386 esac
5387 # The quadruple backslash is collapsed to a double backslash
5388 # by the backticks, then collapsed again by the double quotes,
5389 # leaving us with one backslash in the sed expression (right
5390 # before the dot that mustn't act as a wildcard).
c971b7fa
PA
5391 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
5392 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
5393 # The user is allowed to set LINGUAS to a list of languages to
5394 # install catalogs for. If it's empty that means "all of them."
5395 if test "x$LINGUAS" = x; then
5396 CATALOGS="$CATALOGS $cat"
5397 XLINGUAS="$XLINGUAS $lang"
5398 else
5399 case "$LINGUAS" in *$lang*)
5400 CATALOGS="$CATALOGS $cat"
5401 XLINGUAS="$XLINGUAS $lang"
5402 ;;
5403 esac
e28b3332
DJ
5404 fi
5405 done
c971b7fa
PA
5406 LINGUAS="$XLINGUAS"
5407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
5408$as_echo "$LINGUAS" >&6; }
5409
5410
5411 DATADIRNAME=share
5412
5413 INSTOBJEXT=.mo
5414
5415 GENCAT=gencat
5416
5417 CATOBJEXT=.gmo
e28b3332 5418
e28b3332
DJ
5419fi
5420
c971b7fa
PA
5421localedir='${datadir}/locale'
5422
5423
5424if test x"$USE_NLS" = xyes; then
5425 CONFIG_ALL="$CONFIG_ALL all-po"
5426 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
5427 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
5428 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
e28b3332 5429fi
e28b3332 5430
c971b7fa
PA
5431GNULIB=build-gnulib/import
5432
5433# For Makefile dependencies.
5434GNULIB_STDINT_H=
5435if test x"$STDINT_H" != x; then
5436 GNULIB_STDINT_H=$GNULIB/$STDINT_H
e28b3332
DJ
5437fi
5438
5439
c971b7fa
PA
5440PACKAGE=gdb
5441
5442cat >>confdefs.h <<_ACEOF
5443#define PACKAGE "$PACKAGE"
5444_ACEOF
5445
5446
5447
5448# We never need to detect it in this sub-configure.
5449# But preserve it for config.status --recheck.
5450
5451
5452
5453MAKEINFO_EXTRA_FLAGS=""
5454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5
5455$as_echo_n "checking whether $MAKEINFO supports @click... " >&6; }
5456if test "${gdb_cv_have_makeinfo_click+set}" = set; then :
5457 $as_echo_n "(cached) " >&6
5458else
5459 echo '@clicksequence{a @click{} b}' >conftest.texinfo
5460 if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then
5461 gdb_cv_have_makeinfo_click=yes
5462 else
5463 gdb_cv_have_makeinfo_click=no
5464 fi
5465fi
5466{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5
5467$as_echo "$gdb_cv_have_makeinfo_click" >&6; }
5468if test x"$gdb_cv_have_makeinfo_click" = xyes; then
5469 MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK"
5470fi
e28b3332
DJ
5471
5472
bec39cab
AC
5473
5474
81ecdfbb
RW
5475# Check whether --with-separate-debug-dir was given.
5476if test "${with_separate_debug_dir+set}" = set; then :
5477 withval=$with_separate_debug_dir;
b14b1491
TT
5478 DEBUGDIR=$withval
5479else
5480 DEBUGDIR=${libdir}/debug
81ecdfbb
RW
5481fi
5482
20e95c23 5483
783e057b
DJ
5484 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5485 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 5486 ac_define_dir=`eval echo $DEBUGDIR`
783e057b 5487 ac_define_dir=`eval echo $ac_define_dir`
20e95c23 5488
783e057b
DJ
5489cat >>confdefs.h <<_ACEOF
5490#define DEBUGDIR "$ac_define_dir"
20e95c23 5491_ACEOF
20e95c23 5492
20e95c23 5493
20e95c23 5494
0c4a4063 5495
b14b1491
TT
5496 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
5497 if test "x$prefix" = xNONE; then
5498 test_prefix=/usr/local
5499 else
5500 test_prefix=$prefix
5501 fi
783e057b 5502 else
b14b1491 5503 test_prefix=$exec_prefix
783e057b 5504 fi
b14b1491
TT
5505 value=0
5506 case ${ac_define_dir} in
5507 "${test_prefix}"|"${test_prefix}/"*|\
5508 '${exec_prefix}'|'${exec_prefix}/'*)
5509 value=1
5510 ;;
5511 esac
5512
5513cat >>confdefs.h <<_ACEOF
5514#define DEBUGDIR_RELOCATABLE $value
5515_ACEOF
5516
5517
5518
0c4a4063 5519
f83d8a90
DE
5520# We can't pass paths as command line arguments.
5521# Mingw32 tries to be clever and will convert the paths for us.
5522# For example -DBINDIR="/usr/local/bin" passed on the command line may get
5523# converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin".
5524# This breaks GDB's relocatable path conversions since paths passed in
5525# config.h would not get so translated, the path prefixes no longer match.
5526
5527 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5528 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5529 ac_define_dir=`eval echo $bindir`
5530 ac_define_dir=`eval echo $ac_define_dir`
5531
5532cat >>confdefs.h <<_ACEOF
5533#define BINDIR "$ac_define_dir"
5534_ACEOF
5535
5536
5537
b14b1491
TT
5538# GDB's datadir relocation
5539
5540
5541
81ecdfbb
RW
5542# Check whether --with-gdb-datadir was given.
5543if test "${with_gdb_datadir+set}" = set; then :
5544 withval=$with_gdb_datadir;
b14b1491 5545 GDB_DATADIR=$withval
20e95c23 5546else
b14b1491 5547 GDB_DATADIR=${datadir}/gdb
81ecdfbb
RW
5548fi
5549
20e95c23 5550
b14b1491
TT
5551 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5552 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5553 ac_define_dir=`eval echo $GDB_DATADIR`
5554 ac_define_dir=`eval echo $ac_define_dir`
5555
5556cat >>confdefs.h <<_ACEOF
5557#define GDB_DATADIR "$ac_define_dir"
20e95c23
DJ
5558_ACEOF
5559
b14b1491
TT
5560
5561
0c4a4063 5562
b14b1491
TT
5563 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
5564 if test "x$prefix" = xNONE; then
5565 test_prefix=/usr/local
5566 else
5567 test_prefix=$prefix
5568 fi
5569 else
5570 test_prefix=$exec_prefix
5571 fi
5572 value=0
5573 case ${ac_define_dir} in
5574 "${test_prefix}"|"${test_prefix}/"*|\
5575 '${exec_prefix}'|'${exec_prefix}/'*)
5576 value=1
5577 ;;
5578 esac
5579
5580cat >>confdefs.h <<_ACEOF
5581#define GDB_DATADIR_RELOCATABLE $value
5582_ACEOF
5583
5584
783e057b 5585
20e95c23 5586
0c4a4063 5587
81ecdfbb
RW
5588# Check whether --with-relocated-sources was given.
5589if test "${with_relocated_sources+set}" = set; then :
5590 withval=$with_relocated_sources; reloc_srcdir="${withval}"
29b0e8a2
JM
5591
5592 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5593 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5594 ac_define_dir=`eval echo $reloc_srcdir`
5595 ac_define_dir=`eval echo $ac_define_dir`
5596
5597cat >>confdefs.h <<_ACEOF
5598#define RELOC_SRCDIR "$ac_define_dir"
5599_ACEOF
5600
5601
5602
81ecdfbb
RW
5603fi
5604
29b0e8a2 5605
7349ff92
JK
5606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5
5607$as_echo_n "checking for default auto-load directory... " >&6; }
5608
5609# Check whether --with-auto-load-dir was given.
5610if test "${with_auto_load_dir+set}" = set; then :
5611 withval=$with_auto_load_dir;
5612else
1564a261 5613 with_auto_load_dir='$debugdir:$datadir/auto-load'
7349ff92
JK
5614fi
5615
1564a261 5616escape_dir=`echo $with_auto_load_dir | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'`
7349ff92
JK
5617
5618 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5619 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5620 ac_define_dir=`eval echo $escape_dir`
5621 ac_define_dir=`eval echo $ac_define_dir`
5622
5623cat >>confdefs.h <<_ACEOF
5624#define AUTO_LOAD_DIR "$ac_define_dir"
5625_ACEOF
5626
5627
5628{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5
5629$as_echo "$with_auto_load_dir" >&6; }
5630
bccbefd2
JK
5631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5
5632$as_echo_n "checking for default auto-load safe-path... " >&6; }
5633
5634# Check whether --with-auto-load-safe-path was given.
5635if test "${with_auto_load_safe_path+set}" = set; then :
5636 withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then
6dea1fbd
JK
5637 with_auto_load_safe_path="/"
5638 fi
bccbefd2 5639else
7349ff92 5640 with_auto_load_safe_path="$with_auto_load_dir"
bccbefd2
JK
5641fi
5642
1564a261 5643escape_dir=`echo $with_auto_load_safe_path | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'`
bccbefd2
JK
5644
5645 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5646 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6dea1fbd 5647 ac_define_dir=`eval echo $escape_dir`
bccbefd2
JK
5648 ac_define_dir=`eval echo $ac_define_dir`
5649
5650cat >>confdefs.h <<_ACEOF
6dea1fbd 5651#define AUTO_LOAD_SAFE_PATH "$ac_define_dir"
bccbefd2
JK
5652_ACEOF
5653
5654
5655{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
5656$as_echo "$with_auto_load_safe_path" >&6; }
5657
29b0e8a2 5658
20e95c23 5659
5ae98d25 5660subdirs="$subdirs testsuite"
20e95c23
DJ
5661
5662
783e057b 5663# Check whether to support alternative target configurations
81ecdfbb
RW
5664# Check whether --enable-targets was given.
5665if test "${enable_targets+set}" = set; then :
5666 enableval=$enable_targets; case "${enableval}" in
5667 yes | "") as_fn_error "enable-targets option must specify target names or 'all'" "$LINENO" 5
783e057b
DJ
5668 ;;
5669 no) enable_targets= ;;
5670 *) enable_targets=$enableval ;;
5671esac
81ecdfbb
RW
5672fi
5673
20e95c23 5674
783e057b 5675# Check whether to enable 64-bit support on 32-bit hosts
81ecdfbb
RW
5676# Check whether --enable-64-bit-bfd was given.
5677if test "${enable_64_bit_bfd+set}" = set; then :
5678 enableval=$enable_64_bit_bfd; case "${enableval}" in
783e057b
DJ
5679 yes) want64=true ;;
5680 no) want64=false ;;
81ecdfbb 5681 *) as_fn_error "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
783e057b
DJ
5682esac
5683else
5684 want64=false
81ecdfbb
RW
5685fi
5686
783e057b
DJ
5687# Provide defaults for some variables set by the per-host and per-target
5688# configuration.
5689gdb_host_obs=posix-hdep.o
20e95c23 5690
783e057b
DJ
5691if test "${target}" = "${host}"; then
5692 gdb_native=yes
5693else
5694 gdb_native=no
5695fi
20e95c23 5696
783e057b 5697. $srcdir/configure.host
20e95c23 5698
fb23d554
SDJ
5699# Add in the common host objects.
5700. $srcdir/common/common.host
5701gdb_host_obs="$gdb_host_obs $common_host_obs"
5702
783e057b 5703# Accumulate some settings from configure.tgt over all enabled targets
20e95c23 5704
783e057b
DJ
5705TARGET_OBS=
5706all_targets=
b292c783 5707HAVE_NATIVE_GCORE_TARGET=
20e95c23 5708
783e057b 5709for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
20e95c23 5710do
783e057b
DJ
5711 if test "$targ_alias" = "all"; then
5712 all_targets=true
5713 else
5714 # Canonicalize the secondary target names.
5715 result=`$ac_config_sub $targ_alias 2>/dev/null`
5716 if test -n "$result"; then
5717 targ=$result
5718 else
5719 targ=$targ_alias
5720 fi
20e95c23 5721
783e057b 5722 . ${srcdir}/configure.tgt
20e95c23 5723
bf307134
JB
5724 if test -z "${gdb_target_obs}"; then :
5725 as_fn_error "configuration ${targ} is unsupported." "$LINENO" 5
5726fi
5727
783e057b
DJ
5728 # Target-specific object files
5729 for i in ${gdb_target_obs}; do
5730 case " $TARGET_OBS " in
5731 *" ${i} "*) ;;
5732 *)
5733 TARGET_OBS="$TARGET_OBS ${i}"
5734 ;;
5735 esac
5736 done
20e95c23 5737
783e057b
DJ
5738 # Check whether this target needs 64-bit CORE_ADDR
5739 if test x${want64} = xfalse; then
5740 . ${srcdir}/../bfd/config.bfd
5741 fi
b292c783
JK
5742
5743 # Check whether this target is native and supports gcore.
5744 if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \
5745 && $gdb_have_gcore; then
5746 HAVE_NATIVE_GCORE_TARGET=1
5747 fi
783e057b 5748 fi
20e95c23
DJ
5749done
5750
783e057b
DJ
5751if test x${all_targets} = xtrue; then
5752
5753 # We want all 64-bit targets if we either:
5754 # - run on a 64-bit host or
5755 # - already require 64-bit support for some other target or
5756 # - the --enable-64-bit-bfd option was supplied
5757 # Otherwise we only support all 32-bit targets.
5758 #
5759 # NOTE: This test must be in sync with the corresponding
5760 # tests in BFD!
20e95c23 5761
783e057b 5762 if test x${want64} = xfalse; then
81ecdfbb
RW
5763 # The cast to long int works around a bug in the HP C Compiler
5764# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5765# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5766# This bug is HP SR number 8606223364.
5767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
5768$as_echo_n "checking size of long... " >&6; }
5769if test "${ac_cv_sizeof_long+set}" = set; then :
5770 $as_echo_n "(cached) " >&6
c0993dbe 5771else
81ecdfbb 5772 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
c0993dbe 5773
81ecdfbb
RW
5774else
5775 if test "$ac_cv_type_long" = yes; then
5776 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5777$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5778{ as_fn_set_status 77
5779as_fn_error "cannot compute sizeof (long)
5780See \`config.log' for more details." "$LINENO" 5; }; }
5781 else
5782 ac_cv_sizeof_long=0
5783 fi
c0993dbe 5784fi
81ecdfbb 5785
c0993dbe 5786fi
81ecdfbb
RW
5787{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
5788$as_echo "$ac_cv_sizeof_long" >&6; }
c0993dbe 5789
c0993dbe 5790
c0993dbe 5791
c0993dbe
UW
5792cat >>confdefs.h <<_ACEOF
5793#define SIZEOF_LONG $ac_cv_sizeof_long
5794_ACEOF
5795
5796
5797 if test "x${ac_cv_sizeof_long}" = "x8"; then
5798 want64=true
5799 fi
5800 fi
5801 if test x${want64} = xtrue; then
5802 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
5803 else
5804 TARGET_OBS='$(ALL_TARGET_OBS)'
5805 fi
5806fi
5807
5808
5809
b292c783 5810
c0993dbe
UW
5811# For other settings, only the main target counts.
5812gdb_sim=
5813gdb_osabi=
5814build_gdbserver=
5815targ=$target; . ${srcdir}/configure.tgt
5816
5817# Fetch the default architecture and default target vector from BFD.
5818targ=$target; . $srcdir/../bfd/config.bfd
5819
5820# We only want the first architecture, so strip off the others if
5821# there is more than one.
5822targ_archs=`echo $targ_archs | sed 's/ .*//'`
5823
5824if test "x$targ_archs" != x; then
5825
5826cat >>confdefs.h <<_ACEOF
5827#define DEFAULT_BFD_ARCH $targ_archs
5828_ACEOF
5829
5830fi
5831if test "x$targ_defvec" != x; then
5832
5833cat >>confdefs.h <<_ACEOF
5834#define DEFAULT_BFD_VEC $targ_defvec
5835_ACEOF
5836
5837fi
5838
c0993dbe
UW
5839# The CLI cannot be disabled yet, but may be in the future.
5840
5841# Enable CLI.
81ecdfbb
RW
5842# Check whether --enable-gdbcli was given.
5843if test "${enable_gdbcli+set}" = set; then :
5844 enableval=$enable_gdbcli; case $enableval in
c0993dbe
UW
5845 yes)
5846 ;;
5847 no)
81ecdfbb 5848 as_fn_error "the command-line interface cannot be disabled yet" "$LINENO" 5 ;;
c0993dbe 5849 *)
81ecdfbb 5850 as_fn_error "bad value $enableval for --enable-gdbcli" "$LINENO" 5 ;;
c0993dbe
UW
5851 esac
5852else
5853 enable_gdbcli=yes
81ecdfbb
RW
5854fi
5855
c0993dbe
UW
5856if test x"$enable_gdbcli" = xyes; then
5857 if test -d $srcdir/cli; then
5858 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
5859 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
5860 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
5861 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
5862 fi
5863fi
5864
5865# Enable MI.
81ecdfbb
RW
5866# Check whether --enable-gdbmi was given.
5867if test "${enable_gdbmi+set}" = set; then :
5868 enableval=$enable_gdbmi; case $enableval in
c0993dbe
UW
5869 yes | no)
5870 ;;
5871 *)
81ecdfbb 5872 as_fn_error "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
c0993dbe
UW
5873 esac
5874else
5875 enable_gdbmi=yes
81ecdfbb
RW
5876fi
5877
c0993dbe
UW
5878if test x"$enable_gdbmi" = xyes; then
5879 if test -d $srcdir/mi; then
5880 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
5881 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
5882 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
5883 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
5884 fi
5885fi
5886
5887# Enable TUI.
81ecdfbb
RW
5888# Check whether --enable-tui was given.
5889if test "${enable_tui+set}" = set; then :
5890 enableval=$enable_tui; case $enableval in
3ca64bd3 5891 yes | no | auto)
c0993dbe
UW
5892 ;;
5893 *)
81ecdfbb 5894 as_fn_error "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
c0993dbe
UW
5895 esac
5896else
3ca64bd3 5897 enable_tui=auto
81ecdfbb
RW
5898fi
5899
c0993dbe
UW
5900
5901# Enable gdbtk.
81ecdfbb
RW
5902# Check whether --enable-gdbtk was given.
5903if test "${enable_gdbtk+set}" = set; then :
5904 enableval=$enable_gdbtk; case $enableval in
c0993dbe
UW
5905 yes | no)
5906 ;;
5907 *)
81ecdfbb 5908 as_fn_error "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
c0993dbe
UW
5909 esac
5910else
5062cc19 5911 if test -d $srcdir/gdbtk; then
c0993dbe
UW
5912 enable_gdbtk=yes
5913 else
5914 enable_gdbtk=no
5915 fi
81ecdfbb
RW
5916fi
5917
c0993dbe
UW
5918# We unconditionally disable gdbtk tests on selected platforms.
5919case $host_os in
5920 go32* | windows*)
81ecdfbb
RW
5921 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
5922$as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
c0993dbe
UW
5923 enable_gdbtk=no ;;
5924esac
5925
05e7c244 5926# Libunwind support for ia64.
bec39cab 5927
05e7c244
JK
5928
5929# Check whether --with-libunwind-ia64 was given.
5930if test "${with_libunwind_ia64+set}" = set; then :
5931 withval=$with_libunwind_ia64;
bec39cab 5932else
05e7c244
JK
5933 with_libunwind_ia64=auto
5934fi
bec39cab 5935
05e7c244
JK
5936
5937# Backward compatibility option.
5938if test "${with_libunwind+set}" = set; then
5939 if test x"$with_libunwind_ia64" != xauto; then
5940 as_fn_error "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5
5941 fi
5942 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5
5943$as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;}
5944 with_libunwind_ia64="$with_libunwind"
5945fi
5946
5947case "$with_libunwind_ia64" in
5948 yes | no)
5949 ;;
5950 auto)
5951 for ac_header in libunwind-ia64.h
81ecdfbb 5952do :
b54a8fd7
PA
5953 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
5954if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
bec39cab 5955 cat >>confdefs.h <<_ACEOF
b54a8fd7 5956#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
5957_ACEOF
5958
5959fi
5960
5961done
5962
05e7c244
JK
5963 with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h
5964 ;;
5965 *)
5966 as_fn_error "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5
5967 ;;
5968esac
bec39cab 5969
05e7c244 5970if test x"$with_libunwind_ia64" = xyes; then
b54a8fd7 5971 for ac_header in libunwind-ia64.h
81ecdfbb 5972do :
b54a8fd7
PA
5973 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
5974if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
bec39cab 5975 cat >>confdefs.h <<_ACEOF
b54a8fd7 5976#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
5977_ACEOF
5978
5979fi
5980
5981done
5982
05e7c244
JK
5983 if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then
5984 as_fn_error "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5
5985 fi
5986 CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o"
5987 CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o"
5988 CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c"
a9322a30
TT
5989fi
5990
cb01cfba
JB
5991opt_curses=no
5992
81ecdfbb
RW
5993# Check whether --with-curses was given.
5994if test "${with_curses+set}" = set; then :
5995 withval=$with_curses; opt_curses=$withval
5996fi
5997
cb01cfba 5998
76a39ba7 5999prefer_curses=no
cb01cfba 6000if test "$opt_curses" = "yes"; then
76a39ba7 6001 prefer_curses=yes
cb01cfba
JB
6002fi
6003
a9322a30 6004# Profiling support.
81ecdfbb
RW
6005# Check whether --enable-profiling was given.
6006if test "${enable_profiling+set}" = set; then :
6007 enableval=$enable_profiling; case $enableval in
a9322a30
TT
6008 yes | no)
6009 ;;
6010 *)
81ecdfbb 6011 as_fn_error "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
a9322a30
TT
6012 esac
6013else
6014 enable_profiling=no
81ecdfbb 6015fi
bec39cab 6016
a9322a30
TT
6017
6018for ac_func in monstartup _mcleanup
81ecdfbb
RW
6019do :
6020 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6021ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
6022eval as_val=\$$as_ac_var
6023 if test "x$as_val" = x""yes; then :
6024 cat >>confdefs.h <<_ACEOF
6025#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 6026_ACEOF
a9322a30 6027
81ecdfbb
RW
6028fi
6029done
a9322a30 6030
81ecdfbb
RW
6031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
6032$as_echo_n "checking for _etext... " >&6; }
6033if test "${ac_cv_var__etext+set}" = set; then :
6034 $as_echo_n "(cached) " >&6
6035else
6036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6037/* end confdefs.h. */
6038#include <stdlib.h>
6039extern char _etext;
a9322a30
TT
6040
6041int
6042main ()
6043{
6044free (&_etext);
6045 ;
6046 return 0;
6047}
bec39cab 6048_ACEOF
81ecdfbb 6049if ac_fn_c_try_link "$LINENO"; then :
a9322a30 6050 ac_cv_var__etext=yes
bec39cab 6051else
81ecdfbb 6052 ac_cv_var__etext=no
bec39cab 6053fi
81ecdfbb
RW
6054rm -f core conftest.err conftest.$ac_objext \
6055 conftest$ac_exeext conftest.$ac_ext
bec39cab 6056fi
81ecdfbb
RW
6057{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
6058$as_echo "$ac_cv_var__etext" >&6; }
a9322a30 6059if test $ac_cv_var__etext = yes; then
60ca704f 6060
81ecdfbb 6061$as_echo "#define HAVE__ETEXT 1" >>confdefs.h
bec39cab 6062
bec39cab 6063fi
81ecdfbb
RW
6064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
6065$as_echo_n "checking for etext... " >&6; }
6066if test "${ac_cv_var_etext+set}" = set; then :
6067 $as_echo_n "(cached) " >&6
bec39cab 6068else
81ecdfbb 6069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6070/* end confdefs.h. */
a9322a30
TT
6071#include <stdlib.h>
6072extern char etext;
bec39cab
AC
6073
6074int
6075main ()
6076{
a9322a30 6077free (&etext);
bec39cab
AC
6078 ;
6079 return 0;
6080}
6081_ACEOF
81ecdfbb 6082if ac_fn_c_try_link "$LINENO"; then :
a9322a30 6083 ac_cv_var_etext=yes
bec39cab 6084else
81ecdfbb 6085 ac_cv_var_etext=no
bec39cab 6086fi
81ecdfbb
RW
6087rm -f core conftest.err conftest.$ac_objext \
6088 conftest$ac_exeext conftest.$ac_ext
bec39cab 6089fi
81ecdfbb
RW
6090{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
6091$as_echo "$ac_cv_var_etext" >&6; }
a9322a30
TT
6092if test $ac_cv_var_etext = yes; then
6093
81ecdfbb 6094$as_echo "#define HAVE_ETEXT 1" >>confdefs.h
bec39cab
AC
6095
6096fi
a9322a30
TT
6097if test "$enable_profiling" = yes ; then
6098 if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
81ecdfbb 6099 as_fn_error "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
a9322a30
TT
6100 fi
6101 PROFILE_CFLAGS=-pg
6102 OLD_CFLAGS="$CFLAGS"
6103 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
bec39cab 6104
81ecdfbb
RW
6105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
6106$as_echo_n "checking whether $CC supports -pg... " >&6; }
6107if test "${ac_cv_cc_supports_pg+set}" = set; then :
6108 $as_echo_n "(cached) " >&6
bec39cab 6109else
81ecdfbb 6110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6111/* end confdefs.h. */
bec39cab
AC
6112
6113int
6114main ()
6115{
a9322a30 6116int x;
bec39cab
AC
6117 ;
6118 return 0;
6119}
6120_ACEOF
81ecdfbb 6121if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 6122 ac_cv_cc_supports_pg=yes
bec39cab 6123else
81ecdfbb 6124 ac_cv_cc_supports_pg=no
bec39cab 6125fi
81ecdfbb 6126rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 6127fi
81ecdfbb
RW
6128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
6129$as_echo "$ac_cv_cc_supports_pg" >&6; }
bec39cab 6130
a9322a30 6131 if test $ac_cv_cc_supports_pg = no; then
81ecdfbb 6132 as_fn_error "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
a9322a30 6133 fi
bec39cab 6134
a9322a30 6135 CFLAGS="$OLD_CFLAGS"
bec39cab
AC
6136fi
6137
c16158bc
JM
6138
6139
81ecdfbb
RW
6140# Check whether --with-pkgversion was given.
6141if test "${with_pkgversion+set}" = set; then :
6142 withval=$with_pkgversion; case "$withval" in
6143 yes) as_fn_error "package version not specified" "$LINENO" 5 ;;
c16158bc
JM
6144 no) PKGVERSION= ;;
6145 *) PKGVERSION="($withval) " ;;
6146 esac
6147else
6148 PKGVERSION="(GDB) "
6149
81ecdfbb 6150fi
c16158bc
JM
6151
6152
6153
6154
81ecdfbb
RW
6155
6156# Check whether --with-bugurl was given.
6157if test "${with_bugurl+set}" = set; then :
6158 withval=$with_bugurl; case "$withval" in
6159 yes) as_fn_error "bug URL not specified" "$LINENO" 5 ;;
c16158bc
JM
6160 no) BUGURL=
6161 ;;
6162 *) BUGURL="$withval"
6163 ;;
6164 esac
6165else
6166 BUGURL="http://www.gnu.org/software/gdb/bugs/"
6167
81ecdfbb
RW
6168fi
6169
c16158bc
JM
6170 case ${BUGURL} in
6171 "")
6172 REPORT_BUGS_TO=
6173 REPORT_BUGS_TEXI=
6174 ;;
6175 *)
6176 REPORT_BUGS_TO="<$BUGURL>"
6177 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
6178 ;;
6179 esac;
6180
6181
6182
6183
6184cat >>confdefs.h <<_ACEOF
6185#define PKGVERSION "$PKGVERSION"
6186_ACEOF
6187
6188
6189cat >>confdefs.h <<_ACEOF
6190#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
6191_ACEOF
6192
6193
bec39cab
AC
6194# --------------------- #
6195# Checks for programs. #
6196# --------------------- #
6197
6198for ac_prog in gawk mawk nawk awk
6199do
6200 # Extract the first word of "$ac_prog", so it can be a program name with args.
6201set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
6202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6203$as_echo_n "checking for $ac_word... " >&6; }
6204if test "${ac_cv_prog_AWK+set}" = set; then :
6205 $as_echo_n "(cached) " >&6
bec39cab
AC
6206else
6207 if test -n "$AWK"; then
6208 ac_cv_prog_AWK="$AWK" # Let the user override the test.
6209else
6210as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6211for as_dir in $PATH
6212do
6213 IFS=$as_save_IFS
6214 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6215 for ac_exec_ext in '' $ac_executable_extensions; do
6216 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6217 ac_cv_prog_AWK="$ac_prog"
81ecdfbb 6218 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6219 break 2
6220 fi
6221done
81ecdfbb
RW
6222 done
6223IFS=$as_save_IFS
bec39cab
AC
6224
6225fi
6226fi
6227AWK=$ac_cv_prog_AWK
6228if test -n "$AWK"; then
81ecdfbb
RW
6229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
6230$as_echo "$AWK" >&6; }
bec39cab 6231else
81ecdfbb
RW
6232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6233$as_echo "no" >&6; }
bec39cab
AC
6234fi
6235
bec39cab 6236
81ecdfbb 6237 test -n "$AWK" && break
bec39cab
AC
6238done
6239
c971b7fa
PA
6240# Find a good install program. We prefer a C program (faster),
6241# so one script is as good as another. But avoid the broken or
6242# incompatible versions:
6243# SysV /etc/install, /usr/sbin/install
6244# SunOS /usr/etc/install
6245# IRIX /sbin/install
6246# AIX /bin/install
6247# AmigaOS /C/install, which installs bootblocks on floppy discs
6248# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6249# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6250# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6251# OS/2's system install, which has a completely different semantic
6252# ./install, which can be erroneously created by make from ./install.sh.
6253# Reject install programs that cannot install multiple files.
6254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6255$as_echo_n "checking for a BSD-compatible install... " >&6; }
6256if test -z "$INSTALL"; then
6257if test "${ac_cv_path_install+set}" = set; then :
6258 $as_echo_n "(cached) " >&6
6259else
6260 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6261for as_dir in $PATH
6262do
6263 IFS=$as_save_IFS
6264 test -z "$as_dir" && as_dir=.
6265 # Account for people who put trailing slashes in PATH elements.
6266case $as_dir/ in #((
6267 ./ | .// | /[cC]/* | \
6268 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
6269 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
6270 /usr/ucb/* ) ;;
6271 *)
6272 # OSF1 and SCO ODT 3.0 have their own names for install.
6273 # Don't use installbsd from OSF since it installs stuff as root
6274 # by default.
6275 for ac_prog in ginstall scoinst install; do
6276 for ac_exec_ext in '' $ac_executable_extensions; do
6277 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
6278 if test $ac_prog = install &&
6279 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6280 # AIX install. It has an incompatible calling convention.
6281 :
6282 elif test $ac_prog = install &&
6283 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6284 # program-specific install script used by HP pwplus--don't use.
6285 :
6286 else
6287 rm -rf conftest.one conftest.two conftest.dir
6288 echo one > conftest.one
6289 echo two > conftest.two
6290 mkdir conftest.dir
6291 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6292 test -s conftest.one && test -s conftest.two &&
6293 test -s conftest.dir/conftest.one &&
6294 test -s conftest.dir/conftest.two
6295 then
6296 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6297 break 3
6298 fi
6299 fi
6300 fi
6301 done
6302 done
6303 ;;
6304esac
6305
6306 done
6307IFS=$as_save_IFS
6308
6309rm -rf conftest.one conftest.two conftest.dir
6310
6311fi
6312 if test "${ac_cv_path_install+set}" = set; then
6313 INSTALL=$ac_cv_path_install
6314 else
6315 # As a last resort, use the slow shell script. Don't cache a
6316 # value for INSTALL within a source directory, because that will
6317 # break other packages using the cache if that directory is
6318 # removed, or if the value is a relative name.
6319 INSTALL=$ac_install_sh
6320 fi
6321fi
6322{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6323$as_echo "$INSTALL" >&6; }
6324
6325# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6326# It thinks the first close brace ends the variable substitution.
6327test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6328
6329test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6330
6331test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
bec39cab 6332
81ecdfbb
RW
6333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
6334$as_echo_n "checking whether ln -s works... " >&6; }
bec39cab
AC
6335LN_S=$as_ln_s
6336if test "$LN_S" = "ln -s"; then
81ecdfbb
RW
6337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6338$as_echo "yes" >&6; }
bec39cab 6339else
81ecdfbb
RW
6340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
6341$as_echo "no, using $LN_S" >&6; }
bec39cab
AC
6342fi
6343
6344if test -n "$ac_tool_prefix"; then
6345 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6346set dummy ${ac_tool_prefix}ranlib; ac_word=$2
81ecdfbb
RW
6347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6348$as_echo_n "checking for $ac_word... " >&6; }
6349if test "${ac_cv_prog_RANLIB+set}" = set; then :
6350 $as_echo_n "(cached) " >&6
bec39cab
AC
6351else
6352 if test -n "$RANLIB"; then
6353 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6354else
6355as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6356for as_dir in $PATH
6357do
6358 IFS=$as_save_IFS
6359 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6360 for ac_exec_ext in '' $ac_executable_extensions; do
6361 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6362 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
81ecdfbb 6363 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6364 break 2
6365 fi
6366done
81ecdfbb
RW
6367 done
6368IFS=$as_save_IFS
bec39cab
AC
6369
6370fi
6371fi
6372RANLIB=$ac_cv_prog_RANLIB
6373if test -n "$RANLIB"; then
81ecdfbb
RW
6374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6375$as_echo "$RANLIB" >&6; }
bec39cab 6376else
81ecdfbb
RW
6377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6378$as_echo "no" >&6; }
bec39cab
AC
6379fi
6380
81ecdfbb 6381
bec39cab
AC
6382fi
6383if test -z "$ac_cv_prog_RANLIB"; then
6384 ac_ct_RANLIB=$RANLIB
6385 # Extract the first word of "ranlib", so it can be a program name with args.
6386set dummy ranlib; ac_word=$2
81ecdfbb
RW
6387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6388$as_echo_n "checking for $ac_word... " >&6; }
6389if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
6390 $as_echo_n "(cached) " >&6
bec39cab
AC
6391else
6392 if test -n "$ac_ct_RANLIB"; then
6393 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6394else
6395as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6396for as_dir in $PATH
6397do
6398 IFS=$as_save_IFS
6399 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6400 for ac_exec_ext in '' $ac_executable_extensions; do
6401 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6402 ac_cv_prog_ac_ct_RANLIB="ranlib"
81ecdfbb 6403 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6404 break 2
6405 fi
6406done
81ecdfbb
RW
6407 done
6408IFS=$as_save_IFS
bec39cab 6409
bec39cab
AC
6410fi
6411fi
6412ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6413if test -n "$ac_ct_RANLIB"; then
81ecdfbb
RW
6414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6415$as_echo "$ac_ct_RANLIB" >&6; }
bec39cab 6416else
81ecdfbb
RW
6417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6418$as_echo "no" >&6; }
bec39cab
AC
6419fi
6420
81ecdfbb
RW
6421 if test "x$ac_ct_RANLIB" = x; then
6422 RANLIB=":"
6423 else
6424 case $cross_compiling:$ac_tool_warned in
6425yes:)
6426{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6427$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6428ac_tool_warned=yes ;;
6429esac
6430 RANLIB=$ac_ct_RANLIB
6431 fi
bec39cab
AC
6432else
6433 RANLIB="$ac_cv_prog_RANLIB"
6434fi
6435
6436for ac_prog in 'bison -y' byacc
6437do
6438 # Extract the first word of "$ac_prog", so it can be a program name with args.
6439set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
6440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6441$as_echo_n "checking for $ac_word... " >&6; }
6442if test "${ac_cv_prog_YACC+set}" = set; then :
6443 $as_echo_n "(cached) " >&6
bec39cab
AC
6444else
6445 if test -n "$YACC"; then
6446 ac_cv_prog_YACC="$YACC" # Let the user override the test.
6447else
6448as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6449for as_dir in $PATH
6450do
6451 IFS=$as_save_IFS
6452 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6453 for ac_exec_ext in '' $ac_executable_extensions; do
6454 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6455 ac_cv_prog_YACC="$ac_prog"
81ecdfbb 6456 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6457 break 2
6458 fi
6459done
81ecdfbb
RW
6460 done
6461IFS=$as_save_IFS
bec39cab
AC
6462
6463fi
6464fi
6465YACC=$ac_cv_prog_YACC
6466if test -n "$YACC"; then
81ecdfbb
RW
6467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
6468$as_echo "$YACC" >&6; }
bec39cab 6469else
81ecdfbb
RW
6470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6471$as_echo "no" >&6; }
bec39cab
AC
6472fi
6473
81ecdfbb 6474
bec39cab
AC
6475 test -n "$YACC" && break
6476done
6477test -n "$YACC" || YACC="yacc"
6478
6479
6480if test -n "$ac_tool_prefix"; then
6481 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6482set dummy ${ac_tool_prefix}ar; ac_word=$2
81ecdfbb
RW
6483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6484$as_echo_n "checking for $ac_word... " >&6; }
6485if test "${ac_cv_prog_AR+set}" = set; then :
6486 $as_echo_n "(cached) " >&6
bec39cab
AC
6487else
6488 if test -n "$AR"; then
6489 ac_cv_prog_AR="$AR" # Let the user override the test.
6490else
6491as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6492for as_dir in $PATH
6493do
6494 IFS=$as_save_IFS
6495 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6496 for ac_exec_ext in '' $ac_executable_extensions; do
6497 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6498 ac_cv_prog_AR="${ac_tool_prefix}ar"
81ecdfbb 6499 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6500 break 2
6501 fi
6502done
81ecdfbb
RW
6503 done
6504IFS=$as_save_IFS
bec39cab
AC
6505
6506fi
6507fi
6508AR=$ac_cv_prog_AR
6509if test -n "$AR"; then
81ecdfbb
RW
6510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6511$as_echo "$AR" >&6; }
bec39cab 6512else
81ecdfbb
RW
6513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6514$as_echo "no" >&6; }
bec39cab
AC
6515fi
6516
81ecdfbb 6517
bec39cab
AC
6518fi
6519if test -z "$ac_cv_prog_AR"; then
6520 ac_ct_AR=$AR
6521 # Extract the first word of "ar", so it can be a program name with args.
6522set dummy ar; ac_word=$2
81ecdfbb
RW
6523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6524$as_echo_n "checking for $ac_word... " >&6; }
6525if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
6526 $as_echo_n "(cached) " >&6
bec39cab
AC
6527else
6528 if test -n "$ac_ct_AR"; then
6529 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6530else
6531as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6532for as_dir in $PATH
6533do
6534 IFS=$as_save_IFS
6535 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6536 for ac_exec_ext in '' $ac_executable_extensions; do
6537 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6538 ac_cv_prog_ac_ct_AR="ar"
81ecdfbb 6539 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6540 break 2
6541 fi
6542done
81ecdfbb
RW
6543 done
6544IFS=$as_save_IFS
bec39cab
AC
6545
6546fi
6547fi
6548ac_ct_AR=$ac_cv_prog_ac_ct_AR
6549if test -n "$ac_ct_AR"; then
81ecdfbb
RW
6550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6551$as_echo "$ac_ct_AR" >&6; }
bec39cab 6552else
81ecdfbb
RW
6553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6554$as_echo "no" >&6; }
bec39cab
AC
6555fi
6556
81ecdfbb
RW
6557 if test "x$ac_ct_AR" = x; then
6558 AR=""
6559 else
6560 case $cross_compiling:$ac_tool_warned in
6561yes:)
6562{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6563$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6564ac_tool_warned=yes ;;
6565esac
6566 AR=$ac_ct_AR
6567 fi
bec39cab
AC
6568else
6569 AR="$ac_cv_prog_AR"
6570fi
6571
6572if test -n "$ac_tool_prefix"; then
6573 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
6574set dummy ${ac_tool_prefix}dlltool; ac_word=$2
81ecdfbb
RW
6575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6576$as_echo_n "checking for $ac_word... " >&6; }
6577if test "${ac_cv_prog_DLLTOOL+set}" = set; then :
6578 $as_echo_n "(cached) " >&6
bec39cab
AC
6579else
6580 if test -n "$DLLTOOL"; then
6581 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
6582else
6583as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6584for as_dir in $PATH
6585do
6586 IFS=$as_save_IFS
6587 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6588 for ac_exec_ext in '' $ac_executable_extensions; do
6589 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6590 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
81ecdfbb 6591 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6592 break 2
6593 fi
6594done
81ecdfbb
RW
6595 done
6596IFS=$as_save_IFS
bec39cab
AC
6597
6598fi
6599fi
6600DLLTOOL=$ac_cv_prog_DLLTOOL
6601if test -n "$DLLTOOL"; then
81ecdfbb
RW
6602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
6603$as_echo "$DLLTOOL" >&6; }
bec39cab 6604else
81ecdfbb
RW
6605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6606$as_echo "no" >&6; }
bec39cab
AC
6607fi
6608
81ecdfbb 6609
bec39cab
AC
6610fi
6611if test -z "$ac_cv_prog_DLLTOOL"; then
6612 ac_ct_DLLTOOL=$DLLTOOL
6613 # Extract the first word of "dlltool", so it can be a program name with args.
6614set dummy dlltool; ac_word=$2
81ecdfbb
RW
6615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6616$as_echo_n "checking for $ac_word... " >&6; }
6617if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then :
6618 $as_echo_n "(cached) " >&6
bec39cab
AC
6619else
6620 if test -n "$ac_ct_DLLTOOL"; then
6621 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
6622else
6623as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6624for as_dir in $PATH
6625do
6626 IFS=$as_save_IFS
6627 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6628 for ac_exec_ext in '' $ac_executable_extensions; do
6629 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6630 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
81ecdfbb 6631 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6632 break 2
6633 fi
6634done
81ecdfbb
RW
6635 done
6636IFS=$as_save_IFS
bec39cab
AC
6637
6638fi
6639fi
6640ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
6641if test -n "$ac_ct_DLLTOOL"; then
81ecdfbb
RW
6642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
6643$as_echo "$ac_ct_DLLTOOL" >&6; }
bec39cab 6644else
81ecdfbb
RW
6645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6646$as_echo "no" >&6; }
bec39cab
AC
6647fi
6648
81ecdfbb
RW
6649 if test "x$ac_ct_DLLTOOL" = x; then
6650 DLLTOOL=""
6651 else
6652 case $cross_compiling:$ac_tool_warned in
6653yes:)
6654{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6655$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6656ac_tool_warned=yes ;;
6657esac
6658 DLLTOOL=$ac_ct_DLLTOOL
6659 fi
bec39cab
AC
6660else
6661 DLLTOOL="$ac_cv_prog_DLLTOOL"
6662fi
6663
6664if test -n "$ac_tool_prefix"; then
6665 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
6666set dummy ${ac_tool_prefix}windres; ac_word=$2
81ecdfbb
RW
6667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6668$as_echo_n "checking for $ac_word... " >&6; }
6669if test "${ac_cv_prog_WINDRES+set}" = set; then :
6670 $as_echo_n "(cached) " >&6
bec39cab
AC
6671else
6672 if test -n "$WINDRES"; then
6673 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
6674else
6675as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6676for as_dir in $PATH
6677do
6678 IFS=$as_save_IFS
6679 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6680 for ac_exec_ext in '' $ac_executable_extensions; do
6681 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6682 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
81ecdfbb 6683 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6684 break 2
6685 fi
6686done
81ecdfbb
RW
6687 done
6688IFS=$as_save_IFS
bec39cab
AC
6689
6690fi
6691fi
6692WINDRES=$ac_cv_prog_WINDRES
6693if test -n "$WINDRES"; then
81ecdfbb
RW
6694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
6695$as_echo "$WINDRES" >&6; }
bec39cab 6696else
81ecdfbb
RW
6697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6698$as_echo "no" >&6; }
bec39cab
AC
6699fi
6700
81ecdfbb 6701
bec39cab
AC
6702fi
6703if test -z "$ac_cv_prog_WINDRES"; then
6704 ac_ct_WINDRES=$WINDRES
6705 # Extract the first word of "windres", so it can be a program name with args.
6706set dummy windres; ac_word=$2
81ecdfbb
RW
6707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6708$as_echo_n "checking for $ac_word... " >&6; }
6709if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then :
6710 $as_echo_n "(cached) " >&6
bec39cab
AC
6711else
6712 if test -n "$ac_ct_WINDRES"; then
6713 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
6714else
6715as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6716for as_dir in $PATH
6717do
6718 IFS=$as_save_IFS
6719 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6720 for ac_exec_ext in '' $ac_executable_extensions; do
6721 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6722 ac_cv_prog_ac_ct_WINDRES="windres"
81ecdfbb 6723 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6724 break 2
6725 fi
6726done
81ecdfbb
RW
6727 done
6728IFS=$as_save_IFS
bec39cab
AC
6729
6730fi
6731fi
6732ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
6733if test -n "$ac_ct_WINDRES"; then
81ecdfbb
RW
6734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
6735$as_echo "$ac_ct_WINDRES" >&6; }
bec39cab 6736else
81ecdfbb
RW
6737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6738$as_echo "no" >&6; }
c906108c 6739fi
bec39cab 6740
81ecdfbb
RW
6741 if test "x$ac_ct_WINDRES" = x; then
6742 WINDRES=""
6743 else
6744 case $cross_compiling:$ac_tool_warned in
6745yes:)
6746{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6747$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6748ac_tool_warned=yes ;;
6749esac
6750 WINDRES=$ac_ct_WINDRES
6751 fi
c906108c 6752else
bec39cab 6753 WINDRES="$ac_cv_prog_WINDRES"
c906108c
SS
6754fi
6755
bec39cab 6756
036c3acb
TS
6757case $host_os in
6758 gnu*)
6759 # Needed for GNU Hurd hosts.
6760 if test -n "$ac_tool_prefix"; then
bec39cab
AC
6761 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
6762set dummy ${ac_tool_prefix}mig; ac_word=$2
81ecdfbb
RW
6763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6764$as_echo_n "checking for $ac_word... " >&6; }
6765if test "${ac_cv_prog_MIG+set}" = set; then :
6766 $as_echo_n "(cached) " >&6
c906108c 6767else
bec39cab
AC
6768 if test -n "$MIG"; then
6769 ac_cv_prog_MIG="$MIG" # Let the user override the test.
6770else
6771as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6772for as_dir in $PATH
6773do
6774 IFS=$as_save_IFS
6775 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6776 for ac_exec_ext in '' $ac_executable_extensions; do
6777 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6778 ac_cv_prog_MIG="${ac_tool_prefix}mig"
81ecdfbb 6779 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6780 break 2
6781 fi
6782done
81ecdfbb
RW
6783 done
6784IFS=$as_save_IFS
bec39cab 6785
c906108c 6786fi
bec39cab
AC
6787fi
6788MIG=$ac_cv_prog_MIG
6789if test -n "$MIG"; then
81ecdfbb
RW
6790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
6791$as_echo "$MIG" >&6; }
c906108c 6792else
81ecdfbb
RW
6793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6794$as_echo "no" >&6; }
c906108c
SS
6795fi
6796
81ecdfbb 6797
bec39cab
AC
6798fi
6799if test -z "$ac_cv_prog_MIG"; then
6800 ac_ct_MIG=$MIG
6801 # Extract the first word of "mig", so it can be a program name with args.
6802set dummy mig; ac_word=$2
81ecdfbb
RW
6803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6804$as_echo_n "checking for $ac_word... " >&6; }
6805if test "${ac_cv_prog_ac_ct_MIG+set}" = set; then :
6806 $as_echo_n "(cached) " >&6
bec39cab
AC
6807else
6808 if test -n "$ac_ct_MIG"; then
6809 ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
6810else
6811as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6812for as_dir in $PATH
6813do
6814 IFS=$as_save_IFS
6815 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6816 for ac_exec_ext in '' $ac_executable_extensions; do
6817 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6818 ac_cv_prog_ac_ct_MIG="mig"
81ecdfbb 6819 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6820 break 2
6821 fi
6822done
81ecdfbb
RW
6823 done
6824IFS=$as_save_IFS
c906108c 6825
bec39cab
AC
6826fi
6827fi
6828ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
6829if test -n "$ac_ct_MIG"; then
81ecdfbb
RW
6830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
6831$as_echo "$ac_ct_MIG" >&6; }
bec39cab 6832else
81ecdfbb
RW
6833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6834$as_echo "no" >&6; }
bec39cab 6835fi
c906108c 6836
81ecdfbb
RW
6837 if test "x$ac_ct_MIG" = x; then
6838 MIG=""
6839 else
6840 case $cross_compiling:$ac_tool_warned in
6841yes:)
6842{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6843$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6844ac_tool_warned=yes ;;
6845esac
6846 MIG=$ac_ct_MIG
6847 fi
bec39cab
AC
6848else
6849 MIG="$ac_cv_prog_MIG"
6850fi
c906108c 6851
036c3acb
TS
6852 if test x"$MIG" = x; then
6853 as_fn_error "MIG not found but required for $host hosts" "$LINENO" 5
6854 fi
6855 ;;
6856esac
c906108c 6857
bec39cab
AC
6858# ---------------------- #
6859# Checks for libraries. #
6860# ---------------------- #
c906108c 6861
bec39cab 6862# We might need to link with -lm; most simulators need it.
81ecdfbb
RW
6863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
6864$as_echo_n "checking for main in -lm... " >&6; }
6865if test "${ac_cv_lib_m_main+set}" = set; then :
6866 $as_echo_n "(cached) " >&6
bec39cab
AC
6867else
6868 ac_check_lib_save_LIBS=$LIBS
6869LIBS="-lm $LIBS"
81ecdfbb 6870cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6871/* end confdefs.h. */
c906108c 6872
c906108c 6873
bec39cab
AC
6874int
6875main ()
6876{
81ecdfbb 6877return main ();
bec39cab
AC
6878 ;
6879 return 0;
6880}
6881_ACEOF
81ecdfbb 6882if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
6883 ac_cv_lib_m_main=yes
6884else
81ecdfbb 6885 ac_cv_lib_m_main=no
bec39cab 6886fi
81ecdfbb
RW
6887rm -f core conftest.err conftest.$ac_objext \
6888 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
6889LIBS=$ac_check_lib_save_LIBS
6890fi
81ecdfbb
RW
6891{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
6892$as_echo "$ac_cv_lib_m_main" >&6; }
6893if test "x$ac_cv_lib_m_main" = x""yes; then :
bec39cab
AC
6894 cat >>confdefs.h <<_ACEOF
6895#define HAVE_LIBM 1
6896_ACEOF
6897
6898 LIBS="-lm $LIBS"
c906108c 6899
c906108c 6900fi
bec39cab
AC
6901
6902
6903# We need to link with -lw to get `wctype' on Solaris before Solaris
6904# 2.6. Solaris 2.6 and beyond have this function in libc, and have a
6905# libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
6906# is known to have this problem). Therefore we avoid libw if we can.
81ecdfbb
RW
6907ac_fn_c_check_func "$LINENO" "wctype" "ac_cv_func_wctype"
6908if test "x$ac_cv_func_wctype" = x""yes; then :
bec39cab 6909
c906108c 6910else
81ecdfbb
RW
6911 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype in -lw" >&5
6912$as_echo_n "checking for wctype in -lw... " >&6; }
6913if test "${ac_cv_lib_w_wctype+set}" = set; then :
6914 $as_echo_n "(cached) " >&6
bec39cab
AC
6915else
6916 ac_check_lib_save_LIBS=$LIBS
6917LIBS="-lw $LIBS"
81ecdfbb 6918cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6919/* end confdefs.h. */
c906108c 6920
81ecdfbb
RW
6921/* Override any GCC internal prototype to avoid an error.
6922 Use char because int might match the return type of a GCC
6923 builtin and then its argument prototype would still apply. */
bec39cab
AC
6924#ifdef __cplusplus
6925extern "C"
6926#endif
bec39cab
AC
6927char wctype ();
6928int
6929main ()
6930{
81ecdfbb 6931return wctype ();
bec39cab
AC
6932 ;
6933 return 0;
6934}
6935_ACEOF
81ecdfbb 6936if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
6937 ac_cv_lib_w_wctype=yes
6938else
81ecdfbb 6939 ac_cv_lib_w_wctype=no
bec39cab 6940fi
81ecdfbb
RW
6941rm -f core conftest.err conftest.$ac_objext \
6942 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
6943LIBS=$ac_check_lib_save_LIBS
6944fi
81ecdfbb
RW
6945{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_w_wctype" >&5
6946$as_echo "$ac_cv_lib_w_wctype" >&6; }
6947if test "x$ac_cv_lib_w_wctype" = x""yes; then :
bec39cab
AC
6948 cat >>confdefs.h <<_ACEOF
6949#define HAVE_LIBW 1
6950_ACEOF
c906108c 6951
bec39cab 6952 LIBS="-lw $LIBS"
c906108c 6953
bec39cab 6954fi
c906108c 6955
bec39cab 6956fi
c906108c 6957
ddc9cd0f 6958
bec39cab 6959# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
81ecdfbb
RW
6960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
6961$as_echo_n "checking for library containing gethostbyname... " >&6; }
6962if test "${ac_cv_search_gethostbyname+set}" = set; then :
6963 $as_echo_n "(cached) " >&6
bec39cab
AC
6964else
6965 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6966cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6967/* end confdefs.h. */
ddc9cd0f 6968
81ecdfbb
RW
6969/* Override any GCC internal prototype to avoid an error.
6970 Use char because int might match the return type of a GCC
6971 builtin and then its argument prototype would still apply. */
bec39cab
AC
6972#ifdef __cplusplus
6973extern "C"
6974#endif
bec39cab
AC
6975char gethostbyname ();
6976int
6977main ()
6978{
81ecdfbb 6979return gethostbyname ();
bec39cab
AC
6980 ;
6981 return 0;
6982}
6983_ACEOF
81ecdfbb
RW
6984for ac_lib in '' nsl; do
6985 if test -z "$ac_lib"; then
6986 ac_res="none required"
6987 else
6988 ac_res=-l$ac_lib
b4e70030 6989 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
6990 fi
6991 if ac_fn_c_try_link "$LINENO"; then :
6992 ac_cv_search_gethostbyname=$ac_res
6993fi
6994rm -f core conftest.err conftest.$ac_objext \
6995 conftest$ac_exeext
6996 if test "${ac_cv_search_gethostbyname+set}" = set; then :
6997 break
6998fi
6999done
7000if test "${ac_cv_search_gethostbyname+set}" = set; then :
ddc9cd0f 7001
bec39cab 7002else
81ecdfbb 7003 ac_cv_search_gethostbyname=no
bec39cab 7004fi
81ecdfbb 7005rm conftest.$ac_ext
bec39cab
AC
7006LIBS=$ac_func_search_save_LIBS
7007fi
81ecdfbb
RW
7008{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
7009$as_echo "$ac_cv_search_gethostbyname" >&6; }
7010ac_res=$ac_cv_search_gethostbyname
7011if test "$ac_res" != no; then :
7012 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
96baa820 7013
bec39cab 7014fi
96baa820 7015
c906108c 7016
b4e70030 7017# Some systems (e.g. Solaris) have `socketpair' in libsocket.
81ecdfbb
RW
7018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
7019$as_echo_n "checking for library containing socketpair... " >&6; }
7020if test "${ac_cv_search_socketpair+set}" = set; then :
7021 $as_echo_n "(cached) " >&6
b4e70030
JB
7022else
7023 ac_func_search_save_LIBS=$LIBS
81ecdfbb 7024cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
7025/* end confdefs.h. */
7026
81ecdfbb
RW
7027/* Override any GCC internal prototype to avoid an error.
7028 Use char because int might match the return type of a GCC
7029 builtin and then its argument prototype would still apply. */
b4e70030
JB
7030#ifdef __cplusplus
7031extern "C"
7032#endif
b4e70030
JB
7033char socketpair ();
7034int
7035main ()
7036{
81ecdfbb 7037return socketpair ();
b4e70030
JB
7038 ;
7039 return 0;
7040}
7041_ACEOF
81ecdfbb
RW
7042for ac_lib in '' socket; do
7043 if test -z "$ac_lib"; then
7044 ac_res="none required"
7045 else
7046 ac_res=-l$ac_lib
b4e70030 7047 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
7048 fi
7049 if ac_fn_c_try_link "$LINENO"; then :
7050 ac_cv_search_socketpair=$ac_res
7051fi
7052rm -f core conftest.err conftest.$ac_objext \
7053 conftest$ac_exeext
7054 if test "${ac_cv_search_socketpair+set}" = set; then :
7055 break
7056fi
7057done
7058if test "${ac_cv_search_socketpair+set}" = set; then :
b4e70030 7059
b4e70030 7060else
81ecdfbb 7061 ac_cv_search_socketpair=no
b4e70030 7062fi
81ecdfbb 7063rm conftest.$ac_ext
b4e70030
JB
7064LIBS=$ac_func_search_save_LIBS
7065fi
81ecdfbb
RW
7066{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
7067$as_echo "$ac_cv_search_socketpair" >&6; }
7068ac_res=$ac_cv_search_socketpair
7069if test "$ac_res" != no; then :
7070 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
b4e70030
JB
7071
7072fi
7073
7074
233a11ab 7075# Link in zlib if we can. This allows us to read compressed debug sections.
b040ad30 7076
711a72d3 7077 # Use the system's zlib library.
39f3de7c
L
7078 zlibdir="-L\$(top_builddir)/../zlib"
7079 zlibinc="-I\$(top_srcdir)/../zlib"
b040ad30 7080
711a72d3
L
7081# Check whether --with-system-zlib was given.
7082if test "${with_system_zlib+set}" = set; then :
afa59b79
L
7083 withval=$with_system_zlib; if test x$with_system_zlib = xyes ; then
7084 zlibdir=
7085 zlibinc=
7086 fi
b040ad30 7087
233a11ab 7088fi
233a11ab 7089
233a11ab 7090
233a11ab 7091
b040ad30 7092
233a11ab 7093
25268153
JB
7094# On FreeBSD we may need libutil for kinfo_getvmmap (used by fbsd-nat.c).
7095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getvmmap" >&5
7096$as_echo_n "checking for library containing kinfo_getvmmap... " >&6; }
7097if test "${ac_cv_search_kinfo_getvmmap+set}" = set; then :
7098 $as_echo_n "(cached) " >&6
7099else
7100 ac_func_search_save_LIBS=$LIBS
7101cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7102/* end confdefs.h. */
7103
7104/* Override any GCC internal prototype to avoid an error.
7105 Use char because int might match the return type of a GCC
7106 builtin and then its argument prototype would still apply. */
7107#ifdef __cplusplus
7108extern "C"
7109#endif
7110char kinfo_getvmmap ();
7111int
7112main ()
7113{
7114return kinfo_getvmmap ();
7115 ;
7116 return 0;
7117}
7118_ACEOF
7119for ac_lib in '' util; do
7120 if test -z "$ac_lib"; then
7121 ac_res="none required"
7122 else
7123 ac_res=-l$ac_lib
7124 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7125 fi
7126 if ac_fn_c_try_link "$LINENO"; then :
7127 ac_cv_search_kinfo_getvmmap=$ac_res
7128fi
7129rm -f core conftest.err conftest.$ac_objext \
7130 conftest$ac_exeext
7131 if test "${ac_cv_search_kinfo_getvmmap+set}" = set; then :
7132 break
7133fi
7134done
7135if test "${ac_cv_search_kinfo_getvmmap+set}" = set; then :
7136
7137else
7138 ac_cv_search_kinfo_getvmmap=no
7139fi
7140rm conftest.$ac_ext
7141LIBS=$ac_func_search_save_LIBS
7142fi
7143{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getvmmap" >&5
7144$as_echo "$ac_cv_search_kinfo_getvmmap" >&6; }
7145ac_res=$ac_cv_search_kinfo_getvmmap
7146if test "$ac_res" != no; then :
7147 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7148
7149$as_echo "#define HAVE_KINFO_GETVMMAP 1" >>confdefs.h
7150
7151fi
7152
7153
77f120bf 7154
016a3251
DD
7155 if test "X$prefix" = "XNONE"; then
7156 acl_final_prefix="$ac_default_prefix"
7157 else
7158 acl_final_prefix="$prefix"
7159 fi
7160 if test "X$exec_prefix" = "XNONE"; then
7161 acl_final_exec_prefix='${prefix}'
7162 else
7163 acl_final_exec_prefix="$exec_prefix"
7164 fi
7165 acl_save_prefix="$prefix"
7166 prefix="$acl_final_prefix"
7167 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
7168 prefix="$acl_save_prefix"
7169
7170
7171# Check whether --with-gnu-ld was given.
7172if test "${with_gnu_ld+set}" = set; then :
7173 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
7174else
7175 with_gnu_ld=no
7176fi
7177
7178# Prepare PATH_SEPARATOR.
7179# The user is always right.
7180if test "${PATH_SEPARATOR+set}" != set; then
7181 echo "#! /bin/sh" >conf$$.sh
7182 echo "exit 0" >>conf$$.sh
7183 chmod +x conf$$.sh
7184 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
7185 PATH_SEPARATOR=';'
7186 else
7187 PATH_SEPARATOR=:
7188 fi
7189 rm -f conf$$.sh
7190fi
7191ac_prog=ld
7192if test "$GCC" = yes; then
7193 # Check if gcc -print-prog-name=ld gives a path.
7194 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
7195$as_echo_n "checking for ld used by GCC... " >&6; }
7196 case $host in
7197 *-*-mingw*)
7198 # gcc leaves a trailing carriage return which upsets mingw
7199 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
7200 *)
7201 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
7202 esac
7203 case $ac_prog in
7204 # Accept absolute paths.
7205 [\\/]* | [A-Za-z]:[\\/]*)
7206 re_direlt='/[^/][^/]*/\.\./'
7207 # Canonicalize the path of ld
7208 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
7209 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
7210 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
7211 done
7212 test -z "$LD" && LD="$ac_prog"
7213 ;;
7214 "")
7215 # If it fails, then pretend we aren't using GCC.
7216 ac_prog=ld
7217 ;;
7218 *)
7219 # If it is relative, then search for the first ld in PATH.
7220 with_gnu_ld=unknown
7221 ;;
7222 esac
7223elif test "$with_gnu_ld" = yes; then
7224 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
7225$as_echo_n "checking for GNU ld... " >&6; }
7226else
7227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
7228$as_echo_n "checking for non-GNU ld... " >&6; }
7229fi
7230if test "${acl_cv_path_LD+set}" = set; then :
7231 $as_echo_n "(cached) " >&6
7232else
7233 if test -z "$LD"; then
7234 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
7235 for ac_dir in $PATH; do
7236 test -z "$ac_dir" && ac_dir=.
7237 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
7238 acl_cv_path_LD="$ac_dir/$ac_prog"
7239 # Check to see if the program is GNU ld. I'd rather use --version,
7240 # but apparently some GNU ld's only accept -v.
7241 # Break only if it was the GNU/non-GNU ld that we prefer.
7242 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
7243 test "$with_gnu_ld" != no && break
7244 else
7245 test "$with_gnu_ld" != yes && break
7246 fi
7247 fi
7248 done
7249 IFS="$ac_save_ifs"
7250else
7251 acl_cv_path_LD="$LD" # Let the user override the test with a path.
7252fi
7253fi
7254
7255LD="$acl_cv_path_LD"
7256if test -n "$LD"; then
7257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
7258$as_echo "$LD" >&6; }
7259else
7260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7261$as_echo "no" >&6; }
7262fi
7263test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
7264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
7265$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
7266if test "${acl_cv_prog_gnu_ld+set}" = set; then :
7267 $as_echo_n "(cached) " >&6
7268else
7269 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
7270if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
7271 acl_cv_prog_gnu_ld=yes
7272else
7273 acl_cv_prog_gnu_ld=no
7274fi
7275fi
7276{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
7277$as_echo "$acl_cv_prog_gnu_ld" >&6; }
7278with_gnu_ld=$acl_cv_prog_gnu_ld
7279
7280
7281
7282 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
7283$as_echo_n "checking for shared library run path origin... " >&6; }
7284if test "${acl_cv_rpath+set}" = set; then :
7285 $as_echo_n "(cached) " >&6
7286else
7287
7288 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
7289 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
7290 . ./conftest.sh
7291 rm -f ./conftest.sh
7292 acl_cv_rpath=done
7293
7294fi
7295{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
7296$as_echo "$acl_cv_rpath" >&6; }
7297 wl="$acl_cv_wl"
7298 libext="$acl_cv_libext"
7299 shlibext="$acl_cv_shlibext"
7300 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
7301 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
7302 hardcode_direct="$acl_cv_hardcode_direct"
7303 hardcode_minus_L="$acl_cv_hardcode_minus_L"
7304 # Check whether --enable-rpath was given.
7305if test "${enable_rpath+set}" = set; then :
7306 enableval=$enable_rpath; :
7307else
7308 enable_rpath=yes
7309fi
7310
7311
7312
7313
7314
7315
7316
7317
7318 use_additional=yes
7319
7320 acl_save_prefix="$prefix"
7321 prefix="$acl_final_prefix"
7322 acl_save_exec_prefix="$exec_prefix"
7323 exec_prefix="$acl_final_exec_prefix"
7324
7325 eval additional_includedir=\"$includedir\"
7326 eval additional_libdir=\"$libdir\"
7327
7328 exec_prefix="$acl_save_exec_prefix"
7329 prefix="$acl_save_prefix"
77f120bf 7330
6c7a06a3 7331
81ecdfbb
RW
7332# Check whether --with-libiconv-prefix was given.
7333if test "${with_libiconv_prefix+set}" = set; then :
7334 withval=$with_libiconv_prefix;
016a3251
DD
7335 if test "X$withval" = "Xno"; then
7336 use_additional=no
7337 else
7338 if test "X$withval" = "X"; then
7339
7340 acl_save_prefix="$prefix"
7341 prefix="$acl_final_prefix"
7342 acl_save_exec_prefix="$exec_prefix"
7343 exec_prefix="$acl_final_exec_prefix"
7344
7345 eval additional_includedir=\"$includedir\"
7346 eval additional_libdir=\"$libdir\"
7347
7348 exec_prefix="$acl_save_exec_prefix"
7349 prefix="$acl_save_prefix"
7350
7351 else
7352 additional_includedir="$withval/include"
7353 additional_libdir="$withval/lib"
7354 fi
7355 fi
6c7a06a3 7356
81ecdfbb
RW
7357fi
7358
016a3251
DD
7359 LIBICONV=
7360 LTLIBICONV=
7361 INCICONV=
7362 rpathdirs=
7363 ltrpathdirs=
7364 names_already_handled=
7365 names_next_round='iconv '
7366 while test -n "$names_next_round"; do
7367 names_this_round="$names_next_round"
7368 names_next_round=
7369 for name in $names_this_round; do
7370 already_handled=
7371 for n in $names_already_handled; do
7372 if test "$n" = "$name"; then
7373 already_handled=yes
7374 break
7375 fi
7376 done
7377 if test -z "$already_handled"; then
7378 names_already_handled="$names_already_handled $name"
7379 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
7380 eval value=\"\$HAVE_LIB$uppername\"
7381 if test -n "$value"; then
7382 if test "$value" = yes; then
7383 eval value=\"\$LIB$uppername\"
7384 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
7385 eval value=\"\$LTLIB$uppername\"
7386 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
7387 else
7388 :
7389 fi
7390 else
7391 found_dir=
7392 found_la=
7393 found_so=
7394 found_a=
7395 if test $use_additional = yes; then
7396 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
7397 found_dir="$additional_libdir"
7398 found_so="$additional_libdir/lib$name.$shlibext"
7399 if test -f "$additional_libdir/lib$name.la"; then
7400 found_la="$additional_libdir/lib$name.la"
7401 fi
7402 else
7403 if test -f "$additional_libdir/lib$name.$libext"; then
7404 found_dir="$additional_libdir"
7405 found_a="$additional_libdir/lib$name.$libext"
7406 if test -f "$additional_libdir/lib$name.la"; then
7407 found_la="$additional_libdir/lib$name.la"
7408 fi
7409 fi
7410 fi
7411 fi
7412 if test "X$found_dir" = "X"; then
7413 for x in $LDFLAGS $LTLIBICONV; do
7414
7415 acl_save_prefix="$prefix"
7416 prefix="$acl_final_prefix"
7417 acl_save_exec_prefix="$exec_prefix"
7418 exec_prefix="$acl_final_exec_prefix"
7419 eval x=\"$x\"
7420 exec_prefix="$acl_save_exec_prefix"
7421 prefix="$acl_save_prefix"
7422
7423 case "$x" in
7424 -L*)
7425 dir=`echo "X$x" | sed -e 's/^X-L//'`
7426 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
7427 found_dir="$dir"
7428 found_so="$dir/lib$name.$shlibext"
7429 if test -f "$dir/lib$name.la"; then
7430 found_la="$dir/lib$name.la"
7431 fi
7432 else
7433 if test -f "$dir/lib$name.$libext"; then
7434 found_dir="$dir"
7435 found_a="$dir/lib$name.$libext"
7436 if test -f "$dir/lib$name.la"; then
7437 found_la="$dir/lib$name.la"
7438 fi
7439 fi
7440 fi
7441 ;;
7442 esac
7443 if test "X$found_dir" != "X"; then
7444 break
7445 fi
7446 done
7447 fi
7448 if test "X$found_dir" != "X"; then
7449 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
7450 if test "X$found_so" != "X"; then
7451 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
7452 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
7453 else
7454 haveit=
7455 for x in $ltrpathdirs; do
7456 if test "X$x" = "X$found_dir"; then
7457 haveit=yes
7458 break
7459 fi
7460 done
7461 if test -z "$haveit"; then
7462 ltrpathdirs="$ltrpathdirs $found_dir"
7463 fi
7464 if test "$hardcode_direct" = yes; then
7465 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
7466 else
7467 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
7468 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
7469 haveit=
7470 for x in $rpathdirs; do
7471 if test "X$x" = "X$found_dir"; then
7472 haveit=yes
7473 break
7474 fi
7475 done
7476 if test -z "$haveit"; then
7477 rpathdirs="$rpathdirs $found_dir"
7478 fi
7479 else
7480 haveit=
7481 for x in $LDFLAGS $LIBICONV; do
7482
7483 acl_save_prefix="$prefix"
7484 prefix="$acl_final_prefix"
7485 acl_save_exec_prefix="$exec_prefix"
7486 exec_prefix="$acl_final_exec_prefix"
7487 eval x=\"$x\"
7488 exec_prefix="$acl_save_exec_prefix"
7489 prefix="$acl_save_prefix"
7490
7491 if test "X$x" = "X-L$found_dir"; then
7492 haveit=yes
7493 break
7494 fi
7495 done
7496 if test -z "$haveit"; then
7497 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
7498 fi
7499 if test "$hardcode_minus_L" != no; then
7500 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
7501 else
7502 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
7503 fi
7504 fi
7505 fi
7506 fi
7507 else
7508 if test "X$found_a" != "X"; then
7509 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
7510 else
7511 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
7512 fi
7513 fi
7514 additional_includedir=
7515 case "$found_dir" in
7516 */lib | */lib/)
7517 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
7518 additional_includedir="$basedir/include"
7519 ;;
7520 esac
7521 if test "X$additional_includedir" != "X"; then
7522 if test "X$additional_includedir" != "X/usr/include"; then
7523 haveit=
7524 if test "X$additional_includedir" = "X/usr/local/include"; then
7525 if test -n "$GCC"; then
7526 case $host_os in
7527 linux*) haveit=yes;;
7528 esac
7529 fi
7530 fi
7531 if test -z "$haveit"; then
7532 for x in $CPPFLAGS $INCICONV; do
7533
7534 acl_save_prefix="$prefix"
7535 prefix="$acl_final_prefix"
7536 acl_save_exec_prefix="$exec_prefix"
7537 exec_prefix="$acl_final_exec_prefix"
7538 eval x=\"$x\"
7539 exec_prefix="$acl_save_exec_prefix"
7540 prefix="$acl_save_prefix"
7541
7542 if test "X$x" = "X-I$additional_includedir"; then
7543 haveit=yes
7544 break
7545 fi
7546 done
7547 if test -z "$haveit"; then
7548 if test -d "$additional_includedir"; then
7549 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
7550 fi
7551 fi
7552 fi
7553 fi
7554 fi
7555 if test -n "$found_la"; then
7556 save_libdir="$libdir"
7557 case "$found_la" in
7558 */* | *\\*) . "$found_la" ;;
7559 *) . "./$found_la" ;;
7560 esac
7561 libdir="$save_libdir"
7562 for dep in $dependency_libs; do
7563 case "$dep" in
7564 -L*)
7565 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
7566 if test "X$additional_libdir" != "X/usr/lib"; then
7567 haveit=
7568 if test "X$additional_libdir" = "X/usr/local/lib"; then
7569 if test -n "$GCC"; then
7570 case $host_os in
7571 linux*) haveit=yes;;
7572 esac
7573 fi
7574 fi
7575 if test -z "$haveit"; then
7576 haveit=
7577 for x in $LDFLAGS $LIBICONV; do
7578
7579 acl_save_prefix="$prefix"
7580 prefix="$acl_final_prefix"
7581 acl_save_exec_prefix="$exec_prefix"
7582 exec_prefix="$acl_final_exec_prefix"
7583 eval x=\"$x\"
7584 exec_prefix="$acl_save_exec_prefix"
7585 prefix="$acl_save_prefix"
7586
7587 if test "X$x" = "X-L$additional_libdir"; then
7588 haveit=yes
7589 break
7590 fi
7591 done
7592 if test -z "$haveit"; then
7593 if test -d "$additional_libdir"; then
7594 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
7595 fi
7596 fi
7597 haveit=
7598 for x in $LDFLAGS $LTLIBICONV; do
7599
7600 acl_save_prefix="$prefix"
7601 prefix="$acl_final_prefix"
7602 acl_save_exec_prefix="$exec_prefix"
7603 exec_prefix="$acl_final_exec_prefix"
7604 eval x=\"$x\"
7605 exec_prefix="$acl_save_exec_prefix"
7606 prefix="$acl_save_prefix"
7607
7608 if test "X$x" = "X-L$additional_libdir"; then
7609 haveit=yes
7610 break
7611 fi
7612 done
7613 if test -z "$haveit"; then
7614 if test -d "$additional_libdir"; then
7615 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
7616 fi
7617 fi
7618 fi
7619 fi
7620 ;;
7621 -R*)
7622 dir=`echo "X$dep" | sed -e 's/^X-R//'`
7623 if test "$enable_rpath" != no; then
7624 haveit=
7625 for x in $rpathdirs; do
7626 if test "X$x" = "X$dir"; then
7627 haveit=yes
7628 break
7629 fi
7630 done
7631 if test -z "$haveit"; then
7632 rpathdirs="$rpathdirs $dir"
7633 fi
7634 haveit=
7635 for x in $ltrpathdirs; do
7636 if test "X$x" = "X$dir"; then
7637 haveit=yes
7638 break
7639 fi
7640 done
7641 if test -z "$haveit"; then
7642 ltrpathdirs="$ltrpathdirs $dir"
7643 fi
7644 fi
7645 ;;
7646 -l*)
7647 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
7648 ;;
7649 *.la)
7650 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
7651 ;;
7652 *)
7653 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
7654 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
7655 ;;
7656 esac
7657 done
7658 fi
7659 else
7660 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
7661 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
7662 fi
7663 fi
7664 fi
7665 done
7666 done
7667 if test "X$rpathdirs" != "X"; then
7668 if test -n "$hardcode_libdir_separator"; then
7669 alldirs=
7670 for found_dir in $rpathdirs; do
7671 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
7672 done
7673 acl_save_libdir="$libdir"
7674 libdir="$alldirs"
7675 eval flag=\"$hardcode_libdir_flag_spec\"
7676 libdir="$acl_save_libdir"
7677 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
7678 else
7679 for found_dir in $rpathdirs; do
7680 acl_save_libdir="$libdir"
7681 libdir="$found_dir"
7682 eval flag=\"$hardcode_libdir_flag_spec\"
7683 libdir="$acl_save_libdir"
7684 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
7685 done
7686 fi
7687 fi
7688 if test "X$ltrpathdirs" != "X"; then
7689 for found_dir in $ltrpathdirs; do
7690 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
7691 done
7692 fi
7693
7694
7695
7696
7697
6c7a06a3 7698
6c7a06a3 7699
81ecdfbb
RW
7700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
7701$as_echo_n "checking for iconv... " >&6; }
7702if test "${am_cv_func_iconv+set}" = set; then :
7703 $as_echo_n "(cached) " >&6
d542061a 7704else
6c7a06a3
TT
7705
7706 am_cv_func_iconv="no, consider installing GNU libiconv"
7707 am_cv_lib_iconv=no
016a3251
DD
7708 am_save_CPPFLAGS="$CPPFLAGS"
7709 CPPFLAGS="$CPPFLAGS $INCICONV"
7710 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 7711/* end confdefs.h. */
6c7a06a3
TT
7712#include <stdlib.h>
7713#include <iconv.h>
d542061a
UW
7714int
7715main ()
7716{
6c7a06a3 7717iconv_t cd = iconv_open("","");
016a3251
DD
7718 iconv(cd,NULL,NULL,NULL,NULL);
7719 iconv_close(cd);
d542061a
UW
7720 ;
7721 return 0;
7722}
7723_ACEOF
81ecdfbb 7724if ac_fn_c_try_link "$LINENO"; then :
016a3251 7725 am_cv_func_iconv=yes
d542061a 7726fi
81ecdfbb
RW
7727rm -f core conftest.err conftest.$ac_objext \
7728 conftest$ac_exeext conftest.$ac_ext
016a3251 7729 CPPFLAGS="$am_save_CPPFLAGS"
94ae1714 7730
016a3251
DD
7731 if test "$am_cv_func_iconv" != yes && test -d ../libiconv; then
7732 for _libs in .libs _libs; do
7733 am_save_CPPFLAGS="$CPPFLAGS"
7734 am_save_LIBS="$LIBS"
7735 CPPFLAGS="$CPPFLAGS -I../libiconv/include"
7736 LIBS="$LIBS ../libiconv/lib/$_libs/libiconv.a"
7737 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 7738/* end confdefs.h. */
6c7a06a3
TT
7739#include <stdlib.h>
7740#include <iconv.h>
d542061a
UW
7741int
7742main ()
7743{
6c7a06a3 7744iconv_t cd = iconv_open("","");
016a3251
DD
7745 iconv(cd,NULL,NULL,NULL,NULL);
7746 iconv_close(cd);
d542061a
UW
7747 ;
7748 return 0;
7749}
7750_ACEOF
81ecdfbb 7751if ac_fn_c_try_link "$LINENO"; then :
016a3251
DD
7752 INCICONV="-I../libiconv/include"
7753 LIBICONV='${top_builddir}'/../libiconv/lib/$_libs/libiconv.a
7754 LTLIBICONV='${top_builddir}'/../libiconv/lib/libiconv.la
7755 am_cv_lib_iconv=yes
7756 am_cv_func_iconv=yes
d542061a 7757fi
81ecdfbb
RW
7758rm -f core conftest.err conftest.$ac_objext \
7759 conftest$ac_exeext conftest.$ac_ext
016a3251
DD
7760 CPPFLAGS="$am_save_CPPFLAGS"
7761 LIBS="$am_save_LIBS"
7762 if test "$am_cv_func_iconv" = "yes"; then
7763 break
7764 fi
7765 done
77f120bf 7766 fi
94ae1714 7767
4edb1e84 7768 if test "$am_cv_func_iconv" != yes; then
6c7a06a3 7769 am_save_CPPFLAGS="$CPPFLAGS"
4edb1e84 7770 am_save_LIBS="$LIBS"
016a3251
DD
7771 CPPFLAGS="$LIBS $INCICONV"
7772 LIBS="$LIBS $LIBICONV"
81ecdfbb 7773 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7774/* end confdefs.h. */
6c7a06a3
TT
7775#include <stdlib.h>
7776#include <iconv.h>
bec39cab
AC
7777int
7778main ()
7779{
6c7a06a3
TT
7780iconv_t cd = iconv_open("","");
7781 iconv(cd,NULL,NULL,NULL,NULL);
7782 iconv_close(cd);
bec39cab
AC
7783 ;
7784 return 0;
7785}
7786_ACEOF
81ecdfbb 7787if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 7788 am_cv_lib_iconv=yes
6c7a06a3 7789 am_cv_func_iconv=yes
627af7ea 7790fi
81ecdfbb
RW
7791rm -f core conftest.err conftest.$ac_objext \
7792 conftest$ac_exeext conftest.$ac_ext
fc3b640d 7793 CPPFLAGS="$am_save_CPPFLAGS"
016a3251 7794 LIBS="$am_save_LIBS"
6c7a06a3
TT
7795 fi
7796
7797fi
81ecdfbb
RW
7798{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
7799$as_echo "$am_cv_func_iconv" >&6; }
016a3251
DD
7800 if test "$am_cv_func_iconv" = yes; then
7801
7802$as_echo "#define HAVE_ICONV 1" >>confdefs.h
94ae1714 7803
016a3251 7804 fi
fc3b640d 7805 if test "$am_cv_lib_iconv" = yes; then
016a3251
DD
7806
7807 for element in $INCICONV; do
7808 haveit=
7809 for x in $CPPFLAGS; do
7810
7811 acl_save_prefix="$prefix"
7812 prefix="$acl_final_prefix"
7813 acl_save_exec_prefix="$exec_prefix"
7814 exec_prefix="$acl_final_exec_prefix"
7815 eval x=\"$x\"
7816 exec_prefix="$acl_save_exec_prefix"
7817 prefix="$acl_save_prefix"
7818
7819 if test "X$x" = "X$element"; then
7820 haveit=yes
7821 break
7822 fi
7823 done
7824 if test -z "$haveit"; then
7825 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
7826 fi
7827 done
7828
7829 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
7830$as_echo_n "checking how to link with libiconv... " >&6; }
7831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
7832$as_echo "$LIBICONV" >&6; }
94ae1714 7833 else
016a3251
DD
7834 LIBICONV=
7835 LTLIBICONV=
fc3b640d 7836 fi
94ae1714 7837
6c7a06a3 7838
6c7a06a3 7839
016a3251 7840 if test "$am_cv_func_iconv" = yes; then
81ecdfbb
RW
7841 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
7842$as_echo_n "checking for iconv declaration... " >&6; }
7843 if test "${am_cv_proto_iconv+set}" = set; then :
7844 $as_echo_n "(cached) " >&6
6c7a06a3
TT
7845else
7846
81ecdfbb 7847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
7848/* end confdefs.h. */
7849
6c7a06a3
TT
7850#include <stdlib.h>
7851#include <iconv.h>
7852extern
b4e70030 7853#ifdef __cplusplus
6c7a06a3 7854"C"
b4e70030 7855#endif
6c7a06a3
TT
7856#if defined(__STDC__) || defined(__cplusplus)
7857size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
7858#else
7859size_t iconv();
7860#endif
7861
b4e70030
JB
7862int
7863main ()
7864{
6c7a06a3 7865
b4e70030
JB
7866 ;
7867 return 0;
7868}
7869_ACEOF
81ecdfbb 7870if ac_fn_c_try_compile "$LINENO"; then :
6c7a06a3 7871 am_cv_proto_iconv_arg1=""
4e8d927d 7872else
81ecdfbb 7873 am_cv_proto_iconv_arg1="const"
b4e70030 7874fi
81ecdfbb 7875rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6c7a06a3
TT
7876 am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"
7877fi
7878
7879 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
81ecdfbb 7880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
6c7a06a3 7881 }$am_cv_proto_iconv" >&5
81ecdfbb
RW
7882$as_echo "${ac_t:-
7883 }$am_cv_proto_iconv" >&6; }
6c7a06a3
TT
7884
7885cat >>confdefs.h <<_ACEOF
7886#define ICONV_CONST $am_cv_proto_iconv_arg1
7887_ACEOF
7888
7889 fi
6c7a06a3
TT
7890
7891
478aac75
DE
7892# GDB may fork/exec the iconv program to get the list of supported character
7893# sets. Allow the user to specify where to find it.
7894# There are several factors affecting the choice of option name:
7895# - There is already --with-libiconv-prefix but we can't use it, it specifies
7896# the build-time location of libiconv files.
7897# - The program we need to find is iconv, which comes with glibc. The user
7898# doesn't necessarily have libiconv installed. Therefore naming this
7899# --with-libiconv-foo feels wrong.
7900# - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is
7901# defined to work on directories not files (though it really doesn't know
7902# the difference).
7903# - Calling this --with-iconv-prefix is perceived to cause too much confusion
7904# with --with-libiconv-prefix.
7905# Putting these together is why the option name is --with-iconv-bin.
7906
7907
7908# Check whether --with-iconv-bin was given.
7909if test "${with_iconv_bin+set}" = set; then :
7910 withval=$with_iconv_bin; iconv_bin="${withval}"
7911
7912cat >>confdefs.h <<_ACEOF
7913#define ICONV_BIN "${iconv_bin}"
7914_ACEOF
7915
7916
7917 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
7918 if test "x$prefix" = xNONE; then
7919 test_prefix=/usr/local
7920 else
7921 test_prefix=$prefix
7922 fi
7923 else
7924 test_prefix=$exec_prefix
7925 fi
7926 value=0
7927 case ${iconv_bin} in
7928 "${test_prefix}"|"${test_prefix}/"*|\
7929 '${exec_prefix}'|'${exec_prefix}/'*)
7930 value=1
7931 ;;
7932 esac
7933
7934cat >>confdefs.h <<_ACEOF
7935#define ICONV_BIN_RELOCATABLE $value
7936_ACEOF
7937
7938
7939
7940fi
7941
7942
cb01cfba 7943# For the TUI, we need enhanced curses functionality.
bd8a8e1b 7944if test x"$enable_tui" != xno; then
cb01cfba
JB
7945 prefer_curses=yes
7946fi
7947
7948curses_found=no
7949if test x"$prefer_curses" = xyes; then
7950 # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
7951 # curses library because the latter might not provide all the
7952 # functionality we need. However, this leads to problems on systems
7953 # where the linker searches /usr/local/lib, but the compiler doesn't
7954 # search /usr/local/include, if ncurses is installed in /usr/local. A
7955 # default installation of ncurses on alpha*-dec-osf* will lead to such
7956 # a situation.
81ecdfbb
RW
7957 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
7958$as_echo_n "checking for library containing waddstr... " >&6; }
7959if test "${ac_cv_search_waddstr+set}" = set; then :
7960 $as_echo_n "(cached) " >&6
6c7a06a3
TT
7961else
7962 ac_func_search_save_LIBS=$LIBS
81ecdfbb 7963cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
7964/* end confdefs.h. */
7965
81ecdfbb
RW
7966/* Override any GCC internal prototype to avoid an error.
7967 Use char because int might match the return type of a GCC
7968 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
7969#ifdef __cplusplus
7970extern "C"
7971#endif
6c7a06a3
TT
7972char waddstr ();
7973int
7974main ()
7975{
81ecdfbb 7976return waddstr ();
6c7a06a3
TT
7977 ;
7978 return 0;
7979}
7980_ACEOF
81ecdfbb
RW
7981for ac_lib in '' ncurses cursesX curses; do
7982 if test -z "$ac_lib"; then
7983 ac_res="none required"
7984 else
7985 ac_res=-l$ac_lib
7986 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7987 fi
7988 if ac_fn_c_try_link "$LINENO"; then :
7989 ac_cv_search_waddstr=$ac_res
7990fi
7991rm -f core conftest.err conftest.$ac_objext \
7992 conftest$ac_exeext
7993 if test "${ac_cv_search_waddstr+set}" = set; then :
7994 break
7995fi
7996done
7997if test "${ac_cv_search_waddstr+set}" = set; then :
7998
6c7a06a3 7999else
81ecdfbb
RW
8000 ac_cv_search_waddstr=no
8001fi
8002rm conftest.$ac_ext
8003LIBS=$ac_func_search_save_LIBS
8004fi
8005{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
8006$as_echo "$ac_cv_search_waddstr" >&6; }
8007ac_res=$ac_cv_search_waddstr
8008if test "$ac_res" != no; then :
8009 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3
TT
8010
8011fi
8012
8013
cb01cfba
JB
8014 if test "$ac_cv_search_waddstr" != no; then
8015 curses_found=yes
8016 fi
8017fi
8018
8019# Check whether we should enable the TUI, but only do so if we really
8020# can.
8021if test x"$enable_tui" != xno; then
8022 if test -d $srcdir/tui; then
8023 if test "$curses_found" != no; then
6c7a06a3
TT
8024 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
8025 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
8026 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
8027 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
6c7a06a3
TT
8028 else
8029 if test x"$enable_tui" = xyes; then
81ecdfbb 8030 as_fn_error "no enhanced curses library found; disable TUI" "$LINENO" 5
6c7a06a3 8031 else
81ecdfbb
RW
8032 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
8033$as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
6c7a06a3
TT
8034 fi
8035 fi
8036 fi
8037fi
8038
8039# Since GDB uses Readline, we need termcap functionality. In many
8040# cases this will be provided by the curses library, but some systems
8041# have a seperate termcap library, or no curses library at all.
8042
8043case $host_os in
8044 cygwin*)
8045 if test -d $srcdir/libtermcap; then
8046 LIBS="../libtermcap/libtermcap.a $LIBS"
8047 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
8048 fi ;;
8049 go32* | *djgpp*)
8050 ac_cv_search_tgetent="none required"
8051 ;;
6c7a06a3
TT
8052esac
8053
8054# These are the libraries checked by Readline.
81ecdfbb
RW
8055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
8056$as_echo_n "checking for library containing tgetent... " >&6; }
8057if test "${ac_cv_search_tgetent+set}" = set; then :
8058 $as_echo_n "(cached) " >&6
6c7a06a3
TT
8059else
8060 ac_func_search_save_LIBS=$LIBS
81ecdfbb 8061cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
8062/* end confdefs.h. */
8063
81ecdfbb
RW
8064/* Override any GCC internal prototype to avoid an error.
8065 Use char because int might match the return type of a GCC
8066 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
8067#ifdef __cplusplus
8068extern "C"
8069#endif
6c7a06a3
TT
8070char tgetent ();
8071int
8072main ()
8073{
81ecdfbb 8074return tgetent ();
6c7a06a3
TT
8075 ;
8076 return 0;
8077}
8078_ACEOF
81ecdfbb
RW
8079for ac_lib in '' termcap tinfo curses ncurses; do
8080 if test -z "$ac_lib"; then
8081 ac_res="none required"
8082 else
8083 ac_res=-l$ac_lib
6c7a06a3 8084 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
8085 fi
8086 if ac_fn_c_try_link "$LINENO"; then :
8087 ac_cv_search_tgetent=$ac_res
8088fi
8089rm -f core conftest.err conftest.$ac_objext \
8090 conftest$ac_exeext
8091 if test "${ac_cv_search_tgetent+set}" = set; then :
8092 break
8093fi
8094done
8095if test "${ac_cv_search_tgetent+set}" = set; then :
6c7a06a3 8096
6c7a06a3 8097else
81ecdfbb 8098 ac_cv_search_tgetent=no
6c7a06a3 8099fi
81ecdfbb 8100rm conftest.$ac_ext
6c7a06a3
TT
8101LIBS=$ac_func_search_save_LIBS
8102fi
81ecdfbb
RW
8103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
8104$as_echo "$ac_cv_search_tgetent" >&6; }
8105ac_res=$ac_cv_search_tgetent
8106if test "$ac_res" != no; then :
8107 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3 8108
06825bd1
MK
8109fi
8110
06825bd1 8111
bec39cab 8112if test "$ac_cv_search_tgetent" = no; then
7a85168d 8113 CONFIG_OBS="$CONFIG_OBS stub-termcap.o"
8ee53726
MK
8114fi
8115
3841debe 8116
81ecdfbb
RW
8117# Check whether --with-system-readline was given.
8118if test "${with_system_readline+set}" = set; then :
8119 withval=$with_system_readline;
8120fi
6a30b0a5 8121
6a30b0a5
AS
8122
8123if test "$with_system_readline" = yes; then
8124 READLINE=-lreadline
8125 READLINE_DEPS=
8126 READLINE_CFLAGS=
39037522 8127 READLINE_TEXI_INCFLAG=
6a30b0a5
AS
8128else
8129 READLINE='$(READLINE_DIR)/libreadline.a'
8130 READLINE_DEPS='$(READLINE)'
8131 READLINE_CFLAGS='-I$(READLINE_SRC)/..'
39037522 8132 READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
6a30b0a5
AS
8133fi
8134
8135
8136
8137
8138
f997c383
SD
8139# Generate jit-reader.h
8140
8141# This is typedeffed to GDB_CORE_ADDR in jit-reader.h
8142TARGET_PTR=
8143
8144# The cast to long int works around a bug in the HP C Compiler
8145# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8146# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8147# This bug is HP SR number 8606223364.
8148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5
8149$as_echo_n "checking size of unsigned long long... " >&6; }
8150if test "${ac_cv_sizeof_unsigned_long_long+set}" = set; then :
8151 $as_echo_n "(cached) " >&6
8152else
8153 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then :
8154
8155else
8156 if test "$ac_cv_type_unsigned_long_long" = yes; then
8157 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8158$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8159{ as_fn_set_status 77
8160as_fn_error "cannot compute sizeof (unsigned long long)
8161See \`config.log' for more details." "$LINENO" 5; }; }
8162 else
8163 ac_cv_sizeof_unsigned_long_long=0
8164 fi
8165fi
8166
8167fi
8168{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5
8169$as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; }
8170
8171
8172
8173cat >>confdefs.h <<_ACEOF
8174#define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
8175_ACEOF
8176
8177
8178# The cast to long int works around a bug in the HP C Compiler
8179# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8180# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8181# This bug is HP SR number 8606223364.
8182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
8183$as_echo_n "checking size of unsigned long... " >&6; }
8184if test "${ac_cv_sizeof_unsigned_long+set}" = set; then :
8185 $as_echo_n "(cached) " >&6
8186else
8187 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then :
8188
8189else
8190 if test "$ac_cv_type_unsigned_long" = yes; then
8191 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8192$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8193{ as_fn_set_status 77
8194as_fn_error "cannot compute sizeof (unsigned long)
8195See \`config.log' for more details." "$LINENO" 5; }; }
8196 else
8197 ac_cv_sizeof_unsigned_long=0
8198 fi
8199fi
8200
8201fi
8202{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
8203$as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
8204
8205
8206
8207cat >>confdefs.h <<_ACEOF
8208#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
8209_ACEOF
8210
8211
8212# The cast to long int works around a bug in the HP C Compiler
8213# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8214# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8215# This bug is HP SR number 8606223364.
8216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5
8217$as_echo_n "checking size of unsigned __int128... " >&6; }
8218if test "${ac_cv_sizeof_unsigned___int128+set}" = set; then :
8219 $as_echo_n "(cached) " >&6
8220else
8221 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then :
8222
8223else
8224 if test "$ac_cv_type_unsigned___int128" = yes; then
8225 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8226$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8227{ as_fn_set_status 77
8228as_fn_error "cannot compute sizeof (unsigned __int128)
8229See \`config.log' for more details." "$LINENO" 5; }; }
8230 else
8231 ac_cv_sizeof_unsigned___int128=0
8232 fi
8233fi
8234
8235fi
8236{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5
8237$as_echo "$ac_cv_sizeof_unsigned___int128" >&6; }
8238
8239
8240
8241cat >>confdefs.h <<_ACEOF
8242#define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128
8243_ACEOF
8244
8245
8246
8247if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
8248 TARGET_PTR="unsigned long"
8249elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
8250 TARGET_PTR="unsigned long long"
8251elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
8252 TARGET_PTR="unsigned __int128"
8253else
8254 TARGET_PTR="unsigned long"
8255fi
8256
8257
8258ac_config_files="$ac_config_files jit-reader.h:jit-reader.in"
8259
8260
a2d08b9e
SD
8261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
8262$as_echo_n "checking for library containing dlopen... " >&6; }
8263if test "${ac_cv_search_dlopen+set}" = set; then :
8264 $as_echo_n "(cached) " >&6
8265else
8266 ac_func_search_save_LIBS=$LIBS
8267cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8268/* end confdefs.h. */
8269
8270/* Override any GCC internal prototype to avoid an error.
8271 Use char because int might match the return type of a GCC
8272 builtin and then its argument prototype would still apply. */
8273#ifdef __cplusplus
8274extern "C"
8275#endif
8276char dlopen ();
8277int
8278main ()
8279{
8280return dlopen ();
8281 ;
8282 return 0;
8283}
8284_ACEOF
8285for ac_lib in '' dl; do
8286 if test -z "$ac_lib"; then
8287 ac_res="none required"
8288 else
8289 ac_res=-l$ac_lib
8290 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8291 fi
8292 if ac_fn_c_try_link "$LINENO"; then :
8293 ac_cv_search_dlopen=$ac_res
8294fi
8295rm -f core conftest.err conftest.$ac_objext \
8296 conftest$ac_exeext
8297 if test "${ac_cv_search_dlopen+set}" = set; then :
8298 break
8299fi
8300done
8301if test "${ac_cv_search_dlopen+set}" = set; then :
8302
8303else
8304 ac_cv_search_dlopen=no
8305fi
8306rm conftest.$ac_ext
8307LIBS=$ac_func_search_save_LIBS
8308fi
8309{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
8310$as_echo "$ac_cv_search_dlopen" >&6; }
8311ac_res=$ac_cv_search_dlopen
8312if test "$ac_res" != no; then :
8313 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8314
8315fi
8316
8317
39037522 8318
b8e0a31c
SD
8319
8320# Check whether --with-jit-reader-dir was given.
8321if test "${with_jit_reader_dir+set}" = set; then :
8322 withval=$with_jit_reader_dir;
8323 JIT_READER_DIR=$withval
8324else
8325 JIT_READER_DIR=${libdir}/gdb
8326fi
8327
8328
8329 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
8330 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
8331 ac_define_dir=`eval echo $JIT_READER_DIR`
8332 ac_define_dir=`eval echo $ac_define_dir`
8333
8334cat >>confdefs.h <<_ACEOF
8335#define JIT_READER_DIR "$ac_define_dir"
8336_ACEOF
8337
8338
8339
8340
8341 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
8342 if test "x$prefix" = xNONE; then
8343 test_prefix=/usr/local
8344 else
8345 test_prefix=$prefix
8346 fi
8347 else
8348 test_prefix=$exec_prefix
8349 fi
8350 value=0
8351 case ${ac_define_dir} in
8352 "${test_prefix}"|"${test_prefix}/"*|\
8353 '${exec_prefix}'|'${exec_prefix}/'*)
8354 value=1
8355 ;;
8356 esac
8357
8358cat >>confdefs.h <<_ACEOF
8359#define JIT_READER_DIR_RELOCATABLE $value
8360_ACEOF
8361
8362
8363
8364
8365
81ecdfbb
RW
8366# Check whether --with-expat was given.
8367if test "${with_expat+set}" = set; then :
8368 withval=$with_expat;
5c39566f
DJ
8369else
8370 with_expat=auto
81ecdfbb
RW
8371fi
8372
8373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
8374$as_echo_n "checking whether to use expat... " >&6; }
8375{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
8376$as_echo "$with_expat" >&6; }
5c39566f
DJ
8377
8378if test "${with_expat}" = no; then
81ecdfbb
RW
8379 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
8380$as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
5c39566f
DJ
8381 HAVE_LIBEXPAT=no
8382else
8383
3841debe
DJ
8384
8385
8386
8387
8388
8389
8390
8391 use_additional=yes
8392
8393 acl_save_prefix="$prefix"
8394 prefix="$acl_final_prefix"
8395 acl_save_exec_prefix="$exec_prefix"
8396 exec_prefix="$acl_final_exec_prefix"
8397
8398 eval additional_includedir=\"$includedir\"
8399 eval additional_libdir=\"$libdir\"
8400
8401 exec_prefix="$acl_save_exec_prefix"
8402 prefix="$acl_save_prefix"
8403
8404
81ecdfbb
RW
8405# Check whether --with-libexpat-prefix was given.
8406if test "${with_libexpat_prefix+set}" = set; then :
8407 withval=$with_libexpat_prefix;
3841debe
DJ
8408 if test "X$withval" = "Xno"; then
8409 use_additional=no
8410 else
8411 if test "X$withval" = "X"; then
8412
8413 acl_save_prefix="$prefix"
8414 prefix="$acl_final_prefix"
8415 acl_save_exec_prefix="$exec_prefix"
8416 exec_prefix="$acl_final_exec_prefix"
8417
8418 eval additional_includedir=\"$includedir\"
8419 eval additional_libdir=\"$libdir\"
8420
8421 exec_prefix="$acl_save_exec_prefix"
8422 prefix="$acl_save_prefix"
8423
8424 else
8425 additional_includedir="$withval/include"
8426 additional_libdir="$withval/lib"
8427 fi
8428 fi
8429
81ecdfbb
RW
8430fi
8431
3841debe
DJ
8432 LIBEXPAT=
8433 LTLIBEXPAT=
8434 INCEXPAT=
8435 rpathdirs=
8436 ltrpathdirs=
8437 names_already_handled=
8438 names_next_round='expat '
8439 while test -n "$names_next_round"; do
8440 names_this_round="$names_next_round"
8441 names_next_round=
8442 for name in $names_this_round; do
8443 already_handled=
8444 for n in $names_already_handled; do
8445 if test "$n" = "$name"; then
8446 already_handled=yes
8447 break
8448 fi
8449 done
8450 if test -z "$already_handled"; then
8451 names_already_handled="$names_already_handled $name"
8452 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
8453 eval value=\"\$HAVE_LIB$uppername\"
8454 if test -n "$value"; then
8455 if test "$value" = yes; then
8456 eval value=\"\$LIB$uppername\"
8457 test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
8458 eval value=\"\$LTLIB$uppername\"
8459 test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
8460 else
8461 :
8462 fi
8463 else
8464 found_dir=
8465 found_la=
8466 found_so=
8467 found_a=
8468 if test $use_additional = yes; then
8469 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
8470 found_dir="$additional_libdir"
8471 found_so="$additional_libdir/lib$name.$shlibext"
8472 if test -f "$additional_libdir/lib$name.la"; then
8473 found_la="$additional_libdir/lib$name.la"
8474 fi
8475 else
8476 if test -f "$additional_libdir/lib$name.$libext"; then
8477 found_dir="$additional_libdir"
8478 found_a="$additional_libdir/lib$name.$libext"
8479 if test -f "$additional_libdir/lib$name.la"; then
8480 found_la="$additional_libdir/lib$name.la"
8481 fi
8482 fi
8483 fi
8484 fi
8485 if test "X$found_dir" = "X"; then
8486 for x in $LDFLAGS $LTLIBEXPAT; do
8487
8488 acl_save_prefix="$prefix"
8489 prefix="$acl_final_prefix"
8490 acl_save_exec_prefix="$exec_prefix"
8491 exec_prefix="$acl_final_exec_prefix"
8492 eval x=\"$x\"
8493 exec_prefix="$acl_save_exec_prefix"
8494 prefix="$acl_save_prefix"
8495
8496 case "$x" in
8497 -L*)
8498 dir=`echo "X$x" | sed -e 's/^X-L//'`
8499 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
8500 found_dir="$dir"
8501 found_so="$dir/lib$name.$shlibext"
8502 if test -f "$dir/lib$name.la"; then
8503 found_la="$dir/lib$name.la"
8504 fi
8505 else
8506 if test -f "$dir/lib$name.$libext"; then
8507 found_dir="$dir"
8508 found_a="$dir/lib$name.$libext"
8509 if test -f "$dir/lib$name.la"; then
8510 found_la="$dir/lib$name.la"
8511 fi
8512 fi
8513 fi
8514 ;;
8515 esac
8516 if test "X$found_dir" != "X"; then
8517 break
8518 fi
8519 done
8520 fi
8521 if test "X$found_dir" != "X"; then
8522 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
8523 if test "X$found_so" != "X"; then
8524 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
8525 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
8526 else
8527 haveit=
8528 for x in $ltrpathdirs; do
8529 if test "X$x" = "X$found_dir"; then
8530 haveit=yes
8531 break
8532 fi
8533 done
8534 if test -z "$haveit"; then
8535 ltrpathdirs="$ltrpathdirs $found_dir"
8536 fi
8537 if test "$hardcode_direct" = yes; then
8538 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
8539 else
8540 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
8541 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
8542 haveit=
8543 for x in $rpathdirs; do
8544 if test "X$x" = "X$found_dir"; then
8545 haveit=yes
8546 break
8547 fi
8548 done
8549 if test -z "$haveit"; then
8550 rpathdirs="$rpathdirs $found_dir"
8551 fi
8552 else
8553 haveit=
8554 for x in $LDFLAGS $LIBEXPAT; do
8555
8556 acl_save_prefix="$prefix"
8557 prefix="$acl_final_prefix"
8558 acl_save_exec_prefix="$exec_prefix"
8559 exec_prefix="$acl_final_exec_prefix"
8560 eval x=\"$x\"
8561 exec_prefix="$acl_save_exec_prefix"
8562 prefix="$acl_save_prefix"
8563
8564 if test "X$x" = "X-L$found_dir"; then
8565 haveit=yes
8566 break
8567 fi
8568 done
8569 if test -z "$haveit"; then
8570 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
8571 fi
8572 if test "$hardcode_minus_L" != no; then
8573 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
8574 else
8575 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
8576 fi
8577 fi
8578 fi
8579 fi
8580 else
8581 if test "X$found_a" != "X"; then
8582 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
8583 else
8584 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
8585 fi
8586 fi
8587 additional_includedir=
8588 case "$found_dir" in
8589 */lib | */lib/)
8590 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
8591 additional_includedir="$basedir/include"
8592 ;;
8593 esac
8594 if test "X$additional_includedir" != "X"; then
8595 if test "X$additional_includedir" != "X/usr/include"; then
8596 haveit=
8597 if test "X$additional_includedir" = "X/usr/local/include"; then
8598 if test -n "$GCC"; then
8599 case $host_os in
8600 linux*) haveit=yes;;
8601 esac
8602 fi
8603 fi
8604 if test -z "$haveit"; then
8605 for x in $CPPFLAGS $INCEXPAT; do
8606
8607 acl_save_prefix="$prefix"
8608 prefix="$acl_final_prefix"
8609 acl_save_exec_prefix="$exec_prefix"
8610 exec_prefix="$acl_final_exec_prefix"
8611 eval x=\"$x\"
8612 exec_prefix="$acl_save_exec_prefix"
8613 prefix="$acl_save_prefix"
8614
8615 if test "X$x" = "X-I$additional_includedir"; then
8616 haveit=yes
8617 break
8618 fi
8619 done
8620 if test -z "$haveit"; then
8621 if test -d "$additional_includedir"; then
8622 INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
8623 fi
8624 fi
8625 fi
8626 fi
8627 fi
8628 if test -n "$found_la"; then
8629 save_libdir="$libdir"
8630 case "$found_la" in
8631 */* | *\\*) . "$found_la" ;;
8632 *) . "./$found_la" ;;
8633 esac
8634 libdir="$save_libdir"
8635 for dep in $dependency_libs; do
8636 case "$dep" in
8637 -L*)
8638 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
8639 if test "X$additional_libdir" != "X/usr/lib"; then
8640 haveit=
8641 if test "X$additional_libdir" = "X/usr/local/lib"; then
8642 if test -n "$GCC"; then
8643 case $host_os in
8644 linux*) haveit=yes;;
8645 esac
8646 fi
8647 fi
8648 if test -z "$haveit"; then
8649 haveit=
8650 for x in $LDFLAGS $LIBEXPAT; do
8651
8652 acl_save_prefix="$prefix"
8653 prefix="$acl_final_prefix"
8654 acl_save_exec_prefix="$exec_prefix"
8655 exec_prefix="$acl_final_exec_prefix"
8656 eval x=\"$x\"
8657 exec_prefix="$acl_save_exec_prefix"
8658 prefix="$acl_save_prefix"
8659
8660 if test "X$x" = "X-L$additional_libdir"; then
8661 haveit=yes
8662 break
8663 fi
8664 done
8665 if test -z "$haveit"; then
8666 if test -d "$additional_libdir"; then
8667 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
8668 fi
8669 fi
8670 haveit=
8671 for x in $LDFLAGS $LTLIBEXPAT; do
8672
8673 acl_save_prefix="$prefix"
8674 prefix="$acl_final_prefix"
8675 acl_save_exec_prefix="$exec_prefix"
8676 exec_prefix="$acl_final_exec_prefix"
8677 eval x=\"$x\"
8678 exec_prefix="$acl_save_exec_prefix"
8679 prefix="$acl_save_prefix"
8680
8681 if test "X$x" = "X-L$additional_libdir"; then
8682 haveit=yes
8683 break
8684 fi
8685 done
8686 if test -z "$haveit"; then
8687 if test -d "$additional_libdir"; then
8688 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
8689 fi
8690 fi
8691 fi
8692 fi
8693 ;;
8694 -R*)
8695 dir=`echo "X$dep" | sed -e 's/^X-R//'`
8696 if test "$enable_rpath" != no; then
8697 haveit=
8698 for x in $rpathdirs; do
8699 if test "X$x" = "X$dir"; then
8700 haveit=yes
8701 break
8702 fi
8703 done
8704 if test -z "$haveit"; then
8705 rpathdirs="$rpathdirs $dir"
8706 fi
8707 haveit=
8708 for x in $ltrpathdirs; do
8709 if test "X$x" = "X$dir"; then
8710 haveit=yes
8711 break
8712 fi
8713 done
8714 if test -z "$haveit"; then
8715 ltrpathdirs="$ltrpathdirs $dir"
8716 fi
8717 fi
8718 ;;
8719 -l*)
8720 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
8721 ;;
8722 *.la)
8723 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
8724 ;;
8725 *)
8726 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
8727 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
8728 ;;
81ecdfbb
RW
8729 esac
8730 done
8731 fi
8732 else
8733 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
8734 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
8735 fi
8736 fi
8737 fi
8738 done
8739 done
8740 if test "X$rpathdirs" != "X"; then
8741 if test -n "$hardcode_libdir_separator"; then
8742 alldirs=
8743 for found_dir in $rpathdirs; do
8744 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
8745 done
8746 acl_save_libdir="$libdir"
8747 libdir="$alldirs"
8748 eval flag=\"$hardcode_libdir_flag_spec\"
8749 libdir="$acl_save_libdir"
8750 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
8751 else
8752 for found_dir in $rpathdirs; do
8753 acl_save_libdir="$libdir"
8754 libdir="$found_dir"
8755 eval flag=\"$hardcode_libdir_flag_spec\"
8756 libdir="$acl_save_libdir"
8757 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
8758 done
8759 fi
8760 fi
8761 if test "X$ltrpathdirs" != "X"; then
8762 for found_dir in $ltrpathdirs; do
8763 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
8764 done
8765 fi
a9322a30
TT
8766
8767
81ecdfbb 8768 ac_save_CPPFLAGS="$CPPFLAGS"
a9322a30 8769
81ecdfbb
RW
8770 for element in $INCEXPAT; do
8771 haveit=
8772 for x in $CPPFLAGS; do
a9322a30 8773
81ecdfbb
RW
8774 acl_save_prefix="$prefix"
8775 prefix="$acl_final_prefix"
8776 acl_save_exec_prefix="$exec_prefix"
8777 exec_prefix="$acl_final_exec_prefix"
8778 eval x=\"$x\"
8779 exec_prefix="$acl_save_exec_prefix"
8780 prefix="$acl_save_prefix"
a8111142 8781
81ecdfbb
RW
8782 if test "X$x" = "X$element"; then
8783 haveit=yes
8784 break
8785 fi
8786 done
8787 if test -z "$haveit"; then
8788 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
8789 fi
8790 done
a9322a30
TT
8791
8792
81ecdfbb
RW
8793 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
8794$as_echo_n "checking for libexpat... " >&6; }
8795if test "${ac_cv_libexpat+set}" = set; then :
8796 $as_echo_n "(cached) " >&6
bec39cab 8797else
bec39cab 8798
81ecdfbb
RW
8799 ac_save_LIBS="$LIBS"
8800 LIBS="$LIBS $LIBEXPAT"
8801 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8802/* end confdefs.h. */
81ecdfbb
RW
8803#include "expat.h"
8804int
8805main ()
8806{
8807XML_Parser p = XML_ParserCreate (0);
8808 ;
8809 return 0;
8810}
bec39cab 8811_ACEOF
81ecdfbb
RW
8812if ac_fn_c_try_link "$LINENO"; then :
8813 ac_cv_libexpat=yes
c906108c 8814else
81ecdfbb 8815 ac_cv_libexpat=no
bec39cab 8816fi
81ecdfbb
RW
8817rm -f core conftest.err conftest.$ac_objext \
8818 conftest$ac_exeext conftest.$ac_ext
8819 LIBS="$ac_save_LIBS"
c906108c 8820
95ca63c4 8821fi
81ecdfbb
RW
8822{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
8823$as_echo "$ac_cv_libexpat" >&6; }
8824 if test "$ac_cv_libexpat" = yes; then
8825 HAVE_LIBEXPAT=yes
bec39cab 8826
81ecdfbb 8827$as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
bec39cab 8828
81ecdfbb
RW
8829 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
8830$as_echo_n "checking how to link with libexpat... " >&6; }
8831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
8832$as_echo "$LIBEXPAT" >&6; }
8833 else
8834 HAVE_LIBEXPAT=no
8835 CPPFLAGS="$ac_save_CPPFLAGS"
8836 LIBEXPAT=
8837 LTLIBEXPAT=
8838 fi
95ca63c4
CF
8839
8840
8841
7cb9022a
MK
8842
8843
bec39cab 8844
81ecdfbb
RW
8845 if test "$HAVE_LIBEXPAT" != yes; then
8846 if test "$with_expat" = yes; then
8847 as_fn_error "expat is missing or unusable" "$LINENO" 5
8848 else
8849 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
8850$as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
8851 fi
8852 else
8853 save_LIBS=$LIBS
8854 LIBS="$LIBS $LIBEXPAT"
8855 for ac_func in XML_StopParser
8856do :
8857 ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
8858if test "x$ac_cv_func_XML_StopParser" = x""yes; then :
bec39cab 8859 cat >>confdefs.h <<_ACEOF
81ecdfbb 8860#define HAVE_XML_STOPPARSER 1
bec39cab 8861_ACEOF
95ca63c4 8862
bec39cab 8863fi
bec39cab 8864done
95ca63c4 8865
81ecdfbb
RW
8866 LIBS=$save_LIBS
8867 fi
a9322a30
TT
8868fi
8869
d344e670
DE
8870# --------------------- #
8871# Check for libpython. #
8872# --------------------- #
8873
a9322a30 8874
a9322a30
TT
8875
8876
ec685c5e 8877
0c4a4063 8878
81ecdfbb
RW
8879# Check whether --with-python was given.
8880if test "${with_python+set}" = set; then :
8881 withval=$with_python;
bec39cab 8882else
81ecdfbb 8883 with_python=auto
bec39cab 8884fi
bec39cab 8885
81ecdfbb
RW
8886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
8887$as_echo_n "checking whether to use python... " >&6; }
8888{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
8889$as_echo "$with_python" >&6; }
9a156167 8890
81ecdfbb
RW
8891if test "${with_python}" = no; then
8892 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
8893$as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
8894 have_libpython=no
bec39cab 8895else
81ecdfbb 8896 case "${with_python}" in
8c85a4e2 8897 [\\/]* | ?:[\\/]*)
ec685c5e
DE
8898 if test -d ${with_python}; then
8899 # Assume the python binary is ${with_python}/bin/python.
ec685c5e 8900 python_prog="${with_python}/bin/python"
0c4a4063 8901 python_prefix=
9c4ea6c5
JB
8902 # If python does not exit ${with_python}/bin, then try in
8903 # ${with_python}. On Windows/MinGW, this is where the Python
8904 # executable is.
8905 if test ! -x "${python_prog}"; then
8906 python_prog="${with_python}/python"
8907 python_prefix=
8908 fi
e7a30f46 8909 if test ! -x "${python_prog}"; then
ec685c5e
DE
8910 # Fall back to gdb 7.0/7.1 behaviour.
8911 python_prog=missing
0c4a4063 8912 python_prefix=${with_python}
ec685c5e 8913 fi
e7a30f46 8914 elif test -x "${with_python}"; then
ec685c5e
DE
8915 # While we can't run python compiled for $host (unless host == build),
8916 # the user could write a script that provides the needed information,
8917 # so we support that.
ec685c5e 8918 python_prog=${with_python}
0c4a4063 8919 python_prefix=
ec685c5e
DE
8920 else
8921 as_fn_error "invalid value for --with-python" "$LINENO" 5
8922 fi
81ecdfbb 8923 ;;
ec685c5e
DE
8924 */*)
8925 # Disallow --with-python=foo/bar.
81ecdfbb
RW
8926 as_fn_error "invalid value for --with-python" "$LINENO" 5
8927 ;;
ec685c5e
DE
8928 *)
8929 # The user has either specified auto, yes, or the name of the python
8930 # program assumed to be in $PATH.
8931 python_prefix=
8932 case "${with_python}" in
8933 yes | auto)
8934 if test ${build} = ${host}; then
8935 # Extract the first word of "python", so it can be a program name with args.
8936set dummy python; ac_word=$2
8937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8938$as_echo_n "checking for $ac_word... " >&6; }
8939if test "${ac_cv_path_python_prog_path+set}" = set; then :
8940 $as_echo_n "(cached) " >&6
8941else
8942 case $python_prog_path in
8943 [\\/]* | ?:[\\/]*)
8944 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
8945 ;;
8946 *)
8947 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8948for as_dir in $PATH
8949do
8950 IFS=$as_save_IFS
8951 test -z "$as_dir" && as_dir=.
8952 for ac_exec_ext in '' $ac_executable_extensions; do
8953 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8954 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
8955 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8956 break 2
8957 fi
8958done
8959 done
8960IFS=$as_save_IFS
8961
8962 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
8963 ;;
8964esac
8965fi
8966python_prog_path=$ac_cv_path_python_prog_path
8967if test -n "$python_prog_path"; then
8968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
8969$as_echo "$python_prog_path" >&6; }
8970else
8971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8972$as_echo "no" >&6; }
8973fi
8974
8975
8976 if test "${python_prog_path}" = missing; then
8977 python_prog=missing
8978 else
8979 python_prog=${python_prog_path}
8980 fi
8981 else
8982 # Not much we can do except assume the cross-compiler will find the
8983 # right files.
8984 python_prog=missing
8985 fi
8986 ;;
8987 *)
8988 # While we can't run python compiled for $host (unless host == build),
8989 # the user could write a script that provides the needed information,
8990 # so we support that.
8991 python_prog="${with_python}"
8992 # Extract the first word of "${python_prog}", so it can be a program name with args.
8993set dummy ${python_prog}; ac_word=$2
8994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8995$as_echo_n "checking for $ac_word... " >&6; }
8996if test "${ac_cv_path_python_prog_path+set}" = set; then :
8997 $as_echo_n "(cached) " >&6
8998else
8999 case $python_prog_path in
9000 [\\/]* | ?:[\\/]*)
9001 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
9002 ;;
9003 *)
9004 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9005for as_dir in $PATH
9006do
9007 IFS=$as_save_IFS
9008 test -z "$as_dir" && as_dir=.
9009 for ac_exec_ext in '' $ac_executable_extensions; do
9010 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9011 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
9012 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9013 break 2
9014 fi
9015done
9016 done
9017IFS=$as_save_IFS
9018
9019 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
9020 ;;
9021esac
9022fi
9023python_prog_path=$ac_cv_path_python_prog_path
9024if test -n "$python_prog_path"; then
9025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
9026$as_echo "$python_prog_path" >&6; }
9027else
9028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9029$as_echo "no" >&6; }
9030fi
9031
9032
9033 if test "${python_prog_path}" = missing; then
9034 as_fn_error "unable to find python program ${python_prog}" "$LINENO" 5
9035 fi
9036 ;;
9037 esac
81ecdfbb
RW
9038 esac
9039
ec685c5e 9040 if test "${python_prog}" != missing; then
e7a30f46
DE
9041 # We have a python program to use, but it may be too old.
9042 # Don't flag an error for --with-python=auto (the default).
9043 have_python_config=yes
ec685c5e
DE
9044 python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
9045 if test $? != 0; then
e7a30f46
DE
9046 have_python_config=failed
9047 if test "${with_python}" != auto; then
9048 as_fn_error "failure running python-config --includes" "$LINENO" 5
9049 fi
ec685c5e
DE
9050 fi
9051 python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
9052 if test $? != 0; then
e7a30f46
DE
9053 have_python_config=failed
9054 if test "${with_python}" != auto; then
9055 as_fn_error "failure running python-config --ldflags" "$LINENO" 5
9056 fi
ec685c5e 9057 fi
0c4a4063
DE
9058 python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
9059 if test $? != 0; then
e7a30f46
DE
9060 have_python_config=failed
9061 if test "${with_python}" != auto; then
9062 as_fn_error "failure running python-config --exec-prefix" "$LINENO" 5
9063 fi
0c4a4063 9064 fi
ec685c5e 9065 else
ac534cba
JB
9066 # We do not have a python executable we can use to determine where
9067 # to find the Python headers and libs. We cannot guess the include
9068 # path from the python_prefix either, because that include path
9069 # depends on the Python version. So, there is nothing much we can
9070 # do except assume that the compiler will be able to find those files.
9071 python_includes=
9072 python_libs=
0c4a4063 9073 have_python_config=no
ec685c5e 9074 fi
bec39cab 9075
ec685c5e
DE
9076 # If we have python-config, only try the configuration it provides.
9077 # Otherwise fallback on the old way of trying different versions of
9078 # python in turn.
81ecdfbb 9079
ec685c5e
DE
9080 have_libpython=no
9081 if test "${have_python_config}" = yes; then
c1039e3c
JB
9082 # Determine the Python version by extracting "-lpython<version>"
9083 # part of the python_libs. <version> is usually X.Y with X and Y
9084 # being decimal numbers, but can also be XY (seen on Windows).
9085 #
9086 # The extraction is performed using sed with a regular expression.
9087 # Initially, the regexp used was using the '?' quantifier to make
9088 # the dot in the version number optional. Unfortunately, this
9089 # does not work with non-GNU versions of sed because, because of
9090 # what looks like a limitation (the '?' quantifier does not work
9091 # with back-references). We work around this limitation by using
9092 # the '*' quantifier instead. It means that, in theory, we might
9093 # match unexpected version strings such as "-lpython2..7", but
9094 # this seems unlikely in practice. And even if that happens,
9095 # an error will be triggered later on, when checking that version
9096 # number.
ec685c5e 9097 python_version=`echo " ${python_libs} " \
c1039e3c 9098 | sed -e 's,^.* -l\(python[0-9]*[.]*[0-9]*\).*$,\1,'`
0c4a4063
DE
9099 case "${python_version}" in
9100 python*)
ec685c5e
DE
9101
9102 version=${python_version}
9103
9104 new_CPPFLAGS=${python_includes}
9105 new_LIBS=${python_libs}
81ecdfbb
RW
9106 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
9107$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 9108 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 9109 save_LIBS=$LIBS
ec685c5e
DE
9110 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9111 LIBS="$LIBS $new_LIBS"
9112 found_usable_python=no
81ecdfbb 9113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9114/* end confdefs.h. */
ac534cba 9115#include "Python.h"
81ecdfbb
RW
9116int
9117main ()
9118{
9119Py_Initialize ();
9120 ;
9121 return 0;
9122}
bec39cab 9123_ACEOF
81ecdfbb 9124if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
9125 have_libpython=${version}
9126 found_usable_python=yes
ac534cba
JB
9127 PYTHON_CPPFLAGS=$new_CPPFLAGS
9128 PYTHON_LIBS=$new_LIBS
9a156167 9129fi
81ecdfbb
RW
9130rm -f core conftest.err conftest.$ac_objext \
9131 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
9132 CPPFLAGS=$save_CPPFLAGS
9133 LIBS=$save_LIBS
ec685c5e
DE
9134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
9135$as_echo "${found_usable_python}" >&6; }
9a156167 9136
0c4a4063
DE
9137 ;;
9138 *)
ec685c5e 9139 as_fn_error "unable to determine python version from ${python_libs}" "$LINENO" 5
0c4a4063
DE
9140 ;;
9141 esac
e7a30f46 9142 elif test "${have_python_config}" != failed; then
ec685c5e 9143 if test "${have_libpython}" = no; then
9a156167 9144
420697bb
TT
9145 version=python2.7
9146
9147 new_CPPFLAGS=${python_includes}
9148 new_LIBS="${python_libs} -lpython2.7"
9149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
9150$as_echo_n "checking for ${version}... " >&6; }
9151 save_CPPFLAGS=$CPPFLAGS
9152 save_LIBS=$LIBS
9153 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9154 LIBS="$LIBS $new_LIBS"
9155 found_usable_python=no
9156 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9157/* end confdefs.h. */
ac534cba 9158#include "Python.h"
420697bb
TT
9159int
9160main ()
9161{
9162Py_Initialize ();
9163 ;
9164 return 0;
9165}
9166_ACEOF
9167if ac_fn_c_try_link "$LINENO"; then :
9168 have_libpython=${version}
9169 found_usable_python=yes
ac534cba
JB
9170 PYTHON_CPPFLAGS=$new_CPPFLAGS
9171 PYTHON_LIBS=$new_LIBS
420697bb
TT
9172fi
9173rm -f core conftest.err conftest.$ac_objext \
9174 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
9175 CPPFLAGS=$save_CPPFLAGS
9176 LIBS=$save_LIBS
420697bb
TT
9177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
9178$as_echo "${found_usable_python}" >&6; }
9179
9180 fi
9181 if test "${have_libpython}" = no; then
9182
ec685c5e
DE
9183 version=python2.6
9184
9185 new_CPPFLAGS=${python_includes}
9186 new_LIBS="${python_libs} -lpython2.6"
9187 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
9188$as_echo_n "checking for ${version}... " >&6; }
9189 save_CPPFLAGS=$CPPFLAGS
9190 save_LIBS=$LIBS
9191 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9192 LIBS="$LIBS $new_LIBS"
9193 found_usable_python=no
9194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9195/* end confdefs.h. */
ac534cba 9196#include "Python.h"
ec685c5e
DE
9197int
9198main ()
9199{
9200Py_Initialize ();
9201 ;
9202 return 0;
9203}
9204_ACEOF
9205if ac_fn_c_try_link "$LINENO"; then :
9206 have_libpython=${version}
9207 found_usable_python=yes
ac534cba
JB
9208 PYTHON_CPPFLAGS=$new_CPPFLAGS
9209 PYTHON_LIBS=$new_LIBS
ec685c5e
DE
9210fi
9211rm -f core conftest.err conftest.$ac_objext \
9212 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
9213 CPPFLAGS=$save_CPPFLAGS
9214 LIBS=$save_LIBS
ec685c5e
DE
9215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
9216$as_echo "${found_usable_python}" >&6; }
9a156167 9217
81ecdfbb 9218 fi
ec685c5e 9219 if test ${have_libpython} = no; then
9a156167 9220
81ecdfbb 9221 version=python2.5
9a156167 9222
ec685c5e
DE
9223 new_CPPFLAGS=${python_includes}
9224 new_LIBS="${python_libs} -lpython2.5"
81ecdfbb
RW
9225 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
9226$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 9227 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 9228 save_LIBS=$LIBS
ec685c5e
DE
9229 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9230 LIBS="$LIBS $new_LIBS"
9231 found_usable_python=no
81ecdfbb 9232 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 9233/* end confdefs.h. */
ac534cba 9234#include "Python.h"
81ecdfbb
RW
9235int
9236main ()
9237{
9238Py_Initialize ();
9239 ;
9240 return 0;
9241}
436868fb 9242_ACEOF
81ecdfbb 9243if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
9244 have_libpython=${version}
9245 found_usable_python=yes
ac534cba
JB
9246 PYTHON_CPPFLAGS=$new_CPPFLAGS
9247 PYTHON_LIBS=$new_LIBS
436868fb 9248fi
81ecdfbb
RW
9249rm -f core conftest.err conftest.$ac_objext \
9250 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
9251 CPPFLAGS=$save_CPPFLAGS
9252 LIBS=$save_LIBS
ec685c5e
DE
9253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
9254$as_echo "${found_usable_python}" >&6; }
a9322a30 9255
81ecdfbb 9256 fi
ec685c5e 9257 if test ${have_libpython} = no; then
a9322a30 9258
81ecdfbb 9259 version=python2.4
a9322a30 9260
ec685c5e
DE
9261 new_CPPFLAGS=${python_includes}
9262 new_LIBS="${python_libs} -lpython2.4"
81ecdfbb
RW
9263 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
9264$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 9265 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 9266 save_LIBS=$LIBS
ec685c5e
DE
9267 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9268 LIBS="$LIBS $new_LIBS"
9269 found_usable_python=no
81ecdfbb 9270 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 9271/* end confdefs.h. */
ac534cba 9272#include "Python.h"
a9322a30
TT
9273int
9274main ()
9275{
81ecdfbb 9276Py_Initialize ();
a9322a30
TT
9277 ;
9278 return 0;
9279}
436868fb 9280_ACEOF
81ecdfbb 9281if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
9282 have_libpython=${version}
9283 found_usable_python=yes
ac534cba
JB
9284 PYTHON_CPPFLAGS=$new_CPPFLAGS
9285 PYTHON_LIBS=$new_LIBS
436868fb 9286fi
81ecdfbb
RW
9287rm -f core conftest.err conftest.$ac_objext \
9288 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
9289 CPPFLAGS=$save_CPPFLAGS
9290 LIBS=$save_LIBS
ec685c5e
DE
9291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
9292$as_echo "${found_usable_python}" >&6; }
81ecdfbb 9293
ec685c5e
DE
9294 fi
9295 fi
9c4ea6c5 9296 if test "${have_libpython}" = python2.7 -o "${have_libpython}" = python27; then
11763c18
TT
9297
9298$as_echo "#define HAVE_LIBPYTHON2_7 1" >>confdefs.h
9299
9c4ea6c5 9300 elif test "${have_libpython}" = python2.6 -o "${have_libpython}" = python26; then
ec685c5e
DE
9301
9302$as_echo "#define HAVE_LIBPYTHON2_6 1" >>confdefs.h
9303
9c4ea6c5 9304 elif test "${have_libpython}" = python2.5 -o "${have_libpython}" = python25; then
ec685c5e
DE
9305
9306$as_echo "#define HAVE_LIBPYTHON2_5 1" >>confdefs.h
9307
9c4ea6c5 9308 elif test "${have_libpython}" = python2.4 -o "${have_libpython}" = python24; then
81ecdfbb
RW
9309
9310$as_echo "#define HAVE_LIBPYTHON2_4 1" >>confdefs.h
9311
81ecdfbb 9312 fi
ec685c5e
DE
9313
9314 if test "${have_libpython}" = no; then
81ecdfbb
RW
9315 case "${with_python}" in
9316 yes)
9317 as_fn_error "python is missing or unusable" "$LINENO" 5
9318 ;;
9319 auto)
9320 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
9321$as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
9322 ;;
9323 *)
9324 as_fn_error "no usable python found at ${with_python}" "$LINENO" 5
9325 ;;
9326 esac
0c4a4063
DE
9327 else
9328 if test -n "${python_prefix}"; then
9329
9330cat >>confdefs.h <<_ACEOF
9331#define WITH_PYTHON_PATH "${python_prefix}"
9332_ACEOF
9333
9334
9335 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
9336 if test "x$prefix" = xNONE; then
9337 test_prefix=/usr/local
9338 else
9339 test_prefix=$prefix
9340 fi
9341 else
9342 test_prefix=$exec_prefix
9343 fi
9344 value=0
9345 case ${python_prefix} in
9346 "${test_prefix}"|"${test_prefix}/"*|\
9347 '${exec_prefix}'|'${exec_prefix}/'*)
9348 value=1
9349 ;;
9350 esac
9351
9352cat >>confdefs.h <<_ACEOF
9353#define PYTHON_PATH_RELOCATABLE $value
9354_ACEOF
9355
9356
9357 fi
81ecdfbb 9358 fi
436868fb 9359fi
436868fb 9360
ec685c5e 9361if test "${have_libpython}" != no; then
436868fb 9362
81ecdfbb 9363$as_echo "#define HAVE_PYTHON 1" >>confdefs.h
436868fb 9364
81ecdfbb
RW
9365 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
9366 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
9367 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
94f7449c 9368 CONFIG_INSTALL="$CONFIG_INSTALL install-python"
81ecdfbb 9369 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
436868fb 9370
81ecdfbb
RW
9371 # Flags needed to compile Python code (taken from python-config --cflags).
9372 # We cannot call python-config directly because it will output whatever was
9373 # used when compiling the Python interpreter itself, including flags which
9374 # would make the python-related objects be compiled differently from the
9375 # rest of GDB (e.g., -O2 and -fPIC).
9376 if test "${GCC}" = yes; then
9377 tentative_python_cflags="-fno-strict-aliasing -DNDEBUG -fwrapv"
9378 fi
436868fb 9379
81ecdfbb
RW
9380 if test "x${tentative_python_cflags}" != x; then
9381 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
9382$as_echo_n "checking compiler flags for python code... " >&6; }
9383 for flag in ${tentative_python_cflags}; do
9384 # Check that the compiler accepts it
9385 saved_CFLAGS="$CFLAGS"
9386 CFLAGS="$CFLAGS $flag"
9387 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9388/* end confdefs.h. */
81ecdfbb 9389
a9322a30
TT
9390int
9391main ()
9392{
a9322a30
TT
9393
9394 ;
9395 return 0;
9396}
bec39cab 9397_ACEOF
81ecdfbb
RW
9398if ac_fn_c_try_compile "$LINENO"; then :
9399 PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
bec39cab 9400fi
81ecdfbb
RW
9401rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9402 CFLAGS="$saved_CFLAGS"
9403 done
9404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
9405$as_echo "${PYTHON_CFLAGS}" >&6; }
9406 fi
043b6510 9407
c83393b9
JB
9408 # On x64 Windows, Python's include headers, and pyconfig.h in
9409 # particular, rely on MS_WIN64 macro to detect that it's a 64bit
9410 # version of Windows. Unfortunately, MS_WIN64 is only defined if
9411 # _MSC_VER, a Microsoft-specific macro, is defined. So, when
9412 # building on x64 Windows with GCC, we define MS_WIN64 ourselves.
9413 # The issue was reported to the Python community, but still isn't
9414 # solved as of 2012-10-02 (http://bugs.python.org/issue4709).
9415
043b6510 9416 case "$gdb_host" in
c83393b9
JB
9417 mingw64)
9418 if test "${GCC}" = yes; then
9419 CPPFLAGS="$CPPFLAGS -DMS_WIN64"
9420 fi
9421 ;;
043b6510 9422 esac
a8db4212
YPK
9423
9424 # Note that "python -m threading" cannot be used to check for
9425 # threading support due to a bug in Python 2.7.3
9426 # (http://bugs.python.org/issue15567).
9427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether python supports threads" >&5
9428$as_echo_n "checking whether python supports threads... " >&6; }
9429 saved_CPPFLAGS="${CPPFLAGS}"
9430 CPPFLAGS="${PYTHON_CPPFLAGS}"
9431 # Note that the test is reversed so that python_has_threads=yes on
9432 # unexpected failures.
9433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9434/* end confdefs.h. */
9435
9436#include <Python.h>
9437#ifdef WITH_THREAD
9438# error
9439#endif
9440
9441_ACEOF
9442if ac_fn_c_try_cpp "$LINENO"; then :
9443 python_has_threads=no
9444else
9445 python_has_threads=yes
9446fi
9447rm -f conftest.err conftest.$ac_ext
9448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_has_threads}" >&5
9449$as_echo "${python_has_threads}" >&6; }
9450 CPPFLAGS="${saved_CPPFLAGS}"
81ecdfbb 9451else
6dddc817
DE
9452 # Even if Python support is not compiled in, we need to have this file
9453 # included so that the "python" command, et.al., still exists.
9454 CONFIG_OBS="$CONFIG_OBS python.o"
9455 CONFIG_SRCS="$CONFIG_SRCS python/python.c"
a9322a30 9456fi
9a156167 9457
ed3ef339
DE
9458
9459
4df42755
DE
9460 if test "${have_libpython}" != no; then
9461 HAVE_PYTHON_TRUE=
9462 HAVE_PYTHON_FALSE='#'
9463else
9464 HAVE_PYTHON_TRUE='#'
9465 HAVE_PYTHON_FALSE=
9466fi
9467
ed3ef339
DE
9468
9469# -------------------- #
9470# Check for libguile. #
9471# -------------------- #
9472
9473
e1402065
DE
9474
9475
9476
9477
9478# Check whether --with-guile was given.
9479if test "${with_guile+set}" = set; then :
9480 withval=$with_guile;
9481else
9482 with_guile=auto
9483fi
9484
9485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use guile" >&5
9486$as_echo_n "checking whether to use guile... " >&6; }
9487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_guile" >&5
9488$as_echo "$with_guile" >&6; }
9489
ed3ef339
DE
9490# Extract the first word of "pkg-config", so it can be a program name with args.
9491set dummy pkg-config; ac_word=$2
9492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9493$as_echo_n "checking for $ac_word... " >&6; }
9494if test "${ac_cv_path_pkg_config_prog_path+set}" = set; then :
9495 $as_echo_n "(cached) " >&6
9496else
9497 case $pkg_config_prog_path in
9498 [\\/]* | ?:[\\/]*)
9499 ac_cv_path_pkg_config_prog_path="$pkg_config_prog_path" # Let the user override the test with a path.
9500 ;;
9501 *)
9502 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9503for as_dir in $PATH
9504do
9505 IFS=$as_save_IFS
9506 test -z "$as_dir" && as_dir=.
9507 for ac_exec_ext in '' $ac_executable_extensions; do
9508 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9509 ac_cv_path_pkg_config_prog_path="$as_dir/$ac_word$ac_exec_ext"
9510 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9511 break 2
9512 fi
9513done
9514 done
9515IFS=$as_save_IFS
9516
9517 test -z "$ac_cv_path_pkg_config_prog_path" && ac_cv_path_pkg_config_prog_path="missing"
9518 ;;
9519esac
9520fi
9521pkg_config_prog_path=$ac_cv_path_pkg_config_prog_path
9522if test -n "$pkg_config_prog_path"; then
9523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config_prog_path" >&5
9524$as_echo "$pkg_config_prog_path" >&6; }
9525else
9526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9527$as_echo "no" >&6; }
9528fi
9529
9530
9531
214ab2da 9532try_guile_versions="guile-2.2 guile-2.0"
ed3ef339
DE
9533have_libguile=no
9534case "${with_guile}" in
9535no)
9536 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: guile support disabled; some features will be unavailable." >&5
9537$as_echo "$as_me: WARNING: guile support disabled; some features will be unavailable." >&2;}
9538 ;;
9539auto)
e1402065
DE
9540 if test "${pkg_config_prog_path}" = "missing"; then
9541 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found, guile support disabled" >&5
9542$as_echo "$as_me: WARNING: pkg-config not found, guile support disabled" >&2;}
9543 else
ed3ef339
DE
9544
9545 pkg_config=${pkg_config_prog_path}
9546 guile_version_list=${try_guile_versions}
9547 flag_errors=no
9548
ed3ef339
DE
9549 found_usable_guile=checking
9550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
9551$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
9552 for guile_version in ${guile_version_list}; do
9553 ${pkg_config} --exists ${guile_version} 2>/dev/null
9554 if test $? != 0; then
9555 continue
9556 fi
9557 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
9558 if test $? != 0; then
9559 as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
9560 fi
9561 new_LIBS=`${pkg_config} --libs ${guile_version}`
9562 if test $? != 0; then
9563 as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
9564 fi
9565 found_usable_guile=${guile_version}
9566 break
9567 done
9568 if test "${found_usable_guile}" = "checking"; then
9569 if test "${flag_errors}" = "yes"; then
9570 as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
9571 else
9572 found_usable_guile=no
9573 fi
9574 fi
9575 if test "${found_usable_guile}" != no; then
9576 save_CPPFLAGS=$CPPFLAGS
9577 save_LIBS=$LIBS
9578 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9579 LIBS="$LIBS $new_LIBS"
9580 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9581/* end confdefs.h. */
9582#include "libguile.h"
9583int
9584main ()
9585{
9586scm_init_guile ();
9587 ;
9588 return 0;
9589}
9590_ACEOF
9591if ac_fn_c_try_link "$LINENO"; then :
9592 have_libguile=yes
9593 GUILE_CPPFLAGS=$new_CPPFLAGS
9594 GUILE_LIBS=$new_LIBS
9595else
9596 found_usable_guile=no
9597fi
9598rm -f core conftest.err conftest.$ac_objext \
9599 conftest$ac_exeext conftest.$ac_ext
92fab5a6
AW
9600 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
9601if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then :
9602
9603$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
9604
9605
9606fi
9607
ed3ef339
DE
9608 CPPFLAGS=$save_CPPFLAGS
9609 LIBS=$save_LIBS
9610 if test "${found_usable_guile}" = no; then
9611 if test "${flag_errors}" = yes; then
9612 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9613$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9614as_fn_error "linking guile version ${guile_version} test program failed
9615See \`config.log' for more details." "$LINENO" 5; }
9616 fi
9617 fi
9618 fi
9619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
9620$as_echo "${found_usable_guile}" >&6; }
9621
e1402065 9622 fi
ed3ef339
DE
9623 ;;
9624yes)
e1402065
DE
9625 if test "${pkg_config_prog_path}" = "missing"; then
9626 as_fn_error "pkg-config not found" "$LINENO" 5
9627 fi
ed3ef339
DE
9628
9629 pkg_config=${pkg_config_prog_path}
9630 guile_version_list=${try_guile_versions}
9631 flag_errors=yes
9632
ed3ef339
DE
9633 found_usable_guile=checking
9634 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
9635$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
9636 for guile_version in ${guile_version_list}; do
9637 ${pkg_config} --exists ${guile_version} 2>/dev/null
9638 if test $? != 0; then
9639 continue
9640 fi
9641 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
9642 if test $? != 0; then
9643 as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
9644 fi
9645 new_LIBS=`${pkg_config} --libs ${guile_version}`
9646 if test $? != 0; then
9647 as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
9648 fi
9649 found_usable_guile=${guile_version}
9650 break
9651 done
9652 if test "${found_usable_guile}" = "checking"; then
9653 if test "${flag_errors}" = "yes"; then
9654 as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
9655 else
9656 found_usable_guile=no
9657 fi
9658 fi
9659 if test "${found_usable_guile}" != no; then
9660 save_CPPFLAGS=$CPPFLAGS
9661 save_LIBS=$LIBS
9662 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9663 LIBS="$LIBS $new_LIBS"
9664 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9665/* end confdefs.h. */
9666#include "libguile.h"
9667int
9668main ()
9669{
9670scm_init_guile ();
9671 ;
9672 return 0;
9673}
9674_ACEOF
9675if ac_fn_c_try_link "$LINENO"; then :
9676 have_libguile=yes
9677 GUILE_CPPFLAGS=$new_CPPFLAGS
9678 GUILE_LIBS=$new_LIBS
9679else
9680 found_usable_guile=no
9681fi
9682rm -f core conftest.err conftest.$ac_objext \
9683 conftest$ac_exeext conftest.$ac_ext
92fab5a6
AW
9684 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
9685if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then :
9686
9687$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
9688
9689
9690fi
9691
ed3ef339
DE
9692 CPPFLAGS=$save_CPPFLAGS
9693 LIBS=$save_LIBS
9694 if test "${found_usable_guile}" = no; then
9695 if test "${flag_errors}" = yes; then
9696 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9697$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9698as_fn_error "linking guile version ${guile_version} test program failed
9699See \`config.log' for more details." "$LINENO" 5; }
9700 fi
9701 fi
9702 fi
9703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
9704$as_echo "${found_usable_guile}" >&6; }
9705
9706 ;;
9707[\\/]* | ?:[\\/]*)
e1402065 9708 if test -x "${with_guile}"; then
ed3ef339
DE
9709
9710 pkg_config=${with_guile}
9711 guile_version_list=${try_guile_versions}
9712 flag_errors=yes
9713
ed3ef339
DE
9714 found_usable_guile=checking
9715 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
9716$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
9717 for guile_version in ${guile_version_list}; do
9718 ${pkg_config} --exists ${guile_version} 2>/dev/null
9719 if test $? != 0; then
9720 continue
9721 fi
9722 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
9723 if test $? != 0; then
9724 as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
9725 fi
9726 new_LIBS=`${pkg_config} --libs ${guile_version}`
9727 if test $? != 0; then
9728 as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
9729 fi
9730 found_usable_guile=${guile_version}
9731 break
9732 done
9733 if test "${found_usable_guile}" = "checking"; then
9734 if test "${flag_errors}" = "yes"; then
9735 as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
9736 else
9737 found_usable_guile=no
9738 fi
9739 fi
9740 if test "${found_usable_guile}" != no; then
9741 save_CPPFLAGS=$CPPFLAGS
9742 save_LIBS=$LIBS
9743 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9744 LIBS="$LIBS $new_LIBS"
9745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9746/* end confdefs.h. */
9747#include "libguile.h"
9748int
9749main ()
9750{
9751scm_init_guile ();
9752 ;
9753 return 0;
9754}
9755_ACEOF
9756if ac_fn_c_try_link "$LINENO"; then :
9757 have_libguile=yes
9758 GUILE_CPPFLAGS=$new_CPPFLAGS
9759 GUILE_LIBS=$new_LIBS
9760else
9761 found_usable_guile=no
9762fi
9763rm -f core conftest.err conftest.$ac_objext \
9764 conftest$ac_exeext conftest.$ac_ext
92fab5a6
AW
9765 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
9766if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then :
9767
9768$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
9769
9770
9771fi
9772
ed3ef339
DE
9773 CPPFLAGS=$save_CPPFLAGS
9774 LIBS=$save_LIBS
9775 if test "${found_usable_guile}" = no; then
9776 if test "${flag_errors}" = yes; then
9777 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9778$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9779as_fn_error "linking guile version ${guile_version} test program failed
9780See \`config.log' for more details." "$LINENO" 5; }
9781 fi
9782 fi
9783 fi
9784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
9785$as_echo "${found_usable_guile}" >&6; }
9786
e1402065
DE
9787 else
9788 as_fn_error "Guile config program not executable: ${with_guile}" "$LINENO" 5
9789 fi
ed3ef339
DE
9790 ;;
9791"" | */*)
9792 # Disallow --with=guile="" and --with-guile=foo/bar.
9793 as_fn_error "invalid value for --with-guile" "$LINENO" 5
9794 ;;
9795*)
9796 # A space separate list of guile versions to try, in order.
e1402065
DE
9797 if test "${pkg_config_prog_path}" = "missing"; then
9798 as_fn_error "pkg-config not found" "$LINENO" 5
9799 fi
ed3ef339
DE
9800
9801 pkg_config=${pkg_config_prog_path}
9802 guile_version_list=${with_guile}
9803 flag_errors=yes
9804
ed3ef339
DE
9805 found_usable_guile=checking
9806 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
9807$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
9808 for guile_version in ${guile_version_list}; do
9809 ${pkg_config} --exists ${guile_version} 2>/dev/null
9810 if test $? != 0; then
9811 continue
9812 fi
9813 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
9814 if test $? != 0; then
9815 as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
9816 fi
9817 new_LIBS=`${pkg_config} --libs ${guile_version}`
9818 if test $? != 0; then
9819 as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
9820 fi
9821 found_usable_guile=${guile_version}
9822 break
9823 done
9824 if test "${found_usable_guile}" = "checking"; then
9825 if test "${flag_errors}" = "yes"; then
9826 as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
9827 else
9828 found_usable_guile=no
9829 fi
9830 fi
9831 if test "${found_usable_guile}" != no; then
9832 save_CPPFLAGS=$CPPFLAGS
9833 save_LIBS=$LIBS
9834 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9835 LIBS="$LIBS $new_LIBS"
9836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9837/* end confdefs.h. */
9838#include "libguile.h"
9839int
9840main ()
9841{
9842scm_init_guile ();
9843 ;
9844 return 0;
9845}
9846_ACEOF
9847if ac_fn_c_try_link "$LINENO"; then :
9848 have_libguile=yes
9849 GUILE_CPPFLAGS=$new_CPPFLAGS
9850 GUILE_LIBS=$new_LIBS
9851else
9852 found_usable_guile=no
9853fi
9854rm -f core conftest.err conftest.$ac_objext \
9855 conftest$ac_exeext conftest.$ac_ext
92fab5a6
AW
9856 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
9857if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then :
9858
9859$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
9860
9861
9862fi
9863
ed3ef339
DE
9864 CPPFLAGS=$save_CPPFLAGS
9865 LIBS=$save_LIBS
9866 if test "${found_usable_guile}" = no; then
9867 if test "${flag_errors}" = yes; then
9868 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9869$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9870as_fn_error "linking guile version ${guile_version} test program failed
9871See \`config.log' for more details." "$LINENO" 5; }
9872 fi
9873 fi
9874 fi
9875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
9876$as_echo "${found_usable_guile}" >&6; }
9877
9878 ;;
9879esac
9880
e76c5d17 9881if test "${have_libguile}" != no; then
d342a0da
DE
9882 case "${with_guile}" in
9883 [\\/]* | ?:[\\/]*)
e76c5d17
DE
9884
9885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
9886$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
9887if test "${ac_cv_guild_program_name+set}" = set; then :
9888 $as_echo_n "(cached) " >&6
9889else
d342a0da 9890 ac_cv_guild_program_name="`"${with_guile}" --variable guild "${guile_version}"`"
e76c5d17
DE
9891
9892 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
9893 # the 'guild' and 'bindir' variables. In that case, try to guess
9894 # what the program name is, at the risk of getting it wrong if
9895 # Guile was configured with '--program-suffix' or similar.
9896 if test "x$ac_cv_guild_program_name" = "x"; then
d342a0da 9897 guile_exec_prefix="`"${with_guile}" --variable exec_prefix "${guile_version}"`"
e76c5d17
DE
9898 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
9899 fi
9900
9901fi
9902{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
9903$as_echo "$ac_cv_guild_program_name" >&6; }
9904
9905 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
9906 as_fn_error "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
9907 fi
9908
9909 GUILD="$ac_cv_guild_program_name"
9910
9911
d342a0da
DE
9912 ;;
9913 *)
9914
9915 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
9916$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
9917if test "${ac_cv_guild_program_name+set}" = set; then :
9918 $as_echo_n "(cached) " >&6
9919else
9920 ac_cv_guild_program_name="`"${pkg_config_prog_path}" --variable guild "${guile_version}"`"
9921
9922 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
9923 # the 'guild' and 'bindir' variables. In that case, try to guess
9924 # what the program name is, at the risk of getting it wrong if
9925 # Guile was configured with '--program-suffix' or similar.
9926 if test "x$ac_cv_guild_program_name" = "x"; then
9927 guile_exec_prefix="`"${pkg_config_prog_path}" --variable exec_prefix "${guile_version}"`"
9928 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
9929 fi
9930
9931fi
9932{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
9933$as_echo "$ac_cv_guild_program_name" >&6; }
9934
9935 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
9936 as_fn_error "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
9937 fi
9938
9939 GUILD="$ac_cv_guild_program_name"
9940
9941
9942 ;;
9943 esac
e76c5d17
DE
9944
9945
9946 if test "$cross_compiling" = no; then
9947 GUILD_TARGET_FLAG=
9948 else
9949 GUILD_TARGET_FLAG="--target=$host"
9950 fi
9951
9952
9953
9954
9955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether guild supports this host" >&5
9956$as_echo_n "checking whether guild supports this host... " >&6; }
9957if test "${ac_cv_guild_ok+set}" = set; then :
9958 $as_echo_n "(cached) " >&6
9959else
9960 echo "$ac_cv_guild_program_name compile $GUILD_TARGET_FLAG -o conftest.go $srcdir/guile/lib/gdb/support.scm" >&5
9961 if "$ac_cv_guild_program_name" compile $GUILD_TARGET_FLAG -o conftest.go "$srcdir/guile/lib/gdb/support.scm" >&5 2>&5; then
9962 ac_cv_guild_ok=yes
9963 else
9964 ac_cv_guild_ok=no
9965 fi
9966fi
9967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_ok" >&5
9968$as_echo "$ac_cv_guild_ok" >&6; }
9969
9970 if test "$ac_cv_guild_ok" = no; then
9971 have_libguile=no
9972 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling guile support" >&5
9973$as_echo "$as_me: WARNING: disabling guile support" >&2;}
9974 fi
9975fi
9976
ed3ef339
DE
9977if test "${have_libguile}" != no; then
9978
9979$as_echo "#define HAVE_GUILE 1" >>confdefs.h
9980
9981 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_GUILE_OBS)"
9982 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_GUILE_DEPS)"
9983 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_GUILE_SRCS)"
9984 CONFIG_INSTALL="$CONFIG_INSTALL install-guile"
9985 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_GUILE_CFLAGS)"
16954d5d
LC
9986
9987 save_LIBS="$LIBS"
9988 save_CPPFLAGS="$CPPFLAGS"
9989 LIBS="$GUILE_LIBS"
9990 CPPFLAGS="$GUILE_CPPFLAGS"
9991 for ac_func in scm_new_smob
9992do :
9993 ac_fn_c_check_func "$LINENO" "scm_new_smob" "ac_cv_func_scm_new_smob"
9994if test "x$ac_cv_func_scm_new_smob" = x""yes; then :
9995 cat >>confdefs.h <<_ACEOF
9996#define HAVE_SCM_NEW_SMOB 1
9997_ACEOF
9998
9999fi
10000done
10001
10002 LIBS="$save_LIBS"
10003 CPPFLAGS="$save_CPPFLAGS"
ed3ef339
DE
10004else
10005 # Even if Guile support is not compiled in, we need to have these files
10006 # included.
10007 CONFIG_OBS="$CONFIG_OBS guile.o"
10008 CONFIG_SRCS="$CONFIG_SRCS guile/guile.c"
10009fi
9a156167 10010
ac534cba 10011
4df42755
DE
10012 if test "${have_libguile}" != no; then
10013 HAVE_GUILE_TRUE=
10014 HAVE_GUILE_FALSE='#'
10015else
10016 HAVE_GUILE_TRUE='#'
10017 HAVE_GUILE_FALSE=
10018fi
10019
ac534cba 10020
d344e670
DE
10021# --------------------- #
10022# Check for libmcheck. #
10023# --------------------- #
10024
a8db4212
YPK
10025# Enable -lmcheck by default (it provides cheap-enough memory mangling),
10026# but turn it off if Python is enabled with threads, since -lmcheck is
10027# not thread safe (http://sourceware.org/bugzilla/show_bug.cgi?id=9939),
10028# and for releases.
17ef446e
PA
10029if test \( "${have_libpython}" = "no" -o "${python_has_threads}" = "no" \) \
10030 && $development; then
10031 libmcheck_default=yes
10032else
10033 libmcheck_default=no
a8db4212
YPK
10034fi
10035
17ef446e
PA
10036 # Check whether --enable-libmcheck was given.
10037if test "${enable_libmcheck+set}" = set; then :
10038 enableval=$enable_libmcheck; case "${enableval}" in
10039 yes | y) ENABLE_LIBMCHECK="yes" ;;
10040 no | n) ENABLE_LIBMCHECK="no" ;;
10041 *) as_fn_error "bad value ${enableval} for --enable-libmcheck" "$LINENO" 5 ;;
10042 esac
10043fi
10044
10045
10046 if test -z "${ENABLE_LIBMCHECK}"; then
10047 ENABLE_LIBMCHECK=${libmcheck_default}
a8db4212 10048 fi
17ef446e
PA
10049
10050 if test "$ENABLE_LIBMCHECK" = "yes" ; then
10051 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lmcheck" >&5
a8db4212
YPK
10052$as_echo_n "checking for main in -lmcheck... " >&6; }
10053if test "${ac_cv_lib_mcheck_main+set}" = set; then :
10054 $as_echo_n "(cached) " >&6
10055else
10056 ac_check_lib_save_LIBS=$LIBS
10057LIBS="-lmcheck $LIBS"
10058cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10059/* end confdefs.h. */
10060
10061
10062int
10063main ()
10064{
10065return main ();
10066 ;
10067 return 0;
10068}
10069_ACEOF
10070if ac_fn_c_try_link "$LINENO"; then :
10071 ac_cv_lib_mcheck_main=yes
10072else
10073 ac_cv_lib_mcheck_main=no
10074fi
10075rm -f core conftest.err conftest.$ac_objext \
10076 conftest$ac_exeext conftest.$ac_ext
10077LIBS=$ac_check_lib_save_LIBS
10078fi
10079{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mcheck_main" >&5
10080$as_echo "$ac_cv_lib_mcheck_main" >&6; }
10081if test "x$ac_cv_lib_mcheck_main" = x""yes; then :
10082 cat >>confdefs.h <<_ACEOF
10083#define HAVE_LIBMCHECK 1
10084_ACEOF
10085
10086 LIBS="-lmcheck $LIBS"
10087
10088fi
10089
17ef446e
PA
10090 fi
10091
10092
10093if test "$ENABLE_LIBMCHECK" = "yes" \
10094 -a "${have_libpython}" != "no" \
10095 -a "${python_has_threads}" = "yes" ; then
10096 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&5
10097$as_echo "$as_me: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&2;}
a8db4212
YPK
10098fi
10099
58bfce93
MM
10100
10101# Check whether --with-intel_pt was given.
10102if test "${with_intel_pt+set}" = set; then :
10103 withval=$with_intel_pt;
10104else
10105 with_intel_pt=auto
10106fi
10107
10108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5
10109$as_echo_n "checking whether to use intel pt... " >&6; }
10110{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5
10111$as_echo "$with_intel_pt" >&6; }
10112
10113if test "${with_intel_pt}" = no; then
10114 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel(R) Processor Trace support disabled; some features may be unavailable." >&5
10115$as_echo "$as_me: WARNING: Intel(R) Processor Trace support disabled; some features may be unavailable." >&2;}
10116 HAVE_LIBIPT=no
10117else
5599c404
MM
10118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10119/* end confdefs.h. */
10120
10121#include <linux/perf_event.h>
10122#ifndef PERF_ATTR_SIZE_VER5
10123# error
10124#endif
10125
10126_ACEOF
10127if ac_fn_c_try_cpp "$LINENO"; then :
10128 perf_event=yes
10129else
10130 perf_event=no
10131fi
10132rm -f conftest.err conftest.$ac_ext
10133 if test "$perf_event" != yes; then
10134 if test "$with_intel_pt" = yes; then
10135 as_fn_error "linux/perf_event.h missing or too old" "$LINENO" 5
10136 else
10137 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5
10138$as_echo "$as_me: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&2;}
10139 fi
10140 fi
10141
58bfce93
MM
10142
10143
10144
10145
10146
10147
10148
10149
10150 use_additional=yes
10151
10152 acl_save_prefix="$prefix"
10153 prefix="$acl_final_prefix"
10154 acl_save_exec_prefix="$exec_prefix"
10155 exec_prefix="$acl_final_exec_prefix"
10156
10157 eval additional_includedir=\"$includedir\"
10158 eval additional_libdir=\"$libdir\"
10159
10160 exec_prefix="$acl_save_exec_prefix"
10161 prefix="$acl_save_prefix"
10162
10163
10164# Check whether --with-libipt-prefix was given.
10165if test "${with_libipt_prefix+set}" = set; then :
10166 withval=$with_libipt_prefix;
10167 if test "X$withval" = "Xno"; then
10168 use_additional=no
10169 else
10170 if test "X$withval" = "X"; then
10171
10172 acl_save_prefix="$prefix"
10173 prefix="$acl_final_prefix"
10174 acl_save_exec_prefix="$exec_prefix"
10175 exec_prefix="$acl_final_exec_prefix"
10176
10177 eval additional_includedir=\"$includedir\"
10178 eval additional_libdir=\"$libdir\"
10179
10180 exec_prefix="$acl_save_exec_prefix"
10181 prefix="$acl_save_prefix"
10182
10183 else
10184 additional_includedir="$withval/include"
10185 additional_libdir="$withval/lib"
10186 fi
10187 fi
10188
10189fi
10190
10191 LIBIPT=
10192 LTLIBIPT=
10193 INCIPT=
10194 rpathdirs=
10195 ltrpathdirs=
10196 names_already_handled=
10197 names_next_round='ipt '
10198 while test -n "$names_next_round"; do
10199 names_this_round="$names_next_round"
10200 names_next_round=
10201 for name in $names_this_round; do
10202 already_handled=
10203 for n in $names_already_handled; do
10204 if test "$n" = "$name"; then
10205 already_handled=yes
10206 break
10207 fi
10208 done
10209 if test -z "$already_handled"; then
10210 names_already_handled="$names_already_handled $name"
10211 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
10212 eval value=\"\$HAVE_LIB$uppername\"
10213 if test -n "$value"; then
10214 if test "$value" = yes; then
10215 eval value=\"\$LIB$uppername\"
10216 test -z "$value" || LIBIPT="${LIBIPT}${LIBIPT:+ }$value"
10217 eval value=\"\$LTLIB$uppername\"
10218 test -z "$value" || LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$value"
10219 else
10220 :
10221 fi
10222 else
10223 found_dir=
10224 found_la=
10225 found_so=
10226 found_a=
10227 if test $use_additional = yes; then
10228 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
10229 found_dir="$additional_libdir"
10230 found_so="$additional_libdir/lib$name.$shlibext"
10231 if test -f "$additional_libdir/lib$name.la"; then
10232 found_la="$additional_libdir/lib$name.la"
10233 fi
10234 else
10235 if test -f "$additional_libdir/lib$name.$libext"; then
10236 found_dir="$additional_libdir"
10237 found_a="$additional_libdir/lib$name.$libext"
10238 if test -f "$additional_libdir/lib$name.la"; then
10239 found_la="$additional_libdir/lib$name.la"
10240 fi
10241 fi
10242 fi
10243 fi
10244 if test "X$found_dir" = "X"; then
10245 for x in $LDFLAGS $LTLIBIPT; do
10246
10247 acl_save_prefix="$prefix"
10248 prefix="$acl_final_prefix"
10249 acl_save_exec_prefix="$exec_prefix"
10250 exec_prefix="$acl_final_exec_prefix"
10251 eval x=\"$x\"
10252 exec_prefix="$acl_save_exec_prefix"
10253 prefix="$acl_save_prefix"
10254
10255 case "$x" in
10256 -L*)
10257 dir=`echo "X$x" | sed -e 's/^X-L//'`
10258 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
10259 found_dir="$dir"
10260 found_so="$dir/lib$name.$shlibext"
10261 if test -f "$dir/lib$name.la"; then
10262 found_la="$dir/lib$name.la"
10263 fi
10264 else
10265 if test -f "$dir/lib$name.$libext"; then
10266 found_dir="$dir"
10267 found_a="$dir/lib$name.$libext"
10268 if test -f "$dir/lib$name.la"; then
10269 found_la="$dir/lib$name.la"
10270 fi
10271 fi
10272 fi
10273 ;;
10274 esac
10275 if test "X$found_dir" != "X"; then
10276 break
10277 fi
10278 done
10279 fi
10280 if test "X$found_dir" != "X"; then
10281 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$found_dir -l$name"
10282 if test "X$found_so" != "X"; then
10283 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
10284 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
10285 else
10286 haveit=
10287 for x in $ltrpathdirs; do
10288 if test "X$x" = "X$found_dir"; then
10289 haveit=yes
10290 break
10291 fi
10292 done
10293 if test -z "$haveit"; then
10294 ltrpathdirs="$ltrpathdirs $found_dir"
10295 fi
10296 if test "$hardcode_direct" = yes; then
10297 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
10298 else
10299 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
10300 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
10301 haveit=
10302 for x in $rpathdirs; do
10303 if test "X$x" = "X$found_dir"; then
10304 haveit=yes
10305 break
10306 fi
10307 done
10308 if test -z "$haveit"; then
10309 rpathdirs="$rpathdirs $found_dir"
10310 fi
10311 else
10312 haveit=
10313 for x in $LDFLAGS $LIBIPT; do
10314
10315 acl_save_prefix="$prefix"
10316 prefix="$acl_final_prefix"
10317 acl_save_exec_prefix="$exec_prefix"
10318 exec_prefix="$acl_final_exec_prefix"
10319 eval x=\"$x\"
10320 exec_prefix="$acl_save_exec_prefix"
10321 prefix="$acl_save_prefix"
10322
10323 if test "X$x" = "X-L$found_dir"; then
10324 haveit=yes
10325 break
10326 fi
10327 done
10328 if test -z "$haveit"; then
10329 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir"
10330 fi
10331 if test "$hardcode_minus_L" != no; then
10332 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
10333 else
10334 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
10335 fi
10336 fi
10337 fi
10338 fi
10339 else
10340 if test "X$found_a" != "X"; then
10341 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_a"
10342 else
10343 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir -l$name"
10344 fi
10345 fi
10346 additional_includedir=
10347 case "$found_dir" in
10348 */lib | */lib/)
10349 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
10350 additional_includedir="$basedir/include"
10351 ;;
10352 esac
10353 if test "X$additional_includedir" != "X"; then
10354 if test "X$additional_includedir" != "X/usr/include"; then
10355 haveit=
10356 if test "X$additional_includedir" = "X/usr/local/include"; then
10357 if test -n "$GCC"; then
10358 case $host_os in
10359 linux*) haveit=yes;;
10360 esac
10361 fi
10362 fi
10363 if test -z "$haveit"; then
10364 for x in $CPPFLAGS $INCIPT; do
10365
10366 acl_save_prefix="$prefix"
10367 prefix="$acl_final_prefix"
10368 acl_save_exec_prefix="$exec_prefix"
10369 exec_prefix="$acl_final_exec_prefix"
10370 eval x=\"$x\"
10371 exec_prefix="$acl_save_exec_prefix"
10372 prefix="$acl_save_prefix"
10373
10374 if test "X$x" = "X-I$additional_includedir"; then
10375 haveit=yes
10376 break
10377 fi
10378 done
10379 if test -z "$haveit"; then
10380 if test -d "$additional_includedir"; then
10381 INCIPT="${INCIPT}${INCIPT:+ }-I$additional_includedir"
10382 fi
10383 fi
10384 fi
10385 fi
10386 fi
10387 if test -n "$found_la"; then
10388 save_libdir="$libdir"
10389 case "$found_la" in
10390 */* | *\\*) . "$found_la" ;;
10391 *) . "./$found_la" ;;
10392 esac
10393 libdir="$save_libdir"
10394 for dep in $dependency_libs; do
10395 case "$dep" in
10396 -L*)
10397 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10398 if test "X$additional_libdir" != "X/usr/lib"; then
10399 haveit=
10400 if test "X$additional_libdir" = "X/usr/local/lib"; then
10401 if test -n "$GCC"; then
10402 case $host_os in
10403 linux*) haveit=yes;;
10404 esac
10405 fi
10406 fi
10407 if test -z "$haveit"; then
10408 haveit=
10409 for x in $LDFLAGS $LIBIPT; do
10410
10411 acl_save_prefix="$prefix"
10412 prefix="$acl_final_prefix"
10413 acl_save_exec_prefix="$exec_prefix"
10414 exec_prefix="$acl_final_exec_prefix"
10415 eval x=\"$x\"
10416 exec_prefix="$acl_save_exec_prefix"
10417 prefix="$acl_save_prefix"
10418
10419 if test "X$x" = "X-L$additional_libdir"; then
10420 haveit=yes
10421 break
10422 fi
10423 done
10424 if test -z "$haveit"; then
10425 if test -d "$additional_libdir"; then
10426 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$additional_libdir"
10427 fi
10428 fi
10429 haveit=
10430 for x in $LDFLAGS $LTLIBIPT; do
10431
10432 acl_save_prefix="$prefix"
10433 prefix="$acl_final_prefix"
10434 acl_save_exec_prefix="$exec_prefix"
10435 exec_prefix="$acl_final_exec_prefix"
10436 eval x=\"$x\"
10437 exec_prefix="$acl_save_exec_prefix"
10438 prefix="$acl_save_prefix"
10439
10440 if test "X$x" = "X-L$additional_libdir"; then
10441 haveit=yes
10442 break
10443 fi
10444 done
10445 if test -z "$haveit"; then
10446 if test -d "$additional_libdir"; then
10447 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$additional_libdir"
10448 fi
10449 fi
10450 fi
10451 fi
10452 ;;
10453 -R*)
10454 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10455 if test "$enable_rpath" != no; then
10456 haveit=
10457 for x in $rpathdirs; do
10458 if test "X$x" = "X$dir"; then
10459 haveit=yes
10460 break
10461 fi
10462 done
10463 if test -z "$haveit"; then
10464 rpathdirs="$rpathdirs $dir"
10465 fi
10466 haveit=
10467 for x in $ltrpathdirs; do
10468 if test "X$x" = "X$dir"; then
10469 haveit=yes
10470 break
10471 fi
10472 done
10473 if test -z "$haveit"; then
10474 ltrpathdirs="$ltrpathdirs $dir"
10475 fi
10476 fi
10477 ;;
10478 -l*)
10479 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10480 ;;
10481 *.la)
10482 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10483 ;;
10484 *)
10485 LIBIPT="${LIBIPT}${LIBIPT:+ }$dep"
10486 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$dep"
10487 ;;
10488 esac
10489 done
10490 fi
10491 else
10492 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
10493 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l$name"
10494 fi
10495 fi
10496 fi
10497 done
10498 done
10499 if test "X$rpathdirs" != "X"; then
10500 if test -n "$hardcode_libdir_separator"; then
10501 alldirs=
10502 for found_dir in $rpathdirs; do
10503 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10504 done
10505 acl_save_libdir="$libdir"
10506 libdir="$alldirs"
10507 eval flag=\"$hardcode_libdir_flag_spec\"
10508 libdir="$acl_save_libdir"
10509 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
10510 else
10511 for found_dir in $rpathdirs; do
10512 acl_save_libdir="$libdir"
10513 libdir="$found_dir"
10514 eval flag=\"$hardcode_libdir_flag_spec\"
10515 libdir="$acl_save_libdir"
10516 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
10517 done
10518 fi
10519 fi
10520 if test "X$ltrpathdirs" != "X"; then
10521 for found_dir in $ltrpathdirs; do
10522 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-R$found_dir"
10523 done
10524 fi
10525
10526
10527 ac_save_CPPFLAGS="$CPPFLAGS"
10528
10529 for element in $INCIPT; do
10530 haveit=
10531 for x in $CPPFLAGS; do
10532
10533 acl_save_prefix="$prefix"
10534 prefix="$acl_final_prefix"
10535 acl_save_exec_prefix="$exec_prefix"
10536 exec_prefix="$acl_final_exec_prefix"
10537 eval x=\"$x\"
10538 exec_prefix="$acl_save_exec_prefix"
10539 prefix="$acl_save_prefix"
10540
10541 if test "X$x" = "X$element"; then
10542 haveit=yes
10543 break
10544 fi
10545 done
10546 if test -z "$haveit"; then
10547 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10548 fi
10549 done
10550
10551
10552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libipt" >&5
10553$as_echo_n "checking for libipt... " >&6; }
10554if test "${ac_cv_libipt+set}" = set; then :
10555 $as_echo_n "(cached) " >&6
10556else
10557
10558 ac_save_LIBS="$LIBS"
10559 LIBS="$LIBS $LIBIPT"
10560 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10561/* end confdefs.h. */
10562#include "intel-pt.h"
10563int
10564main ()
10565{
10566pt_insn_alloc_decoder (0);
10567 ;
10568 return 0;
10569}
10570_ACEOF
10571if ac_fn_c_try_link "$LINENO"; then :
10572 ac_cv_libipt=yes
10573else
10574 ac_cv_libipt=no
10575fi
10576rm -f core conftest.err conftest.$ac_objext \
10577 conftest$ac_exeext conftest.$ac_ext
10578 LIBS="$ac_save_LIBS"
10579
10580fi
10581{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libipt" >&5
10582$as_echo "$ac_cv_libipt" >&6; }
10583 if test "$ac_cv_libipt" = yes; then
10584 HAVE_LIBIPT=yes
10585
10586$as_echo "#define HAVE_LIBIPT 1" >>confdefs.h
10587
10588 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libipt" >&5
10589$as_echo_n "checking how to link with libipt... " >&6; }
10590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBIPT" >&5
10591$as_echo "$LIBIPT" >&6; }
10592 else
10593 HAVE_LIBIPT=no
10594 CPPFLAGS="$ac_save_CPPFLAGS"
10595 LIBIPT=
10596 LTLIBIPT=
10597 fi
10598
10599
10600
10601
10602
10603
10604 if test "$HAVE_LIBIPT" != yes; then
10605 if test "$with_intel_pt" = yes; then
10606 as_fn_error "libipt is missing or unusable" "$LINENO" 5
10607 else
10608 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5
10609$as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be unavailable." >&2;}
10610 fi
10611 fi
10612fi
10613
81ecdfbb
RW
10614# ------------------------- #
10615# Checks for header files. #
10616# ------------------------- #
c890192f 10617
81ecdfbb
RW
10618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
10619$as_echo_n "checking for ANSI C header files... " >&6; }
10620if test "${ac_cv_header_stdc+set}" = set; then :
10621 $as_echo_n "(cached) " >&6
bec39cab 10622else
81ecdfbb 10623 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10624/* end confdefs.h. */
81ecdfbb
RW
10625#include <stdlib.h>
10626#include <stdarg.h>
10627#include <string.h>
10628#include <float.h>
10629
a9322a30
TT
10630int
10631main ()
10632{
a9322a30
TT
10633
10634 ;
10635 return 0;
10636}
bec39cab 10637_ACEOF
81ecdfbb
RW
10638if ac_fn_c_try_compile "$LINENO"; then :
10639 ac_cv_header_stdc=yes
bec39cab 10640else
81ecdfbb 10641 ac_cv_header_stdc=no
a9322a30 10642fi
81ecdfbb 10643rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 10644
81ecdfbb
RW
10645if test $ac_cv_header_stdc = yes; then
10646 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10647 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10648/* end confdefs.h. */
10649#include <string.h>
bec39cab 10650
81ecdfbb
RW
10651_ACEOF
10652if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10653 $EGREP "memchr" >/dev/null 2>&1; then :
bec39cab 10654
bec39cab 10655else
81ecdfbb
RW
10656 ac_cv_header_stdc=no
10657fi
10658rm -f conftest*
10659
10660fi
10661
10662if test $ac_cv_header_stdc = yes; then
10663 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10664 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10665/* end confdefs.h. */
10666#include <stdlib.h>
10667
bec39cab 10668_ACEOF
81ecdfbb
RW
10669if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10670 $EGREP "free" >/dev/null 2>&1; then :
06825bd1 10671
81ecdfbb
RW
10672else
10673 ac_cv_header_stdc=no
10674fi
10675rm -f conftest*
bec39cab 10676
bec39cab 10677fi
81ecdfbb
RW
10678
10679if test $ac_cv_header_stdc = yes; then
10680 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10681 if test "$cross_compiling" = yes; then :
10682 :
bec39cab 10683else
81ecdfbb 10684 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10685/* end confdefs.h. */
81ecdfbb
RW
10686#include <ctype.h>
10687#include <stdlib.h>
10688#if ((' ' & 0x0FF) == 0x020)
10689# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10690# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10691#else
10692# define ISLOWER(c) \
10693 (('a' <= (c) && (c) <= 'i') \
10694 || ('j' <= (c) && (c) <= 'r') \
10695 || ('s' <= (c) && (c) <= 'z'))
10696# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10697#endif
10698
10699#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
a9322a30
TT
10700int
10701main ()
10702{
81ecdfbb
RW
10703 int i;
10704 for (i = 0; i < 256; i++)
10705 if (XOR (islower (i), ISLOWER (i))
10706 || toupper (i) != TOUPPER (i))
10707 return 2;
a9322a30
TT
10708 return 0;
10709}
bec39cab 10710_ACEOF
81ecdfbb
RW
10711if ac_fn_c_try_run "$LINENO"; then :
10712
bec39cab 10713else
81ecdfbb
RW
10714 ac_cv_header_stdc=no
10715fi
10716rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10717 conftest.$ac_objext conftest.beam conftest.$ac_ext
10718fi
bec39cab 10719
bec39cab 10720fi
a9322a30 10721fi
81ecdfbb
RW
10722{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
10723$as_echo "$ac_cv_header_stdc" >&6; }
10724if test $ac_cv_header_stdc = yes; then
bec39cab 10725
81ecdfbb 10726$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5ee754fc 10727
81ecdfbb 10728fi
bec39cab 10729
81ecdfbb 10730# elf_hp.h is for HP/UX 64-bit shared library support.
9467110b 10731for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
161d1bec 10732 thread_db.h \
0080a2f6 10733 sys/fault.h \
81ecdfbb
RW
10734 sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
10735 sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
10736 sys/reg.h sys/debugreg.h sys/select.h sys/syscall.h \
9467110b 10737 termios.h termio.h \
3447c057 10738 sgtty.h elf_hp.h \
9467110b 10739 dlfcn.h
81ecdfbb
RW
10740do :
10741 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10742ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
10743eval as_val=\$$as_ac_Header
10744 if test "x$as_val" = x""yes; then :
bec39cab 10745 cat >>confdefs.h <<_ACEOF
81ecdfbb 10746#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 10747_ACEOF
c906108c 10748
bec39cab 10749fi
81ecdfbb
RW
10750
10751done
10752
81ecdfbb
RW
10753for ac_header in sys/proc.h
10754do :
10755 ac_fn_c_check_header_compile "$LINENO" "sys/proc.h" "ac_cv_header_sys_proc_h" "#if HAVE_SYS_PARAM_H
10756# include <sys/param.h>
10757#endif
c906108c 10758
81ecdfbb
RW
10759"
10760if test "x$ac_cv_header_sys_proc_h" = x""yes; then :
bec39cab 10761 cat >>confdefs.h <<_ACEOF
81ecdfbb 10762#define HAVE_SYS_PROC_H 1
bec39cab 10763_ACEOF
5ee754fc 10764
bec39cab 10765fi
81ecdfbb
RW
10766
10767done
10768
10769for ac_header in sys/user.h
10770do :
10771 ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
10772# include <sys/param.h>
a9322a30
TT
10773#endif
10774
81ecdfbb
RW
10775"
10776if test "x$ac_cv_header_sys_user_h" = x""yes; then :
10777 cat >>confdefs.h <<_ACEOF
10778#define HAVE_SYS_USER_H 1
bec39cab 10779_ACEOF
bec39cab 10780
a9322a30 10781fi
bec39cab 10782
81ecdfbb 10783done
5ee754fc 10784
5ee754fc 10785
81ecdfbb
RW
10786# On Solaris 2.[789], we need to define _MSE_INT_H to avoid a clash
10787# between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
10788# think that we don't have <curses.h> if we're using GCC.
10789case $host_os in
10790 solaris2.[789])
10791 if test "$GCC" = yes; then
10792
10793$as_echo "#define _MSE_INT_H 1" >>confdefs.h
10794
10795 fi ;;
10796esac
10797for ac_header in curses.h cursesX.h ncurses.h ncurses/ncurses.h ncurses/term.h
10798do :
10799 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10800ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
10801eval as_val=\$$as_ac_Header
10802 if test "x$as_val" = x""yes; then :
bec39cab 10803 cat >>confdefs.h <<_ACEOF
81ecdfbb 10804#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 10805_ACEOF
5ee754fc
MK
10806
10807fi
10808
81ecdfbb 10809done
bec39cab 10810
81ecdfbb
RW
10811for ac_header in term.h
10812do :
10813 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
10814# include <curses.h>
10815#endif
bec39cab 10816
81ecdfbb
RW
10817"
10818if test "x$ac_cv_header_term_h" = x""yes; then :
10819 cat >>confdefs.h <<_ACEOF
10820#define HAVE_TERM_H 1
a8111142 10821_ACEOF
a8111142 10822
a8111142 10823fi
a8111142 10824
81ecdfbb 10825done
a8111142
TT
10826
10827
81ecdfbb
RW
10828# ------------------------- #
10829# Checks for declarations. #
10830# ------------------------- #
a9322a30 10831
07697489
PA
10832
10833 # Check for presence and size of long long.
10834 ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
10835if test "x$ac_cv_type_long_long" = x""yes; then :
10836
10837cat >>confdefs.h <<_ACEOF
10838#define HAVE_LONG_LONG 1
10839_ACEOF
10840
10841# The cast to long int works around a bug in the HP C Compiler
10842# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10843# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10844# This bug is HP SR number 8606223364.
10845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
10846$as_echo_n "checking size of long long... " >&6; }
10847if test "${ac_cv_sizeof_long_long+set}" = set; then :
10848 $as_echo_n "(cached) " >&6
10849else
10850 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
10851
10852else
10853 if test "$ac_cv_type_long_long" = yes; then
10854 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10855$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10856{ as_fn_set_status 77
10857as_fn_error "cannot compute sizeof (long long)
10858See \`config.log' for more details." "$LINENO" 5; }; }
10859 else
10860 ac_cv_sizeof_long_long=0
10861 fi
10862fi
10863
10864fi
10865{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
10866$as_echo "$ac_cv_sizeof_long_long" >&6; }
10867
10868
10869
10870cat >>confdefs.h <<_ACEOF
10871#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
10872_ACEOF
10873
10874
10875fi
10876
10877
10878 ac_fn_c_check_decl "$LINENO" "basename(char *)" "ac_cv_have_decl_basename_char_p_" "$ac_includes_default"
10879if test "x$ac_cv_have_decl_basename_char_p_" = x""yes; then :
10880 ac_have_decl=1
10881else
10882 ac_have_decl=0
10883fi
10884
10885cat >>confdefs.h <<_ACEOF
10886#define HAVE_DECL_BASENAME $ac_have_decl
10887_ACEOF
10888ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default"
10889if test "x$ac_cv_have_decl_ffs" = x""yes; then :
10890 ac_have_decl=1
10891else
10892 ac_have_decl=0
10893fi
10894
10895cat >>confdefs.h <<_ACEOF
10896#define HAVE_DECL_FFS $ac_have_decl
10897_ACEOF
10898ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default"
10899if test "x$ac_cv_have_decl_asprintf" = x""yes; then :
10900 ac_have_decl=1
10901else
10902 ac_have_decl=0
10903fi
10904
10905cat >>confdefs.h <<_ACEOF
10906#define HAVE_DECL_ASPRINTF $ac_have_decl
10907_ACEOF
10908ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
10909if test "x$ac_cv_have_decl_vasprintf" = x""yes; then :
10910 ac_have_decl=1
10911else
10912 ac_have_decl=0
10913fi
10914
10915cat >>confdefs.h <<_ACEOF
10916#define HAVE_DECL_VASPRINTF $ac_have_decl
10917_ACEOF
10918ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
10919if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
10920 ac_have_decl=1
10921else
10922 ac_have_decl=0
10923fi
10924
10925cat >>confdefs.h <<_ACEOF
10926#define HAVE_DECL_SNPRINTF $ac_have_decl
10927_ACEOF
10928ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
10929if test "x$ac_cv_have_decl_vsnprintf" = x""yes; then :
10930 ac_have_decl=1
10931else
10932 ac_have_decl=0
10933fi
10934
10935cat >>confdefs.h <<_ACEOF
10936#define HAVE_DECL_VSNPRINTF $ac_have_decl
10937_ACEOF
10938
10939 ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default"
10940if test "x$ac_cv_have_decl_strtol" = x""yes; then :
10941 ac_have_decl=1
10942else
10943 ac_have_decl=0
10944fi
10945
10946cat >>confdefs.h <<_ACEOF
10947#define HAVE_DECL_STRTOL $ac_have_decl
10948_ACEOF
10949ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default"
10950if test "x$ac_cv_have_decl_strtoul" = x""yes; then :
10951 ac_have_decl=1
10952else
10953 ac_have_decl=0
10954fi
10955
10956cat >>confdefs.h <<_ACEOF
10957#define HAVE_DECL_STRTOUL $ac_have_decl
10958_ACEOF
10959ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
10960if test "x$ac_cv_have_decl_strtoll" = x""yes; then :
10961 ac_have_decl=1
10962else
10963 ac_have_decl=0
10964fi
10965
10966cat >>confdefs.h <<_ACEOF
10967#define HAVE_DECL_STRTOLL $ac_have_decl
10968_ACEOF
10969ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
10970if test "x$ac_cv_have_decl_strtoull" = x""yes; then :
10971 ac_have_decl=1
10972else
10973 ac_have_decl=0
10974fi
10975
10976cat >>confdefs.h <<_ACEOF
10977#define HAVE_DECL_STRTOULL $ac_have_decl
10978_ACEOF
10979
10980 ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default"
10981if test "x$ac_cv_have_decl_strverscmp" = x""yes; then :
10982 ac_have_decl=1
10983else
10984 ac_have_decl=0
10985fi
10986
10987cat >>confdefs.h <<_ACEOF
10988#define HAVE_DECL_STRVERSCMP $ac_have_decl
10989_ACEOF
10990
10991
10992
81ecdfbb
RW
10993ac_fn_c_check_decl "$LINENO" "free" "ac_cv_have_decl_free" "$ac_includes_default"
10994if test "x$ac_cv_have_decl_free" = x""yes; then :
10995 ac_have_decl=1
bec39cab 10996else
81ecdfbb
RW
10997 ac_have_decl=0
10998fi
10999
11000cat >>confdefs.h <<_ACEOF
11001#define HAVE_DECL_FREE $ac_have_decl
bec39cab 11002_ACEOF
81ecdfbb
RW
11003ac_fn_c_check_decl "$LINENO" "malloc" "ac_cv_have_decl_malloc" "$ac_includes_default"
11004if test "x$ac_cv_have_decl_malloc" = x""yes; then :
11005 ac_have_decl=1
11006else
11007 ac_have_decl=0
11008fi
11009
11010cat >>confdefs.h <<_ACEOF
11011#define HAVE_DECL_MALLOC $ac_have_decl
bec39cab 11012_ACEOF
81ecdfbb
RW
11013ac_fn_c_check_decl "$LINENO" "realloc" "ac_cv_have_decl_realloc" "$ac_includes_default"
11014if test "x$ac_cv_have_decl_realloc" = x""yes; then :
11015 ac_have_decl=1
bec39cab 11016else
81ecdfbb
RW
11017 ac_have_decl=0
11018fi
bec39cab 11019
81ecdfbb
RW
11020cat >>confdefs.h <<_ACEOF
11021#define HAVE_DECL_REALLOC $ac_have_decl
bec39cab 11022_ACEOF
81ecdfbb
RW
11023ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
11024if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
11025 ac_have_decl=1
11026else
11027 ac_have_decl=0
5ee754fc 11028fi
81ecdfbb
RW
11029
11030cat >>confdefs.h <<_ACEOF
11031#define HAVE_DECL_SNPRINTF $ac_have_decl
a9322a30 11032_ACEOF
5ee754fc 11033
5ee754fc 11034
81ecdfbb
RW
11035 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
11036$as_echo_n "checking for LC_MESSAGES... " >&6; }
11037if test "${am_cv_val_LC_MESSAGES+set}" = set; then :
11038 $as_echo_n "(cached) " >&6
bec39cab 11039else
81ecdfbb 11040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11041/* end confdefs.h. */
81ecdfbb 11042#include <locale.h>
a9322a30
TT
11043int
11044main ()
11045{
81ecdfbb 11046return LC_MESSAGES
a9322a30
TT
11047 ;
11048 return 0;
11049}
bec39cab 11050_ACEOF
81ecdfbb
RW
11051if ac_fn_c_try_link "$LINENO"; then :
11052 am_cv_val_LC_MESSAGES=yes
bec39cab 11053else
81ecdfbb
RW
11054 am_cv_val_LC_MESSAGES=no
11055fi
11056rm -f core conftest.err conftest.$ac_objext \
11057 conftest$ac_exeext conftest.$ac_ext
11058fi
11059{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
11060$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
11061 if test $am_cv_val_LC_MESSAGES = yes; then
bec39cab 11062
81ecdfbb
RW
11063$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
11064
11065 fi
11066
11067
11068# ----------------------- #
11069# Checks for structures. #
11070# ----------------------- #
11071
11072ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
11073if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
11074
11075cat >>confdefs.h <<_ACEOF
11076#define HAVE_STRUCT_STAT_ST_BLOCKS 1
7eb368b3 11077_ACEOF
7eb368b3 11078
81ecdfbb 11079
7eb368b3 11080fi
81ecdfbb
RW
11081ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
11082if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
7eb368b3 11083
a9322a30
TT
11084cat >>confdefs.h <<_ACEOF
11085#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
7eb368b3
NR
11086_ACEOF
11087
a9322a30 11088
7eb368b3
NR
11089fi
11090
7eb368b3 11091
a9322a30
TT
11092# ------------------ #
11093# Checks for types. #
11094# ------------------ #
7eb368b3 11095
81ecdfbb 11096ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
a9322a30
TT
11097#include <sys/socket.h>
11098
81ecdfbb
RW
11099"
11100if test "x$ac_cv_type_socklen_t" = x""yes; then :
bec39cab 11101
a9322a30
TT
11102cat >>confdefs.h <<_ACEOF
11103#define HAVE_SOCKLEN_T 1
11104_ACEOF
11105
11106
11107fi
11108
11109
11110# ------------------------------------- #
11111# Checks for compiler characteristics. #
11112# ------------------------------------- #
11113
81ecdfbb
RW
11114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11115$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
11116if test "${ac_cv_c_const+set}" = set; then :
11117 $as_echo_n "(cached) " >&6
a9322a30 11118else
81ecdfbb 11119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11120/* end confdefs.h. */
a9322a30
TT
11121
11122int
11123main ()
11124{
11125/* FIXME: Include the comments suggested by Paul. */
11126#ifndef __cplusplus
11127 /* Ultrix mips cc rejects this. */
11128 typedef int charset[2];
81ecdfbb 11129 const charset cs;
a9322a30 11130 /* SunOS 4.1.1 cc rejects this. */
81ecdfbb
RW
11131 char const *const *pcpcc;
11132 char **ppc;
a9322a30
TT
11133 /* NEC SVR4.0.2 mips cc rejects this. */
11134 struct point {int x, y;};
11135 static struct point const zero = {0,0};
11136 /* AIX XL C 1.02.0.0 rejects this.
11137 It does not let you subtract one const X* pointer from another in
11138 an arm of an if-expression whose if-part is not a constant
11139 expression */
11140 const char *g = "string";
81ecdfbb 11141 pcpcc = &g + (g ? g-g : 0);
a9322a30 11142 /* HPUX 7.0 cc rejects these. */
81ecdfbb
RW
11143 ++pcpcc;
11144 ppc = (char**) pcpcc;
11145 pcpcc = (char const *const *) ppc;
a9322a30
TT
11146 { /* SCO 3.2v4 cc rejects this. */
11147 char *t;
11148 char const *s = 0 ? (char *) 0 : (char const *) 0;
11149
11150 *t++ = 0;
81ecdfbb 11151 if (s) return 0;
a9322a30
TT
11152 }
11153 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11154 int x[] = {25, 17};
11155 const int *foo = &x[0];
11156 ++foo;
11157 }
11158 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11159 typedef const int *iptr;
11160 iptr p = 0;
11161 ++p;
11162 }
11163 { /* AIX XL C 1.02.0.0 rejects this saying
11164 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11165 struct s { int j; const int *ap[3]; };
11166 struct s *b; b->j = 5;
11167 }
11168 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11169 const int foo = 10;
81ecdfbb 11170 if (!foo) return 0;
a9322a30 11171 }
81ecdfbb 11172 return !cs[0] && !zero.x;
a9322a30
TT
11173#endif
11174
11175 ;
11176 return 0;
11177}
bec39cab 11178_ACEOF
81ecdfbb 11179if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 11180 ac_cv_c_const=yes
5ee754fc 11181else
81ecdfbb 11182 ac_cv_c_const=no
5ee754fc 11183fi
81ecdfbb 11184rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 11185fi
81ecdfbb
RW
11186{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11187$as_echo "$ac_cv_c_const" >&6; }
a9322a30 11188if test $ac_cv_c_const = no; then
bec39cab 11189
81ecdfbb 11190$as_echo "#define const /**/" >>confdefs.h
bec39cab 11191
5ee754fc 11192fi
bec39cab 11193
81ecdfbb
RW
11194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
11195$as_echo_n "checking for inline... " >&6; }
11196if test "${ac_cv_c_inline+set}" = set; then :
11197 $as_echo_n "(cached) " >&6
bec39cab 11198else
a9322a30
TT
11199 ac_cv_c_inline=no
11200for ac_kw in inline __inline__ __inline; do
81ecdfbb 11201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11202/* end confdefs.h. */
a9322a30
TT
11203#ifndef __cplusplus
11204typedef int foo_t;
11205static $ac_kw foo_t static_foo () {return 0; }
11206$ac_kw foo_t foo () {return 0; }
11207#endif
11208
bec39cab 11209_ACEOF
81ecdfbb
RW
11210if ac_fn_c_try_compile "$LINENO"; then :
11211 ac_cv_c_inline=$ac_kw
bec39cab 11212fi
81ecdfbb
RW
11213rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11214 test "$ac_cv_c_inline" != no && break
a9322a30 11215done
bec39cab 11216
5ee754fc 11217fi
81ecdfbb
RW
11218{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
11219$as_echo "$ac_cv_c_inline" >&6; }
5ee754fc 11220
a9322a30
TT
11221case $ac_cv_c_inline in
11222 inline | yes) ;;
11223 *)
11224 case $ac_cv_c_inline in
11225 no) ac_val=;;
11226 *) ac_val=$ac_cv_c_inline;;
11227 esac
11228 cat >>confdefs.h <<_ACEOF
11229#ifndef __cplusplus
11230#define inline $ac_val
11231#endif
11232_ACEOF
bec39cab
AC
11233 ;;
11234esac
bec39cab 11235
81ecdfbb
RW
11236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
11237$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
11238if test "${ac_cv_c_bigendian+set}" = set; then :
11239 $as_echo_n "(cached) " >&6
bec39cab 11240else
81ecdfbb
RW
11241 ac_cv_c_bigendian=unknown
11242 # See if we're dealing with a universal compiler.
11243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11244/* end confdefs.h. */
11245#ifndef __APPLE_CC__
11246 not a universal capable compiler
11247 #endif
11248 typedef int dummy;
11249
11250_ACEOF
11251if ac_fn_c_try_compile "$LINENO"; then :
11252
11253 # Check for potential -arch flags. It is not universal unless
11254 # there are at least two -arch flags with different values.
11255 ac_arch=
11256 ac_prev=
11257 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
11258 if test -n "$ac_prev"; then
11259 case $ac_word in
11260 i?86 | x86_64 | ppc | ppc64)
11261 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
11262 ac_arch=$ac_word
11263 else
11264 ac_cv_c_bigendian=universal
11265 break
11266 fi
11267 ;;
11268 esac
11269 ac_prev=
11270 elif test "x$ac_word" = "x-arch"; then
11271 ac_prev=arch
11272 fi
11273 done
11274fi
11275rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11276 if test $ac_cv_c_bigendian = unknown; then
11277 # See if sys/param.h defines the BYTE_ORDER macro.
11278 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11279/* end confdefs.h. */
a9322a30 11280#include <sys/types.h>
81ecdfbb 11281 #include <sys/param.h>
a9322a30
TT
11282
11283int
11284main ()
11285{
81ecdfbb
RW
11286#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
11287 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
11288 && LITTLE_ENDIAN)
11289 bogus endian macros
11290 #endif
a9322a30
TT
11291
11292 ;
11293 return 0;
11294}
bec39cab 11295_ACEOF
81ecdfbb 11296if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 11297 # It does; now see whether it defined to BIG_ENDIAN or not.
81ecdfbb 11298 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11299/* end confdefs.h. */
a9322a30 11300#include <sys/types.h>
81ecdfbb 11301 #include <sys/param.h>
a9322a30
TT
11302
11303int
11304main ()
11305{
11306#if BYTE_ORDER != BIG_ENDIAN
81ecdfbb
RW
11307 not big endian
11308 #endif
a9322a30
TT
11309
11310 ;
11311 return 0;
11312}
bec39cab 11313_ACEOF
81ecdfbb 11314if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 11315 ac_cv_c_bigendian=yes
5ee754fc 11316else
81ecdfbb 11317 ac_cv_c_bigendian=no
5ee754fc 11318fi
81ecdfbb
RW
11319rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11320fi
11321rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11322 fi
11323 if test $ac_cv_c_bigendian = unknown; then
11324 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
11325 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11326/* end confdefs.h. */
11327#include <limits.h>
bec39cab 11328
81ecdfbb
RW
11329int
11330main ()
11331{
11332#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
11333 bogus endian macros
11334 #endif
11335
11336 ;
11337 return 0;
11338}
7eb368b3 11339_ACEOF
81ecdfbb
RW
11340if ac_fn_c_try_compile "$LINENO"; then :
11341 # It does; now see whether it defined to _BIG_ENDIAN or not.
11342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7eb368b3 11343/* end confdefs.h. */
81ecdfbb
RW
11344#include <limits.h>
11345
7eb368b3
NR
11346int
11347main ()
11348{
81ecdfbb
RW
11349#ifndef _BIG_ENDIAN
11350 not big endian
11351 #endif
11352
7eb368b3
NR
11353 ;
11354 return 0;
11355}
11356_ACEOF
81ecdfbb 11357if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 11358 ac_cv_c_bigendian=yes
81ecdfbb
RW
11359else
11360 ac_cv_c_bigendian=no
a9322a30 11361fi
81ecdfbb 11362rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30 11363fi
81ecdfbb
RW
11364rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11365 fi
11366 if test $ac_cv_c_bigendian = unknown; then
11367 # Compile a test program.
11368 if test "$cross_compiling" = yes; then :
11369 # Try to guess by grepping values from an object file.
11370 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11371/* end confdefs.h. */
11372short int ascii_mm[] =
11373 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
11374 short int ascii_ii[] =
11375 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
11376 int use_ascii (int i) {
11377 return ascii_mm[i] + ascii_ii[i];
11378 }
11379 short int ebcdic_ii[] =
11380 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
11381 short int ebcdic_mm[] =
11382 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
11383 int use_ebcdic (int i) {
11384 return ebcdic_mm[i] + ebcdic_ii[i];
11385 }
11386 extern int foo;
7eb368b3 11387
81ecdfbb
RW
11388int
11389main ()
11390{
11391return use_ascii (foo) == use_ebcdic (foo);
11392 ;
11393 return 0;
11394}
11395_ACEOF
11396if ac_fn_c_try_compile "$LINENO"; then :
11397 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
11398 ac_cv_c_bigendian=yes
11399 fi
11400 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
11401 if test "$ac_cv_c_bigendian" = unknown; then
11402 ac_cv_c_bigendian=no
11403 else
11404 # finding both strings is unlikely to happen, but who knows?
11405 ac_cv_c_bigendian=unknown
11406 fi
11407 fi
7eb368b3 11408fi
81ecdfbb 11409rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 11410else
81ecdfbb 11411 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11412/* end confdefs.h. */
81ecdfbb 11413$ac_includes_default
d3ea6809
MM
11414int
11415main ()
11416{
81ecdfbb
RW
11417
11418 /* Are we little or big endian? From Harbison&Steele. */
11419 union
11420 {
11421 long int l;
11422 char c[sizeof (long int)];
11423 } u;
11424 u.l = 1;
11425 return u.c[sizeof (long int) - 1] == 1;
11426
11427 ;
11428 return 0;
d3ea6809
MM
11429}
11430_ACEOF
81ecdfbb 11431if ac_fn_c_try_run "$LINENO"; then :
a9322a30 11432 ac_cv_c_bigendian=no
d3ea6809 11433else
81ecdfbb 11434 ac_cv_c_bigendian=yes
d3ea6809 11435fi
81ecdfbb
RW
11436rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11437 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 11438fi
a9322a30 11439
81ecdfbb
RW
11440 fi
11441fi
11442{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
11443$as_echo "$ac_cv_c_bigendian" >&6; }
11444 case $ac_cv_c_bigendian in #(
11445 yes)
11446 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
11447;; #(
11448 no)
11449 ;; #(
11450 universal)
11451
11452$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
11453
11454 ;; #(
11455 *)
11456 as_fn_error "unknown endianness
11457 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
11458 esac
d3ea6809
MM
11459
11460
a9322a30
TT
11461# ------------------------------ #
11462# Checks for library functions. #
11463# ------------------------------ #
d3ea6809 11464
a9322a30 11465for ac_header in stdlib.h unistd.h
81ecdfbb
RW
11466do :
11467 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11468ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
11469eval as_val=\$$as_ac_Header
11470 if test "x$as_val" = x""yes; then :
bec39cab 11471 cat >>confdefs.h <<_ACEOF
81ecdfbb 11472#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 11473_ACEOF
b757528f 11474
b757528f 11475fi
bec39cab 11476
a9322a30 11477done
a3828db0 11478
a9322a30 11479for ac_func in getpagesize
81ecdfbb
RW
11480do :
11481 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
11482if test "x$ac_cv_func_getpagesize" = x""yes; then :
bec39cab 11483 cat >>confdefs.h <<_ACEOF
81ecdfbb 11484#define HAVE_GETPAGESIZE 1
bec39cab 11485_ACEOF
bcb3dc3d 11486
bcb3dc3d
MK
11487fi
11488done
11489
81ecdfbb
RW
11490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
11491$as_echo_n "checking for working mmap... " >&6; }
11492if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then :
11493 $as_echo_n "(cached) " >&6
a9322a30 11494else
81ecdfbb 11495 if test "$cross_compiling" = yes; then :
a9322a30 11496 ac_cv_func_mmap_fixed_mapped=no
bec39cab 11497else
81ecdfbb 11498 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11499/* end confdefs.h. */
a9322a30
TT
11500$ac_includes_default
11501/* malloc might have been renamed as rpl_malloc. */
11502#undef malloc
bec39cab 11503
a9322a30
TT
11504/* Thanks to Mike Haertel and Jim Avera for this test.
11505 Here is a matrix of mmap possibilities:
11506 mmap private not fixed
11507 mmap private fixed at somewhere currently unmapped
11508 mmap private fixed at somewhere already mapped
11509 mmap shared not fixed
11510 mmap shared fixed at somewhere currently unmapped
11511 mmap shared fixed at somewhere already mapped
11512 For private mappings, we should verify that changes cannot be read()
11513 back from the file, nor mmap's back from the file at a different
11514 address. (There have been systems where private was not correctly
11515 implemented like the infamous i386 svr4.0, and systems where the
11516 VM page cache was not coherent with the file system buffer cache
11517 like early versions of FreeBSD and possibly contemporary NetBSD.)
11518 For shared mappings, we should conversely verify that changes get
11519 propagated back to all the places they're supposed to be.
bec39cab 11520
a9322a30
TT
11521 Grep wants private fixed already mapped.
11522 The main things grep needs to know about mmap are:
11523 * does it exist and is it safe to write into the mmap'd area
11524 * how to use it (BSD variants) */
8b9cf735 11525
a9322a30
TT
11526#include <fcntl.h>
11527#include <sys/mman.h>
8b9cf735 11528
81ecdfbb 11529#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
a9322a30 11530char *malloc ();
a3828db0
MK
11531#endif
11532
a9322a30 11533/* This mess was copied from the GNU getpagesize.h. */
81ecdfbb 11534#ifndef HAVE_GETPAGESIZE
a9322a30 11535/* Assume that all systems that can run configure have sys/param.h. */
81ecdfbb 11536# ifndef HAVE_SYS_PARAM_H
a9322a30
TT
11537# define HAVE_SYS_PARAM_H 1
11538# endif
11539
11540# ifdef _SC_PAGESIZE
11541# define getpagesize() sysconf(_SC_PAGESIZE)
11542# else /* no _SC_PAGESIZE */
81ecdfbb 11543# ifdef HAVE_SYS_PARAM_H
a9322a30
TT
11544# include <sys/param.h>
11545# ifdef EXEC_PAGESIZE
11546# define getpagesize() EXEC_PAGESIZE
11547# else /* no EXEC_PAGESIZE */
11548# ifdef NBPG
11549# define getpagesize() NBPG * CLSIZE
11550# ifndef CLSIZE
11551# define CLSIZE 1
11552# endif /* no CLSIZE */
11553# else /* no NBPG */
11554# ifdef NBPC
11555# define getpagesize() NBPC
11556# else /* no NBPC */
11557# ifdef PAGESIZE
11558# define getpagesize() PAGESIZE
11559# endif /* PAGESIZE */
11560# endif /* no NBPC */
11561# endif /* no NBPG */
11562# endif /* no EXEC_PAGESIZE */
11563# else /* no HAVE_SYS_PARAM_H */
11564# define getpagesize() 8192 /* punt totally */
11565# endif /* no HAVE_SYS_PARAM_H */
11566# endif /* no _SC_PAGESIZE */
11567
11568#endif /* no HAVE_GETPAGESIZE */
11569
bec39cab
AC
11570int
11571main ()
11572{
a9322a30
TT
11573 char *data, *data2, *data3;
11574 int i, pagesize;
11575 int fd;
11576
11577 pagesize = getpagesize ();
11578
11579 /* First, make a file with some known garbage in it. */
11580 data = (char *) malloc (pagesize);
11581 if (!data)
81ecdfbb 11582 return 1;
a9322a30
TT
11583 for (i = 0; i < pagesize; ++i)
11584 *(data + i) = rand ();
11585 umask (0);
11586 fd = creat ("conftest.mmap", 0600);
11587 if (fd < 0)
81ecdfbb 11588 return 1;
a9322a30 11589 if (write (fd, data, pagesize) != pagesize)
81ecdfbb 11590 return 1;
a9322a30
TT
11591 close (fd);
11592
11593 /* Next, try to mmap the file at a fixed address which already has
11594 something else allocated at it. If we can, also make sure that
11595 we see the same garbage. */
11596 fd = open ("conftest.mmap", O_RDWR);
11597 if (fd < 0)
81ecdfbb 11598 return 1;
a9322a30
TT
11599 data2 = (char *) malloc (2 * pagesize);
11600 if (!data2)
81ecdfbb
RW
11601 return 1;
11602 data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
a9322a30
TT
11603 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
11604 MAP_PRIVATE | MAP_FIXED, fd, 0L))
81ecdfbb 11605 return 1;
a9322a30
TT
11606 for (i = 0; i < pagesize; ++i)
11607 if (*(data + i) != *(data2 + i))
81ecdfbb 11608 return 1;
a9322a30
TT
11609
11610 /* Finally, make sure that changes to the mapped area do not
11611 percolate back to the file as seen by read(). (This is a bug on
11612 some variants of i386 svr4.0.) */
11613 for (i = 0; i < pagesize; ++i)
11614 *(data2 + i) = *(data2 + i) + 1;
11615 data3 = (char *) malloc (pagesize);
11616 if (!data3)
81ecdfbb 11617 return 1;
a9322a30 11618 if (read (fd, data3, pagesize) != pagesize)
81ecdfbb 11619 return 1;
a9322a30
TT
11620 for (i = 0; i < pagesize; ++i)
11621 if (*(data + i) != *(data3 + i))
81ecdfbb 11622 return 1;
a9322a30 11623 close (fd);
81ecdfbb 11624 return 0;
bec39cab
AC
11625}
11626_ACEOF
81ecdfbb 11627if ac_fn_c_try_run "$LINENO"; then :
a9322a30 11628 ac_cv_func_mmap_fixed_mapped=yes
086ec9eb 11629else
81ecdfbb 11630 ac_cv_func_mmap_fixed_mapped=no
a3828db0 11631fi
81ecdfbb
RW
11632rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11633 conftest.$ac_objext conftest.beam conftest.$ac_ext
a3828db0 11634fi
81ecdfbb 11635
a9322a30 11636fi
81ecdfbb
RW
11637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
11638$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
a9322a30
TT
11639if test $ac_cv_func_mmap_fixed_mapped = yes; then
11640
81ecdfbb 11641$as_echo "#define HAVE_MMAP 1" >>confdefs.h
a3828db0 11642
086ec9eb 11643fi
a9322a30 11644rm -f conftest.mmap
a3828db0 11645
81ecdfbb
RW
11646ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
11647if test "x$ac_cv_type_pid_t" = x""yes; then :
bec39cab 11648
a9322a30
TT
11649else
11650
11651cat >>confdefs.h <<_ACEOF
11652#define pid_t int
bec39cab 11653_ACEOF
086ec9eb
MK
11654
11655fi
11656
81ecdfbb
RW
11657for ac_header in vfork.h
11658do :
11659 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
11660if test "x$ac_cv_header_vfork_h" = x""yes; then :
a3828db0 11661 cat >>confdefs.h <<_ACEOF
81ecdfbb 11662#define HAVE_VFORK_H 1
bec39cab 11663_ACEOF
c906108c
SS
11664
11665fi
a9322a30 11666
a3828db0 11667done
c906108c 11668
a9322a30 11669for ac_func in fork vfork
81ecdfbb
RW
11670do :
11671 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11672ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11673eval as_val=\$$as_ac_var
11674 if test "x$as_val" = x""yes; then :
a3828db0 11675 cat >>confdefs.h <<_ACEOF
81ecdfbb 11676#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 11677_ACEOF
b83266a0 11678
97bf5e38 11679fi
a3828db0 11680done
b83266a0 11681
a9322a30 11682if test "x$ac_cv_func_fork" = xyes; then
81ecdfbb
RW
11683 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
11684$as_echo_n "checking for working fork... " >&6; }
11685if test "${ac_cv_func_fork_works+set}" = set; then :
11686 $as_echo_n "(cached) " >&6
a9322a30 11687else
81ecdfbb 11688 if test "$cross_compiling" = yes; then :
a9322a30
TT
11689 ac_cv_func_fork_works=cross
11690else
81ecdfbb
RW
11691 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11692/* end confdefs.h. */
11693$ac_includes_default
11694int
11695main ()
11696{
11697
11698 /* By Ruediger Kuhlmann. */
11699 return fork () < 0;
11700
11701 ;
11702 return 0;
11703}
a9322a30 11704_ACEOF
81ecdfbb 11705if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
11706 ac_cv_func_fork_works=yes
11707else
81ecdfbb 11708 ac_cv_func_fork_works=no
a9322a30 11709fi
81ecdfbb
RW
11710rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11711 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 11712fi
81ecdfbb 11713
a9322a30 11714fi
81ecdfbb
RW
11715{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
11716$as_echo "$ac_cv_func_fork_works" >&6; }
a9322a30
TT
11717
11718else
11719 ac_cv_func_fork_works=$ac_cv_func_fork
11720fi
11721if test "x$ac_cv_func_fork_works" = xcross; then
11722 case $host in
11723 *-*-amigaos* | *-*-msdosdjgpp*)
11724 # Override, as these systems have only a dummy fork() stub
11725 ac_cv_func_fork_works=no
11726 ;;
11727 *)
11728 ac_cv_func_fork_works=yes
11729 ;;
11730 esac
81ecdfbb
RW
11731 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
11732$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
a9322a30
TT
11733fi
11734ac_cv_func_vfork_works=$ac_cv_func_vfork
11735if test "x$ac_cv_func_vfork" = xyes; then
81ecdfbb
RW
11736 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
11737$as_echo_n "checking for working vfork... " >&6; }
11738if test "${ac_cv_func_vfork_works+set}" = set; then :
11739 $as_echo_n "(cached) " >&6
a9322a30 11740else
81ecdfbb 11741 if test "$cross_compiling" = yes; then :
a9322a30
TT
11742 ac_cv_func_vfork_works=cross
11743else
81ecdfbb 11744 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30
TT
11745/* end confdefs.h. */
11746/* Thanks to Paul Eggert for this test. */
81ecdfbb 11747$ac_includes_default
a9322a30 11748#include <sys/wait.h>
81ecdfbb 11749#ifdef HAVE_VFORK_H
a9322a30
TT
11750# include <vfork.h>
11751#endif
11752/* On some sparc systems, changes by the child to local and incoming
11753 argument registers are propagated back to the parent. The compiler
11754 is told about this with #include <vfork.h>, but some compilers
11755 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
11756 static variable whose address is put into a register that is
11757 clobbered by the vfork. */
11758static void
11759#ifdef __cplusplus
11760sparc_address_test (int arg)
11761# else
11762sparc_address_test (arg) int arg;
11763#endif
11764{
11765 static pid_t child;
11766 if (!child) {
11767 child = vfork ();
11768 if (child < 0) {
11769 perror ("vfork");
11770 _exit(2);
11771 }
11772 if (!child) {
11773 arg = getpid();
11774 write(-1, "", 0);
11775 _exit (arg);
11776 }
11777 }
11778}
11779
11780int
11781main ()
11782{
11783 pid_t parent = getpid ();
11784 pid_t child;
11785
11786 sparc_address_test (0);
11787
11788 child = vfork ();
11789
11790 if (child == 0) {
11791 /* Here is another test for sparc vfork register problems. This
11792 test uses lots of local variables, at least as many local
11793 variables as main has allocated so far including compiler
11794 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
11795 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
11796 reuse the register of parent for one of the local variables,
11797 since it will think that parent can't possibly be used any more
11798 in this routine. Assigning to the local variable will thus
11799 munge parent in the parent process. */
11800 pid_t
11801 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
11802 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
11803 /* Convince the compiler that p..p7 are live; otherwise, it might
11804 use the same hardware register for all 8 local variables. */
11805 if (p != p1 || p != p2 || p != p3 || p != p4
11806 || p != p5 || p != p6 || p != p7)
11807 _exit(1);
11808
11809 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
11810 from child file descriptors. If the child closes a descriptor
11811 before it execs or exits, this munges the parent's descriptor
11812 as well. Test for this by closing stdout in the child. */
11813 _exit(close(fileno(stdout)) != 0);
11814 } else {
11815 int status;
11816 struct stat st;
11817
11818 while (wait(&status) != child)
11819 ;
81ecdfbb 11820 return (
a9322a30
TT
11821 /* Was there some problem with vforking? */
11822 child < 0
11823
11824 /* Did the child fail? (This shouldn't happen.) */
11825 || status
11826
11827 /* Did the vfork/compiler bug occur? */
11828 || parent != getpid()
11829
11830 /* Did the file descriptor bug occur? */
11831 || fstat(fileno(stdout), &st) != 0
11832 );
11833 }
11834}
11835_ACEOF
81ecdfbb 11836if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
11837 ac_cv_func_vfork_works=yes
11838else
81ecdfbb 11839 ac_cv_func_vfork_works=no
a9322a30 11840fi
81ecdfbb
RW
11841rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11842 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 11843fi
81ecdfbb 11844
a9322a30 11845fi
81ecdfbb
RW
11846{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
11847$as_echo "$ac_cv_func_vfork_works" >&6; }
a9322a30
TT
11848
11849fi;
11850if test "x$ac_cv_func_fork_works" = xcross; then
11851 ac_cv_func_vfork_works=$ac_cv_func_vfork
81ecdfbb
RW
11852 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
11853$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
a9322a30
TT
11854fi
11855
11856if test "x$ac_cv_func_vfork_works" = xyes; then
11857
81ecdfbb 11858$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
a9322a30
TT
11859
11860else
11861
81ecdfbb 11862$as_echo "#define vfork fork" >>confdefs.h
a9322a30
TT
11863
11864fi
11865if test "x$ac_cv_func_fork_works" = xyes; then
11866
81ecdfbb 11867$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
a9322a30
TT
11868
11869fi
11870
cdf43629 11871for ac_func in getauxval getrusage getuid getgid \
bdca27a2 11872 pipe poll pread pread64 pwrite resize_term \
7313baad 11873 sbrk setpgid setpgrp setsid \
9467110b 11874 sigaction sigprocmask sigsetmask socketpair \
110ed339 11875 ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
3332aaf2 11876 setrlimit getrlimit posix_madvise waitpid \
4b8b5e72 11877 ptrace64 sigaltstack mkdtemp setns
81ecdfbb
RW
11878do :
11879 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11880ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11881eval as_val=\$$as_ac_var
11882 if test "x$as_val" = x""yes; then :
6c7a06a3 11883 cat >>confdefs.h <<_ACEOF
81ecdfbb 11884#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6c7a06a3
TT
11885_ACEOF
11886
11887fi
11888done
11889
11890
81ecdfbb
RW
11891 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
11892$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
11893if test "${am_cv_langinfo_codeset+set}" = set; then :
11894 $as_echo_n "(cached) " >&6
6c7a06a3 11895else
81ecdfbb 11896 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
11897/* end confdefs.h. */
11898#include <langinfo.h>
11899int
11900main ()
11901{
11902char* cs = nl_langinfo(CODESET);
bec39cab
AC
11903 ;
11904 return 0;
11905}
11906_ACEOF
81ecdfbb 11907if ac_fn_c_try_link "$LINENO"; then :
6c7a06a3 11908 am_cv_langinfo_codeset=yes
a4db0f07 11909else
81ecdfbb 11910 am_cv_langinfo_codeset=no
a4db0f07 11911fi
81ecdfbb
RW
11912rm -f core conftest.err conftest.$ac_objext \
11913 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 11914
a4db0f07 11915fi
81ecdfbb
RW
11916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
11917$as_echo "$am_cv_langinfo_codeset" >&6; }
6c7a06a3
TT
11918 if test $am_cv_langinfo_codeset = yes; then
11919
81ecdfbb 11920$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
a4db0f07 11921
6c7a06a3 11922 fi
c906108c 11923
06825bd1 11924
3266f10b
TT
11925 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
11926$as_echo_n "checking for ANSI C header files... " >&6; }
11927if test "${ac_cv_header_stdc+set}" = set; then :
11928 $as_echo_n "(cached) " >&6
11929else
11930 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11931/* end confdefs.h. */
11932#include <stdlib.h>
11933#include <stdarg.h>
11934#include <string.h>
11935#include <float.h>
11936
11937int
11938main ()
11939{
11940
11941 ;
11942 return 0;
11943}
11944_ACEOF
11945if ac_fn_c_try_compile "$LINENO"; then :
11946 ac_cv_header_stdc=yes
11947else
11948 ac_cv_header_stdc=no
11949fi
11950rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11951
11952if test $ac_cv_header_stdc = yes; then
11953 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11955/* end confdefs.h. */
11956#include <string.h>
11957
11958_ACEOF
11959if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11960 $EGREP "memchr" >/dev/null 2>&1; then :
11961
11962else
11963 ac_cv_header_stdc=no
11964fi
11965rm -f conftest*
11966
11967fi
11968
11969if test $ac_cv_header_stdc = yes; then
11970 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11971 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11972/* end confdefs.h. */
11973#include <stdlib.h>
11974
11975_ACEOF
11976if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11977 $EGREP "free" >/dev/null 2>&1; then :
11978
11979else
11980 ac_cv_header_stdc=no
11981fi
11982rm -f conftest*
11983
11984fi
11985
11986if test $ac_cv_header_stdc = yes; then
11987 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11988 if test "$cross_compiling" = yes; then :
11989 :
11990else
11991 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11992/* end confdefs.h. */
11993#include <ctype.h>
11994#include <stdlib.h>
11995#if ((' ' & 0x0FF) == 0x020)
11996# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11997# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11998#else
11999# define ISLOWER(c) \
12000 (('a' <= (c) && (c) <= 'i') \
12001 || ('j' <= (c) && (c) <= 'r') \
12002 || ('s' <= (c) && (c) <= 'z'))
12003# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12004#endif
12005
12006#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12007int
12008main ()
12009{
12010 int i;
12011 for (i = 0; i < 256; i++)
12012 if (XOR (islower (i), ISLOWER (i))
12013 || toupper (i) != TOUPPER (i))
12014 return 2;
12015 return 0;
12016}
12017_ACEOF
12018if ac_fn_c_try_run "$LINENO"; then :
12019
12020else
12021 ac_cv_header_stdc=no
12022fi
12023rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12024 conftest.$ac_objext conftest.beam conftest.$ac_ext
12025fi
12026
12027fi
12028fi
12029{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
12030$as_echo "$ac_cv_header_stdc" >&6; }
12031if test $ac_cv_header_stdc = yes; then
12032
12033$as_echo "#define STDC_HEADERS 1" >>confdefs.h
12034
3266f10b
TT
12035fi
12036
12037 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
12038# for constant arguments. Useless!
12039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
12040$as_echo_n "checking for working alloca.h... " >&6; }
12041if test "${ac_cv_working_alloca_h+set}" = set; then :
12042 $as_echo_n "(cached) " >&6
12043else
12044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12045/* end confdefs.h. */
12046#include <alloca.h>
12047int
12048main ()
12049{
12050char *p = (char *) alloca (2 * sizeof (int));
12051 if (p) return 0;
12052 ;
12053 return 0;
12054}
12055_ACEOF
12056if ac_fn_c_try_link "$LINENO"; then :
12057 ac_cv_working_alloca_h=yes
12058else
12059 ac_cv_working_alloca_h=no
12060fi
12061rm -f core conftest.err conftest.$ac_objext \
12062 conftest$ac_exeext conftest.$ac_ext
12063fi
12064{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
12065$as_echo "$ac_cv_working_alloca_h" >&6; }
12066if test $ac_cv_working_alloca_h = yes; then
12067
12068$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
12069
12070fi
12071
12072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
12073$as_echo_n "checking for alloca... " >&6; }
12074if test "${ac_cv_func_alloca_works+set}" = set; then :
12075 $as_echo_n "(cached) " >&6
12076else
12077 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12078/* end confdefs.h. */
12079#ifdef __GNUC__
12080# define alloca __builtin_alloca
12081#else
12082# ifdef _MSC_VER
12083# include <malloc.h>
12084# define alloca _alloca
12085# else
12086# ifdef HAVE_ALLOCA_H
12087# include <alloca.h>
12088# else
12089# ifdef _AIX
12090 #pragma alloca
12091# else
12092# ifndef alloca /* predefined by HP cc +Olibcalls */
12093char *alloca ();
12094# endif
12095# endif
12096# endif
12097# endif
12098#endif
12099
12100int
12101main ()
12102{
12103char *p = (char *) alloca (1);
12104 if (p) return 0;
12105 ;
12106 return 0;
12107}
12108_ACEOF
12109if ac_fn_c_try_link "$LINENO"; then :
12110 ac_cv_func_alloca_works=yes
12111else
12112 ac_cv_func_alloca_works=no
12113fi
12114rm -f core conftest.err conftest.$ac_objext \
12115 conftest$ac_exeext conftest.$ac_ext
12116fi
12117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
12118$as_echo "$ac_cv_func_alloca_works" >&6; }
12119
12120if test $ac_cv_func_alloca_works = yes; then
12121
12122$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
12123
12124else
12125 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
12126# that cause trouble. Some versions do not even contain alloca or
12127# contain a buggy version. If you still want to use their alloca,
12128# use ar to extract alloca.o from them instead of compiling alloca.c.
12129
12130ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
12131
12132$as_echo "#define C_ALLOCA 1" >>confdefs.h
12133
12134
12135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
12136$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
12137if test "${ac_cv_os_cray+set}" = set; then :
12138 $as_echo_n "(cached) " >&6
12139else
12140 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12141/* end confdefs.h. */
12142#if defined CRAY && ! defined CRAY2
12143webecray
12144#else
12145wenotbecray
12146#endif
12147
12148_ACEOF
12149if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12150 $EGREP "webecray" >/dev/null 2>&1; then :
12151 ac_cv_os_cray=yes
12152else
12153 ac_cv_os_cray=no
12154fi
12155rm -f conftest*
12156
12157fi
12158{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
12159$as_echo "$ac_cv_os_cray" >&6; }
12160if test $ac_cv_os_cray = yes; then
12161 for ac_func in _getb67 GETB67 getb67; do
12162 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12163ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12164eval as_val=\$$as_ac_var
12165 if test "x$as_val" = x""yes; then :
12166
12167cat >>confdefs.h <<_ACEOF
12168#define CRAY_STACKSEG_END $ac_func
12169_ACEOF
12170
12171 break
12172fi
12173
12174 done
12175fi
12176
12177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
12178$as_echo_n "checking stack direction for C alloca... " >&6; }
12179if test "${ac_cv_c_stack_direction+set}" = set; then :
12180 $as_echo_n "(cached) " >&6
12181else
12182 if test "$cross_compiling" = yes; then :
12183 ac_cv_c_stack_direction=0
12184else
12185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12186/* end confdefs.h. */
12187$ac_includes_default
12188int
12189find_stack_direction ()
12190{
12191 static char *addr = 0;
12192 auto char dummy;
12193 if (addr == 0)
12194 {
12195 addr = &dummy;
12196 return find_stack_direction ();
12197 }
12198 else
12199 return (&dummy > addr) ? 1 : -1;
12200}
12201
12202int
12203main ()
12204{
12205 return find_stack_direction () < 0;
12206}
12207_ACEOF
12208if ac_fn_c_try_run "$LINENO"; then :
12209 ac_cv_c_stack_direction=1
12210else
12211 ac_cv_c_stack_direction=-1
12212fi
12213rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12214 conftest.$ac_objext conftest.beam conftest.$ac_ext
12215fi
12216
12217fi
12218{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
12219$as_echo "$ac_cv_c_stack_direction" >&6; }
12220cat >>confdefs.h <<_ACEOF
12221#define STACK_DIRECTION $ac_cv_c_stack_direction
12222_ACEOF
12223
12224
12225fi
12226
12227
12228
12229 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
12230$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
12231if test "${am_cv_langinfo_codeset+set}" = set; then :
12232 $as_echo_n "(cached) " >&6
12233else
12234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12235/* end confdefs.h. */
12236#include <langinfo.h>
12237int
12238main ()
12239{
12240char* cs = nl_langinfo(CODESET);
12241 ;
12242 return 0;
12243}
12244_ACEOF
12245if ac_fn_c_try_link "$LINENO"; then :
12246 am_cv_langinfo_codeset=yes
12247else
12248 am_cv_langinfo_codeset=no
12249fi
12250rm -f core conftest.err conftest.$ac_objext \
12251 conftest$ac_exeext conftest.$ac_ext
12252
12253fi
12254{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
12255$as_echo "$am_cv_langinfo_codeset" >&6; }
12256 if test $am_cv_langinfo_codeset = yes; then
12257
12258$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
12259
12260 fi
12261
12262
a3d08894 12263 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
12264do :
12265 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12266ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12267eval as_val=\$$as_ac_Header
12268 if test "x$as_val" = x""yes; then :
12269 cat >>confdefs.h <<_ACEOF
12270#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12271_ACEOF
12272
12273fi
12274
12275done
12276
12277
12278 for ac_func in fdwalk getrlimit pipe pipe2 socketpair
12279do :
12280 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12281ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12282eval as_val=\$$as_ac_var
12283 if test "x$as_val" = x""yes; then :
12284 cat >>confdefs.h <<_ACEOF
12285#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12286_ACEOF
12287
12288fi
12289done
12290
12291
12292 ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default"
12293if test "x$ac_cv_have_decl_strerror" = x""yes; then :
12294 ac_have_decl=1
12295else
12296 ac_have_decl=0
12297fi
12298
12299cat >>confdefs.h <<_ACEOF
12300#define HAVE_DECL_STRERROR $ac_have_decl
12301_ACEOF
12302ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
12303if test "x$ac_cv_have_decl_strstr" = x""yes; then :
12304 ac_have_decl=1
12305else
12306 ac_have_decl=0
12307fi
12308
12309cat >>confdefs.h <<_ACEOF
12310#define HAVE_DECL_STRSTR $ac_have_decl
12311_ACEOF
12312
12313
e9bcb658
GB
12314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
12315$as_echo_n "checking for sigsetjmp... " >&6; }
12316if test "${gdb_cv_func_sigsetjmp+set}" = set; then :
12317 $as_echo_n "(cached) " >&6
12318else
12319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12320/* end confdefs.h. */
12321
12322#include <setjmp.h>
12323
12324int
12325main ()
12326{
12327sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
12328 ;
12329 return 0;
12330}
12331_ACEOF
12332if ac_fn_c_try_compile "$LINENO"; then :
12333 gdb_cv_func_sigsetjmp=yes
12334else
12335 gdb_cv_func_sigsetjmp=no
12336fi
12337rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12338fi
12339{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
12340$as_echo "$gdb_cv_func_sigsetjmp" >&6; }
12341if test $gdb_cv_func_sigsetjmp = yes; then
12342
12343$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
12344
12345fi
12346
3266f10b 12347
54019719
PA
12348# Check the return and argument types of ptrace.
12349
12350
12351
12352for ac_header in sys/ptrace.h ptrace.h
12353do :
12354 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12355ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12356eval as_val=\$$as_ac_Header
12357 if test "x$as_val" = x""yes; then :
12358 cat >>confdefs.h <<_ACEOF
12359#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12360_ACEOF
12361
12362fi
12363
12364done
12365
12366
12367# Needs to be tested in C++ mode, to detect whether we need to cast
12368# the first argument to enum __ptrace_request.
12369if test "$enable_build_with_cxx" = "yes"; then
12370 ac_ext=cpp
12371ac_cpp='$CXXCPP $CPPFLAGS'
12372ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12373ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12374ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
12375
12376fi
12377
a3828db0 12378gdb_ptrace_headers='
4ff70b84 12379#include <sys/types.h>
a3828db0
MK
12380#if HAVE_SYS_PTRACE_H
12381# include <sys/ptrace.h>
12382#endif
12383#if HAVE_UNISTD_H
12384# include <unistd.h>
12385#endif
12386'
12387# There is no point in checking if we don't have a prototype.
54019719 12388ac_fn_cxx_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers
81ecdfbb
RW
12389"
12390if test "x$ac_cv_have_decl_ptrace" = x""yes; then :
12391 ac_have_decl=1
06825bd1 12392else
81ecdfbb 12393 ac_have_decl=0
06825bd1 12394fi
06825bd1 12395
a3828db0 12396cat >>confdefs.h <<_ACEOF
81ecdfbb 12397#define HAVE_DECL_PTRACE $ac_have_decl
a3828db0 12398_ACEOF
81ecdfbb 12399if test $ac_have_decl = 1; then :
bec39cab 12400
a3828db0 12401else
a3828db0
MK
12402
12403 : ${gdb_cv_func_ptrace_ret='int'}
12404 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
12405
06825bd1
MK
12406fi
12407
064ef605
DJ
12408# Check return type. Varargs (used on GNU/Linux) conflict with the
12409# empty argument list, so check for that explicitly.
81ecdfbb
RW
12410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
12411$as_echo_n "checking return type of ptrace... " >&6; }
12412if test "${gdb_cv_func_ptrace_ret+set}" = set; then :
12413 $as_echo_n "(cached) " >&6
bec39cab 12414else
81ecdfbb 12415 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12416/* end confdefs.h. */
a3828db0 12417$gdb_ptrace_headers
bec39cab
AC
12418int
12419main ()
12420{
064ef605
DJ
12421extern long ptrace (enum __ptrace_request, ...);
12422 ;
12423 return 0;
12424}
12425_ACEOF
54019719 12426if ac_fn_cxx_try_compile "$LINENO"; then :
064ef605
DJ
12427 gdb_cv_func_ptrace_ret='long'
12428else
81ecdfbb 12429 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
12430/* end confdefs.h. */
12431$gdb_ptrace_headers
12432int
12433main ()
12434{
a3828db0 12435extern int ptrace ();
bec39cab
AC
12436 ;
12437 return 0;
12438}
12439_ACEOF
54019719 12440if ac_fn_cxx_try_compile "$LINENO"; then :
a3828db0 12441 gdb_cv_func_ptrace_ret='int'
70f9f479 12442else
81ecdfbb 12443 gdb_cv_func_ptrace_ret='long'
70f9f479 12444fi
81ecdfbb 12445rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
70f9f479 12446fi
81ecdfbb 12447rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
064ef605 12448fi
81ecdfbb
RW
12449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
12450$as_echo "$gdb_cv_func_ptrace_ret" >&6; }
bec39cab 12451
a3828db0
MK
12452cat >>confdefs.h <<_ACEOF
12453#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
bec39cab 12454_ACEOF
70f9f479 12455
a3828db0 12456# Check argument types.
81ecdfbb
RW
12457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
12458$as_echo_n "checking types of arguments for ptrace... " >&6; }
12459if test "${gdb_cv_func_ptrace_args+set}" = set; then :
12460 $as_echo_n "(cached) " >&6
bec39cab 12461else
a3828db0 12462
81ecdfbb 12463 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
12464/* end confdefs.h. */
12465$gdb_ptrace_headers
12466int
12467main ()
12468{
12469extern long ptrace (enum __ptrace_request, ...);
12470 ;
12471 return 0;
12472}
12473_ACEOF
54019719
PA
12474if ac_fn_cxx_try_compile "$LINENO"; then :
12475 gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long'
064ef605 12476else
064ef605 12477
a3828db0
MK
12478for gdb_arg1 in 'int' 'long'; do
12479 for gdb_arg2 in 'pid_t' 'int' 'long'; do
5ed10e6e 12480 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
96d7229d 12481 for gdb_arg4 in 'int' 'long' 'void *'; do
81ecdfbb 12482 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12483/* end confdefs.h. */
a3828db0 12484$gdb_ptrace_headers
bec39cab
AC
12485int
12486main ()
12487{
a3828db0
MK
12488
12489extern $gdb_cv_func_ptrace_ret
12490 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
12491
bec39cab
AC
12492 ;
12493 return 0;
12494}
12495_ACEOF
54019719 12496if ac_fn_cxx_try_compile "$LINENO"; then :
a3828db0
MK
12497 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
12498 break 4;
5c7f2947 12499fi
81ecdfbb 12500rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0 12501 for gdb_arg5 in 'int *' 'int' 'long'; do
81ecdfbb 12502 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12503/* end confdefs.h. */
a3828db0 12504$gdb_ptrace_headers
bec39cab
AC
12505int
12506main ()
12507{
a3828db0
MK
12508
12509extern $gdb_cv_func_ptrace_ret
12510 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
12511
bec39cab
AC
12512 ;
12513 return 0;
12514}
12515_ACEOF
54019719 12516if ac_fn_cxx_try_compile "$LINENO"; then :
a3828db0
MK
12517
12518gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
12519 break 5;
78434e59 12520fi
81ecdfbb 12521rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0
MK
12522 done
12523 done
12524 done
12525 done
12526done
12527# Provide a safe default value.
12528: ${gdb_cv_func_ptrace_args='int,int,long,long'}
12529
064ef605 12530fi
81ecdfbb 12531rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
78434e59 12532fi
81ecdfbb
RW
12533{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
12534$as_echo "$gdb_cv_func_ptrace_args" >&6; }
a3828db0
MK
12535ac_save_IFS=$IFS; IFS=','
12536set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
12537IFS=$ac_save_IFS
12538shift
bec39cab 12539
54019719
PA
12540cat >>confdefs.h <<_ACEOF
12541#define PTRACE_TYPE_ARG1 $1
12542_ACEOF
12543
12544
a3828db0
MK
12545cat >>confdefs.h <<_ACEOF
12546#define PTRACE_TYPE_ARG3 $3
12547_ACEOF
12548
96d7229d
LM
12549
12550cat >>confdefs.h <<_ACEOF
12551#define PTRACE_TYPE_ARG4 $4
12552_ACEOF
12553
a3828db0
MK
12554if test -n "$5"; then
12555
12556cat >>confdefs.h <<_ACEOF
12557#define PTRACE_TYPE_ARG5 $5
bec39cab 12558_ACEOF
78434e59
MK
12559
12560fi
12561
54019719
PA
12562if test "$enable_build_with_cxx" = "yes"; then
12563 ac_ext=c
12564ac_cpp='$CPP $CPPFLAGS'
12565ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12566ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12567ac_compiler_gnu=$ac_cv_c_compiler_gnu
12568
12569fi
12570
12571
a3828db0 12572if test "$cross_compiling" = no; then
81ecdfbb
RW
12573 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
12574$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
12575if test "${ac_cv_func_setpgrp_void+set}" = set; then :
12576 $as_echo_n "(cached) " >&6
a3828db0 12577else
81ecdfbb
RW
12578 if test "$cross_compiling" = yes; then :
12579 as_fn_error "cannot check setpgrp when cross compiling" "$LINENO" 5
bec39cab 12580else
81ecdfbb 12581 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12582/* end confdefs.h. */
81ecdfbb 12583$ac_includes_default
bec39cab
AC
12584int
12585main ()
12586{
a3828db0
MK
12587/* If this system has a BSD-style setpgrp which takes arguments,
12588 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
12589 exit successfully. */
81ecdfbb 12590 return setpgrp (1,1) != -1;
bec39cab
AC
12591 ;
12592 return 0;
12593}
12594_ACEOF
81ecdfbb 12595if ac_fn_c_try_run "$LINENO"; then :
a3828db0 12596 ac_cv_func_setpgrp_void=no
c906108c 12597else
81ecdfbb 12598 ac_cv_func_setpgrp_void=yes
c906108c 12599fi
81ecdfbb
RW
12600rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12601 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 12602fi
81ecdfbb 12603
a3828db0 12604fi
81ecdfbb
RW
12605{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
12606$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0
MK
12607if test $ac_cv_func_setpgrp_void = yes; then
12608
81ecdfbb 12609$as_echo "#define SETPGRP_VOID 1" >>confdefs.h
97bf5e38
MK
12610
12611fi
a3828db0
MK
12612
12613else
81ecdfbb
RW
12614 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
12615$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
12616if test "${ac_cv_func_setpgrp_void+set}" = set; then :
12617 $as_echo_n "(cached) " >&6
97bf5e38 12618else
81ecdfbb 12619 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12620/* end confdefs.h. */
a3828db0
MK
12621
12622#include <unistd.h>
12623
bec39cab
AC
12624int
12625main ()
12626{
a3828db0
MK
12627
12628 if (setpgrp(1,1) == -1)
12629 exit (0);
12630 else
12631 exit (1);
12632
bec39cab
AC
12633 ;
12634 return 0;
12635}
12636_ACEOF
81ecdfbb 12637if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12638 ac_cv_func_setpgrp_void=no
c906108c 12639else
81ecdfbb 12640 ac_cv_func_setpgrp_void=yes
c906108c 12641fi
81ecdfbb 12642rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 12643fi
81ecdfbb
RW
12644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
12645$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0 12646if test $ac_cv_func_setpgrp_void = yes; then
81ecdfbb 12647 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
c3f6f71d 12648
a3828db0 12649fi
c906108c
SS
12650fi
12651
db1ff28b
JK
12652# Assume we'll default to using the included libiberty regex.
12653gdb_use_included_regex=yes
12654
12655# However, if the system regex is GNU regex, then default to *not*
12656# using the included regex.
12657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5
12658$as_echo_n "checking for GNU regex... " >&6; }
12659if test "${gdb_cv_have_gnu_regex+set}" = set; then :
12660 $as_echo_n "(cached) " >&6
12661else
12662 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12663/* end confdefs.h. */
12664#include <gnu-versions.h>
12665int
12666main ()
12667{
12668#define REGEX_INTERFACE_VERSION 1
12669#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
12670# error "Version mismatch"
12671#endif
12672 ;
12673 return 0;
12674}
12675_ACEOF
12676if ac_fn_c_try_compile "$LINENO"; then :
12677 gdb_cv_have_gnu_regex=yes
12678else
12679 gdb_cv_have_gnu_regex=no
12680fi
12681rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12682fi
12683{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
12684$as_echo "$gdb_cv_have_gnu_regex" >&6; }
12685if test $gdb_cv_have_gnu_regex = yes; then
12686 gdb_use_included_regex=no
12687fi
12688
12689
12690# Check whether --with-included-regex was given.
12691if test "${with_included_regex+set}" = set; then :
12692 withval=$with_included_regex; gdb_with_regex=$withval
12693else
12694 gdb_with_regex=$gdb_use_included_regex
12695fi
12696
12697if test "$gdb_with_regex" = yes; then
12698
12699$as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h
12700
12701fi
12702
81ecdfbb
RW
12703# Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
12704ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
12705#include <sys/proc.h>
12706
12707"
12708if test "x$ac_cv_member_struct_thread_td_pcb" = x""yes; then :
c906108c 12709
5c45e068 12710cat >>confdefs.h <<_ACEOF
a3828db0 12711#define HAVE_STRUCT_THREAD_TD_PCB 1
bec39cab 12712_ACEOF
c906108c 12713
5c45e068 12714
97bf5e38 12715fi
c906108c 12716
5c45e068 12717
a3828db0 12718# See if <sys/lwp.h> defines `struct lwp`.
81ecdfbb
RW
12719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
12720$as_echo_n "checking for struct lwp... " >&6; }
12721if test "${gdb_cv_struct_lwp+set}" = set; then :
12722 $as_echo_n "(cached) " >&6
bec39cab 12723else
81ecdfbb 12724 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12725/* end confdefs.h. */
a3828db0
MK
12726#include <sys/param.h>
12727#include <sys/lwp.h>
bec39cab
AC
12728int
12729main ()
12730{
a3828db0 12731struct lwp l;
bec39cab
AC
12732 ;
12733 return 0;
12734}
12735_ACEOF
81ecdfbb 12736if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12737 gdb_cv_struct_lwp=yes
c906108c 12738else
81ecdfbb 12739 gdb_cv_struct_lwp=no
c906108c 12740fi
81ecdfbb 12741rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 12742fi
81ecdfbb
RW
12743{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
12744$as_echo "$gdb_cv_struct_lwp" >&6; }
a3828db0 12745if test $gdb_cv_struct_lwp = yes; then
c906108c 12746
81ecdfbb 12747$as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
c906108c 12748
97bf5e38 12749fi
c906108c 12750
a3828db0 12751# See if <machine/reg.h> degines `struct reg'.
81ecdfbb
RW
12752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
12753$as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
12754if test "${gdb_cv_struct_reg+set}" = set; then :
12755 $as_echo_n "(cached) " >&6
bec39cab 12756else
81ecdfbb 12757 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12758/* end confdefs.h. */
a3828db0
MK
12759#include <sys/types.h>
12760#include <machine/reg.h>
bec39cab
AC
12761int
12762main ()
12763{
a3828db0 12764struct reg r;
bec39cab
AC
12765 ;
12766 return 0;
12767}
12768_ACEOF
81ecdfbb 12769if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12770 gdb_cv_struct_reg=yes
27ca5dad 12771else
81ecdfbb 12772 gdb_cv_struct_reg=no
27ca5dad 12773fi
81ecdfbb 12774rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27ca5dad 12775fi
81ecdfbb
RW
12776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
12777$as_echo "$gdb_cv_struct_reg" >&6; }
a3828db0 12778if test $gdb_cv_struct_reg = yes; then
bec39cab 12779
81ecdfbb 12780$as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
27ca5dad
MC
12781
12782fi
97bf5e38 12783
a3828db0
MK
12784# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
12785# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
81ecdfbb
RW
12786ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <machine/reg.h>
12787"
12788if test "x$ac_cv_member_struct_reg_r_fs" = x""yes; then :
5c45e068
MK
12789
12790cat >>confdefs.h <<_ACEOF
a3828db0 12791#define HAVE_STRUCT_REG_R_FS 1
bec39cab 12792_ACEOF
3862412b 12793
5c45e068 12794
97bf5e38 12795fi
81ecdfbb
RW
12796ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <machine/reg.h>
12797"
12798if test "x$ac_cv_member_struct_reg_r_gs" = x""yes; then :
5c45e068
MK
12799
12800cat >>confdefs.h <<_ACEOF
a3828db0 12801#define HAVE_STRUCT_REG_R_GS 1
bec39cab 12802_ACEOF
3862412b 12803
5c45e068 12804
97bf5e38 12805fi
3862412b 12806
5c45e068 12807
6fea9e18
L
12808# See if <sys/user.h> supports the %fs_base and %gs_bas amd64 segment registers.
12809# Older amd64 Linux's don't have the fs_base and gs_base members of
12810# `struct user_regs_struct'.
12811ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "fs_base" "ac_cv_member_struct_user_regs_struct_fs_base" "#include <sys/user.h>
12812"
12813if test "x$ac_cv_member_struct_user_regs_struct_fs_base" = x""yes; then :
12814
12815cat >>confdefs.h <<_ACEOF
12816#define HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE 1
12817_ACEOF
12818
12819
12820fi
12821ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "gs_base" "ac_cv_member_struct_user_regs_struct_gs_base" "#include <sys/user.h>
12822"
12823if test "x$ac_cv_member_struct_user_regs_struct_gs_base" = x""yes; then :
12824
12825cat >>confdefs.h <<_ACEOF
12826#define HAVE_STRUCT_USER_REGS_STRUCT_GS_BASE 1
12827_ACEOF
12828
12829
12830fi
12831
12832
a3828db0 12833# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
81ecdfbb
RW
12834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
12835$as_echo_n "checking for PTRACE_GETREGS... " >&6; }
12836if test "${gdb_cv_have_ptrace_getregs+set}" = set; then :
12837 $as_echo_n "(cached) " >&6
451928c5 12838else
81ecdfbb 12839 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12840/* end confdefs.h. */
a3828db0 12841#include <sys/ptrace.h>
bec39cab
AC
12842int
12843main ()
12844{
a3828db0 12845PTRACE_GETREGS;
bec39cab
AC
12846 ;
12847 return 0;
12848}
12849_ACEOF
81ecdfbb 12850if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12851 gdb_cv_have_ptrace_getregs=yes
451928c5 12852else
81ecdfbb 12853 gdb_cv_have_ptrace_getregs=no
451928c5 12854fi
81ecdfbb 12855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
12856fi
12857
81ecdfbb
RW
12858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
12859$as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
a3828db0 12860if test $gdb_cv_have_ptrace_getregs = yes; then
60ca704f 12861
81ecdfbb 12862$as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
451928c5 12863
97bf5e38 12864fi
451928c5 12865
a3828db0 12866# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
81ecdfbb
RW
12867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
12868$as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
12869if test "${gdb_cv_have_ptrace_getfpxregs+set}" = set; then :
12870 $as_echo_n "(cached) " >&6
451928c5 12871else
81ecdfbb 12872 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12873/* end confdefs.h. */
a3828db0 12874#include <sys/ptrace.h>
bec39cab
AC
12875int
12876main ()
12877{
a3828db0 12878PTRACE_GETFPXREGS;
bec39cab
AC
12879 ;
12880 return 0;
12881}
12882_ACEOF
81ecdfbb 12883if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12884 gdb_cv_have_ptrace_getfpxregs=yes
451928c5 12885else
81ecdfbb 12886 gdb_cv_have_ptrace_getfpxregs=no
451928c5 12887fi
81ecdfbb 12888rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
12889fi
12890
81ecdfbb
RW
12891{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
12892$as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
a3828db0 12893if test $gdb_cv_have_ptrace_getfpxregs = yes; then
60ca704f 12894
81ecdfbb 12895$as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
451928c5 12896
97bf5e38 12897fi
451928c5 12898
a3828db0 12899# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
81ecdfbb
RW
12900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
12901$as_echo_n "checking for PT_GETDBREGS... " >&6; }
12902if test "${gdb_cv_have_pt_getdbregs+set}" = set; then :
12903 $as_echo_n "(cached) " >&6
3862412b 12904else
81ecdfbb 12905 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12906/* end confdefs.h. */
a3828db0
MK
12907#include <sys/types.h>
12908#include <sys/ptrace.h>
bec39cab
AC
12909int
12910main ()
12911{
a3828db0 12912PT_GETDBREGS;
bec39cab
AC
12913 ;
12914 return 0;
12915}
12916_ACEOF
81ecdfbb 12917if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12918 gdb_cv_have_pt_getdbregs=yes
3862412b 12919else
81ecdfbb 12920 gdb_cv_have_pt_getdbregs=no
3862412b 12921fi
81ecdfbb 12922rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
12923fi
12924
81ecdfbb
RW
12925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
12926$as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
a3828db0 12927if test $gdb_cv_have_pt_getdbregs = yes; then
60ca704f 12928
81ecdfbb 12929$as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
3862412b 12930
97bf5e38 12931fi
3862412b 12932
a3828db0 12933# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
81ecdfbb
RW
12934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
12935$as_echo_n "checking for PT_GETXMMREGS... " >&6; }
12936if test "${gdb_cv_have_pt_getxmmregs+set}" = set; then :
12937 $as_echo_n "(cached) " >&6
3862412b 12938else
81ecdfbb 12939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12940/* end confdefs.h. */
a3828db0
MK
12941#include <sys/types.h>
12942#include <sys/ptrace.h>
bec39cab
AC
12943int
12944main ()
12945{
a3828db0 12946PT_GETXMMREGS;
bec39cab
AC
12947 ;
12948 return 0;
12949}
12950_ACEOF
81ecdfbb 12951if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12952 gdb_cv_have_pt_getxmmregs=yes
3862412b 12953else
81ecdfbb 12954 gdb_cv_have_pt_getxmmregs=no
3862412b 12955fi
81ecdfbb 12956rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
12957fi
12958
81ecdfbb
RW
12959{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
12960$as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
a3828db0 12961if test $gdb_cv_have_pt_getxmmregs = yes; then
60ca704f 12962
81ecdfbb 12963$as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
3862412b 12964
97bf5e38 12965fi
3862412b 12966
05b4bd79 12967# Detect which type of /proc is in use, such as for Solaris.
97bf5e38
MK
12968
12969if test "${target}" = "${host}"; then
12970 case "${host}" in
7b00db47 12971 *-*-sysv4.2* | *-*-sysv5* )
60ca704f 12972
81ecdfbb 12973$as_echo "#define NEW_PROC_API 1" >>confdefs.h
97bf5e38
MK
12974
12975 ;;
c162e8c9 12976 *-*-solaris2.[6789] | *-*-solaris2.1[0-9]*)
60ca704f 12977
81ecdfbb 12978$as_echo "#define NEW_PROC_API 1" >>confdefs.h
c960c18f
AC
12979
12980 ;;
12981 mips-sgi-irix5*)
12982 # Work around <sys/proc.h> needing _KMEMUSER problem on IRIX 5.
60ca704f 12983
81ecdfbb 12984$as_echo "#define _KMEMUSER 1" >>confdefs.h
97bf5e38
MK
12985
12986 ;;
12987 esac
12988fi
12989
12990if test "$ac_cv_header_sys_procfs_h" = yes; then
81ecdfbb
RW
12991 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
12992$as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
12993 if test "${bfd_cv_have_sys_procfs_type_gregset_t+set}" = set; then :
12994 $as_echo_n "(cached) " >&6
596c9d4b 12995else
81ecdfbb 12996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12997/* end confdefs.h. */
596c9d4b
KB
12998
12999#define _SYSCALL32
d30c5336
JK
13000/* Needed for new procfs interface on sparc-solaris. */
13001#define _STRUCTURED_PROC 1
596c9d4b 13002#include <sys/procfs.h>
bec39cab
AC
13003int
13004main ()
13005{
97bf5e38 13006gregset_t avar
bec39cab
AC
13007 ;
13008 return 0;
13009}
13010_ACEOF
81ecdfbb 13011if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13012 bfd_cv_have_sys_procfs_type_gregset_t=yes
596c9d4b 13013else
81ecdfbb 13014 bfd_cv_have_sys_procfs_type_gregset_t=no
bec39cab 13015
596c9d4b 13016fi
81ecdfbb 13017rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
13018fi
13019
97bf5e38 13020 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
bec39cab 13021
81ecdfbb 13022$as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
596c9d4b
KB
13023
13024 fi
81ecdfbb
RW
13025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
13026$as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
451928c5 13027
81ecdfbb
RW
13028 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
13029$as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
13030 if test "${bfd_cv_have_sys_procfs_type_fpregset_t+set}" = set; then :
13031 $as_echo_n "(cached) " >&6
d84dd0c5 13032else
81ecdfbb 13033 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13034/* end confdefs.h. */
97bf5e38
MK
13035
13036#define _SYSCALL32
d30c5336
JK
13037/* Needed for new procfs interface on sparc-solaris. */
13038#define _STRUCTURED_PROC 1
d84dd0c5 13039#include <sys/procfs.h>
bec39cab
AC
13040int
13041main ()
13042{
97bf5e38 13043fpregset_t avar
bec39cab
AC
13044 ;
13045 return 0;
13046}
13047_ACEOF
81ecdfbb 13048if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13049 bfd_cv_have_sys_procfs_type_fpregset_t=yes
d84dd0c5 13050else
81ecdfbb 13051 bfd_cv_have_sys_procfs_type_fpregset_t=no
bec39cab 13052
d84dd0c5 13053fi
81ecdfbb 13054rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d84dd0c5
MK
13055fi
13056
97bf5e38 13057 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
bec39cab 13058
81ecdfbb 13059$as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
d84dd0c5 13060
97bf5e38 13061 fi
81ecdfbb
RW
13062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
13063$as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
d84dd0c5 13064
81ecdfbb
RW
13065 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
13066$as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
13067 if test "${bfd_cv_have_sys_procfs_type_prgregset_t+set}" = set; then :
13068 $as_echo_n "(cached) " >&6
c906108c 13069else
81ecdfbb 13070 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13071/* end confdefs.h. */
c906108c 13072
97bf5e38 13073#define _SYSCALL32
d30c5336
JK
13074/* Needed for new procfs interface on sparc-solaris. */
13075#define _STRUCTURED_PROC 1
97bf5e38 13076#include <sys/procfs.h>
bec39cab
AC
13077int
13078main ()
13079{
97bf5e38 13080prgregset_t avar
bec39cab
AC
13081 ;
13082 return 0;
13083}
13084_ACEOF
81ecdfbb 13085if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13086 bfd_cv_have_sys_procfs_type_prgregset_t=yes
c906108c 13087else
81ecdfbb 13088 bfd_cv_have_sys_procfs_type_prgregset_t=no
bec39cab 13089
c906108c 13090fi
81ecdfbb 13091rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13092fi
13093
97bf5e38 13094 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
bec39cab 13095
81ecdfbb 13096$as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
c906108c 13097
97bf5e38 13098 fi
81ecdfbb
RW
13099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
13100$as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
c906108c 13101
81ecdfbb
RW
13102 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
13103$as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
13104 if test "${bfd_cv_have_sys_procfs_type_prfpregset_t+set}" = set; then :
13105 $as_echo_n "(cached) " >&6
d45fe813 13106else
81ecdfbb 13107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13108/* end confdefs.h. */
97bf5e38
MK
13109
13110#define _SYSCALL32
d30c5336
JK
13111/* Needed for new procfs interface on sparc-solaris. */
13112#define _STRUCTURED_PROC 1
97bf5e38 13113#include <sys/procfs.h>
bec39cab
AC
13114int
13115main ()
13116{
97bf5e38 13117prfpregset_t avar
bec39cab
AC
13118 ;
13119 return 0;
13120}
13121_ACEOF
81ecdfbb 13122if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13123 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
d45fe813 13124else
81ecdfbb 13125 bfd_cv_have_sys_procfs_type_prfpregset_t=no
bec39cab 13126
d45fe813 13127fi
81ecdfbb 13128rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
13129fi
13130
97bf5e38 13131 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
bec39cab 13132
81ecdfbb 13133$as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
d45fe813 13134
97bf5e38 13135 fi
81ecdfbb
RW
13136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
13137$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
d45fe813 13138
81ecdfbb
RW
13139 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
13140$as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
13141 if test "${bfd_cv_have_sys_procfs_type_prgregset32_t+set}" = set; then :
13142 $as_echo_n "(cached) " >&6
d45fe813 13143else
81ecdfbb 13144 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13145/* end confdefs.h. */
97bf5e38
MK
13146
13147#define _SYSCALL32
d30c5336
JK
13148/* Needed for new procfs interface on sparc-solaris. */
13149#define _STRUCTURED_PROC 1
97bf5e38 13150#include <sys/procfs.h>
bec39cab
AC
13151int
13152main ()
13153{
97bf5e38 13154prgregset32_t avar
bec39cab
AC
13155 ;
13156 return 0;
13157}
13158_ACEOF
81ecdfbb 13159if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13160 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
d45fe813 13161else
81ecdfbb 13162 bfd_cv_have_sys_procfs_type_prgregset32_t=no
bec39cab 13163
d45fe813 13164fi
81ecdfbb 13165rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
13166fi
13167
97bf5e38 13168 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
bec39cab 13169
81ecdfbb 13170$as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
d45fe813 13171
97bf5e38 13172 fi
81ecdfbb
RW
13173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
13174$as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
d45fe813 13175
81ecdfbb
RW
13176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
13177$as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
13178 if test "${bfd_cv_have_sys_procfs_type_lwpid_t+set}" = set; then :
13179 $as_echo_n "(cached) " >&6
d45fe813 13180else
81ecdfbb 13181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13182/* end confdefs.h. */
97bf5e38 13183
d45fe813 13184#define _SYSCALL32
d30c5336
JK
13185/* Needed for new procfs interface on sparc-solaris. */
13186#define _STRUCTURED_PROC 1
97bf5e38 13187#include <sys/procfs.h>
bec39cab
AC
13188int
13189main ()
13190{
97bf5e38 13191lwpid_t avar
bec39cab
AC
13192 ;
13193 return 0;
13194}
13195_ACEOF
81ecdfbb 13196if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13197 bfd_cv_have_sys_procfs_type_lwpid_t=yes
d45fe813 13198else
81ecdfbb 13199 bfd_cv_have_sys_procfs_type_lwpid_t=no
bec39cab 13200
d45fe813 13201fi
81ecdfbb 13202rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
13203fi
13204
97bf5e38 13205 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
bec39cab 13206
81ecdfbb 13207$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
d45fe813 13208
97bf5e38 13209 fi
81ecdfbb
RW
13210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
13211$as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
c906108c 13212
81ecdfbb
RW
13213 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
13214$as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
13215 if test "${bfd_cv_have_sys_procfs_type_psaddr_t+set}" = set; then :
13216 $as_echo_n "(cached) " >&6
c906108c 13217else
81ecdfbb 13218 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13219/* end confdefs.h. */
c906108c 13220
97bf5e38 13221#define _SYSCALL32
d30c5336
JK
13222/* Needed for new procfs interface on sparc-solaris. */
13223#define _STRUCTURED_PROC 1
97bf5e38 13224#include <sys/procfs.h>
bec39cab
AC
13225int
13226main ()
13227{
97bf5e38 13228psaddr_t avar
bec39cab
AC
13229 ;
13230 return 0;
13231}
13232_ACEOF
81ecdfbb 13233if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13234 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c 13235else
81ecdfbb 13236 bfd_cv_have_sys_procfs_type_psaddr_t=no
bec39cab 13237
c906108c 13238fi
81ecdfbb 13239rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13240fi
13241
97bf5e38 13242 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
bec39cab 13243
81ecdfbb 13244$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
c906108c 13245
97bf5e38 13246 fi
81ecdfbb
RW
13247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
13248$as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
c906108c 13249
81ecdfbb
RW
13250 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prsysent_t in sys/procfs.h" >&5
13251$as_echo_n "checking for prsysent_t in sys/procfs.h... " >&6; }
13252 if test "${bfd_cv_have_sys_procfs_type_prsysent_t+set}" = set; then :
13253 $as_echo_n "(cached) " >&6
c906108c 13254else
81ecdfbb 13255 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13256/* end confdefs.h. */
c906108c 13257
97bf5e38 13258#define _SYSCALL32
d30c5336
JK
13259/* Needed for new procfs interface on sparc-solaris. */
13260#define _STRUCTURED_PROC 1
97bf5e38 13261#include <sys/procfs.h>
bec39cab
AC
13262int
13263main ()
13264{
97bf5e38 13265prsysent_t avar
bec39cab
AC
13266 ;
13267 return 0;
13268}
13269_ACEOF
81ecdfbb 13270if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13271 bfd_cv_have_sys_procfs_type_prsysent_t=yes
c906108c 13272else
81ecdfbb 13273 bfd_cv_have_sys_procfs_type_prsysent_t=no
bec39cab 13274
c906108c 13275fi
81ecdfbb 13276rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13277fi
13278
97bf5e38 13279 if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
bec39cab 13280
81ecdfbb 13281$as_echo "#define HAVE_PRSYSENT_T 1" >>confdefs.h
c906108c 13282
97bf5e38 13283 fi
81ecdfbb
RW
13284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prsysent_t" >&5
13285$as_echo "$bfd_cv_have_sys_procfs_type_prsysent_t" >&6; }
c906108c 13286
81ecdfbb
RW
13287 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigset_t in sys/procfs.h" >&5
13288$as_echo_n "checking for pr_sigset_t in sys/procfs.h... " >&6; }
13289 if test "${bfd_cv_have_sys_procfs_type_pr_sigset_t+set}" = set; then :
13290 $as_echo_n "(cached) " >&6
c906108c 13291else
81ecdfbb 13292 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13293/* end confdefs.h. */
c906108c 13294
97bf5e38 13295#define _SYSCALL32
d30c5336
JK
13296/* Needed for new procfs interface on sparc-solaris. */
13297#define _STRUCTURED_PROC 1
97bf5e38 13298#include <sys/procfs.h>
bec39cab
AC
13299int
13300main ()
13301{
97bf5e38 13302pr_sigset_t avar
bec39cab
AC
13303 ;
13304 return 0;
13305}
13306_ACEOF
81ecdfbb 13307if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13308 bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
c906108c 13309else
81ecdfbb 13310 bfd_cv_have_sys_procfs_type_pr_sigset_t=no
bec39cab 13311
c906108c 13312fi
81ecdfbb 13313rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13314fi
13315
97bf5e38 13316 if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
bec39cab 13317
81ecdfbb 13318$as_echo "#define HAVE_PR_SIGSET_T 1" >>confdefs.h
c906108c 13319
97bf5e38 13320 fi
81ecdfbb
RW
13321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigset_t" >&5
13322$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigset_t" >&6; }
c906108c 13323
81ecdfbb
RW
13324 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigaction64_t in sys/procfs.h" >&5
13325$as_echo_n "checking for pr_sigaction64_t in sys/procfs.h... " >&6; }
13326 if test "${bfd_cv_have_sys_procfs_type_pr_sigaction64_t+set}" = set; then :
13327 $as_echo_n "(cached) " >&6
c906108c 13328else
81ecdfbb 13329 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13330/* end confdefs.h. */
c906108c 13331
97bf5e38 13332#define _SYSCALL32
d30c5336
JK
13333/* Needed for new procfs interface on sparc-solaris. */
13334#define _STRUCTURED_PROC 1
97bf5e38 13335#include <sys/procfs.h>
bec39cab
AC
13336int
13337main ()
13338{
97bf5e38 13339pr_sigaction64_t avar
bec39cab
AC
13340 ;
13341 return 0;
13342}
13343_ACEOF
81ecdfbb 13344if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13345 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
c906108c 13346else
81ecdfbb 13347 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
bec39cab 13348
c906108c 13349fi
81ecdfbb 13350rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13351fi
13352
97bf5e38 13353 if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
bec39cab 13354
81ecdfbb 13355$as_echo "#define HAVE_PR_SIGACTION64_T 1" >>confdefs.h
c906108c 13356
97bf5e38 13357 fi
81ecdfbb
RW
13358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&5
13359$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&6; }
97bf5e38 13360
81ecdfbb
RW
13361 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_siginfo64_t in sys/procfs.h" >&5
13362$as_echo_n "checking for pr_siginfo64_t in sys/procfs.h... " >&6; }
13363 if test "${bfd_cv_have_sys_procfs_type_pr_siginfo64_t+set}" = set; then :
13364 $as_echo_n "(cached) " >&6
97bf5e38 13365else
81ecdfbb 13366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13367/* end confdefs.h. */
97bf5e38
MK
13368
13369#define _SYSCALL32
d30c5336
JK
13370/* Needed for new procfs interface on sparc-solaris. */
13371#define _STRUCTURED_PROC 1
97bf5e38 13372#include <sys/procfs.h>
bec39cab
AC
13373int
13374main ()
13375{
97bf5e38 13376pr_siginfo64_t avar
bec39cab
AC
13377 ;
13378 return 0;
13379}
13380_ACEOF
81ecdfbb 13381if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
13382 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
13383else
81ecdfbb 13384 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
bec39cab 13385
97bf5e38 13386fi
81ecdfbb 13387rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 13388fi
c906108c 13389
97bf5e38 13390 if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
bec39cab 13391
81ecdfbb 13392$as_echo "#define HAVE_PR_SIGINFO64_T 1" >>confdefs.h
c906108c 13393
97bf5e38 13394 fi
81ecdfbb
RW
13395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&5
13396$as_echo "$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&6; }
bec39cab
AC
13397
13398
97bf5e38
MK
13399
13400
13401
97bf5e38 13402 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
81ecdfbb
RW
13403 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether prfpregset_t type is broken" >&5
13404$as_echo_n "checking whether prfpregset_t type is broken... " >&6; }
13405 if test "${gdb_cv_prfpregset_t_broken+set}" = set; then :
13406 $as_echo_n "(cached) " >&6
c906108c 13407else
81ecdfbb 13408 if test "$cross_compiling" = yes; then :
97bf5e38 13409 gdb_cv_prfpregset_t_broken=yes
c906108c 13410else
81ecdfbb 13411 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13412/* end confdefs.h. */
97bf5e38
MK
13413#include <sys/procfs.h>
13414 int main ()
13415 {
13416 if (sizeof (prfpregset_t) == sizeof (void *))
13417 return 1;
13418 return 0;
13419 }
bec39cab 13420_ACEOF
81ecdfbb 13421if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 13422 gdb_cv_prfpregset_t_broken=no
81ecdfbb
RW
13423else
13424 gdb_cv_prfpregset_t_broken=yes
c906108c 13425fi
81ecdfbb
RW
13426rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13427 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 13428fi
81ecdfbb 13429
c906108c
SS
13430fi
13431
81ecdfbb
RW
13432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_prfpregset_t_broken" >&5
13433$as_echo "$gdb_cv_prfpregset_t_broken" >&6; }
97bf5e38 13434 if test $gdb_cv_prfpregset_t_broken = yes; then
60ca704f 13435
81ecdfbb 13436$as_echo "#define PRFPREGSET_T_BROKEN 1" >>confdefs.h
c906108c 13437
97bf5e38
MK
13438 fi
13439 fi
c906108c 13440fi
c906108c 13441
bc8bcb4b 13442# Check if the compiler supports the `long long' type.
c906108c 13443
81ecdfbb
RW
13444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
13445$as_echo_n "checking for long long support in compiler... " >&6; }
13446if test "${gdb_cv_c_long_long+set}" = set; then :
13447 $as_echo_n "(cached) " >&6
97bf5e38 13448else
81ecdfbb 13449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13450/* end confdefs.h. */
bc8bcb4b 13451extern long long foo;
bec39cab
AC
13452int
13453main ()
13454{
bc8bcb4b 13455switch (foo & 2) { case 0: return 1; }
bec39cab
AC
13456 ;
13457 return 0;
13458}
13459_ACEOF
81ecdfbb 13460if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
13461 gdb_cv_c_long_long=yes
13462else
81ecdfbb 13463 gdb_cv_c_long_long=no
97bf5e38 13464fi
81ecdfbb 13465rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 13466fi
81ecdfbb
RW
13467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
13468$as_echo "$gdb_cv_c_long_long" >&6; }
74a0d9f6
JK
13469if test $gdb_cv_c_long_long != yes; then
13470 # libdecnumber requires long long.
13471 as_fn_error "Compiler must support long long for GDB." "$LINENO" 5
97bf5e38
MK
13472fi
13473
bc8bcb4b 13474# Check if the compiler and runtime support printing long longs.
97bf5e38 13475
81ecdfbb
RW
13476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
13477$as_echo_n "checking for long long support in printf... " >&6; }
13478if test "${gdb_cv_printf_has_long_long+set}" = set; then :
13479 $as_echo_n "(cached) " >&6
97bf5e38 13480else
81ecdfbb 13481 if test "$cross_compiling" = yes; then :
97bf5e38
MK
13482 gdb_cv_printf_has_long_long=no
13483else
81ecdfbb 13484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13485/* end confdefs.h. */
bc8bcb4b
MK
13486$ac_includes_default
13487int
13488main ()
13489{
13490char buf[32];
97bf5e38
MK
13491 long long l = 0;
13492 l = (l << 16) + 0x0123;
13493 l = (l << 16) + 0x4567;
13494 l = (l << 16) + 0x89ab;
13495 l = (l << 16) + 0xcdef;
13496 sprintf (buf, "0x%016llx", l);
13497 return (strcmp ("0x0123456789abcdef", buf));
bc8bcb4b
MK
13498 ;
13499 return 0;
c906108c 13500}
bec39cab 13501_ACEOF
81ecdfbb 13502if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
13503 gdb_cv_printf_has_long_long=yes
13504else
81ecdfbb 13505 gdb_cv_printf_has_long_long=no
97bf5e38 13506fi
81ecdfbb
RW
13507rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13508 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 13509fi
81ecdfbb 13510
97bf5e38 13511fi
81ecdfbb
RW
13512{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
13513$as_echo "$gdb_cv_printf_has_long_long" >&6; }
97bf5e38 13514if test $gdb_cv_printf_has_long_long = yes; then
bc8bcb4b 13515
81ecdfbb 13516$as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
97bf5e38
MK
13517
13518fi
97bf5e38 13519
1a619819
LM
13520# Check if the compiler and runtime support printing decfloats.
13521
81ecdfbb
RW
13522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
13523$as_echo_n "checking for decfloat support in printf... " >&6; }
13524if test "${gdb_cv_printf_has_decfloat+set}" = set; then :
13525 $as_echo_n "(cached) " >&6
1a619819 13526else
81ecdfbb 13527 if test "$cross_compiling" = yes; then :
1a619819
LM
13528 gdb_cv_printf_has_decfloat=no
13529else
81ecdfbb 13530 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1a619819
LM
13531/* end confdefs.h. */
13532$ac_includes_default
13533int
13534main ()
13535{
13536char buf[64];
13537 _Decimal32 d32 = 1.2345df;
13538 _Decimal64 d64 = 1.2345dd;
13539 _Decimal128 d128 = 1.2345dl;
13540 sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
13541 return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
13542 ;
13543 return 0;
13544}
13545_ACEOF
81ecdfbb 13546if ac_fn_c_try_run "$LINENO"; then :
1a619819
LM
13547 gdb_cv_printf_has_decfloat=yes
13548else
81ecdfbb 13549 gdb_cv_printf_has_decfloat=no
1a619819 13550fi
81ecdfbb
RW
13551rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13552 conftest.$ac_objext conftest.beam conftest.$ac_ext
1a619819 13553fi
81ecdfbb 13554
1a619819 13555fi
81ecdfbb
RW
13556{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
13557$as_echo "$gdb_cv_printf_has_decfloat" >&6; }
1a619819
LM
13558if test $gdb_cv_printf_has_decfloat = yes; then
13559
81ecdfbb 13560$as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
1a619819
LM
13561
13562fi
13563
bc8bcb4b
MK
13564# Check if the compiler supports the `long double' type. We can't use
13565# AC_C_LONG_DOUBLE because that one does additional checks on the
13566# constants defined in <float.h> that fail on some systems,
13567# e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
97bf5e38 13568
81ecdfbb
RW
13569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
13570$as_echo_n "checking for long double support in compiler... " >&6; }
13571if test "${gdb_cv_c_long_double+set}" = set; then :
13572 $as_echo_n "(cached) " >&6
97bf5e38 13573else
81ecdfbb 13574 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13575/* end confdefs.h. */
97bf5e38 13576long double foo;
bec39cab 13577_ACEOF
81ecdfbb 13578if ac_fn_c_try_compile "$LINENO"; then :
bc8bcb4b 13579 gdb_cv_c_long_double=yes
97bf5e38 13580else
81ecdfbb 13581 gdb_cv_c_long_double=no
97bf5e38 13582fi
81ecdfbb 13583rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 13584fi
81ecdfbb
RW
13585{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
13586$as_echo "$gdb_cv_c_long_double" >&6; }
bc8bcb4b 13587if test $gdb_cv_c_long_double = yes; then
c906108c 13588
81ecdfbb 13589$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
13590
13591fi
13592
bc8bcb4b 13593# Check if the compiler and runtime support printing long doubles.
97bf5e38 13594
81ecdfbb
RW
13595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
13596$as_echo_n "checking for long double support in printf... " >&6; }
13597if test "${gdb_cv_printf_has_long_double+set}" = set; then :
13598 $as_echo_n "(cached) " >&6
97bf5e38 13599else
81ecdfbb 13600 if test "$cross_compiling" = yes; then :
97bf5e38
MK
13601 gdb_cv_printf_has_long_double=no
13602else
81ecdfbb 13603 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13604/* end confdefs.h. */
bc8bcb4b
MK
13605$ac_includes_default
13606int
13607main ()
13608{
13609char buf[16];
97bf5e38
MK
13610 long double f = 3.141592653;
13611 sprintf (buf, "%Lg", f);
13612 return (strncmp ("3.14159", buf, 7));
bc8bcb4b
MK
13613 ;
13614 return 0;
97bf5e38 13615}
bec39cab 13616_ACEOF
81ecdfbb 13617if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 13618 gdb_cv_printf_has_long_double=yes
c906108c 13619else
81ecdfbb 13620 gdb_cv_printf_has_long_double=no
c906108c 13621fi
81ecdfbb
RW
13622rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13623 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 13624fi
81ecdfbb 13625
c906108c 13626fi
81ecdfbb
RW
13627{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
13628$as_echo "$gdb_cv_printf_has_long_double" >&6; }
97bf5e38 13629if test $gdb_cv_printf_has_long_double = yes; then
bc8bcb4b 13630
81ecdfbb 13631$as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
13632
13633fi
97bf5e38 13634
bc8bcb4b 13635# Check if the compiler and runtime support scanning long doubles.
97bf5e38 13636
81ecdfbb
RW
13637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
13638$as_echo_n "checking for long double support in scanf... " >&6; }
13639if test "${gdb_cv_scanf_has_long_double+set}" = set; then :
13640 $as_echo_n "(cached) " >&6
97bf5e38 13641else
81ecdfbb 13642 if test "$cross_compiling" = yes; then :
97bf5e38
MK
13643 gdb_cv_scanf_has_long_double=no
13644else
81ecdfbb 13645 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13646/* end confdefs.h. */
bc8bcb4b
MK
13647#include <stdio.h>
13648int
13649main ()
13650{
13651char *buf = "3.141592653";
97bf5e38
MK
13652 long double f = 0;
13653 sscanf (buf, "%Lg", &f);
13654 return !(f > 3.14159 && f < 3.14160);
bc8bcb4b
MK
13655 ;
13656 return 0;
97bf5e38 13657}
bec39cab 13658_ACEOF
81ecdfbb 13659if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
13660 gdb_cv_scanf_has_long_double=yes
13661else
81ecdfbb 13662 gdb_cv_scanf_has_long_double=no
97bf5e38 13663fi
81ecdfbb
RW
13664rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13665 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 13666fi
81ecdfbb 13667
c906108c 13668fi
81ecdfbb
RW
13669{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
13670$as_echo "$gdb_cv_scanf_has_long_double" >&6; }
97bf5e38 13671if test $gdb_cv_scanf_has_long_double = yes; then
bc8bcb4b 13672
81ecdfbb 13673$as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
13674
13675fi
c906108c 13676
438013df
AO
13677case ${host_os} in
13678aix*)
81ecdfbb
RW
13679 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
13680$as_echo_n "checking for -bbigtoc option... " >&6; }
13681if test "${gdb_cv_bigtoc+set}" = set; then :
13682 $as_echo_n "(cached) " >&6
438013df 13683else
bec39cab 13684
438013df
AO
13685 SAVE_LDFLAGS=$LDFLAGS
13686
13687 case $GCC in
13688 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
13689 *) gdb_cv_bigtoc=-bbigtoc ;;
13690 esac
13691
13692 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
81ecdfbb 13693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13694/* end confdefs.h. */
438013df 13695
bec39cab
AC
13696int
13697main ()
13698{
438013df 13699int i;
bec39cab
AC
13700 ;
13701 return 0;
13702}
13703_ACEOF
81ecdfbb 13704if ac_fn_c_try_link "$LINENO"; then :
bec39cab 13705
81ecdfbb
RW
13706else
13707 gdb_cv_bigtoc=
438013df 13708fi
81ecdfbb
RW
13709rm -f core conftest.err conftest.$ac_objext \
13710 conftest$ac_exeext conftest.$ac_ext
ec76baa5 13711 LDFLAGS="${SAVE_LDFLAGS}"
438013df 13712
bec39cab 13713fi
81ecdfbb
RW
13714{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
13715$as_echo "$gdb_cv_bigtoc" >&6; }
438013df
AO
13716 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
13717 ;;
13718esac
13719
38f6b338 13720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
f6528abd 13721$as_echo_n "checking for the dynamic export flag... " >&6; }
38f6b338
JK
13722dynamic_list=false
13723if test "${gdb_native}" = yes; then
13724 # The dynamically loaded libthread_db needs access to symbols in the gdb
13725 # executable. Older GNU ld supports --export-dynamic but --dynamic-list
13726 # may not be supported there.
13727 old_LDFLAGS="$LDFLAGS"
13728 # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
13729 RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
13730 LDFLAGS="$LDFLAGS $RDYNAMIC"
13731 if test "${have_libpython}" = no; then
13732 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f6528abd
JK
13733/* end confdefs.h. */
13734
13735int
13736main ()
13737{
13738
13739 ;
13740 return 0;
13741}
13742_ACEOF
13743if ac_fn_c_try_link "$LINENO"; then :
3bebe2f2
JK
13744 dynamic_list=true
13745fi
13746rm -f core conftest.err conftest.$ac_objext \
13747 conftest$ac_exeext conftest.$ac_ext
38f6b338
JK
13748 else
13749 # Workaround http://bugs.python.org/issue4434 where static
13750 # libpythonX.Y.a would get its symbols required for
13751 # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
13752 # Problem does not happen for the recommended libpythonX.Y.so linkage.
13753 old_CFLAGS="$CFLAGS"
13754 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
8c1fb155
JK
13755 old_LIBS="$LIBS"
13756 LIBS="$LIBS $PYTHON_LIBS"
38f6b338 13757 if test "$cross_compiling" = yes; then :
3bebe2f2 13758 true
f6528abd 13759else
3bebe2f2
JK
13760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13761/* end confdefs.h. */
13762#include "${have_libpython}/Python.h"
13763int
13764main ()
13765{
13766int err;
38f6b338
JK
13767 Py_Initialize ();
13768 err = PyRun_SimpleString ("import itertools\n");
13769 Py_Finalize ();
13770 return err == 0 ? 0 : 1;
3bebe2f2
JK
13771 ;
13772 return 0;
13773}
13774_ACEOF
13775if ac_fn_c_try_run "$LINENO"; then :
13776 dynamic_list=true
13777fi
13778rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13779 conftest.$ac_objext conftest.beam conftest.$ac_ext
13780fi
13781
8c1fb155 13782 LIBS="$old_LIBS"
38f6b338
JK
13783 CFLAGS="$old_CFLAGS"
13784 fi
13785 LDFLAGS="$old_LDFLAGS"
13786fi
13787if $dynamic_list; then
13788 found="-Wl,--dynamic-list"
13789 RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
f6528abd 13790else
38f6b338
JK
13791 found="-rdynamic"
13792 RDYNAMIC="-rdynamic"
f6528abd 13793fi
f6528abd 13794
38f6b338 13795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
f6528abd 13796$as_echo "$found" >&6; }
0407b3f1 13797
f6528abd 13798
0407b3f1 13799if test ${build} = ${host} -a ${host} = ${target} ; then
c906108c 13800 case ${host_os} in
c906108c 13801 solaris*)
d92419e5
JB
13802 # See if thread_db library is around for Solaris thread debugging.
13803 # Note that we must explicitly test for version 1 of the library
13804 # because version 0 (present on Solaris 2.4 or earlier) doesn't have
13805 # the same API.
81ecdfbb
RW
13806 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris thread debugging library" >&5
13807$as_echo_n "checking for Solaris thread debugging library... " >&6; }
c906108c 13808 if test -f /usr/lib/libthread_db.so.1 ; then
81ecdfbb
RW
13809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13810$as_echo "yes" >&6; }
60ca704f 13811
81ecdfbb 13812$as_echo "#define HAVE_THREAD_DB_LIB 1" >>confdefs.h
c906108c 13813
3483b318 13814 CONFIG_OBS="${CONFIG_OBS} sol-thread.o"
c906108c 13815 CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
81ecdfbb
RW
13816 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
13817$as_echo_n "checking for dlopen in -ldl... " >&6; }
13818if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
13819 $as_echo_n "(cached) " >&6
c906108c 13820else
bec39cab 13821 ac_check_lib_save_LIBS=$LIBS
c906108c 13822LIBS="-ldl $LIBS"
81ecdfbb 13823cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
13824/* end confdefs.h. */
13825
81ecdfbb
RW
13826/* Override any GCC internal prototype to avoid an error.
13827 Use char because int might match the return type of a GCC
13828 builtin and then its argument prototype would still apply. */
bec39cab
AC
13829#ifdef __cplusplus
13830extern "C"
13831#endif
bec39cab
AC
13832char dlopen ();
13833int
13834main ()
13835{
81ecdfbb 13836return dlopen ();
bec39cab
AC
13837 ;
13838 return 0;
13839}
13840_ACEOF
81ecdfbb 13841if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
13842 ac_cv_lib_dl_dlopen=yes
13843else
81ecdfbb 13844 ac_cv_lib_dl_dlopen=no
bec39cab 13845fi
81ecdfbb
RW
13846rm -f core conftest.err conftest.$ac_objext \
13847 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
13848LIBS=$ac_check_lib_save_LIBS
13849fi
81ecdfbb
RW
13850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
13851$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
13852if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
bec39cab
AC
13853 cat >>confdefs.h <<_ACEOF
13854#define HAVE_LIBDL 1
13855_ACEOF
c906108c
SS
13856
13857 LIBS="-ldl $LIBS"
13858
c906108c
SS
13859fi
13860
f6528abd 13861 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} $RDYNAMIC"
c906108c
SS
13862 # Sun randomly tweaked the prototypes in <proc_service.h>
13863 # at one point.
81ecdfbb
RW
13864 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if <proc_service.h> is old" >&5
13865$as_echo_n "checking if <proc_service.h> is old... " >&6; }
13866 if test "${gdb_cv_proc_service_is_old+set}" = set; then :
13867 $as_echo_n "(cached) " >&6
c906108c 13868else
bec39cab 13869
81ecdfbb 13870 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13871/* end confdefs.h. */
c906108c
SS
13872
13873 #include <proc_service.h>
13874 ps_err_e ps_pdwrite
13875 (struct ps_prochandle*, psaddr_t, const void*, size_t);
c906108c 13876
bec39cab
AC
13877int
13878main ()
13879{
13880
13881 ;
13882 return 0;
13883}
13884_ACEOF
81ecdfbb 13885if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
13886 gdb_cv_proc_service_is_old=no
13887else
81ecdfbb 13888 gdb_cv_proc_service_is_old=yes
c906108c 13889fi
81ecdfbb 13890rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 13891
c906108c
SS
13892fi
13893
81ecdfbb
RW
13894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_proc_service_is_old" >&5
13895$as_echo "$gdb_cv_proc_service_is_old" >&6; }
c906108c 13896 if test $gdb_cv_proc_service_is_old = yes; then
60ca704f 13897
81ecdfbb 13898$as_echo "#define PROC_SERVICE_IS_OLD 1" >>confdefs.h
c906108c
SS
13899
13900 fi
13901 else
81ecdfbb
RW
13902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13903$as_echo "no" >&6; }
c906108c
SS
13904 fi
13905 ;;
d92419e5 13906 aix*)
81ecdfbb
RW
13907 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
13908$as_echo_n "checking for AiX thread debugging library... " >&6; }
13909 if test "${gdb_cv_have_aix_thread_debug+set}" = set; then :
13910 $as_echo_n "(cached) " >&6
bec39cab 13911else
81ecdfbb 13912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13913/* end confdefs.h. */
d92419e5 13914#include <sys/pthdebug.h>
bec39cab
AC
13915int
13916main ()
13917{
d92419e5
JB
13918#ifndef PTHDB_VERSION_3
13919 #error
13920 #endif
bec39cab
AC
13921 ;
13922 return 0;
13923}
13924_ACEOF
81ecdfbb 13925if ac_fn_c_try_compile "$LINENO"; then :
d92419e5
JB
13926 gdb_cv_have_aix_thread_debug=yes
13927else
81ecdfbb 13928 gdb_cv_have_aix_thread_debug=no
d92419e5 13929fi
81ecdfbb 13930rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d92419e5
JB
13931fi
13932
81ecdfbb
RW
13933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
13934$as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
d92419e5
JB
13935 if test $gdb_cv_have_aix_thread_debug = yes; then
13936 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
3483b318 13937 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
7f533142 13938 LIBS="$LIBS -lpthdebug"
d645e32e
JB
13939
13940 # Older versions of AIX do not provide the declaration for
13941 # the getthrds function (it appears that it was introduced
13942 # with AIX 6.x).
13943 ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h>
13944"
13945if test "x$ac_cv_have_decl_getthrds" = x""yes; then :
13946 ac_have_decl=1
13947else
13948 ac_have_decl=0
13949fi
13950
13951cat >>confdefs.h <<_ACEOF
13952#define HAVE_DECL_GETTHRDS $ac_have_decl
13953_ACEOF
13954
d92419e5
JB
13955 fi
13956 ;;
c906108c 13957 esac
bec39cab 13958
c906108c
SS
13959fi
13960
3f47be5c 13961if test "x$ac_cv_header_thread_db_h" = "xyes"; then
81ecdfbb
RW
13962 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
13963$as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
13964if test "${gdb_cv_thread_db_h_has_td_notalloc+set}" = set; then :
13965 $as_echo_n "(cached) " >&6
bec39cab 13966else
81ecdfbb 13967 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13968/* end confdefs.h. */
3f47be5c 13969#include <thread_db.h>
bec39cab
AC
13970int
13971main ()
13972{
3f47be5c 13973int i = TD_NOTALLOC;
bec39cab
AC
13974 ;
13975 return 0;
13976}
13977_ACEOF
81ecdfbb 13978if ac_fn_c_try_compile "$LINENO"; then :
3f47be5c
EZ
13979 gdb_cv_thread_db_h_has_td_notalloc=yes
13980else
81ecdfbb 13981 gdb_cv_thread_db_h_has_td_notalloc=no
bec39cab 13982
3f47be5c 13983fi
81ecdfbb 13984rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3f47be5c 13985
bec39cab 13986fi
81ecdfbb
RW
13987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
13988$as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
13989 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
13990$as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
13991if test "${gdb_cv_thread_db_h_has_td_version+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_VERSION;
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_version=yes
14007else
81ecdfbb 14008 gdb_cv_thread_db_h_has_td_version=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_version" >&5
14015$as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
14016 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
14017$as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
14018if test "${gdb_cv_thread_db_h_has_td_notls+set}" = set; then :
14019 $as_echo_n "(cached) " >&6
59f80f10 14020else
81ecdfbb 14021 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
14022/* end confdefs.h. */
14023#include <thread_db.h>
14024int
14025main ()
14026{
14027int i = TD_NOTLS;
14028 ;
14029 return 0;
14030}
14031_ACEOF
81ecdfbb 14032if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
14033 gdb_cv_thread_db_h_has_td_notls=yes
14034else
81ecdfbb 14035 gdb_cv_thread_db_h_has_td_notls=no
59f80f10
DJ
14036
14037fi
81ecdfbb 14038rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
14039
14040fi
81ecdfbb
RW
14041{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
14042$as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
3f47be5c
EZ
14043fi
14044if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
bec39cab 14045
81ecdfbb 14046$as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
3f47be5c 14047
59f80f10
DJ
14048fi
14049if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
14050
81ecdfbb 14051$as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
59f80f10
DJ
14052
14053fi
14054if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
14055
81ecdfbb 14056$as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
59f80f10 14057
3f47be5c
EZ
14058fi
14059
b757528f 14060if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then
81ecdfbb
RW
14061 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/syscall.h> has __NR_tkill" >&5
14062$as_echo_n "checking whether <sys/syscall.h> has __NR_tkill... " >&6; }
14063if test "${gdb_cv_sys_syscall_h_has_tkill+set}" = set; then :
14064 $as_echo_n "(cached) " >&6
bec39cab 14065else
81ecdfbb 14066 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14067/* end confdefs.h. */
b757528f 14068#include <sys/syscall.h>
bec39cab
AC
14069int
14070main ()
14071{
b757528f 14072int i = __NR_tkill;
bec39cab
AC
14073 ;
14074 return 0;
14075}
14076_ACEOF
81ecdfbb 14077if ac_fn_c_try_compile "$LINENO"; then :
b757528f
JJ
14078 gdb_cv_sys_syscall_h_has_tkill=yes
14079else
81ecdfbb 14080 gdb_cv_sys_syscall_h_has_tkill=no
bec39cab 14081
b757528f 14082fi
81ecdfbb 14083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b757528f 14084
bec39cab 14085fi
81ecdfbb
RW
14086{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_sys_syscall_h_has_tkill" >&5
14087$as_echo "$gdb_cv_sys_syscall_h_has_tkill" >&6; }
b757528f 14088fi
99c1d451
TT
14089if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes"; then
14090 ac_fn_c_check_func "$LINENO" "syscall" "ac_cv_func_syscall"
14091if test "x$ac_cv_func_syscall" = x""yes; then :
bec39cab 14092
81ecdfbb 14093$as_echo "#define HAVE_TKILL_SYSCALL 1" >>confdefs.h
b757528f 14094
99c1d451
TT
14095
14096fi
14097
b757528f
JJ
14098fi
14099
81ecdfbb
RW
14100ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
14101"
14102if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = x""yes; then :
14103 ac_have_decl=1
10568435 14104else
81ecdfbb 14105 ac_have_decl=0
10568435 14106fi
10568435
JK
14107
14108cat >>confdefs.h <<_ACEOF
81ecdfbb 14109#define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
10568435
JK
14110_ACEOF
14111
14112
81ecdfbb
RW
14113if test "$cross_compiling" = yes; then :
14114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
14115/* end confdefs.h. */
14116#include <sys/personality.h>
14117int
14118main ()
14119{
14120
14121# if !HAVE_DECL_ADDR_NO_RANDOMIZE
14122# define ADDR_NO_RANDOMIZE 0x0040000
14123# endif
14124 /* Test the flag could be set and stays set. */
14125 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
14126 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
14127 return 1
14128 ;
14129 return 0;
14130}
14131_ACEOF
81ecdfbb 14132if ac_fn_c_try_link "$LINENO"; then :
10568435
JK
14133 have_personality=true
14134else
81ecdfbb 14135 have_personality=false
10568435 14136fi
81ecdfbb
RW
14137rm -f core conftest.err conftest.$ac_objext \
14138 conftest$ac_exeext conftest.$ac_ext
10568435 14139else
81ecdfbb 14140 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
14141/* end confdefs.h. */
14142#include <sys/personality.h>
14143int
14144main ()
14145{
14146
14147# if !HAVE_DECL_ADDR_NO_RANDOMIZE
14148# define ADDR_NO_RANDOMIZE 0x0040000
14149# endif
14150 /* Test the flag could be set and stays set. */
14151 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
14152 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
14153 return 1
14154 ;
14155 return 0;
14156}
14157_ACEOF
81ecdfbb 14158if ac_fn_c_try_run "$LINENO"; then :
10568435
JK
14159 have_personality=true
14160else
81ecdfbb 14161 have_personality=false
10568435 14162fi
81ecdfbb
RW
14163rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14164 conftest.$ac_objext conftest.beam conftest.$ac_ext
10568435 14165fi
81ecdfbb 14166
10568435
JK
14167if $have_personality
14168then
14169
81ecdfbb 14170$as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
10568435
JK
14171
14172fi
14173
e655c1a2
PA
14174case $host_os in
14175 go32* | *djgpp*)
14176 gdbinit=gdb.ini
14177 ;;
14178 *)
14179 gdbinit=.gdbinit
14180 ;;
14181esac
14182
14183cat >>confdefs.h <<_ACEOF
14184#define GDBINIT "$gdbinit"
14185_ACEOF
14186
14187
fb40c209 14188
f83d8a90
DE
14189# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
14190# except that the argument to --with-sysroot is optional.
14191# --with-sysroot (or --with-sysroot=yes) sets the default sysroot path.
14192if test "x$with_sysroot" = xyes; then
14193 with_sysroot="${exec_prefix}/${target_alias}/sys-root"
14194fi
bec39cab 14195
81ecdfbb
RW
14196# Check whether --with-sysroot was given.
14197if test "${with_sysroot+set}" = set; then :
f83d8a90
DE
14198 withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval
14199else
14200 TARGET_SYSTEM_ROOT=
14201fi
030292b7 14202
030292b7 14203
f83d8a90
DE
14204 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
14205 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14206 ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT`
14207 ac_define_dir=`eval echo $ac_define_dir`
030292b7 14208
f83d8a90
DE
14209cat >>confdefs.h <<_ACEOF
14210#define TARGET_SYSTEM_ROOT "$ac_define_dir"
14211_ACEOF
bec39cab 14212
030292b7 14213
b14b1491 14214
f83d8a90
DE
14215
14216 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
14217 if test "x$prefix" = xNONE; then
14218 test_prefix=/usr/local
14219 else
14220 test_prefix=$prefix
14221 fi
14222 else
14223 test_prefix=$exec_prefix
14224 fi
14225 value=0
14226 case ${ac_define_dir} in
14227 "${test_prefix}"|"${test_prefix}/"*|\
14228 '${exec_prefix}'|'${exec_prefix}/'*)
14229 value=1
14230 ;;
14231 esac
14232
14233cat >>confdefs.h <<_ACEOF
14234#define TARGET_SYSTEM_ROOT_RELOCATABLE $value
14235_ACEOF
030292b7
DJ
14236
14237
14238
16e7150e 14239
16e7150e 14240
81ecdfbb
RW
14241# Check whether --with-system-gdbinit was given.
14242if test "${with_system_gdbinit+set}" = set; then :
14243 withval=$with_system_gdbinit;
b14b1491
TT
14244 SYSTEM_GDBINIT=$withval
14245else
14246 SYSTEM_GDBINIT=
81ecdfbb
RW
14247fi
14248
16e7150e
JG
14249
14250 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
14251 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 14252 ac_define_dir=`eval echo $SYSTEM_GDBINIT`
16e7150e
JG
14253 ac_define_dir=`eval echo $ac_define_dir`
14254
14255cat >>confdefs.h <<_ACEOF
14256#define SYSTEM_GDBINIT "$ac_define_dir"
14257_ACEOF
14258
14259
14260
0c4a4063 14261
b14b1491
TT
14262 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
14263 if test "x$prefix" = xNONE; then
14264 test_prefix=/usr/local
14265 else
14266 test_prefix=$prefix
14267 fi
14268 else
14269 test_prefix=$exec_prefix
14270 fi
14271 value=0
14272 case ${ac_define_dir} in
14273 "${test_prefix}"|"${test_prefix}/"*|\
14274 '${exec_prefix}'|'${exec_prefix}/'*)
14275 value=1
14276 ;;
14277 esac
16e7150e 14278
b14b1491
TT
14279cat >>confdefs.h <<_ACEOF
14280#define SYSTEM_GDBINIT_RELOCATABLE $value
16e7150e
JG
14281_ACEOF
14282
b14b1491 14283
16e7150e 14284
0c4a4063 14285
81ecdfbb
RW
14286# Check whether --enable-werror was given.
14287if test "${enable_werror+set}" = set; then :
14288 enableval=$enable_werror; case "${enableval}" in
094a342e
MK
14289 yes | y) ERROR_ON_WARNING="yes" ;;
14290 no | n) ERROR_ON_WARNING="no" ;;
81ecdfbb 14291 *) as_fn_error "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
094a342e 14292 esac
81ecdfbb
RW
14293fi
14294
094a342e 14295
9a084706
PA
14296# Enable -Werror by default when using gcc. Turn it off for releases.
14297if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
094a342e
MK
14298 ERROR_ON_WARNING=yes
14299fi
14300
14301WERROR_CFLAGS=""
14302if test "${ERROR_ON_WARNING}" = yes ; then
14303 WERROR_CFLAGS="-Werror"
14304fi
14305
3bc3d82a 14306# These options work in either C or C++ modes.
aac331e4 14307build_warnings="-Wall -Wpointer-arith \
1cb5e2a4 14308-Wno-unused -Wunused-value -Wunused-function \
aac331e4
PA
14309-Wno-switch -Wno-char-subscripts \
14310-Wempty-body"
a3b362c4 14311
3bc3d82a
PA
14312# Now add in C and C++ specific options, depending on mode.
14313if test "$enable_build_with_cxx" = "yes"; then
14314 build_warnings="$build_warnings -Wno-sign-compare -Wno-write-strings \
14315-Wno-narrowing"
14316else
aac331e4
PA
14317 build_warnings="$build_warnings -Wpointer-sign -Wmissing-prototypes \
14318-Wdeclaration-after-statement -Wmissing-parameter-type \
14319-Wold-style-declaration -Wold-style-definition"
3bc3d82a
PA
14320fi
14321
3526781e
DJ
14322# Enable -Wno-format by default when using gcc on mingw since many
14323# GCC versions complain about %I64.
14324case "${host}" in
14325 *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;;
d3685d60 14326 *) build_warnings="$build_warnings -Wformat-nonliteral" ;;
3526781e
DJ
14327esac
14328
81ecdfbb
RW
14329# Check whether --enable-build-warnings was given.
14330if test "${enable_build_warnings+set}" = set; then :
14331 enableval=$enable_build_warnings; case "${enableval}" in
c906108c
SS
14332 yes) ;;
14333 no) build_warnings="-w";;
14334 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
14335 build_warnings="${build_warnings} ${t}";;
14336 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
14337 build_warnings="${t} ${build_warnings}";;
14338 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
14339esac
d4f3574e 14340if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 14341 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 14342fi
81ecdfbb
RW
14343fi
14344# Check whether --enable-gdb-build-warnings was given.
14345if test "${enable_gdb_build_warnings+set}" = set; then :
14346 enableval=$enable_gdb_build_warnings; case "${enableval}" in
3b851bce
AC
14347 yes) ;;
14348 no) build_warnings="-w";;
14349 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
14350 build_warnings="${build_warnings} ${t}";;
14351 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
14352 build_warnings="${t} ${build_warnings}";;
14353 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
14354esac
14355if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
14356 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
14357fi
81ecdfbb 14358fi
3bc3d82a
PA
14359
14360# The set of warnings supported by a C++ compiler is not the same as
14361# of the C compiler.
14362if test "$enable_build_with_cxx" = "yes"; then
14363 ac_ext=cpp
14364ac_cpp='$CXXCPP $CPPFLAGS'
14365ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14366ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14367ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14368
14369fi
14370
81ecdfbb 14371WARN_CFLAGS=""
c906108c
SS
14372if test "x${build_warnings}" != x -a "x$GCC" = xyes
14373then
81ecdfbb
RW
14374 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
14375$as_echo_n "checking compiler warning flags... " >&6; }
746a987d
AC
14376 # Separate out the -Werror flag as some files just cannot be
14377 # compiled with it enabled.
14378 for w in ${build_warnings}; do
14379 case $w in
14380 -Werr*) WERROR_CFLAGS=-Werror ;;
3bc3d82a
PA
14381 *)
14382 # Check whether GCC accepts it.
4536bbc6
AC
14383 saved_CFLAGS="$CFLAGS"
14384 CFLAGS="$CFLAGS $w"
3bc3d82a
PA
14385 saved_CXXFLAGS="$CXXFLAGS"
14386 CXXFLAGS="$CXXFLAGS $w"
54019719 14387 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14388/* end confdefs.h. */
4536bbc6 14389
bec39cab
AC
14390int
14391main ()
14392{
4536bbc6 14393
bec39cab
AC
14394 ;
14395 return 0;
14396}
14397_ACEOF
3bc3d82a 14398if ac_fn_cxx_try_compile "$LINENO"; then :
4536bbc6 14399 WARN_CFLAGS="${WARN_CFLAGS} $w"
4536bbc6 14400fi
81ecdfbb 14401rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4536bbc6 14402 CFLAGS="$saved_CFLAGS"
3bc3d82a 14403 CXXFLAGS="$saved_CXXFLAGS"
746a987d
AC
14404 esac
14405 done
81ecdfbb
RW
14406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
14407$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
c906108c
SS
14408fi
14409
14410
104c1213 14411
3bc3d82a
PA
14412if test "$enable_build_with_cxx" = "yes"; then
14413 ac_ext=c
14414ac_cpp='$CPP $CPPFLAGS'
14415ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14416ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14417ac_compiler_gnu=$ac_cv_c_compiler_gnu
14418
14419fi
14420
7a292a7a 14421# In the Cygwin environment, we need some additional flags.
81ecdfbb
RW
14422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
14423$as_echo_n "checking for cygwin... " >&6; }
14424if test "${gdb_cv_os_cygwin+set}" = set; then :
14425 $as_echo_n "(cached) " >&6
bec39cab 14426else
81ecdfbb 14427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14428/* end confdefs.h. */
7a292a7a
SS
14429
14430#if defined (__CYGWIN__) || defined (__CYGWIN32__)
14431lose
14432#endif
bec39cab 14433_ACEOF
7a292a7a 14434if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
92a021de 14435 $EGREP "^lose$" >/dev/null 2>&1; then :
7a292a7a
SS
14436 gdb_cv_os_cygwin=yes
14437else
7a292a7a
SS
14438 gdb_cv_os_cygwin=no
14439fi
14440rm -f conftest*
14441
14442fi
81ecdfbb
RW
14443{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
14444$as_echo "$gdb_cv_os_cygwin" >&6; }
7a292a7a 14445
aff38e61 14446
3eb25fda 14447SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
aff38e61 14448case ${host} in
95cbc983
AC
14449 *go32* ) SER_HARDWIRE=ser-go32.o ;;
14450 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
0ea3f30e 14451 *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
aff38e61
AC
14452esac
14453
14454
cd0fc7c3
SS
14455# libreadline needs libuser32.a in a cygwin environment
14456WIN32LIBS=
14457if test x$gdb_cv_os_cygwin = xyes; then
c5394b80
JM
14458 WIN32LIBS="-luser32"
14459 case "${target}" in
14460 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
14461 ;;
14462 esac
cd0fc7c3 14463fi
c906108c 14464
b4505029
MM
14465# The ser-tcp.c module requires sockets.
14466case ${host} in
14467 *mingw32*)
14468
81ecdfbb 14469$as_echo "#define USE_WIN32API 1" >>confdefs.h
b4505029
MM
14470
14471 WIN32LIBS="$WIN32LIBS -lws2_32"
14472 ;;
14473esac
14474
7a292a7a 14475
31d99776 14476# Add ELF support to GDB, but only if BFD includes ELF support.
def63ff0
TT
14477
14478 OLD_CFLAGS=$CFLAGS
14479 OLD_LDFLAGS=$LDFLAGS
14480 OLD_LIBS=$LIBS
14481 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
14482 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
14483 # always want our bfd.
14484 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
5a2d4533
L
14485 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
14486 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
def63ff0 14487 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
711a72d3 14488 LIBS="-lbfd -liberty -lz $intl $LIBS"
def63ff0 14489 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
81ecdfbb
RW
14490$as_echo_n "checking for ELF support in BFD... " >&6; }
14491if test "${gdb_cv_var_elf+set}" = set; then :
14492 $as_echo_n "(cached) " >&6
31d99776 14493else
81ecdfbb 14494 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31d99776
DJ
14495/* end confdefs.h. */
14496#include <stdlib.h>
def63ff0
TT
14497 #include "bfd.h"
14498 #include "elf-bfd.h"
31d99776
DJ
14499
14500int
14501main ()
14502{
def63ff0 14503return bfd_get_elf_phdr_upper_bound (NULL);
31d99776
DJ
14504 ;
14505 return 0;
14506}
14507_ACEOF
81ecdfbb 14508if ac_fn_c_try_link "$LINENO"; then :
31d99776
DJ
14509 gdb_cv_var_elf=yes
14510else
81ecdfbb 14511 gdb_cv_var_elf=no
31d99776 14512fi
81ecdfbb
RW
14513rm -f core conftest.err conftest.$ac_objext \
14514 conftest$ac_exeext conftest.$ac_ext
31d99776 14515fi
81ecdfbb
RW
14516{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
14517$as_echo "$gdb_cv_var_elf" >&6; }
def63ff0
TT
14518 CFLAGS=$OLD_CFLAGS
14519 LDFLAGS=$OLD_LDFLAGS
14520 LIBS=$OLD_LIBS
31d99776 14521if test $gdb_cv_var_elf = yes; then
d4777acb 14522 CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o dtrace-probe.o"
31d99776 14523
81ecdfbb 14524$as_echo "#define HAVE_ELF 1" >>confdefs.h
31d99776 14525
075ff26d
JK
14526 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
14527 if test "$plugins" = "yes"; then
a48b32c0
L
14528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
14529$as_echo_n "checking for library containing dlopen... " >&6; }
14530if test "${ac_cv_search_dlopen+set}" = set; then :
14531 $as_echo_n "(cached) " >&6
14532else
14533 ac_func_search_save_LIBS=$LIBS
14534cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14535/* end confdefs.h. */
14536
14537/* Override any GCC internal prototype to avoid an error.
14538 Use char because int might match the return type of a GCC
14539 builtin and then its argument prototype would still apply. */
14540#ifdef __cplusplus
14541extern "C"
14542#endif
14543char dlopen ();
14544int
14545main ()
14546{
14547return dlopen ();
14548 ;
14549 return 0;
14550}
14551_ACEOF
14552for ac_lib in '' dl; do
14553 if test -z "$ac_lib"; then
14554 ac_res="none required"
14555 else
14556 ac_res=-l$ac_lib
14557 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
14558 fi
14559 if ac_fn_c_try_link "$LINENO"; then :
14560 ac_cv_search_dlopen=$ac_res
14561fi
14562rm -f core conftest.err conftest.$ac_objext \
14563 conftest$ac_exeext
14564 if test "${ac_cv_search_dlopen+set}" = set; then :
14565 break
14566fi
14567done
14568if test "${ac_cv_search_dlopen+set}" = set; then :
14569
14570else
14571 ac_cv_search_dlopen=no
14572fi
14573rm conftest.$ac_ext
14574LIBS=$ac_func_search_save_LIBS
14575fi
14576{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
14577$as_echo "$ac_cv_search_dlopen" >&6; }
14578ac_res=$ac_cv_search_dlopen
14579if test "$ac_res" != no; then :
14580 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14581
14582fi
14583
075ff26d 14584 fi
31d99776 14585fi
31d99776 14586
4f05add4
TT
14587# Add macho support to GDB, but only if BFD includes it.
14588
14589 OLD_CFLAGS=$CFLAGS
14590 OLD_LDFLAGS=$LDFLAGS
14591 OLD_LIBS=$LIBS
14592 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
14593 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
14594 # always want our bfd.
14595 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
5a2d4533
L
14596 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
14597 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
4f05add4 14598 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
711a72d3 14599 LIBS="-lbfd -liberty -lz $intl $LIBS"
4f05add4
TT
14600 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5
14601$as_echo_n "checking for Mach-O support in BFD... " >&6; }
14602if test "${gdb_cv_var_macho+set}" = set; then :
14603 $as_echo_n "(cached) " >&6
14604else
14605 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14606/* end confdefs.h. */
14607#include <stdlib.h>
14608 #include "bfd.h"
14609 #include "mach-o.h"
14610
14611int
14612main ()
14613{
14614return bfd_mach_o_lookup_command (NULL, 0, NULL);
14615 ;
14616 return 0;
14617}
14618_ACEOF
14619if ac_fn_c_try_link "$LINENO"; then :
14620 gdb_cv_var_macho=yes
14621else
14622 gdb_cv_var_macho=no
14623fi
14624rm -f core conftest.err conftest.$ac_objext \
14625 conftest$ac_exeext conftest.$ac_ext
14626fi
14627{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5
14628$as_echo "$gdb_cv_var_macho" >&6; }
14629 CFLAGS=$OLD_CFLAGS
14630 LDFLAGS=$OLD_LDFLAGS
14631 LIBS=$OLD_LIBS
14632if test $gdb_cv_var_macho = yes; then
14633 CONFIG_OBS="$CONFIG_OBS machoread.o"
14634fi
14635
121ce6e5
DJ
14636# Add any host-specific objects to GDB.
14637CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
14638
608e2dbb
TT
14639# If building on ELF, look for lzma support for embedded compressed debug info.
14640if test $gdb_cv_var_elf = yes; then
14641
14642# Check whether --with-lzma was given.
14643if test "${with_lzma+set}" = set; then :
14644 withval=$with_lzma;
14645else
14646 with_lzma=auto
14647fi
14648
14649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5
14650$as_echo_n "checking whether to use lzma... " >&6; }
14651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5
14652$as_echo "$with_lzma" >&6; }
14653
14654 if test "${with_lzma}" != no; then
14655
14656
14657
14658
14659
14660
14661
14662
14663 use_additional=yes
14664
14665 acl_save_prefix="$prefix"
14666 prefix="$acl_final_prefix"
14667 acl_save_exec_prefix="$exec_prefix"
14668 exec_prefix="$acl_final_exec_prefix"
14669
14670 eval additional_includedir=\"$includedir\"
14671 eval additional_libdir=\"$libdir\"
14672
14673 exec_prefix="$acl_save_exec_prefix"
14674 prefix="$acl_save_prefix"
14675
14676
14677# Check whether --with-liblzma-prefix was given.
14678if test "${with_liblzma_prefix+set}" = set; then :
14679 withval=$with_liblzma_prefix;
14680 if test "X$withval" = "Xno"; then
14681 use_additional=no
14682 else
14683 if test "X$withval" = "X"; then
14684
14685 acl_save_prefix="$prefix"
14686 prefix="$acl_final_prefix"
14687 acl_save_exec_prefix="$exec_prefix"
14688 exec_prefix="$acl_final_exec_prefix"
14689
14690 eval additional_includedir=\"$includedir\"
14691 eval additional_libdir=\"$libdir\"
14692
14693 exec_prefix="$acl_save_exec_prefix"
14694 prefix="$acl_save_prefix"
14695
14696 else
14697 additional_includedir="$withval/include"
14698 additional_libdir="$withval/lib"
14699 fi
14700 fi
14701
14702fi
14703
14704 LIBLZMA=
14705 LTLIBLZMA=
14706 INCLZMA=
14707 rpathdirs=
14708 ltrpathdirs=
14709 names_already_handled=
14710 names_next_round='lzma '
14711 while test -n "$names_next_round"; do
14712 names_this_round="$names_next_round"
14713 names_next_round=
14714 for name in $names_this_round; do
14715 already_handled=
14716 for n in $names_already_handled; do
14717 if test "$n" = "$name"; then
14718 already_handled=yes
14719 break
14720 fi
14721 done
14722 if test -z "$already_handled"; then
14723 names_already_handled="$names_already_handled $name"
14724 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
14725 eval value=\"\$HAVE_LIB$uppername\"
14726 if test -n "$value"; then
14727 if test "$value" = yes; then
14728 eval value=\"\$LIB$uppername\"
14729 test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value"
14730 eval value=\"\$LTLIB$uppername\"
14731 test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value"
14732 else
14733 :
14734 fi
14735 else
14736 found_dir=
14737 found_la=
14738 found_so=
14739 found_a=
14740 if test $use_additional = yes; then
14741 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
14742 found_dir="$additional_libdir"
14743 found_so="$additional_libdir/lib$name.$shlibext"
14744 if test -f "$additional_libdir/lib$name.la"; then
14745 found_la="$additional_libdir/lib$name.la"
14746 fi
14747 else
14748 if test -f "$additional_libdir/lib$name.$libext"; then
14749 found_dir="$additional_libdir"
14750 found_a="$additional_libdir/lib$name.$libext"
14751 if test -f "$additional_libdir/lib$name.la"; then
14752 found_la="$additional_libdir/lib$name.la"
14753 fi
14754 fi
14755 fi
14756 fi
14757 if test "X$found_dir" = "X"; then
14758 for x in $LDFLAGS $LTLIBLZMA; do
14759
14760 acl_save_prefix="$prefix"
14761 prefix="$acl_final_prefix"
14762 acl_save_exec_prefix="$exec_prefix"
14763 exec_prefix="$acl_final_exec_prefix"
14764 eval x=\"$x\"
14765 exec_prefix="$acl_save_exec_prefix"
14766 prefix="$acl_save_prefix"
14767
14768 case "$x" in
14769 -L*)
14770 dir=`echo "X$x" | sed -e 's/^X-L//'`
14771 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
14772 found_dir="$dir"
14773 found_so="$dir/lib$name.$shlibext"
14774 if test -f "$dir/lib$name.la"; then
14775 found_la="$dir/lib$name.la"
14776 fi
14777 else
14778 if test -f "$dir/lib$name.$libext"; then
14779 found_dir="$dir"
14780 found_a="$dir/lib$name.$libext"
14781 if test -f "$dir/lib$name.la"; then
14782 found_la="$dir/lib$name.la"
14783 fi
14784 fi
14785 fi
14786 ;;
14787 esac
14788 if test "X$found_dir" != "X"; then
14789 break
14790 fi
14791 done
14792 fi
14793 if test "X$found_dir" != "X"; then
14794 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name"
14795 if test "X$found_so" != "X"; then
14796 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
14797 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
14798 else
14799 haveit=
14800 for x in $ltrpathdirs; do
14801 if test "X$x" = "X$found_dir"; then
14802 haveit=yes
14803 break
14804 fi
14805 done
14806 if test -z "$haveit"; then
14807 ltrpathdirs="$ltrpathdirs $found_dir"
14808 fi
14809 if test "$hardcode_direct" = yes; then
14810 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
14811 else
14812 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
14813 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
14814 haveit=
14815 for x in $rpathdirs; do
14816 if test "X$x" = "X$found_dir"; then
14817 haveit=yes
14818 break
14819 fi
14820 done
14821 if test -z "$haveit"; then
14822 rpathdirs="$rpathdirs $found_dir"
14823 fi
14824 else
14825 haveit=
14826 for x in $LDFLAGS $LIBLZMA; do
14827
14828 acl_save_prefix="$prefix"
14829 prefix="$acl_final_prefix"
14830 acl_save_exec_prefix="$exec_prefix"
14831 exec_prefix="$acl_final_exec_prefix"
14832 eval x=\"$x\"
14833 exec_prefix="$acl_save_exec_prefix"
14834 prefix="$acl_save_prefix"
14835
14836 if test "X$x" = "X-L$found_dir"; then
14837 haveit=yes
14838 break
14839 fi
14840 done
14841 if test -z "$haveit"; then
14842 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir"
14843 fi
14844 if test "$hardcode_minus_L" != no; then
14845 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
14846 else
14847 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
14848 fi
14849 fi
14850 fi
14851 fi
14852 else
14853 if test "X$found_a" != "X"; then
14854 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a"
14855 else
14856 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name"
14857 fi
14858 fi
14859 additional_includedir=
14860 case "$found_dir" in
14861 */lib | */lib/)
14862 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
14863 additional_includedir="$basedir/include"
14864 ;;
14865 esac
14866 if test "X$additional_includedir" != "X"; then
14867 if test "X$additional_includedir" != "X/usr/include"; then
14868 haveit=
14869 if test "X$additional_includedir" = "X/usr/local/include"; then
14870 if test -n "$GCC"; then
14871 case $host_os in
14872 linux*) haveit=yes;;
14873 esac
14874 fi
14875 fi
14876 if test -z "$haveit"; then
14877 for x in $CPPFLAGS $INCLZMA; do
14878
14879 acl_save_prefix="$prefix"
14880 prefix="$acl_final_prefix"
14881 acl_save_exec_prefix="$exec_prefix"
14882 exec_prefix="$acl_final_exec_prefix"
14883 eval x=\"$x\"
14884 exec_prefix="$acl_save_exec_prefix"
14885 prefix="$acl_save_prefix"
14886
14887 if test "X$x" = "X-I$additional_includedir"; then
14888 haveit=yes
14889 break
14890 fi
14891 done
14892 if test -z "$haveit"; then
14893 if test -d "$additional_includedir"; then
14894 INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir"
14895 fi
14896 fi
14897 fi
14898 fi
14899 fi
14900 if test -n "$found_la"; then
14901 save_libdir="$libdir"
14902 case "$found_la" in
14903 */* | *\\*) . "$found_la" ;;
14904 *) . "./$found_la" ;;
14905 esac
14906 libdir="$save_libdir"
14907 for dep in $dependency_libs; do
14908 case "$dep" in
14909 -L*)
14910 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
14911 if test "X$additional_libdir" != "X/usr/lib"; then
14912 haveit=
14913 if test "X$additional_libdir" = "X/usr/local/lib"; then
14914 if test -n "$GCC"; then
14915 case $host_os in
14916 linux*) haveit=yes;;
14917 esac
14918 fi
14919 fi
14920 if test -z "$haveit"; then
14921 haveit=
14922 for x in $LDFLAGS $LIBLZMA; do
14923
14924 acl_save_prefix="$prefix"
14925 prefix="$acl_final_prefix"
14926 acl_save_exec_prefix="$exec_prefix"
14927 exec_prefix="$acl_final_exec_prefix"
14928 eval x=\"$x\"
14929 exec_prefix="$acl_save_exec_prefix"
14930 prefix="$acl_save_prefix"
14931
14932 if test "X$x" = "X-L$additional_libdir"; then
14933 haveit=yes
14934 break
14935 fi
14936 done
14937 if test -z "$haveit"; then
14938 if test -d "$additional_libdir"; then
14939 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir"
14940 fi
14941 fi
14942 haveit=
14943 for x in $LDFLAGS $LTLIBLZMA; do
14944
14945 acl_save_prefix="$prefix"
14946 prefix="$acl_final_prefix"
14947 acl_save_exec_prefix="$exec_prefix"
14948 exec_prefix="$acl_final_exec_prefix"
14949 eval x=\"$x\"
14950 exec_prefix="$acl_save_exec_prefix"
14951 prefix="$acl_save_prefix"
14952
14953 if test "X$x" = "X-L$additional_libdir"; then
14954 haveit=yes
14955 break
14956 fi
14957 done
14958 if test -z "$haveit"; then
14959 if test -d "$additional_libdir"; then
14960 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir"
14961 fi
14962 fi
14963 fi
14964 fi
14965 ;;
14966 -R*)
14967 dir=`echo "X$dep" | sed -e 's/^X-R//'`
14968 if test "$enable_rpath" != no; then
14969 haveit=
14970 for x in $rpathdirs; do
14971 if test "X$x" = "X$dir"; then
14972 haveit=yes
14973 break
14974 fi
14975 done
14976 if test -z "$haveit"; then
14977 rpathdirs="$rpathdirs $dir"
14978 fi
14979 haveit=
14980 for x in $ltrpathdirs; do
14981 if test "X$x" = "X$dir"; then
14982 haveit=yes
14983 break
14984 fi
14985 done
14986 if test -z "$haveit"; then
14987 ltrpathdirs="$ltrpathdirs $dir"
14988 fi
14989 fi
14990 ;;
14991 -l*)
14992 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
14993 ;;
14994 *.la)
14995 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
14996 ;;
14997 *)
14998 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep"
14999 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep"
15000 ;;
15001 esac
15002 done
15003 fi
15004 else
15005 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
15006 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name"
15007 fi
15008 fi
15009 fi
15010 done
15011 done
15012 if test "X$rpathdirs" != "X"; then
15013 if test -n "$hardcode_libdir_separator"; then
15014 alldirs=
15015 for found_dir in $rpathdirs; do
15016 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
15017 done
15018 acl_save_libdir="$libdir"
15019 libdir="$alldirs"
15020 eval flag=\"$hardcode_libdir_flag_spec\"
15021 libdir="$acl_save_libdir"
15022 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
15023 else
15024 for found_dir in $rpathdirs; do
15025 acl_save_libdir="$libdir"
15026 libdir="$found_dir"
15027 eval flag=\"$hardcode_libdir_flag_spec\"
15028 libdir="$acl_save_libdir"
15029 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
15030 done
15031 fi
15032 fi
15033 if test "X$ltrpathdirs" != "X"; then
15034 for found_dir in $ltrpathdirs; do
15035 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir"
15036 done
15037 fi
15038
15039
15040 ac_save_CPPFLAGS="$CPPFLAGS"
15041
15042 for element in $INCLZMA; do
15043 haveit=
15044 for x in $CPPFLAGS; do
15045
15046 acl_save_prefix="$prefix"
15047 prefix="$acl_final_prefix"
15048 acl_save_exec_prefix="$exec_prefix"
15049 exec_prefix="$acl_final_exec_prefix"
15050 eval x=\"$x\"
15051 exec_prefix="$acl_save_exec_prefix"
15052 prefix="$acl_save_prefix"
15053
15054 if test "X$x" = "X$element"; then
15055 haveit=yes
15056 break
15057 fi
15058 done
15059 if test -z "$haveit"; then
15060 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
15061 fi
15062 done
15063
15064
15065 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5
15066$as_echo_n "checking for liblzma... " >&6; }
15067if test "${ac_cv_liblzma+set}" = set; then :
15068 $as_echo_n "(cached) " >&6
15069else
15070
15071 ac_save_LIBS="$LIBS"
15072 LIBS="$LIBS $LIBLZMA"
15073 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15074/* end confdefs.h. */
15075#include "lzma.h"
15076int
15077main ()
15078{
15079lzma_index_iter iter;
15080 lzma_index_iter_init (&iter, 0);
15081 lzma_mf_is_supported (LZMA_MF_HC3);
15082 ;
15083 return 0;
15084}
15085_ACEOF
15086if ac_fn_c_try_link "$LINENO"; then :
15087 ac_cv_liblzma=yes
15088else
15089 ac_cv_liblzma=no
15090fi
15091rm -f core conftest.err conftest.$ac_objext \
15092 conftest$ac_exeext conftest.$ac_ext
15093 LIBS="$ac_save_LIBS"
15094
15095fi
15096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5
15097$as_echo "$ac_cv_liblzma" >&6; }
15098 if test "$ac_cv_liblzma" = yes; then
15099 HAVE_LIBLZMA=yes
15100
15101$as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h
15102
15103 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5
15104$as_echo_n "checking how to link with liblzma... " >&6; }
15105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5
15106$as_echo "$LIBLZMA" >&6; }
15107 else
15108 HAVE_LIBLZMA=no
15109 CPPFLAGS="$ac_save_CPPFLAGS"
15110 LIBLZMA=
15111 LTLIBLZMA=
15112 fi
15113
15114
15115
15116
15117
15118
15119 if test "$HAVE_LIBLZMA" != yes; then
15120 if test "$with_lzma" = yes; then
15121 as_fn_error "missing liblzma for --with-lzma" "$LINENO" 5
15122 fi
15123 fi
15124 fi
15125fi
15126
3fc11d3e
JM
15127LIBGUI="../libgui/src/libgui.a"
15128GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
15129
15130
7a292a7a 15131
3fc11d3e
JM
15132WIN32LDAPP=
15133
15134
15135
d91670b9 15136case "${host}" in
686a5eed 15137*-*-cygwin* | *-*-mingw* )
d91670b9
CV
15138 configdir="win"
15139 ;;
15140*)
15141 configdir="unix"
15142 ;;
15143esac
3fc11d3e
JM
15144
15145GDBTKLIBS=
15146if test "${enable_gdbtk}" = "yes"; then
15147
d1c3b63a
KS
15148 # Gdbtk must have an absolute path to srcdir in order to run
15149 # properly when not installed.
15150 here=`pwd`
15151 cd ${srcdir}
15152 GDBTK_SRC_DIR=`pwd`
15153 cd $here
15154
bec39cab 15155
5062cc19
KS
15156 #
15157 # Ok, lets find the tcl configuration
15158 # First, look for one uninstalled.
15159 # the alternative search directory is invoked by --with-tcl
15160 #
3fc11d3e 15161
5062cc19
KS
15162 if test x"${no_tcl}" = x ; then
15163 # we reset no_tcl in case something fails here
15164 no_tcl=true
bec39cab 15165
81ecdfbb
RW
15166# Check whether --with-tcl was given.
15167if test "${with_tcl+set}" = set; then :
15168 withval=$with_tcl; with_tclconfig=${withval}
15169fi
15170
15171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
15172$as_echo_n "checking for Tcl configuration... " >&6; }
15173 if test "${ac_cv_c_tclconfig+set}" = set; then :
15174 $as_echo_n "(cached) " >&6
3fc11d3e 15175else
bec39cab 15176
3fc11d3e 15177
5062cc19
KS
15178 # First check to see if --with-tcl was specified.
15179 case "${host}" in
15180 *-*-cygwin*) platDir="win" ;;
15181 *) platDir="unix" ;;
15182 esac
15183 if test x"${with_tclconfig}" != x ; then
15184 if test -f "${with_tclconfig}/tclConfig.sh" ; then
15185 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
15186 else
81ecdfbb 15187 as_fn_error "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
5062cc19
KS
15188 fi
15189 fi
15190
15191 # then check for a private Tcl installation
15192 if test x"${ac_cv_c_tclconfig}" = x ; then
15193 for i in \
15194 ../tcl \
15195 `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
15196 `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
15197 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
15198 ../../tcl \
15199 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
15200 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
15201 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
15202 ../../../tcl \
15203 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
15204 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
15205 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
15206 if test -f "$i/$platDir/tclConfig.sh" ; then
15207 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
15208 break
15209 fi
15210 done
15211 fi
15212
15213 # on Darwin, check in Framework installation locations
15214 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
15215 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
15216 `ls -d /Library/Frameworks 2>/dev/null` \
15217 `ls -d /Network/Library/Frameworks 2>/dev/null` \
15218 `ls -d /System/Library/Frameworks 2>/dev/null` \
15219 ; do
15220 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
15221 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
15222 break
15223 fi
15224 done
15225 fi
15226
15227 # check in a few common install locations
15228 if test x"${ac_cv_c_tclconfig}" = x ; then
15229 for i in `ls -d ${libdir} 2>/dev/null` \
15230 `ls -d ${exec_prefix}/lib 2>/dev/null` \
15231 `ls -d ${prefix}/lib 2>/dev/null` \
15232 `ls -d /usr/local/lib 2>/dev/null` \
15233 `ls -d /usr/contrib/lib 2>/dev/null` \
15234 `ls -d /usr/lib 2>/dev/null` \
15235 ; do
15236 if test -f "$i/tclConfig.sh" ; then
15237 ac_cv_c_tclconfig=`(cd $i; pwd)`
15238 break
15239 fi
15240 done
15241 fi
3fc11d3e 15242
5062cc19
KS
15243 # check in a few other private locations
15244 if test x"${ac_cv_c_tclconfig}" = x ; then
15245 for i in \
15246 ${srcdir}/../tcl \
15247 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
15248 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
15249 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
15250 if test -f "$i/$platDir/tclConfig.sh" ; then
15251 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
15252 break
15253 fi
15254 done
15255 fi
bec39cab 15256
3fc11d3e
JM
15257fi
15258
5062cc19
KS
15259
15260 if test x"${ac_cv_c_tclconfig}" = x ; then
15261 TCL_BIN_DIR="# no Tcl configs found"
81ecdfbb
RW
15262 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
15263$as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
5062cc19
KS
15264 else
15265 no_tcl=
15266 TCL_BIN_DIR=${ac_cv_c_tclconfig}
81ecdfbb
RW
15267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
15268$as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
5062cc19
KS
15269 fi
15270 fi
3fc11d3e 15271
bec39cab 15272
85541719
DE
15273 # If $no_tk is nonempty, then we can't do Tk, and there is no
15274 # point to doing Tcl.
bec39cab 15275
5062cc19
KS
15276 #
15277 # Ok, lets find the tk configuration
15278 # First, look for one uninstalled.
15279 # the alternative search directory is invoked by --with-tk
15280 #
3fc11d3e 15281
5062cc19
KS
15282 if test x"${no_tk}" = x ; then
15283 # we reset no_tk in case something fails here
15284 no_tk=true
bec39cab 15285
81ecdfbb
RW
15286# Check whether --with-tk was given.
15287if test "${with_tk+set}" = set; then :
15288 withval=$with_tk; with_tkconfig=${withval}
15289fi
15290
15291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
15292$as_echo_n "checking for Tk configuration... " >&6; }
15293 if test "${ac_cv_c_tkconfig+set}" = set; then :
15294 $as_echo_n "(cached) " >&6
bec39cab 15295else
3fc11d3e
JM
15296
15297
5062cc19
KS
15298 # First check to see if --with-tkconfig was specified.
15299 if test x"${with_tkconfig}" != x ; then
15300 if test -f "${with_tkconfig}/tkConfig.sh" ; then
15301 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
15302 else
81ecdfbb 15303 as_fn_error "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
5062cc19
KS
15304 fi
15305 fi
3fc11d3e 15306
5062cc19
KS
15307 # then check for a private Tk library
15308 case "${host}" in
15309 *-*-cygwin*) platDir="win" ;;
15310 *) platDir="unix" ;;
15311 esac
15312 if test x"${ac_cv_c_tkconfig}" = x ; then
15313 for i in \
15314 ../tk \
15315 `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
15316 `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
15317 `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
15318 ../../tk \
15319 `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
15320 `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
15321 `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
15322 ../../../tk \
15323 `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
15324 `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
15325 `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
15326 if test -f "$i/$platDir/tkConfig.sh" ; then
15327 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
15328 break
15329 fi
15330 done
15331 fi
15332
15333 # on Darwin, check in Framework installation locations
15334 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
15335 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
15336 `ls -d /Library/Frameworks 2>/dev/null` \
15337 `ls -d /Network/Library/Frameworks 2>/dev/null` \
15338 `ls -d /System/Library/Frameworks 2>/dev/null` \
15339 ; do
15340 if test -f "$i/Tk.framework/tkConfig.sh" ; then
15341 ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
15342 break
15343 fi
15344 done
15345 fi
15346
15347 # check in a few common install locations
15348 if test x"${ac_cv_c_tkconfig}" = x ; then
15349 for i in `ls -d ${libdir} 2>/dev/null` \
15350 `ls -d ${exec_prefix}/lib 2>/dev/null` \
15351 `ls -d ${prefix}/lib 2>/dev/null` \
15352 `ls -d /usr/local/lib 2>/dev/null` \
15353 `ls -d /usr/contrib/lib 2>/dev/null` \
15354 `ls -d /usr/lib 2>/dev/null` \
15355 ; do
15356 if test -f "$i/tkConfig.sh" ; then
15357 ac_cv_c_tkconfig=`(cd $i; pwd)`
15358 break
15359 fi
15360 done
15361 fi
15362 # check in a few other private locations
15363 if test x"${ac_cv_c_tkconfig}" = x ; then
15364 for i in \
15365 ${srcdir}/../tk \
15366 `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
15367 `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
15368 `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
15369 if test -f "$i/$platDir/tkConfig.sh" ; then
15370 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
15371 break
15372 fi
15373 done
15374 fi
3fc11d3e 15375
3fc11d3e
JM
15376fi
15377
15378
5062cc19
KS
15379 if test x"${ac_cv_c_tkconfig}" = x ; then
15380 TK_BIN_DIR="# no Tk configs found"
81ecdfbb
RW
15381 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
15382$as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
5062cc19
KS
15383 else
15384 no_tk=
15385 TK_BIN_DIR=${ac_cv_c_tkconfig}
81ecdfbb
RW
15386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
15387$as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
5062cc19 15388 fi
3fc11d3e 15389 fi
dd2504ab 15390
dd2504ab 15391
85541719
DE
15392 if test -z "${no_tcl}" -a -z "${no_tk}"; then
15393
81ecdfbb
RW
15394 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
15395$as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
85541719
DE
15396
15397 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
81ecdfbb
RW
15398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
15399$as_echo "loading" >&6; }
85541719
DE
15400 . ${TCL_BIN_DIR}/tclConfig.sh
15401 else
81ecdfbb
RW
15402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
15403$as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
85541719
DE
15404 fi
15405
15406 # eval is required to do the TCL_DBGX substitution
15407 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
15408 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
15409
15410 # If the TCL_BIN_DIR is the build directory (not the install directory),
15411 # then set the common variable name to the value of the build variables.
15412 # For example, the variable TCL_LIB_SPEC will be set to the value
15413 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
15414 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
15415 # installed and uninstalled version of Tcl.
15416 if test -f "${TCL_BIN_DIR}/Makefile" ; then
15417 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
15418 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
15419 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
15420 elif test "`uname -s`" = "Darwin"; then
15421 # If Tcl was built as a framework, attempt to use the libraries
15422 # from the framework at the given location so that linking works
a68ffae9 15423 # against Tcl.framework installed in an arbitrary location.
85541719
DE
15424 case ${TCL_DEFS} in
15425 *TCL_FRAMEWORK*)
15426 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
15427 for i in "`cd ${TCL_BIN_DIR}; pwd`" \
15428 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
15429 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
15430 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
15431 break
15432 fi
15433 done
15434 fi
15435 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
15436 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
15437 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
15438 fi
15439 ;;
15440 esac
15441 fi
15442
15443 # eval is required to do the TCL_DBGX substitution
15444 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
15445 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
15446 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
15447 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
15448
15449
15450
15451
15452
15453
15454
15455
15456
15457
15458
15459
15460
15461
15462
15463 # Check for in-tree tcl
15464 here=`pwd`
15465 cd ${srcdir}/..
15466 topdir=`pwd`
15467 cd ${here}
15468
15469 intree="no"
15470 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
15471 intree="yes"
15472 fi
15473
15474 # Find Tcl private headers
15475 if test x"${intree}" = xno; then
15476
81ecdfbb
RW
15477 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
15478$as_echo_n "checking for Tcl private headers... " >&6; }
85541719
DE
15479 private_dir=""
15480 dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
15481 if test -f ${dir}/tclInt.h ; then
15482 private_dir=${dir}
15483 fi
15484
15485 if test x"${private_dir}" = x; then
81ecdfbb 15486 as_fn_error "could not find private Tcl headers" "$LINENO" 5
85541719
DE
15487 else
15488 TCL_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
15489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
15490$as_echo "${private_dir}" >&6; }
85541719
DE
15491 fi
15492
15493 TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
15494 TCL_LIBRARY="${TCL_LIB_SPEC}"
15495 TCL_DEPS=""
15496 else
15497 # If building tcl in the same src tree, private headers
15498 # are not needed, but we need to be sure to use the right
15499 # headers library
15500 TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
15501 TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
15502 TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
15503 fi
15504
15505
15506
15507
15508
81ecdfbb
RW
15509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
15510$as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
dd2504ab 15511
5062cc19 15512 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
81ecdfbb
RW
15513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
15514$as_echo "loading" >&6; }
5062cc19 15515 . ${TK_BIN_DIR}/tkConfig.sh
3fc11d3e 15516 else
81ecdfbb
RW
15517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
15518$as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
3fc11d3e 15519 fi
bec39cab 15520
5062cc19
KS
15521 # eval is required to do the TK_DBGX substitution
15522 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
15523 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
15524
15525 # If the TK_BIN_DIR is the build directory (not the install directory),
15526 # then set the common variable name to the value of the build variables.
15527 # For example, the variable TK_LIB_SPEC will be set to the value
15528 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
15529 # instead of TK_BUILD_LIB_SPEC since it will work with both an
15530 # installed and uninstalled version of Tcl.
85541719 15531 if test -f "${TK_BIN_DIR}/Makefile" ; then
5062cc19
KS
15532 TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
15533 TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
15534 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
15535 elif test "`uname -s`" = "Darwin"; then
15536 # If Tk was built as a framework, attempt to use the libraries
15537 # from the framework at the given location so that linking works
a68ffae9 15538 # against Tk.framework installed in an arbitrary location.
5062cc19
KS
15539 case ${TK_DEFS} in
15540 *TK_FRAMEWORK*)
85541719 15541 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
5062cc19
KS
15542 for i in "`cd ${TK_BIN_DIR}; pwd`" \
15543 "`cd ${TK_BIN_DIR}/../..; pwd`"; do
15544 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
15545 TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
15546 break
15547 fi
15548 done
15549 fi
85541719 15550 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
5062cc19
KS
15551 TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
15552 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
15553 fi
15554 ;;
15555 esac
3fc11d3e
JM
15556 fi
15557
5062cc19
KS
15558 # eval is required to do the TK_DBGX substitution
15559 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
15560 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
15561 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
15562 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
3fc11d3e 15563
3fc11d3e
JM
15564
15565
bec39cab
AC
15566
15567
15568
15569
15570
15571
15572
3fc11d3e 15573
3fc11d3e 15574
bec39cab 15575
bec39cab 15576
85541719
DE
15577 # Check for in-tree Tk
15578 intree="no"
15579 if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
15580 intree="yes"
15581 fi
3fc11d3e 15582
85541719
DE
15583 # Find Tk private headers
15584 if test x"${intree}" = xno; then
3fc11d3e 15585
81ecdfbb
RW
15586 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
15587$as_echo_n "checking for Tk private headers... " >&6; }
5062cc19
KS
15588 private_dir=""
15589 dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
15590 if test -f ${dir}/tkInt.h; then
15591 private_dir=${dir}
3fc11d3e 15592 fi
bec39cab 15593
5062cc19 15594 if test x"${private_dir}" = x; then
81ecdfbb 15595 as_fn_error "could not find Tk private headers" "$LINENO" 5
3fc11d3e 15596 else
5062cc19 15597 TK_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
15598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
15599$as_echo "${private_dir}" >&6; }
3fc11d3e 15600 fi
3fc11d3e 15601
85541719
DE
15602 TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
15603 TK_LIBRARY=${TK_LIB_SPEC}
15604 TK_DEPS=""
15605 else
15606 TK_INCLUDE="-I${TK_SRC_DIR}/generic"
15607 TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
15608 TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
15609 fi
3fc11d3e
JM
15610
15611
3fc11d3e
JM
15612
15613
3fc11d3e 15614
85541719 15615 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e 15616
85541719
DE
15617 # Include some libraries that Tcl and Tk want.
15618 TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
15619 # Yes, the ordering seems wrong here. But it isn't.
15620 # TK_LIBS is the list of libraries that need to be linked
15621 # after Tcl/Tk. Note that this isn't put into LIBS. If it
15622 # were in LIBS then any link tests after this point would
15623 # try to include things like `$(LIBGUI)', which wouldn't work.
15624 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5 15625
85541719
DE
15626 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
15627 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
15628 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
15629 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
15630 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
15631 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
15632 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
3fc11d3e 15633
85541719
DE
15634 if test x$gdb_cv_os_cygwin = xyes; then
15635 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
15636 WIN32LDAPP="-Wl,--subsystem,console"
15637 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
3fc11d3e 15638 fi
ffc6a242 15639
81ecdfbb 15640 subdirs="$subdirs gdbtk"
3ace7edb 15641
85541719 15642 fi
3fc11d3e
JM
15643fi
15644
15645
15646
15647
15648
15649
15650
15651
81ecdfbb
RW
15652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
15653$as_echo_n "checking for X... " >&6; }
bec39cab 15654
c906108c 15655
81ecdfbb
RW
15656# Check whether --with-x was given.
15657if test "${with_x+set}" = set; then :
15658 withval=$with_x;
15659fi
c906108c
SS
15660
15661# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
15662if test "x$with_x" = xno; then
15663 # The user explicitly disabled X.
15664 have_x=disabled
15665else
81ecdfbb
RW
15666 case $x_includes,$x_libraries in #(
15667 *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
15668 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
15669 $as_echo_n "(cached) " >&6
c906108c
SS
15670else
15671 # One or both of the vars are not set, and there is no cached value.
bec39cab 15672ac_x_includes=no ac_x_libraries=no
81ecdfbb 15673rm -f -r conftest.dir
bec39cab
AC
15674if mkdir conftest.dir; then
15675 cd conftest.dir
bec39cab 15676 cat >Imakefile <<'_ACEOF'
81ecdfbb
RW
15677incroot:
15678 @echo incroot='${INCROOT}'
15679usrlibdir:
15680 @echo usrlibdir='${USRLIBDIR}'
15681libdir:
15682 @echo libdir='${LIBDIR}'
15683_ACEOF
15684 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
c906108c 15685 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
81ecdfbb
RW
15686 for ac_var in incroot usrlibdir libdir; do
15687 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
15688 done
c906108c 15689 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
81ecdfbb
RW
15690 for ac_extension in a so sl dylib la dll; do
15691 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
15692 test -f "$ac_im_libdir/libX11.$ac_extension"; then
bec39cab 15693 ac_im_usrlibdir=$ac_im_libdir; break
c906108c
SS
15694 fi
15695 done
15696 # Screen out bogus values from the imake configuration. They are
15697 # bogus both because they are the default anyway, and because
15698 # using them would break gcc on systems where it needs fixed includes.
bec39cab 15699 case $ac_im_incroot in
81ecdfbb 15700 /usr/include) ac_x_includes= ;;
bec39cab 15701 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
c906108c 15702 esac
bec39cab 15703 case $ac_im_usrlibdir in
81ecdfbb 15704 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
bec39cab 15705 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
c906108c
SS
15706 esac
15707 fi
15708 cd ..
81ecdfbb 15709 rm -f -r conftest.dir
c906108c
SS
15710fi
15711
bec39cab
AC
15712# Standard set of common directories for X headers.
15713# Check X11 before X11Rn because it is often a symlink to the current release.
15714ac_x_header_dirs='
15715/usr/X11/include
81ecdfbb 15716/usr/X11R7/include
bec39cab
AC
15717/usr/X11R6/include
15718/usr/X11R5/include
15719/usr/X11R4/include
15720
15721/usr/include/X11
81ecdfbb 15722/usr/include/X11R7
bec39cab
AC
15723/usr/include/X11R6
15724/usr/include/X11R5
15725/usr/include/X11R4
15726
15727/usr/local/X11/include
81ecdfbb 15728/usr/local/X11R7/include
bec39cab
AC
15729/usr/local/X11R6/include
15730/usr/local/X11R5/include
15731/usr/local/X11R4/include
15732
15733/usr/local/include/X11
81ecdfbb 15734/usr/local/include/X11R7
bec39cab
AC
15735/usr/local/include/X11R6
15736/usr/local/include/X11R5
15737/usr/local/include/X11R4
15738
15739/usr/X386/include
15740/usr/x386/include
15741/usr/XFree86/include/X11
15742
15743/usr/include
15744/usr/local/include
15745/usr/unsupported/include
15746/usr/athena/include
15747/usr/local/x11r5/include
15748/usr/lpp/Xamples/include
15749
15750/usr/openwin/include
15751/usr/openwin/share/include'
15752
15753if test "$ac_x_includes" = no; then
81ecdfbb 15754 # Guess where to find include files, by looking for Xlib.h.
c906108c 15755 # First, try using that file with no special directory specified.
81ecdfbb 15756 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15757/* end confdefs.h. */
81ecdfbb 15758#include <X11/Xlib.h>
bec39cab 15759_ACEOF
81ecdfbb 15760if ac_fn_c_try_cpp "$LINENO"; then :
c906108c
SS
15761 # We can compile using X headers with no special include directory.
15762ac_x_includes=
15763else
bec39cab 15764 for ac_dir in $ac_x_header_dirs; do
81ecdfbb 15765 if test -r "$ac_dir/X11/Xlib.h"; then
bec39cab
AC
15766 ac_x_includes=$ac_dir
15767 break
15768 fi
15769done
c906108c 15770fi
bec39cab
AC
15771rm -f conftest.err conftest.$ac_ext
15772fi # $ac_x_includes = no
c906108c 15773
bec39cab 15774if test "$ac_x_libraries" = no; then
c906108c 15775 # Check for the libraries.
c906108c
SS
15776 # See if we find them without any special options.
15777 # Don't add to $LIBS permanently.
bec39cab 15778 ac_save_LIBS=$LIBS
81ecdfbb
RW
15779 LIBS="-lX11 $LIBS"
15780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15781/* end confdefs.h. */
81ecdfbb 15782#include <X11/Xlib.h>
bec39cab
AC
15783int
15784main ()
15785{
81ecdfbb 15786XrmInitialize ()
bec39cab
AC
15787 ;
15788 return 0;
15789}
15790_ACEOF
81ecdfbb 15791if ac_fn_c_try_link "$LINENO"; then :
bec39cab 15792 LIBS=$ac_save_LIBS
c906108c
SS
15793# We can link X programs with no special library path.
15794ac_x_libraries=
15795else
81ecdfbb
RW
15796 LIBS=$ac_save_LIBS
15797for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
c906108c 15798do
bec39cab 15799 # Don't even attempt the hair of trying to link an X program!
81ecdfbb
RW
15800 for ac_extension in a so sl dylib la dll; do
15801 if test -r "$ac_dir/libX11.$ac_extension"; then
c906108c
SS
15802 ac_x_libraries=$ac_dir
15803 break 2
15804 fi
15805 done
15806done
15807fi
81ecdfbb
RW
15808rm -f core conftest.err conftest.$ac_objext \
15809 conftest$ac_exeext conftest.$ac_ext
bec39cab 15810fi # $ac_x_libraries = no
c906108c 15811
81ecdfbb
RW
15812case $ac_x_includes,$ac_x_libraries in #(
15813 no,* | *,no | *\'*)
15814 # Didn't find X, or a directory has "'" in its name.
15815 ac_cv_have_x="have_x=no";; #(
15816 *)
15817 # Record where we found X for the cache.
15818 ac_cv_have_x="have_x=yes\
15819 ac_x_includes='$ac_x_includes'\
15820 ac_x_libraries='$ac_x_libraries'"
15821esac
c906108c 15822fi
81ecdfbb
RW
15823;; #(
15824 *) have_x=yes;;
15825 esac
c906108c
SS
15826 eval "$ac_cv_have_x"
15827fi # $with_x != no
15828
15829if test "$have_x" != yes; then
81ecdfbb
RW
15830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
15831$as_echo "$have_x" >&6; }
c906108c
SS
15832 no_x=yes
15833else
15834 # If each of the values was on the command line, it overrides each guess.
15835 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
15836 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
15837 # Update the cache value to reflect the command line values.
81ecdfbb
RW
15838 ac_cv_have_x="have_x=yes\
15839 ac_x_includes='$x_includes'\
15840 ac_x_libraries='$x_libraries'"
15841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
15842$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
c906108c
SS
15843fi
15844
15845
bec39cab 15846# Unlike the sim directory, whether a simulator is linked is controlled by
9b624dbe 15847# presence of a gdb_sim definition in the target configure.tgt entry.
7a292a7a
SS
15848# This code just checks for a few cases where we'd like to ignore those
15849# definitions, even when they're present in the '.mt' file. These cases
15850# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 15851# not part of the source tree.
7a292a7a 15852#
81ecdfbb
RW
15853# Check whether --enable-sim was given.
15854if test "${enable_sim+set}" = set; then :
15855 enableval=$enable_sim; echo "enable_sim = $enable_sim";
7a292a7a
SS
15856 echo "enableval = ${enableval}";
15857 case "${enableval}" in
15858 yes) ignore_sim=false ;;
15859 no) ignore_sim=true ;;
15860 *) ignore_sim=false ;;
15861 esac
15862else
15863 ignore_sim=false
81ecdfbb
RW
15864fi
15865
7a292a7a
SS
15866
15867if test ! -d "${srcdir}/../sim"; then
15868 ignore_sim=true
15869fi
15870
9b624dbe
UW
15871SIM=
15872SIM_OBS=
15873if test "${ignore_sim}" = "false"; then
15874 if test x"${gdb_sim}" != x ; then
15875 SIM="${gdb_sim}"
15876 SIM_OBS="remote-sim.o"
60ca704f 15877
81ecdfbb 15878$as_echo "#define WITH_SIM 1" >>confdefs.h
7a292a7a 15879
9b624dbe 15880 fi
7a292a7a
SS
15881fi
15882
15883
15884
c906108c
SS
15885
15886
15887
15888
15889
15890
dfcd3bfb 15891
e56ac5c3
AC
15892
15893
b3a90332
AC
15894
15895
c35f4ffc 15896# List of host floatformats.
bec39cab
AC
15897
15898cat >>confdefs.h <<_ACEOF
c35f4ffc 15899#define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
bec39cab 15900_ACEOF
c35f4ffc 15901
bec39cab
AC
15902
15903cat >>confdefs.h <<_ACEOF
c35f4ffc 15904#define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
bec39cab
AC
15905_ACEOF
15906
c35f4ffc 15907
bec39cab 15908cat >>confdefs.h <<_ACEOF
c35f4ffc 15909#define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
bec39cab 15910_ACEOF
c35f4ffc
AC
15911
15912
c906108c
SS
15913# target_subdir is used by the testsuite to find the target libraries.
15914target_subdir=
15915if test "${host}" != "${target}"; then
15916 target_subdir="${target_alias}/"
15917fi
15918
15919
15920frags=
771b4502 15921if test "${gdb_native}" = "yes"; then
0dad8a66
MK
15922 host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
15923 if test ! -f ${host_makefile_frag}; then
81ecdfbb 15924 as_fn_error "\"*** Gdb does not support native target ${host}\"" "$LINENO" 5
0dad8a66
MK
15925 fi
15926 frags="$frags $host_makefile_frag"
15927else
15928 host_makefile_frag=/dev/null
c906108c 15929fi
c906108c 15930
c906108c
SS
15931
15932
15933
771b4502 15934if test "${gdb_native}" = "yes"; then
a85f51e7
DJ
15935# We pick this up from the host configuration file (.mh) because we
15936# do not have a native configuration Makefile fragment.
c906108c
SS
15937nativefile=`sed -n '
15938s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
15939' ${host_makefile_frag}`
c906108c
SS
15940fi
15941
15942
b00a8037 15943if test x"${gdb_osabi}" != x ; then
bec39cab
AC
15944
15945cat >>confdefs.h <<_ACEOF
b00a8037 15946#define GDB_OSABI_DEFAULT $gdb_osabi
bec39cab 15947_ACEOF
b00a8037
DJ
15948
15949fi
15950
8dcde887 15951# Enable multi-ice-gdb-server.
81ecdfbb
RW
15952# Check whether --enable-multi-ice was given.
15953if test "${enable_multi_ice+set}" = set; then :
15954 enableval=$enable_multi_ice; case $enableval in
8dcde887
MK
15955 yes | no)
15956 ;;
81ecdfbb 15957 *) as_fn_error "bad value $enableval for --enable-multi-ice" "$LINENO" 5 ;;
8dcde887 15958 esac
81ecdfbb 15959fi
b4e70030 15960
81ecdfbb
RW
15961if test "x$enable_multi_ice" = xyes; then
15962 subdirs="$subdirs multi-ice"
3ace7edb 15963
a85f51e7
DJ
15964fi
15965
496c0e1b
JB
15966# Check whether --enable-gdbserver was given.
15967if test "${enable_gdbserver+set}" = set; then :
15968 enableval=$enable_gdbserver; case "${enableval}" in
15969 yes| no|auto) ;;
15970 *) as_fn_error "bad value ${enableval} for --enable-gdbserver option" "$LINENO" 5 ;;
15971esac
15972else
15973 enable_gdbserver=auto
15974fi
15975
15976
15977# We only build gdbserver automatically in a native configuration, and
15978# only if the user did not explicitly disable its build.
15979if test "$gdb_native" = "yes" -a "$enable_gdbserver" != "no"; then
81ecdfbb
RW
15980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5
15981$as_echo_n "checking whether gdbserver is supported on this host... " >&6; }
8dcde887 15982 if test "x$build_gdbserver" = xyes; then
81ecdfbb
RW
15983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15984$as_echo "yes" >&6; }
15985 subdirs="$subdirs gdbserver"
3ace7edb 15986
496c0e1b 15987 gdbserver_build_enabled=yes
8dcde887 15988 else
81ecdfbb
RW
15989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15990$as_echo "no" >&6; }
8dcde887
MK
15991 fi
15992fi
15993
496c0e1b
JB
15994# If the user explicitly request the gdbserver to be built, verify that
15995# we were in fact able to enable it.
15996if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then
15997 as_fn_error "Automatic gdbserver build is not supported for this configuration" "$LINENO" 5
15998fi
15999
393fd4c3
YQ
16000# Check for babeltrace and babeltrace-ctf
16001
16002# Check whether --with-babeltrace was given.
16003if test "${with_babeltrace+set}" = set; then :
16004 withval=$with_babeltrace;
16005else
16006 with_babeltrace=auto
16007fi
16008
16009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltrace" >&5
16010$as_echo_n "checking whether to use babeltrace... " >&6; }
16011{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5
16012$as_echo "$with_babeltrace" >&6; }
16013
16014if test "x$with_babeltrace" = "xno"; then
16015 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&5
16016$as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&2;}
16017else
16018 # Append -Werror to CFLAGS so that configure can catch the warning
16019 # "assignment from incompatible pointer type", which is related to
16020 # the babeltrace change from 1.0.3 to 1.1.0. Babeltrace 1.1.0 works
16021 # in GDB, while babeltrace 1.0.3 is broken.
16022 # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be
16023 # safe to save and restore CFLAGS here.
16024 saved_CFLAGS=$CFLAGS
16025 CFLAGS="$CFLAGS -Werror"
16026
16027
16028
16029
16030
16031
16032
16033
16034 use_additional=yes
16035
16036 acl_save_prefix="$prefix"
16037 prefix="$acl_final_prefix"
16038 acl_save_exec_prefix="$exec_prefix"
16039 exec_prefix="$acl_final_exec_prefix"
16040
16041 eval additional_includedir=\"$includedir\"
16042 eval additional_libdir=\"$libdir\"
16043
16044 exec_prefix="$acl_save_exec_prefix"
16045 prefix="$acl_save_prefix"
16046
16047
16048# Check whether --with-libbabeltrace-prefix was given.
16049if test "${with_libbabeltrace_prefix+set}" = set; then :
16050 withval=$with_libbabeltrace_prefix;
16051 if test "X$withval" = "Xno"; then
16052 use_additional=no
16053 else
16054 if test "X$withval" = "X"; then
16055
16056 acl_save_prefix="$prefix"
16057 prefix="$acl_final_prefix"
16058 acl_save_exec_prefix="$exec_prefix"
16059 exec_prefix="$acl_final_exec_prefix"
16060
16061 eval additional_includedir=\"$includedir\"
16062 eval additional_libdir=\"$libdir\"
16063
16064 exec_prefix="$acl_save_exec_prefix"
16065 prefix="$acl_save_prefix"
16066
16067 else
16068 additional_includedir="$withval/include"
16069 additional_libdir="$withval/lib"
16070 fi
16071 fi
16072
16073fi
16074
16075 LIBBABELTRACE=
16076 LTLIBBABELTRACE=
16077 INCBABELTRACE=
16078 rpathdirs=
16079 ltrpathdirs=
16080 names_already_handled=
16081 names_next_round='babeltrace babeltrace-ctf'
16082 while test -n "$names_next_round"; do
16083 names_this_round="$names_next_round"
16084 names_next_round=
16085 for name in $names_this_round; do
16086 already_handled=
16087 for n in $names_already_handled; do
16088 if test "$n" = "$name"; then
16089 already_handled=yes
16090 break
16091 fi
16092 done
16093 if test -z "$already_handled"; then
16094 names_already_handled="$names_already_handled $name"
16095 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
16096 eval value=\"\$HAVE_LIB$uppername\"
16097 if test -n "$value"; then
16098 if test "$value" = yes; then
16099 eval value=\"\$LIB$uppername\"
16100 test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value"
16101 eval value=\"\$LTLIB$uppername\"
16102 test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value"
16103 else
16104 :
16105 fi
16106 else
16107 found_dir=
16108 found_la=
16109 found_so=
16110 found_a=
16111 if test $use_additional = yes; then
16112 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
16113 found_dir="$additional_libdir"
16114 found_so="$additional_libdir/lib$name.$shlibext"
16115 if test -f "$additional_libdir/lib$name.la"; then
16116 found_la="$additional_libdir/lib$name.la"
16117 fi
16118 else
16119 if test -f "$additional_libdir/lib$name.$libext"; then
16120 found_dir="$additional_libdir"
16121 found_a="$additional_libdir/lib$name.$libext"
16122 if test -f "$additional_libdir/lib$name.la"; then
16123 found_la="$additional_libdir/lib$name.la"
16124 fi
16125 fi
16126 fi
16127 fi
16128 if test "X$found_dir" = "X"; then
16129 for x in $LDFLAGS $LTLIBBABELTRACE; do
16130
16131 acl_save_prefix="$prefix"
16132 prefix="$acl_final_prefix"
16133 acl_save_exec_prefix="$exec_prefix"
16134 exec_prefix="$acl_final_exec_prefix"
16135 eval x=\"$x\"
16136 exec_prefix="$acl_save_exec_prefix"
16137 prefix="$acl_save_prefix"
16138
16139 case "$x" in
16140 -L*)
16141 dir=`echo "X$x" | sed -e 's/^X-L//'`
16142 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
16143 found_dir="$dir"
16144 found_so="$dir/lib$name.$shlibext"
16145 if test -f "$dir/lib$name.la"; then
16146 found_la="$dir/lib$name.la"
16147 fi
16148 else
16149 if test -f "$dir/lib$name.$libext"; then
16150 found_dir="$dir"
16151 found_a="$dir/lib$name.$libext"
16152 if test -f "$dir/lib$name.la"; then
16153 found_la="$dir/lib$name.la"
16154 fi
16155 fi
16156 fi
16157 ;;
16158 esac
16159 if test "X$found_dir" != "X"; then
16160 break
16161 fi
16162 done
16163 fi
16164 if test "X$found_dir" != "X"; then
16165 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name"
16166 if test "X$found_so" != "X"; then
16167 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
16168 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
16169 else
16170 haveit=
16171 for x in $ltrpathdirs; do
16172 if test "X$x" = "X$found_dir"; then
16173 haveit=yes
16174 break
16175 fi
16176 done
16177 if test -z "$haveit"; then
16178 ltrpathdirs="$ltrpathdirs $found_dir"
16179 fi
16180 if test "$hardcode_direct" = yes; then
16181 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
16182 else
16183 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
16184 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
16185 haveit=
16186 for x in $rpathdirs; do
16187 if test "X$x" = "X$found_dir"; then
16188 haveit=yes
16189 break
16190 fi
16191 done
16192 if test -z "$haveit"; then
16193 rpathdirs="$rpathdirs $found_dir"
16194 fi
16195 else
16196 haveit=
16197 for x in $LDFLAGS $LIBBABELTRACE; do
16198
16199 acl_save_prefix="$prefix"
16200 prefix="$acl_final_prefix"
16201 acl_save_exec_prefix="$exec_prefix"
16202 exec_prefix="$acl_final_exec_prefix"
16203 eval x=\"$x\"
16204 exec_prefix="$acl_save_exec_prefix"
16205 prefix="$acl_save_prefix"
16206
16207 if test "X$x" = "X-L$found_dir"; then
16208 haveit=yes
16209 break
16210 fi
16211 done
16212 if test -z "$haveit"; then
16213 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir"
16214 fi
16215 if test "$hardcode_minus_L" != no; then
16216 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
16217 else
16218 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
16219 fi
16220 fi
16221 fi
16222 fi
16223 else
16224 if test "X$found_a" != "X"; then
16225 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a"
16226 else
16227 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name"
16228 fi
16229 fi
16230 additional_includedir=
16231 case "$found_dir" in
16232 */lib | */lib/)
16233 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
16234 additional_includedir="$basedir/include"
16235 ;;
16236 esac
16237 if test "X$additional_includedir" != "X"; then
16238 if test "X$additional_includedir" != "X/usr/include"; then
16239 haveit=
16240 if test "X$additional_includedir" = "X/usr/local/include"; then
16241 if test -n "$GCC"; then
16242 case $host_os in
16243 linux*) haveit=yes;;
16244 esac
16245 fi
16246 fi
16247 if test -z "$haveit"; then
16248 for x in $CPPFLAGS $INCBABELTRACE; 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-I$additional_includedir"; then
16259 haveit=yes
16260 break
16261 fi
16262 done
16263 if test -z "$haveit"; then
16264 if test -d "$additional_includedir"; then
16265 INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir"
16266 fi
16267 fi
16268 fi
16269 fi
16270 fi
16271 if test -n "$found_la"; then
16272 save_libdir="$libdir"
16273 case "$found_la" in
16274 */* | *\\*) . "$found_la" ;;
16275 *) . "./$found_la" ;;
16276 esac
16277 libdir="$save_libdir"
16278 for dep in $dependency_libs; do
16279 case "$dep" in
16280 -L*)
16281 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
16282 if test "X$additional_libdir" != "X/usr/lib"; then
16283 haveit=
16284 if test "X$additional_libdir" = "X/usr/local/lib"; then
16285 if test -n "$GCC"; then
16286 case $host_os in
16287 linux*) haveit=yes;;
16288 esac
16289 fi
16290 fi
16291 if test -z "$haveit"; then
16292 haveit=
16293 for x in $LDFLAGS $LIBBABELTRACE; do
16294
16295 acl_save_prefix="$prefix"
16296 prefix="$acl_final_prefix"
16297 acl_save_exec_prefix="$exec_prefix"
16298 exec_prefix="$acl_final_exec_prefix"
16299 eval x=\"$x\"
16300 exec_prefix="$acl_save_exec_prefix"
16301 prefix="$acl_save_prefix"
16302
16303 if test "X$x" = "X-L$additional_libdir"; then
16304 haveit=yes
16305 break
16306 fi
16307 done
16308 if test -z "$haveit"; then
16309 if test -d "$additional_libdir"; then
16310 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir"
16311 fi
16312 fi
16313 haveit=
16314 for x in $LDFLAGS $LTLIBBABELTRACE; do
16315
16316 acl_save_prefix="$prefix"
16317 prefix="$acl_final_prefix"
16318 acl_save_exec_prefix="$exec_prefix"
16319 exec_prefix="$acl_final_exec_prefix"
16320 eval x=\"$x\"
16321 exec_prefix="$acl_save_exec_prefix"
16322 prefix="$acl_save_prefix"
16323
16324 if test "X$x" = "X-L$additional_libdir"; then
16325 haveit=yes
16326 break
16327 fi
16328 done
16329 if test -z "$haveit"; then
16330 if test -d "$additional_libdir"; then
16331 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir"
16332 fi
16333 fi
16334 fi
16335 fi
16336 ;;
16337 -R*)
16338 dir=`echo "X$dep" | sed -e 's/^X-R//'`
16339 if test "$enable_rpath" != no; then
16340 haveit=
16341 for x in $rpathdirs; do
16342 if test "X$x" = "X$dir"; then
16343 haveit=yes
16344 break
16345 fi
16346 done
16347 if test -z "$haveit"; then
16348 rpathdirs="$rpathdirs $dir"
16349 fi
16350 haveit=
16351 for x in $ltrpathdirs; do
16352 if test "X$x" = "X$dir"; then
16353 haveit=yes
16354 break
16355 fi
16356 done
16357 if test -z "$haveit"; then
16358 ltrpathdirs="$ltrpathdirs $dir"
16359 fi
16360 fi
16361 ;;
16362 -l*)
16363 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
16364 ;;
16365 *.la)
16366 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
16367 ;;
16368 *)
16369 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$dep"
16370 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$dep"
16371 ;;
16372 esac
16373 done
16374 fi
16375 else
16376 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
16377 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name"
16378 fi
16379 fi
16380 fi
16381 done
16382 done
16383 if test "X$rpathdirs" != "X"; then
16384 if test -n "$hardcode_libdir_separator"; then
16385 alldirs=
16386 for found_dir in $rpathdirs; do
16387 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
16388 done
16389 acl_save_libdir="$libdir"
16390 libdir="$alldirs"
16391 eval flag=\"$hardcode_libdir_flag_spec\"
16392 libdir="$acl_save_libdir"
16393 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
16394 else
16395 for found_dir in $rpathdirs; do
16396 acl_save_libdir="$libdir"
16397 libdir="$found_dir"
16398 eval flag=\"$hardcode_libdir_flag_spec\"
16399 libdir="$acl_save_libdir"
16400 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
16401 done
16402 fi
16403 fi
16404 if test "X$ltrpathdirs" != "X"; then
16405 for found_dir in $ltrpathdirs; do
16406 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir"
16407 done
16408 fi
16409
16410
16411 ac_save_CPPFLAGS="$CPPFLAGS"
16412
16413 for element in $INCBABELTRACE; do
16414 haveit=
16415 for x in $CPPFLAGS; do
16416
16417 acl_save_prefix="$prefix"
16418 prefix="$acl_final_prefix"
16419 acl_save_exec_prefix="$exec_prefix"
16420 exec_prefix="$acl_final_exec_prefix"
16421 eval x=\"$x\"
16422 exec_prefix="$acl_save_exec_prefix"
16423 prefix="$acl_save_prefix"
16424
16425 if test "X$x" = "X$element"; then
16426 haveit=yes
16427 break
16428 fi
16429 done
16430 if test -z "$haveit"; then
16431 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
16432 fi
16433 done
16434
16435
16436 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5
16437$as_echo_n "checking for libbabeltrace... " >&6; }
16438if test "${ac_cv_libbabeltrace+set}" = set; then :
16439 $as_echo_n "(cached) " >&6
16440else
16441
16442 ac_save_LIBS="$LIBS"
16443 LIBS="$LIBS $LIBBABELTRACE"
16444 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16445/* end confdefs.h. */
16446#include <babeltrace/babeltrace.h>
16447 #include <babeltrace/ctf/events.h>
16448 #include <babeltrace/ctf/iterator.h>
16449int
16450main ()
16451{
16452struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL));
16453 struct bt_ctf_event *event = NULL;
16454 const struct bt_definition *scope;
16455
65c749e7 16456 bt_iter_set_pos (bt_ctf_get_iter (NULL), pos);
393fd4c3
YQ
16457 scope = bt_ctf_get_top_level_scope (event,
16458 BT_STREAM_EVENT_HEADER);
16459 bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id"));
16460
16461 ;
16462 return 0;
16463}
16464_ACEOF
16465if ac_fn_c_try_link "$LINENO"; then :
16466 ac_cv_libbabeltrace=yes
16467else
16468 ac_cv_libbabeltrace=no
16469fi
16470rm -f core conftest.err conftest.$ac_objext \
16471 conftest$ac_exeext conftest.$ac_ext
16472 LIBS="$ac_save_LIBS"
16473
16474fi
16475{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5
16476$as_echo "$ac_cv_libbabeltrace" >&6; }
16477 if test "$ac_cv_libbabeltrace" = yes; then
16478 HAVE_LIBBABELTRACE=yes
16479
16480$as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h
16481
16482 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libbabeltrace" >&5
16483$as_echo_n "checking how to link with libbabeltrace... " >&6; }
16484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5
16485$as_echo "$LIBBABELTRACE" >&6; }
16486 else
16487 HAVE_LIBBABELTRACE=no
16488 CPPFLAGS="$ac_save_CPPFLAGS"
16489 LIBBABELTRACE=
16490 LTLIBBABELTRACE=
16491 fi
16492
16493
16494
16495
16496
16497
16498 CFLAGS=$saved_CFLAGS
16499
16500 if test "$HAVE_LIBBABELTRACE" != yes; then
16501 if test "$with_babeltrace" = yes; then
16502 as_fn_error "babeltrace is missing or unusable" "$LINENO" 5
16503 else
16504 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&5
16505$as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&2;}
16506 fi
16507 fi
16508fi
16509
db985757 16510# If nativefile (NAT_FILE) is not set in config/*/*.m[ht] files, we link
2c0fc042 16511# to an empty version.
c906108c
SS
16512
16513files=
16514links=
5a2402b8 16515
c906108c
SS
16516rm -f nm.h
16517if test "${nativefile}" != ""; then
0f475e27
AC
16518 case "${nativefile}" in
16519 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
16520 * ) GDB_NM_FILE="${nativefile}"
16521 esac
5a2402b8
AC
16522 files="${files} ${GDB_NM_FILE}"
16523 links="${links} nm.h"
60ca704f
SE
16524
16525cat >>confdefs.h <<_ACEOF
b78960be 16526#define GDB_NM_FILE "${GDB_NM_FILE}"
bec39cab 16527_ACEOF
5a2402b8 16528
c906108c 16529fi
5a2402b8
AC
16530
16531
bec39cab
AC
16532ac_sources="$files"
16533ac_dests="$links"
16534while test -n "$ac_sources"; do
16535 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
16536 set $ac_sources; ac_source=$1; shift; ac_sources=$*
16537 ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source"
16538done
81ecdfbb 16539ac_config_links="$ac_config_links $ac_config_links_1"
c906108c
SS
16540
16541
c906108c
SS
16542
16543
c906108c 16544
81ecdfbb 16545$as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
bec39cab 16546
bec39cab 16547
b292c783 16548
f6a88844
JM
16549 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
16550 GDB_TRANSFORM_NAME=`echo gdb | sed -e "$gdb_ac_transform"`
16551 if test "x$GDB_TRANSFORM_NAME" = x; then
16552 GDB_TRANSFORM_NAME=gdb
16553 fi
16554
16555
16556
16557 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
16558 GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$gdb_ac_transform"`
16559 if test "x$GCORE_TRANSFORM_NAME" = x; then
16560 GCORE_TRANSFORM_NAME=gcore
16561 fi
16562
b292c783
JK
16563
16564ac_config_files="$ac_config_files gcore"
16565
16566
c971b7fa 16567ac_config_files="$ac_config_files Makefile gdb-gdb.gdb doc/Makefile data-directory/Makefile"
81ecdfbb
RW
16568
16569ac_config_commands="$ac_config_commands default"
89a34d1b 16570
bec39cab
AC
16571cat >confcache <<\_ACEOF
16572# This file is a shell script that caches the results of configure
16573# tests run on this system so they can be shared between configure
16574# scripts and configure runs, see configure's option --config-cache.
16575# It is not useful on other systems. If it contains results you don't
16576# want to keep, you may remove or edit it.
16577#
16578# config.status only pays attention to the cache file if you give it
16579# the --recheck option to rerun configure.
16580#
16581# `ac_cv_env_foo' variables (set or unset) will be overridden when
16582# loading this file, other *unset* `ac_cv_foo' will be assigned the
16583# following values.
16584
16585_ACEOF
16586
16587# The following way of writing the cache mishandles newlines in values,
16588# but we know of no workaround that is simple, portable, and efficient.
81ecdfbb 16589# So, we kill variables containing newlines.
bec39cab
AC
16590# Ultrix sh set writes to stderr and can't be redirected directly,
16591# and sets the high bit in the cache file unless we assign to the vars.
81ecdfbb
RW
16592(
16593 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16594 eval ac_val=\$$ac_var
16595 case $ac_val in #(
16596 *${as_nl}*)
16597 case $ac_var in #(
16598 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16599$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
16600 esac
16601 case $ac_var in #(
16602 _ | IFS | as_nl) ;; #(
16603 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16604 *) { eval $ac_var=; unset $ac_var;} ;;
16605 esac ;;
16606 esac
16607 done
16608
bec39cab 16609 (set) 2>&1 |
81ecdfbb
RW
16610 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16611 *${as_nl}ac_space=\ *)
16612 # `set' does not quote correctly, so add quotes: double-quote
16613 # substitution turns \\\\ into \\, and sed turns \\ into \.
bec39cab
AC
16614 sed -n \
16615 "s/'/'\\\\''/g;
16616 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
81ecdfbb 16617 ;; #(
bec39cab
AC
16618 *)
16619 # `set' quotes correctly as required by POSIX, so do not add quotes.
81ecdfbb 16620 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
bec39cab 16621 ;;
81ecdfbb
RW
16622 esac |
16623 sort
16624) |
bec39cab 16625 sed '
81ecdfbb 16626 /^ac_cv_env_/b end
bec39cab 16627 t clear
81ecdfbb 16628 :clear
bec39cab
AC
16629 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16630 t end
81ecdfbb
RW
16631 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16632 :end' >>confcache
16633if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16634 if test -w "$cache_file"; then
16635 test "x$cache_file" != "x/dev/null" &&
16636 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16637$as_echo "$as_me: updating cache $cache_file" >&6;}
bec39cab
AC
16638 cat confcache >$cache_file
16639 else
81ecdfbb
RW
16640 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16641$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
bec39cab
AC
16642 fi
16643fi
16644rm -f confcache
16645
16646test "x$prefix" = xNONE && prefix=$ac_default_prefix
16647# Let make expand exec_prefix.
16648test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16649
bec39cab
AC
16650DEFS=-DHAVE_CONFIG_H
16651
16652ac_libobjs=
16653ac_ltlibobjs=
16654for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16655 # 1. Remove the extension, and $U if already installed.
81ecdfbb
RW
16656 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
16657 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
16658 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16659 # will be set to the directory where LIBOBJS objects are built.
16660 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16661 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
bec39cab
AC
16662done
16663LIBOBJS=$ac_libobjs
16664
16665LTLIBOBJS=$ac_ltlibobjs
16666
16667
85981d60 16668if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
81ecdfbb
RW
16669 as_fn_error "conditional \"MAINTAINER_MODE\" was never defined.
16670Usually this means the macro was only invoked conditionally." "$LINENO" 5
85981d60 16671fi
a417dc56 16672if test -z "${GMAKE_TRUE}" && test -z "${GMAKE_FALSE}"; then
81ecdfbb
RW
16673 as_fn_error "conditional \"GMAKE\" was never defined.
16674Usually this means the macro was only invoked conditionally." "$LINENO" 5
a417dc56 16675fi
4df42755
DE
16676if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then
16677 as_fn_error "conditional \"HAVE_PYTHON\" was never defined.
16678Usually this means the macro was only invoked conditionally." "$LINENO" 5
16679fi
16680if test -z "${HAVE_GUILE_TRUE}" && test -z "${HAVE_GUILE_FALSE}"; then
16681 as_fn_error "conditional \"HAVE_GUILE\" was never defined.
16682Usually this means the macro was only invoked conditionally." "$LINENO" 5
16683fi
81ecdfbb
RW
16684
16685
bec39cab 16686: ${CONFIG_STATUS=./config.status}
81ecdfbb 16687ac_write_fail=0
bec39cab
AC
16688ac_clean_files_save=$ac_clean_files
16689ac_clean_files="$ac_clean_files $CONFIG_STATUS"
81ecdfbb
RW
16690{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16691$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16692as_write_fail=0
16693cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
bec39cab
AC
16694#! $SHELL
16695# Generated by $as_me.
16696# Run this file to recreate the current configuration.
16697# Compiler output produced by configure, useful for debugging
16698# configure, is in config.log if it exists.
16699
16700debug=false
16701ac_cs_recheck=false
16702ac_cs_silent=false
bec39cab 16703
81ecdfbb
RW
16704SHELL=\${CONFIG_SHELL-$SHELL}
16705export SHELL
16706_ASEOF
16707cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16708## -------------------- ##
16709## M4sh Initialization. ##
16710## -------------------- ##
16711
16712# Be more Bourne compatible
16713DUALCASE=1; export DUALCASE # for MKS sh
16714if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
16715 emulate sh
16716 NULLCMD=:
81ecdfbb 16717 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
16718 # is contrary to our usage. Disable this feature.
16719 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
16720 setopt NO_GLOB_SUBST
16721else
16722 case `(set -o) 2>/dev/null` in #(
16723 *posix*) :
16724 set -o posix ;; #(
16725 *) :
16726 ;;
16727esac
bec39cab 16728fi
bec39cab 16729
81ecdfbb
RW
16730
16731as_nl='
16732'
16733export as_nl
16734# Printing a long string crashes Solaris 7 /usr/bin/printf.
16735as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16736as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16737as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16738# Prefer a ksh shell builtin over an external printf program on Solaris,
16739# but without wasting forks for bash or zsh.
16740if test -z "$BASH_VERSION$ZSH_VERSION" \
16741 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16742 as_echo='print -r --'
16743 as_echo_n='print -rn --'
16744elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16745 as_echo='printf %s\n'
16746 as_echo_n='printf %s'
16747else
16748 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16749 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16750 as_echo_n='/usr/ucb/echo -n'
16751 else
16752 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16753 as_echo_n_body='eval
16754 arg=$1;
16755 case $arg in #(
16756 *"$as_nl"*)
16757 expr "X$arg" : "X\\(.*\\)$as_nl";
16758 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16759 esac;
16760 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16761 '
16762 export as_echo_n_body
16763 as_echo_n='sh -c $as_echo_n_body as_echo'
16764 fi
16765 export as_echo_body
16766 as_echo='sh -c $as_echo_body as_echo'
16767fi
16768
16769# The user is always right.
16770if test "${PATH_SEPARATOR+set}" != set; then
16771 PATH_SEPARATOR=:
16772 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16773 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16774 PATH_SEPARATOR=';'
16775 }
bec39cab
AC
16776fi
16777
16778
81ecdfbb
RW
16779# IFS
16780# We need space, tab and new line, in precisely that order. Quoting is
16781# there to prevent editors from complaining about space-tab.
16782# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16783# splitting by setting IFS to empty value.)
16784IFS=" "" $as_nl"
16785
16786# Find who we are. Look in the path if we contain no directory separator.
16787case $0 in #((
16788 *[\\/]* ) as_myself=$0 ;;
16789 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16790for as_dir in $PATH
16791do
16792 IFS=$as_save_IFS
16793 test -z "$as_dir" && as_dir=.
16794 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16795 done
16796IFS=$as_save_IFS
16797
16798 ;;
16799esac
16800# We did not find ourselves, most probably we were run as `sh COMMAND'
16801# in which case we are not to be found in the path.
16802if test "x$as_myself" = x; then
16803 as_myself=$0
16804fi
16805if test ! -f "$as_myself"; then
16806 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16807 exit 1
16808fi
16809
16810# Unset variables that we do not need and which cause bugs (e.g. in
16811# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16812# suppresses any "Segmentation fault" message there. '((' could
16813# trigger a bug in pdksh 5.2.14.
16814for as_var in BASH_ENV ENV MAIL MAILPATH
16815do eval test x\${$as_var+set} = xset \
16816 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
16817done
bec39cab
AC
16818PS1='$ '
16819PS2='> '
16820PS4='+ '
16821
16822# NLS nuisances.
81ecdfbb
RW
16823LC_ALL=C
16824export LC_ALL
16825LANGUAGE=C
16826export LANGUAGE
16827
16828# CDPATH.
16829(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16830
16831
16832# as_fn_error ERROR [LINENO LOG_FD]
16833# ---------------------------------
16834# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16835# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
16836# script with status $?, using 1 if that was 0.
16837as_fn_error ()
16838{
16839 as_status=$?; test $as_status -eq 0 && as_status=1
16840 if test "$3"; then
16841 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16842 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
16843 fi
16844 $as_echo "$as_me: error: $1" >&2
16845 as_fn_exit $as_status
16846} # as_fn_error
16847
16848
16849# as_fn_set_status STATUS
16850# -----------------------
16851# Set $? to STATUS, without forking.
16852as_fn_set_status ()
16853{
16854 return $1
16855} # as_fn_set_status
16856
16857# as_fn_exit STATUS
16858# -----------------
16859# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16860as_fn_exit ()
16861{
16862 set +e
16863 as_fn_set_status $1
16864 exit $1
16865} # as_fn_exit
16866
16867# as_fn_unset VAR
16868# ---------------
16869# Portably unset VAR.
16870as_fn_unset ()
16871{
16872 { eval $1=; unset $1;}
16873}
16874as_unset=as_fn_unset
16875# as_fn_append VAR VALUE
16876# ----------------------
16877# Append the text in VALUE to the end of the definition contained in VAR. Take
16878# advantage of any shell optimizations that allow amortized linear growth over
16879# repeated appends, instead of the typical quadratic growth present in naive
16880# implementations.
16881if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16882 eval 'as_fn_append ()
16883 {
16884 eval $1+=\$2
16885 }'
16886else
16887 as_fn_append ()
16888 {
16889 eval $1=\$$1\$2
16890 }
16891fi # as_fn_append
16892
16893# as_fn_arith ARG...
16894# ------------------
16895# Perform arithmetic evaluation on the ARGs, and store the result in the
16896# global $as_val. Take advantage of shells that can avoid forks. The arguments
16897# must be portable across $(()) and expr.
16898if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16899 eval 'as_fn_arith ()
16900 {
16901 as_val=$(( $* ))
16902 }'
16903else
16904 as_fn_arith ()
16905 {
16906 as_val=`expr "$@" || test $? -eq 1`
16907 }
16908fi # as_fn_arith
bec39cab 16909
81ecdfbb
RW
16910
16911if expr a : '\(a\)' >/dev/null 2>&1 &&
16912 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
16913 as_expr=expr
16914else
16915 as_expr=false
16916fi
16917
81ecdfbb 16918if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
16919 as_basename=basename
16920else
16921 as_basename=false
16922fi
16923
81ecdfbb
RW
16924if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16925 as_dirname=dirname
16926else
16927 as_dirname=false
16928fi
bec39cab 16929
81ecdfbb 16930as_me=`$as_basename -- "$0" ||
bec39cab
AC
16931$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16932 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
16933 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
16934$as_echo X/"$0" |
16935 sed '/^.*\/\([^/][^/]*\)\/*$/{
16936 s//\1/
16937 q
16938 }
16939 /^X\/\(\/\/\)$/{
16940 s//\1/
16941 q
16942 }
16943 /^X\/\(\/\).*/{
16944 s//\1/
16945 q
16946 }
16947 s/.*/./; q'`
b4e70030 16948
b4e70030
JB
16949# Avoid depending upon Character Ranges.
16950as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16951as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16952as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16953as_cr_digits='0123456789'
16954as_cr_alnum=$as_cr_Letters$as_cr_digits
16955
81ecdfbb
RW
16956ECHO_C= ECHO_N= ECHO_T=
16957case `echo -n x` in #(((((
16958-n*)
16959 case `echo 'xy\c'` in
16960 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
16961 xy) ECHO_C='\c';;
16962 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16963 ECHO_T=' ';;
16964 esac;;
16965*)
16966 ECHO_N='-n';;
bec39cab
AC
16967esac
16968
81ecdfbb
RW
16969rm -f conf$$ conf$$.exe conf$$.file
16970if test -d conf$$.dir; then
16971 rm -f conf$$.dir/conf$$.file
bec39cab 16972else
81ecdfbb
RW
16973 rm -f conf$$.dir
16974 mkdir conf$$.dir 2>/dev/null
bec39cab 16975fi
81ecdfbb
RW
16976if (echo >conf$$.file) 2>/dev/null; then
16977 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 16978 as_ln_s='ln -s'
81ecdfbb
RW
16979 # ... but there are two gotchas:
16980 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16981 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
16982 # In both cases, we have to default to `cp -p'.
16983 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
16984 as_ln_s='cp -p'
16985 elif ln conf$$.file conf$$ 2>/dev/null; then
16986 as_ln_s=ln
16987 else
16988 as_ln_s='cp -p'
b4e70030 16989 fi
bec39cab
AC
16990else
16991 as_ln_s='cp -p'
16992fi
81ecdfbb
RW
16993rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16994rmdir conf$$.dir 2>/dev/null
16995
16996
16997# as_fn_mkdir_p
16998# -------------
16999# Create "$as_dir" as a directory, including parents if necessary.
17000as_fn_mkdir_p ()
17001{
17002
17003 case $as_dir in #(
17004 -*) as_dir=./$as_dir;;
17005 esac
17006 test -d "$as_dir" || eval $as_mkdir_p || {
17007 as_dirs=
17008 while :; do
17009 case $as_dir in #(
17010 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17011 *) as_qdir=$as_dir;;
17012 esac
17013 as_dirs="'$as_qdir' $as_dirs"
17014 as_dir=`$as_dirname -- "$as_dir" ||
17015$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17016 X"$as_dir" : 'X\(//\)[^/]' \| \
17017 X"$as_dir" : 'X\(//\)$' \| \
17018 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17019$as_echo X"$as_dir" |
17020 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17021 s//\1/
17022 q
17023 }
17024 /^X\(\/\/\)[^/].*/{
17025 s//\1/
17026 q
17027 }
17028 /^X\(\/\/\)$/{
17029 s//\1/
17030 q
17031 }
17032 /^X\(\/\).*/{
17033 s//\1/
17034 q
17035 }
17036 s/.*/./; q'`
17037 test -d "$as_dir" && break
17038 done
17039 test -z "$as_dirs" || eval "mkdir $as_dirs"
17040 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
17041
bec39cab 17042
81ecdfbb 17043} # as_fn_mkdir_p
bec39cab 17044if mkdir -p . 2>/dev/null; then
81ecdfbb 17045 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
17046else
17047 test -d ./-p && rmdir ./-p
17048 as_mkdir_p=false
17049fi
17050
81ecdfbb
RW
17051if test -x / >/dev/null 2>&1; then
17052 as_test_x='test -x'
17053else
17054 if ls -dL / >/dev/null 2>&1; then
17055 as_ls_L_option=L
17056 else
17057 as_ls_L_option=
17058 fi
17059 as_test_x='
17060 eval sh -c '\''
17061 if test -d "$1"; then
17062 test -d "$1/.";
17063 else
17064 case $1 in #(
17065 -*)set "./$1";;
17066 esac;
17067 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
17068 ???[sx]*):;;*)false;;esac;fi
17069 '\'' sh
17070 '
17071fi
17072as_executable_p=$as_test_x
bec39cab
AC
17073
17074# Sed expression to map a string onto a valid CPP name.
17075as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
17076
17077# Sed expression to map a string onto a valid variable name.
17078as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
17079
17080
bec39cab 17081exec 6>&1
81ecdfbb
RW
17082## ----------------------------------- ##
17083## Main body of $CONFIG_STATUS script. ##
17084## ----------------------------------- ##
17085_ASEOF
17086test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
17087
17088cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17089# Save the log message, to keep $0 and so on meaningful, and to
bec39cab 17090# report actual input values of CONFIG_FILES etc. instead of their
81ecdfbb
RW
17091# values after options handling.
17092ac_log="
bec39cab 17093This file was extended by $as_me, which was
81ecdfbb 17094generated by GNU Autoconf 2.64. Invocation command line was
bec39cab
AC
17095
17096 CONFIG_FILES = $CONFIG_FILES
17097 CONFIG_HEADERS = $CONFIG_HEADERS
17098 CONFIG_LINKS = $CONFIG_LINKS
17099 CONFIG_COMMANDS = $CONFIG_COMMANDS
17100 $ $0 $@
17101
81ecdfbb
RW
17102on `(hostname || uname -n) 2>/dev/null | sed 1q`
17103"
17104
bec39cab
AC
17105_ACEOF
17106
81ecdfbb
RW
17107case $ac_config_files in *"
17108"*) set x $ac_config_files; shift; ac_config_files=$*;;
17109esac
234b45d4 17110
81ecdfbb
RW
17111case $ac_config_headers in *"
17112"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17113esac
b4e70030 17114
b4e70030 17115
81ecdfbb
RW
17116cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17117# Files that config.status was made for.
17118config_files="$ac_config_files"
17119config_headers="$ac_config_headers"
17120config_links="$ac_config_links"
17121config_commands="$ac_config_commands"
234b45d4 17122
81ecdfbb 17123_ACEOF
b4e70030 17124
81ecdfbb 17125cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab 17126ac_cs_usage="\
81ecdfbb
RW
17127\`$as_me' instantiates files and other configuration actions
17128from templates according to the current configuration. Unless the files
17129and actions are specified as TAGs, all are instantiated by default.
234b45d4 17130
81ecdfbb 17131Usage: $0 [OPTION]... [TAG]...
234b45d4 17132
bec39cab 17133 -h, --help print this help, then exit
81ecdfbb
RW
17134 -V, --version print version number and configuration settings, then exit
17135 -q, --quiet, --silent
17136 do not print progress messages
bec39cab
AC
17137 -d, --debug don't remove temporary files
17138 --recheck update $as_me by reconfiguring in the same conditions
81ecdfbb
RW
17139 --file=FILE[:TEMPLATE]
17140 instantiate the configuration file FILE
17141 --header=FILE[:TEMPLATE]
17142 instantiate the configuration header FILE
234b45d4 17143
bec39cab
AC
17144Configuration files:
17145$config_files
234b45d4 17146
bec39cab
AC
17147Configuration headers:
17148$config_headers
234b45d4 17149
bec39cab
AC
17150Configuration links:
17151$config_links
234b45d4 17152
bec39cab
AC
17153Configuration commands:
17154$config_commands
17155
81ecdfbb 17156Report bugs to the package provider."
b4e70030 17157
81ecdfbb
RW
17158_ACEOF
17159cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab
AC
17160ac_cs_version="\\
17161config.status
81ecdfbb
RW
17162configured by $0, generated by GNU Autoconf 2.64,
17163 with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
bec39cab 17164
81ecdfbb 17165Copyright (C) 2009 Free Software Foundation, Inc.
bec39cab
AC
17166This config.status script is free software; the Free Software Foundation
17167gives unlimited permission to copy, distribute and modify it."
81ecdfbb
RW
17168
17169ac_pwd='$ac_pwd'
17170srcdir='$srcdir'
17171INSTALL='$INSTALL'
81ecdfbb
RW
17172AWK='$AWK'
17173test -n "\$AWK" || AWK=awk
bec39cab
AC
17174_ACEOF
17175
81ecdfbb
RW
17176cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17177# The default lists apply if the user does not specify any file.
bec39cab
AC
17178ac_need_defaults=:
17179while test $# != 0
17180do
17181 case $1 in
17182 --*=*)
81ecdfbb
RW
17183 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17184 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
bec39cab 17185 ac_shift=:
c906108c 17186 ;;
81ecdfbb 17187 *)
bec39cab
AC
17188 ac_option=$1
17189 ac_optarg=$2
17190 ac_shift=shift
c906108c 17191 ;;
bec39cab 17192 esac
c906108c 17193
bec39cab
AC
17194 case $ac_option in
17195 # Handling of the options.
bec39cab
AC
17196 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17197 ac_cs_recheck=: ;;
81ecdfbb
RW
17198 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
17199 $as_echo "$ac_cs_version"; exit ;;
17200 --debug | --debu | --deb | --de | --d | -d )
bec39cab
AC
17201 debug=: ;;
17202 --file | --fil | --fi | --f )
17203 $ac_shift
81ecdfbb
RW
17204 case $ac_optarg in
17205 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17206 esac
17207 as_fn_append CONFIG_FILES " '$ac_optarg'"
bec39cab
AC
17208 ac_need_defaults=false;;
17209 --header | --heade | --head | --hea )
17210 $ac_shift
81ecdfbb
RW
17211 case $ac_optarg in
17212 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17213 esac
17214 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
bec39cab 17215 ac_need_defaults=false;;
81ecdfbb
RW
17216 --he | --h)
17217 # Conflict between --help and --header
17218 as_fn_error "ambiguous option: \`$1'
17219Try \`$0 --help' for more information.";;
17220 --help | --hel | -h )
17221 $as_echo "$ac_cs_usage"; exit ;;
bec39cab
AC
17222 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17223 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17224 ac_cs_silent=: ;;
c906108c 17225
bec39cab 17226 # This is an error.
81ecdfbb
RW
17227 -*) as_fn_error "unrecognized option: \`$1'
17228Try \`$0 --help' for more information." ;;
c906108c 17229
81ecdfbb
RW
17230 *) as_fn_append ac_config_targets " $1"
17231 ac_need_defaults=false ;;
c906108c 17232
bec39cab
AC
17233 esac
17234 shift
17235done
c906108c 17236
bec39cab 17237ac_configure_extra_args=
c906108c 17238
bec39cab
AC
17239if $ac_cs_silent; then
17240 exec 6>/dev/null
17241 ac_configure_extra_args="$ac_configure_extra_args --silent"
17242fi
c906108c 17243
bec39cab 17244_ACEOF
81ecdfbb 17245cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab 17246if \$ac_cs_recheck; then
81ecdfbb
RW
17247 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
17248 shift
17249 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17250 CONFIG_SHELL='$SHELL'
17251 export CONFIG_SHELL
17252 exec "\$@"
bec39cab
AC
17253fi
17254
17255_ACEOF
81ecdfbb
RW
17256cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17257exec 5>>config.log
17258{
17259 echo
17260 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17261## Running $as_me. ##
17262_ASBOX
17263 $as_echo "$ac_log"
17264} >&5
bec39cab 17265
81ecdfbb
RW
17266_ACEOF
17267cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
c906108c 17268#
81ecdfbb 17269# INIT-COMMANDS
c906108c 17270#
a417dc56 17271ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
b4e70030 17272
bec39cab
AC
17273_ACEOF
17274
81ecdfbb 17275cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
4e8d927d 17276
81ecdfbb 17277# Handling of arguments.
bec39cab 17278for ac_config_target in $ac_config_targets
c906108c 17279do
81ecdfbb
RW
17280 case $ac_config_target in
17281 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
17282 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
f997c383 17283 "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
81ecdfbb 17284 "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;;
b292c783 17285 "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;;
81ecdfbb 17286 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
e2207b9a 17287 "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;;
5ae98d25 17288 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
aa2e2d8d 17289 "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
81ecdfbb
RW
17290 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
17291
17292 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
c906108c
SS
17293 esac
17294done
17295
81ecdfbb 17296
bec39cab
AC
17297# If the user did not use the arguments to specify the items to instantiate,
17298# then the envvar interface is used. Set only those that are not.
17299# We use the long form for the default assignment because of an extremely
17300# bizarre bug on SunOS 4.1.3.
17301if $ac_need_defaults; then
17302 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17303 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17304 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
17305 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
17306fi
17307
b4e70030 17308# Have a temporary directory for convenience. Make it in the build tree
81ecdfbb 17309# simply because there is no reason against having it here, and in addition,
b4e70030 17310# creating and moving files from /tmp can sometimes cause problems.
81ecdfbb
RW
17311# Hook for its removal unless debugging.
17312# Note that there is a small window in which the directory will not be cleaned:
17313# after its creation but before its name has been assigned to `$tmp'.
b4e70030
JB
17314$debug ||
17315{
81ecdfbb
RW
17316 tmp=
17317 trap 'exit_status=$?
17318 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
17319' 0
17320 trap 'as_fn_exit 1' 1 2 13 15
17321}
17322# Create a (secure) tmp directory for tmp files.
17323
17324{
17325 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
17326 test -n "$tmp" && test -d "$tmp"
17327} ||
17328{
17329 tmp=./conf$$-$RANDOM
17330 (umask 077 && mkdir "$tmp")
17331} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
17332
17333# Set up the scripts for CONFIG_FILES section.
17334# No need to generate them if there are no CONFIG_FILES.
17335# This happens for instance with `./config.status config.h'.
17336if test -n "$CONFIG_FILES"; then
17337
17338if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
17339 ac_cs_awk_getline=:
17340 ac_cs_awk_pipe_init=
17341 ac_cs_awk_read_file='
17342 while ((getline aline < (F[key])) > 0)
17343 print(aline)
17344 close(F[key])'
17345 ac_cs_awk_pipe_fini=
17346else
17347 ac_cs_awk_getline=false
17348 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
17349 ac_cs_awk_read_file='
17350 print "|#_!!_#|"
17351 print "cat " F[key] " &&"
17352 '$ac_cs_awk_pipe_init
17353 # The final `:' finishes the AND list.
17354 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
17355fi
17356ac_cr=`echo X | tr X '\015'`
17357# On cygwin, bash can eat \r inside `` if the user requested igncr.
17358# But we know of no other shell where ac_cr would be empty at this
17359# point, so we can use a bashism as a fallback.
17360if test "x$ac_cr" = x; then
17361 eval ac_cr=\$\'\\r\'
17362fi
17363ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17364if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
17365 ac_cs_awk_cr='\r'
17366else
17367 ac_cs_awk_cr=$ac_cr
17368fi
17369
17370echo 'BEGIN {' >"$tmp/subs1.awk" &&
17371_ACEOF
17372
17373# Create commands to substitute file output variables.
17374{
17375 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
17376 echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' &&
17377 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
17378 echo "_ACAWK" &&
17379 echo "_ACEOF"
17380} >conf$$files.sh &&
17381. ./conf$$files.sh ||
17382 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
17383rm -f conf$$files.sh
17384
17385{
17386 echo "cat >conf$$subs.awk <<_ACEOF" &&
17387 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17388 echo "_ACEOF"
17389} >conf$$subs.sh ||
17390 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
17391ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
17392ac_delim='%!_!# '
17393for ac_last_try in false false false false false :; do
17394 . ./conf$$subs.sh ||
17395 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
17396
17397 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17398 if test $ac_delim_n = $ac_delim_num; then
17399 break
17400 elif $ac_last_try; then
17401 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
17402 else
17403 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17404 fi
17405done
17406rm -f conf$$subs.sh
17407
17408cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17409cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
17410_ACEOF
17411sed -n '
17412h
17413s/^/S["/; s/!.*/"]=/
17414p
17415g
17416s/^[^!]*!//
17417:repl
17418t repl
17419s/'"$ac_delim"'$//
17420t delim
17421:nl
17422h
17423s/\(.\{148\}\).*/\1/
17424t more1
17425s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17426p
17427n
17428b repl
17429:more1
17430s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17431p
17432g
17433s/.\{148\}//
17434t nl
17435:delim
17436h
17437s/\(.\{148\}\).*/\1/
17438t more2
17439s/["\\]/\\&/g; s/^/"/; s/$/"/
17440p
17441b
17442:more2
17443s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17444p
17445g
17446s/.\{148\}//
17447t delim
17448' <conf$$subs.awk | sed '
17449/^[^""]/{
17450 N
17451 s/\n//
17452}
17453' >>$CONFIG_STATUS || ac_write_fail=1
17454rm -f conf$$subs.awk
17455cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17456_ACAWK
17457cat >>"\$tmp/subs1.awk" <<_ACAWK &&
17458 for (key in S) S_is_set[key] = 1
17459 FS = "\a"
17460 \$ac_cs_awk_pipe_init
17461}
17462{
17463 line = $ 0
17464 nfields = split(line, field, "@")
17465 substed = 0
17466 len = length(field[1])
17467 for (i = 2; i < nfields; i++) {
17468 key = field[i]
17469 keylen = length(key)
17470 if (S_is_set[key]) {
17471 value = S[key]
17472 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17473 len += length(value) + length(field[++i])
17474 substed = 1
17475 } else
17476 len += 1 + keylen
17477 }
17478 if (nfields == 3 && !substed) {
17479 key = field[2]
17480 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
17481 \$ac_cs_awk_read_file
17482 next
17483 }
17484 }
17485 print line
b4e70030 17486}
81ecdfbb
RW
17487\$ac_cs_awk_pipe_fini
17488_ACAWK
17489_ACEOF
17490cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17491if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17492 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17493else
17494 cat
17495fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
17496 || as_fn_error "could not setup config files machinery" "$LINENO" 5
17497_ACEOF
17498
17499# VPATH may cause trouble with some makes, so we remove $(srcdir),
17500# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
17501# trailing colons and then remove the whole line if VPATH becomes empty
17502# (actually we leave an empty line to preserve line numbers).
17503if test "x$srcdir" = x.; then
17504 ac_vpsub='/^[ ]*VPATH[ ]*=/{
17505s/:*\$(srcdir):*/:/
17506s/:*\${srcdir}:*/:/
17507s/:*@srcdir@:*/:/
17508s/^\([^=]*=[ ]*\):*/\1/
17509s/:*$//
17510s/^[^=]*=[ ]*$//
17511}'
17512fi
17513
17514cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17515fi # test -n "$CONFIG_FILES"
17516
17517# Set up the scripts for CONFIG_HEADERS section.
17518# No need to generate them if there are no CONFIG_HEADERS.
17519# This happens for instance with `./config.status Makefile'.
17520if test -n "$CONFIG_HEADERS"; then
17521cat >"$tmp/defines.awk" <<\_ACAWK ||
17522BEGIN {
17523_ACEOF
17524
17525# Transform confdefs.h into an awk script `defines.awk', embedded as
17526# here-document in config.status, that substitutes the proper values into
17527# config.h.in to produce config.h.
4e8d927d 17528
81ecdfbb
RW
17529# Create a delimiter string that does not exist in confdefs.h, to ease
17530# handling of long lines.
17531ac_delim='%!_!# '
17532for ac_last_try in false false :; do
17533 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
17534 if test -z "$ac_t"; then
17535 break
17536 elif $ac_last_try; then
17537 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
17538 else
17539 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17540 fi
17541done
4e8d927d 17542
81ecdfbb
RW
17543# For the awk script, D is an array of macro values keyed by name,
17544# likewise P contains macro parameters if any. Preserve backslash
17545# newline sequences.
17546
17547ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17548sed -n '
17549s/.\{148\}/&'"$ac_delim"'/g
17550t rset
17551:rset
17552s/^[ ]*#[ ]*define[ ][ ]*/ /
17553t def
17554d
17555:def
17556s/\\$//
17557t bsnl
17558s/["\\]/\\&/g
17559s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17560D["\1"]=" \3"/p
17561s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17562d
17563:bsnl
17564s/["\\]/\\&/g
17565s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17566D["\1"]=" \3\\\\\\n"\\/p
17567t cont
17568s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17569t cont
17570d
17571:cont
17572n
17573s/.\{148\}/&'"$ac_delim"'/g
17574t clear
17575:clear
17576s/\\$//
17577t bsnlc
17578s/["\\]/\\&/g; s/^/"/; s/$/"/p
17579d
17580:bsnlc
17581s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17582b cont
17583' <confdefs.h | sed '
17584s/'"$ac_delim"'/"\\\
17585"/g' >>$CONFIG_STATUS || ac_write_fail=1
17586
17587cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17588 for (key in D) D_is_set[key] = 1
17589 FS = "\a"
17590}
17591/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17592 line = \$ 0
17593 split(line, arg, " ")
17594 if (arg[1] == "#") {
17595 defundef = arg[2]
17596 mac1 = arg[3]
17597 } else {
17598 defundef = substr(arg[1], 2)
17599 mac1 = arg[2]
17600 }
17601 split(mac1, mac2, "(") #)
17602 macro = mac2[1]
17603 prefix = substr(line, 1, index(line, defundef) - 1)
17604 if (D_is_set[macro]) {
17605 # Preserve the white space surrounding the "#".
17606 print prefix "define", macro P[macro] D[macro]
17607 next
17608 } else {
17609 # Replace #undef with comments. This is necessary, for example,
17610 # in the case of _POSIX_SOURCE, which is predefined and required
17611 # on some systems where configure will not decide to define it.
17612 if (defundef == "undef") {
17613 print "/*", prefix defundef, macro, "*/"
17614 next
17615 }
17616 }
b4e70030 17617}
81ecdfbb
RW
17618{ print }
17619_ACAWK
b4e70030 17620_ACEOF
81ecdfbb
RW
17621cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17622 as_fn_error "could not setup config headers machinery" "$LINENO" 5
17623fi # test -n "$CONFIG_HEADERS"
4e8d927d 17624
4e8d927d 17625
81ecdfbb
RW
17626eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
17627shift
17628for ac_tag
17629do
17630 case $ac_tag in
17631 :[FHLC]) ac_mode=$ac_tag; continue;;
17632 esac
17633 case $ac_mode$ac_tag in
17634 :[FHL]*:*);;
17635 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
17636 :[FH]-) ac_tag=-:-;;
17637 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17638 esac
17639 ac_save_IFS=$IFS
17640 IFS=:
17641 set x $ac_tag
17642 IFS=$ac_save_IFS
17643 shift
17644 ac_file=$1
17645 shift
4e8d927d 17646
81ecdfbb
RW
17647 case $ac_mode in
17648 :L) ac_source=$1;;
17649 :[FH])
17650 ac_file_inputs=
17651 for ac_f
17652 do
17653 case $ac_f in
17654 -) ac_f="$tmp/stdin";;
17655 *) # Look for the file first in the build tree, then in the source tree
17656 # (if the path is not absolute). The absolute path cannot be DOS-style,
17657 # because $ac_f cannot contain `:'.
17658 test -f "$ac_f" ||
17659 case $ac_f in
17660 [\\/$]*) false;;
17661 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17662 esac ||
17663 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
17664 esac
17665 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17666 as_fn_append ac_file_inputs " '$ac_f'"
17667 done
17668
17669 # Let's still pretend it is `configure' which instantiates (i.e., don't
17670 # use $as_me), people would be surprised to read:
17671 # /* config.h. Generated by config.status. */
17672 configure_input='Generated from '`
17673 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17674 `' by configure.'
17675 if test x"$ac_file" != x-; then
17676 configure_input="$ac_file. $configure_input"
17677 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17678$as_echo "$as_me: creating $ac_file" >&6;}
b4e70030 17679 fi
81ecdfbb
RW
17680 # Neutralize special characters interpreted by sed in replacement strings.
17681 case $configure_input in #(
17682 *\&* | *\|* | *\\* )
17683 ac_sed_conf_input=`$as_echo "$configure_input" |
17684 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17685 *) ac_sed_conf_input=$configure_input;;
17686 esac
4e8d927d 17687
81ecdfbb
RW
17688 case $ac_tag in
17689 *:-:* | *:-) cat >"$tmp/stdin" \
17690 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
17691 esac
17692 ;;
c906108c
SS
17693 esac
17694
81ecdfbb 17695 ac_dir=`$as_dirname -- "$ac_file" ||
bec39cab
AC
17696$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17697 X"$ac_file" : 'X\(//\)[^/]' \| \
17698 X"$ac_file" : 'X\(//\)$' \| \
81ecdfbb
RW
17699 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
17700$as_echo X"$ac_file" |
17701 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17702 s//\1/
17703 q
17704 }
17705 /^X\(\/\/\)[^/].*/{
17706 s//\1/
17707 q
17708 }
17709 /^X\(\/\/\)$/{
17710 s//\1/
17711 q
17712 }
17713 /^X\(\/\).*/{
17714 s//\1/
17715 q
17716 }
17717 s/.*/./; q'`
17718 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
17719 ac_builddir=.
17720
81ecdfbb
RW
17721case "$ac_dir" in
17722.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17723*)
17724 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
17725 # A ".." for each directory in $ac_dir_suffix.
17726 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
17727 case $ac_top_builddir_sub in
17728 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17729 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17730 esac ;;
17731esac
17732ac_abs_top_builddir=$ac_pwd
17733ac_abs_builddir=$ac_pwd$ac_dir_suffix
17734# for backward compatibility:
17735ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
17736
17737case $srcdir in
81ecdfbb 17738 .) # We are building in place.
bec39cab 17739 ac_srcdir=.
81ecdfbb
RW
17740 ac_top_srcdir=$ac_top_builddir_sub
17741 ac_abs_top_srcdir=$ac_pwd ;;
17742 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 17743 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
17744 ac_top_srcdir=$srcdir
17745 ac_abs_top_srcdir=$srcdir ;;
17746 *) # Relative name.
17747 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17748 ac_top_srcdir=$ac_top_build_prefix$srcdir
17749 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 17750esac
81ecdfbb 17751ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 17752
c906108c 17753
81ecdfbb
RW
17754 case $ac_mode in
17755 :F)
17756 #
17757 # CONFIG_FILE
17758 #
c906108c 17759
bec39cab
AC
17760 case $INSTALL in
17761 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
81ecdfbb 17762 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
c906108c 17763 esac
81ecdfbb 17764_ACEOF
121ce6e5 17765
81ecdfbb
RW
17766cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17767# If the template does not know about datarootdir, expand it.
17768# FIXME: This hack should be removed a few years after 2.60.
17769ac_datarootdir_hack=; ac_datarootdir_seen=
17770ac_sed_dataroot='
17771/datarootdir/ {
17772 p
17773 q
17774}
17775/@datadir@/p
17776/@docdir@/p
17777/@infodir@/p
17778/@localedir@/p
17779/@mandir@/p'
17780case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
17781*datarootdir*) ac_datarootdir_seen=yes;;
17782*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
17783 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17784$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
17785_ACEOF
17786cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17787 ac_datarootdir_hack='
17788 s&@datadir@&$datadir&g
17789 s&@docdir@&$docdir&g
17790 s&@infodir@&$infodir&g
17791 s&@localedir@&$localedir&g
17792 s&@mandir@&$mandir&g
17793 s&\\\${datarootdir}&$datarootdir&g' ;;
17794esac
4e8d927d 17795_ACEOF
81ecdfbb
RW
17796
17797# Neutralize VPATH when `$srcdir' = `.'.
17798# Shell code in configure.ac might set extrasub.
17799# FIXME: do we really want to maintain this feature?
17800cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17801ac_sed_extra="$ac_vpsub
bec39cab
AC
17802$extrasub
17803_ACEOF
81ecdfbb 17804cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab
AC
17805:t
17806/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
81ecdfbb
RW
17807s|@configure_input@|$ac_sed_conf_input|;t t
17808s&@top_builddir@&$ac_top_builddir_sub&;t t
17809s&@top_build_prefix@&$ac_top_build_prefix&;t t
17810s&@srcdir@&$ac_srcdir&;t t
17811s&@abs_srcdir@&$ac_abs_srcdir&;t t
17812s&@top_srcdir@&$ac_top_srcdir&;t t
17813s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17814s&@builddir@&$ac_builddir&;t t
17815s&@abs_builddir@&$ac_abs_builddir&;t t
17816s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17817s&@INSTALL@&$ac_INSTALL&;t t
81ecdfbb
RW
17818$ac_datarootdir_hack
17819"
17820eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
17821if $ac_cs_awk_getline; then
17822 $AWK -f "$tmp/subs.awk"
17823else
17824 $AWK -f "$tmp/subs.awk" | $SHELL
17825fi >$tmp/out \
17826 || as_fn_error "could not create $ac_file" "$LINENO" 5
17827
17828test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
17829 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
17830 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
17831 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
17832which seems to be undefined. Please make sure it is defined." >&5
17833$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
17834which seems to be undefined. Please make sure it is defined." >&2;}
17835
17836 rm -f "$tmp/stdin"
bec39cab 17837 case $ac_file in
81ecdfbb
RW
17838 -) cat "$tmp/out" && rm -f "$tmp/out";;
17839 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
17840 esac \
17841 || as_fn_error "could not create $ac_file" "$LINENO" 5
17842 ;;
17843 :H)
17844 #
17845 # CONFIG_HEADER
17846 #
bec39cab 17847 if test x"$ac_file" != x-; then
81ecdfbb
RW
17848 {
17849 $as_echo "/* $configure_input */" \
17850 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
17851 } >"$tmp/config.h" \
17852 || as_fn_error "could not create $ac_file" "$LINENO" 5
17853 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
17854 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17855$as_echo "$as_me: $ac_file is unchanged" >&6;}
bec39cab 17856 else
81ecdfbb
RW
17857 rm -f "$ac_file"
17858 mv "$tmp/config.h" "$ac_file" \
17859 || as_fn_error "could not create $ac_file" "$LINENO" 5
bec39cab
AC
17860 fi
17861 else
81ecdfbb
RW
17862 $as_echo "/* $configure_input */" \
17863 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
17864 || as_fn_error "could not create -" "$LINENO" 5
bec39cab 17865 fi
81ecdfbb
RW
17866 ;;
17867 :L)
17868 #
17869 # CONFIG_LINK
17870 #
c906108c 17871
81ecdfbb
RW
17872 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
17873 :
b4e70030 17874 else
81ecdfbb
RW
17875 # Prefer the file from the source tree if names are identical.
17876 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
17877 ac_source=$srcdir/$ac_source
17878 fi
b4e70030 17879
81ecdfbb
RW
17880 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
17881$as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
b4e70030 17882
81ecdfbb
RW
17883 if test ! -r "$ac_source"; then
17884 as_fn_error "$ac_source: file not found" "$LINENO" 5
17885 fi
17886 rm -f "$ac_file"
bec39cab 17887
81ecdfbb
RW
17888 # Try a relative symlink, then a hard link, then a copy.
17889 case $srcdir in
17890 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
17891 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
17892 esac
17893 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
17894 ln "$ac_source" "$ac_file" 2>/dev/null ||
17895 cp -p "$ac_source" "$ac_file" ||
17896 as_fn_error "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
17897 fi
17898 ;;
17899 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
17900$as_echo "$as_me: executing $ac_file commands" >&6;}
17901 ;;
c906108c 17902 esac
b4e70030 17903
bec39cab 17904
81ecdfbb
RW
17905 case $ac_file$ac_mode in
17906 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
b292c783 17907 "gcore":F) chmod +x gcore ;;
81ecdfbb 17908 "default":C)
c906108c
SS
17909case x$CONFIG_HEADERS in
17910xconfig.h:config.in)
17911echo > stamp-h ;;
17912esac
bec39cab 17913 ;;
81ecdfbb 17914
bec39cab 17915 esac
81ecdfbb 17916done # for ac_tag
c906108c 17917
bec39cab 17918
81ecdfbb 17919as_fn_exit 0
bec39cab 17920_ACEOF
bec39cab
AC
17921ac_clean_files=$ac_clean_files_save
17922
81ecdfbb
RW
17923test $ac_write_fail = 0 ||
17924 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
17925
bec39cab
AC
17926
17927# configure is writing to config.log, and then calls config.status.
17928# config.status does its own redirection, appending to config.log.
17929# Unfortunately, on DOS this fails, as config.log is still kept open
17930# by configure, so config.status won't be able to write to it; its
17931# output is simply discarded. So we exec the FD to /dev/null,
17932# effectively closing config.log, so it can be properly (re)opened and
17933# appended to by config.status. When coming back to configure, we
17934# need to make the FD available again.
17935if test "$no_create" != yes; then
17936 ac_cs_success=:
17937 ac_config_status_args=
17938 test "$silent" = yes &&
17939 ac_config_status_args="$ac_config_status_args --quiet"
17940 exec 5>/dev/null
17941 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
17942 exec 5>>config.log
17943 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17944 # would make configure fail if this is the last instruction.
81ecdfbb 17945 $ac_cs_success || as_fn_exit $?
bec39cab 17946fi
c906108c 17947
bec39cab 17948#
81ecdfbb 17949# CONFIG_SUBDIRS section.
bec39cab 17950#
c906108c
SS
17951if test "$no_recursion" != yes; then
17952
81ecdfbb
RW
17953 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
17954 # so they do not pile up.
c906108c
SS
17955 ac_sub_configure_args=
17956 ac_prev=
fdc59709
PB
17957 eval "set x $ac_configure_args"
17958 shift
17959 for ac_arg
17960 do
c906108c
SS
17961 if test -n "$ac_prev"; then
17962 ac_prev=
17963 continue
17964 fi
bec39cab 17965 case $ac_arg in
c906108c
SS
17966 -cache-file | --cache-file | --cache-fil | --cache-fi \
17967 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
17968 ac_prev=cache_file ;;
17969 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
bec39cab
AC
17970 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
17971 | --c=*)
17972 ;;
17973 --config-cache | -C)
c906108c
SS
17974 ;;
17975 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
17976 ac_prev=srcdir ;;
17977 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
17978 ;;
bec39cab
AC
17979 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
17980 ac_prev=prefix ;;
17981 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
17982 ;;
81ecdfbb
RW
17983 --disable-option-checking)
17984 ;;
fdc59709
PB
17985 *)
17986 case $ac_arg in
81ecdfbb 17987 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 17988 esac
81ecdfbb 17989 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
c906108c
SS
17990 esac
17991 done
17992
bec39cab
AC
17993 # Always prepend --prefix to ensure using the same prefix
17994 # in subdir configurations.
fdc59709
PB
17995 ac_arg="--prefix=$prefix"
17996 case $ac_arg in
81ecdfbb 17997 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 17998 esac
81ecdfbb
RW
17999 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
18000
18001 # Pass --silent
18002 if test "$silent" = yes; then
18003 ac_sub_configure_args="--silent $ac_sub_configure_args"
18004 fi
18005
18006 # Always prepend --disable-option-checking to silence warnings, since
18007 # different subdirs can have different --enable and --with options.
18008 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
bec39cab 18009
b4e70030 18010 ac_popdir=`pwd`
bec39cab 18011 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
c906108c
SS
18012
18013 # Do not complain, so a configure script can configure whichever
18014 # parts of a large source tree are present.
fdc59709 18015 test -d "$srcdir/$ac_dir" || continue
c906108c 18016
81ecdfbb
RW
18017 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
18018 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
18019 $as_echo "$ac_msg" >&6
18020 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
18021 ac_builddir=.
18022
81ecdfbb
RW
18023case "$ac_dir" in
18024.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18025*)
18026 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
18027 # A ".." for each directory in $ac_dir_suffix.
18028 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
18029 case $ac_top_builddir_sub in
18030 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18031 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18032 esac ;;
18033esac
18034ac_abs_top_builddir=$ac_pwd
18035ac_abs_builddir=$ac_pwd$ac_dir_suffix
18036# for backward compatibility:
18037ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
18038
18039case $srcdir in
81ecdfbb 18040 .) # We are building in place.
bec39cab 18041 ac_srcdir=.
81ecdfbb
RW
18042 ac_top_srcdir=$ac_top_builddir_sub
18043 ac_abs_top_srcdir=$ac_pwd ;;
18044 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 18045 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
18046 ac_top_srcdir=$srcdir
18047 ac_abs_top_srcdir=$srcdir ;;
18048 *) # Relative name.
18049 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18050 ac_top_srcdir=$ac_top_build_prefix$srcdir
18051 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 18052esac
81ecdfbb 18053ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
c906108c 18054
c906108c 18055
fdc59709 18056 cd "$ac_dir"
c906108c
SS
18057
18058 # Check for guested configure; otherwise get Cygnus style configure.
fdc59709
PB
18059 if test -f "$ac_srcdir/configure.gnu"; then
18060 ac_sub_configure=$ac_srcdir/configure.gnu
18061 elif test -f "$ac_srcdir/configure"; then
18062 ac_sub_configure=$ac_srcdir/configure
18063 elif test -f "$ac_srcdir/configure.in"; then
18064 # This should be Cygnus configure.
18065 ac_sub_configure=$ac_aux_dir/configure
c906108c 18066 else
81ecdfbb
RW
18067 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
18068$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
c906108c
SS
18069 ac_sub_configure=
18070 fi
18071
18072 # The recursion is here.
18073 if test -n "$ac_sub_configure"; then
c906108c 18074 # Make the cache file name correct relative to the subdirectory.
bec39cab
AC
18075 case $cache_file in
18076 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
81ecdfbb
RW
18077 *) # Relative name.
18078 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
c906108c 18079 esac
c906108c 18080
81ecdfbb
RW
18081 { $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
18082$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
c906108c 18083 # The eval makes quoting arguments work.
fdc59709
PB
18084 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
18085 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
81ecdfbb 18086 as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
c906108c
SS
18087 fi
18088
fdc59709 18089 cd "$ac_popdir"
c906108c
SS
18090 done
18091fi
81ecdfbb
RW
18092if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
18093 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
18094$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
18095fi
c906108c
SS
18096
18097
18098exit 0
This page took 3.095189 seconds and 4 git commands to generate.