Document the GDB 7.7 release in gdb/ChangeLog
[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
ac534cba
JB
661PYTHON_LIBS
662PYTHON_CPPFLAGS
81ecdfbb 663PYTHON_CFLAGS
ec685c5e 664python_prog_path
81ecdfbb
RW
665LTLIBEXPAT
666LIBEXPAT
667HAVE_LIBEXPAT
b8e0a31c 668JIT_READER_DIR
f997c383 669TARGET_PTR
39037522 670READLINE_TEXI_INCFLAG
81ecdfbb
RW
671READLINE_CFLAGS
672READLINE_DEPS
673READLINE
674MIG
675WINDRES
676DLLTOOL
c971b7fa 677AR
81ecdfbb
RW
678YFLAGS
679YACC
c971b7fa 680RANLIB
81ecdfbb 681LN_S
c971b7fa
PA
682INSTALL_DATA
683INSTALL_SCRIPT
684INSTALL_PROGRAM
685AWK
81ecdfbb
RW
686REPORT_BUGS_TEXI
687REPORT_BUGS_TO
688PKGVERSION
b292c783 689HAVE_NATIVE_GCORE_TARGET
81ecdfbb
RW
690TARGET_OBS
691subdirs
692GDB_DATADIR
693DEBUGDIR
5048e516
JK
694MAKEINFO_EXTRA_FLAGS
695MAKEINFOFLAGS
696MAKEINFO
81ecdfbb
RW
697PACKAGE
698GNULIB_STDINT_H
81ecdfbb
RW
699CATOBJEXT
700GENCAT
701INSTOBJEXT
702DATADIRNAME
703CATALOGS
704POSUB
705GMSGFMT
706XGETTEXT
707INCINTL
708LIBINTL_DEP
709LIBINTL
710USE_NLS
711SET_MAKE
712GMAKE_FALSE
713GMAKE_TRUE
714MAKE
715CCDEPMODE
716DEPDIR
717am__leading_dot
4869db5e
RM
718INSTALL_STRIP_PROGRAM
719STRIP
720install_sh
81ecdfbb
RW
721target_os
722target_vendor
723target_cpu
724target
725host_os
726host_vendor
727host_cpu
728host
729build_os
730build_vendor
731build_cpu
732build
c971b7fa
PA
733EGREP
734GREP
735CPP
81ecdfbb
RW
736OBJEXT
737EXEEXT
738ac_ct_CC
739CPPFLAGS
740LDFLAGS
741CFLAGS
742CC
743MAINT
744MAINTAINER_MODE_FALSE
745MAINTAINER_MODE_TRUE
746target_alias
747host_alias
748build_alias
749LIBS
750ECHO_T
751ECHO_N
752ECHO_C
753DEFS
754mandir
755localedir
756libdir
757psdir
758pdfdir
759dvidir
760htmldir
761infodir
762docdir
763oldincludedir
764includedir
765localstatedir
766sharedstatedir
767sysconfdir
768datadir
769datarootdir
770libexecdir
771sbindir
772bindir
773program_transform_name
774prefix
775exec_prefix
776PACKAGE_URL
777PACKAGE_BUGREPORT
778PACKAGE_STRING
779PACKAGE_VERSION
780PACKAGE_TARNAME
781PACKAGE_NAME
782PATH_SEPARATOR
783SHELL'
a4ce5b0d 784ac_subst_files='host_makefile_frag'
81ecdfbb
RW
785ac_user_opts='
786enable_option_checking
787enable_maintainer_mode
da2f07f1
JK
788enable_plugins
789enable_largefile
81ecdfbb
RW
790with_separate_debug_dir
791with_gdb_datadir
792with_relocated_sources
7349ff92 793with_auto_load_dir
bccbefd2 794with_auto_load_safe_path
81ecdfbb
RW
795enable_targets
796enable_64_bit_bfd
797enable_gdbcli
798enable_gdbmi
799enable_tui
800enable_gdbtk
05e7c244 801with_libunwind_ia64
81ecdfbb
RW
802with_curses
803enable_profiling
804with_pkgversion
805with_bugurl
b040ad30 806with_zlib
81ecdfbb 807with_libiconv_prefix
478aac75 808with_iconv_bin
81ecdfbb 809with_system_readline
b8e0a31c 810with_jit_reader_dir
81ecdfbb
RW
811with_expat
812with_gnu_ld
813enable_rpath
814with_libexpat_prefix
815with_python
a8db4212 816enable_libmcheck
81ecdfbb
RW
817with_included_regex
818with_sysroot
819with_system_gdbinit
820enable_werror
821enable_build_warnings
822enable_gdb_build_warnings
608e2dbb
TT
823with_lzma
824with_liblzma_prefix
81ecdfbb
RW
825with_tcl
826with_tk
827with_x
828enable_sim
829enable_multi_ice
496c0e1b 830enable_gdbserver
393fd4c3
YQ
831with_babeltrace
832with_libbabeltrace_prefix
81ecdfbb
RW
833'
834 ac_precious_vars='build_alias
835host_alias
836target_alias
837CC
838CFLAGS
839LDFLAGS
840LIBS
841CPPFLAGS
842CPP
f06e05e0
JK
843MAKEINFO
844MAKEINFOFLAGS
81ecdfbb
RW
845YACC
846YFLAGS
847XMKMF'
5ae98d25 848ac_subdirs_all='testsuite
81ecdfbb
RW
849gdbtk
850multi-ice
851gdbserver'
c906108c
SS
852
853# Initialize some variables set by options.
bec39cab
AC
854ac_init_help=
855ac_init_version=false
81ecdfbb
RW
856ac_unrecognized_opts=
857ac_unrecognized_sep=
c906108c
SS
858# The variables have the same names as the options, with
859# dashes changed to underlines.
bec39cab 860cache_file=/dev/null
c906108c 861exec_prefix=NONE
c906108c 862no_create=
c906108c
SS
863no_recursion=
864prefix=NONE
865program_prefix=NONE
866program_suffix=NONE
867program_transform_name=s,x,x,
868silent=
869site=
870srcdir=
c906108c
SS
871verbose=
872x_includes=NONE
873x_libraries=NONE
bec39cab
AC
874
875# Installation directory options.
876# These are left unexpanded so users can "make install exec_prefix=/foo"
877# and all the variables that are supposed to be based on exec_prefix
878# by default will actually change.
879# Use braces instead of parens because sh, perl, etc. also accept them.
81ecdfbb 880# (The list follows the same order as the GNU Coding Standards.)
c906108c
SS
881bindir='${exec_prefix}/bin'
882sbindir='${exec_prefix}/sbin'
883libexecdir='${exec_prefix}/libexec'
81ecdfbb
RW
884datarootdir='${prefix}/share'
885datadir='${datarootdir}'
c906108c
SS
886sysconfdir='${prefix}/etc'
887sharedstatedir='${prefix}/com'
888localstatedir='${prefix}/var'
c906108c
SS
889includedir='${prefix}/include'
890oldincludedir='/usr/include'
81ecdfbb
RW
891docdir='${datarootdir}/doc/${PACKAGE}'
892infodir='${datarootdir}/info'
893htmldir='${docdir}'
894dvidir='${docdir}'
895pdfdir='${docdir}'
896psdir='${docdir}'
897libdir='${exec_prefix}/lib'
898localedir='${datarootdir}/locale'
899mandir='${datarootdir}/man'
c906108c 900
c906108c 901ac_prev=
81ecdfbb 902ac_dashdash=
c906108c
SS
903for ac_option
904do
c906108c
SS
905 # If the previous option needs an argument, assign it.
906 if test -n "$ac_prev"; then
81ecdfbb 907 eval $ac_prev=\$ac_option
c906108c
SS
908 ac_prev=
909 continue
910 fi
911
81ecdfbb
RW
912 case $ac_option in
913 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
914 *) ac_optarg=yes ;;
915 esac
c906108c
SS
916
917 # Accept the important Cygnus configure options, so we can diagnose typos.
918
81ecdfbb
RW
919 case $ac_dashdash$ac_option in
920 --)
921 ac_dashdash=yes ;;
c906108c
SS
922
923 -bindir | --bindir | --bindi | --bind | --bin | --bi)
924 ac_prev=bindir ;;
925 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
bec39cab 926 bindir=$ac_optarg ;;
c906108c
SS
927
928 -build | --build | --buil | --bui | --bu)
bec39cab 929 ac_prev=build_alias ;;
c906108c 930 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
bec39cab 931 build_alias=$ac_optarg ;;
c906108c
SS
932
933 -cache-file | --cache-file | --cache-fil | --cache-fi \
934 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
935 ac_prev=cache_file ;;
936 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
937 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
bec39cab
AC
938 cache_file=$ac_optarg ;;
939
940 --config-cache | -C)
941 cache_file=config.cache ;;
c906108c 942
81ecdfbb 943 -datadir | --datadir | --datadi | --datad)
c906108c 944 ac_prev=datadir ;;
81ecdfbb 945 -datadir=* | --datadir=* | --datadi=* | --datad=*)
bec39cab 946 datadir=$ac_optarg ;;
c906108c 947
81ecdfbb
RW
948 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
949 | --dataroo | --dataro | --datar)
950 ac_prev=datarootdir ;;
951 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
952 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
953 datarootdir=$ac_optarg ;;
954
c906108c 955 -disable-* | --disable-*)
81ecdfbb 956 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
c906108c 957 # Reject names that are not valid shell variable names.
81ecdfbb
RW
958 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
959 as_fn_error "invalid feature name: $ac_useropt"
960 ac_useropt_orig=$ac_useropt
961 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
962 case $ac_user_opts in
963 *"
964"enable_$ac_useropt"
965"*) ;;
966 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
967 ac_unrecognized_sep=', ';;
968 esac
969 eval enable_$ac_useropt=no ;;
970
971 -docdir | --docdir | --docdi | --doc | --do)
972 ac_prev=docdir ;;
973 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
974 docdir=$ac_optarg ;;
975
976 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
977 ac_prev=dvidir ;;
978 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
979 dvidir=$ac_optarg ;;
c906108c
SS
980
981 -enable-* | --enable-*)
81ecdfbb 982 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
c906108c 983 # Reject names that are not valid shell variable names.
81ecdfbb
RW
984 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
985 as_fn_error "invalid feature name: $ac_useropt"
986 ac_useropt_orig=$ac_useropt
987 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
988 case $ac_user_opts in
989 *"
990"enable_$ac_useropt"
991"*) ;;
992 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
993 ac_unrecognized_sep=', ';;
b4e70030 994 esac
81ecdfbb 995 eval enable_$ac_useropt=\$ac_optarg ;;
c906108c
SS
996
997 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
998 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
999 | --exec | --exe | --ex)
1000 ac_prev=exec_prefix ;;
1001 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1002 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1003 | --exec=* | --exe=* | --ex=*)
bec39cab 1004 exec_prefix=$ac_optarg ;;
c906108c
SS
1005
1006 -gas | --gas | --ga | --g)
1007 # Obsolete; use --with-gas.
1008 with_gas=yes ;;
1009
bec39cab
AC
1010 -help | --help | --hel | --he | -h)
1011 ac_init_help=long ;;
1012 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1013 ac_init_help=recursive ;;
1014 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1015 ac_init_help=short ;;
c906108c
SS
1016
1017 -host | --host | --hos | --ho)
bec39cab 1018 ac_prev=host_alias ;;
c906108c 1019 -host=* | --host=* | --hos=* | --ho=*)
bec39cab 1020 host_alias=$ac_optarg ;;
c906108c 1021
81ecdfbb
RW
1022 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1023 ac_prev=htmldir ;;
1024 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1025 | --ht=*)
1026 htmldir=$ac_optarg ;;
1027
c906108c
SS
1028 -includedir | --includedir | --includedi | --included | --include \
1029 | --includ | --inclu | --incl | --inc)
1030 ac_prev=includedir ;;
1031 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1032 | --includ=* | --inclu=* | --incl=* | --inc=*)
bec39cab 1033 includedir=$ac_optarg ;;
c906108c
SS
1034
1035 -infodir | --infodir | --infodi | --infod | --info | --inf)
1036 ac_prev=infodir ;;
1037 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
bec39cab 1038 infodir=$ac_optarg ;;
c906108c
SS
1039
1040 -libdir | --libdir | --libdi | --libd)
1041 ac_prev=libdir ;;
1042 -libdir=* | --libdir=* | --libdi=* | --libd=*)
bec39cab 1043 libdir=$ac_optarg ;;
c906108c
SS
1044
1045 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1046 | --libexe | --libex | --libe)
1047 ac_prev=libexecdir ;;
1048 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1049 | --libexe=* | --libex=* | --libe=*)
bec39cab 1050 libexecdir=$ac_optarg ;;
c906108c 1051
81ecdfbb
RW
1052 -localedir | --localedir | --localedi | --localed | --locale)
1053 ac_prev=localedir ;;
1054 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1055 localedir=$ac_optarg ;;
1056
c906108c 1057 -localstatedir | --localstatedir | --localstatedi | --localstated \
81ecdfbb 1058 | --localstate | --localstat | --localsta | --localst | --locals)
c906108c
SS
1059 ac_prev=localstatedir ;;
1060 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
81ecdfbb 1061 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
bec39cab 1062 localstatedir=$ac_optarg ;;
c906108c
SS
1063
1064 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1065 ac_prev=mandir ;;
1066 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
bec39cab 1067 mandir=$ac_optarg ;;
c906108c
SS
1068
1069 -nfp | --nfp | --nf)
1070 # Obsolete; use --without-fp.
1071 with_fp=no ;;
1072
1073 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
bec39cab 1074 | --no-cr | --no-c | -n)
c906108c
SS
1075 no_create=yes ;;
1076
1077 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1078 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1079 no_recursion=yes ;;
1080
1081 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1082 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1083 | --oldin | --oldi | --old | --ol | --o)
1084 ac_prev=oldincludedir ;;
1085 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1086 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1087 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
bec39cab 1088 oldincludedir=$ac_optarg ;;
c906108c
SS
1089
1090 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1091 ac_prev=prefix ;;
1092 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
bec39cab 1093 prefix=$ac_optarg ;;
c906108c
SS
1094
1095 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1096 | --program-pre | --program-pr | --program-p)
1097 ac_prev=program_prefix ;;
1098 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1099 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
bec39cab 1100 program_prefix=$ac_optarg ;;
c906108c
SS
1101
1102 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1103 | --program-suf | --program-su | --program-s)
1104 ac_prev=program_suffix ;;
1105 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1106 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
bec39cab 1107 program_suffix=$ac_optarg ;;
c906108c
SS
1108
1109 -program-transform-name | --program-transform-name \
1110 | --program-transform-nam | --program-transform-na \
1111 | --program-transform-n | --program-transform- \
1112 | --program-transform | --program-transfor \
1113 | --program-transfo | --program-transf \
1114 | --program-trans | --program-tran \
1115 | --progr-tra | --program-tr | --program-t)
1116 ac_prev=program_transform_name ;;
1117 -program-transform-name=* | --program-transform-name=* \
1118 | --program-transform-nam=* | --program-transform-na=* \
1119 | --program-transform-n=* | --program-transform-=* \
1120 | --program-transform=* | --program-transfor=* \
1121 | --program-transfo=* | --program-transf=* \
1122 | --program-trans=* | --program-tran=* \
1123 | --progr-tra=* | --program-tr=* | --program-t=*)
bec39cab 1124 program_transform_name=$ac_optarg ;;
c906108c 1125
81ecdfbb
RW
1126 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1127 ac_prev=pdfdir ;;
1128 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1129 pdfdir=$ac_optarg ;;
1130
1131 -psdir | --psdir | --psdi | --psd | --ps)
1132 ac_prev=psdir ;;
1133 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1134 psdir=$ac_optarg ;;
1135
c906108c
SS
1136 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1137 | -silent | --silent | --silen | --sile | --sil)
1138 silent=yes ;;
1139
1140 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1141 ac_prev=sbindir ;;
1142 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1143 | --sbi=* | --sb=*)
bec39cab 1144 sbindir=$ac_optarg ;;
c906108c
SS
1145
1146 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1147 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1148 | --sharedst | --shareds | --shared | --share | --shar \
1149 | --sha | --sh)
1150 ac_prev=sharedstatedir ;;
1151 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1152 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1153 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1154 | --sha=* | --sh=*)
bec39cab 1155 sharedstatedir=$ac_optarg ;;
c906108c
SS
1156
1157 -site | --site | --sit)
1158 ac_prev=site ;;
1159 -site=* | --site=* | --sit=*)
bec39cab 1160 site=$ac_optarg ;;
3ace7edb 1161
c906108c
SS
1162 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1163 ac_prev=srcdir ;;
1164 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
bec39cab 1165 srcdir=$ac_optarg ;;
c906108c
SS
1166
1167 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1168 | --syscon | --sysco | --sysc | --sys | --sy)
1169 ac_prev=sysconfdir ;;
1170 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1171 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
bec39cab 1172 sysconfdir=$ac_optarg ;;
c906108c
SS
1173
1174 -target | --target | --targe | --targ | --tar | --ta | --t)
bec39cab 1175 ac_prev=target_alias ;;
c906108c 1176 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
bec39cab 1177 target_alias=$ac_optarg ;;
c906108c
SS
1178
1179 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1180 verbose=yes ;;
1181
bec39cab
AC
1182 -version | --version | --versio | --versi | --vers | -V)
1183 ac_init_version=: ;;
c906108c
SS
1184
1185 -with-* | --with-*)
81ecdfbb 1186 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
c906108c 1187 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1188 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1189 as_fn_error "invalid package name: $ac_useropt"
1190 ac_useropt_orig=$ac_useropt
1191 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1192 case $ac_user_opts in
1193 *"
1194"with_$ac_useropt"
1195"*) ;;
1196 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1197 ac_unrecognized_sep=', ';;
b4e70030 1198 esac
81ecdfbb 1199 eval with_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1200
1201 -without-* | --without-*)
81ecdfbb 1202 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
c906108c 1203 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1204 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1205 as_fn_error "invalid package name: $ac_useropt"
1206 ac_useropt_orig=$ac_useropt
1207 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1208 case $ac_user_opts in
1209 *"
1210"with_$ac_useropt"
1211"*) ;;
1212 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1213 ac_unrecognized_sep=', ';;
1214 esac
1215 eval with_$ac_useropt=no ;;
c906108c
SS
1216
1217 --x)
1218 # Obsolete; use --with-x.
1219 with_x=yes ;;
1220
1221 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1222 | --x-incl | --x-inc | --x-in | --x-i)
1223 ac_prev=x_includes ;;
1224 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1225 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
bec39cab 1226 x_includes=$ac_optarg ;;
c906108c
SS
1227
1228 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1229 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1230 ac_prev=x_libraries ;;
1231 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1232 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
bec39cab 1233 x_libraries=$ac_optarg ;;
c906108c 1234
81ecdfbb
RW
1235 -*) as_fn_error "unrecognized option: \`$ac_option'
1236Try \`$0 --help' for more information."
c906108c
SS
1237 ;;
1238
bec39cab
AC
1239 *=*)
1240 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1241 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1242 case $ac_envvar in #(
1243 '' | [0-9]* | *[!_$as_cr_alnum]* )
1244 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1245 esac
1246 eval $ac_envvar=\$ac_optarg
bec39cab
AC
1247 export $ac_envvar ;;
1248
c906108c 1249 *)
bec39cab 1250 # FIXME: should be removed in autoconf 3.0.
81ecdfbb 1251 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
bec39cab 1252 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
81ecdfbb 1253 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
bec39cab 1254 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
c906108c
SS
1255 ;;
1256
1257 esac
1258done
1259
1260if test -n "$ac_prev"; then
bec39cab 1261 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
81ecdfbb 1262 as_fn_error "missing argument to $ac_option"
c906108c 1263fi
c906108c 1264
81ecdfbb
RW
1265if test -n "$ac_unrecognized_opts"; then
1266 case $enable_option_checking in
1267 no) ;;
1268 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
1269 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
b4e70030 1270 esac
81ecdfbb 1271fi
b4e70030 1272
81ecdfbb
RW
1273# Check all directory arguments for consistency.
1274for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1275 datadir sysconfdir sharedstatedir localstatedir includedir \
1276 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1277 libdir localedir mandir
b4e70030 1278do
81ecdfbb
RW
1279 eval ac_val=\$$ac_var
1280 # Remove trailing slashes.
1281 case $ac_val in
1282 */ )
1283 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1284 eval $ac_var=\$ac_val;;
1285 esac
1286 # Be sure to have absolute directory names.
b4e70030 1287 case $ac_val in
81ecdfbb
RW
1288 [\\/$]* | ?:[\\/]* ) continue;;
1289 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
c906108c 1290 esac
81ecdfbb 1291 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
c906108c
SS
1292done
1293
bec39cab
AC
1294# There might be people who depend on the old broken behavior: `$host'
1295# used to hold the argument of --host etc.
1296# FIXME: To remove some day.
1297build=$build_alias
1298host=$host_alias
1299target=$target_alias
1300
1301# FIXME: To remove some day.
1302if test "x$host_alias" != x; then
1303 if test "x$build_alias" = x; then
1304 cross_compiling=maybe
81ecdfbb 1305 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
bec39cab
AC
1306 If a cross compiler is detected then cross compile mode will be used." >&2
1307 elif test "x$build_alias" != "x$host_alias"; then
1308 cross_compiling=yes
1309 fi
1310fi
c906108c 1311
bec39cab
AC
1312ac_tool_prefix=
1313test -n "$host_alias" && ac_tool_prefix=$host_alias-
1314
1315test "$silent" = yes && exec 6>/dev/null
c906108c 1316
c906108c 1317
81ecdfbb
RW
1318ac_pwd=`pwd` && test -n "$ac_pwd" &&
1319ac_ls_di=`ls -di .` &&
1320ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1321 as_fn_error "working directory cannot be determined"
1322test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1323 as_fn_error "pwd does not report name of working directory"
1324
1325
c906108c
SS
1326# Find the source files, if location was not specified.
1327if test -z "$srcdir"; then
1328 ac_srcdir_defaulted=yes
81ecdfbb
RW
1329 # Try the directory containing this script, then the parent directory.
1330 ac_confdir=`$as_dirname -- "$as_myself" ||
1331$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1332 X"$as_myself" : 'X\(//\)[^/]' \| \
1333 X"$as_myself" : 'X\(//\)$' \| \
1334 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1335$as_echo X"$as_myself" |
1336 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1337 s//\1/
1338 q
1339 }
1340 /^X\(\/\/\)[^/].*/{
1341 s//\1/
1342 q
1343 }
1344 /^X\(\/\/\)$/{
1345 s//\1/
1346 q
1347 }
1348 /^X\(\/\).*/{
1349 s//\1/
1350 q
1351 }
1352 s/.*/./; q'`
c906108c 1353 srcdir=$ac_confdir
81ecdfbb 1354 if test ! -r "$srcdir/$ac_unique_file"; then
c906108c
SS
1355 srcdir=..
1356 fi
1357else
1358 ac_srcdir_defaulted=no
1359fi
81ecdfbb
RW
1360if test ! -r "$srcdir/$ac_unique_file"; then
1361 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1362 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
1363fi
1364ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1365ac_abs_confdir=`(
1366 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
1367 pwd)`
1368# When building in place, set srcdir=.
1369if test "$ac_abs_confdir" = "$ac_pwd"; then
1370 srcdir=.
1371fi
1372# Remove unnecessary trailing slashes from srcdir.
1373# Double slashes in file names in object file debugging info
1374# mess up M-x gdb in Emacs.
1375case $srcdir in
1376*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1377esac
1378for ac_var in $ac_precious_vars; do
1379 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1380 eval ac_env_${ac_var}_value=\$${ac_var}
1381 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1382 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1383done
c906108c 1384
bec39cab
AC
1385#
1386# Report the --help message.
1387#
1388if test "$ac_init_help" = "long"; then
1389 # Omit some internal or obsolete options to make the list less imposing.
1390 # This message is too long to be a string in the A/UX 3.1 sh.
1391 cat <<_ACEOF
1392\`configure' configures this package to adapt to many kinds of systems.
1393
1394Usage: $0 [OPTION]... [VAR=VALUE]...
1395
1396To assign environment variables (e.g., CC, CFLAGS...), specify them as
1397VAR=VALUE. See below for descriptions of some of the useful variables.
1398
1399Defaults for the options are specified in brackets.
1400
1401Configuration:
1402 -h, --help display this help and exit
1403 --help=short display options specific to this package
1404 --help=recursive display the short help of all the included packages
1405 -V, --version display version information and exit
1406 -q, --quiet, --silent do not print \`checking...' messages
1407 --cache-file=FILE cache test results in FILE [disabled]
1408 -C, --config-cache alias for \`--cache-file=config.cache'
1409 -n, --no-create do not create output files
1410 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1411
bec39cab
AC
1412Installation directories:
1413 --prefix=PREFIX install architecture-independent files in PREFIX
81ecdfbb 1414 [$ac_default_prefix]
bec39cab 1415 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
81ecdfbb 1416 [PREFIX]
bec39cab
AC
1417
1418By default, \`make install' will install all the files in
1419\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1420an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1421for instance \`--prefix=\$HOME'.
1422
1423For better control, use the options below.
1424
1425Fine tuning of the installation directories:
81ecdfbb
RW
1426 --bindir=DIR user executables [EPREFIX/bin]
1427 --sbindir=DIR system admin executables [EPREFIX/sbin]
1428 --libexecdir=DIR program executables [EPREFIX/libexec]
1429 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1430 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1431 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1432 --libdir=DIR object code libraries [EPREFIX/lib]
1433 --includedir=DIR C header files [PREFIX/include]
1434 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1435 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1436 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1437 --infodir=DIR info documentation [DATAROOTDIR/info]
1438 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1439 --mandir=DIR man documentation [DATAROOTDIR/man]
1440 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1441 --htmldir=DIR html documentation [DOCDIR]
1442 --dvidir=DIR dvi documentation [DOCDIR]
1443 --pdfdir=DIR pdf documentation [DOCDIR]
1444 --psdir=DIR ps documentation [DOCDIR]
bec39cab
AC
1445_ACEOF
1446
1447 cat <<\_ACEOF
1448
9009e1ae
MR
1449Program names:
1450 --program-prefix=PREFIX prepend PREFIX to installed program names
1451 --program-suffix=SUFFIX append SUFFIX to installed program names
1452 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1453
bec39cab
AC
1454X features:
1455 --x-includes=DIR X include files are in DIR
1456 --x-libraries=DIR X library files are in DIR
1457
1458System types:
1459 --build=BUILD configure for building on BUILD [guessed]
1460 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1461 --target=TARGET configure for building compilers for TARGET [HOST]
1462_ACEOF
1463fi
1464
1465if test -n "$ac_init_help"; then
1466
1467 cat <<\_ACEOF
1468
1469Optional Features:
81ecdfbb 1470 --disable-option-checking ignore unrecognized --enable/--with options
bec39cab
AC
1471 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1472 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
85981d60
AC
1473 --enable-maintainer-mode enable make rules and dependencies not useful
1474 (and sometimes confusing) to the casual installer
da2f07f1
JK
1475 --enable-plugins Enable support for plugins (defaults no)
1476 --disable-largefile omit support for large files
a1220294
TT
1477 --enable-targets=TARGETS
1478 alternative target configurations
c0993dbe 1479 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
bec39cab
AC
1480 --disable-gdbcli disable command-line interface (CLI)
1481 --disable-gdbmi disable machine-interface (MI)
1482 --enable-tui enable full-screen terminal user interface (TUI)
1483 --enable-gdbtk enable gdbtk graphical user interface (GUI)
1484 --enable-profiling enable profiling of GDB
3841debe 1485 --disable-rpath do not hardcode runtime library paths
17ef446e 1486 --enable-libmcheck Try linking with -lmcheck if available
a1220294 1487 --enable-werror treat compile warnings as errors
32c1c914 1488 --enable-build-warnings enable build-time compiler warnings if gcc is used
a1220294 1489 --enable-gdb-build-warnings
32c1c914 1490 enable GDB specific build-time compiler warnings if
a1220294 1491 gcc is used
32c1c914 1492 --enable-sim link gdb with simulator
bec39cab 1493 --enable-multi-ice build the multi-ice-gdb-server
496c0e1b
JB
1494 --enable-gdbserver automatically build gdbserver (yes/no/auto, default
1495 is auto)
bec39cab
AC
1496
1497Optional Packages:
1498 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1499 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
a1220294 1500 --with-separate-debug-dir=PATH
32c1c914 1501 look for global separate debug info in this path
62e4f60c 1502 [LIBDIR/debug]
b14b1491
TT
1503 --with-gdb-datadir=PATH look for global separate data files in this path
1504 [DATADIR/gdb]
29b0e8a2 1505 --with-relocated-sources=PATH
32c1c914 1506 automatically relocate this path for source files
7349ff92 1507 --with-auto-load-dir=PATH
aff139ff 1508 directories from which to load auto-loaded scripts
1564a261 1509 [$debugdir:$datadir/auto-load]
bccbefd2 1510 --with-auto-load-safe-path=PATH
aff139ff 1511 directories safe to hold auto-loaded files
7349ff92 1512 [--with-auto-load-dir]
bccbefd2
JK
1513 --without-auto-load-safe-path
1514 do not restrict auto-loaded files locations
05e7c244 1515 --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets
cb01cfba
JB
1516 --with-curses use the curses library instead of the termcap
1517 library
c16158bc
JM
1518 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
1519 --with-bugurl=URL Direct users to URL to report a bug
b040ad30 1520 --with-zlib include zlib support (auto/yes/no) default=auto
a1220294
TT
1521 --with-libiconv-prefix=DIR
1522 search for libiconv in DIR/include and DIR/lib
478aac75 1523 --with-iconv-bin=PATH specify where to find the iconv program
6a30b0a5 1524 --with-system-readline use installed readline library
b8e0a31c
SD
1525 --with-jit-reader-dir=PATH
1526 directory to load the JIT readers from
5c39566f 1527 --with-expat include expat support (auto/yes/no)
3841debe
DJ
1528 --with-gnu-ld assume the C compiler uses GNU ld default=no
1529 --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib
1530 --without-libexpat-prefix don't search for libexpat in includedir and libdir
0c4a4063
DE
1531 --with-python[=PYTHON] include python support
1532 (auto/yes/no/<python-program>)
a1220294
TT
1533 --without-included-regex
1534 don't use included regex; this is the default on
1535 systems with version 2 of the GNU C library (use
1536 with caution on other system)
81ecdfbb 1537 --with-sysroot[=DIR] search for usr/lib et al within DIR
b14b1491 1538 --with-system-gdbinit=PATH
32c1c914 1539 automatically load a system-wide gdbinit file
608e2dbb
TT
1540 --with-lzma support lzma compression (auto/yes/no)
1541 --with-liblzma-prefix[=DIR] search for liblzma in DIR/include and DIR/lib
1542 --without-liblzma-prefix don't search for liblzma in includedir and libdir
5062cc19
KS
1543 --with-tcl directory containing tcl configuration (tclConfig.sh)
1544 --with-tk directory containing tk configuration (tkConfig.sh)
bec39cab 1545 --with-x use the X Window System
393fd4c3
YQ
1546 --with-babeltrace include babeltrace support (auto/yes/no)
1547 --with-libbabeltrace-prefix[=DIR] search for libbabeltrace in DIR/include and DIR/lib
1548 --without-libbabeltrace-prefix don't search for libbabeltrace in includedir and libdir
bec39cab
AC
1549
1550Some influential environment variables:
1551 CC C compiler command
1552 CFLAGS C compiler flags
1553 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1554 nonstandard directory <lib dir>
81ecdfbb
RW
1555 LIBS libraries to pass to the linker, e.g. -l<library>
1556 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1557 you have headers in a nonstandard directory <include dir>
bec39cab 1558 CPP C preprocessor
f06e05e0
JK
1559 MAKEINFO Parent configure detects if it is of sufficient version.
1560 MAKEINFOFLAGS
1561 Parameters for MAKEINFO.
81ecdfbb
RW
1562 YACC The `Yet Another C Compiler' implementation to use. Defaults to
1563 the first program found out of: `bison -y', `byacc', `yacc'.
1564 YFLAGS The list of arguments that will be passed by default to $YACC.
1565 This script will default YFLAGS to the empty string to avoid a
1566 default value of `-d' given by some make applications.
1567 XMKMF Path to xmkmf, Makefile generator for X Window System
bec39cab
AC
1568
1569Use these variables to override the choices made by `configure' or to help
1570it to find libraries and programs with nonstandard names/locations.
1571
81ecdfbb 1572Report bugs to the package provider.
bec39cab 1573_ACEOF
81ecdfbb 1574ac_status=$?
bec39cab
AC
1575fi
1576
1577if test "$ac_init_help" = "recursive"; then
1578 # If there are subdirs, report their specific --help.
bec39cab 1579 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
81ecdfbb
RW
1580 test -d "$ac_dir" ||
1581 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1582 continue
bec39cab
AC
1583 ac_builddir=.
1584
81ecdfbb
RW
1585case "$ac_dir" in
1586.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1587*)
1588 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1589 # A ".." for each directory in $ac_dir_suffix.
1590 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1591 case $ac_top_builddir_sub in
1592 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1593 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1594 esac ;;
1595esac
1596ac_abs_top_builddir=$ac_pwd
1597ac_abs_builddir=$ac_pwd$ac_dir_suffix
1598# for backward compatibility:
1599ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
1600
1601case $srcdir in
81ecdfbb 1602 .) # We are building in place.
bec39cab 1603 ac_srcdir=.
81ecdfbb
RW
1604 ac_top_srcdir=$ac_top_builddir_sub
1605 ac_abs_top_srcdir=$ac_pwd ;;
1606 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 1607 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
1608 ac_top_srcdir=$srcdir
1609 ac_abs_top_srcdir=$srcdir ;;
1610 *) # Relative name.
1611 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1612 ac_top_srcdir=$ac_top_build_prefix$srcdir
1613 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 1614esac
81ecdfbb 1615ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 1616
81ecdfbb
RW
1617 cd "$ac_dir" || { ac_status=$?; continue; }
1618 # Check for guested configure.
1619 if test -f "$ac_srcdir/configure.gnu"; then
1620 echo &&
1621 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1622 elif test -f "$ac_srcdir/configure"; then
1623 echo &&
1624 $SHELL "$ac_srcdir/configure" --help=recursive
3ace7edb 1625 else
81ecdfbb
RW
1626 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1627 fi || ac_status=$?
1628 cd "$ac_pwd" || { ac_status=$?; break; }
bec39cab
AC
1629 done
1630fi
1631
81ecdfbb 1632test -n "$ac_init_help" && exit $ac_status
bec39cab
AC
1633if $ac_init_version; then
1634 cat <<\_ACEOF
81ecdfbb
RW
1635configure
1636generated by GNU Autoconf 2.64
bec39cab 1637
81ecdfbb 1638Copyright (C) 2009 Free Software Foundation, Inc.
bec39cab
AC
1639This configure script is free software; the Free Software Foundation
1640gives unlimited permission to copy, distribute and modify it.
1641_ACEOF
81ecdfbb 1642 exit
bec39cab 1643fi
bec39cab 1644
81ecdfbb
RW
1645## ------------------------ ##
1646## Autoconf initialization. ##
1647## ------------------------ ##
bec39cab 1648
81ecdfbb
RW
1649# ac_fn_c_try_compile LINENO
1650# --------------------------
1651# Try to compile conftest.$ac_ext, and return whether this succeeded.
1652ac_fn_c_try_compile ()
1653{
1654 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1655 rm -f conftest.$ac_objext
1656 if { { ac_try="$ac_compile"
1657case "(($ac_try" in
1658 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1659 *) ac_try_echo=$ac_try;;
1660esac
1661eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1662$as_echo "$ac_try_echo"; } >&5
1663 (eval "$ac_compile") 2>conftest.err
1664 ac_status=$?
1665 if test -s conftest.err; then
1666 grep -v '^ *+' conftest.err >conftest.er1
1667 cat conftest.er1 >&5
1668 mv -f conftest.er1 conftest.err
1669 fi
1670 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1671 test $ac_status = 0; } && {
1672 test -z "$ac_c_werror_flag" ||
1673 test ! -s conftest.err
1674 } && test -s conftest.$ac_objext; then :
1675 ac_retval=0
1676else
1677 $as_echo "$as_me: failed program was:" >&5
1678sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1679
81ecdfbb
RW
1680 ac_retval=1
1681fi
1682 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1683 return $ac_retval
1684
1685} # ac_fn_c_try_compile
1686
1687# ac_fn_c_try_cpp LINENO
1688# ----------------------
1689# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1690ac_fn_c_try_cpp ()
bec39cab 1691{
81ecdfbb
RW
1692 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1693 if { { ac_try="$ac_cpp conftest.$ac_ext"
1694case "(($ac_try" in
1695 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1696 *) ac_try_echo=$ac_try;;
1697esac
1698eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1699$as_echo "$ac_try_echo"; } >&5
1700 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1701 ac_status=$?
1702 if test -s conftest.err; then
1703 grep -v '^ *+' conftest.err >conftest.er1
1704 cat conftest.er1 >&5
1705 mv -f conftest.er1 conftest.err
1706 fi
1707 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1708 test $ac_status = 0; } >/dev/null && {
1709 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1710 test ! -s conftest.err
1711 }; then :
1712 ac_retval=0
1713else
1714 $as_echo "$as_me: failed program was:" >&5
1715sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1716
81ecdfbb
RW
1717 ac_retval=1
1718fi
1719 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1720 return $ac_retval
bec39cab 1721
81ecdfbb 1722} # ac_fn_c_try_cpp
bec39cab 1723
81ecdfbb
RW
1724# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1725# -------------------------------------------------------
1726# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1727# the include files in INCLUDES and setting the cache variable VAR
1728# accordingly.
1729ac_fn_c_check_header_mongrel ()
1730{
1731 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1732 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1733 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1734$as_echo_n "checking for $2... " >&6; }
1735if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1736 $as_echo_n "(cached) " >&6
1737fi
1738eval ac_res=\$$3
1739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1740$as_echo "$ac_res" >&6; }
1741else
1742 # Is the header compilable?
1743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1744$as_echo_n "checking $2 usability... " >&6; }
1745cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1746/* end confdefs.h. */
1747$4
1748#include <$2>
1749_ACEOF
1750if ac_fn_c_try_compile "$LINENO"; then :
1751 ac_header_compiler=yes
1752else
1753 ac_header_compiler=no
1754fi
1755rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1756{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1757$as_echo "$ac_header_compiler" >&6; }
bec39cab 1758
81ecdfbb
RW
1759# Is the header present?
1760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1761$as_echo_n "checking $2 presence... " >&6; }
1762cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1763/* end confdefs.h. */
1764#include <$2>
1765_ACEOF
1766if ac_fn_c_try_cpp "$LINENO"; then :
1767 ac_header_preproc=yes
1768else
1769 ac_header_preproc=no
1770fi
1771rm -f conftest.err conftest.$ac_ext
1772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1773$as_echo "$ac_header_preproc" >&6; }
bec39cab 1774
81ecdfbb
RW
1775# So? What about this header?
1776case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1777 yes:no: )
1778 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1779$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1780 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1781$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1782 ;;
1783 no:yes:* )
1784 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1785$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1786 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1787$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1788 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1789$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1790 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1791$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1792 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1793$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1794 ;;
1795esac
1796 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1797$as_echo_n "checking for $2... " >&6; }
1798if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1799 $as_echo_n "(cached) " >&6
1800else
1801 eval "$3=\$ac_header_compiler"
1802fi
1803eval ac_res=\$$3
1804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1805$as_echo "$ac_res" >&6; }
1806fi
1807 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 1808
81ecdfbb 1809} # ac_fn_c_check_header_mongrel
bec39cab 1810
81ecdfbb
RW
1811# ac_fn_c_try_run LINENO
1812# ----------------------
1813# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1814# that executables *can* be run.
1815ac_fn_c_try_run ()
1816{
1817 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1818 if { { ac_try="$ac_link"
1819case "(($ac_try" in
1820 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1821 *) ac_try_echo=$ac_try;;
1822esac
1823eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1824$as_echo "$ac_try_echo"; } >&5
1825 (eval "$ac_link") 2>&5
1826 ac_status=$?
1827 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1828 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1829 { { case "(($ac_try" in
1830 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1831 *) ac_try_echo=$ac_try;;
1832esac
1833eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1834$as_echo "$ac_try_echo"; } >&5
1835 (eval "$ac_try") 2>&5
1836 ac_status=$?
1837 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1838 test $ac_status = 0; }; }; then :
1839 ac_retval=0
1840else
1841 $as_echo "$as_me: program exited with status $ac_status" >&5
1842 $as_echo "$as_me: failed program was:" >&5
1843sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1844
81ecdfbb
RW
1845 ac_retval=$ac_status
1846fi
1847 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1848 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1849 return $ac_retval
bec39cab 1850
81ecdfbb 1851} # ac_fn_c_try_run
bec39cab 1852
81ecdfbb
RW
1853# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1854# -------------------------------------------------------
1855# Tests whether HEADER exists and can be compiled using the include files in
1856# INCLUDES, setting the cache variable VAR accordingly.
1857ac_fn_c_check_header_compile ()
1858{
1859 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1860 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1861$as_echo_n "checking for $2... " >&6; }
1862if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1863 $as_echo_n "(cached) " >&6
1864else
1865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1866/* end confdefs.h. */
1867$4
1868#include <$2>
bec39cab 1869_ACEOF
81ecdfbb
RW
1870if ac_fn_c_try_compile "$LINENO"; then :
1871 eval "$3=yes"
1872else
1873 eval "$3=no"
1874fi
1875rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1876fi
1877eval ac_res=\$$3
1878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1879$as_echo "$ac_res" >&6; }
1880 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 1881
81ecdfbb 1882} # ac_fn_c_check_header_compile
bec39cab 1883
81ecdfbb
RW
1884# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1885# --------------------------------------------
1886# Tries to find the compile-time value of EXPR in a program that includes
1887# INCLUDES, setting VAR accordingly. Returns whether the value could be
1888# computed
1889ac_fn_c_compute_int ()
1890{
1891 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1892 if test "$cross_compiling" = yes; then
1893 # Depending upon the size, compute the lo and hi bounds.
1894cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1895/* end confdefs.h. */
1896$4
1897int
1898main ()
1899{
1900static int test_array [1 - 2 * !(($2) >= 0)];
1901test_array [0] = 0
bec39cab 1902
81ecdfbb
RW
1903 ;
1904 return 0;
1905}
1906_ACEOF
1907if ac_fn_c_try_compile "$LINENO"; then :
1908 ac_lo=0 ac_mid=0
1909 while :; do
1910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1911/* end confdefs.h. */
1912$4
1913int
1914main ()
1915{
1916static int test_array [1 - 2 * !(($2) <= $ac_mid)];
1917test_array [0] = 0
bec39cab 1918
81ecdfbb
RW
1919 ;
1920 return 0;
1921}
1922_ACEOF
1923if ac_fn_c_try_compile "$LINENO"; then :
1924 ac_hi=$ac_mid; break
1925else
1926 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
1927 if test $ac_lo -le $ac_mid; then
1928 ac_lo= ac_hi=
1929 break
1930 fi
1931 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
c906108c 1932fi
81ecdfbb
RW
1933rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1934 done
c906108c 1935else
81ecdfbb
RW
1936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1937/* end confdefs.h. */
1938$4
1939int
1940main ()
1941{
1942static int test_array [1 - 2 * !(($2) < 0)];
1943test_array [0] = 0
bec39cab 1944
81ecdfbb
RW
1945 ;
1946 return 0;
1947}
1948_ACEOF
1949if ac_fn_c_try_compile "$LINENO"; then :
1950 ac_hi=-1 ac_mid=-1
1951 while :; do
1952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1953/* end confdefs.h. */
1954$4
1955int
1956main ()
1957{
1958static int test_array [1 - 2 * !(($2) >= $ac_mid)];
1959test_array [0] = 0
bec39cab 1960
81ecdfbb
RW
1961 ;
1962 return 0;
1963}
1964_ACEOF
1965if ac_fn_c_try_compile "$LINENO"; then :
1966 ac_lo=$ac_mid; break
1967else
1968 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
1969 if test $ac_mid -le $ac_hi; then
1970 ac_lo= ac_hi=
1971 break
1972 fi
1973 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
1974fi
1975rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1976 done
1977else
1978 ac_lo= ac_hi=
1979fi
1980rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1981fi
1982rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1983# Binary search between lo and hi bounds.
1984while test "x$ac_lo" != "x$ac_hi"; do
1985 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
1986 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1987/* end confdefs.h. */
1988$4
1989int
1990main ()
1991{
1992static int test_array [1 - 2 * !(($2) <= $ac_mid)];
1993test_array [0] = 0
bec39cab 1994
81ecdfbb
RW
1995 ;
1996 return 0;
1997}
1998_ACEOF
1999if ac_fn_c_try_compile "$LINENO"; then :
2000 ac_hi=$ac_mid
2001else
2002 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2003fi
2004rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2005done
2006case $ac_lo in #((
2007?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2008'') ac_retval=1 ;;
2009esac
2010 else
2011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2012/* end confdefs.h. */
2013$4
2014static long int longval () { return $2; }
2015static unsigned long int ulongval () { return $2; }
2016#include <stdio.h>
2017#include <stdlib.h>
2018int
2019main ()
2020{
bec39cab 2021
81ecdfbb
RW
2022 FILE *f = fopen ("conftest.val", "w");
2023 if (! f)
2024 return 1;
2025 if (($2) < 0)
2026 {
2027 long int i = longval ();
2028 if (i != ($2))
2029 return 1;
2030 fprintf (f, "%ld", i);
2031 }
2032 else
2033 {
2034 unsigned long int i = ulongval ();
2035 if (i != ($2))
2036 return 1;
2037 fprintf (f, "%lu", i);
2038 }
2039 /* Do not output a trailing newline, as this causes \r\n confusion
2040 on some platforms. */
2041 return ferror (f) || fclose (f) != 0;
bec39cab 2042
81ecdfbb
RW
2043 ;
2044 return 0;
2045}
2046_ACEOF
2047if ac_fn_c_try_run "$LINENO"; then :
2048 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2049else
2050 ac_retval=1
2051fi
2052rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2053 conftest.$ac_objext conftest.beam conftest.$ac_ext
2054rm -f conftest.val
bec39cab 2055
81ecdfbb
RW
2056 fi
2057 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2058 return $ac_retval
bec39cab 2059
81ecdfbb 2060} # ac_fn_c_compute_int
bec39cab 2061
c971b7fa
PA
2062# ac_fn_c_try_link LINENO
2063# -----------------------
2064# Try to link conftest.$ac_ext, and return whether this succeeded.
2065ac_fn_c_try_link ()
2066{
2067 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2068 rm -f conftest.$ac_objext conftest$ac_exeext
2069 if { { ac_try="$ac_link"
2070case "(($ac_try" in
2071 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2072 *) ac_try_echo=$ac_try;;
2073esac
2074eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2075$as_echo "$ac_try_echo"; } >&5
2076 (eval "$ac_link") 2>conftest.err
2077 ac_status=$?
2078 if test -s conftest.err; then
2079 grep -v '^ *+' conftest.err >conftest.er1
2080 cat conftest.er1 >&5
2081 mv -f conftest.er1 conftest.err
2082 fi
2083 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2084 test $ac_status = 0; } && {
2085 test -z "$ac_c_werror_flag" ||
2086 test ! -s conftest.err
2087 } && test -s conftest$ac_exeext && {
2088 test "$cross_compiling" = yes ||
2089 $as_test_x conftest$ac_exeext
2090 }; then :
2091 ac_retval=0
2092else
2093 $as_echo "$as_me: failed program was:" >&5
2094sed 's/^/| /' conftest.$ac_ext >&5
2095
2096 ac_retval=1
2097fi
2098 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2099 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2100 # interfere with the next link command; also delete a directory that is
2101 # left behind by Apple's compiler. We do this before executing the actions.
2102 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2103 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2104 return $ac_retval
2105
2106} # ac_fn_c_try_link
2107
55a8c076
YQ
2108# ac_fn_c_check_func LINENO FUNC VAR
2109# ----------------------------------
2110# Tests whether FUNC exists, setting the cache variable VAR accordingly
2111ac_fn_c_check_func ()
81ecdfbb
RW
2112{
2113 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2115$as_echo_n "checking for $2... " >&6; }
2116if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2117 $as_echo_n "(cached) " >&6
2118else
81ecdfbb
RW
2119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2120/* end confdefs.h. */
55a8c076
YQ
2121/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2122 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2123#define $2 innocuous_$2
2124
2125/* System header to define __stub macros and hopefully few prototypes,
2126 which can conflict with char $2 (); below.
2127 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2128 <limits.h> exists even on freestanding compilers. */
2129
2130#ifdef __STDC__
2131# include <limits.h>
2132#else
2133# include <assert.h>
2134#endif
2135
2136#undef $2
2137
2138/* Override any GCC internal prototype to avoid an error.
2139 Use char because int might match the return type of a GCC
2140 builtin and then its argument prototype would still apply. */
2141#ifdef __cplusplus
2142extern "C"
2143#endif
2144char $2 ();
2145/* The GNU C library defines this for functions which it implements
2146 to always fail with ENOSYS. Some functions are actually named
2147 something starting with __ and the normal name is an alias. */
2148#if defined __stub_$2 || defined __stub___$2
2149choke me
2150#endif
2151
2152int
2153main ()
2154{
2155return $2 ();
2156 ;
2157 return 0;
2158}
2159_ACEOF
2160if ac_fn_c_try_link "$LINENO"; then :
2161 eval "$3=yes"
2162else
2163 eval "$3=no"
2164fi
2165rm -f core conftest.err conftest.$ac_objext \
2166 conftest$ac_exeext conftest.$ac_ext
2167fi
2168eval ac_res=\$$3
2169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2170$as_echo "$ac_res" >&6; }
2171 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2172
2173} # ac_fn_c_check_func
2174
770d76d7
PA
2175# ac_fn_c_check_decl LINENO SYMBOL VAR
2176# ------------------------------------
2177# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2178ac_fn_c_check_decl ()
2179{
2180 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2181 as_decl_name=`echo $2|sed 's/ *(.*//'`
2182 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2183 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2184$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2185if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2186 $as_echo_n "(cached) " >&6
2187else
2188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2189/* end confdefs.h. */
2190$4
2191int
2192main ()
2193{
2194#ifndef $as_decl_name
2195#ifdef __cplusplus
2196 (void) $as_decl_use;
2197#else
2198 (void) $as_decl_name;
2199#endif
2200#endif
2201
2202 ;
2203 return 0;
2204}
2205_ACEOF
2206if ac_fn_c_try_compile "$LINENO"; then :
2207 eval "$3=yes"
2208else
2209 eval "$3=no"
2210fi
2211rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2212fi
2213eval ac_res=\$$3
2214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2215$as_echo "$ac_res" >&6; }
2216 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2217
2218} # ac_fn_c_check_decl
2219
55a8c076
YQ
2220# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2221# ----------------------------------------------------
2222# Tries to find if the field MEMBER exists in type AGGR, after including
2223# INCLUDES, setting cache variable VAR accordingly.
2224ac_fn_c_check_member ()
2225{
2226 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2228$as_echo_n "checking for $2.$3... " >&6; }
2229if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
2230 $as_echo_n "(cached) " >&6
2231else
2232 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2233/* end confdefs.h. */
2234$5
2235int
2236main ()
2237{
2238static $2 ac_aggr;
2239if (ac_aggr.$3)
2240return 0;
2241 ;
2242 return 0;
2243}
2244_ACEOF
2245if ac_fn_c_try_compile "$LINENO"; then :
2246 eval "$4=yes"
2247else
2248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2249/* end confdefs.h. */
2250$5
2251int
2252main ()
2253{
2254static $2 ac_aggr;
2255if (sizeof ac_aggr.$3)
2256return 0;
2257 ;
2258 return 0;
2259}
2260_ACEOF
2261if ac_fn_c_try_compile "$LINENO"; then :
2262 eval "$4=yes"
2263else
2264 eval "$4=no"
2265fi
2266rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2267fi
2268rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2269fi
2270eval ac_res=\$$4
2271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2272$as_echo "$ac_res" >&6; }
2273 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2274
2275} # ac_fn_c_check_member
2276
2277# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2278# -------------------------------------------
2279# Tests whether TYPE exists after having included INCLUDES, setting cache
2280# variable VAR accordingly.
2281ac_fn_c_check_type ()
2282{
2283 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2284 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2285$as_echo_n "checking for $2... " >&6; }
2286if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2287 $as_echo_n "(cached) " >&6
2288else
2289 eval "$3=no"
2290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2291/* end confdefs.h. */
2292$4
2293int
2294main ()
2295{
2296if (sizeof ($2))
2297 return 0;
2298 ;
2299 return 0;
2300}
2301_ACEOF
2302if ac_fn_c_try_compile "$LINENO"; then :
2303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2304/* end confdefs.h. */
2305$4
2306int
2307main ()
2308{
2309if (sizeof (($2)))
2310 return 0;
2311 ;
2312 return 0;
2313}
2314_ACEOF
2315if ac_fn_c_try_compile "$LINENO"; then :
d5af19ba 2316
81ecdfbb
RW
2317else
2318 eval "$3=yes"
2319fi
2320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2321fi
2322rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2323fi
2324eval ac_res=\$$3
2325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2326$as_echo "$ac_res" >&6; }
2327 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
d5af19ba 2328
81ecdfbb
RW
2329} # ac_fn_c_check_type
2330cat >config.log <<_ACEOF
2331This file contains any messages produced by compilers while
2332running configure, to aid debugging if configure makes a mistake.
d5af19ba 2333
81ecdfbb
RW
2334It was created by $as_me, which was
2335generated by GNU Autoconf 2.64. Invocation command line was
b4e70030 2336
81ecdfbb 2337 $ $0 $@
413ccac7 2338
81ecdfbb
RW
2339_ACEOF
2340exec 5>>config.log
2341{
2342cat <<_ASUNAME
2343## --------- ##
2344## Platform. ##
2345## --------- ##
413ccac7 2346
81ecdfbb
RW
2347hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2348uname -m = `(uname -m) 2>/dev/null || echo unknown`
2349uname -r = `(uname -r) 2>/dev/null || echo unknown`
2350uname -s = `(uname -s) 2>/dev/null || echo unknown`
2351uname -v = `(uname -v) 2>/dev/null || echo unknown`
85981d60 2352
81ecdfbb
RW
2353/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2354/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
413ccac7 2355
81ecdfbb
RW
2356/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2357/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2358/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2359/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2360/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2361/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2362/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
c906108c 2363
81ecdfbb 2364_ASUNAME
bec39cab 2365
bec39cab
AC
2366as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2367for as_dir in $PATH
2368do
2369 IFS=$as_save_IFS
2370 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2371 $as_echo "PATH: $as_dir"
2372 done
2373IFS=$as_save_IFS
bec39cab 2374
81ecdfbb 2375} >&5
bec39cab 2376
81ecdfbb 2377cat >&5 <<_ACEOF
bec39cab 2378
bec39cab 2379
81ecdfbb
RW
2380## ----------- ##
2381## Core tests. ##
2382## ----------- ##
2383
2384_ACEOF
2385
2386
2387# Keep a trace of the command line.
2388# Strip out --no-create and --no-recursion so they do not pile up.
2389# Strip out --silent because we don't want to record it for future runs.
2390# Also quote any args containing shell meta-characters.
2391# Make two passes to allow for proper duplicate-argument suppression.
2392ac_configure_args=
2393ac_configure_args0=
2394ac_configure_args1=
2395ac_must_keep_next=false
2396for ac_pass in 1 2
2397do
2398 for ac_arg
2399 do
2400 case $ac_arg in
2401 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2402 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2403 | -silent | --silent | --silen | --sile | --sil)
2404 continue ;;
2405 *\'*)
2406 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2407 esac
2408 case $ac_pass in
2409 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2410 2)
2411 as_fn_append ac_configure_args1 " '$ac_arg'"
2412 if test $ac_must_keep_next = true; then
2413 ac_must_keep_next=false # Got value, back to normal.
2414 else
2415 case $ac_arg in
2416 *=* | --config-cache | -C | -disable-* | --disable-* \
2417 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2418 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2419 | -with-* | --with-* | -without-* | --without-* | --x)
2420 case "$ac_configure_args0 " in
2421 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2422 esac
2423 ;;
2424 -* ) ac_must_keep_next=true ;;
2425 esac
2426 fi
2427 as_fn_append ac_configure_args " '$ac_arg'"
2428 ;;
2429 esac
2430 done
2431done
2432{ ac_configure_args0=; unset ac_configure_args0;}
2433{ ac_configure_args1=; unset ac_configure_args1;}
2434
2435# When interrupted or exit'd, cleanup temporary files, and complete
2436# config.log. We remove comments because anyway the quotes in there
2437# would cause problems or look ugly.
2438# WARNING: Use '\'' to represent an apostrophe within the trap.
2439# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2440trap 'exit_status=$?
2441 # Save into config.log some information that might help in debugging.
2442 {
2443 echo
2444
2445 cat <<\_ASBOX
2446## ---------------- ##
2447## Cache variables. ##
2448## ---------------- ##
2449_ASBOX
2450 echo
2451 # The following way of writing the cache mishandles newlines in values,
2452(
2453 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2454 eval ac_val=\$$ac_var
2455 case $ac_val in #(
2456 *${as_nl}*)
2457 case $ac_var in #(
2458 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2459$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2460 esac
2461 case $ac_var in #(
2462 _ | IFS | as_nl) ;; #(
2463 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2464 *) { eval $ac_var=; unset $ac_var;} ;;
2465 esac ;;
2466 esac
2467 done
2468 (set) 2>&1 |
2469 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2470 *${as_nl}ac_space=\ *)
2471 sed -n \
2472 "s/'\''/'\''\\\\'\'''\''/g;
2473 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2474 ;; #(
2475 *)
2476 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2477 ;;
2478 esac |
2479 sort
2480)
2481 echo
2482
2483 cat <<\_ASBOX
2484## ----------------- ##
2485## Output variables. ##
2486## ----------------- ##
2487_ASBOX
2488 echo
2489 for ac_var in $ac_subst_vars
2490 do
2491 eval ac_val=\$$ac_var
2492 case $ac_val in
2493 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2494 esac
2495 $as_echo "$ac_var='\''$ac_val'\''"
2496 done | sort
2497 echo
2498
2499 if test -n "$ac_subst_files"; then
2500 cat <<\_ASBOX
2501## ------------------- ##
2502## File substitutions. ##
2503## ------------------- ##
2504_ASBOX
2505 echo
2506 for ac_var in $ac_subst_files
2507 do
2508 eval ac_val=\$$ac_var
2509 case $ac_val in
2510 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2511 esac
2512 $as_echo "$ac_var='\''$ac_val'\''"
2513 done | sort
2514 echo
2515 fi
2516
2517 if test -s confdefs.h; then
2518 cat <<\_ASBOX
2519## ----------- ##
2520## confdefs.h. ##
2521## ----------- ##
2522_ASBOX
2523 echo
2524 cat confdefs.h
2525 echo
2526 fi
2527 test "$ac_signal" != 0 &&
2528 $as_echo "$as_me: caught signal $ac_signal"
2529 $as_echo "$as_me: exit $exit_status"
2530 } >&5
2531 rm -f core *.core core.conftest.* &&
2532 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2533 exit $exit_status
2534' 0
2535for ac_signal in 1 2 13 15; do
2536 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2537done
2538ac_signal=0
2539
2540# confdefs.h avoids OS command line length limits that DEFS can exceed.
2541rm -f -r conftest* confdefs.h
2542
2543$as_echo "/* confdefs.h */" > confdefs.h
2544
2545# Predefined preprocessor variables.
2546
2547cat >>confdefs.h <<_ACEOF
2548#define PACKAGE_NAME "$PACKAGE_NAME"
2549_ACEOF
2550
2551cat >>confdefs.h <<_ACEOF
2552#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2553_ACEOF
2554
2555cat >>confdefs.h <<_ACEOF
2556#define PACKAGE_VERSION "$PACKAGE_VERSION"
2557_ACEOF
2558
2559cat >>confdefs.h <<_ACEOF
2560#define PACKAGE_STRING "$PACKAGE_STRING"
2561_ACEOF
2562
2563cat >>confdefs.h <<_ACEOF
2564#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2565_ACEOF
2566
2567cat >>confdefs.h <<_ACEOF
2568#define PACKAGE_URL "$PACKAGE_URL"
2569_ACEOF
2570
2571
2572# Let the site file select an alternate cache file if it wants to.
2573# Prefer an explicitly selected file to automatically selected ones.
2574ac_site_file1=NONE
2575ac_site_file2=NONE
2576if test -n "$CONFIG_SITE"; then
2577 ac_site_file1=$CONFIG_SITE
2578elif test "x$prefix" != xNONE; then
2579 ac_site_file1=$prefix/share/config.site
2580 ac_site_file2=$prefix/etc/config.site
2581else
2582 ac_site_file1=$ac_default_prefix/share/config.site
2583 ac_site_file2=$ac_default_prefix/etc/config.site
2584fi
2585for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2586do
2587 test "x$ac_site_file" = xNONE && continue
2588 if test -r "$ac_site_file"; then
2589 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2590$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2591 sed 's/^/| /' "$ac_site_file" >&5
2592 . "$ac_site_file"
2593 fi
2594done
2595
2596if test -r "$cache_file"; then
2597 # Some versions of bash will fail to source /dev/null (special
2598 # files actually), so we avoid doing that.
2599 if test -f "$cache_file"; then
2600 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2601$as_echo "$as_me: loading cache $cache_file" >&6;}
2602 case $cache_file in
2603 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2604 *) . "./$cache_file";;
2605 esac
2606 fi
2607else
2608 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2609$as_echo "$as_me: creating cache $cache_file" >&6;}
2610 >$cache_file
bec39cab
AC
2611fi
2612
81ecdfbb
RW
2613# Check that the precious variables saved in the cache have kept the same
2614# value.
2615ac_cache_corrupted=false
2616for ac_var in $ac_precious_vars; do
2617 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2618 eval ac_new_set=\$ac_env_${ac_var}_set
2619 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2620 eval ac_new_val=\$ac_env_${ac_var}_value
2621 case $ac_old_set,$ac_new_set in
2622 set,)
2623 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2624$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2625 ac_cache_corrupted=: ;;
2626 ,set)
2627 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2628$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2629 ac_cache_corrupted=: ;;
2630 ,);;
2631 *)
2632 if test "x$ac_old_val" != "x$ac_new_val"; then
2633 # differences in whitespace do not lead to failure.
2634 ac_old_val_w=`echo x $ac_old_val`
2635 ac_new_val_w=`echo x $ac_new_val`
2636 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2637 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2638$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2639 ac_cache_corrupted=:
2640 else
2641 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2642$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2643 eval $ac_var=\$ac_old_val
2644 fi
2645 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2646$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2647 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2648$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2649 fi;;
2650 esac
2651 # Pass precious variables to config.status.
2652 if test "$ac_new_set" = set; then
2653 case $ac_new_val in
2654 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2655 *) ac_arg=$ac_var=$ac_new_val ;;
2656 esac
2657 case " $ac_configure_args " in
2658 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2659 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2660 esac
2661 fi
2662done
2663if $ac_cache_corrupted; then
2664 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2665$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2666 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2667$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2668 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2669fi
2670## -------------------- ##
2671## Main body of script. ##
2672## -------------------- ##
2673
2674ac_ext=c
2675ac_cpp='$CPP $CPPFLAGS'
2676ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2677ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2678ac_compiler_gnu=$ac_cv_c_compiler_gnu
2679
2680
2681
2682
2683
2684ac_config_headers="$ac_config_headers config.h:config.in"
2685
2686
2687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2688$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2689 # Check whether --enable-maintainer-mode was given.
2690if test "${enable_maintainer_mode+set}" = set; then :
2691 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2692else
2693 USE_MAINTAINER_MODE=no
2694fi
2695
2696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
2697$as_echo "$USE_MAINTAINER_MODE" >&6; }
2698 if test $USE_MAINTAINER_MODE = yes; then
2699 MAINTAINER_MODE_TRUE=
2700 MAINTAINER_MODE_FALSE='#'
2701else
2702 MAINTAINER_MODE_TRUE='#'
2703 MAINTAINER_MODE_FALSE=
2704fi
2705
2706 MAINT=$MAINTAINER_MODE_TRUE
2707
2708
2709
17ef446e
PA
2710# Set the 'development' global.
2711. $srcdir/development.sh
f5f1cdb6 2712
81ecdfbb
RW
2713ac_ext=c
2714ac_cpp='$CPP $CPPFLAGS'
2715ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2716ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2717ac_compiler_gnu=$ac_cv_c_compiler_gnu
2718if test -n "$ac_tool_prefix"; then
2719 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2720set dummy ${ac_tool_prefix}gcc; ac_word=$2
2721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2722$as_echo_n "checking for $ac_word... " >&6; }
2723if test "${ac_cv_prog_CC+set}" = set; then :
2724 $as_echo_n "(cached) " >&6
c906108c
SS
2725else
2726 if test -n "$CC"; then
2727 ac_cv_prog_CC="$CC" # Let the user override the test.
2728else
bec39cab
AC
2729as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2730for as_dir in $PATH
2731do
2732 IFS=$as_save_IFS
2733 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2734 for ac_exec_ext in '' $ac_executable_extensions; do
2735 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2736 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2737 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2738 break 2
2739 fi
2740done
81ecdfbb
RW
2741 done
2742IFS=$as_save_IFS
bec39cab 2743
c906108c
SS
2744fi
2745fi
bec39cab 2746CC=$ac_cv_prog_CC
c906108c 2747if test -n "$CC"; then
81ecdfbb
RW
2748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2749$as_echo "$CC" >&6; }
c906108c 2750else
81ecdfbb
RW
2751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2752$as_echo "no" >&6; }
c906108c
SS
2753fi
2754
81ecdfbb 2755
b4e70030
JB
2756fi
2757if test -z "$ac_cv_prog_CC"; then
2758 ac_ct_CC=$CC
81ecdfbb
RW
2759 # Extract the first word of "gcc", so it can be a program name with args.
2760set dummy gcc; ac_word=$2
2761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2762$as_echo_n "checking for $ac_word... " >&6; }
2763if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
2764 $as_echo_n "(cached) " >&6
b4e70030
JB
2765else
2766 if test -n "$ac_ct_CC"; then
2767 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2768else
2769as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2770for as_dir in $PATH
2771do
2772 IFS=$as_save_IFS
2773 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2774 for ac_exec_ext in '' $ac_executable_extensions; do
2775 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2776 ac_cv_prog_ac_ct_CC="gcc"
2777 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b4e70030 2778 break 2
4e8d927d 2779 fi
b4e70030 2780done
81ecdfbb
RW
2781 done
2782IFS=$as_save_IFS
b4e70030
JB
2783
2784fi
2785fi
2786ac_ct_CC=$ac_cv_prog_ac_ct_CC
2787if test -n "$ac_ct_CC"; then
81ecdfbb
RW
2788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2789$as_echo "$ac_ct_CC" >&6; }
b4e70030 2790else
81ecdfbb
RW
2791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2792$as_echo "no" >&6; }
b4e70030
JB
2793fi
2794
81ecdfbb
RW
2795 if test "x$ac_ct_CC" = x; then
2796 CC=""
2797 else
2798 case $cross_compiling:$ac_tool_warned in
2799yes:)
2800{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2801$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2802ac_tool_warned=yes ;;
2803esac
2804 CC=$ac_ct_CC
2805 fi
b4e70030
JB
2806else
2807 CC="$ac_cv_prog_CC"
2808fi
2809
c906108c 2810if test -z "$CC"; then
81ecdfbb
RW
2811 if test -n "$ac_tool_prefix"; then
2812 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2813set dummy ${ac_tool_prefix}cc; ac_word=$2
2814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2815$as_echo_n "checking for $ac_word... " >&6; }
2816if test "${ac_cv_prog_CC+set}" = set; then :
2817 $as_echo_n "(cached) " >&6
c906108c
SS
2818else
2819 if test -n "$CC"; then
2820 ac_cv_prog_CC="$CC" # Let the user override the test.
2821else
bec39cab
AC
2822as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2823for as_dir in $PATH
2824do
2825 IFS=$as_save_IFS
2826 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2827 for ac_exec_ext in '' $ac_executable_extensions; do
2828 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2829 ac_cv_prog_CC="${ac_tool_prefix}cc"
2830 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2831 break 2
2832 fi
2833done
81ecdfbb
RW
2834 done
2835IFS=$as_save_IFS
2836
2837fi
2838fi
2839CC=$ac_cv_prog_CC
2840if test -n "$CC"; then
2841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2842$as_echo "$CC" >&6; }
2843else
2844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2845$as_echo "no" >&6; }
2846fi
2847
2848
2849 fi
2850fi
2851if test -z "$CC"; then
2852 # Extract the first word of "cc", so it can be a program name with args.
2853set dummy cc; ac_word=$2
2854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2855$as_echo_n "checking for $ac_word... " >&6; }
2856if test "${ac_cv_prog_CC+set}" = set; then :
2857 $as_echo_n "(cached) " >&6
2858else
2859 if test -n "$CC"; then
2860 ac_cv_prog_CC="$CC" # Let the user override the test.
2861else
2862 ac_prog_rejected=no
2863as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2864for as_dir in $PATH
2865do
2866 IFS=$as_save_IFS
2867 test -z "$as_dir" && as_dir=.
2868 for ac_exec_ext in '' $ac_executable_extensions; do
2869 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2870 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2871 ac_prog_rejected=yes
2872 continue
2873 fi
2874 ac_cv_prog_CC="cc"
2875 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2876 break 2
2877 fi
2878done
2879 done
2880IFS=$as_save_IFS
bec39cab 2881
c906108c
SS
2882if test $ac_prog_rejected = yes; then
2883 # We found a bogon in the path, so make sure we never use it.
2884 set dummy $ac_cv_prog_CC
2885 shift
bec39cab 2886 if test $# != 0; then
c906108c
SS
2887 # We chose a different compiler from the bogus one.
2888 # However, it has the same basename, so the bogon will be chosen
2889 # first if we set CC to just the basename; use the full file name.
2890 shift
bec39cab 2891 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
c906108c
SS
2892 fi
2893fi
2894fi
2895fi
bec39cab 2896CC=$ac_cv_prog_CC
c906108c 2897if test -n "$CC"; then
81ecdfbb
RW
2898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2899$as_echo "$CC" >&6; }
c906108c 2900else
81ecdfbb
RW
2901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2902$as_echo "no" >&6; }
c906108c
SS
2903fi
2904
81ecdfbb 2905
bec39cab
AC
2906fi
2907if test -z "$CC"; then
2908 if test -n "$ac_tool_prefix"; then
81ecdfbb 2909 for ac_prog in cl.exe
bec39cab
AC
2910 do
2911 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2912set dummy $ac_tool_prefix$ac_prog; ac_word=$2
81ecdfbb
RW
2913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2914$as_echo_n "checking for $ac_word... " >&6; }
2915if test "${ac_cv_prog_CC+set}" = set; then :
2916 $as_echo_n "(cached) " >&6
c906108c
SS
2917else
2918 if test -n "$CC"; then
2919 ac_cv_prog_CC="$CC" # Let the user override the test.
2920else
bec39cab
AC
2921as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2922for as_dir in $PATH
2923do
2924 IFS=$as_save_IFS
2925 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2926 for ac_exec_ext in '' $ac_executable_extensions; do
2927 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 2928 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
81ecdfbb 2929 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2930 break 2
2931 fi
2932done
81ecdfbb
RW
2933 done
2934IFS=$as_save_IFS
bec39cab 2935
c906108c
SS
2936fi
2937fi
bec39cab 2938CC=$ac_cv_prog_CC
c906108c 2939if test -n "$CC"; then
81ecdfbb
RW
2940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2941$as_echo "$CC" >&6; }
c906108c 2942else
81ecdfbb
RW
2943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2944$as_echo "no" >&6; }
c906108c 2945fi
bec39cab 2946
81ecdfbb 2947
bec39cab
AC
2948 test -n "$CC" && break
2949 done
2950fi
2951if test -z "$CC"; then
2952 ac_ct_CC=$CC
81ecdfbb 2953 for ac_prog in cl.exe
bec39cab
AC
2954do
2955 # Extract the first word of "$ac_prog", so it can be a program name with args.
2956set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
2957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2958$as_echo_n "checking for $ac_word... " >&6; }
2959if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
2960 $as_echo_n "(cached) " >&6
bec39cab
AC
2961else
2962 if test -n "$ac_ct_CC"; then
2963 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2964else
2965as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2966for as_dir in $PATH
2967do
2968 IFS=$as_save_IFS
2969 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2970 for ac_exec_ext in '' $ac_executable_extensions; do
2971 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 2972 ac_cv_prog_ac_ct_CC="$ac_prog"
81ecdfbb 2973 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab 2974 break 2
c906108c 2975 fi
bec39cab 2976done
81ecdfbb
RW
2977 done
2978IFS=$as_save_IFS
bec39cab
AC
2979
2980fi
2981fi
2982ac_ct_CC=$ac_cv_prog_ac_ct_CC
2983if test -n "$ac_ct_CC"; then
81ecdfbb
RW
2984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2985$as_echo "$ac_ct_CC" >&6; }
bec39cab 2986else
81ecdfbb
RW
2987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2988$as_echo "no" >&6; }
c906108c
SS
2989fi
2990
81ecdfbb 2991
bec39cab
AC
2992 test -n "$ac_ct_CC" && break
2993done
c906108c 2994
81ecdfbb
RW
2995 if test "x$ac_ct_CC" = x; then
2996 CC=""
2997 else
2998 case $cross_compiling:$ac_tool_warned in
2999yes:)
3000{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3001$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3002ac_tool_warned=yes ;;
3003esac
3004 CC=$ac_ct_CC
3005 fi
bec39cab
AC
3006fi
3007
3008fi
3009
3010
81ecdfbb
RW
3011test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3012$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3013as_fn_error "no acceptable C compiler found in \$PATH
3014See \`config.log' for more details." "$LINENO" 5; }
bec39cab
AC
3015
3016# Provide some information about the compiler.
81ecdfbb
RW
3017$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3018set X $ac_compile
3019ac_compiler=$2
3020for ac_option in --version -v -V -qversion; do
3021 { { ac_try="$ac_compiler $ac_option >&5"
3022case "(($ac_try" in
3023 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3024 *) ac_try_echo=$ac_try;;
3025esac
3026eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3027$as_echo "$ac_try_echo"; } >&5
3028 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
bec39cab 3029 ac_status=$?
81ecdfbb
RW
3030 if test -s conftest.err; then
3031 sed '10a\
3032... rest of stderr output deleted ...
3033 10q' conftest.err >conftest.er1
3034 cat conftest.er1 >&5
3035 rm -f conftest.er1 conftest.err
3036 fi
3037 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3038 test $ac_status = 0; }
3039done
bec39cab 3040
81ecdfbb 3041cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3042/* end confdefs.h. */
3043
3044int
3045main ()
3046{
3047
3048 ;
3049 return 0;
3050}
3051_ACEOF
3052ac_clean_files_save=$ac_clean_files
81ecdfbb 3053ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out"
bec39cab
AC
3054# Try to create an executable without -o first, disregard a.out.
3055# It will help us diagnose broken compilers, and finding out an intuition
3056# of exeext.
81ecdfbb
RW
3057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3058$as_echo_n "checking for C compiler default output file name... " >&6; }
3059ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3060
3061# The possible output files:
3062ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3063
3064ac_rmfiles=
3065for ac_file in $ac_files
3066do
3067 case $ac_file in
3068 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3069 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3070 esac
3071done
3072rm -f $ac_rmfiles
3073
3074if { { ac_try="$ac_link_default"
3075case "(($ac_try" in
3076 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3077 *) ac_try_echo=$ac_try;;
3078esac
3079eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3080$as_echo "$ac_try_echo"; } >&5
3081 (eval "$ac_link_default") 2>&5
3082 ac_status=$?
3083 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3084 test $ac_status = 0; }; then :
3085 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3086# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3087# in a Makefile. We should not override ac_cv_exeext if it was cached,
3088# so that the user can short-circuit this test for compilers unknown to
3089# Autoconf.
3090for ac_file in $ac_files ''
bec39cab
AC
3091do
3092 test -f "$ac_file" || continue
3093 case $ac_file in
81ecdfbb 3094 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
b4e70030
JB
3095 ;;
3096 [ab].out )
3097 # We found the default executable, but exeext='' is most
3098 # certainly right.
3099 break;;
3100 *.* )
81ecdfbb
RW
3101 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3102 then :; else
3103 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3104 fi
3105 # We set ac_cv_exeext here because the later test for it is not
3106 # safe: cross compilers may not add the suffix if given an `-o'
3107 # argument, so we may need to know it at that point already.
3108 # Even if this section looks crufty: it has the advantage of
3109 # actually working.
b4e70030
JB
3110 break;;
3111 * )
3112 break;;
bec39cab
AC
3113 esac
3114done
81ecdfbb
RW
3115test "$ac_cv_exeext" = no && ac_cv_exeext=
3116
bec39cab 3117else
81ecdfbb
RW
3118 ac_file=''
3119fi
3120{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3121$as_echo "$ac_file" >&6; }
3122if test -z "$ac_file"; then :
3123 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3124sed 's/^/| /' conftest.$ac_ext >&5
3125
81ecdfbb
RW
3126{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3127$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3128{ as_fn_set_status 77
3129as_fn_error "C compiler cannot create executables
3130See \`config.log' for more details." "$LINENO" 5; }; }
bec39cab 3131fi
b4e70030 3132ac_exeext=$ac_cv_exeext
b4e70030 3133
81ecdfbb 3134# Check that the compiler produces executables we can run. If not, either
bec39cab 3135# the compiler is broken, or we cross compile.
81ecdfbb
RW
3136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3137$as_echo_n "checking whether the C compiler works... " >&6; }
bec39cab
AC
3138# If not cross compiling, check that we can run a simple program.
3139if test "$cross_compiling" != yes; then
3140 if { ac_try='./$ac_file'
81ecdfbb
RW
3141 { { case "(($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_try") 2>&5
bec39cab 3148 ac_status=$?
81ecdfbb
RW
3149 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3150 test $ac_status = 0; }; }; then
bec39cab 3151 cross_compiling=no
c906108c 3152 else
bec39cab
AC
3153 if test "$cross_compiling" = maybe; then
3154 cross_compiling=yes
3155 else
81ecdfbb
RW
3156 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3157$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3158as_fn_error "cannot run C compiled programs.
bec39cab 3159If you meant to cross compile, use \`--host'.
81ecdfbb 3160See \`config.log' for more details." "$LINENO" 5; }
bec39cab 3161 fi
c906108c 3162 fi
bec39cab 3163fi
81ecdfbb
RW
3164{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3165$as_echo "yes" >&6; }
bec39cab 3166
81ecdfbb 3167rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out
b4e70030 3168ac_clean_files=$ac_clean_files_save
81ecdfbb 3169# Check that the compiler produces executables we can run. If not, either
b4e70030 3170# the compiler is broken, or we cross compile.
81ecdfbb
RW
3171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3172$as_echo_n "checking whether we are cross compiling... " >&6; }
3173{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3174$as_echo "$cross_compiling" >&6; }
3175
3176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3177$as_echo_n "checking for suffix of executables... " >&6; }
3178if { { ac_try="$ac_link"
3179case "(($ac_try" in
3180 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3181 *) ac_try_echo=$ac_try;;
3182esac
3183eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3184$as_echo "$ac_try_echo"; } >&5
3185 (eval "$ac_link") 2>&5
bec39cab 3186 ac_status=$?
81ecdfbb
RW
3187 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3188 test $ac_status = 0; }; then :
b4e70030
JB
3189 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3190# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3191# work properly (i.e., refer to `conftest.exe'), while it won't with
3192# `rm'.
3193for ac_file in conftest.exe conftest conftest.*; do
3194 test -f "$ac_file" || continue
3195 case $ac_file in
81ecdfbb 3196 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
b4e70030 3197 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
b4e70030
JB
3198 break;;
3199 * ) break;;
3200 esac
3201done
c906108c 3202else
81ecdfbb
RW
3203 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3204$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3205as_fn_error "cannot compute suffix of executables: cannot compile and link
3206See \`config.log' for more details." "$LINENO" 5; }
c906108c 3207fi
b4e70030 3208rm -f conftest$ac_cv_exeext
81ecdfbb
RW
3209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3210$as_echo "$ac_cv_exeext" >&6; }
c906108c 3211
b4e70030 3212rm -f conftest.$ac_ext
bec39cab
AC
3213EXEEXT=$ac_cv_exeext
3214ac_exeext=$EXEEXT
81ecdfbb
RW
3215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3216$as_echo_n "checking for suffix of object files... " >&6; }
3217if test "${ac_cv_objext+set}" = set; then :
3218 $as_echo_n "(cached) " >&6
bec39cab 3219else
81ecdfbb 3220 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
3221/* end confdefs.h. */
3222
3223int
3224main ()
3225{
3226
3227 ;
3228 return 0;
3229}
3230_ACEOF
3231rm -f conftest.o conftest.obj
81ecdfbb
RW
3232if { { ac_try="$ac_compile"
3233case "(($ac_try" in
3234 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3235 *) ac_try_echo=$ac_try;;
3236esac
3237eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3238$as_echo "$ac_try_echo"; } >&5
3239 (eval "$ac_compile") 2>&5
3240 ac_status=$?
3241 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3242 test $ac_status = 0; }; then :
3243 for ac_file in conftest.o conftest.obj conftest.*; do
3244 test -f "$ac_file" || continue;
bec39cab 3245 case $ac_file in
81ecdfbb 3246 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
bec39cab
AC
3247 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3248 break;;
3249 esac
3250done
c906108c 3251else
81ecdfbb 3252 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3253sed 's/^/| /' conftest.$ac_ext >&5
3254
81ecdfbb
RW
3255{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3256$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3257as_fn_error "cannot compute suffix of object files: cannot compile
3258See \`config.log' for more details." "$LINENO" 5; }
c906108c 3259fi
b4e70030 3260rm -f conftest.$ac_cv_objext conftest.$ac_ext
bec39cab 3261fi
81ecdfbb
RW
3262{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3263$as_echo "$ac_cv_objext" >&6; }
bec39cab
AC
3264OBJEXT=$ac_cv_objext
3265ac_objext=$OBJEXT
81ecdfbb
RW
3266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3267$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3268if test "${ac_cv_c_compiler_gnu+set}" = set; then :
3269 $as_echo_n "(cached) " >&6
c906108c 3270else
81ecdfbb 3271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3272/* end confdefs.h. */
3273
3274int
3275main ()
3276{
3277#ifndef __GNUC__
3278 choke me
3279#endif
3280
3281 ;
3282 return 0;
3283}
3284_ACEOF
81ecdfbb 3285if ac_fn_c_try_compile "$LINENO"; then :
bec39cab
AC
3286 ac_compiler_gnu=yes
3287else
81ecdfbb 3288 ac_compiler_gnu=no
bec39cab 3289fi
81ecdfbb 3290rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab
AC
3291ac_cv_c_compiler_gnu=$ac_compiler_gnu
3292
3293fi
81ecdfbb
RW
3294{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3295$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3296if test $ac_compiler_gnu = yes; then
3297 GCC=yes
3298else
3299 GCC=
3300fi
bec39cab
AC
3301ac_test_CFLAGS=${CFLAGS+set}
3302ac_save_CFLAGS=$CFLAGS
81ecdfbb
RW
3303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3304$as_echo_n "checking whether $CC accepts -g... " >&6; }
3305if test "${ac_cv_prog_cc_g+set}" = set; then :
3306 $as_echo_n "(cached) " >&6
bec39cab 3307else
81ecdfbb
RW
3308 ac_save_c_werror_flag=$ac_c_werror_flag
3309 ac_c_werror_flag=yes
3310 ac_cv_prog_cc_g=no
3311 CFLAGS="-g"
3312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3313/* end confdefs.h. */
3314
3315int
3316main ()
3317{
3318
3319 ;
3320 return 0;
3321}
3322_ACEOF
81ecdfbb 3323if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
3324 ac_cv_prog_cc_g=yes
3325else
81ecdfbb
RW
3326 CFLAGS=""
3327 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3328/* end confdefs.h. */
3329
3330int
3331main ()
3332{
3333
3334 ;
3335 return 0;
3336}
3337_ACEOF
3338if ac_fn_c_try_compile "$LINENO"; then :
3339
3340else
3341 ac_c_werror_flag=$ac_save_c_werror_flag
3342 CFLAGS="-g"
3343 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3344/* end confdefs.h. */
3345
3346int
3347main ()
3348{
c906108c 3349
81ecdfbb
RW
3350 ;
3351 return 0;
3352}
3353_ACEOF
3354if ac_fn_c_try_compile "$LINENO"; then :
3355 ac_cv_prog_cc_g=yes
3356fi
3357rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3358fi
3359rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4e8d927d 3360fi
81ecdfbb
RW
3361rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3362 ac_c_werror_flag=$ac_save_c_werror_flag
bec39cab 3363fi
81ecdfbb
RW
3364{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3365$as_echo "$ac_cv_prog_cc_g" >&6; }
c906108c 3366if test "$ac_test_CFLAGS" = set; then
bec39cab 3367 CFLAGS=$ac_save_CFLAGS
c906108c
SS
3368elif test $ac_cv_prog_cc_g = yes; then
3369 if test "$GCC" = yes; then
3370 CFLAGS="-g -O2"
3371 else
3372 CFLAGS="-g"
3373 fi
3374else
3375 if test "$GCC" = yes; then
3376 CFLAGS="-O2"
3377 else
3378 CFLAGS=
3379 fi
3380fi
81ecdfbb
RW
3381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3382$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3383if test "${ac_cv_prog_cc_c89+set}" = set; then :
3384 $as_echo_n "(cached) " >&6
bec39cab 3385else
81ecdfbb 3386 ac_cv_prog_cc_c89=no
bec39cab 3387ac_save_CC=$CC
81ecdfbb 3388cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3389/* end confdefs.h. */
c906108c
SS
3390#include <stdarg.h>
3391#include <stdio.h>
3392#include <sys/types.h>
3393#include <sys/stat.h>
3394/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3395struct buf { int x; };
3396FILE * (*rcsopen) (struct buf *, struct stat *, int);
3397static char *e (p, i)
3398 char **p;
3399 int i;
3400{
3401 return p[i];
3402}
3403static char *f (char * (*g) (char **, int), char **p, ...)
3404{
3405 char *s;
3406 va_list v;
3407 va_start (v,p);
3408 s = g (p, va_arg (v,int));
3409 va_end (v);
3410 return s;
3411}
bec39cab
AC
3412
3413/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3414 function prototypes and stuff, but not '\xHH' hex character constants.
3415 These don't provoke an error unfortunately, instead are silently treated
81ecdfbb 3416 as 'x'. The following induces an error, until -std is added to get
bec39cab
AC
3417 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3418 array size at least. It's necessary to write '\x00'==0 to get something
81ecdfbb 3419 that's true only with -std. */
bec39cab
AC
3420int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3421
81ecdfbb
RW
3422/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3423 inside strings and character constants. */
3424#define FOO(x) 'x'
3425int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3426
c906108c
SS
3427int test (int i, double x);
3428struct s1 {int (*f) (int a);};
3429struct s2 {int (*f) (double a);};
3430int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3431int argc;
3432char **argv;
bec39cab
AC
3433int
3434main ()
3435{
c906108c 3436return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
bec39cab
AC
3437 ;
3438 return 0;
3439}
3440_ACEOF
81ecdfbb
RW
3441for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3442 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
bec39cab
AC
3443do
3444 CC="$ac_save_CC $ac_arg"
81ecdfbb
RW
3445 if ac_fn_c_try_compile "$LINENO"; then :
3446 ac_cv_prog_cc_c89=$ac_arg
c906108c 3447fi
81ecdfbb
RW
3448rm -f core conftest.err conftest.$ac_objext
3449 test "x$ac_cv_prog_cc_c89" != "xno" && break
c906108c 3450done
81ecdfbb 3451rm -f conftest.$ac_ext
bec39cab 3452CC=$ac_save_CC
c906108c
SS
3453
3454fi
81ecdfbb
RW
3455# AC_CACHE_VAL
3456case "x$ac_cv_prog_cc_c89" in
3457 x)
3458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3459$as_echo "none needed" >&6; } ;;
3460 xno)
3461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3462$as_echo "unsupported" >&6; } ;;
bec39cab 3463 *)
81ecdfbb
RW
3464 CC="$CC $ac_cv_prog_cc_c89"
3465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3466$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
c906108c 3467esac
81ecdfbb 3468if test "x$ac_cv_prog_cc_c89" != xno; then :
c906108c 3469
b4e70030
JB
3470fi
3471
bec39cab
AC
3472ac_ext=c
3473ac_cpp='$CPP $CPPFLAGS'
3474ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3475ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3476ac_compiler_gnu=$ac_cv_c_compiler_gnu
c906108c 3477
60ca704f 3478
bec39cab
AC
3479ac_ext=c
3480ac_cpp='$CPP $CPPFLAGS'
3481ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3482ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3483ac_compiler_gnu=$ac_cv_c_compiler_gnu
81ecdfbb
RW
3484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3485$as_echo_n "checking how to run the C preprocessor... " >&6; }
bec39cab
AC
3486# On Suns, sometimes $CPP names a directory.
3487if test -n "$CPP" && test -d "$CPP"; then
3488 CPP=
8bb2c122 3489fi
bec39cab 3490if test -z "$CPP"; then
81ecdfbb
RW
3491 if test "${ac_cv_prog_CPP+set}" = set; then :
3492 $as_echo_n "(cached) " >&6
bec39cab
AC
3493else
3494 # Double quotes because CPP needs to be expanded
3495 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3496 do
3497 ac_preproc_ok=false
3498for ac_c_preproc_warn_flag in '' yes
3499do
3500 # Use a header file that comes with gcc, so configuring glibc
3501 # with a fresh cross-compiler works.
3502 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3503 # <limits.h> exists even on freestanding compilers.
3504 # On the NeXT, cc -E runs the code through the compiler's parser,
3505 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3506 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3507/* end confdefs.h. */
3508#ifdef __STDC__
3509# include <limits.h>
3510#else
3511# include <assert.h>
3512#endif
3513 Syntax error
3514_ACEOF
81ecdfbb 3515if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3516
81ecdfbb 3517else
bec39cab
AC
3518 # Broken: fails on valid input.
3519continue
3520fi
3521rm -f conftest.err conftest.$ac_ext
3522
81ecdfbb 3523 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3524 # can be detected and how.
81ecdfbb 3525 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3526/* end confdefs.h. */
3527#include <ac_nonexistent.h>
3528_ACEOF
81ecdfbb 3529if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3530 # Broken: success on invalid input.
3531continue
8bb2c122 3532else
bec39cab
AC
3533 # Passes both tests.
3534ac_preproc_ok=:
3535break
8bb2c122 3536fi
bec39cab 3537rm -f conftest.err conftest.$ac_ext
8bb2c122 3538
bec39cab
AC
3539done
3540# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3541rm -f conftest.err conftest.$ac_ext
81ecdfbb 3542if $ac_preproc_ok; then :
bec39cab
AC
3543 break
3544fi
8bb2c122 3545
bec39cab
AC
3546 done
3547 ac_cv_prog_CPP=$CPP
ddc9cd0f 3548
c906108c 3549fi
bec39cab
AC
3550 CPP=$ac_cv_prog_CPP
3551else
3552 ac_cv_prog_CPP=$CPP
c906108c 3553fi
81ecdfbb
RW
3554{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3555$as_echo "$CPP" >&6; }
bec39cab
AC
3556ac_preproc_ok=false
3557for ac_c_preproc_warn_flag in '' yes
3558do
3559 # Use a header file that comes with gcc, so configuring glibc
3560 # with a fresh cross-compiler works.
3561 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3562 # <limits.h> exists even on freestanding compilers.
3563 # On the NeXT, cc -E runs the code through the compiler's parser,
3564 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3565 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3566/* end confdefs.h. */
3567#ifdef __STDC__
3568# include <limits.h>
3569#else
3570# include <assert.h>
3571#endif
3572 Syntax error
3573_ACEOF
81ecdfbb 3574if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3575
81ecdfbb 3576else
bec39cab
AC
3577 # Broken: fails on valid input.
3578continue
3579fi
3580rm -f conftest.err conftest.$ac_ext
3581
81ecdfbb 3582 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3583 # can be detected and how.
81ecdfbb 3584 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3585/* end confdefs.h. */
3586#include <ac_nonexistent.h>
3587_ACEOF
81ecdfbb 3588if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3589 # Broken: success on invalid input.
3590continue
c906108c 3591else
bec39cab
AC
3592 # Passes both tests.
3593ac_preproc_ok=:
3594break
c906108c 3595fi
bec39cab 3596rm -f conftest.err conftest.$ac_ext
c906108c 3597
bec39cab
AC
3598done
3599# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3600rm -f conftest.err conftest.$ac_ext
81ecdfbb
RW
3601if $ac_preproc_ok; then :
3602
c906108c 3603else
81ecdfbb
RW
3604 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3605$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3606as_fn_error "C preprocessor \"$CPP\" fails sanity check
3607See \`config.log' for more details." "$LINENO" 5; }
c906108c 3608fi
c906108c 3609
bec39cab
AC
3610ac_ext=c
3611ac_cpp='$CPP $CPPFLAGS'
3612ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3613ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3614ac_compiler_gnu=$ac_cv_c_compiler_gnu
3615
3616
81ecdfbb
RW
3617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3618$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3619if test "${ac_cv_path_GREP+set}" = set; then :
3620 $as_echo_n "(cached) " >&6
4e8d927d 3621else
81ecdfbb
RW
3622 if test -z "$GREP"; then
3623 ac_path_GREP_found=false
3624 # Loop through the user's path and test for each of PROGNAME-LIST
3625 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3626for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3627do
3628 IFS=$as_save_IFS
3629 test -z "$as_dir" && as_dir=.
3630 for ac_prog in grep ggrep; do
3631 for ac_exec_ext in '' $ac_executable_extensions; do
3632 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3633 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3634# Check for GNU ac_path_GREP and select it if it is found.
3635 # Check for GNU $ac_path_GREP
3636case `"$ac_path_GREP" --version 2>&1` in
3637*GNU*)
3638 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3639*)
3640 ac_count=0
3641 $as_echo_n 0123456789 >"conftest.in"
3642 while :
3643 do
3644 cat "conftest.in" "conftest.in" >"conftest.tmp"
3645 mv "conftest.tmp" "conftest.in"
3646 cp "conftest.in" "conftest.nl"
3647 $as_echo 'GREP' >> "conftest.nl"
3648 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3649 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3650 as_fn_arith $ac_count + 1 && ac_count=$as_val
3651 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3652 # Best one so far, save it but keep looking for a better one
3653 ac_cv_path_GREP="$ac_path_GREP"
3654 ac_path_GREP_max=$ac_count
bec39cab 3655 fi
81ecdfbb
RW
3656 # 10*(2^10) chars as input seems more than enough
3657 test $ac_count -gt 10 && break
3658 done
3659 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3660esac
bec39cab 3661
81ecdfbb
RW
3662 $ac_path_GREP_found && break 3
3663 done
3664 done
3665 done
3666IFS=$as_save_IFS
3667 if test -z "$ac_cv_path_GREP"; then
3668 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3669 fi
c906108c 3670else
81ecdfbb 3671 ac_cv_path_GREP=$GREP
c906108c 3672fi
c906108c 3673
81ecdfbb
RW
3674fi
3675{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
3676$as_echo "$ac_cv_path_GREP" >&6; }
3677 GREP="$ac_cv_path_GREP"
c906108c 3678
c906108c 3679
81ecdfbb
RW
3680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
3681$as_echo_n "checking for egrep... " >&6; }
3682if test "${ac_cv_path_EGREP+set}" = set; then :
3683 $as_echo_n "(cached) " >&6
783e057b 3684else
81ecdfbb
RW
3685 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3686 then ac_cv_path_EGREP="$GREP -E"
3687 else
3688 if test -z "$EGREP"; then
3689 ac_path_EGREP_found=false
3690 # Loop through the user's path and test for each of PROGNAME-LIST
3691 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3692for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
783e057b
DJ
3693do
3694 IFS=$as_save_IFS
3695 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
3696 for ac_prog in egrep; do
3697 for ac_exec_ext in '' $ac_executable_extensions; do
3698 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3699 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3700# Check for GNU ac_path_EGREP and select it if it is found.
3701 # Check for GNU $ac_path_EGREP
3702case `"$ac_path_EGREP" --version 2>&1` in
3703*GNU*)
3704 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3705*)
3706 ac_count=0
3707 $as_echo_n 0123456789 >"conftest.in"
3708 while :
3709 do
3710 cat "conftest.in" "conftest.in" >"conftest.tmp"
3711 mv "conftest.tmp" "conftest.in"
3712 cp "conftest.in" "conftest.nl"
3713 $as_echo 'EGREP' >> "conftest.nl"
3714 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3715 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3716 as_fn_arith $ac_count + 1 && ac_count=$as_val
3717 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3718 # Best one so far, save it but keep looking for a better one
3719 ac_cv_path_EGREP="$ac_path_EGREP"
3720 ac_path_EGREP_max=$ac_count
3721 fi
3722 # 10*(2^10) chars as input seems more than enough
3723 test $ac_count -gt 10 && break
3724 done
3725 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3726esac
bec39cab 3727
81ecdfbb
RW
3728 $ac_path_EGREP_found && break 3
3729 done
3730 done
3731 done
3732IFS=$as_save_IFS
3733 if test -z "$ac_cv_path_EGREP"; then
3734 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
783e057b 3735 fi
783e057b 3736else
81ecdfbb 3737 ac_cv_path_EGREP=$EGREP
783e057b
DJ
3738fi
3739
81ecdfbb 3740 fi
783e057b 3741fi
81ecdfbb
RW
3742{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
3743$as_echo "$ac_cv_path_EGREP" >&6; }
3744 EGREP="$ac_cv_path_EGREP"
3745
783e057b 3746
81ecdfbb
RW
3747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
3748$as_echo_n "checking for ANSI C header files... " >&6; }
3749if test "${ac_cv_header_stdc+set}" = set; then :
3750 $as_echo_n "(cached) " >&6
783e057b 3751else
81ecdfbb 3752 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3753/* end confdefs.h. */
783e057b 3754#include <stdlib.h>
bec39cab 3755#include <stdarg.h>
783e057b
DJ
3756#include <string.h>
3757#include <float.h>
c906108c 3758
bec39cab
AC
3759int
3760main ()
3761{
c906108c 3762
bec39cab
AC
3763 ;
3764 return 0;
3765}
3766_ACEOF
81ecdfbb 3767if ac_fn_c_try_compile "$LINENO"; then :
783e057b 3768 ac_cv_header_stdc=yes
c906108c 3769else
81ecdfbb 3770 ac_cv_header_stdc=no
c906108c 3771fi
81ecdfbb 3772rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 3773
783e057b
DJ
3774if test $ac_cv_header_stdc = yes; then
3775 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
81ecdfbb 3776 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
3777/* end confdefs.h. */
3778#include <string.h>
c906108c 3779
783e057b
DJ
3780_ACEOF
3781if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
3782 $EGREP "memchr" >/dev/null 2>&1; then :
3783
c906108c 3784else
783e057b 3785 ac_cv_header_stdc=no
c906108c 3786fi
783e057b 3787rm -f conftest*
c906108c
SS
3788
3789fi
3790
783e057b
DJ
3791if test $ac_cv_header_stdc = yes; then
3792 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
81ecdfbb 3793 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
3794/* end confdefs.h. */
3795#include <stdlib.h>
bec39cab 3796
783e057b
DJ
3797_ACEOF
3798if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
3799 $EGREP "free" >/dev/null 2>&1; then :
3800
bec39cab 3801else
783e057b 3802 ac_cv_header_stdc=no
bec39cab 3803fi
783e057b 3804rm -f conftest*
bec39cab
AC
3805
3806fi
bec39cab 3807
783e057b
DJ
3808if test $ac_cv_header_stdc = yes; then
3809 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
81ecdfbb 3810 if test "$cross_compiling" = yes; then :
783e057b 3811 :
bec39cab 3812else
81ecdfbb 3813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
3814/* end confdefs.h. */
3815#include <ctype.h>
81ecdfbb 3816#include <stdlib.h>
783e057b
DJ
3817#if ((' ' & 0x0FF) == 0x020)
3818# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3819# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3820#else
3821# define ISLOWER(c) \
3822 (('a' <= (c) && (c) <= 'i') \
3823 || ('j' <= (c) && (c) <= 'r') \
3824 || ('s' <= (c) && (c) <= 'z'))
3825# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3826#endif
3827
3828#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3829int
3830main ()
3831{
3832 int i;
3833 for (i = 0; i < 256; i++)
3834 if (XOR (islower (i), ISLOWER (i))
3835 || toupper (i) != TOUPPER (i))
81ecdfbb
RW
3836 return 2;
3837 return 0;
783e057b
DJ
3838}
3839_ACEOF
81ecdfbb 3840if ac_fn_c_try_run "$LINENO"; then :
783e057b 3841
81ecdfbb
RW
3842else
3843 ac_cv_header_stdc=no
783e057b 3844fi
81ecdfbb
RW
3845rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3846 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 3847fi
81ecdfbb 3848
783e057b
DJ
3849fi
3850fi
81ecdfbb
RW
3851{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
3852$as_echo "$ac_cv_header_stdc" >&6; }
783e057b
DJ
3853if test $ac_cv_header_stdc = yes; then
3854
81ecdfbb 3855$as_echo "#define STDC_HEADERS 1" >>confdefs.h
783e057b
DJ
3856
3857fi
3858
3859# On IRIX 5.3, sys/types and inttypes.h are conflicting.
783e057b
DJ
3860for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3861 inttypes.h stdint.h unistd.h
81ecdfbb
RW
3862do :
3863 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
3864ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
3865"
3866eval as_val=\$$as_ac_Header
3867 if test "x$as_val" = x""yes; then :
783e057b 3868 cat >>confdefs.h <<_ACEOF
81ecdfbb 3869#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
783e057b
DJ
3870_ACEOF
3871
3872fi
3873
3874done
3875
3876
3877
81ecdfbb
RW
3878 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
3879if test "x$ac_cv_header_minix_config_h" = x""yes; then :
783e057b
DJ
3880 MINIX=yes
3881else
3882 MINIX=
3883fi
3884
3885
3886 if test "$MINIX" = yes; then
3887
81ecdfbb 3888$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
783e057b
DJ
3889
3890
81ecdfbb 3891$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
783e057b
DJ
3892
3893
81ecdfbb 3894$as_echo "#define _MINIX 1" >>confdefs.h
783e057b
DJ
3895
3896 fi
3897
3898
81ecdfbb
RW
3899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
3900$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
3901if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
3902 $as_echo_n "(cached) " >&6
783e057b 3903else
81ecdfbb 3904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
3905/* end confdefs.h. */
3906
c971b7fa
PA
3907# define __EXTENSIONS__ 1
3908 $ac_includes_default
783e057b
DJ
3909int
3910main ()
3911{
3912
3913 ;
3914 return 0;
3915}
3916_ACEOF
81ecdfbb 3917if ac_fn_c_try_compile "$LINENO"; then :
783e057b
DJ
3918 ac_cv_safe_to_define___extensions__=yes
3919else
81ecdfbb 3920 ac_cv_safe_to_define___extensions__=no
783e057b 3921fi
81ecdfbb 3922rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b 3923fi
81ecdfbb
RW
3924{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
3925$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
783e057b 3926 test $ac_cv_safe_to_define___extensions__ = yes &&
81ecdfbb 3927 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
783e057b 3928
81ecdfbb 3929 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
783e057b 3930
81ecdfbb 3931 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
783e057b 3932
81ecdfbb 3933 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
783e057b 3934
81ecdfbb 3935 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
783e057b
DJ
3936
3937
c971b7fa
PA
3938ac_aux_dir=
3939for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
3940 for ac_t in install-sh install.sh shtool; do
3941 if test -f "$ac_dir/$ac_t"; then
3942 ac_aux_dir=$ac_dir
3943 ac_install_sh="$ac_aux_dir/$ac_t -c"
3944 break 2
3945 fi
3946 done
3947done
3948if test -z "$ac_aux_dir"; then
3949 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
3950fi
770d76d7 3951
c971b7fa
PA
3952# These three variables are undocumented and unsupported,
3953# and are intended to be withdrawn in a future Autoconf release.
3954# They can cause serious problems if a builder's source tree is in a directory
3955# whose full name contains unusual characters.
3956ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
3957ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
3958ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
770d76d7 3959
770d76d7 3960
c971b7fa
PA
3961# Make sure we can run config.sub.
3962$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
3963 as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
770d76d7 3964
c971b7fa
PA
3965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
3966$as_echo_n "checking build system type... " >&6; }
3967if test "${ac_cv_build+set}" = set; then :
3968 $as_echo_n "(cached) " >&6
770d76d7 3969else
c971b7fa
PA
3970 ac_build_alias=$build_alias
3971test "x$ac_build_alias" = x &&
3972 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
3973test "x$ac_build_alias" = x &&
3974 as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
3975ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
3976 as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
3977
770d76d7 3978fi
c971b7fa
PA
3979{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
3980$as_echo "$ac_cv_build" >&6; }
3981case $ac_cv_build in
3982*-*-*) ;;
3983*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
770d76d7 3984esac
c971b7fa
PA
3985build=$ac_cv_build
3986ac_save_IFS=$IFS; IFS='-'
3987set x $ac_cv_build
3988shift
3989build_cpu=$1
3990build_vendor=$2
3991shift; shift
3992# Remember, the first character of IFS is used to create $*,
3993# except with old shells:
3994build_os=$*
3995IFS=$ac_save_IFS
3996case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
770d76d7
PA
3997
3998
c971b7fa
PA
3999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4000$as_echo_n "checking host system type... " >&6; }
4001if test "${ac_cv_host+set}" = set; then :
81ecdfbb
RW
4002 $as_echo_n "(cached) " >&6
4003else
c971b7fa
PA
4004 if test "x$host_alias" = x; then
4005 ac_cv_host=$ac_cv_build
81ecdfbb 4006else
c971b7fa
PA
4007 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
4008 as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
81ecdfbb 4009fi
81ecdfbb
RW
4010
4011fi
c971b7fa
PA
4012{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4013$as_echo "$ac_cv_host" >&6; }
4014case $ac_cv_host in
4015*-*-*) ;;
4016*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
81ecdfbb 4017esac
c971b7fa
PA
4018host=$ac_cv_host
4019ac_save_IFS=$IFS; IFS='-'
4020set x $ac_cv_host
4021shift
4022host_cpu=$1
4023host_vendor=$2
4024shift; shift
4025# Remember, the first character of IFS is used to create $*,
4026# except with old shells:
4027host_os=$*
4028IFS=$ac_save_IFS
4029case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3388710e
JM
4030
4031
4032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4033$as_echo_n "checking target system type... " >&6; }
4034if test "${ac_cv_target+set}" = set; then :
4035 $as_echo_n "(cached) " >&6
4036else
4037 if test "x$target_alias" = x; then
4038 ac_cv_target=$ac_cv_host
4039else
4040 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
4041 as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
4042fi
4043
4044fi
4045{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4046$as_echo "$ac_cv_target" >&6; }
4047case $ac_cv_target in
4048*-*-*) ;;
4049*) as_fn_error "invalid value of canonical target" "$LINENO" 5;;
4050esac
4051target=$ac_cv_target
4052ac_save_IFS=$IFS; IFS='-'
4053set x $ac_cv_target
4054shift
4055target_cpu=$1
4056target_vendor=$2
4057shift; shift
4058# Remember, the first character of IFS is used to create $*,
4059# except with old shells:
4060target_os=$*
4061IFS=$ac_save_IFS
4062case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4063
4064
4065# The aliases save the names the user supplied, while $host etc.
4066# will get canonicalized.
4067test -n "$target_alias" &&
4068 test "$program_prefix$program_suffix$program_transform_name" = \
4069 NONENONEs,x,x, &&
4070 program_prefix=${target_alias}-
4071
4072# The tests for host and target for $enable_largefile require
4073# canonical names.
4074
4075
81ecdfbb 4076
da2f07f1
JK
4077# As the $enable_largefile decision depends on --enable-plugins we must set it
4078# even in directories otherwise not depending on the $plugins option.
4079
4080
4081# Check whether --enable-plugins was given.
4082if test "${enable_plugins+set}" = set; then :
4083 enableval=$enable_plugins; case "${enableval}" in
4084 yes | "") plugins=yes ;;
4085 no) plugins=no ;;
4086 *) plugins=yes ;;
4087 esac
4088else
4089 plugins=no
4090fi
4091
4092
4093
4094case "${host}" in
4095 sparc-*-solaris*|i[3-7]86-*-solaris*)
4096 # On native 32bit sparc and ia32 solaris, large-file and procfs support
4097 # are mutually exclusive; and without procfs support, the bfd/ elf module
4098 # cannot provide certain routines such as elfcore_write_prpsinfo
4099 # or elfcore_write_prstatus. So unless the user explicitly requested
4100 # large-file support through the --enable-largefile switch, disable
4101 # large-file support in favor of procfs support.
4102 test "${target}" = "${host}" -a "x$plugins" = xno \
4103 && : ${enable_largefile="no"}
4104 ;;
4105esac
4106
4107# Check whether --enable-largefile was given.
4108if test "${enable_largefile+set}" = set; then :
4109 enableval=$enable_largefile;
4110fi
4111
4112if test "$enable_largefile" != no; then
4113
4114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4115$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
4116if test "${ac_cv_sys_largefile_CC+set}" = set; then :
4117 $as_echo_n "(cached) " >&6
4118else
4119 ac_cv_sys_largefile_CC=no
4120 if test "$GCC" != yes; then
4121 ac_save_CC=$CC
4122 while :; do
4123 # IRIX 6.2 and later do not support large files by default,
4124 # so use the C compiler's -n32 option if that helps.
4125 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4126/* end confdefs.h. */
4127#include <sys/types.h>
4128 /* Check that off_t can represent 2**63 - 1 correctly.
4129 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4130 since some C++ compilers masquerading as C compilers
4131 incorrectly reject 9223372036854775807. */
4132#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4133 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4134 && LARGE_OFF_T % 2147483647 == 1)
4135 ? 1 : -1];
4136int
4137main ()
4138{
4139
4140 ;
4141 return 0;
4142}
4143_ACEOF
4144 if ac_fn_c_try_compile "$LINENO"; then :
4145 break
4146fi
4147rm -f core conftest.err conftest.$ac_objext
4148 CC="$CC -n32"
4149 if ac_fn_c_try_compile "$LINENO"; then :
4150 ac_cv_sys_largefile_CC=' -n32'; break
4151fi
4152rm -f core conftest.err conftest.$ac_objext
4153 break
4154 done
4155 CC=$ac_save_CC
4156 rm -f conftest.$ac_ext
4157 fi
4158fi
4159{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4160$as_echo "$ac_cv_sys_largefile_CC" >&6; }
4161 if test "$ac_cv_sys_largefile_CC" != no; then
4162 CC=$CC$ac_cv_sys_largefile_CC
4163 fi
4164
4165 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4166$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
4167if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
4168 $as_echo_n "(cached) " >&6
4169else
4170 while :; do
4171 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4172/* end confdefs.h. */
4173#include <sys/types.h>
4174 /* Check that off_t can represent 2**63 - 1 correctly.
4175 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4176 since some C++ compilers masquerading as C compilers
4177 incorrectly reject 9223372036854775807. */
4178#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4179 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4180 && LARGE_OFF_T % 2147483647 == 1)
4181 ? 1 : -1];
4182int
4183main ()
4184{
4185
4186 ;
4187 return 0;
4188}
4189_ACEOF
4190if ac_fn_c_try_compile "$LINENO"; then :
4191 ac_cv_sys_file_offset_bits=no; break
4192fi
4193rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4195/* end confdefs.h. */
4196#define _FILE_OFFSET_BITS 64
4197#include <sys/types.h>
4198 /* Check that off_t can represent 2**63 - 1 correctly.
4199 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4200 since some C++ compilers masquerading as C compilers
4201 incorrectly reject 9223372036854775807. */
4202#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4203 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4204 && LARGE_OFF_T % 2147483647 == 1)
4205 ? 1 : -1];
4206int
4207main ()
4208{
4209
4210 ;
4211 return 0;
4212}
4213_ACEOF
4214if ac_fn_c_try_compile "$LINENO"; then :
4215 ac_cv_sys_file_offset_bits=64; break
4216fi
4217rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4218 ac_cv_sys_file_offset_bits=unknown
4219 break
4220done
4221fi
4222{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4223$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4224case $ac_cv_sys_file_offset_bits in #(
4225 no | unknown) ;;
4226 *)
4227cat >>confdefs.h <<_ACEOF
4228#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4229_ACEOF
4230;;
4231esac
4232rm -rf conftest*
4233 if test $ac_cv_sys_file_offset_bits = unknown; then
4234 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4235$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
4236if test "${ac_cv_sys_large_files+set}" = set; then :
4237 $as_echo_n "(cached) " >&6
4238else
4239 while :; do
4240 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4241/* end confdefs.h. */
4242#include <sys/types.h>
4243 /* Check that off_t can represent 2**63 - 1 correctly.
4244 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4245 since some C++ compilers masquerading as C compilers
4246 incorrectly reject 9223372036854775807. */
4247#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4248 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4249 && LARGE_OFF_T % 2147483647 == 1)
4250 ? 1 : -1];
4251int
4252main ()
4253{
4254
4255 ;
4256 return 0;
4257}
4258_ACEOF
4259if ac_fn_c_try_compile "$LINENO"; then :
4260 ac_cv_sys_large_files=no; break
4261fi
4262rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4263 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4264/* end confdefs.h. */
4265#define _LARGE_FILES 1
4266#include <sys/types.h>
4267 /* Check that off_t can represent 2**63 - 1 correctly.
4268 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4269 since some C++ compilers masquerading as C compilers
4270 incorrectly reject 9223372036854775807. */
4271#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4272 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4273 && LARGE_OFF_T % 2147483647 == 1)
4274 ? 1 : -1];
4275int
4276main ()
4277{
4278
4279 ;
4280 return 0;
4281}
4282_ACEOF
4283if ac_fn_c_try_compile "$LINENO"; then :
4284 ac_cv_sys_large_files=1; break
4285fi
4286rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4287 ac_cv_sys_large_files=unknown
4288 break
4289done
4290fi
4291{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4292$as_echo "$ac_cv_sys_large_files" >&6; }
4293case $ac_cv_sys_large_files in #(
4294 no | unknown) ;;
4295 *)
4296cat >>confdefs.h <<_ACEOF
4297#define _LARGE_FILES $ac_cv_sys_large_files
4298_ACEOF
4299;;
4300esac
4301rm -rf conftest*
4302 fi
4303fi
4304
4305
4306
81ecdfbb
RW
4307
4308
4309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5
4310$as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; }
4311if test "${am_cv_prog_cc_stdc+set}" = set; then :
4312 $as_echo_n "(cached) " >&6
4313else
4314 am_cv_prog_cc_stdc=no
4315ac_save_CC="$CC"
4316# Don't try gcc -ansi; that turns off useful extensions and
4317# breaks some systems' header files.
4318# AIX -qlanglvl=ansi
4319# Ultrix and OSF/1 -std1
4320# HP-UX 10.20 and later -Ae
4321# HP-UX older versions -Aa -D_HPUX_SOURCE
4322# SVR4 -Xc -D__EXTENSIONS__
4323for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4324do
783e057b 4325 CC="$ac_save_CC $ac_arg"
81ecdfbb 4326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4327/* end confdefs.h. */
4328#include <stdarg.h>
4329#include <stdio.h>
4330#include <sys/types.h>
4331#include <sys/stat.h>
4332/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4333struct buf { int x; };
4334FILE * (*rcsopen) (struct buf *, struct stat *, int);
4335static char *e (p, i)
4336 char **p;
4337 int i;
4338{
4339 return p[i];
4340}
4341static char *f (char * (*g) (char **, int), char **p, ...)
4342{
4343 char *s;
4344 va_list v;
4345 va_start (v,p);
4346 s = g (p, va_arg (v,int));
4347 va_end (v);
4348 return s;
4349}
4350int test (int i, double x);
4351struct s1 {int (*f) (int a);};
4352struct s2 {int (*f) (double a);};
4353int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4354int argc;
4355char **argv;
4356
4357int
4358main ()
4359{
4360
4361return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4362
4363 ;
4364 return 0;
4365}
4366_ACEOF
81ecdfbb 4367if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4368 am_cv_prog_cc_stdc="$ac_arg"; break
783e057b 4369fi
81ecdfbb 4370rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
4371done
4372CC="$ac_save_CC"
4373
4374fi
4375
4376if test -z "$am_cv_prog_cc_stdc"; then
81ecdfbb
RW
4377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4378$as_echo "none needed" >&6; }
783e057b 4379else
81ecdfbb
RW
4380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5
4381$as_echo "$am_cv_prog_cc_stdc" >&6; }
783e057b
DJ
4382fi
4383case "x$am_cv_prog_cc_stdc" in
4384 x|xno) ;;
4385 *) CC="$CC $am_cv_prog_cc_stdc" ;;
4386esac
4387
4869db5e
RM
4388# expand $ac_aux_dir to an absolute path
4389am_aux_dir=`cd $ac_aux_dir && pwd`
4390
4391if test x"${install_sh}" != xset; then
4392 case $am_aux_dir in
4393 *\ * | *\ *)
4394 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
4395 *)
4396 install_sh="\${SHELL} $am_aux_dir/install-sh"
4397 esac
4398fi
4399
4400# Installed binaries are usually stripped using `strip' when the user
4401# run `make install-strip'. However `strip' might not be the right
4402# tool to use in cross-compilation environments, therefore Automake
4403# will honor the `STRIP' environment variable to overrule this program.
4404if test "$cross_compiling" != no; then
4405 if test -n "$ac_tool_prefix"; then
4406 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4407set dummy ${ac_tool_prefix}strip; ac_word=$2
4408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4409$as_echo_n "checking for $ac_word... " >&6; }
4410if test "${ac_cv_prog_STRIP+set}" = set; then :
4411 $as_echo_n "(cached) " >&6
4412else
4413 if test -n "$STRIP"; then
4414 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4415else
4416as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4417for as_dir in $PATH
4418do
4419 IFS=$as_save_IFS
4420 test -z "$as_dir" && as_dir=.
4421 for ac_exec_ext in '' $ac_executable_extensions; do
4422 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4423 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4424 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4425 break 2
4426 fi
4427done
4428 done
4429IFS=$as_save_IFS
4430
4431fi
4432fi
4433STRIP=$ac_cv_prog_STRIP
4434if test -n "$STRIP"; then
4435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
4436$as_echo "$STRIP" >&6; }
4437else
4438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4439$as_echo "no" >&6; }
4440fi
4441
4442
4443fi
4444if test -z "$ac_cv_prog_STRIP"; then
4445 ac_ct_STRIP=$STRIP
4446 # Extract the first word of "strip", so it can be a program name with args.
4447set dummy strip; ac_word=$2
4448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4449$as_echo_n "checking for $ac_word... " >&6; }
4450if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
4451 $as_echo_n "(cached) " >&6
4452else
4453 if test -n "$ac_ct_STRIP"; then
4454 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
4455else
4456as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4457for as_dir in $PATH
4458do
4459 IFS=$as_save_IFS
4460 test -z "$as_dir" && as_dir=.
4461 for ac_exec_ext in '' $ac_executable_extensions; do
4462 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4463 ac_cv_prog_ac_ct_STRIP="strip"
4464 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4465 break 2
4466 fi
4467done
4468 done
4469IFS=$as_save_IFS
4470
4471fi
4472fi
4473ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
4474if test -n "$ac_ct_STRIP"; then
4475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
4476$as_echo "$ac_ct_STRIP" >&6; }
4477else
4478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4479$as_echo "no" >&6; }
4480fi
4481
4482 if test "x$ac_ct_STRIP" = x; then
4483 STRIP=":"
4484 else
4485 case $cross_compiling:$ac_tool_warned in
4486yes:)
4487{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4488$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4489ac_tool_warned=yes ;;
4490esac
4491 STRIP=$ac_ct_STRIP
4492 fi
4493else
4494 STRIP="$ac_cv_prog_STRIP"
4495fi
4496
4497fi
4498INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
4499
783e057b
DJ
4500
4501ac_aux_dir=
81ecdfbb
RW
4502for ac_dir in .. "$srcdir"/..; do
4503 for ac_t in install-sh install.sh shtool; do
4504 if test -f "$ac_dir/$ac_t"; then
4505 ac_aux_dir=$ac_dir
4506 ac_install_sh="$ac_aux_dir/$ac_t -c"
4507 break 2
4508 fi
4509 done
783e057b
DJ
4510done
4511if test -z "$ac_aux_dir"; then
81ecdfbb 4512 as_fn_error "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
783e057b 4513fi
81ecdfbb
RW
4514
4515# These three variables are undocumented and unsupported,
4516# and are intended to be withdrawn in a future Autoconf release.
4517# They can cause serious problems if a builder's source tree is in a directory
4518# whose full name contains unusual characters.
4519ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4520ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4521ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4522
783e057b 4523
783e057b 4524
9009e1ae
MR
4525test "$program_prefix" != NONE &&
4526 program_transform_name="s&^&$program_prefix&;$program_transform_name"
4527# Use a double $ so make ignores it.
4528test "$program_suffix" != NONE &&
4529 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
4530# Double any \ or $.
4531# By default was `s,x,x', remove it if useless.
4532ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
4533program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
4534
81ecdfbb 4535
a417dc56
RW
4536# Dependency checking.
4537rm -rf .tst 2>/dev/null
4538mkdir .tst 2>/dev/null
4539if test -d .tst; then
4540 am__leading_dot=.
4541else
4542 am__leading_dot=_
4543fi
4544rmdir .tst 2>/dev/null
4545
4546DEPDIR="${am__leading_dot}deps"
4547
81ecdfbb 4548ac_config_commands="$ac_config_commands depdir"
a417dc56
RW
4549
4550
4551depcc="$CC" am_compiler_list=
4552
4553am_depcomp=$ac_aux_dir/depcomp
81ecdfbb
RW
4554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
4555$as_echo_n "checking dependency style of $depcc... " >&6; }
4556if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
4557 $as_echo_n "(cached) " >&6
a417dc56
RW
4558else
4559 if test -f "$am_depcomp"; then
4560 # We make a subdir and do the tests there. Otherwise we can end up
4561 # making bogus files that we don't know about and never remove. For
4562 # instance it was reported that on HP-UX the gcc test will end up
4563 # making a dummy file named `D' -- because `-MD' means `put the output
4564 # in D'.
4565 mkdir conftest.dir
4566 # Copy depcomp to subdir because otherwise we won't find it if we're
4567 # using a relative directory.
4568 cp "$am_depcomp" conftest.dir
4569 cd conftest.dir
4570 # We will build objects and dependencies in a subdirectory because
4571 # it helps to detect inapplicable dependency modes. For instance
4572 # both Tru64's cc and ICC support -MD to output dependencies as a
4573 # side effect of compilation, but ICC will put the dependencies in
4574 # the current directory while Tru64 will put them in the object
4575 # directory.
4576 mkdir sub
4577
4578 am_cv_CC_dependencies_compiler_type=none
4579 if test "$am_compiler_list" = ""; then
4580 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
4581 fi
4582 for depmode in $am_compiler_list; do
4583 if test $depmode = none; then break; fi
4584
81ecdfbb 4585 $as_echo "$as_me:$LINENO: trying $depmode" >&5
a417dc56
RW
4586 # Setup a source with many dependencies, because some compilers
4587 # like to wrap large dependency lists on column 80 (with \), and
4588 # we should not choose a depcomp mode which is confused by this.
4589 #
4590 # We need to recreate these files for each test, as the compiler may
4591 # overwrite some of them when testing with obscure command lines.
4592 # This happens at least with the AIX C compiler.
4593 : > sub/conftest.c
4594 for i in 1 2 3 4 5 6; do
4595 echo '#include "conftst'$i'.h"' >> sub/conftest.c
4596 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
4597 # Solaris 8's {/usr,}/bin/sh.
4598 touch sub/conftst$i.h
4599 done
4600 echo "include sub/conftest.Po" > confmf
4601
4602 # We check with `-c' and `-o' for the sake of the "dashmstdout"
4603 # mode. It turns out that the SunPro C++ compiler does not properly
4604 # handle `-M -o', and we need to detect this.
4605 depcmd="depmode=$depmode \
4606 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
4607 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
4608 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
4609 echo "| $depcmd" | sed -e 's/ */ /g' >&5
4610 if env $depcmd > conftest.err 2>&1 &&
4611 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
4612 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
4613 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
4614 # icc doesn't choke on unknown options, it will just issue warnings
4615 # or remarks (even with -Werror). So we grep stderr for any message
4616 # that says an option was ignored or not supported.
4617 # When given -MP, icc 7.0 and 7.1 complain thusly:
4618 # icc: Command line warning: ignoring option '-M'; no argument required
4619 # The diagnosis changed in icc 8.0:
4620 # icc: Command line remark: option '-MP' not supported
4621 if (grep 'ignoring option' conftest.err ||
4622 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
4623 am_cv_CC_dependencies_compiler_type=$depmode
81ecdfbb 4624 $as_echo "$as_me:$LINENO: success" >&5
a417dc56
RW
4625 break
4626 fi
4627 fi
81ecdfbb 4628 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
a417dc56
RW
4629 sed -e 's/^/| /' < conftest.err >&5
4630 done
4631
4632 cd ..
4633 rm -rf conftest.dir
4634else
4635 am_cv_CC_dependencies_compiler_type=none
4636fi
4637
4638fi
81ecdfbb
RW
4639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
4640$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
a417dc56 4641if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
81ecdfbb 4642then as_fn_error "no usable dependency style found" "$LINENO" 5
a417dc56
RW
4643else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
4644
4645fi
4646
4647
4648# Check for the 'make' the user wants to use.
4649for ac_prog in make
4650do
4651 # Extract the first word of "$ac_prog", so it can be a program name with args.
4652set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
4653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4654$as_echo_n "checking for $ac_word... " >&6; }
4655if test "${ac_cv_prog_MAKE+set}" = set; then :
4656 $as_echo_n "(cached) " >&6
a417dc56
RW
4657else
4658 if test -n "$MAKE"; then
4659 ac_cv_prog_MAKE="$MAKE" # Let the user override the test.
4660else
4661as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4662for as_dir in $PATH
4663do
4664 IFS=$as_save_IFS
4665 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
4666 for ac_exec_ext in '' $ac_executable_extensions; do
4667 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
a417dc56 4668 ac_cv_prog_MAKE="$ac_prog"
81ecdfbb 4669 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
a417dc56
RW
4670 break 2
4671 fi
4672done
81ecdfbb
RW
4673 done
4674IFS=$as_save_IFS
a417dc56
RW
4675
4676fi
4677fi
4678MAKE=$ac_cv_prog_MAKE
4679if test -n "$MAKE"; then
81ecdfbb
RW
4680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
4681$as_echo "$MAKE" >&6; }
a417dc56 4682else
81ecdfbb
RW
4683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4684$as_echo "no" >&6; }
a417dc56
RW
4685fi
4686
81ecdfbb 4687
a417dc56
RW
4688 test -n "$MAKE" && break
4689done
4690
4691MAKE_IS_GNU=
4692case "`$MAKE --version 2>&1 | sed 1q`" in
4693 *GNU*)
4694 MAKE_IS_GNU=yes
4695 ;;
4696esac
81ecdfbb 4697 if test "$MAKE_IS_GNU" = yes; then
a417dc56
RW
4698 GMAKE_TRUE=
4699 GMAKE_FALSE='#'
4700else
4701 GMAKE_TRUE='#'
4702 GMAKE_FALSE=
4703fi
4704
81ecdfbb
RW
4705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
4706$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
4707set x ${MAKE-make}
4708ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
4709if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
4710 $as_echo_n "(cached) " >&6
a417dc56
RW
4711else
4712 cat >conftest.make <<\_ACEOF
81ecdfbb 4713SHELL = /bin/sh
a417dc56 4714all:
81ecdfbb 4715 @echo '@@@%%%=$(MAKE)=@@@%%%'
a417dc56
RW
4716_ACEOF
4717# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
81ecdfbb
RW
4718case `${MAKE-make} -f conftest.make 2>/dev/null` in
4719 *@@@%%%=?*=@@@%%%*)
4720 eval ac_cv_prog_make_${ac_make}_set=yes;;
4721 *)
4722 eval ac_cv_prog_make_${ac_make}_set=no;;
4723esac
a417dc56
RW
4724rm -f conftest.make
4725fi
81ecdfbb
RW
4726if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
4727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4728$as_echo "yes" >&6; }
a417dc56
RW
4729 SET_MAKE=
4730else
81ecdfbb
RW
4731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4732$as_echo "no" >&6; }
a417dc56
RW
4733 SET_MAKE="MAKE=${MAKE-make}"
4734fi
4735
4736
c971b7fa
PA
4737# Configure gnulib. We need to build gnulib under some other
4738# directory not "gnulib", to avoid the problem of both GDB and
4739# GDBserver wanting to build it in the same directory, when building
4740# in the source dir.
783e057b 4741
c971b7fa
PA
4742 in_src="gnulib"
4743 in_build="build-gnulib"
4744
4745 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
4746 # so they do not pile up.
4747 ac_sub_configure_args=
4748 ac_prev=
4749 eval "set x $ac_configure_args"
4750 shift
4751 for ac_arg
4752 do
4753 if test -n "$ac_prev"; then
4754 ac_prev=
4755 continue
4756 fi
4757 case $ac_arg in
4758 -cache-file | --cache-file | --cache-fil | --cache-fi \
4759 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
4760 ac_prev=cache_file ;;
4761 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
4762 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
4763 | --c=*)
4764 ;;
4765 --config-cache | -C)
4766 ;;
4767 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
4768 ac_prev=srcdir ;;
4769 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
4770 ;;
4771 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
4772 ac_prev=prefix ;;
4773 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
4774 ;;
4775 --disable-option-checking)
4776 ;;
4777 *)
4778 case $ac_arg in
4779 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
4780 esac
4781 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
4782 esac
4783 done
4784
4785 # Always prepend --prefix to ensure using the same prefix
4786 # in subdir configurations.
4787 ac_arg="--prefix=$prefix"
4788 case $ac_arg in
4789 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
4790 esac
4791 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
4792
4793 # Pass --silent
4794 if test "$silent" = yes; then
4795 ac_sub_configure_args="--silent $ac_sub_configure_args"
4796 fi
4797
4798 # Always prepend --disable-option-checking to silence warnings, since
4799 # different subdirs can have different --enable and --with options.
4800 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
4801
4802 ac_popdir=`pwd`
4803 ac_dir=$in_build
4804
4805 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
4806 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
4807 $as_echo "$ac_msg" >&6
4808 as_dir="$ac_dir"; as_fn_mkdir_p
4809
38ea300a
PA
4810 case $srcdir in
4811 [\\/]* | ?:[\\/]* )
4812 ac_srcdir=$srcdir/$in_src ;;
4813 *) # Relative name.
4814 ac_srcdir=../$srcdir/$in_src ;;
4815 esac
c971b7fa
PA
4816
4817 cd "$ac_dir"
4818
4819 ac_sub_configure=$ac_srcdir/configure
4820
4821 # Make the cache file name correct relative to the subdirectory.
4822 case $cache_file in
4823 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
4824 *) # Relative name.
4825 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
4826 esac
4827
4828 { $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
4829$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
4830 # The eval makes quoting arguments work.
4831 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
4832 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
4833 as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
4834
4835 cd "$ac_popdir"
783e057b 4836
c971b7fa
PA
4837
4838
4839CONFIG_OBS=
4840CONFIG_DEPS=
4841CONFIG_SRCS=
4842ENABLE_CFLAGS=
4843
4844CONFIG_ALL=
4845CONFIG_CLEAN=
4846CONFIG_INSTALL=
4847CONFIG_UNINSTALL=
4848
4849# If we haven't got the data from the intl directory,
4850# assume NLS is disabled.
4851USE_NLS=no
4852LIBINTL=
4853LIBINTL_DEP=
4854INCINTL=
4855XGETTEXT=
4856GMSGFMT=
4857POSUB=
783e057b
DJ
4858
4859if test -f ../intl/config.intl; then
4860 . ../intl/config.intl
4861fi
81ecdfbb
RW
4862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
4863$as_echo_n "checking whether NLS is requested... " >&6; }
783e057b 4864if test x"$USE_NLS" != xyes; then
81ecdfbb
RW
4865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4866$as_echo "no" >&6; }
783e057b 4867else
81ecdfbb
RW
4868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4869$as_echo "yes" >&6; }
783e057b 4870
81ecdfbb 4871$as_echo "#define ENABLE_NLS 1" >>confdefs.h
783e057b
DJ
4872
4873
81ecdfbb
RW
4874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
4875$as_echo_n "checking for catalogs to be installed... " >&6; }
783e057b
DJ
4876 # Look for .po and .gmo files in the source directory.
4877 CATALOGS=
4878 XLINGUAS=
4879 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
4880 # If there aren't any .gmo files the shell will give us the
4881 # literal string "../path/to/srcdir/po/*.gmo" which has to be
4882 # weeded out.
4883 case "$cat" in *\**)
4884 continue;;
4885 esac
4886 # The quadruple backslash is collapsed to a double backslash
4887 # by the backticks, then collapsed again by the double quotes,
4888 # leaving us with one backslash in the sed expression (right
4889 # before the dot that mustn't act as a wildcard).
c971b7fa
PA
4890 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
4891 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
4892 # The user is allowed to set LINGUAS to a list of languages to
4893 # install catalogs for. If it's empty that means "all of them."
4894 if test "x$LINGUAS" = x; then
4895 CATALOGS="$CATALOGS $cat"
4896 XLINGUAS="$XLINGUAS $lang"
4897 else
4898 case "$LINGUAS" in *$lang*)
4899 CATALOGS="$CATALOGS $cat"
4900 XLINGUAS="$XLINGUAS $lang"
4901 ;;
4902 esac
e28b3332
DJ
4903 fi
4904 done
c971b7fa
PA
4905 LINGUAS="$XLINGUAS"
4906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
4907$as_echo "$LINGUAS" >&6; }
4908
4909
4910 DATADIRNAME=share
4911
4912 INSTOBJEXT=.mo
4913
4914 GENCAT=gencat
4915
4916 CATOBJEXT=.gmo
e28b3332 4917
e28b3332
DJ
4918fi
4919
c971b7fa
PA
4920localedir='${datadir}/locale'
4921
4922
4923if test x"$USE_NLS" = xyes; then
4924 CONFIG_ALL="$CONFIG_ALL all-po"
4925 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
4926 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
4927 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
e28b3332 4928fi
e28b3332 4929
c971b7fa
PA
4930GNULIB=build-gnulib/import
4931
4932# For Makefile dependencies.
4933GNULIB_STDINT_H=
4934if test x"$STDINT_H" != x; then
4935 GNULIB_STDINT_H=$GNULIB/$STDINT_H
e28b3332
DJ
4936fi
4937
4938
c971b7fa
PA
4939PACKAGE=gdb
4940
4941cat >>confdefs.h <<_ACEOF
4942#define PACKAGE "$PACKAGE"
4943_ACEOF
4944
4945
4946
4947# We never need to detect it in this sub-configure.
4948# But preserve it for config.status --recheck.
4949
4950
4951
4952MAKEINFO_EXTRA_FLAGS=""
4953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5
4954$as_echo_n "checking whether $MAKEINFO supports @click... " >&6; }
4955if test "${gdb_cv_have_makeinfo_click+set}" = set; then :
4956 $as_echo_n "(cached) " >&6
4957else
4958 echo '@clicksequence{a @click{} b}' >conftest.texinfo
4959 if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then
4960 gdb_cv_have_makeinfo_click=yes
4961 else
4962 gdb_cv_have_makeinfo_click=no
4963 fi
4964fi
4965{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5
4966$as_echo "$gdb_cv_have_makeinfo_click" >&6; }
4967if test x"$gdb_cv_have_makeinfo_click" = xyes; then
4968 MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK"
4969fi
e28b3332
DJ
4970
4971
bec39cab
AC
4972
4973
81ecdfbb
RW
4974# Check whether --with-separate-debug-dir was given.
4975if test "${with_separate_debug_dir+set}" = set; then :
4976 withval=$with_separate_debug_dir;
b14b1491
TT
4977 DEBUGDIR=$withval
4978else
4979 DEBUGDIR=${libdir}/debug
81ecdfbb
RW
4980fi
4981
20e95c23 4982
783e057b
DJ
4983 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
4984 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 4985 ac_define_dir=`eval echo $DEBUGDIR`
783e057b 4986 ac_define_dir=`eval echo $ac_define_dir`
20e95c23 4987
783e057b
DJ
4988cat >>confdefs.h <<_ACEOF
4989#define DEBUGDIR "$ac_define_dir"
20e95c23 4990_ACEOF
20e95c23 4991
20e95c23 4992
20e95c23 4993
0c4a4063 4994
b14b1491
TT
4995 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
4996 if test "x$prefix" = xNONE; then
4997 test_prefix=/usr/local
4998 else
4999 test_prefix=$prefix
5000 fi
783e057b 5001 else
b14b1491 5002 test_prefix=$exec_prefix
783e057b 5003 fi
b14b1491
TT
5004 value=0
5005 case ${ac_define_dir} in
5006 "${test_prefix}"|"${test_prefix}/"*|\
5007 '${exec_prefix}'|'${exec_prefix}/'*)
5008 value=1
5009 ;;
5010 esac
5011
5012cat >>confdefs.h <<_ACEOF
5013#define DEBUGDIR_RELOCATABLE $value
5014_ACEOF
5015
5016
5017
0c4a4063 5018
f83d8a90
DE
5019# We can't pass paths as command line arguments.
5020# Mingw32 tries to be clever and will convert the paths for us.
5021# For example -DBINDIR="/usr/local/bin" passed on the command line may get
5022# converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin".
5023# This breaks GDB's relocatable path conversions since paths passed in
5024# config.h would not get so translated, the path prefixes no longer match.
5025
5026 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5027 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5028 ac_define_dir=`eval echo $bindir`
5029 ac_define_dir=`eval echo $ac_define_dir`
5030
5031cat >>confdefs.h <<_ACEOF
5032#define BINDIR "$ac_define_dir"
5033_ACEOF
5034
5035
5036
b14b1491
TT
5037# GDB's datadir relocation
5038
5039
5040
81ecdfbb
RW
5041# Check whether --with-gdb-datadir was given.
5042if test "${with_gdb_datadir+set}" = set; then :
5043 withval=$with_gdb_datadir;
b14b1491 5044 GDB_DATADIR=$withval
20e95c23 5045else
b14b1491 5046 GDB_DATADIR=${datadir}/gdb
81ecdfbb
RW
5047fi
5048
20e95c23 5049
b14b1491
TT
5050 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5051 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5052 ac_define_dir=`eval echo $GDB_DATADIR`
5053 ac_define_dir=`eval echo $ac_define_dir`
5054
5055cat >>confdefs.h <<_ACEOF
5056#define GDB_DATADIR "$ac_define_dir"
20e95c23
DJ
5057_ACEOF
5058
b14b1491
TT
5059
5060
0c4a4063 5061
b14b1491
TT
5062 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
5063 if test "x$prefix" = xNONE; then
5064 test_prefix=/usr/local
5065 else
5066 test_prefix=$prefix
5067 fi
5068 else
5069 test_prefix=$exec_prefix
5070 fi
5071 value=0
5072 case ${ac_define_dir} in
5073 "${test_prefix}"|"${test_prefix}/"*|\
5074 '${exec_prefix}'|'${exec_prefix}/'*)
5075 value=1
5076 ;;
5077 esac
5078
5079cat >>confdefs.h <<_ACEOF
5080#define GDB_DATADIR_RELOCATABLE $value
5081_ACEOF
5082
5083
783e057b 5084
20e95c23 5085
0c4a4063 5086
81ecdfbb
RW
5087# Check whether --with-relocated-sources was given.
5088if test "${with_relocated_sources+set}" = set; then :
5089 withval=$with_relocated_sources; reloc_srcdir="${withval}"
29b0e8a2
JM
5090
5091 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5092 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5093 ac_define_dir=`eval echo $reloc_srcdir`
5094 ac_define_dir=`eval echo $ac_define_dir`
5095
5096cat >>confdefs.h <<_ACEOF
5097#define RELOC_SRCDIR "$ac_define_dir"
5098_ACEOF
5099
5100
5101
81ecdfbb
RW
5102fi
5103
29b0e8a2 5104
7349ff92
JK
5105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5
5106$as_echo_n "checking for default auto-load directory... " >&6; }
5107
5108# Check whether --with-auto-load-dir was given.
5109if test "${with_auto_load_dir+set}" = set; then :
5110 withval=$with_auto_load_dir;
5111else
1564a261 5112 with_auto_load_dir='$debugdir:$datadir/auto-load'
7349ff92
JK
5113fi
5114
1564a261 5115escape_dir=`echo $with_auto_load_dir | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'`
7349ff92
JK
5116
5117 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5118 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5119 ac_define_dir=`eval echo $escape_dir`
5120 ac_define_dir=`eval echo $ac_define_dir`
5121
5122cat >>confdefs.h <<_ACEOF
5123#define AUTO_LOAD_DIR "$ac_define_dir"
5124_ACEOF
5125
5126
5127{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5
5128$as_echo "$with_auto_load_dir" >&6; }
5129
bccbefd2
JK
5130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5
5131$as_echo_n "checking for default auto-load safe-path... " >&6; }
5132
5133# Check whether --with-auto-load-safe-path was given.
5134if test "${with_auto_load_safe_path+set}" = set; then :
5135 withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then
6dea1fbd
JK
5136 with_auto_load_safe_path="/"
5137 fi
bccbefd2 5138else
7349ff92 5139 with_auto_load_safe_path="$with_auto_load_dir"
bccbefd2
JK
5140fi
5141
1564a261 5142escape_dir=`echo $with_auto_load_safe_path | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'`
bccbefd2
JK
5143
5144 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5145 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6dea1fbd 5146 ac_define_dir=`eval echo $escape_dir`
bccbefd2
JK
5147 ac_define_dir=`eval echo $ac_define_dir`
5148
5149cat >>confdefs.h <<_ACEOF
6dea1fbd 5150#define AUTO_LOAD_SAFE_PATH "$ac_define_dir"
bccbefd2
JK
5151_ACEOF
5152
5153
5154{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
5155$as_echo "$with_auto_load_safe_path" >&6; }
5156
29b0e8a2 5157
20e95c23 5158
5ae98d25 5159subdirs="$subdirs testsuite"
20e95c23
DJ
5160
5161
783e057b 5162# Check whether to support alternative target configurations
81ecdfbb
RW
5163# Check whether --enable-targets was given.
5164if test "${enable_targets+set}" = set; then :
5165 enableval=$enable_targets; case "${enableval}" in
5166 yes | "") as_fn_error "enable-targets option must specify target names or 'all'" "$LINENO" 5
783e057b
DJ
5167 ;;
5168 no) enable_targets= ;;
5169 *) enable_targets=$enableval ;;
5170esac
81ecdfbb
RW
5171fi
5172
20e95c23 5173
783e057b 5174# Check whether to enable 64-bit support on 32-bit hosts
81ecdfbb
RW
5175# Check whether --enable-64-bit-bfd was given.
5176if test "${enable_64_bit_bfd+set}" = set; then :
5177 enableval=$enable_64_bit_bfd; case "${enableval}" in
783e057b
DJ
5178 yes) want64=true ;;
5179 no) want64=false ;;
81ecdfbb 5180 *) as_fn_error "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
783e057b
DJ
5181esac
5182else
5183 want64=false
81ecdfbb
RW
5184fi
5185
783e057b
DJ
5186# Provide defaults for some variables set by the per-host and per-target
5187# configuration.
5188gdb_host_obs=posix-hdep.o
20e95c23 5189
783e057b
DJ
5190if test "${target}" = "${host}"; then
5191 gdb_native=yes
5192else
5193 gdb_native=no
5194fi
20e95c23 5195
783e057b 5196. $srcdir/configure.host
20e95c23 5197
783e057b 5198# Accumulate some settings from configure.tgt over all enabled targets
20e95c23 5199
783e057b
DJ
5200TARGET_OBS=
5201all_targets=
b292c783 5202HAVE_NATIVE_GCORE_TARGET=
20e95c23 5203
783e057b 5204for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
20e95c23 5205do
783e057b
DJ
5206 if test "$targ_alias" = "all"; then
5207 all_targets=true
5208 else
5209 # Canonicalize the secondary target names.
5210 result=`$ac_config_sub $targ_alias 2>/dev/null`
5211 if test -n "$result"; then
5212 targ=$result
5213 else
5214 targ=$targ_alias
5215 fi
20e95c23 5216
783e057b 5217 . ${srcdir}/configure.tgt
20e95c23 5218
bf307134
JB
5219 if test -z "${gdb_target_obs}"; then :
5220 as_fn_error "configuration ${targ} is unsupported." "$LINENO" 5
5221fi
5222
783e057b
DJ
5223 # Target-specific object files
5224 for i in ${gdb_target_obs}; do
5225 case " $TARGET_OBS " in
5226 *" ${i} "*) ;;
5227 *)
5228 TARGET_OBS="$TARGET_OBS ${i}"
5229 ;;
5230 esac
5231 done
20e95c23 5232
783e057b
DJ
5233 # Check whether this target needs 64-bit CORE_ADDR
5234 if test x${want64} = xfalse; then
5235 . ${srcdir}/../bfd/config.bfd
5236 fi
b292c783
JK
5237
5238 # Check whether this target is native and supports gcore.
5239 if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \
5240 && $gdb_have_gcore; then
5241 HAVE_NATIVE_GCORE_TARGET=1
5242 fi
783e057b 5243 fi
20e95c23
DJ
5244done
5245
783e057b
DJ
5246if test x${all_targets} = xtrue; then
5247
5248 # We want all 64-bit targets if we either:
5249 # - run on a 64-bit host or
5250 # - already require 64-bit support for some other target or
5251 # - the --enable-64-bit-bfd option was supplied
5252 # Otherwise we only support all 32-bit targets.
5253 #
5254 # NOTE: This test must be in sync with the corresponding
5255 # tests in BFD!
20e95c23 5256
783e057b 5257 if test x${want64} = xfalse; then
81ecdfbb
RW
5258 # The cast to long int works around a bug in the HP C Compiler
5259# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5260# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5261# This bug is HP SR number 8606223364.
5262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
5263$as_echo_n "checking size of long... " >&6; }
5264if test "${ac_cv_sizeof_long+set}" = set; then :
5265 $as_echo_n "(cached) " >&6
c0993dbe 5266else
81ecdfbb 5267 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
c0993dbe 5268
81ecdfbb
RW
5269else
5270 if test "$ac_cv_type_long" = yes; then
5271 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5272$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5273{ as_fn_set_status 77
5274as_fn_error "cannot compute sizeof (long)
5275See \`config.log' for more details." "$LINENO" 5; }; }
5276 else
5277 ac_cv_sizeof_long=0
5278 fi
c0993dbe 5279fi
81ecdfbb 5280
c0993dbe 5281fi
81ecdfbb
RW
5282{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
5283$as_echo "$ac_cv_sizeof_long" >&6; }
c0993dbe 5284
c0993dbe 5285
c0993dbe 5286
c0993dbe
UW
5287cat >>confdefs.h <<_ACEOF
5288#define SIZEOF_LONG $ac_cv_sizeof_long
5289_ACEOF
5290
5291
5292 if test "x${ac_cv_sizeof_long}" = "x8"; then
5293 want64=true
5294 fi
5295 fi
5296 if test x${want64} = xtrue; then
5297 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
5298 else
5299 TARGET_OBS='$(ALL_TARGET_OBS)'
5300 fi
5301fi
5302
5303
5304
b292c783 5305
c0993dbe
UW
5306# For other settings, only the main target counts.
5307gdb_sim=
5308gdb_osabi=
5309build_gdbserver=
5310targ=$target; . ${srcdir}/configure.tgt
5311
5312# Fetch the default architecture and default target vector from BFD.
5313targ=$target; . $srcdir/../bfd/config.bfd
5314
5315# We only want the first architecture, so strip off the others if
5316# there is more than one.
5317targ_archs=`echo $targ_archs | sed 's/ .*//'`
5318
5319if test "x$targ_archs" != x; then
5320
5321cat >>confdefs.h <<_ACEOF
5322#define DEFAULT_BFD_ARCH $targ_archs
5323_ACEOF
5324
5325fi
5326if test "x$targ_defvec" != x; then
5327
5328cat >>confdefs.h <<_ACEOF
5329#define DEFAULT_BFD_VEC $targ_defvec
5330_ACEOF
5331
5332fi
5333
c0993dbe
UW
5334# The CLI cannot be disabled yet, but may be in the future.
5335
5336# Enable CLI.
81ecdfbb
RW
5337# Check whether --enable-gdbcli was given.
5338if test "${enable_gdbcli+set}" = set; then :
5339 enableval=$enable_gdbcli; case $enableval in
c0993dbe
UW
5340 yes)
5341 ;;
5342 no)
81ecdfbb 5343 as_fn_error "the command-line interface cannot be disabled yet" "$LINENO" 5 ;;
c0993dbe 5344 *)
81ecdfbb 5345 as_fn_error "bad value $enableval for --enable-gdbcli" "$LINENO" 5 ;;
c0993dbe
UW
5346 esac
5347else
5348 enable_gdbcli=yes
81ecdfbb
RW
5349fi
5350
c0993dbe
UW
5351if test x"$enable_gdbcli" = xyes; then
5352 if test -d $srcdir/cli; then
5353 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
5354 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
5355 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
5356 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
5357 fi
5358fi
5359
5360# Enable MI.
81ecdfbb
RW
5361# Check whether --enable-gdbmi was given.
5362if test "${enable_gdbmi+set}" = set; then :
5363 enableval=$enable_gdbmi; case $enableval in
c0993dbe
UW
5364 yes | no)
5365 ;;
5366 *)
81ecdfbb 5367 as_fn_error "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
c0993dbe
UW
5368 esac
5369else
5370 enable_gdbmi=yes
81ecdfbb
RW
5371fi
5372
c0993dbe
UW
5373if test x"$enable_gdbmi" = xyes; then
5374 if test -d $srcdir/mi; then
5375 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
5376 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
5377 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
5378 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
5379 fi
5380fi
5381
5382# Enable TUI.
81ecdfbb
RW
5383# Check whether --enable-tui was given.
5384if test "${enable_tui+set}" = set; then :
5385 enableval=$enable_tui; case $enableval in
3ca64bd3 5386 yes | no | auto)
c0993dbe
UW
5387 ;;
5388 *)
81ecdfbb 5389 as_fn_error "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
c0993dbe
UW
5390 esac
5391else
3ca64bd3 5392 enable_tui=auto
81ecdfbb
RW
5393fi
5394
c0993dbe
UW
5395
5396# Enable gdbtk.
81ecdfbb
RW
5397# Check whether --enable-gdbtk was given.
5398if test "${enable_gdbtk+set}" = set; then :
5399 enableval=$enable_gdbtk; case $enableval in
c0993dbe
UW
5400 yes | no)
5401 ;;
5402 *)
81ecdfbb 5403 as_fn_error "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
c0993dbe
UW
5404 esac
5405else
5062cc19 5406 if test -d $srcdir/gdbtk; then
c0993dbe
UW
5407 enable_gdbtk=yes
5408 else
5409 enable_gdbtk=no
5410 fi
81ecdfbb
RW
5411fi
5412
c0993dbe
UW
5413# We unconditionally disable gdbtk tests on selected platforms.
5414case $host_os in
5415 go32* | windows*)
81ecdfbb
RW
5416 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
5417$as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
c0993dbe
UW
5418 enable_gdbtk=no ;;
5419esac
5420
05e7c244 5421# Libunwind support for ia64.
bec39cab 5422
05e7c244
JK
5423
5424# Check whether --with-libunwind-ia64 was given.
5425if test "${with_libunwind_ia64+set}" = set; then :
5426 withval=$with_libunwind_ia64;
bec39cab 5427else
05e7c244
JK
5428 with_libunwind_ia64=auto
5429fi
bec39cab 5430
05e7c244
JK
5431
5432# Backward compatibility option.
5433if test "${with_libunwind+set}" = set; then
5434 if test x"$with_libunwind_ia64" != xauto; then
5435 as_fn_error "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5
5436 fi
5437 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5
5438$as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;}
5439 with_libunwind_ia64="$with_libunwind"
5440fi
5441
5442case "$with_libunwind_ia64" in
5443 yes | no)
5444 ;;
5445 auto)
5446 for ac_header in libunwind-ia64.h
81ecdfbb 5447do :
b54a8fd7
PA
5448 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
5449if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
bec39cab 5450 cat >>confdefs.h <<_ACEOF
b54a8fd7 5451#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
5452_ACEOF
5453
5454fi
5455
5456done
5457
05e7c244
JK
5458 with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h
5459 ;;
5460 *)
5461 as_fn_error "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5
5462 ;;
5463esac
bec39cab 5464
05e7c244 5465if test x"$with_libunwind_ia64" = xyes; then
b54a8fd7 5466 for ac_header in libunwind-ia64.h
81ecdfbb 5467do :
b54a8fd7
PA
5468 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
5469if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
bec39cab 5470 cat >>confdefs.h <<_ACEOF
b54a8fd7 5471#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
5472_ACEOF
5473
5474fi
5475
5476done
5477
05e7c244
JK
5478 if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then
5479 as_fn_error "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5
5480 fi
5481 CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o"
5482 CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o"
5483 CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c"
a9322a30
TT
5484fi
5485
cb01cfba
JB
5486opt_curses=no
5487
81ecdfbb
RW
5488# Check whether --with-curses was given.
5489if test "${with_curses+set}" = set; then :
5490 withval=$with_curses; opt_curses=$withval
5491fi
5492
cb01cfba 5493
76a39ba7 5494prefer_curses=no
cb01cfba 5495if test "$opt_curses" = "yes"; then
76a39ba7 5496 prefer_curses=yes
cb01cfba
JB
5497fi
5498
a9322a30 5499# Profiling support.
81ecdfbb
RW
5500# Check whether --enable-profiling was given.
5501if test "${enable_profiling+set}" = set; then :
5502 enableval=$enable_profiling; case $enableval in
a9322a30
TT
5503 yes | no)
5504 ;;
5505 *)
81ecdfbb 5506 as_fn_error "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
a9322a30
TT
5507 esac
5508else
5509 enable_profiling=no
81ecdfbb 5510fi
bec39cab 5511
a9322a30
TT
5512
5513for ac_func in monstartup _mcleanup
81ecdfbb
RW
5514do :
5515 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
5516ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
5517eval as_val=\$$as_ac_var
5518 if test "x$as_val" = x""yes; then :
5519 cat >>confdefs.h <<_ACEOF
5520#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 5521_ACEOF
a9322a30 5522
81ecdfbb
RW
5523fi
5524done
a9322a30 5525
81ecdfbb
RW
5526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
5527$as_echo_n "checking for _etext... " >&6; }
5528if test "${ac_cv_var__etext+set}" = set; then :
5529 $as_echo_n "(cached) " >&6
5530else
5531 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5532/* end confdefs.h. */
5533#include <stdlib.h>
5534extern char _etext;
a9322a30
TT
5535
5536int
5537main ()
5538{
5539free (&_etext);
5540 ;
5541 return 0;
5542}
bec39cab 5543_ACEOF
81ecdfbb 5544if ac_fn_c_try_link "$LINENO"; then :
a9322a30 5545 ac_cv_var__etext=yes
bec39cab 5546else
81ecdfbb 5547 ac_cv_var__etext=no
bec39cab 5548fi
81ecdfbb
RW
5549rm -f core conftest.err conftest.$ac_objext \
5550 conftest$ac_exeext conftest.$ac_ext
bec39cab 5551fi
81ecdfbb
RW
5552{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
5553$as_echo "$ac_cv_var__etext" >&6; }
a9322a30 5554if test $ac_cv_var__etext = yes; then
60ca704f 5555
81ecdfbb 5556$as_echo "#define HAVE__ETEXT 1" >>confdefs.h
bec39cab 5557
bec39cab 5558fi
81ecdfbb
RW
5559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
5560$as_echo_n "checking for etext... " >&6; }
5561if test "${ac_cv_var_etext+set}" = set; then :
5562 $as_echo_n "(cached) " >&6
bec39cab 5563else
81ecdfbb 5564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 5565/* end confdefs.h. */
a9322a30
TT
5566#include <stdlib.h>
5567extern char etext;
bec39cab
AC
5568
5569int
5570main ()
5571{
a9322a30 5572free (&etext);
bec39cab
AC
5573 ;
5574 return 0;
5575}
5576_ACEOF
81ecdfbb 5577if ac_fn_c_try_link "$LINENO"; then :
a9322a30 5578 ac_cv_var_etext=yes
bec39cab 5579else
81ecdfbb 5580 ac_cv_var_etext=no
bec39cab 5581fi
81ecdfbb
RW
5582rm -f core conftest.err conftest.$ac_objext \
5583 conftest$ac_exeext conftest.$ac_ext
bec39cab 5584fi
81ecdfbb
RW
5585{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
5586$as_echo "$ac_cv_var_etext" >&6; }
a9322a30
TT
5587if test $ac_cv_var_etext = yes; then
5588
81ecdfbb 5589$as_echo "#define HAVE_ETEXT 1" >>confdefs.h
bec39cab
AC
5590
5591fi
a9322a30
TT
5592if test "$enable_profiling" = yes ; then
5593 if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
81ecdfbb 5594 as_fn_error "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
a9322a30
TT
5595 fi
5596 PROFILE_CFLAGS=-pg
5597 OLD_CFLAGS="$CFLAGS"
5598 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
bec39cab 5599
81ecdfbb
RW
5600 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
5601$as_echo_n "checking whether $CC supports -pg... " >&6; }
5602if test "${ac_cv_cc_supports_pg+set}" = set; then :
5603 $as_echo_n "(cached) " >&6
bec39cab 5604else
81ecdfbb 5605 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 5606/* end confdefs.h. */
bec39cab
AC
5607
5608int
5609main ()
5610{
a9322a30 5611int x;
bec39cab
AC
5612 ;
5613 return 0;
5614}
5615_ACEOF
81ecdfbb 5616if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 5617 ac_cv_cc_supports_pg=yes
bec39cab 5618else
81ecdfbb 5619 ac_cv_cc_supports_pg=no
bec39cab 5620fi
81ecdfbb 5621rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 5622fi
81ecdfbb
RW
5623{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
5624$as_echo "$ac_cv_cc_supports_pg" >&6; }
bec39cab 5625
a9322a30 5626 if test $ac_cv_cc_supports_pg = no; then
81ecdfbb 5627 as_fn_error "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
a9322a30 5628 fi
bec39cab 5629
a9322a30 5630 CFLAGS="$OLD_CFLAGS"
bec39cab
AC
5631fi
5632
c16158bc
JM
5633
5634
81ecdfbb
RW
5635# Check whether --with-pkgversion was given.
5636if test "${with_pkgversion+set}" = set; then :
5637 withval=$with_pkgversion; case "$withval" in
5638 yes) as_fn_error "package version not specified" "$LINENO" 5 ;;
c16158bc
JM
5639 no) PKGVERSION= ;;
5640 *) PKGVERSION="($withval) " ;;
5641 esac
5642else
5643 PKGVERSION="(GDB) "
5644
81ecdfbb 5645fi
c16158bc
JM
5646
5647
5648
5649
81ecdfbb
RW
5650
5651# Check whether --with-bugurl was given.
5652if test "${with_bugurl+set}" = set; then :
5653 withval=$with_bugurl; case "$withval" in
5654 yes) as_fn_error "bug URL not specified" "$LINENO" 5 ;;
c16158bc
JM
5655 no) BUGURL=
5656 ;;
5657 *) BUGURL="$withval"
5658 ;;
5659 esac
5660else
5661 BUGURL="http://www.gnu.org/software/gdb/bugs/"
5662
81ecdfbb
RW
5663fi
5664
c16158bc
JM
5665 case ${BUGURL} in
5666 "")
5667 REPORT_BUGS_TO=
5668 REPORT_BUGS_TEXI=
5669 ;;
5670 *)
5671 REPORT_BUGS_TO="<$BUGURL>"
5672 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
5673 ;;
5674 esac;
5675
5676
5677
5678
5679cat >>confdefs.h <<_ACEOF
5680#define PKGVERSION "$PKGVERSION"
5681_ACEOF
5682
5683
5684cat >>confdefs.h <<_ACEOF
5685#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
5686_ACEOF
5687
5688
bec39cab
AC
5689# --------------------- #
5690# Checks for programs. #
5691# --------------------- #
5692
5693for ac_prog in gawk mawk nawk awk
5694do
5695 # Extract the first word of "$ac_prog", so it can be a program name with args.
5696set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
5697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5698$as_echo_n "checking for $ac_word... " >&6; }
5699if test "${ac_cv_prog_AWK+set}" = set; then :
5700 $as_echo_n "(cached) " >&6
bec39cab
AC
5701else
5702 if test -n "$AWK"; then
5703 ac_cv_prog_AWK="$AWK" # Let the user override the test.
5704else
5705as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5706for as_dir in $PATH
5707do
5708 IFS=$as_save_IFS
5709 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5710 for ac_exec_ext in '' $ac_executable_extensions; do
5711 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5712 ac_cv_prog_AWK="$ac_prog"
81ecdfbb 5713 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
5714 break 2
5715 fi
5716done
81ecdfbb
RW
5717 done
5718IFS=$as_save_IFS
bec39cab
AC
5719
5720fi
5721fi
5722AWK=$ac_cv_prog_AWK
5723if test -n "$AWK"; then
81ecdfbb
RW
5724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
5725$as_echo "$AWK" >&6; }
bec39cab 5726else
81ecdfbb
RW
5727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5728$as_echo "no" >&6; }
bec39cab
AC
5729fi
5730
bec39cab 5731
81ecdfbb 5732 test -n "$AWK" && break
bec39cab
AC
5733done
5734
c971b7fa
PA
5735# Find a good install program. We prefer a C program (faster),
5736# so one script is as good as another. But avoid the broken or
5737# incompatible versions:
5738# SysV /etc/install, /usr/sbin/install
5739# SunOS /usr/etc/install
5740# IRIX /sbin/install
5741# AIX /bin/install
5742# AmigaOS /C/install, which installs bootblocks on floppy discs
5743# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5744# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5745# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5746# OS/2's system install, which has a completely different semantic
5747# ./install, which can be erroneously created by make from ./install.sh.
5748# Reject install programs that cannot install multiple files.
5749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5750$as_echo_n "checking for a BSD-compatible install... " >&6; }
5751if test -z "$INSTALL"; then
5752if test "${ac_cv_path_install+set}" = set; then :
5753 $as_echo_n "(cached) " >&6
5754else
5755 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5756for as_dir in $PATH
5757do
5758 IFS=$as_save_IFS
5759 test -z "$as_dir" && as_dir=.
5760 # Account for people who put trailing slashes in PATH elements.
5761case $as_dir/ in #((
5762 ./ | .// | /[cC]/* | \
5763 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
5764 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
5765 /usr/ucb/* ) ;;
5766 *)
5767 # OSF1 and SCO ODT 3.0 have their own names for install.
5768 # Don't use installbsd from OSF since it installs stuff as root
5769 # by default.
5770 for ac_prog in ginstall scoinst install; do
5771 for ac_exec_ext in '' $ac_executable_extensions; do
5772 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5773 if test $ac_prog = install &&
5774 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5775 # AIX install. It has an incompatible calling convention.
5776 :
5777 elif test $ac_prog = install &&
5778 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5779 # program-specific install script used by HP pwplus--don't use.
5780 :
5781 else
5782 rm -rf conftest.one conftest.two conftest.dir
5783 echo one > conftest.one
5784 echo two > conftest.two
5785 mkdir conftest.dir
5786 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5787 test -s conftest.one && test -s conftest.two &&
5788 test -s conftest.dir/conftest.one &&
5789 test -s conftest.dir/conftest.two
5790 then
5791 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5792 break 3
5793 fi
5794 fi
5795 fi
5796 done
5797 done
5798 ;;
5799esac
5800
5801 done
5802IFS=$as_save_IFS
5803
5804rm -rf conftest.one conftest.two conftest.dir
5805
5806fi
5807 if test "${ac_cv_path_install+set}" = set; then
5808 INSTALL=$ac_cv_path_install
5809 else
5810 # As a last resort, use the slow shell script. Don't cache a
5811 # value for INSTALL within a source directory, because that will
5812 # break other packages using the cache if that directory is
5813 # removed, or if the value is a relative name.
5814 INSTALL=$ac_install_sh
5815 fi
5816fi
5817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5818$as_echo "$INSTALL" >&6; }
5819
5820# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5821# It thinks the first close brace ends the variable substitution.
5822test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5823
5824test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5825
5826test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
bec39cab 5827
81ecdfbb
RW
5828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
5829$as_echo_n "checking whether ln -s works... " >&6; }
bec39cab
AC
5830LN_S=$as_ln_s
5831if test "$LN_S" = "ln -s"; then
81ecdfbb
RW
5832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5833$as_echo "yes" >&6; }
bec39cab 5834else
81ecdfbb
RW
5835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
5836$as_echo "no, using $LN_S" >&6; }
bec39cab
AC
5837fi
5838
5839if test -n "$ac_tool_prefix"; then
5840 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5841set dummy ${ac_tool_prefix}ranlib; ac_word=$2
81ecdfbb
RW
5842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5843$as_echo_n "checking for $ac_word... " >&6; }
5844if test "${ac_cv_prog_RANLIB+set}" = set; then :
5845 $as_echo_n "(cached) " >&6
bec39cab
AC
5846else
5847 if test -n "$RANLIB"; then
5848 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5849else
5850as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5851for as_dir in $PATH
5852do
5853 IFS=$as_save_IFS
5854 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5855 for ac_exec_ext in '' $ac_executable_extensions; do
5856 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5857 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
81ecdfbb 5858 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
5859 break 2
5860 fi
5861done
81ecdfbb
RW
5862 done
5863IFS=$as_save_IFS
bec39cab
AC
5864
5865fi
5866fi
5867RANLIB=$ac_cv_prog_RANLIB
5868if test -n "$RANLIB"; then
81ecdfbb
RW
5869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5870$as_echo "$RANLIB" >&6; }
bec39cab 5871else
81ecdfbb
RW
5872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5873$as_echo "no" >&6; }
bec39cab
AC
5874fi
5875
81ecdfbb 5876
bec39cab
AC
5877fi
5878if test -z "$ac_cv_prog_RANLIB"; then
5879 ac_ct_RANLIB=$RANLIB
5880 # Extract the first word of "ranlib", so it can be a program name with args.
5881set dummy ranlib; ac_word=$2
81ecdfbb
RW
5882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5883$as_echo_n "checking for $ac_word... " >&6; }
5884if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
5885 $as_echo_n "(cached) " >&6
bec39cab
AC
5886else
5887 if test -n "$ac_ct_RANLIB"; then
5888 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5889else
5890as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5891for as_dir in $PATH
5892do
5893 IFS=$as_save_IFS
5894 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5895 for ac_exec_ext in '' $ac_executable_extensions; do
5896 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5897 ac_cv_prog_ac_ct_RANLIB="ranlib"
81ecdfbb 5898 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
5899 break 2
5900 fi
5901done
81ecdfbb
RW
5902 done
5903IFS=$as_save_IFS
bec39cab 5904
bec39cab
AC
5905fi
5906fi
5907ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5908if test -n "$ac_ct_RANLIB"; then
81ecdfbb
RW
5909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5910$as_echo "$ac_ct_RANLIB" >&6; }
bec39cab 5911else
81ecdfbb
RW
5912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5913$as_echo "no" >&6; }
bec39cab
AC
5914fi
5915
81ecdfbb
RW
5916 if test "x$ac_ct_RANLIB" = x; then
5917 RANLIB=":"
5918 else
5919 case $cross_compiling:$ac_tool_warned in
5920yes:)
5921{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5922$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5923ac_tool_warned=yes ;;
5924esac
5925 RANLIB=$ac_ct_RANLIB
5926 fi
bec39cab
AC
5927else
5928 RANLIB="$ac_cv_prog_RANLIB"
5929fi
5930
5931for ac_prog in 'bison -y' byacc
5932do
5933 # Extract the first word of "$ac_prog", so it can be a program name with args.
5934set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
5935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5936$as_echo_n "checking for $ac_word... " >&6; }
5937if test "${ac_cv_prog_YACC+set}" = set; then :
5938 $as_echo_n "(cached) " >&6
bec39cab
AC
5939else
5940 if test -n "$YACC"; then
5941 ac_cv_prog_YACC="$YACC" # Let the user override the test.
5942else
5943as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5944for as_dir in $PATH
5945do
5946 IFS=$as_save_IFS
5947 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5948 for ac_exec_ext in '' $ac_executable_extensions; do
5949 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5950 ac_cv_prog_YACC="$ac_prog"
81ecdfbb 5951 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
5952 break 2
5953 fi
5954done
81ecdfbb
RW
5955 done
5956IFS=$as_save_IFS
bec39cab
AC
5957
5958fi
5959fi
5960YACC=$ac_cv_prog_YACC
5961if test -n "$YACC"; then
81ecdfbb
RW
5962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
5963$as_echo "$YACC" >&6; }
bec39cab 5964else
81ecdfbb
RW
5965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5966$as_echo "no" >&6; }
bec39cab
AC
5967fi
5968
81ecdfbb 5969
bec39cab
AC
5970 test -n "$YACC" && break
5971done
5972test -n "$YACC" || YACC="yacc"
5973
5974
5975if test -n "$ac_tool_prefix"; then
5976 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
5977set dummy ${ac_tool_prefix}ar; ac_word=$2
81ecdfbb
RW
5978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5979$as_echo_n "checking for $ac_word... " >&6; }
5980if test "${ac_cv_prog_AR+set}" = set; then :
5981 $as_echo_n "(cached) " >&6
bec39cab
AC
5982else
5983 if test -n "$AR"; then
5984 ac_cv_prog_AR="$AR" # Let the user override the test.
5985else
5986as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5987for as_dir in $PATH
5988do
5989 IFS=$as_save_IFS
5990 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5991 for ac_exec_ext in '' $ac_executable_extensions; do
5992 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5993 ac_cv_prog_AR="${ac_tool_prefix}ar"
81ecdfbb 5994 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
5995 break 2
5996 fi
5997done
81ecdfbb
RW
5998 done
5999IFS=$as_save_IFS
bec39cab
AC
6000
6001fi
6002fi
6003AR=$ac_cv_prog_AR
6004if test -n "$AR"; then
81ecdfbb
RW
6005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6006$as_echo "$AR" >&6; }
bec39cab 6007else
81ecdfbb
RW
6008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6009$as_echo "no" >&6; }
bec39cab
AC
6010fi
6011
81ecdfbb 6012
bec39cab
AC
6013fi
6014if test -z "$ac_cv_prog_AR"; then
6015 ac_ct_AR=$AR
6016 # Extract the first word of "ar", so it can be a program name with args.
6017set dummy ar; ac_word=$2
81ecdfbb
RW
6018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6019$as_echo_n "checking for $ac_word... " >&6; }
6020if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
6021 $as_echo_n "(cached) " >&6
bec39cab
AC
6022else
6023 if test -n "$ac_ct_AR"; then
6024 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6025else
6026as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6027for as_dir in $PATH
6028do
6029 IFS=$as_save_IFS
6030 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6031 for ac_exec_ext in '' $ac_executable_extensions; do
6032 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6033 ac_cv_prog_ac_ct_AR="ar"
81ecdfbb 6034 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6035 break 2
6036 fi
6037done
81ecdfbb
RW
6038 done
6039IFS=$as_save_IFS
bec39cab
AC
6040
6041fi
6042fi
6043ac_ct_AR=$ac_cv_prog_ac_ct_AR
6044if test -n "$ac_ct_AR"; then
81ecdfbb
RW
6045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6046$as_echo "$ac_ct_AR" >&6; }
bec39cab 6047else
81ecdfbb
RW
6048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6049$as_echo "no" >&6; }
bec39cab
AC
6050fi
6051
81ecdfbb
RW
6052 if test "x$ac_ct_AR" = x; then
6053 AR=""
6054 else
6055 case $cross_compiling:$ac_tool_warned in
6056yes:)
6057{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6058$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6059ac_tool_warned=yes ;;
6060esac
6061 AR=$ac_ct_AR
6062 fi
bec39cab
AC
6063else
6064 AR="$ac_cv_prog_AR"
6065fi
6066
6067if test -n "$ac_tool_prefix"; then
6068 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
6069set dummy ${ac_tool_prefix}dlltool; ac_word=$2
81ecdfbb
RW
6070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6071$as_echo_n "checking for $ac_word... " >&6; }
6072if test "${ac_cv_prog_DLLTOOL+set}" = set; then :
6073 $as_echo_n "(cached) " >&6
bec39cab
AC
6074else
6075 if test -n "$DLLTOOL"; then
6076 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
6077else
6078as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6079for as_dir in $PATH
6080do
6081 IFS=$as_save_IFS
6082 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6083 for ac_exec_ext in '' $ac_executable_extensions; do
6084 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6085 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
81ecdfbb 6086 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6087 break 2
6088 fi
6089done
81ecdfbb
RW
6090 done
6091IFS=$as_save_IFS
bec39cab
AC
6092
6093fi
6094fi
6095DLLTOOL=$ac_cv_prog_DLLTOOL
6096if test -n "$DLLTOOL"; then
81ecdfbb
RW
6097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
6098$as_echo "$DLLTOOL" >&6; }
bec39cab 6099else
81ecdfbb
RW
6100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6101$as_echo "no" >&6; }
bec39cab
AC
6102fi
6103
81ecdfbb 6104
bec39cab
AC
6105fi
6106if test -z "$ac_cv_prog_DLLTOOL"; then
6107 ac_ct_DLLTOOL=$DLLTOOL
6108 # Extract the first word of "dlltool", so it can be a program name with args.
6109set dummy dlltool; ac_word=$2
81ecdfbb
RW
6110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6111$as_echo_n "checking for $ac_word... " >&6; }
6112if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then :
6113 $as_echo_n "(cached) " >&6
bec39cab
AC
6114else
6115 if test -n "$ac_ct_DLLTOOL"; then
6116 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
6117else
6118as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6119for as_dir in $PATH
6120do
6121 IFS=$as_save_IFS
6122 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6123 for ac_exec_ext in '' $ac_executable_extensions; do
6124 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6125 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
81ecdfbb 6126 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6127 break 2
6128 fi
6129done
81ecdfbb
RW
6130 done
6131IFS=$as_save_IFS
bec39cab
AC
6132
6133fi
6134fi
6135ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
6136if test -n "$ac_ct_DLLTOOL"; then
81ecdfbb
RW
6137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
6138$as_echo "$ac_ct_DLLTOOL" >&6; }
bec39cab 6139else
81ecdfbb
RW
6140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6141$as_echo "no" >&6; }
bec39cab
AC
6142fi
6143
81ecdfbb
RW
6144 if test "x$ac_ct_DLLTOOL" = x; then
6145 DLLTOOL=""
6146 else
6147 case $cross_compiling:$ac_tool_warned in
6148yes:)
6149{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6150$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6151ac_tool_warned=yes ;;
6152esac
6153 DLLTOOL=$ac_ct_DLLTOOL
6154 fi
bec39cab
AC
6155else
6156 DLLTOOL="$ac_cv_prog_DLLTOOL"
6157fi
6158
6159if test -n "$ac_tool_prefix"; then
6160 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
6161set dummy ${ac_tool_prefix}windres; ac_word=$2
81ecdfbb
RW
6162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6163$as_echo_n "checking for $ac_word... " >&6; }
6164if test "${ac_cv_prog_WINDRES+set}" = set; then :
6165 $as_echo_n "(cached) " >&6
bec39cab
AC
6166else
6167 if test -n "$WINDRES"; then
6168 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
6169else
6170as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6171for as_dir in $PATH
6172do
6173 IFS=$as_save_IFS
6174 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6175 for ac_exec_ext in '' $ac_executable_extensions; do
6176 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6177 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
81ecdfbb 6178 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6179 break 2
6180 fi
6181done
81ecdfbb
RW
6182 done
6183IFS=$as_save_IFS
bec39cab
AC
6184
6185fi
6186fi
6187WINDRES=$ac_cv_prog_WINDRES
6188if test -n "$WINDRES"; then
81ecdfbb
RW
6189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
6190$as_echo "$WINDRES" >&6; }
bec39cab 6191else
81ecdfbb
RW
6192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6193$as_echo "no" >&6; }
bec39cab
AC
6194fi
6195
81ecdfbb 6196
bec39cab
AC
6197fi
6198if test -z "$ac_cv_prog_WINDRES"; then
6199 ac_ct_WINDRES=$WINDRES
6200 # Extract the first word of "windres", so it can be a program name with args.
6201set dummy windres; 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_ac_ct_WINDRES+set}" = set; then :
6205 $as_echo_n "(cached) " >&6
bec39cab
AC
6206else
6207 if test -n "$ac_ct_WINDRES"; then
6208 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # 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_ac_ct_WINDRES="windres"
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
6227ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
6228if test -n "$ac_ct_WINDRES"; then
81ecdfbb
RW
6229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
6230$as_echo "$ac_ct_WINDRES" >&6; }
bec39cab 6231else
81ecdfbb
RW
6232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6233$as_echo "no" >&6; }
c906108c 6234fi
bec39cab 6235
81ecdfbb
RW
6236 if test "x$ac_ct_WINDRES" = x; then
6237 WINDRES=""
6238 else
6239 case $cross_compiling:$ac_tool_warned in
6240yes:)
6241{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6242$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6243ac_tool_warned=yes ;;
6244esac
6245 WINDRES=$ac_ct_WINDRES
6246 fi
c906108c 6247else
bec39cab 6248 WINDRES="$ac_cv_prog_WINDRES"
c906108c
SS
6249fi
6250
bec39cab 6251
036c3acb
TS
6252case $host_os in
6253 gnu*)
6254 # Needed for GNU Hurd hosts.
6255 if test -n "$ac_tool_prefix"; then
bec39cab
AC
6256 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
6257set dummy ${ac_tool_prefix}mig; ac_word=$2
81ecdfbb
RW
6258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6259$as_echo_n "checking for $ac_word... " >&6; }
6260if test "${ac_cv_prog_MIG+set}" = set; then :
6261 $as_echo_n "(cached) " >&6
c906108c 6262else
bec39cab
AC
6263 if test -n "$MIG"; then
6264 ac_cv_prog_MIG="$MIG" # Let the user override the test.
6265else
6266as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6267for as_dir in $PATH
6268do
6269 IFS=$as_save_IFS
6270 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6271 for ac_exec_ext in '' $ac_executable_extensions; do
6272 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6273 ac_cv_prog_MIG="${ac_tool_prefix}mig"
81ecdfbb 6274 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6275 break 2
6276 fi
6277done
81ecdfbb
RW
6278 done
6279IFS=$as_save_IFS
bec39cab 6280
c906108c 6281fi
bec39cab
AC
6282fi
6283MIG=$ac_cv_prog_MIG
6284if test -n "$MIG"; then
81ecdfbb
RW
6285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
6286$as_echo "$MIG" >&6; }
c906108c 6287else
81ecdfbb
RW
6288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6289$as_echo "no" >&6; }
c906108c
SS
6290fi
6291
81ecdfbb 6292
bec39cab
AC
6293fi
6294if test -z "$ac_cv_prog_MIG"; then
6295 ac_ct_MIG=$MIG
6296 # Extract the first word of "mig", so it can be a program name with args.
6297set dummy mig; ac_word=$2
81ecdfbb
RW
6298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6299$as_echo_n "checking for $ac_word... " >&6; }
6300if test "${ac_cv_prog_ac_ct_MIG+set}" = set; then :
6301 $as_echo_n "(cached) " >&6
bec39cab
AC
6302else
6303 if test -n "$ac_ct_MIG"; then
6304 ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
6305else
6306as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6307for as_dir in $PATH
6308do
6309 IFS=$as_save_IFS
6310 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6311 for ac_exec_ext in '' $ac_executable_extensions; do
6312 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6313 ac_cv_prog_ac_ct_MIG="mig"
81ecdfbb 6314 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6315 break 2
6316 fi
6317done
81ecdfbb
RW
6318 done
6319IFS=$as_save_IFS
c906108c 6320
bec39cab
AC
6321fi
6322fi
6323ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
6324if test -n "$ac_ct_MIG"; then
81ecdfbb
RW
6325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
6326$as_echo "$ac_ct_MIG" >&6; }
bec39cab 6327else
81ecdfbb
RW
6328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6329$as_echo "no" >&6; }
bec39cab 6330fi
c906108c 6331
81ecdfbb
RW
6332 if test "x$ac_ct_MIG" = x; then
6333 MIG=""
6334 else
6335 case $cross_compiling:$ac_tool_warned in
6336yes:)
6337{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6338$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6339ac_tool_warned=yes ;;
6340esac
6341 MIG=$ac_ct_MIG
6342 fi
bec39cab
AC
6343else
6344 MIG="$ac_cv_prog_MIG"
6345fi
c906108c 6346
036c3acb
TS
6347 if test x"$MIG" = x; then
6348 as_fn_error "MIG not found but required for $host hosts" "$LINENO" 5
6349 fi
6350 ;;
6351esac
c906108c 6352
bec39cab
AC
6353# ---------------------- #
6354# Checks for libraries. #
6355# ---------------------- #
c906108c 6356
bec39cab 6357# We might need to link with -lm; most simulators need it.
81ecdfbb
RW
6358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
6359$as_echo_n "checking for main in -lm... " >&6; }
6360if test "${ac_cv_lib_m_main+set}" = set; then :
6361 $as_echo_n "(cached) " >&6
bec39cab
AC
6362else
6363 ac_check_lib_save_LIBS=$LIBS
6364LIBS="-lm $LIBS"
81ecdfbb 6365cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6366/* end confdefs.h. */
c906108c 6367
c906108c 6368
bec39cab
AC
6369int
6370main ()
6371{
81ecdfbb 6372return main ();
bec39cab
AC
6373 ;
6374 return 0;
6375}
6376_ACEOF
81ecdfbb 6377if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
6378 ac_cv_lib_m_main=yes
6379else
81ecdfbb 6380 ac_cv_lib_m_main=no
bec39cab 6381fi
81ecdfbb
RW
6382rm -f core conftest.err conftest.$ac_objext \
6383 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
6384LIBS=$ac_check_lib_save_LIBS
6385fi
81ecdfbb
RW
6386{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
6387$as_echo "$ac_cv_lib_m_main" >&6; }
6388if test "x$ac_cv_lib_m_main" = x""yes; then :
bec39cab
AC
6389 cat >>confdefs.h <<_ACEOF
6390#define HAVE_LIBM 1
6391_ACEOF
6392
6393 LIBS="-lm $LIBS"
c906108c 6394
c906108c 6395fi
bec39cab
AC
6396
6397
6398# We need to link with -lw to get `wctype' on Solaris before Solaris
6399# 2.6. Solaris 2.6 and beyond have this function in libc, and have a
6400# libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
6401# is known to have this problem). Therefore we avoid libw if we can.
81ecdfbb
RW
6402ac_fn_c_check_func "$LINENO" "wctype" "ac_cv_func_wctype"
6403if test "x$ac_cv_func_wctype" = x""yes; then :
bec39cab 6404
c906108c 6405else
81ecdfbb
RW
6406 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype in -lw" >&5
6407$as_echo_n "checking for wctype in -lw... " >&6; }
6408if test "${ac_cv_lib_w_wctype+set}" = set; then :
6409 $as_echo_n "(cached) " >&6
bec39cab
AC
6410else
6411 ac_check_lib_save_LIBS=$LIBS
6412LIBS="-lw $LIBS"
81ecdfbb 6413cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6414/* end confdefs.h. */
c906108c 6415
81ecdfbb
RW
6416/* Override any GCC internal prototype to avoid an error.
6417 Use char because int might match the return type of a GCC
6418 builtin and then its argument prototype would still apply. */
bec39cab
AC
6419#ifdef __cplusplus
6420extern "C"
6421#endif
bec39cab
AC
6422char wctype ();
6423int
6424main ()
6425{
81ecdfbb 6426return wctype ();
bec39cab
AC
6427 ;
6428 return 0;
6429}
6430_ACEOF
81ecdfbb 6431if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
6432 ac_cv_lib_w_wctype=yes
6433else
81ecdfbb 6434 ac_cv_lib_w_wctype=no
bec39cab 6435fi
81ecdfbb
RW
6436rm -f core conftest.err conftest.$ac_objext \
6437 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
6438LIBS=$ac_check_lib_save_LIBS
6439fi
81ecdfbb
RW
6440{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_w_wctype" >&5
6441$as_echo "$ac_cv_lib_w_wctype" >&6; }
6442if test "x$ac_cv_lib_w_wctype" = x""yes; then :
bec39cab
AC
6443 cat >>confdefs.h <<_ACEOF
6444#define HAVE_LIBW 1
6445_ACEOF
c906108c 6446
bec39cab 6447 LIBS="-lw $LIBS"
c906108c 6448
bec39cab 6449fi
c906108c 6450
bec39cab 6451fi
c906108c 6452
ddc9cd0f 6453
bec39cab 6454# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
81ecdfbb
RW
6455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
6456$as_echo_n "checking for library containing gethostbyname... " >&6; }
6457if test "${ac_cv_search_gethostbyname+set}" = set; then :
6458 $as_echo_n "(cached) " >&6
bec39cab
AC
6459else
6460 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6461cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6462/* end confdefs.h. */
ddc9cd0f 6463
81ecdfbb
RW
6464/* Override any GCC internal prototype to avoid an error.
6465 Use char because int might match the return type of a GCC
6466 builtin and then its argument prototype would still apply. */
bec39cab
AC
6467#ifdef __cplusplus
6468extern "C"
6469#endif
bec39cab
AC
6470char gethostbyname ();
6471int
6472main ()
6473{
81ecdfbb 6474return gethostbyname ();
bec39cab
AC
6475 ;
6476 return 0;
6477}
6478_ACEOF
81ecdfbb
RW
6479for ac_lib in '' nsl; do
6480 if test -z "$ac_lib"; then
6481 ac_res="none required"
6482 else
6483 ac_res=-l$ac_lib
b4e70030 6484 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
6485 fi
6486 if ac_fn_c_try_link "$LINENO"; then :
6487 ac_cv_search_gethostbyname=$ac_res
6488fi
6489rm -f core conftest.err conftest.$ac_objext \
6490 conftest$ac_exeext
6491 if test "${ac_cv_search_gethostbyname+set}" = set; then :
6492 break
6493fi
6494done
6495if test "${ac_cv_search_gethostbyname+set}" = set; then :
ddc9cd0f 6496
bec39cab 6497else
81ecdfbb 6498 ac_cv_search_gethostbyname=no
bec39cab 6499fi
81ecdfbb 6500rm conftest.$ac_ext
bec39cab
AC
6501LIBS=$ac_func_search_save_LIBS
6502fi
81ecdfbb
RW
6503{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
6504$as_echo "$ac_cv_search_gethostbyname" >&6; }
6505ac_res=$ac_cv_search_gethostbyname
6506if test "$ac_res" != no; then :
6507 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
96baa820 6508
bec39cab 6509fi
96baa820 6510
c906108c 6511
b4e70030 6512# Some systems (e.g. Solaris) have `socketpair' in libsocket.
81ecdfbb
RW
6513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
6514$as_echo_n "checking for library containing socketpair... " >&6; }
6515if test "${ac_cv_search_socketpair+set}" = set; then :
6516 $as_echo_n "(cached) " >&6
b4e70030
JB
6517else
6518 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6519cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
6520/* end confdefs.h. */
6521
81ecdfbb
RW
6522/* Override any GCC internal prototype to avoid an error.
6523 Use char because int might match the return type of a GCC
6524 builtin and then its argument prototype would still apply. */
b4e70030
JB
6525#ifdef __cplusplus
6526extern "C"
6527#endif
b4e70030
JB
6528char socketpair ();
6529int
6530main ()
6531{
81ecdfbb 6532return socketpair ();
b4e70030
JB
6533 ;
6534 return 0;
6535}
6536_ACEOF
81ecdfbb
RW
6537for ac_lib in '' socket; do
6538 if test -z "$ac_lib"; then
6539 ac_res="none required"
6540 else
6541 ac_res=-l$ac_lib
b4e70030 6542 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
6543 fi
6544 if ac_fn_c_try_link "$LINENO"; then :
6545 ac_cv_search_socketpair=$ac_res
6546fi
6547rm -f core conftest.err conftest.$ac_objext \
6548 conftest$ac_exeext
6549 if test "${ac_cv_search_socketpair+set}" = set; then :
6550 break
6551fi
6552done
6553if test "${ac_cv_search_socketpair+set}" = set; then :
b4e70030 6554
b4e70030 6555else
81ecdfbb 6556 ac_cv_search_socketpair=no
b4e70030 6557fi
81ecdfbb 6558rm conftest.$ac_ext
b4e70030
JB
6559LIBS=$ac_func_search_save_LIBS
6560fi
81ecdfbb
RW
6561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
6562$as_echo "$ac_cv_search_socketpair" >&6; }
6563ac_res=$ac_cv_search_socketpair
6564if test "$ac_res" != no; then :
6565 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
b4e70030
JB
6566
6567fi
6568
6569
233a11ab 6570# Link in zlib if we can. This allows us to read compressed debug sections.
b040ad30
JB
6571
6572 # See if the user specified whether he wants zlib support or not.
6573
6574# Check whether --with-zlib was given.
6575if test "${with_zlib+set}" = set; then :
6576 withval=$with_zlib;
6577else
6578 with_zlib=auto
6579fi
6580
6581
6582 if test "$with_zlib" != "no"; then
6583 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing zlibVersion" >&5
81ecdfbb
RW
6584$as_echo_n "checking for library containing zlibVersion... " >&6; }
6585if test "${ac_cv_search_zlibVersion+set}" = set; then :
6586 $as_echo_n "(cached) " >&6
233a11ab
CS
6587else
6588 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6589cat confdefs.h - <<_ACEOF >conftest.$ac_ext
233a11ab
CS
6590/* end confdefs.h. */
6591
81ecdfbb
RW
6592/* Override any GCC internal prototype to avoid an error.
6593 Use char because int might match the return type of a GCC
233a11ab 6594 builtin and then its argument prototype would still apply. */
233a11ab
CS
6595#ifdef __cplusplus
6596extern "C"
6597#endif
233a11ab
CS
6598char zlibVersion ();
6599int
6600main ()
6601{
81ecdfbb 6602return zlibVersion ();
233a11ab
CS
6603 ;
6604 return 0;
6605}
6606_ACEOF
81ecdfbb
RW
6607for ac_lib in '' z; do
6608 if test -z "$ac_lib"; then
6609 ac_res="none required"
233a11ab 6610 else
81ecdfbb
RW
6611 ac_res=-l$ac_lib
6612 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
233a11ab 6613 fi
81ecdfbb
RW
6614 if ac_fn_c_try_link "$LINENO"; then :
6615 ac_cv_search_zlibVersion=$ac_res
233a11ab 6616fi
81ecdfbb
RW
6617rm -f core conftest.err conftest.$ac_objext \
6618 conftest$ac_exeext
6619 if test "${ac_cv_search_zlibVersion+set}" = set; then :
6620 break
233a11ab 6621fi
81ecdfbb
RW
6622done
6623if test "${ac_cv_search_zlibVersion+set}" = set; then :
233a11ab 6624
233a11ab 6625else
81ecdfbb 6626 ac_cv_search_zlibVersion=no
233a11ab 6627fi
81ecdfbb
RW
6628rm conftest.$ac_ext
6629LIBS=$ac_func_search_save_LIBS
233a11ab 6630fi
81ecdfbb
RW
6631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_zlibVersion" >&5
6632$as_echo "$ac_cv_search_zlibVersion" >&6; }
6633ac_res=$ac_cv_search_zlibVersion
6634if test "$ac_res" != no; then :
6635 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6636 for ac_header in zlib.h
6637do :
6638 ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
6639if test "x$ac_cv_header_zlib_h" = x""yes; then :
233a11ab 6640 cat >>confdefs.h <<_ACEOF
81ecdfbb 6641#define HAVE_ZLIB_H 1
233a11ab
CS
6642_ACEOF
6643
6644fi
6645
6646done
6647
6648fi
6649
b040ad30
JB
6650 if test "$with_zlib" = "yes" -a "$ac_cv_header_zlib_h" != "yes"; then
6651 as_fn_error "zlib (libz) library was explicitly requested but not found" "$LINENO" 5
6652 fi
6653 fi
6654
233a11ab 6655
77f120bf 6656# On HP/UX we may need libxpdl for dlgetmodinfo (used by solib-pa64.c).
81ecdfbb
RW
6657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlgetmodinfo" >&5
6658$as_echo_n "checking for library containing dlgetmodinfo... " >&6; }
6659if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
6660 $as_echo_n "(cached) " >&6
bec39cab
AC
6661else
6662 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6663cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6664/* end confdefs.h. */
c906108c 6665
81ecdfbb
RW
6666/* Override any GCC internal prototype to avoid an error.
6667 Use char because int might match the return type of a GCC
6668 builtin and then its argument prototype would still apply. */
bec39cab
AC
6669#ifdef __cplusplus
6670extern "C"
6671#endif
77f120bf 6672char dlgetmodinfo ();
bec39cab
AC
6673int
6674main ()
6675{
81ecdfbb 6676return dlgetmodinfo ();
bec39cab
AC
6677 ;
6678 return 0;
6679}
6680_ACEOF
81ecdfbb
RW
6681for ac_lib in '' dl xpdl; do
6682 if test -z "$ac_lib"; then
6683 ac_res="none required"
6684 else
6685 ac_res=-l$ac_lib
b4e70030 6686 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
6687 fi
6688 if ac_fn_c_try_link "$LINENO"; then :
6689 ac_cv_search_dlgetmodinfo=$ac_res
6690fi
6691rm -f core conftest.err conftest.$ac_objext \
6692 conftest$ac_exeext
6693 if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
6694 break
6695fi
6696done
6697if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
b4e70030 6698
4e8d927d 6699else
81ecdfbb 6700 ac_cv_search_dlgetmodinfo=no
1ba607ad 6701fi
81ecdfbb 6702rm conftest.$ac_ext
bec39cab
AC
6703LIBS=$ac_func_search_save_LIBS
6704fi
81ecdfbb
RW
6705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlgetmodinfo" >&5
6706$as_echo "$ac_cv_search_dlgetmodinfo" >&6; }
6707ac_res=$ac_cv_search_dlgetmodinfo
6708if test "$ac_res" != no; then :
6709 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
c906108c 6710
8bb2c122 6711fi
8bb2c122 6712
8bb2c122 6713
77f120bf 6714
77f120bf 6715
6c7a06a3 6716
81ecdfbb
RW
6717# Check whether --with-libiconv-prefix was given.
6718if test "${with_libiconv_prefix+set}" = set; then :
6719 withval=$with_libiconv_prefix;
6c7a06a3 6720 for dir in `echo "$withval" | tr : ' '`; do
94ae1714
TT
6721 if test -d $dir/include; then LIBICONV_INCLUDE="-I$dir/include"; fi
6722 if test -d $dir/lib; then LIBICONV_LIBDIR="-L$dir/lib"; fi
6c7a06a3
TT
6723 done
6724
81ecdfbb
RW
6725fi
6726
6c7a06a3 6727
f18c4681 6728 BUILD_LIBICONV_LIBDIRS="../libiconv/lib/.libs ../libiconv/lib/_libs"
6c7a06a3
TT
6729 BUILD_LIBICONV_INCLUDE="-I../libiconv/include"
6730
81ecdfbb
RW
6731 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
6732$as_echo_n "checking for iconv... " >&6; }
6733if test "${am_cv_func_iconv+set}" = set; then :
6734 $as_echo_n "(cached) " >&6
d542061a 6735else
6c7a06a3
TT
6736
6737 am_cv_func_iconv="no, consider installing GNU libiconv"
6738 am_cv_lib_iconv=no
6739 am_cv_use_build_libiconv=no
f0f20949 6740 am_cv_build_libiconv_path=
4edb1e84
JB
6741
6742 # If libiconv is part of the build tree, then try using it over
6743 # any system iconv.
6744 if test -d ../libiconv; then
f18c4681
JB
6745 for lib_dir in $BUILD_LIBICONV_LIBDIRS; do
6746 am_save_LIBS="$LIBS"
6747 am_save_CPPFLAGS="$CPPFLAGS"
6748 LIBS="$LIBS $lib_dir/libiconv.a"
6749 CPPFLAGS="$CPPFLAGS $BUILD_LIBICONV_INCLUDE"
6750 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 6751/* end confdefs.h. */
6c7a06a3
TT
6752#include <stdlib.h>
6753#include <iconv.h>
d542061a
UW
6754int
6755main ()
6756{
6c7a06a3 6757iconv_t cd = iconv_open("","");
f18c4681
JB
6758 iconv(cd,NULL,NULL,NULL,NULL);
6759 iconv_close(cd);
d542061a
UW
6760 ;
6761 return 0;
6762}
6763_ACEOF
81ecdfbb 6764if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 6765 am_cv_use_build_libiconv=yes
f0f20949 6766 am_cv_build_libiconv_path=$lib_dir/libiconv.a
f18c4681
JB
6767 am_cv_lib_iconv=yes
6768 am_cv_func_iconv=yes
d542061a 6769fi
81ecdfbb
RW
6770rm -f core conftest.err conftest.$ac_objext \
6771 conftest$ac_exeext conftest.$ac_ext
f18c4681
JB
6772 LIBS="$am_save_LIBS"
6773 CPPFLAGS="$am_save_CPPFLAGS"
6774 if test "$am_cv_use_build_libiconv" = "yes"; then
f18c4681
JB
6775 break
6776 fi
6777 done
4edb1e84 6778 fi
94ae1714 6779
4edb1e84 6780 # Next, try to find iconv in libc.
6c7a06a3 6781 if test "$am_cv_func_iconv" != yes; then
81ecdfbb 6782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 6783/* end confdefs.h. */
6c7a06a3
TT
6784#include <stdlib.h>
6785#include <iconv.h>
d542061a
UW
6786int
6787main ()
6788{
6c7a06a3
TT
6789iconv_t cd = iconv_open("","");
6790 iconv(cd,NULL,NULL,NULL,NULL);
6791 iconv_close(cd);
d542061a
UW
6792 ;
6793 return 0;
6794}
6795_ACEOF
81ecdfbb 6796if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 6797 am_cv_func_iconv=yes
d542061a 6798fi
81ecdfbb
RW
6799rm -f core conftest.err conftest.$ac_objext \
6800 conftest$ac_exeext conftest.$ac_ext
77f120bf 6801 fi
94ae1714 6802
4edb1e84
JB
6803 # If iconv was not in libc, try -liconv. In this case, arrange to
6804 # look in the libiconv prefix, if it was specified by the user.
6805 if test "$am_cv_func_iconv" != yes; then
6c7a06a3 6806 am_save_CPPFLAGS="$CPPFLAGS"
4edb1e84
JB
6807 am_save_LIBS="$LIBS"
6808 if test -n "$LIBICONV_INCLUDE"; then
6809 CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE"
6810 LIBS="$LIBS $LIBICONV_LIBDIR"
6811 fi
6812 LIBS="$LIBS -liconv"
81ecdfbb 6813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6814/* end confdefs.h. */
6c7a06a3
TT
6815#include <stdlib.h>
6816#include <iconv.h>
bec39cab
AC
6817int
6818main ()
6819{
6c7a06a3
TT
6820iconv_t cd = iconv_open("","");
6821 iconv(cd,NULL,NULL,NULL,NULL);
6822 iconv_close(cd);
bec39cab
AC
6823 ;
6824 return 0;
6825}
6826_ACEOF
81ecdfbb 6827if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 6828 am_cv_lib_iconv=yes
6c7a06a3 6829 am_cv_func_iconv=yes
627af7ea 6830fi
81ecdfbb
RW
6831rm -f core conftest.err conftest.$ac_objext \
6832 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 6833 LIBS="$am_save_LIBS"
fc3b640d 6834 CPPFLAGS="$am_save_CPPFLAGS"
6c7a06a3
TT
6835 fi
6836
6837fi
81ecdfbb
RW
6838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
6839$as_echo "$am_cv_func_iconv" >&6; }
94ae1714
TT
6840
6841 # Set the various flags based on the cache variables. We can't rely
6842 # on the flags to remain set from the above code, due to caching.
fc3b640d
TT
6843 LIBICONV=
6844 if test "$am_cv_lib_iconv" = yes; then
6845 LIBICONV="-liconv"
94ae1714
TT
6846 else
6847 LIBICONV_LIBDIR=
6848 LIBICONV_INCLUDE=
fc3b640d
TT
6849 fi
6850 if test "$am_cv_use_build_libiconv" = yes; then
f0f20949 6851 LIBICONV="$am_cv_build_libiconv_path"
f18c4681 6852 LIBICONV_LIBDIR=""
fc3b640d
TT
6853 LIBICONV_INCLUDE="$BUILD_LIBICONV_INCLUDE"
6854 fi
6855 CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE"
6856 LIBS="$LIBS $LIBICONV_LIBDIR $LIBICONV"
94ae1714 6857
6c7a06a3
TT
6858 if test "$am_cv_func_iconv" = yes; then
6859
81ecdfbb 6860$as_echo "#define HAVE_ICONV 1" >>confdefs.h
6c7a06a3 6861
81ecdfbb
RW
6862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
6863$as_echo_n "checking for iconv declaration... " >&6; }
6864 if test "${am_cv_proto_iconv+set}" = set; then :
6865 $as_echo_n "(cached) " >&6
6c7a06a3
TT
6866else
6867
81ecdfbb 6868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
6869/* end confdefs.h. */
6870
6c7a06a3
TT
6871#include <stdlib.h>
6872#include <iconv.h>
6873extern
b4e70030 6874#ifdef __cplusplus
6c7a06a3 6875"C"
b4e70030 6876#endif
6c7a06a3
TT
6877#if defined(__STDC__) || defined(__cplusplus)
6878size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
6879#else
6880size_t iconv();
6881#endif
6882
b4e70030
JB
6883int
6884main ()
6885{
6c7a06a3 6886
b4e70030
JB
6887 ;
6888 return 0;
6889}
6890_ACEOF
81ecdfbb 6891if ac_fn_c_try_compile "$LINENO"; then :
6c7a06a3 6892 am_cv_proto_iconv_arg1=""
4e8d927d 6893else
81ecdfbb 6894 am_cv_proto_iconv_arg1="const"
b4e70030 6895fi
81ecdfbb 6896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6c7a06a3
TT
6897 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);"
6898fi
6899
6900 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
81ecdfbb 6901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
6c7a06a3 6902 }$am_cv_proto_iconv" >&5
81ecdfbb
RW
6903$as_echo "${ac_t:-
6904 }$am_cv_proto_iconv" >&6; }
6c7a06a3
TT
6905
6906cat >>confdefs.h <<_ACEOF
6907#define ICONV_CONST $am_cv_proto_iconv_arg1
6908_ACEOF
6909
6910 fi
6c7a06a3
TT
6911
6912
478aac75
DE
6913# GDB may fork/exec the iconv program to get the list of supported character
6914# sets. Allow the user to specify where to find it.
6915# There are several factors affecting the choice of option name:
6916# - There is already --with-libiconv-prefix but we can't use it, it specifies
6917# the build-time location of libiconv files.
6918# - The program we need to find is iconv, which comes with glibc. The user
6919# doesn't necessarily have libiconv installed. Therefore naming this
6920# --with-libiconv-foo feels wrong.
6921# - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is
6922# defined to work on directories not files (though it really doesn't know
6923# the difference).
6924# - Calling this --with-iconv-prefix is perceived to cause too much confusion
6925# with --with-libiconv-prefix.
6926# Putting these together is why the option name is --with-iconv-bin.
6927
6928
6929# Check whether --with-iconv-bin was given.
6930if test "${with_iconv_bin+set}" = set; then :
6931 withval=$with_iconv_bin; iconv_bin="${withval}"
6932
6933cat >>confdefs.h <<_ACEOF
6934#define ICONV_BIN "${iconv_bin}"
6935_ACEOF
6936
6937
6938 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6939 if test "x$prefix" = xNONE; then
6940 test_prefix=/usr/local
6941 else
6942 test_prefix=$prefix
6943 fi
6944 else
6945 test_prefix=$exec_prefix
6946 fi
6947 value=0
6948 case ${iconv_bin} in
6949 "${test_prefix}"|"${test_prefix}/"*|\
6950 '${exec_prefix}'|'${exec_prefix}/'*)
6951 value=1
6952 ;;
6953 esac
6954
6955cat >>confdefs.h <<_ACEOF
6956#define ICONV_BIN_RELOCATABLE $value
6957_ACEOF
6958
6959
6960
6961fi
6962
6963
6c7a06a3
TT
6964# On alpha-osf, it appears that libtermcap and libcurses are not compatible.
6965# There is a very specific comment in /usr/include/curses.h explaining that
6966# termcap routines built into libcurses must not be used.
6967#
6968# The symptoms we observed so far is GDB unexpectedly changing
6969# the terminal settings when tgetent is called - this is particularly
6970# visible as the output is missing carriage returns, and so rapidly
6971# becomes very hard to read.
6972#
6973# The readline configure script has already decided that libtermcap
6974# was enough for its purposes, and so decided to build readline using
6975# libtermcap. Since the TUI mode requires curses, building GDB with
6976# TUI enabled results in both libraries to be used at the same time,
6977# which is not allowed. This basically means that GDB with TUI is
6978# broken on alpha-osf.
6979
6980case $host_os in
6bcc772d
RO
6981 osf* )
6982 if test x"$enable_tui" = xyes; then
81ecdfbb 6983 as_fn_error "Building GDB with TUI mode is not supported on this host" "$LINENO" 5
6c7a06a3 6984 fi
6bcc772d 6985 if test x"$enable_tui" = xauto; then
6c7a06a3
TT
6986 enable_tui=no
6987 fi
6988 ;;
6989esac
6990
cb01cfba 6991# For the TUI, we need enhanced curses functionality.
bd8a8e1b 6992if test x"$enable_tui" != xno; then
cb01cfba
JB
6993 prefer_curses=yes
6994fi
6995
6996curses_found=no
6997if test x"$prefer_curses" = xyes; then
6998 # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
6999 # curses library because the latter might not provide all the
7000 # functionality we need. However, this leads to problems on systems
7001 # where the linker searches /usr/local/lib, but the compiler doesn't
7002 # search /usr/local/include, if ncurses is installed in /usr/local. A
7003 # default installation of ncurses on alpha*-dec-osf* will lead to such
7004 # a situation.
81ecdfbb
RW
7005 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
7006$as_echo_n "checking for library containing waddstr... " >&6; }
7007if test "${ac_cv_search_waddstr+set}" = set; then :
7008 $as_echo_n "(cached) " >&6
6c7a06a3
TT
7009else
7010 ac_func_search_save_LIBS=$LIBS
81ecdfbb 7011cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
7012/* end confdefs.h. */
7013
81ecdfbb
RW
7014/* Override any GCC internal prototype to avoid an error.
7015 Use char because int might match the return type of a GCC
7016 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
7017#ifdef __cplusplus
7018extern "C"
7019#endif
6c7a06a3
TT
7020char waddstr ();
7021int
7022main ()
7023{
81ecdfbb 7024return waddstr ();
6c7a06a3
TT
7025 ;
7026 return 0;
7027}
7028_ACEOF
81ecdfbb
RW
7029for ac_lib in '' ncurses cursesX curses; do
7030 if test -z "$ac_lib"; then
7031 ac_res="none required"
7032 else
7033 ac_res=-l$ac_lib
7034 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7035 fi
7036 if ac_fn_c_try_link "$LINENO"; then :
7037 ac_cv_search_waddstr=$ac_res
7038fi
7039rm -f core conftest.err conftest.$ac_objext \
7040 conftest$ac_exeext
7041 if test "${ac_cv_search_waddstr+set}" = set; then :
7042 break
7043fi
7044done
7045if test "${ac_cv_search_waddstr+set}" = set; then :
7046
6c7a06a3 7047else
81ecdfbb
RW
7048 ac_cv_search_waddstr=no
7049fi
7050rm conftest.$ac_ext
7051LIBS=$ac_func_search_save_LIBS
7052fi
7053{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
7054$as_echo "$ac_cv_search_waddstr" >&6; }
7055ac_res=$ac_cv_search_waddstr
7056if test "$ac_res" != no; then :
7057 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3
TT
7058
7059fi
7060
7061
cb01cfba
JB
7062 if test "$ac_cv_search_waddstr" != no; then
7063 curses_found=yes
7064 fi
7065fi
7066
7067# Check whether we should enable the TUI, but only do so if we really
7068# can.
7069if test x"$enable_tui" != xno; then
7070 if test -d $srcdir/tui; then
7071 if test "$curses_found" != no; then
6c7a06a3
TT
7072 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
7073 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
7074 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
7075 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
6c7a06a3
TT
7076 else
7077 if test x"$enable_tui" = xyes; then
81ecdfbb 7078 as_fn_error "no enhanced curses library found; disable TUI" "$LINENO" 5
6c7a06a3 7079 else
81ecdfbb
RW
7080 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
7081$as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
6c7a06a3
TT
7082 fi
7083 fi
7084 fi
7085fi
7086
7087# Since GDB uses Readline, we need termcap functionality. In many
7088# cases this will be provided by the curses library, but some systems
7089# have a seperate termcap library, or no curses library at all.
7090
7091case $host_os in
7092 cygwin*)
7093 if test -d $srcdir/libtermcap; then
7094 LIBS="../libtermcap/libtermcap.a $LIBS"
7095 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
7096 fi ;;
7097 go32* | *djgpp*)
7098 ac_cv_search_tgetent="none required"
7099 ;;
7100 *mingw32*)
7101 ac_cv_search_tgetent="none required"
7102 CONFIG_OBS="$CONFIG_OBS windows-termcap.o"
7103 ;;
7104esac
7105
7106# These are the libraries checked by Readline.
81ecdfbb
RW
7107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
7108$as_echo_n "checking for library containing tgetent... " >&6; }
7109if test "${ac_cv_search_tgetent+set}" = set; then :
7110 $as_echo_n "(cached) " >&6
6c7a06a3
TT
7111else
7112 ac_func_search_save_LIBS=$LIBS
81ecdfbb 7113cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
7114/* end confdefs.h. */
7115
81ecdfbb
RW
7116/* Override any GCC internal prototype to avoid an error.
7117 Use char because int might match the return type of a GCC
7118 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
7119#ifdef __cplusplus
7120extern "C"
7121#endif
6c7a06a3
TT
7122char tgetent ();
7123int
7124main ()
7125{
81ecdfbb 7126return tgetent ();
6c7a06a3
TT
7127 ;
7128 return 0;
7129}
7130_ACEOF
81ecdfbb
RW
7131for ac_lib in '' termcap tinfo curses ncurses; do
7132 if test -z "$ac_lib"; then
7133 ac_res="none required"
7134 else
7135 ac_res=-l$ac_lib
6c7a06a3 7136 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
7137 fi
7138 if ac_fn_c_try_link "$LINENO"; then :
7139 ac_cv_search_tgetent=$ac_res
7140fi
7141rm -f core conftest.err conftest.$ac_objext \
7142 conftest$ac_exeext
7143 if test "${ac_cv_search_tgetent+set}" = set; then :
7144 break
7145fi
7146done
7147if test "${ac_cv_search_tgetent+set}" = set; then :
6c7a06a3 7148
6c7a06a3 7149else
81ecdfbb 7150 ac_cv_search_tgetent=no
6c7a06a3 7151fi
81ecdfbb 7152rm conftest.$ac_ext
6c7a06a3
TT
7153LIBS=$ac_func_search_save_LIBS
7154fi
81ecdfbb
RW
7155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
7156$as_echo "$ac_cv_search_tgetent" >&6; }
7157ac_res=$ac_cv_search_tgetent
7158if test "$ac_res" != no; then :
7159 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3 7160
06825bd1
MK
7161fi
7162
06825bd1 7163
bec39cab 7164if test "$ac_cv_search_tgetent" = no; then
81ecdfbb 7165 as_fn_error "no termcap library found" "$LINENO" 5
8ee53726
MK
7166fi
7167
3841debe 7168
81ecdfbb
RW
7169# Check whether --with-system-readline was given.
7170if test "${with_system_readline+set}" = set; then :
7171 withval=$with_system_readline;
7172fi
6a30b0a5 7173
6a30b0a5
AS
7174
7175if test "$with_system_readline" = yes; then
7176 READLINE=-lreadline
7177 READLINE_DEPS=
7178 READLINE_CFLAGS=
39037522 7179 READLINE_TEXI_INCFLAG=
6a30b0a5
AS
7180else
7181 READLINE='$(READLINE_DIR)/libreadline.a'
7182 READLINE_DEPS='$(READLINE)'
7183 READLINE_CFLAGS='-I$(READLINE_SRC)/..'
39037522 7184 READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
6a30b0a5
AS
7185fi
7186
7187
7188
7189
7190
f997c383
SD
7191# Generate jit-reader.h
7192
7193# This is typedeffed to GDB_CORE_ADDR in jit-reader.h
7194TARGET_PTR=
7195
7196# The cast to long int works around a bug in the HP C Compiler
7197# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7198# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7199# This bug is HP SR number 8606223364.
7200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5
7201$as_echo_n "checking size of unsigned long long... " >&6; }
7202if test "${ac_cv_sizeof_unsigned_long_long+set}" = set; then :
7203 $as_echo_n "(cached) " >&6
7204else
7205 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then :
7206
7207else
7208 if test "$ac_cv_type_unsigned_long_long" = yes; then
7209 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7210$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7211{ as_fn_set_status 77
7212as_fn_error "cannot compute sizeof (unsigned long long)
7213See \`config.log' for more details." "$LINENO" 5; }; }
7214 else
7215 ac_cv_sizeof_unsigned_long_long=0
7216 fi
7217fi
7218
7219fi
7220{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5
7221$as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; }
7222
7223
7224
7225cat >>confdefs.h <<_ACEOF
7226#define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
7227_ACEOF
7228
7229
7230# The cast to long int works around a bug in the HP C Compiler
7231# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7232# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7233# This bug is HP SR number 8606223364.
7234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
7235$as_echo_n "checking size of unsigned long... " >&6; }
7236if test "${ac_cv_sizeof_unsigned_long+set}" = set; then :
7237 $as_echo_n "(cached) " >&6
7238else
7239 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then :
7240
7241else
7242 if test "$ac_cv_type_unsigned_long" = yes; then
7243 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7244$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7245{ as_fn_set_status 77
7246as_fn_error "cannot compute sizeof (unsigned long)
7247See \`config.log' for more details." "$LINENO" 5; }; }
7248 else
7249 ac_cv_sizeof_unsigned_long=0
7250 fi
7251fi
7252
7253fi
7254{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
7255$as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
7256
7257
7258
7259cat >>confdefs.h <<_ACEOF
7260#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
7261_ACEOF
7262
7263
7264# The cast to long int works around a bug in the HP C Compiler
7265# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7266# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7267# This bug is HP SR number 8606223364.
7268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5
7269$as_echo_n "checking size of unsigned __int128... " >&6; }
7270if test "${ac_cv_sizeof_unsigned___int128+set}" = set; then :
7271 $as_echo_n "(cached) " >&6
7272else
7273 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then :
7274
7275else
7276 if test "$ac_cv_type_unsigned___int128" = yes; then
7277 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7278$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7279{ as_fn_set_status 77
7280as_fn_error "cannot compute sizeof (unsigned __int128)
7281See \`config.log' for more details." "$LINENO" 5; }; }
7282 else
7283 ac_cv_sizeof_unsigned___int128=0
7284 fi
7285fi
7286
7287fi
7288{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5
7289$as_echo "$ac_cv_sizeof_unsigned___int128" >&6; }
7290
7291
7292
7293cat >>confdefs.h <<_ACEOF
7294#define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128
7295_ACEOF
7296
7297
7298
7299if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
7300 TARGET_PTR="unsigned long"
7301elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
7302 TARGET_PTR="unsigned long long"
7303elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
7304 TARGET_PTR="unsigned __int128"
7305else
7306 TARGET_PTR="unsigned long"
7307fi
7308
7309
7310ac_config_files="$ac_config_files jit-reader.h:jit-reader.in"
7311
7312
a2d08b9e
SD
7313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
7314$as_echo_n "checking for library containing dlopen... " >&6; }
7315if test "${ac_cv_search_dlopen+set}" = set; then :
7316 $as_echo_n "(cached) " >&6
7317else
7318 ac_func_search_save_LIBS=$LIBS
7319cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7320/* end confdefs.h. */
7321
7322/* Override any GCC internal prototype to avoid an error.
7323 Use char because int might match the return type of a GCC
7324 builtin and then its argument prototype would still apply. */
7325#ifdef __cplusplus
7326extern "C"
7327#endif
7328char dlopen ();
7329int
7330main ()
7331{
7332return dlopen ();
7333 ;
7334 return 0;
7335}
7336_ACEOF
7337for ac_lib in '' dl; do
7338 if test -z "$ac_lib"; then
7339 ac_res="none required"
7340 else
7341 ac_res=-l$ac_lib
7342 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7343 fi
7344 if ac_fn_c_try_link "$LINENO"; then :
7345 ac_cv_search_dlopen=$ac_res
7346fi
7347rm -f core conftest.err conftest.$ac_objext \
7348 conftest$ac_exeext
7349 if test "${ac_cv_search_dlopen+set}" = set; then :
7350 break
7351fi
7352done
7353if test "${ac_cv_search_dlopen+set}" = set; then :
7354
7355else
7356 ac_cv_search_dlopen=no
7357fi
7358rm conftest.$ac_ext
7359LIBS=$ac_func_search_save_LIBS
7360fi
7361{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
7362$as_echo "$ac_cv_search_dlopen" >&6; }
7363ac_res=$ac_cv_search_dlopen
7364if test "$ac_res" != no; then :
7365 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7366
7367fi
7368
7369
39037522 7370
b8e0a31c
SD
7371
7372# Check whether --with-jit-reader-dir was given.
7373if test "${with_jit_reader_dir+set}" = set; then :
7374 withval=$with_jit_reader_dir;
7375 JIT_READER_DIR=$withval
7376else
7377 JIT_READER_DIR=${libdir}/gdb
7378fi
7379
7380
7381 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
7382 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7383 ac_define_dir=`eval echo $JIT_READER_DIR`
7384 ac_define_dir=`eval echo $ac_define_dir`
7385
7386cat >>confdefs.h <<_ACEOF
7387#define JIT_READER_DIR "$ac_define_dir"
7388_ACEOF
7389
7390
7391
7392
7393 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
7394 if test "x$prefix" = xNONE; then
7395 test_prefix=/usr/local
7396 else
7397 test_prefix=$prefix
7398 fi
7399 else
7400 test_prefix=$exec_prefix
7401 fi
7402 value=0
7403 case ${ac_define_dir} in
7404 "${test_prefix}"|"${test_prefix}/"*|\
7405 '${exec_prefix}'|'${exec_prefix}/'*)
7406 value=1
7407 ;;
7408 esac
7409
7410cat >>confdefs.h <<_ACEOF
7411#define JIT_READER_DIR_RELOCATABLE $value
7412_ACEOF
7413
7414
7415
7416
7417
81ecdfbb
RW
7418# Check whether --with-expat was given.
7419if test "${with_expat+set}" = set; then :
7420 withval=$with_expat;
5c39566f
DJ
7421else
7422 with_expat=auto
81ecdfbb
RW
7423fi
7424
7425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
7426$as_echo_n "checking whether to use expat... " >&6; }
7427{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
7428$as_echo "$with_expat" >&6; }
5c39566f
DJ
7429
7430if test "${with_expat}" = no; then
81ecdfbb
RW
7431 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
7432$as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
5c39566f
DJ
7433 HAVE_LIBEXPAT=no
7434else
7435
3841debe
DJ
7436 if test "X$prefix" = "XNONE"; then
7437 acl_final_prefix="$ac_default_prefix"
7438 else
7439 acl_final_prefix="$prefix"
7440 fi
7441 if test "X$exec_prefix" = "XNONE"; then
7442 acl_final_exec_prefix='${prefix}'
7443 else
7444 acl_final_exec_prefix="$exec_prefix"
7445 fi
7446 acl_save_prefix="$prefix"
7447 prefix="$acl_final_prefix"
7448 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
7449 prefix="$acl_save_prefix"
7450
7451
81ecdfbb
RW
7452# Check whether --with-gnu-ld was given.
7453if test "${with_gnu_ld+set}" = set; then :
7454 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
3841debe
DJ
7455else
7456 with_gnu_ld=no
81ecdfbb
RW
7457fi
7458
3841debe
DJ
7459# Prepare PATH_SEPARATOR.
7460# The user is always right.
7461if test "${PATH_SEPARATOR+set}" != set; then
7462 echo "#! /bin/sh" >conf$$.sh
7463 echo "exit 0" >>conf$$.sh
7464 chmod +x conf$$.sh
7465 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
7466 PATH_SEPARATOR=';'
7467 else
7468 PATH_SEPARATOR=:
7469 fi
7470 rm -f conf$$.sh
7471fi
7472ac_prog=ld
7473if test "$GCC" = yes; then
7474 # Check if gcc -print-prog-name=ld gives a path.
81ecdfbb
RW
7475 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
7476$as_echo_n "checking for ld used by GCC... " >&6; }
3841debe
DJ
7477 case $host in
7478 *-*-mingw*)
7479 # gcc leaves a trailing carriage return which upsets mingw
7480 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
7481 *)
7482 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
7483 esac
7484 case $ac_prog in
7485 # Accept absolute paths.
7486 [\\/]* | [A-Za-z]:[\\/]*)
7487 re_direlt='/[^/][^/]*/\.\./'
7488 # Canonicalize the path of ld
7489 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
7490 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
7491 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
7492 done
7493 test -z "$LD" && LD="$ac_prog"
7494 ;;
7495 "")
7496 # If it fails, then pretend we aren't using GCC.
7497 ac_prog=ld
7498 ;;
7499 *)
7500 # If it is relative, then search for the first ld in PATH.
7501 with_gnu_ld=unknown
7502 ;;
7503 esac
7504elif test "$with_gnu_ld" = yes; then
81ecdfbb
RW
7505 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
7506$as_echo_n "checking for GNU ld... " >&6; }
3841debe 7507else
81ecdfbb
RW
7508 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
7509$as_echo_n "checking for non-GNU ld... " >&6; }
3841debe 7510fi
81ecdfbb
RW
7511if test "${acl_cv_path_LD+set}" = set; then :
7512 $as_echo_n "(cached) " >&6
3841debe
DJ
7513else
7514 if test -z "$LD"; then
7515 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
7516 for ac_dir in $PATH; do
7517 test -z "$ac_dir" && ac_dir=.
7518 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
7519 acl_cv_path_LD="$ac_dir/$ac_prog"
7520 # Check to see if the program is GNU ld. I'd rather use --version,
7521 # but apparently some GNU ld's only accept -v.
7522 # Break only if it was the GNU/non-GNU ld that we prefer.
7523 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
7524 test "$with_gnu_ld" != no && break
7525 else
7526 test "$with_gnu_ld" != yes && break
7527 fi
7528 fi
7529 done
7530 IFS="$ac_save_ifs"
7531else
7532 acl_cv_path_LD="$LD" # Let the user override the test with a path.
7533fi
7534fi
7535
7536LD="$acl_cv_path_LD"
7537if test -n "$LD"; then
81ecdfbb
RW
7538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
7539$as_echo "$LD" >&6; }
3841debe 7540else
81ecdfbb
RW
7541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7542$as_echo "no" >&6; }
3841debe 7543fi
81ecdfbb
RW
7544test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
7545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
7546$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
7547if test "${acl_cv_prog_gnu_ld+set}" = set; then :
7548 $as_echo_n "(cached) " >&6
3841debe
DJ
7549else
7550 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
7551if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
7552 acl_cv_prog_gnu_ld=yes
7553else
7554 acl_cv_prog_gnu_ld=no
7555fi
7556fi
81ecdfbb
RW
7557{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
7558$as_echo "$acl_cv_prog_gnu_ld" >&6; }
3841debe
DJ
7559with_gnu_ld=$acl_cv_prog_gnu_ld
7560
7561
7562
81ecdfbb
RW
7563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
7564$as_echo_n "checking for shared library run path origin... " >&6; }
7565if test "${acl_cv_rpath+set}" = set; then :
7566 $as_echo_n "(cached) " >&6
3841debe
DJ
7567else
7568
7569 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
7570 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
7571 . ./conftest.sh
7572 rm -f ./conftest.sh
7573 acl_cv_rpath=done
7574
7575fi
81ecdfbb
RW
7576{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
7577$as_echo "$acl_cv_rpath" >&6; }
3841debe
DJ
7578 wl="$acl_cv_wl"
7579 libext="$acl_cv_libext"
7580 shlibext="$acl_cv_shlibext"
7581 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
7582 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
7583 hardcode_direct="$acl_cv_hardcode_direct"
7584 hardcode_minus_L="$acl_cv_hardcode_minus_L"
81ecdfbb
RW
7585 # Check whether --enable-rpath was given.
7586if test "${enable_rpath+set}" = set; then :
7587 enableval=$enable_rpath; :
3841debe
DJ
7588else
7589 enable_rpath=yes
81ecdfbb
RW
7590fi
7591
3841debe
DJ
7592
7593
7594
7595
7596
7597
7598
7599
7600
7601 use_additional=yes
7602
7603 acl_save_prefix="$prefix"
7604 prefix="$acl_final_prefix"
7605 acl_save_exec_prefix="$exec_prefix"
7606 exec_prefix="$acl_final_exec_prefix"
7607
7608 eval additional_includedir=\"$includedir\"
7609 eval additional_libdir=\"$libdir\"
7610
7611 exec_prefix="$acl_save_exec_prefix"
7612 prefix="$acl_save_prefix"
7613
7614
81ecdfbb
RW
7615# Check whether --with-libexpat-prefix was given.
7616if test "${with_libexpat_prefix+set}" = set; then :
7617 withval=$with_libexpat_prefix;
3841debe
DJ
7618 if test "X$withval" = "Xno"; then
7619 use_additional=no
7620 else
7621 if test "X$withval" = "X"; then
7622
7623 acl_save_prefix="$prefix"
7624 prefix="$acl_final_prefix"
7625 acl_save_exec_prefix="$exec_prefix"
7626 exec_prefix="$acl_final_exec_prefix"
7627
7628 eval additional_includedir=\"$includedir\"
7629 eval additional_libdir=\"$libdir\"
7630
7631 exec_prefix="$acl_save_exec_prefix"
7632 prefix="$acl_save_prefix"
7633
7634 else
7635 additional_includedir="$withval/include"
7636 additional_libdir="$withval/lib"
7637 fi
7638 fi
7639
81ecdfbb
RW
7640fi
7641
3841debe
DJ
7642 LIBEXPAT=
7643 LTLIBEXPAT=
7644 INCEXPAT=
7645 rpathdirs=
7646 ltrpathdirs=
7647 names_already_handled=
7648 names_next_round='expat '
7649 while test -n "$names_next_round"; do
7650 names_this_round="$names_next_round"
7651 names_next_round=
7652 for name in $names_this_round; do
7653 already_handled=
7654 for n in $names_already_handled; do
7655 if test "$n" = "$name"; then
7656 already_handled=yes
7657 break
7658 fi
7659 done
7660 if test -z "$already_handled"; then
7661 names_already_handled="$names_already_handled $name"
7662 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
7663 eval value=\"\$HAVE_LIB$uppername\"
7664 if test -n "$value"; then
7665 if test "$value" = yes; then
7666 eval value=\"\$LIB$uppername\"
7667 test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
7668 eval value=\"\$LTLIB$uppername\"
7669 test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
7670 else
7671 :
7672 fi
7673 else
7674 found_dir=
7675 found_la=
7676 found_so=
7677 found_a=
7678 if test $use_additional = yes; then
7679 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
7680 found_dir="$additional_libdir"
7681 found_so="$additional_libdir/lib$name.$shlibext"
7682 if test -f "$additional_libdir/lib$name.la"; then
7683 found_la="$additional_libdir/lib$name.la"
7684 fi
7685 else
7686 if test -f "$additional_libdir/lib$name.$libext"; then
7687 found_dir="$additional_libdir"
7688 found_a="$additional_libdir/lib$name.$libext"
7689 if test -f "$additional_libdir/lib$name.la"; then
7690 found_la="$additional_libdir/lib$name.la"
7691 fi
7692 fi
7693 fi
7694 fi
7695 if test "X$found_dir" = "X"; then
7696 for x in $LDFLAGS $LTLIBEXPAT; do
7697
7698 acl_save_prefix="$prefix"
7699 prefix="$acl_final_prefix"
7700 acl_save_exec_prefix="$exec_prefix"
7701 exec_prefix="$acl_final_exec_prefix"
7702 eval x=\"$x\"
7703 exec_prefix="$acl_save_exec_prefix"
7704 prefix="$acl_save_prefix"
7705
7706 case "$x" in
7707 -L*)
7708 dir=`echo "X$x" | sed -e 's/^X-L//'`
7709 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
7710 found_dir="$dir"
7711 found_so="$dir/lib$name.$shlibext"
7712 if test -f "$dir/lib$name.la"; then
7713 found_la="$dir/lib$name.la"
7714 fi
7715 else
7716 if test -f "$dir/lib$name.$libext"; then
7717 found_dir="$dir"
7718 found_a="$dir/lib$name.$libext"
7719 if test -f "$dir/lib$name.la"; then
7720 found_la="$dir/lib$name.la"
7721 fi
7722 fi
7723 fi
7724 ;;
7725 esac
7726 if test "X$found_dir" != "X"; then
7727 break
7728 fi
7729 done
7730 fi
7731 if test "X$found_dir" != "X"; then
7732 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
7733 if test "X$found_so" != "X"; then
7734 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
7735 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
7736 else
7737 haveit=
7738 for x in $ltrpathdirs; do
7739 if test "X$x" = "X$found_dir"; then
7740 haveit=yes
7741 break
7742 fi
7743 done
7744 if test -z "$haveit"; then
7745 ltrpathdirs="$ltrpathdirs $found_dir"
7746 fi
7747 if test "$hardcode_direct" = yes; then
7748 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
7749 else
7750 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
7751 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
7752 haveit=
7753 for x in $rpathdirs; do
7754 if test "X$x" = "X$found_dir"; then
7755 haveit=yes
7756 break
7757 fi
7758 done
7759 if test -z "$haveit"; then
7760 rpathdirs="$rpathdirs $found_dir"
7761 fi
7762 else
7763 haveit=
7764 for x in $LDFLAGS $LIBEXPAT; do
7765
7766 acl_save_prefix="$prefix"
7767 prefix="$acl_final_prefix"
7768 acl_save_exec_prefix="$exec_prefix"
7769 exec_prefix="$acl_final_exec_prefix"
7770 eval x=\"$x\"
7771 exec_prefix="$acl_save_exec_prefix"
7772 prefix="$acl_save_prefix"
7773
7774 if test "X$x" = "X-L$found_dir"; then
7775 haveit=yes
7776 break
7777 fi
7778 done
7779 if test -z "$haveit"; then
7780 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
7781 fi
7782 if test "$hardcode_minus_L" != no; then
7783 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
7784 else
7785 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
7786 fi
7787 fi
7788 fi
7789 fi
7790 else
7791 if test "X$found_a" != "X"; then
7792 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
7793 else
7794 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
7795 fi
7796 fi
7797 additional_includedir=
7798 case "$found_dir" in
7799 */lib | */lib/)
7800 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
7801 additional_includedir="$basedir/include"
7802 ;;
7803 esac
7804 if test "X$additional_includedir" != "X"; then
7805 if test "X$additional_includedir" != "X/usr/include"; then
7806 haveit=
7807 if test "X$additional_includedir" = "X/usr/local/include"; then
7808 if test -n "$GCC"; then
7809 case $host_os in
7810 linux*) haveit=yes;;
7811 esac
7812 fi
7813 fi
7814 if test -z "$haveit"; then
7815 for x in $CPPFLAGS $INCEXPAT; do
7816
7817 acl_save_prefix="$prefix"
7818 prefix="$acl_final_prefix"
7819 acl_save_exec_prefix="$exec_prefix"
7820 exec_prefix="$acl_final_exec_prefix"
7821 eval x=\"$x\"
7822 exec_prefix="$acl_save_exec_prefix"
7823 prefix="$acl_save_prefix"
7824
7825 if test "X$x" = "X-I$additional_includedir"; then
7826 haveit=yes
7827 break
7828 fi
7829 done
7830 if test -z "$haveit"; then
7831 if test -d "$additional_includedir"; then
7832 INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
7833 fi
7834 fi
7835 fi
7836 fi
7837 fi
7838 if test -n "$found_la"; then
7839 save_libdir="$libdir"
7840 case "$found_la" in
7841 */* | *\\*) . "$found_la" ;;
7842 *) . "./$found_la" ;;
7843 esac
7844 libdir="$save_libdir"
7845 for dep in $dependency_libs; do
7846 case "$dep" in
7847 -L*)
7848 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
7849 if test "X$additional_libdir" != "X/usr/lib"; then
7850 haveit=
7851 if test "X$additional_libdir" = "X/usr/local/lib"; then
7852 if test -n "$GCC"; then
7853 case $host_os in
7854 linux*) haveit=yes;;
7855 esac
7856 fi
7857 fi
7858 if test -z "$haveit"; then
7859 haveit=
7860 for x in $LDFLAGS $LIBEXPAT; do
7861
7862 acl_save_prefix="$prefix"
7863 prefix="$acl_final_prefix"
7864 acl_save_exec_prefix="$exec_prefix"
7865 exec_prefix="$acl_final_exec_prefix"
7866 eval x=\"$x\"
7867 exec_prefix="$acl_save_exec_prefix"
7868 prefix="$acl_save_prefix"
7869
7870 if test "X$x" = "X-L$additional_libdir"; then
7871 haveit=yes
7872 break
7873 fi
7874 done
7875 if test -z "$haveit"; then
7876 if test -d "$additional_libdir"; then
7877 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
7878 fi
7879 fi
7880 haveit=
7881 for x in $LDFLAGS $LTLIBEXPAT; do
7882
7883 acl_save_prefix="$prefix"
7884 prefix="$acl_final_prefix"
7885 acl_save_exec_prefix="$exec_prefix"
7886 exec_prefix="$acl_final_exec_prefix"
7887 eval x=\"$x\"
7888 exec_prefix="$acl_save_exec_prefix"
7889 prefix="$acl_save_prefix"
7890
7891 if test "X$x" = "X-L$additional_libdir"; then
7892 haveit=yes
7893 break
7894 fi
7895 done
7896 if test -z "$haveit"; then
7897 if test -d "$additional_libdir"; then
7898 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
7899 fi
7900 fi
7901 fi
7902 fi
7903 ;;
7904 -R*)
7905 dir=`echo "X$dep" | sed -e 's/^X-R//'`
7906 if test "$enable_rpath" != no; then
7907 haveit=
7908 for x in $rpathdirs; do
7909 if test "X$x" = "X$dir"; then
7910 haveit=yes
7911 break
7912 fi
7913 done
7914 if test -z "$haveit"; then
7915 rpathdirs="$rpathdirs $dir"
7916 fi
7917 haveit=
7918 for x in $ltrpathdirs; do
7919 if test "X$x" = "X$dir"; then
7920 haveit=yes
7921 break
7922 fi
7923 done
7924 if test -z "$haveit"; then
7925 ltrpathdirs="$ltrpathdirs $dir"
7926 fi
7927 fi
7928 ;;
7929 -l*)
7930 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
7931 ;;
7932 *.la)
7933 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
7934 ;;
7935 *)
7936 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
7937 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
7938 ;;
81ecdfbb
RW
7939 esac
7940 done
7941 fi
7942 else
7943 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
7944 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
7945 fi
7946 fi
7947 fi
7948 done
7949 done
7950 if test "X$rpathdirs" != "X"; then
7951 if test -n "$hardcode_libdir_separator"; then
7952 alldirs=
7953 for found_dir in $rpathdirs; do
7954 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
7955 done
7956 acl_save_libdir="$libdir"
7957 libdir="$alldirs"
7958 eval flag=\"$hardcode_libdir_flag_spec\"
7959 libdir="$acl_save_libdir"
7960 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
7961 else
7962 for found_dir in $rpathdirs; do
7963 acl_save_libdir="$libdir"
7964 libdir="$found_dir"
7965 eval flag=\"$hardcode_libdir_flag_spec\"
7966 libdir="$acl_save_libdir"
7967 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
7968 done
7969 fi
7970 fi
7971 if test "X$ltrpathdirs" != "X"; then
7972 for found_dir in $ltrpathdirs; do
7973 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
7974 done
7975 fi
a9322a30
TT
7976
7977
81ecdfbb 7978 ac_save_CPPFLAGS="$CPPFLAGS"
a9322a30 7979
81ecdfbb
RW
7980 for element in $INCEXPAT; do
7981 haveit=
7982 for x in $CPPFLAGS; do
a9322a30 7983
81ecdfbb
RW
7984 acl_save_prefix="$prefix"
7985 prefix="$acl_final_prefix"
7986 acl_save_exec_prefix="$exec_prefix"
7987 exec_prefix="$acl_final_exec_prefix"
7988 eval x=\"$x\"
7989 exec_prefix="$acl_save_exec_prefix"
7990 prefix="$acl_save_prefix"
a8111142 7991
81ecdfbb
RW
7992 if test "X$x" = "X$element"; then
7993 haveit=yes
7994 break
7995 fi
7996 done
7997 if test -z "$haveit"; then
7998 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
7999 fi
8000 done
a9322a30
TT
8001
8002
81ecdfbb
RW
8003 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
8004$as_echo_n "checking for libexpat... " >&6; }
8005if test "${ac_cv_libexpat+set}" = set; then :
8006 $as_echo_n "(cached) " >&6
bec39cab 8007else
bec39cab 8008
81ecdfbb
RW
8009 ac_save_LIBS="$LIBS"
8010 LIBS="$LIBS $LIBEXPAT"
8011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8012/* end confdefs.h. */
81ecdfbb
RW
8013#include "expat.h"
8014int
8015main ()
8016{
8017XML_Parser p = XML_ParserCreate (0);
8018 ;
8019 return 0;
8020}
bec39cab 8021_ACEOF
81ecdfbb
RW
8022if ac_fn_c_try_link "$LINENO"; then :
8023 ac_cv_libexpat=yes
c906108c 8024else
81ecdfbb 8025 ac_cv_libexpat=no
bec39cab 8026fi
81ecdfbb
RW
8027rm -f core conftest.err conftest.$ac_objext \
8028 conftest$ac_exeext conftest.$ac_ext
8029 LIBS="$ac_save_LIBS"
c906108c 8030
95ca63c4 8031fi
81ecdfbb
RW
8032{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
8033$as_echo "$ac_cv_libexpat" >&6; }
8034 if test "$ac_cv_libexpat" = yes; then
8035 HAVE_LIBEXPAT=yes
bec39cab 8036
81ecdfbb 8037$as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
bec39cab 8038
81ecdfbb
RW
8039 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
8040$as_echo_n "checking how to link with libexpat... " >&6; }
8041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
8042$as_echo "$LIBEXPAT" >&6; }
8043 else
8044 HAVE_LIBEXPAT=no
8045 CPPFLAGS="$ac_save_CPPFLAGS"
8046 LIBEXPAT=
8047 LTLIBEXPAT=
8048 fi
95ca63c4
CF
8049
8050
8051
7cb9022a
MK
8052
8053
bec39cab 8054
81ecdfbb
RW
8055 if test "$HAVE_LIBEXPAT" != yes; then
8056 if test "$with_expat" = yes; then
8057 as_fn_error "expat is missing or unusable" "$LINENO" 5
8058 else
8059 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
8060$as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
8061 fi
8062 else
8063 save_LIBS=$LIBS
8064 LIBS="$LIBS $LIBEXPAT"
8065 for ac_func in XML_StopParser
8066do :
8067 ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
8068if test "x$ac_cv_func_XML_StopParser" = x""yes; then :
bec39cab 8069 cat >>confdefs.h <<_ACEOF
81ecdfbb 8070#define HAVE_XML_STOPPARSER 1
bec39cab 8071_ACEOF
95ca63c4 8072
bec39cab 8073fi
bec39cab 8074done
95ca63c4 8075
81ecdfbb
RW
8076 LIBS=$save_LIBS
8077 fi
a9322a30
TT
8078fi
8079
d344e670
DE
8080# --------------------- #
8081# Check for libpython. #
8082# --------------------- #
8083
a9322a30 8084
a9322a30
TT
8085
8086
ec685c5e 8087
0c4a4063 8088
81ecdfbb
RW
8089# Check whether --with-python was given.
8090if test "${with_python+set}" = set; then :
8091 withval=$with_python;
bec39cab 8092else
81ecdfbb 8093 with_python=auto
bec39cab 8094fi
bec39cab 8095
81ecdfbb
RW
8096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
8097$as_echo_n "checking whether to use python... " >&6; }
8098{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
8099$as_echo "$with_python" >&6; }
9a156167 8100
81ecdfbb
RW
8101if test "${with_python}" = no; then
8102 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
8103$as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
8104 have_libpython=no
bec39cab 8105else
81ecdfbb 8106 case "${with_python}" in
8c85a4e2 8107 [\\/]* | ?:[\\/]*)
ec685c5e
DE
8108 if test -d ${with_python}; then
8109 # Assume the python binary is ${with_python}/bin/python.
ec685c5e 8110 python_prog="${with_python}/bin/python"
0c4a4063 8111 python_prefix=
9c4ea6c5
JB
8112 # If python does not exit ${with_python}/bin, then try in
8113 # ${with_python}. On Windows/MinGW, this is where the Python
8114 # executable is.
8115 if test ! -x "${python_prog}"; then
8116 python_prog="${with_python}/python"
8117 python_prefix=
8118 fi
e7a30f46 8119 if test ! -x "${python_prog}"; then
ec685c5e
DE
8120 # Fall back to gdb 7.0/7.1 behaviour.
8121 python_prog=missing
0c4a4063 8122 python_prefix=${with_python}
ec685c5e 8123 fi
e7a30f46 8124 elif test -x "${with_python}"; then
ec685c5e
DE
8125 # While we can't run python compiled for $host (unless host == build),
8126 # the user could write a script that provides the needed information,
8127 # so we support that.
ec685c5e 8128 python_prog=${with_python}
0c4a4063 8129 python_prefix=
ec685c5e
DE
8130 else
8131 as_fn_error "invalid value for --with-python" "$LINENO" 5
8132 fi
81ecdfbb 8133 ;;
ec685c5e
DE
8134 */*)
8135 # Disallow --with-python=foo/bar.
81ecdfbb
RW
8136 as_fn_error "invalid value for --with-python" "$LINENO" 5
8137 ;;
ec685c5e
DE
8138 *)
8139 # The user has either specified auto, yes, or the name of the python
8140 # program assumed to be in $PATH.
8141 python_prefix=
8142 case "${with_python}" in
8143 yes | auto)
8144 if test ${build} = ${host}; then
8145 # Extract the first word of "python", so it can be a program name with args.
8146set dummy python; ac_word=$2
8147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8148$as_echo_n "checking for $ac_word... " >&6; }
8149if test "${ac_cv_path_python_prog_path+set}" = set; then :
8150 $as_echo_n "(cached) " >&6
8151else
8152 case $python_prog_path in
8153 [\\/]* | ?:[\\/]*)
8154 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
8155 ;;
8156 *)
8157 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8158for as_dir in $PATH
8159do
8160 IFS=$as_save_IFS
8161 test -z "$as_dir" && as_dir=.
8162 for ac_exec_ext in '' $ac_executable_extensions; do
8163 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8164 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
8165 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8166 break 2
8167 fi
8168done
8169 done
8170IFS=$as_save_IFS
8171
8172 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
8173 ;;
8174esac
8175fi
8176python_prog_path=$ac_cv_path_python_prog_path
8177if test -n "$python_prog_path"; then
8178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
8179$as_echo "$python_prog_path" >&6; }
8180else
8181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8182$as_echo "no" >&6; }
8183fi
8184
8185
8186 if test "${python_prog_path}" = missing; then
8187 python_prog=missing
8188 else
8189 python_prog=${python_prog_path}
8190 fi
8191 else
8192 # Not much we can do except assume the cross-compiler will find the
8193 # right files.
8194 python_prog=missing
8195 fi
8196 ;;
8197 *)
8198 # While we can't run python compiled for $host (unless host == build),
8199 # the user could write a script that provides the needed information,
8200 # so we support that.
8201 python_prog="${with_python}"
8202 # Extract the first word of "${python_prog}", so it can be a program name with args.
8203set dummy ${python_prog}; ac_word=$2
8204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8205$as_echo_n "checking for $ac_word... " >&6; }
8206if test "${ac_cv_path_python_prog_path+set}" = set; then :
8207 $as_echo_n "(cached) " >&6
8208else
8209 case $python_prog_path in
8210 [\\/]* | ?:[\\/]*)
8211 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
8212 ;;
8213 *)
8214 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8215for as_dir in $PATH
8216do
8217 IFS=$as_save_IFS
8218 test -z "$as_dir" && as_dir=.
8219 for ac_exec_ext in '' $ac_executable_extensions; do
8220 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8221 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
8222 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8223 break 2
8224 fi
8225done
8226 done
8227IFS=$as_save_IFS
8228
8229 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
8230 ;;
8231esac
8232fi
8233python_prog_path=$ac_cv_path_python_prog_path
8234if test -n "$python_prog_path"; then
8235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
8236$as_echo "$python_prog_path" >&6; }
8237else
8238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8239$as_echo "no" >&6; }
8240fi
8241
8242
8243 if test "${python_prog_path}" = missing; then
8244 as_fn_error "unable to find python program ${python_prog}" "$LINENO" 5
8245 fi
8246 ;;
8247 esac
81ecdfbb
RW
8248 esac
8249
ec685c5e 8250 if test "${python_prog}" != missing; then
e7a30f46
DE
8251 # We have a python program to use, but it may be too old.
8252 # Don't flag an error for --with-python=auto (the default).
8253 have_python_config=yes
ec685c5e
DE
8254 python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
8255 if test $? != 0; then
e7a30f46
DE
8256 have_python_config=failed
8257 if test "${with_python}" != auto; then
8258 as_fn_error "failure running python-config --includes" "$LINENO" 5
8259 fi
ec685c5e
DE
8260 fi
8261 python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
8262 if test $? != 0; then
e7a30f46
DE
8263 have_python_config=failed
8264 if test "${with_python}" != auto; then
8265 as_fn_error "failure running python-config --ldflags" "$LINENO" 5
8266 fi
ec685c5e 8267 fi
0c4a4063
DE
8268 python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
8269 if test $? != 0; then
e7a30f46
DE
8270 have_python_config=failed
8271 if test "${with_python}" != auto; then
8272 as_fn_error "failure running python-config --exec-prefix" "$LINENO" 5
8273 fi
0c4a4063 8274 fi
ec685c5e 8275 else
ac534cba
JB
8276 # We do not have a python executable we can use to determine where
8277 # to find the Python headers and libs. We cannot guess the include
8278 # path from the python_prefix either, because that include path
8279 # depends on the Python version. So, there is nothing much we can
8280 # do except assume that the compiler will be able to find those files.
8281 python_includes=
8282 python_libs=
0c4a4063 8283 have_python_config=no
ec685c5e 8284 fi
bec39cab 8285
ec685c5e
DE
8286 # If we have python-config, only try the configuration it provides.
8287 # Otherwise fallback on the old way of trying different versions of
8288 # python in turn.
81ecdfbb 8289
ec685c5e
DE
8290 have_libpython=no
8291 if test "${have_python_config}" = yes; then
c1039e3c
JB
8292 # Determine the Python version by extracting "-lpython<version>"
8293 # part of the python_libs. <version> is usually X.Y with X and Y
8294 # being decimal numbers, but can also be XY (seen on Windows).
8295 #
8296 # The extraction is performed using sed with a regular expression.
8297 # Initially, the regexp used was using the '?' quantifier to make
8298 # the dot in the version number optional. Unfortunately, this
8299 # does not work with non-GNU versions of sed because, because of
8300 # what looks like a limitation (the '?' quantifier does not work
8301 # with back-references). We work around this limitation by using
8302 # the '*' quantifier instead. It means that, in theory, we might
8303 # match unexpected version strings such as "-lpython2..7", but
8304 # this seems unlikely in practice. And even if that happens,
8305 # an error will be triggered later on, when checking that version
8306 # number.
ec685c5e 8307 python_version=`echo " ${python_libs} " \
c1039e3c 8308 | sed -e 's,^.* -l\(python[0-9]*[.]*[0-9]*\).*$,\1,'`
0c4a4063
DE
8309 case "${python_version}" in
8310 python*)
ec685c5e
DE
8311
8312 version=${python_version}
8313
8314 new_CPPFLAGS=${python_includes}
8315 new_LIBS=${python_libs}
81ecdfbb
RW
8316 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8317$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 8318 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 8319 save_LIBS=$LIBS
ec685c5e
DE
8320 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8321 LIBS="$LIBS $new_LIBS"
8322 found_usable_python=no
81ecdfbb 8323 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8324/* end confdefs.h. */
ac534cba 8325#include "Python.h"
81ecdfbb
RW
8326int
8327main ()
8328{
8329Py_Initialize ();
8330 ;
8331 return 0;
8332}
bec39cab 8333_ACEOF
81ecdfbb 8334if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
8335 have_libpython=${version}
8336 found_usable_python=yes
ac534cba
JB
8337 PYTHON_CPPFLAGS=$new_CPPFLAGS
8338 PYTHON_LIBS=$new_LIBS
9a156167 8339fi
81ecdfbb
RW
8340rm -f core conftest.err conftest.$ac_objext \
8341 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
8342 CPPFLAGS=$save_CPPFLAGS
8343 LIBS=$save_LIBS
ec685c5e
DE
8344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8345$as_echo "${found_usable_python}" >&6; }
9a156167 8346
0c4a4063
DE
8347 ;;
8348 *)
ec685c5e 8349 as_fn_error "unable to determine python version from ${python_libs}" "$LINENO" 5
0c4a4063
DE
8350 ;;
8351 esac
e7a30f46 8352 elif test "${have_python_config}" != failed; then
ec685c5e 8353 if test "${have_libpython}" = no; then
9a156167 8354
420697bb
TT
8355 version=python2.7
8356
8357 new_CPPFLAGS=${python_includes}
8358 new_LIBS="${python_libs} -lpython2.7"
8359 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8360$as_echo_n "checking for ${version}... " >&6; }
8361 save_CPPFLAGS=$CPPFLAGS
8362 save_LIBS=$LIBS
8363 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8364 LIBS="$LIBS $new_LIBS"
8365 found_usable_python=no
8366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8367/* end confdefs.h. */
ac534cba 8368#include "Python.h"
420697bb
TT
8369int
8370main ()
8371{
8372Py_Initialize ();
8373 ;
8374 return 0;
8375}
8376_ACEOF
8377if ac_fn_c_try_link "$LINENO"; then :
8378 have_libpython=${version}
8379 found_usable_python=yes
ac534cba
JB
8380 PYTHON_CPPFLAGS=$new_CPPFLAGS
8381 PYTHON_LIBS=$new_LIBS
420697bb
TT
8382fi
8383rm -f core conftest.err conftest.$ac_objext \
8384 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
8385 CPPFLAGS=$save_CPPFLAGS
8386 LIBS=$save_LIBS
420697bb
TT
8387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8388$as_echo "${found_usable_python}" >&6; }
8389
8390 fi
8391 if test "${have_libpython}" = no; then
8392
ec685c5e
DE
8393 version=python2.6
8394
8395 new_CPPFLAGS=${python_includes}
8396 new_LIBS="${python_libs} -lpython2.6"
8397 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8398$as_echo_n "checking for ${version}... " >&6; }
8399 save_CPPFLAGS=$CPPFLAGS
8400 save_LIBS=$LIBS
8401 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8402 LIBS="$LIBS $new_LIBS"
8403 found_usable_python=no
8404 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8405/* end confdefs.h. */
ac534cba 8406#include "Python.h"
ec685c5e
DE
8407int
8408main ()
8409{
8410Py_Initialize ();
8411 ;
8412 return 0;
8413}
8414_ACEOF
8415if ac_fn_c_try_link "$LINENO"; then :
8416 have_libpython=${version}
8417 found_usable_python=yes
ac534cba
JB
8418 PYTHON_CPPFLAGS=$new_CPPFLAGS
8419 PYTHON_LIBS=$new_LIBS
ec685c5e
DE
8420fi
8421rm -f core conftest.err conftest.$ac_objext \
8422 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
8423 CPPFLAGS=$save_CPPFLAGS
8424 LIBS=$save_LIBS
ec685c5e
DE
8425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8426$as_echo "${found_usable_python}" >&6; }
9a156167 8427
81ecdfbb 8428 fi
ec685c5e 8429 if test ${have_libpython} = no; then
9a156167 8430
81ecdfbb 8431 version=python2.5
9a156167 8432
ec685c5e
DE
8433 new_CPPFLAGS=${python_includes}
8434 new_LIBS="${python_libs} -lpython2.5"
81ecdfbb
RW
8435 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8436$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 8437 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 8438 save_LIBS=$LIBS
ec685c5e
DE
8439 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8440 LIBS="$LIBS $new_LIBS"
8441 found_usable_python=no
81ecdfbb 8442 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 8443/* end confdefs.h. */
ac534cba 8444#include "Python.h"
81ecdfbb
RW
8445int
8446main ()
8447{
8448Py_Initialize ();
8449 ;
8450 return 0;
8451}
436868fb 8452_ACEOF
81ecdfbb 8453if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
8454 have_libpython=${version}
8455 found_usable_python=yes
ac534cba
JB
8456 PYTHON_CPPFLAGS=$new_CPPFLAGS
8457 PYTHON_LIBS=$new_LIBS
436868fb 8458fi
81ecdfbb
RW
8459rm -f core conftest.err conftest.$ac_objext \
8460 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
8461 CPPFLAGS=$save_CPPFLAGS
8462 LIBS=$save_LIBS
ec685c5e
DE
8463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8464$as_echo "${found_usable_python}" >&6; }
a9322a30 8465
81ecdfbb 8466 fi
ec685c5e 8467 if test ${have_libpython} = no; then
a9322a30 8468
81ecdfbb 8469 version=python2.4
a9322a30 8470
ec685c5e
DE
8471 new_CPPFLAGS=${python_includes}
8472 new_LIBS="${python_libs} -lpython2.4"
81ecdfbb
RW
8473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8474$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 8475 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 8476 save_LIBS=$LIBS
ec685c5e
DE
8477 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8478 LIBS="$LIBS $new_LIBS"
8479 found_usable_python=no
81ecdfbb 8480 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 8481/* end confdefs.h. */
ac534cba 8482#include "Python.h"
a9322a30
TT
8483int
8484main ()
8485{
81ecdfbb 8486Py_Initialize ();
a9322a30
TT
8487 ;
8488 return 0;
8489}
436868fb 8490_ACEOF
81ecdfbb 8491if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
8492 have_libpython=${version}
8493 found_usable_python=yes
ac534cba
JB
8494 PYTHON_CPPFLAGS=$new_CPPFLAGS
8495 PYTHON_LIBS=$new_LIBS
436868fb 8496fi
81ecdfbb
RW
8497rm -f core conftest.err conftest.$ac_objext \
8498 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
8499 CPPFLAGS=$save_CPPFLAGS
8500 LIBS=$save_LIBS
ec685c5e
DE
8501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8502$as_echo "${found_usable_python}" >&6; }
81ecdfbb 8503
ec685c5e
DE
8504 fi
8505 fi
9c4ea6c5 8506 if test "${have_libpython}" = python2.7 -o "${have_libpython}" = python27; then
11763c18
TT
8507
8508$as_echo "#define HAVE_LIBPYTHON2_7 1" >>confdefs.h
8509
9c4ea6c5 8510 elif test "${have_libpython}" = python2.6 -o "${have_libpython}" = python26; then
ec685c5e
DE
8511
8512$as_echo "#define HAVE_LIBPYTHON2_6 1" >>confdefs.h
8513
9c4ea6c5 8514 elif test "${have_libpython}" = python2.5 -o "${have_libpython}" = python25; then
ec685c5e
DE
8515
8516$as_echo "#define HAVE_LIBPYTHON2_5 1" >>confdefs.h
8517
9c4ea6c5 8518 elif test "${have_libpython}" = python2.4 -o "${have_libpython}" = python24; then
81ecdfbb
RW
8519
8520$as_echo "#define HAVE_LIBPYTHON2_4 1" >>confdefs.h
8521
81ecdfbb 8522 fi
ec685c5e
DE
8523
8524 if test "${have_libpython}" = no; then
81ecdfbb
RW
8525 case "${with_python}" in
8526 yes)
8527 as_fn_error "python is missing or unusable" "$LINENO" 5
8528 ;;
8529 auto)
8530 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
8531$as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
8532 ;;
8533 *)
8534 as_fn_error "no usable python found at ${with_python}" "$LINENO" 5
8535 ;;
8536 esac
0c4a4063
DE
8537 else
8538 if test -n "${python_prefix}"; then
8539
8540cat >>confdefs.h <<_ACEOF
8541#define WITH_PYTHON_PATH "${python_prefix}"
8542_ACEOF
8543
8544
8545 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
8546 if test "x$prefix" = xNONE; then
8547 test_prefix=/usr/local
8548 else
8549 test_prefix=$prefix
8550 fi
8551 else
8552 test_prefix=$exec_prefix
8553 fi
8554 value=0
8555 case ${python_prefix} in
8556 "${test_prefix}"|"${test_prefix}/"*|\
8557 '${exec_prefix}'|'${exec_prefix}/'*)
8558 value=1
8559 ;;
8560 esac
8561
8562cat >>confdefs.h <<_ACEOF
8563#define PYTHON_PATH_RELOCATABLE $value
8564_ACEOF
8565
8566
8567 fi
81ecdfbb 8568 fi
436868fb 8569fi
436868fb 8570
ec685c5e 8571if test "${have_libpython}" != no; then
436868fb 8572
81ecdfbb 8573$as_echo "#define HAVE_PYTHON 1" >>confdefs.h
436868fb 8574
81ecdfbb
RW
8575 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
8576 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
8577 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
94f7449c 8578 CONFIG_INSTALL="$CONFIG_INSTALL install-python"
81ecdfbb 8579 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
436868fb 8580
81ecdfbb
RW
8581 # Flags needed to compile Python code (taken from python-config --cflags).
8582 # We cannot call python-config directly because it will output whatever was
8583 # used when compiling the Python interpreter itself, including flags which
8584 # would make the python-related objects be compiled differently from the
8585 # rest of GDB (e.g., -O2 and -fPIC).
8586 if test "${GCC}" = yes; then
8587 tentative_python_cflags="-fno-strict-aliasing -DNDEBUG -fwrapv"
8588 fi
436868fb 8589
81ecdfbb
RW
8590 if test "x${tentative_python_cflags}" != x; then
8591 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
8592$as_echo_n "checking compiler flags for python code... " >&6; }
8593 for flag in ${tentative_python_cflags}; do
8594 # Check that the compiler accepts it
8595 saved_CFLAGS="$CFLAGS"
8596 CFLAGS="$CFLAGS $flag"
8597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8598/* end confdefs.h. */
81ecdfbb 8599
a9322a30
TT
8600int
8601main ()
8602{
a9322a30
TT
8603
8604 ;
8605 return 0;
8606}
bec39cab 8607_ACEOF
81ecdfbb
RW
8608if ac_fn_c_try_compile "$LINENO"; then :
8609 PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
bec39cab 8610fi
81ecdfbb
RW
8611rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8612 CFLAGS="$saved_CFLAGS"
8613 done
8614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
8615$as_echo "${PYTHON_CFLAGS}" >&6; }
8616 fi
043b6510
JB
8617
8618 # On IRIX, type siginfo is not defined. Instead, sys/siginfo.h provides:
8619 # #if _SGIAPI
8620 # #define siginfo __siginfo
8621 # #endif
8622 # The problem is that including Python causes some XOPEN macros to be
8623 # unilaterally defined, and that in turn causes _SGIAPI to evaluate
8624 # to false. So, we work around this issue by defining siginfo ourself
8625 # though the command-line.
c83393b9
JB
8626 #
8627 # On x64 Windows, Python's include headers, and pyconfig.h in
8628 # particular, rely on MS_WIN64 macro to detect that it's a 64bit
8629 # version of Windows. Unfortunately, MS_WIN64 is only defined if
8630 # _MSC_VER, a Microsoft-specific macro, is defined. So, when
8631 # building on x64 Windows with GCC, we define MS_WIN64 ourselves.
8632 # The issue was reported to the Python community, but still isn't
8633 # solved as of 2012-10-02 (http://bugs.python.org/issue4709).
8634
043b6510
JB
8635 case "$gdb_host" in
8636 irix*) if test "${GCC}" = yes; then
8637 CPPFLAGS="$CPPFLAGS -Dsiginfo=__siginfo"
8638 fi
8639 ;;
c83393b9
JB
8640 mingw64)
8641 if test "${GCC}" = yes; then
8642 CPPFLAGS="$CPPFLAGS -DMS_WIN64"
8643 fi
8644 ;;
043b6510 8645 esac
a8db4212
YPK
8646
8647 # Note that "python -m threading" cannot be used to check for
8648 # threading support due to a bug in Python 2.7.3
8649 # (http://bugs.python.org/issue15567).
8650 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether python supports threads" >&5
8651$as_echo_n "checking whether python supports threads... " >&6; }
8652 saved_CPPFLAGS="${CPPFLAGS}"
8653 CPPFLAGS="${PYTHON_CPPFLAGS}"
8654 # Note that the test is reversed so that python_has_threads=yes on
8655 # unexpected failures.
8656 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8657/* end confdefs.h. */
8658
8659#include <Python.h>
8660#ifdef WITH_THREAD
8661# error
8662#endif
8663
8664_ACEOF
8665if ac_fn_c_try_cpp "$LINENO"; then :
8666 python_has_threads=no
8667else
8668 python_has_threads=yes
8669fi
8670rm -f conftest.err conftest.$ac_ext
8671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_has_threads}" >&5
8672$as_echo "${python_has_threads}" >&6; }
8673 CPPFLAGS="${saved_CPPFLAGS}"
81ecdfbb
RW
8674else
8675 # Even if Python support is not compiled in, we need to have these files
88a1906b
DE
8676 # included.
8677 CONFIG_OBS="$CONFIG_OBS python.o py-value.o py-prettyprint.o py-auto-load.o"
8678 CONFIG_SRCS="$CONFIG_SRCS python/python.c python/py-value.c \
8679 python/py-prettyprint.c python/py-auto-load.c"
a9322a30 8680fi
9a156167 8681
9a156167 8682
ac534cba
JB
8683
8684
d344e670
DE
8685# --------------------- #
8686# Check for libmcheck. #
8687# --------------------- #
8688
a8db4212
YPK
8689# Enable -lmcheck by default (it provides cheap-enough memory mangling),
8690# but turn it off if Python is enabled with threads, since -lmcheck is
8691# not thread safe (http://sourceware.org/bugzilla/show_bug.cgi?id=9939),
8692# and for releases.
17ef446e
PA
8693if test \( "${have_libpython}" = "no" -o "${python_has_threads}" = "no" \) \
8694 && $development; then
8695 libmcheck_default=yes
8696else
8697 libmcheck_default=no
a8db4212
YPK
8698fi
8699
17ef446e
PA
8700 # Check whether --enable-libmcheck was given.
8701if test "${enable_libmcheck+set}" = set; then :
8702 enableval=$enable_libmcheck; case "${enableval}" in
8703 yes | y) ENABLE_LIBMCHECK="yes" ;;
8704 no | n) ENABLE_LIBMCHECK="no" ;;
8705 *) as_fn_error "bad value ${enableval} for --enable-libmcheck" "$LINENO" 5 ;;
8706 esac
8707fi
8708
8709
8710 if test -z "${ENABLE_LIBMCHECK}"; then
8711 ENABLE_LIBMCHECK=${libmcheck_default}
a8db4212 8712 fi
17ef446e
PA
8713
8714 if test "$ENABLE_LIBMCHECK" = "yes" ; then
8715 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lmcheck" >&5
a8db4212
YPK
8716$as_echo_n "checking for main in -lmcheck... " >&6; }
8717if test "${ac_cv_lib_mcheck_main+set}" = set; then :
8718 $as_echo_n "(cached) " >&6
8719else
8720 ac_check_lib_save_LIBS=$LIBS
8721LIBS="-lmcheck $LIBS"
8722cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8723/* end confdefs.h. */
8724
8725
8726int
8727main ()
8728{
8729return main ();
8730 ;
8731 return 0;
8732}
8733_ACEOF
8734if ac_fn_c_try_link "$LINENO"; then :
8735 ac_cv_lib_mcheck_main=yes
8736else
8737 ac_cv_lib_mcheck_main=no
8738fi
8739rm -f core conftest.err conftest.$ac_objext \
8740 conftest$ac_exeext conftest.$ac_ext
8741LIBS=$ac_check_lib_save_LIBS
8742fi
8743{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mcheck_main" >&5
8744$as_echo "$ac_cv_lib_mcheck_main" >&6; }
8745if test "x$ac_cv_lib_mcheck_main" = x""yes; then :
8746 cat >>confdefs.h <<_ACEOF
8747#define HAVE_LIBMCHECK 1
8748_ACEOF
8749
8750 LIBS="-lmcheck $LIBS"
8751
8752fi
8753
17ef446e
PA
8754 fi
8755
8756
8757if test "$ENABLE_LIBMCHECK" = "yes" \
8758 -a "${have_libpython}" != "no" \
8759 -a "${python_has_threads}" = "yes" ; then
8760 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&5
8761$as_echo "$as_me: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&2;}
a8db4212
YPK
8762fi
8763
81ecdfbb
RW
8764# ------------------------- #
8765# Checks for header files. #
8766# ------------------------- #
c890192f 8767
81ecdfbb
RW
8768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
8769$as_echo_n "checking for ANSI C header files... " >&6; }
8770if test "${ac_cv_header_stdc+set}" = set; then :
8771 $as_echo_n "(cached) " >&6
bec39cab 8772else
81ecdfbb 8773 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8774/* end confdefs.h. */
81ecdfbb
RW
8775#include <stdlib.h>
8776#include <stdarg.h>
8777#include <string.h>
8778#include <float.h>
8779
a9322a30
TT
8780int
8781main ()
8782{
a9322a30
TT
8783
8784 ;
8785 return 0;
8786}
bec39cab 8787_ACEOF
81ecdfbb
RW
8788if ac_fn_c_try_compile "$LINENO"; then :
8789 ac_cv_header_stdc=yes
bec39cab 8790else
81ecdfbb 8791 ac_cv_header_stdc=no
a9322a30 8792fi
81ecdfbb 8793rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 8794
81ecdfbb
RW
8795if test $ac_cv_header_stdc = yes; then
8796 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8797 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8798/* end confdefs.h. */
8799#include <string.h>
bec39cab 8800
81ecdfbb
RW
8801_ACEOF
8802if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8803 $EGREP "memchr" >/dev/null 2>&1; then :
bec39cab 8804
bec39cab 8805else
81ecdfbb
RW
8806 ac_cv_header_stdc=no
8807fi
8808rm -f conftest*
8809
8810fi
8811
8812if test $ac_cv_header_stdc = yes; then
8813 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8814 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8815/* end confdefs.h. */
8816#include <stdlib.h>
8817
bec39cab 8818_ACEOF
81ecdfbb
RW
8819if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8820 $EGREP "free" >/dev/null 2>&1; then :
06825bd1 8821
81ecdfbb
RW
8822else
8823 ac_cv_header_stdc=no
8824fi
8825rm -f conftest*
bec39cab 8826
bec39cab 8827fi
81ecdfbb
RW
8828
8829if test $ac_cv_header_stdc = yes; then
8830 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8831 if test "$cross_compiling" = yes; then :
8832 :
bec39cab 8833else
81ecdfbb 8834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8835/* end confdefs.h. */
81ecdfbb
RW
8836#include <ctype.h>
8837#include <stdlib.h>
8838#if ((' ' & 0x0FF) == 0x020)
8839# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8840# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8841#else
8842# define ISLOWER(c) \
8843 (('a' <= (c) && (c) <= 'i') \
8844 || ('j' <= (c) && (c) <= 'r') \
8845 || ('s' <= (c) && (c) <= 'z'))
8846# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
8847#endif
8848
8849#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
a9322a30
TT
8850int
8851main ()
8852{
81ecdfbb
RW
8853 int i;
8854 for (i = 0; i < 256; i++)
8855 if (XOR (islower (i), ISLOWER (i))
8856 || toupper (i) != TOUPPER (i))
8857 return 2;
a9322a30
TT
8858 return 0;
8859}
bec39cab 8860_ACEOF
81ecdfbb
RW
8861if ac_fn_c_try_run "$LINENO"; then :
8862
bec39cab 8863else
81ecdfbb
RW
8864 ac_cv_header_stdc=no
8865fi
8866rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8867 conftest.$ac_objext conftest.beam conftest.$ac_ext
8868fi
bec39cab 8869
bec39cab 8870fi
a9322a30 8871fi
81ecdfbb
RW
8872{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
8873$as_echo "$ac_cv_header_stdc" >&6; }
8874if test $ac_cv_header_stdc = yes; then
bec39cab 8875
81ecdfbb 8876$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5ee754fc 8877
81ecdfbb 8878fi
bec39cab 8879
81ecdfbb 8880# elf_hp.h is for HP/UX 64-bit shared library support.
9467110b 8881for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
161d1bec 8882 thread_db.h \
0080a2f6 8883 sys/fault.h \
81ecdfbb
RW
8884 sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
8885 sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
8886 sys/reg.h sys/debugreg.h sys/select.h sys/syscall.h \
9467110b 8887 termios.h termio.h \
3447c057 8888 sgtty.h elf_hp.h \
9467110b 8889 dlfcn.h
81ecdfbb
RW
8890do :
8891 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8892ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
8893eval as_val=\$$as_ac_Header
8894 if test "x$as_val" = x""yes; then :
bec39cab 8895 cat >>confdefs.h <<_ACEOF
81ecdfbb 8896#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 8897_ACEOF
c906108c 8898
bec39cab 8899fi
81ecdfbb
RW
8900
8901done
8902
81ecdfbb
RW
8903for ac_header in sys/proc.h
8904do :
8905 ac_fn_c_check_header_compile "$LINENO" "sys/proc.h" "ac_cv_header_sys_proc_h" "#if HAVE_SYS_PARAM_H
8906# include <sys/param.h>
8907#endif
c906108c 8908
81ecdfbb
RW
8909"
8910if test "x$ac_cv_header_sys_proc_h" = x""yes; then :
bec39cab 8911 cat >>confdefs.h <<_ACEOF
81ecdfbb 8912#define HAVE_SYS_PROC_H 1
bec39cab 8913_ACEOF
5ee754fc 8914
bec39cab 8915fi
81ecdfbb
RW
8916
8917done
8918
8919for ac_header in sys/user.h
8920do :
8921 ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
8922# include <sys/param.h>
a9322a30
TT
8923#endif
8924
81ecdfbb
RW
8925"
8926if test "x$ac_cv_header_sys_user_h" = x""yes; then :
8927 cat >>confdefs.h <<_ACEOF
8928#define HAVE_SYS_USER_H 1
bec39cab 8929_ACEOF
bec39cab 8930
a9322a30 8931fi
bec39cab 8932
81ecdfbb 8933done
5ee754fc 8934
5ee754fc 8935
81ecdfbb
RW
8936# On Solaris 2.[789], we need to define _MSE_INT_H to avoid a clash
8937# between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
8938# think that we don't have <curses.h> if we're using GCC.
8939case $host_os in
8940 solaris2.[789])
8941 if test "$GCC" = yes; then
8942
8943$as_echo "#define _MSE_INT_H 1" >>confdefs.h
8944
8945 fi ;;
8946esac
8947for ac_header in curses.h cursesX.h ncurses.h ncurses/ncurses.h ncurses/term.h
8948do :
8949 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8950ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
8951eval as_val=\$$as_ac_Header
8952 if test "x$as_val" = x""yes; then :
bec39cab 8953 cat >>confdefs.h <<_ACEOF
81ecdfbb 8954#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 8955_ACEOF
5ee754fc
MK
8956
8957fi
8958
81ecdfbb 8959done
bec39cab 8960
81ecdfbb
RW
8961for ac_header in term.h
8962do :
8963 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
8964# include <curses.h>
8965#endif
bec39cab 8966
81ecdfbb
RW
8967"
8968if test "x$ac_cv_header_term_h" = x""yes; then :
8969 cat >>confdefs.h <<_ACEOF
8970#define HAVE_TERM_H 1
a8111142 8971_ACEOF
a8111142 8972
a8111142 8973fi
a8111142 8974
81ecdfbb 8975done
a8111142
TT
8976
8977
81ecdfbb
RW
8978# ------------------------- #
8979# Checks for declarations. #
8980# ------------------------- #
a9322a30 8981
81ecdfbb
RW
8982ac_fn_c_check_decl "$LINENO" "free" "ac_cv_have_decl_free" "$ac_includes_default"
8983if test "x$ac_cv_have_decl_free" = x""yes; then :
8984 ac_have_decl=1
bec39cab 8985else
81ecdfbb
RW
8986 ac_have_decl=0
8987fi
8988
8989cat >>confdefs.h <<_ACEOF
8990#define HAVE_DECL_FREE $ac_have_decl
bec39cab 8991_ACEOF
81ecdfbb
RW
8992ac_fn_c_check_decl "$LINENO" "malloc" "ac_cv_have_decl_malloc" "$ac_includes_default"
8993if test "x$ac_cv_have_decl_malloc" = x""yes; then :
8994 ac_have_decl=1
8995else
8996 ac_have_decl=0
8997fi
8998
8999cat >>confdefs.h <<_ACEOF
9000#define HAVE_DECL_MALLOC $ac_have_decl
bec39cab 9001_ACEOF
81ecdfbb
RW
9002ac_fn_c_check_decl "$LINENO" "realloc" "ac_cv_have_decl_realloc" "$ac_includes_default"
9003if test "x$ac_cv_have_decl_realloc" = x""yes; then :
9004 ac_have_decl=1
bec39cab 9005else
81ecdfbb
RW
9006 ac_have_decl=0
9007fi
bec39cab 9008
81ecdfbb
RW
9009cat >>confdefs.h <<_ACEOF
9010#define HAVE_DECL_REALLOC $ac_have_decl
bec39cab 9011_ACEOF
81ecdfbb
RW
9012ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
9013if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
9014 ac_have_decl=1
9015else
9016 ac_have_decl=0
5ee754fc 9017fi
81ecdfbb
RW
9018
9019cat >>confdefs.h <<_ACEOF
9020#define HAVE_DECL_SNPRINTF $ac_have_decl
a9322a30 9021_ACEOF
5ee754fc 9022
5ee754fc 9023
81ecdfbb
RW
9024 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
9025$as_echo_n "checking for LC_MESSAGES... " >&6; }
9026if test "${am_cv_val_LC_MESSAGES+set}" = set; then :
9027 $as_echo_n "(cached) " >&6
bec39cab 9028else
81ecdfbb 9029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9030/* end confdefs.h. */
81ecdfbb 9031#include <locale.h>
a9322a30
TT
9032int
9033main ()
9034{
81ecdfbb 9035return LC_MESSAGES
a9322a30
TT
9036 ;
9037 return 0;
9038}
bec39cab 9039_ACEOF
81ecdfbb
RW
9040if ac_fn_c_try_link "$LINENO"; then :
9041 am_cv_val_LC_MESSAGES=yes
bec39cab 9042else
81ecdfbb
RW
9043 am_cv_val_LC_MESSAGES=no
9044fi
9045rm -f core conftest.err conftest.$ac_objext \
9046 conftest$ac_exeext conftest.$ac_ext
9047fi
9048{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
9049$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
9050 if test $am_cv_val_LC_MESSAGES = yes; then
bec39cab 9051
81ecdfbb
RW
9052$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
9053
9054 fi
9055
9056
9057# ----------------------- #
9058# Checks for structures. #
9059# ----------------------- #
9060
9061ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
9062if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
9063
9064cat >>confdefs.h <<_ACEOF
9065#define HAVE_STRUCT_STAT_ST_BLOCKS 1
7eb368b3 9066_ACEOF
7eb368b3 9067
81ecdfbb 9068
7eb368b3 9069fi
81ecdfbb
RW
9070ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
9071if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
7eb368b3 9072
a9322a30
TT
9073cat >>confdefs.h <<_ACEOF
9074#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
7eb368b3
NR
9075_ACEOF
9076
a9322a30 9077
7eb368b3
NR
9078fi
9079
7eb368b3 9080
a9322a30
TT
9081# ------------------ #
9082# Checks for types. #
9083# ------------------ #
7eb368b3 9084
81ecdfbb
RW
9085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
9086$as_echo_n "checking return type of signal handlers... " >&6; }
9087if test "${ac_cv_type_signal+set}" = set; then :
9088 $as_echo_n "(cached) " >&6
bec39cab 9089else
81ecdfbb 9090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9091/* end confdefs.h. */
a9322a30
TT
9092#include <sys/types.h>
9093#include <signal.h>
7cb9022a 9094
a9322a30
TT
9095int
9096main ()
9097{
81ecdfbb 9098return *(signal (0, 0)) (0) == 1;
a9322a30
TT
9099 ;
9100 return 0;
9101}
bec39cab 9102_ACEOF
81ecdfbb
RW
9103if ac_fn_c_try_compile "$LINENO"; then :
9104 ac_cv_type_signal=int
bec39cab 9105else
81ecdfbb 9106 ac_cv_type_signal=void
bec39cab 9107fi
81ecdfbb 9108rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 9109fi
81ecdfbb
RW
9110{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
9111$as_echo "$ac_cv_type_signal" >&6; }
bec39cab 9112
a9322a30
TT
9113cat >>confdefs.h <<_ACEOF
9114#define RETSIGTYPE $ac_cv_type_signal
9115_ACEOF
5ee754fc 9116
bec39cab 9117
81ecdfbb 9118ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
a9322a30
TT
9119#include <sys/socket.h>
9120
81ecdfbb
RW
9121"
9122if test "x$ac_cv_type_socklen_t" = x""yes; then :
bec39cab 9123
a9322a30
TT
9124cat >>confdefs.h <<_ACEOF
9125#define HAVE_SOCKLEN_T 1
9126_ACEOF
9127
9128
9129fi
9130
9131
9132# ------------------------------------- #
9133# Checks for compiler characteristics. #
9134# ------------------------------------- #
9135
81ecdfbb
RW
9136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
9137$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
9138if test "${ac_cv_c_const+set}" = set; then :
9139 $as_echo_n "(cached) " >&6
a9322a30 9140else
81ecdfbb 9141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9142/* end confdefs.h. */
a9322a30
TT
9143
9144int
9145main ()
9146{
9147/* FIXME: Include the comments suggested by Paul. */
9148#ifndef __cplusplus
9149 /* Ultrix mips cc rejects this. */
9150 typedef int charset[2];
81ecdfbb 9151 const charset cs;
a9322a30 9152 /* SunOS 4.1.1 cc rejects this. */
81ecdfbb
RW
9153 char const *const *pcpcc;
9154 char **ppc;
a9322a30
TT
9155 /* NEC SVR4.0.2 mips cc rejects this. */
9156 struct point {int x, y;};
9157 static struct point const zero = {0,0};
9158 /* AIX XL C 1.02.0.0 rejects this.
9159 It does not let you subtract one const X* pointer from another in
9160 an arm of an if-expression whose if-part is not a constant
9161 expression */
9162 const char *g = "string";
81ecdfbb 9163 pcpcc = &g + (g ? g-g : 0);
a9322a30 9164 /* HPUX 7.0 cc rejects these. */
81ecdfbb
RW
9165 ++pcpcc;
9166 ppc = (char**) pcpcc;
9167 pcpcc = (char const *const *) ppc;
a9322a30
TT
9168 { /* SCO 3.2v4 cc rejects this. */
9169 char *t;
9170 char const *s = 0 ? (char *) 0 : (char const *) 0;
9171
9172 *t++ = 0;
81ecdfbb 9173 if (s) return 0;
a9322a30
TT
9174 }
9175 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
9176 int x[] = {25, 17};
9177 const int *foo = &x[0];
9178 ++foo;
9179 }
9180 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
9181 typedef const int *iptr;
9182 iptr p = 0;
9183 ++p;
9184 }
9185 { /* AIX XL C 1.02.0.0 rejects this saying
9186 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
9187 struct s { int j; const int *ap[3]; };
9188 struct s *b; b->j = 5;
9189 }
9190 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
9191 const int foo = 10;
81ecdfbb 9192 if (!foo) return 0;
a9322a30 9193 }
81ecdfbb 9194 return !cs[0] && !zero.x;
a9322a30
TT
9195#endif
9196
9197 ;
9198 return 0;
9199}
bec39cab 9200_ACEOF
81ecdfbb 9201if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 9202 ac_cv_c_const=yes
5ee754fc 9203else
81ecdfbb 9204 ac_cv_c_const=no
5ee754fc 9205fi
81ecdfbb 9206rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 9207fi
81ecdfbb
RW
9208{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
9209$as_echo "$ac_cv_c_const" >&6; }
a9322a30 9210if test $ac_cv_c_const = no; then
bec39cab 9211
81ecdfbb 9212$as_echo "#define const /**/" >>confdefs.h
bec39cab 9213
5ee754fc 9214fi
bec39cab 9215
81ecdfbb
RW
9216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
9217$as_echo_n "checking for inline... " >&6; }
9218if test "${ac_cv_c_inline+set}" = set; then :
9219 $as_echo_n "(cached) " >&6
bec39cab 9220else
a9322a30
TT
9221 ac_cv_c_inline=no
9222for ac_kw in inline __inline__ __inline; do
81ecdfbb 9223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9224/* end confdefs.h. */
a9322a30
TT
9225#ifndef __cplusplus
9226typedef int foo_t;
9227static $ac_kw foo_t static_foo () {return 0; }
9228$ac_kw foo_t foo () {return 0; }
9229#endif
9230
bec39cab 9231_ACEOF
81ecdfbb
RW
9232if ac_fn_c_try_compile "$LINENO"; then :
9233 ac_cv_c_inline=$ac_kw
bec39cab 9234fi
81ecdfbb
RW
9235rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9236 test "$ac_cv_c_inline" != no && break
a9322a30 9237done
bec39cab 9238
5ee754fc 9239fi
81ecdfbb
RW
9240{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
9241$as_echo "$ac_cv_c_inline" >&6; }
5ee754fc 9242
a9322a30
TT
9243case $ac_cv_c_inline in
9244 inline | yes) ;;
9245 *)
9246 case $ac_cv_c_inline in
9247 no) ac_val=;;
9248 *) ac_val=$ac_cv_c_inline;;
9249 esac
9250 cat >>confdefs.h <<_ACEOF
9251#ifndef __cplusplus
9252#define inline $ac_val
9253#endif
9254_ACEOF
bec39cab
AC
9255 ;;
9256esac
bec39cab 9257
81ecdfbb
RW
9258 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
9259$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
9260if test "${ac_cv_c_bigendian+set}" = set; then :
9261 $as_echo_n "(cached) " >&6
bec39cab 9262else
81ecdfbb
RW
9263 ac_cv_c_bigendian=unknown
9264 # See if we're dealing with a universal compiler.
9265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9266/* end confdefs.h. */
9267#ifndef __APPLE_CC__
9268 not a universal capable compiler
9269 #endif
9270 typedef int dummy;
9271
9272_ACEOF
9273if ac_fn_c_try_compile "$LINENO"; then :
9274
9275 # Check for potential -arch flags. It is not universal unless
9276 # there are at least two -arch flags with different values.
9277 ac_arch=
9278 ac_prev=
9279 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
9280 if test -n "$ac_prev"; then
9281 case $ac_word in
9282 i?86 | x86_64 | ppc | ppc64)
9283 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
9284 ac_arch=$ac_word
9285 else
9286 ac_cv_c_bigendian=universal
9287 break
9288 fi
9289 ;;
9290 esac
9291 ac_prev=
9292 elif test "x$ac_word" = "x-arch"; then
9293 ac_prev=arch
9294 fi
9295 done
9296fi
9297rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9298 if test $ac_cv_c_bigendian = unknown; then
9299 # See if sys/param.h defines the BYTE_ORDER macro.
9300 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9301/* end confdefs.h. */
a9322a30 9302#include <sys/types.h>
81ecdfbb 9303 #include <sys/param.h>
a9322a30
TT
9304
9305int
9306main ()
9307{
81ecdfbb
RW
9308#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
9309 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
9310 && LITTLE_ENDIAN)
9311 bogus endian macros
9312 #endif
a9322a30
TT
9313
9314 ;
9315 return 0;
9316}
bec39cab 9317_ACEOF
81ecdfbb 9318if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 9319 # It does; now see whether it defined to BIG_ENDIAN or not.
81ecdfbb 9320 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9321/* end confdefs.h. */
a9322a30 9322#include <sys/types.h>
81ecdfbb 9323 #include <sys/param.h>
a9322a30
TT
9324
9325int
9326main ()
9327{
9328#if BYTE_ORDER != BIG_ENDIAN
81ecdfbb
RW
9329 not big endian
9330 #endif
a9322a30
TT
9331
9332 ;
9333 return 0;
9334}
bec39cab 9335_ACEOF
81ecdfbb 9336if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 9337 ac_cv_c_bigendian=yes
5ee754fc 9338else
81ecdfbb 9339 ac_cv_c_bigendian=no
5ee754fc 9340fi
81ecdfbb
RW
9341rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9342fi
9343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9344 fi
9345 if test $ac_cv_c_bigendian = unknown; then
9346 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
9347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9348/* end confdefs.h. */
9349#include <limits.h>
bec39cab 9350
81ecdfbb
RW
9351int
9352main ()
9353{
9354#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
9355 bogus endian macros
9356 #endif
9357
9358 ;
9359 return 0;
9360}
7eb368b3 9361_ACEOF
81ecdfbb
RW
9362if ac_fn_c_try_compile "$LINENO"; then :
9363 # It does; now see whether it defined to _BIG_ENDIAN or not.
9364 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7eb368b3 9365/* end confdefs.h. */
81ecdfbb
RW
9366#include <limits.h>
9367
7eb368b3
NR
9368int
9369main ()
9370{
81ecdfbb
RW
9371#ifndef _BIG_ENDIAN
9372 not big endian
9373 #endif
9374
7eb368b3
NR
9375 ;
9376 return 0;
9377}
9378_ACEOF
81ecdfbb 9379if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 9380 ac_cv_c_bigendian=yes
81ecdfbb
RW
9381else
9382 ac_cv_c_bigendian=no
a9322a30 9383fi
81ecdfbb 9384rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30 9385fi
81ecdfbb
RW
9386rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9387 fi
9388 if test $ac_cv_c_bigendian = unknown; then
9389 # Compile a test program.
9390 if test "$cross_compiling" = yes; then :
9391 # Try to guess by grepping values from an object file.
9392 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9393/* end confdefs.h. */
9394short int ascii_mm[] =
9395 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
9396 short int ascii_ii[] =
9397 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
9398 int use_ascii (int i) {
9399 return ascii_mm[i] + ascii_ii[i];
9400 }
9401 short int ebcdic_ii[] =
9402 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
9403 short int ebcdic_mm[] =
9404 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
9405 int use_ebcdic (int i) {
9406 return ebcdic_mm[i] + ebcdic_ii[i];
9407 }
9408 extern int foo;
7eb368b3 9409
81ecdfbb
RW
9410int
9411main ()
9412{
9413return use_ascii (foo) == use_ebcdic (foo);
9414 ;
9415 return 0;
9416}
9417_ACEOF
9418if ac_fn_c_try_compile "$LINENO"; then :
9419 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
9420 ac_cv_c_bigendian=yes
9421 fi
9422 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
9423 if test "$ac_cv_c_bigendian" = unknown; then
9424 ac_cv_c_bigendian=no
9425 else
9426 # finding both strings is unlikely to happen, but who knows?
9427 ac_cv_c_bigendian=unknown
9428 fi
9429 fi
7eb368b3 9430fi
81ecdfbb 9431rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 9432else
81ecdfbb 9433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9434/* end confdefs.h. */
81ecdfbb 9435$ac_includes_default
d3ea6809
MM
9436int
9437main ()
9438{
81ecdfbb
RW
9439
9440 /* Are we little or big endian? From Harbison&Steele. */
9441 union
9442 {
9443 long int l;
9444 char c[sizeof (long int)];
9445 } u;
9446 u.l = 1;
9447 return u.c[sizeof (long int) - 1] == 1;
9448
9449 ;
9450 return 0;
d3ea6809
MM
9451}
9452_ACEOF
81ecdfbb 9453if ac_fn_c_try_run "$LINENO"; then :
a9322a30 9454 ac_cv_c_bigendian=no
d3ea6809 9455else
81ecdfbb 9456 ac_cv_c_bigendian=yes
d3ea6809 9457fi
81ecdfbb
RW
9458rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9459 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 9460fi
a9322a30 9461
81ecdfbb
RW
9462 fi
9463fi
9464{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
9465$as_echo "$ac_cv_c_bigendian" >&6; }
9466 case $ac_cv_c_bigendian in #(
9467 yes)
9468 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
9469;; #(
9470 no)
9471 ;; #(
9472 universal)
9473
9474$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
9475
9476 ;; #(
9477 *)
9478 as_fn_error "unknown endianness
9479 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
9480 esac
d3ea6809
MM
9481
9482
a9322a30
TT
9483# ------------------------------ #
9484# Checks for library functions. #
9485# ------------------------------ #
d3ea6809 9486
a9322a30
TT
9487# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
9488# for constant arguments. Useless!
81ecdfbb
RW
9489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
9490$as_echo_n "checking for working alloca.h... " >&6; }
9491if test "${ac_cv_working_alloca_h+set}" = set; then :
9492 $as_echo_n "(cached) " >&6
d3ea6809 9493else
81ecdfbb 9494 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d3ea6809 9495/* end confdefs.h. */
a9322a30 9496#include <alloca.h>
bec39cab
AC
9497int
9498main ()
9499{
a9322a30 9500char *p = (char *) alloca (2 * sizeof (int));
81ecdfbb 9501 if (p) return 0;
bec39cab
AC
9502 ;
9503 return 0;
9504}
9505_ACEOF
81ecdfbb 9506if ac_fn_c_try_link "$LINENO"; then :
a9322a30 9507 ac_cv_working_alloca_h=yes
bec39cab 9508else
81ecdfbb 9509 ac_cv_working_alloca_h=no
bec39cab 9510fi
81ecdfbb
RW
9511rm -f core conftest.err conftest.$ac_objext \
9512 conftest$ac_exeext conftest.$ac_ext
bec39cab 9513fi
81ecdfbb
RW
9514{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
9515$as_echo "$ac_cv_working_alloca_h" >&6; }
a9322a30
TT
9516if test $ac_cv_working_alloca_h = yes; then
9517
81ecdfbb 9518$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
c906108c 9519
c906108c 9520fi
bec39cab 9521
81ecdfbb
RW
9522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
9523$as_echo_n "checking for alloca... " >&6; }
9524if test "${ac_cv_func_alloca_works+set}" = set; then :
9525 $as_echo_n "(cached) " >&6
bec39cab 9526else
81ecdfbb 9527 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9528/* end confdefs.h. */
a9322a30
TT
9529#ifdef __GNUC__
9530# define alloca __builtin_alloca
b4e70030 9531#else
a9322a30
TT
9532# ifdef _MSC_VER
9533# include <malloc.h>
9534# define alloca _alloca
9535# else
81ecdfbb 9536# ifdef HAVE_ALLOCA_H
a9322a30
TT
9537# include <alloca.h>
9538# else
9539# ifdef _AIX
9540 #pragma alloca
9541# else
9542# ifndef alloca /* predefined by HP cc +Olibcalls */
9543char *alloca ();
9544# endif
9545# endif
9546# endif
9547# endif
c906108c 9548#endif
97bf5e38 9549
bec39cab
AC
9550int
9551main ()
9552{
a9322a30 9553char *p = (char *) alloca (1);
81ecdfbb 9554 if (p) return 0;
bec39cab
AC
9555 ;
9556 return 0;
9557}
9558_ACEOF
81ecdfbb 9559if ac_fn_c_try_link "$LINENO"; then :
a9322a30 9560 ac_cv_func_alloca_works=yes
bec39cab 9561else
81ecdfbb 9562 ac_cv_func_alloca_works=no
bec39cab 9563fi
81ecdfbb
RW
9564rm -f core conftest.err conftest.$ac_objext \
9565 conftest$ac_exeext conftest.$ac_ext
bec39cab 9566fi
81ecdfbb
RW
9567{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
9568$as_echo "$ac_cv_func_alloca_works" >&6; }
a9322a30
TT
9569
9570if test $ac_cv_func_alloca_works = yes; then
9571
81ecdfbb 9572$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
c906108c 9573
a9322a30
TT
9574else
9575 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
9576# that cause trouble. Some versions do not even contain alloca or
9577# contain a buggy version. If you still want to use their alloca,
9578# use ar to extract alloca.o from them instead of compiling alloca.c.
9579
81ecdfbb 9580ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
a9322a30 9581
81ecdfbb 9582$as_echo "#define C_ALLOCA 1" >>confdefs.h
c906108c 9583
bec39cab 9584
81ecdfbb
RW
9585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
9586$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
9587if test "${ac_cv_os_cray+set}" = set; then :
9588 $as_echo_n "(cached) " >&6
a9322a30 9589else
81ecdfbb 9590 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30 9591/* end confdefs.h. */
81ecdfbb 9592#if defined CRAY && ! defined CRAY2
a9322a30
TT
9593webecray
9594#else
9595wenotbecray
9596#endif
9597
9598_ACEOF
9599if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb 9600 $EGREP "webecray" >/dev/null 2>&1; then :
a9322a30
TT
9601 ac_cv_os_cray=yes
9602else
81ecdfbb 9603 ac_cv_os_cray=no
bec39cab 9604fi
81ecdfbb
RW
9605rm -f conftest*
9606
bec39cab 9607fi
81ecdfbb
RW
9608{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
9609$as_echo "$ac_cv_os_cray" >&6; }
9610if test $ac_cv_os_cray = yes; then
9611 for ac_func in _getb67 GETB67 getb67; do
9612 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9613ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9614eval as_val=\$$as_ac_var
9615 if test "x$as_val" = x""yes; then :
a9322a30
TT
9616
9617cat >>confdefs.h <<_ACEOF
9618#define CRAY_STACKSEG_END $ac_func
bec39cab 9619_ACEOF
c906108c 9620
a9322a30 9621 break
c906108c
SS
9622fi
9623
a9322a30
TT
9624 done
9625fi
bec39cab 9626
81ecdfbb
RW
9627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
9628$as_echo_n "checking stack direction for C alloca... " >&6; }
9629if test "${ac_cv_c_stack_direction+set}" = set; then :
9630 $as_echo_n "(cached) " >&6
a9322a30 9631else
81ecdfbb 9632 if test "$cross_compiling" = yes; then :
a9322a30 9633 ac_cv_c_stack_direction=0
bec39cab 9634else
81ecdfbb 9635 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9636/* end confdefs.h. */
81ecdfbb 9637$ac_includes_default
a9322a30
TT
9638int
9639find_stack_direction ()
b4e70030 9640{
a9322a30
TT
9641 static char *addr = 0;
9642 auto char dummy;
9643 if (addr == 0)
9644 {
9645 addr = &dummy;
9646 return find_stack_direction ();
9647 }
9648 else
9649 return (&dummy > addr) ? 1 : -1;
b4e70030 9650}
b757528f 9651
bec39cab
AC
9652int
9653main ()
9654{
81ecdfbb 9655 return find_stack_direction () < 0;
bec39cab
AC
9656}
9657_ACEOF
81ecdfbb 9658if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
9659 ac_cv_c_stack_direction=1
9660else
81ecdfbb 9661 ac_cv_c_stack_direction=-1
a9322a30 9662fi
81ecdfbb
RW
9663rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9664 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 9665fi
a9322a30 9666
81ecdfbb
RW
9667fi
9668{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
9669$as_echo "$ac_cv_c_stack_direction" >&6; }
a9322a30
TT
9670cat >>confdefs.h <<_ACEOF
9671#define STACK_DIRECTION $ac_cv_c_stack_direction
9672_ACEOF
9673
9674
9675fi
9676
a9322a30 9677for ac_header in stdlib.h unistd.h
81ecdfbb
RW
9678do :
9679 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9680ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9681eval as_val=\$$as_ac_Header
9682 if test "x$as_val" = x""yes; then :
bec39cab 9683 cat >>confdefs.h <<_ACEOF
81ecdfbb 9684#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 9685_ACEOF
b757528f 9686
b757528f 9687fi
bec39cab 9688
a9322a30 9689done
a3828db0 9690
a9322a30 9691for ac_func in getpagesize
81ecdfbb
RW
9692do :
9693 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
9694if test "x$ac_cv_func_getpagesize" = x""yes; then :
bec39cab 9695 cat >>confdefs.h <<_ACEOF
81ecdfbb 9696#define HAVE_GETPAGESIZE 1
bec39cab 9697_ACEOF
bcb3dc3d 9698
bcb3dc3d
MK
9699fi
9700done
9701
81ecdfbb
RW
9702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
9703$as_echo_n "checking for working mmap... " >&6; }
9704if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then :
9705 $as_echo_n "(cached) " >&6
a9322a30 9706else
81ecdfbb 9707 if test "$cross_compiling" = yes; then :
a9322a30 9708 ac_cv_func_mmap_fixed_mapped=no
bec39cab 9709else
81ecdfbb 9710 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9711/* end confdefs.h. */
a9322a30
TT
9712$ac_includes_default
9713/* malloc might have been renamed as rpl_malloc. */
9714#undef malloc
bec39cab 9715
a9322a30
TT
9716/* Thanks to Mike Haertel and Jim Avera for this test.
9717 Here is a matrix of mmap possibilities:
9718 mmap private not fixed
9719 mmap private fixed at somewhere currently unmapped
9720 mmap private fixed at somewhere already mapped
9721 mmap shared not fixed
9722 mmap shared fixed at somewhere currently unmapped
9723 mmap shared fixed at somewhere already mapped
9724 For private mappings, we should verify that changes cannot be read()
9725 back from the file, nor mmap's back from the file at a different
9726 address. (There have been systems where private was not correctly
9727 implemented like the infamous i386 svr4.0, and systems where the
9728 VM page cache was not coherent with the file system buffer cache
9729 like early versions of FreeBSD and possibly contemporary NetBSD.)
9730 For shared mappings, we should conversely verify that changes get
9731 propagated back to all the places they're supposed to be.
bec39cab 9732
a9322a30
TT
9733 Grep wants private fixed already mapped.
9734 The main things grep needs to know about mmap are:
9735 * does it exist and is it safe to write into the mmap'd area
9736 * how to use it (BSD variants) */
8b9cf735 9737
a9322a30
TT
9738#include <fcntl.h>
9739#include <sys/mman.h>
8b9cf735 9740
81ecdfbb 9741#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
a9322a30 9742char *malloc ();
a3828db0
MK
9743#endif
9744
a9322a30 9745/* This mess was copied from the GNU getpagesize.h. */
81ecdfbb 9746#ifndef HAVE_GETPAGESIZE
a9322a30 9747/* Assume that all systems that can run configure have sys/param.h. */
81ecdfbb 9748# ifndef HAVE_SYS_PARAM_H
a9322a30
TT
9749# define HAVE_SYS_PARAM_H 1
9750# endif
9751
9752# ifdef _SC_PAGESIZE
9753# define getpagesize() sysconf(_SC_PAGESIZE)
9754# else /* no _SC_PAGESIZE */
81ecdfbb 9755# ifdef HAVE_SYS_PARAM_H
a9322a30
TT
9756# include <sys/param.h>
9757# ifdef EXEC_PAGESIZE
9758# define getpagesize() EXEC_PAGESIZE
9759# else /* no EXEC_PAGESIZE */
9760# ifdef NBPG
9761# define getpagesize() NBPG * CLSIZE
9762# ifndef CLSIZE
9763# define CLSIZE 1
9764# endif /* no CLSIZE */
9765# else /* no NBPG */
9766# ifdef NBPC
9767# define getpagesize() NBPC
9768# else /* no NBPC */
9769# ifdef PAGESIZE
9770# define getpagesize() PAGESIZE
9771# endif /* PAGESIZE */
9772# endif /* no NBPC */
9773# endif /* no NBPG */
9774# endif /* no EXEC_PAGESIZE */
9775# else /* no HAVE_SYS_PARAM_H */
9776# define getpagesize() 8192 /* punt totally */
9777# endif /* no HAVE_SYS_PARAM_H */
9778# endif /* no _SC_PAGESIZE */
9779
9780#endif /* no HAVE_GETPAGESIZE */
9781
bec39cab
AC
9782int
9783main ()
9784{
a9322a30
TT
9785 char *data, *data2, *data3;
9786 int i, pagesize;
9787 int fd;
9788
9789 pagesize = getpagesize ();
9790
9791 /* First, make a file with some known garbage in it. */
9792 data = (char *) malloc (pagesize);
9793 if (!data)
81ecdfbb 9794 return 1;
a9322a30
TT
9795 for (i = 0; i < pagesize; ++i)
9796 *(data + i) = rand ();
9797 umask (0);
9798 fd = creat ("conftest.mmap", 0600);
9799 if (fd < 0)
81ecdfbb 9800 return 1;
a9322a30 9801 if (write (fd, data, pagesize) != pagesize)
81ecdfbb 9802 return 1;
a9322a30
TT
9803 close (fd);
9804
9805 /* Next, try to mmap the file at a fixed address which already has
9806 something else allocated at it. If we can, also make sure that
9807 we see the same garbage. */
9808 fd = open ("conftest.mmap", O_RDWR);
9809 if (fd < 0)
81ecdfbb 9810 return 1;
a9322a30
TT
9811 data2 = (char *) malloc (2 * pagesize);
9812 if (!data2)
81ecdfbb
RW
9813 return 1;
9814 data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
a9322a30
TT
9815 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
9816 MAP_PRIVATE | MAP_FIXED, fd, 0L))
81ecdfbb 9817 return 1;
a9322a30
TT
9818 for (i = 0; i < pagesize; ++i)
9819 if (*(data + i) != *(data2 + i))
81ecdfbb 9820 return 1;
a9322a30
TT
9821
9822 /* Finally, make sure that changes to the mapped area do not
9823 percolate back to the file as seen by read(). (This is a bug on
9824 some variants of i386 svr4.0.) */
9825 for (i = 0; i < pagesize; ++i)
9826 *(data2 + i) = *(data2 + i) + 1;
9827 data3 = (char *) malloc (pagesize);
9828 if (!data3)
81ecdfbb 9829 return 1;
a9322a30 9830 if (read (fd, data3, pagesize) != pagesize)
81ecdfbb 9831 return 1;
a9322a30
TT
9832 for (i = 0; i < pagesize; ++i)
9833 if (*(data + i) != *(data3 + i))
81ecdfbb 9834 return 1;
a9322a30 9835 close (fd);
81ecdfbb 9836 return 0;
bec39cab
AC
9837}
9838_ACEOF
81ecdfbb 9839if ac_fn_c_try_run "$LINENO"; then :
a9322a30 9840 ac_cv_func_mmap_fixed_mapped=yes
086ec9eb 9841else
81ecdfbb 9842 ac_cv_func_mmap_fixed_mapped=no
a3828db0 9843fi
81ecdfbb
RW
9844rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9845 conftest.$ac_objext conftest.beam conftest.$ac_ext
a3828db0 9846fi
81ecdfbb 9847
a9322a30 9848fi
81ecdfbb
RW
9849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
9850$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
a9322a30
TT
9851if test $ac_cv_func_mmap_fixed_mapped = yes; then
9852
81ecdfbb 9853$as_echo "#define HAVE_MMAP 1" >>confdefs.h
a3828db0 9854
086ec9eb 9855fi
a9322a30 9856rm -f conftest.mmap
a3828db0 9857
81ecdfbb
RW
9858ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
9859if test "x$ac_cv_type_pid_t" = x""yes; then :
bec39cab 9860
a9322a30
TT
9861else
9862
9863cat >>confdefs.h <<_ACEOF
9864#define pid_t int
bec39cab 9865_ACEOF
086ec9eb
MK
9866
9867fi
9868
81ecdfbb
RW
9869for ac_header in vfork.h
9870do :
9871 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
9872if test "x$ac_cv_header_vfork_h" = x""yes; then :
a3828db0 9873 cat >>confdefs.h <<_ACEOF
81ecdfbb 9874#define HAVE_VFORK_H 1
bec39cab 9875_ACEOF
c906108c
SS
9876
9877fi
a9322a30 9878
a3828db0 9879done
c906108c 9880
a9322a30 9881for ac_func in fork vfork
81ecdfbb
RW
9882do :
9883 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9884ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9885eval as_val=\$$as_ac_var
9886 if test "x$as_val" = x""yes; then :
a3828db0 9887 cat >>confdefs.h <<_ACEOF
81ecdfbb 9888#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 9889_ACEOF
b83266a0 9890
97bf5e38 9891fi
a3828db0 9892done
b83266a0 9893
a9322a30 9894if test "x$ac_cv_func_fork" = xyes; then
81ecdfbb
RW
9895 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
9896$as_echo_n "checking for working fork... " >&6; }
9897if test "${ac_cv_func_fork_works+set}" = set; then :
9898 $as_echo_n "(cached) " >&6
a9322a30 9899else
81ecdfbb 9900 if test "$cross_compiling" = yes; then :
a9322a30
TT
9901 ac_cv_func_fork_works=cross
9902else
81ecdfbb
RW
9903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9904/* end confdefs.h. */
9905$ac_includes_default
9906int
9907main ()
9908{
9909
9910 /* By Ruediger Kuhlmann. */
9911 return fork () < 0;
9912
9913 ;
9914 return 0;
9915}
a9322a30 9916_ACEOF
81ecdfbb 9917if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
9918 ac_cv_func_fork_works=yes
9919else
81ecdfbb 9920 ac_cv_func_fork_works=no
a9322a30 9921fi
81ecdfbb
RW
9922rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9923 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 9924fi
81ecdfbb 9925
a9322a30 9926fi
81ecdfbb
RW
9927{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
9928$as_echo "$ac_cv_func_fork_works" >&6; }
a9322a30
TT
9929
9930else
9931 ac_cv_func_fork_works=$ac_cv_func_fork
9932fi
9933if test "x$ac_cv_func_fork_works" = xcross; then
9934 case $host in
9935 *-*-amigaos* | *-*-msdosdjgpp*)
9936 # Override, as these systems have only a dummy fork() stub
9937 ac_cv_func_fork_works=no
9938 ;;
9939 *)
9940 ac_cv_func_fork_works=yes
9941 ;;
9942 esac
81ecdfbb
RW
9943 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
9944$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
a9322a30
TT
9945fi
9946ac_cv_func_vfork_works=$ac_cv_func_vfork
9947if test "x$ac_cv_func_vfork" = xyes; then
81ecdfbb
RW
9948 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
9949$as_echo_n "checking for working vfork... " >&6; }
9950if test "${ac_cv_func_vfork_works+set}" = set; then :
9951 $as_echo_n "(cached) " >&6
a9322a30 9952else
81ecdfbb 9953 if test "$cross_compiling" = yes; then :
a9322a30
TT
9954 ac_cv_func_vfork_works=cross
9955else
81ecdfbb 9956 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30
TT
9957/* end confdefs.h. */
9958/* Thanks to Paul Eggert for this test. */
81ecdfbb 9959$ac_includes_default
a9322a30 9960#include <sys/wait.h>
81ecdfbb 9961#ifdef HAVE_VFORK_H
a9322a30
TT
9962# include <vfork.h>
9963#endif
9964/* On some sparc systems, changes by the child to local and incoming
9965 argument registers are propagated back to the parent. The compiler
9966 is told about this with #include <vfork.h>, but some compilers
9967 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
9968 static variable whose address is put into a register that is
9969 clobbered by the vfork. */
9970static void
9971#ifdef __cplusplus
9972sparc_address_test (int arg)
9973# else
9974sparc_address_test (arg) int arg;
9975#endif
9976{
9977 static pid_t child;
9978 if (!child) {
9979 child = vfork ();
9980 if (child < 0) {
9981 perror ("vfork");
9982 _exit(2);
9983 }
9984 if (!child) {
9985 arg = getpid();
9986 write(-1, "", 0);
9987 _exit (arg);
9988 }
9989 }
9990}
9991
9992int
9993main ()
9994{
9995 pid_t parent = getpid ();
9996 pid_t child;
9997
9998 sparc_address_test (0);
9999
10000 child = vfork ();
10001
10002 if (child == 0) {
10003 /* Here is another test for sparc vfork register problems. This
10004 test uses lots of local variables, at least as many local
10005 variables as main has allocated so far including compiler
10006 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
10007 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
10008 reuse the register of parent for one of the local variables,
10009 since it will think that parent can't possibly be used any more
10010 in this routine. Assigning to the local variable will thus
10011 munge parent in the parent process. */
10012 pid_t
10013 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
10014 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
10015 /* Convince the compiler that p..p7 are live; otherwise, it might
10016 use the same hardware register for all 8 local variables. */
10017 if (p != p1 || p != p2 || p != p3 || p != p4
10018 || p != p5 || p != p6 || p != p7)
10019 _exit(1);
10020
10021 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
10022 from child file descriptors. If the child closes a descriptor
10023 before it execs or exits, this munges the parent's descriptor
10024 as well. Test for this by closing stdout in the child. */
10025 _exit(close(fileno(stdout)) != 0);
10026 } else {
10027 int status;
10028 struct stat st;
10029
10030 while (wait(&status) != child)
10031 ;
81ecdfbb 10032 return (
a9322a30
TT
10033 /* Was there some problem with vforking? */
10034 child < 0
10035
10036 /* Did the child fail? (This shouldn't happen.) */
10037 || status
10038
10039 /* Did the vfork/compiler bug occur? */
10040 || parent != getpid()
10041
10042 /* Did the file descriptor bug occur? */
10043 || fstat(fileno(stdout), &st) != 0
10044 );
10045 }
10046}
10047_ACEOF
81ecdfbb 10048if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
10049 ac_cv_func_vfork_works=yes
10050else
81ecdfbb 10051 ac_cv_func_vfork_works=no
a9322a30 10052fi
81ecdfbb
RW
10053rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10054 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 10055fi
81ecdfbb 10056
a9322a30 10057fi
81ecdfbb
RW
10058{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
10059$as_echo "$ac_cv_func_vfork_works" >&6; }
a9322a30
TT
10060
10061fi;
10062if test "x$ac_cv_func_fork_works" = xcross; then
10063 ac_cv_func_vfork_works=$ac_cv_func_vfork
81ecdfbb
RW
10064 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
10065$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
a9322a30
TT
10066fi
10067
10068if test "x$ac_cv_func_vfork_works" = xyes; then
10069
81ecdfbb 10070$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
a9322a30
TT
10071
10072else
10073
81ecdfbb 10074$as_echo "#define vfork fork" >>confdefs.h
a9322a30
TT
10075
10076fi
10077if test "x$ac_cv_func_fork_works" = xyes; then
10078
81ecdfbb 10079$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
a9322a30
TT
10080
10081fi
10082
7313baad 10083for ac_func in canonicalize_file_name realpath getrusage getuid getgid \
b9e7b9c3 10084 pipe poll pread pread64 pwrite readlink resize_term \
7313baad 10085 sbrk setpgid setpgrp setsid \
9467110b 10086 sigaction sigprocmask sigsetmask socketpair \
110ed339 10087 ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
614c279d 10088 setrlimit getrlimit posix_madvise waitpid lstat \
9467110b 10089 ptrace64
81ecdfbb
RW
10090do :
10091 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10092ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10093eval as_val=\$$as_ac_var
10094 if test "x$as_val" = x""yes; then :
6c7a06a3 10095 cat >>confdefs.h <<_ACEOF
81ecdfbb 10096#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6c7a06a3
TT
10097_ACEOF
10098
10099fi
10100done
10101
10102
81ecdfbb
RW
10103 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
10104$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
10105if test "${am_cv_langinfo_codeset+set}" = set; then :
10106 $as_echo_n "(cached) " >&6
6c7a06a3 10107else
81ecdfbb 10108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
10109/* end confdefs.h. */
10110#include <langinfo.h>
10111int
10112main ()
10113{
10114char* cs = nl_langinfo(CODESET);
bec39cab
AC
10115 ;
10116 return 0;
10117}
10118_ACEOF
81ecdfbb 10119if ac_fn_c_try_link "$LINENO"; then :
6c7a06a3 10120 am_cv_langinfo_codeset=yes
a4db0f07 10121else
81ecdfbb 10122 am_cv_langinfo_codeset=no
a4db0f07 10123fi
81ecdfbb
RW
10124rm -f core conftest.err conftest.$ac_objext \
10125 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 10126
a4db0f07 10127fi
81ecdfbb
RW
10128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
10129$as_echo "$am_cv_langinfo_codeset" >&6; }
6c7a06a3
TT
10130 if test $am_cv_langinfo_codeset = yes; then
10131
81ecdfbb 10132$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
a4db0f07 10133
6c7a06a3 10134 fi
c906108c 10135
06825bd1 10136
3266f10b
TT
10137 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
10138$as_echo_n "checking for ANSI C header files... " >&6; }
10139if test "${ac_cv_header_stdc+set}" = set; then :
10140 $as_echo_n "(cached) " >&6
10141else
10142 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10143/* end confdefs.h. */
10144#include <stdlib.h>
10145#include <stdarg.h>
10146#include <string.h>
10147#include <float.h>
10148
10149int
10150main ()
10151{
10152
10153 ;
10154 return 0;
10155}
10156_ACEOF
10157if ac_fn_c_try_compile "$LINENO"; then :
10158 ac_cv_header_stdc=yes
10159else
10160 ac_cv_header_stdc=no
10161fi
10162rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10163
10164if test $ac_cv_header_stdc = yes; then
10165 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10166 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10167/* end confdefs.h. */
10168#include <string.h>
10169
10170_ACEOF
10171if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10172 $EGREP "memchr" >/dev/null 2>&1; then :
10173
10174else
10175 ac_cv_header_stdc=no
10176fi
10177rm -f conftest*
10178
10179fi
10180
10181if test $ac_cv_header_stdc = yes; then
10182 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10184/* end confdefs.h. */
10185#include <stdlib.h>
10186
10187_ACEOF
10188if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10189 $EGREP "free" >/dev/null 2>&1; then :
10190
10191else
10192 ac_cv_header_stdc=no
10193fi
10194rm -f conftest*
10195
10196fi
10197
10198if test $ac_cv_header_stdc = yes; then
10199 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10200 if test "$cross_compiling" = yes; then :
10201 :
10202else
10203 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10204/* end confdefs.h. */
10205#include <ctype.h>
10206#include <stdlib.h>
10207#if ((' ' & 0x0FF) == 0x020)
10208# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10209# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10210#else
10211# define ISLOWER(c) \
10212 (('a' <= (c) && (c) <= 'i') \
10213 || ('j' <= (c) && (c) <= 'r') \
10214 || ('s' <= (c) && (c) <= 'z'))
10215# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10216#endif
10217
10218#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10219int
10220main ()
10221{
10222 int i;
10223 for (i = 0; i < 256; i++)
10224 if (XOR (islower (i), ISLOWER (i))
10225 || toupper (i) != TOUPPER (i))
10226 return 2;
10227 return 0;
10228}
10229_ACEOF
10230if ac_fn_c_try_run "$LINENO"; then :
10231
10232else
10233 ac_cv_header_stdc=no
10234fi
10235rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10236 conftest.$ac_objext conftest.beam conftest.$ac_ext
10237fi
10238
10239fi
10240fi
10241{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
10242$as_echo "$ac_cv_header_stdc" >&6; }
10243if test $ac_cv_header_stdc = yes; then
10244
10245$as_echo "#define STDC_HEADERS 1" >>confdefs.h
10246
3266f10b
TT
10247fi
10248
10249 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
10250# for constant arguments. Useless!
10251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
10252$as_echo_n "checking for working alloca.h... " >&6; }
10253if test "${ac_cv_working_alloca_h+set}" = set; then :
10254 $as_echo_n "(cached) " >&6
10255else
10256 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10257/* end confdefs.h. */
10258#include <alloca.h>
10259int
10260main ()
10261{
10262char *p = (char *) alloca (2 * sizeof (int));
10263 if (p) return 0;
10264 ;
10265 return 0;
10266}
10267_ACEOF
10268if ac_fn_c_try_link "$LINENO"; then :
10269 ac_cv_working_alloca_h=yes
10270else
10271 ac_cv_working_alloca_h=no
10272fi
10273rm -f core conftest.err conftest.$ac_objext \
10274 conftest$ac_exeext conftest.$ac_ext
10275fi
10276{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
10277$as_echo "$ac_cv_working_alloca_h" >&6; }
10278if test $ac_cv_working_alloca_h = yes; then
10279
10280$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
10281
10282fi
10283
10284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
10285$as_echo_n "checking for alloca... " >&6; }
10286if test "${ac_cv_func_alloca_works+set}" = set; then :
10287 $as_echo_n "(cached) " >&6
10288else
10289 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10290/* end confdefs.h. */
10291#ifdef __GNUC__
10292# define alloca __builtin_alloca
10293#else
10294# ifdef _MSC_VER
10295# include <malloc.h>
10296# define alloca _alloca
10297# else
10298# ifdef HAVE_ALLOCA_H
10299# include <alloca.h>
10300# else
10301# ifdef _AIX
10302 #pragma alloca
10303# else
10304# ifndef alloca /* predefined by HP cc +Olibcalls */
10305char *alloca ();
10306# endif
10307# endif
10308# endif
10309# endif
10310#endif
10311
10312int
10313main ()
10314{
10315char *p = (char *) alloca (1);
10316 if (p) return 0;
10317 ;
10318 return 0;
10319}
10320_ACEOF
10321if ac_fn_c_try_link "$LINENO"; then :
10322 ac_cv_func_alloca_works=yes
10323else
10324 ac_cv_func_alloca_works=no
10325fi
10326rm -f core conftest.err conftest.$ac_objext \
10327 conftest$ac_exeext conftest.$ac_ext
10328fi
10329{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
10330$as_echo "$ac_cv_func_alloca_works" >&6; }
10331
10332if test $ac_cv_func_alloca_works = yes; then
10333
10334$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
10335
10336else
10337 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
10338# that cause trouble. Some versions do not even contain alloca or
10339# contain a buggy version. If you still want to use their alloca,
10340# use ar to extract alloca.o from them instead of compiling alloca.c.
10341
10342ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
10343
10344$as_echo "#define C_ALLOCA 1" >>confdefs.h
10345
10346
10347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
10348$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
10349if test "${ac_cv_os_cray+set}" = set; then :
10350 $as_echo_n "(cached) " >&6
10351else
10352 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10353/* end confdefs.h. */
10354#if defined CRAY && ! defined CRAY2
10355webecray
10356#else
10357wenotbecray
10358#endif
10359
10360_ACEOF
10361if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10362 $EGREP "webecray" >/dev/null 2>&1; then :
10363 ac_cv_os_cray=yes
10364else
10365 ac_cv_os_cray=no
10366fi
10367rm -f conftest*
10368
10369fi
10370{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
10371$as_echo "$ac_cv_os_cray" >&6; }
10372if test $ac_cv_os_cray = yes; then
10373 for ac_func in _getb67 GETB67 getb67; do
10374 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10375ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10376eval as_val=\$$as_ac_var
10377 if test "x$as_val" = x""yes; then :
10378
10379cat >>confdefs.h <<_ACEOF
10380#define CRAY_STACKSEG_END $ac_func
10381_ACEOF
10382
10383 break
10384fi
10385
10386 done
10387fi
10388
10389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
10390$as_echo_n "checking stack direction for C alloca... " >&6; }
10391if test "${ac_cv_c_stack_direction+set}" = set; then :
10392 $as_echo_n "(cached) " >&6
10393else
10394 if test "$cross_compiling" = yes; then :
10395 ac_cv_c_stack_direction=0
10396else
10397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10398/* end confdefs.h. */
10399$ac_includes_default
10400int
10401find_stack_direction ()
10402{
10403 static char *addr = 0;
10404 auto char dummy;
10405 if (addr == 0)
10406 {
10407 addr = &dummy;
10408 return find_stack_direction ();
10409 }
10410 else
10411 return (&dummy > addr) ? 1 : -1;
10412}
10413
10414int
10415main ()
10416{
10417 return find_stack_direction () < 0;
10418}
10419_ACEOF
10420if ac_fn_c_try_run "$LINENO"; then :
10421 ac_cv_c_stack_direction=1
10422else
10423 ac_cv_c_stack_direction=-1
10424fi
10425rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10426 conftest.$ac_objext conftest.beam conftest.$ac_ext
10427fi
10428
10429fi
10430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
10431$as_echo "$ac_cv_c_stack_direction" >&6; }
10432cat >>confdefs.h <<_ACEOF
10433#define STACK_DIRECTION $ac_cv_c_stack_direction
10434_ACEOF
10435
10436
10437fi
10438
10439
10440
10441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
10442$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
10443if test "${am_cv_langinfo_codeset+set}" = set; then :
10444 $as_echo_n "(cached) " >&6
10445else
10446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10447/* end confdefs.h. */
10448#include <langinfo.h>
10449int
10450main ()
10451{
10452char* cs = nl_langinfo(CODESET);
10453 ;
10454 return 0;
10455}
10456_ACEOF
10457if ac_fn_c_try_link "$LINENO"; then :
10458 am_cv_langinfo_codeset=yes
10459else
10460 am_cv_langinfo_codeset=no
10461fi
10462rm -f core conftest.err conftest.$ac_objext \
10463 conftest$ac_exeext conftest.$ac_ext
10464
10465fi
10466{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
10467$as_echo "$am_cv_langinfo_codeset" >&6; }
10468 if test $am_cv_langinfo_codeset = yes; then
10469
10470$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
10471
10472 fi
10473
10474
a3d08894 10475 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
10476do :
10477 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10478ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
10479eval as_val=\$$as_ac_Header
10480 if test "x$as_val" = x""yes; then :
10481 cat >>confdefs.h <<_ACEOF
10482#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10483_ACEOF
10484
10485fi
10486
10487done
10488
10489
10490 for ac_func in fdwalk getrlimit pipe pipe2 socketpair
10491do :
10492 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10493ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10494eval as_val=\$$as_ac_var
10495 if test "x$as_val" = x""yes; then :
10496 cat >>confdefs.h <<_ACEOF
10497#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10498_ACEOF
10499
10500fi
10501done
10502
10503
10504 ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default"
10505if test "x$ac_cv_have_decl_strerror" = x""yes; then :
10506 ac_have_decl=1
10507else
10508 ac_have_decl=0
10509fi
10510
10511cat >>confdefs.h <<_ACEOF
10512#define HAVE_DECL_STRERROR $ac_have_decl
10513_ACEOF
10514ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
10515if test "x$ac_cv_have_decl_strstr" = x""yes; then :
10516 ac_have_decl=1
10517else
10518 ac_have_decl=0
10519fi
10520
10521cat >>confdefs.h <<_ACEOF
10522#define HAVE_DECL_STRSTR $ac_have_decl
10523_ACEOF
10524
10525
10526
a3828db0
MK
10527# Check the return and argument types of ptrace. No canned test for
10528# this, so roll our own.
10529gdb_ptrace_headers='
4ff70b84 10530#include <sys/types.h>
a3828db0
MK
10531#if HAVE_SYS_PTRACE_H
10532# include <sys/ptrace.h>
10533#endif
10534#if HAVE_UNISTD_H
10535# include <unistd.h>
10536#endif
10537'
10538# There is no point in checking if we don't have a prototype.
81ecdfbb
RW
10539ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers
10540"
10541if test "x$ac_cv_have_decl_ptrace" = x""yes; then :
10542 ac_have_decl=1
06825bd1 10543else
81ecdfbb 10544 ac_have_decl=0
06825bd1 10545fi
06825bd1 10546
a3828db0 10547cat >>confdefs.h <<_ACEOF
81ecdfbb 10548#define HAVE_DECL_PTRACE $ac_have_decl
a3828db0 10549_ACEOF
81ecdfbb 10550if test $ac_have_decl = 1; then :
bec39cab 10551
a3828db0 10552else
a3828db0
MK
10553
10554 : ${gdb_cv_func_ptrace_ret='int'}
10555 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
10556
06825bd1
MK
10557fi
10558
064ef605
DJ
10559# Check return type. Varargs (used on GNU/Linux) conflict with the
10560# empty argument list, so check for that explicitly.
81ecdfbb
RW
10561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
10562$as_echo_n "checking return type of ptrace... " >&6; }
10563if test "${gdb_cv_func_ptrace_ret+set}" = set; then :
10564 $as_echo_n "(cached) " >&6
bec39cab 10565else
81ecdfbb 10566 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10567/* end confdefs.h. */
a3828db0 10568$gdb_ptrace_headers
bec39cab
AC
10569int
10570main ()
10571{
064ef605
DJ
10572extern long ptrace (enum __ptrace_request, ...);
10573 ;
10574 return 0;
10575}
10576_ACEOF
81ecdfbb 10577if ac_fn_c_try_compile "$LINENO"; then :
064ef605
DJ
10578 gdb_cv_func_ptrace_ret='long'
10579else
81ecdfbb 10580 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
10581/* end confdefs.h. */
10582$gdb_ptrace_headers
10583int
10584main ()
10585{
a3828db0 10586extern int ptrace ();
bec39cab
AC
10587 ;
10588 return 0;
10589}
10590_ACEOF
81ecdfbb 10591if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10592 gdb_cv_func_ptrace_ret='int'
70f9f479 10593else
81ecdfbb 10594 gdb_cv_func_ptrace_ret='long'
70f9f479 10595fi
81ecdfbb 10596rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
70f9f479 10597fi
81ecdfbb 10598rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
064ef605 10599fi
81ecdfbb
RW
10600{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
10601$as_echo "$gdb_cv_func_ptrace_ret" >&6; }
bec39cab 10602
a3828db0
MK
10603cat >>confdefs.h <<_ACEOF
10604#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
bec39cab 10605_ACEOF
70f9f479 10606
a3828db0 10607# Check argument types.
81ecdfbb
RW
10608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
10609$as_echo_n "checking types of arguments for ptrace... " >&6; }
10610if test "${gdb_cv_func_ptrace_args+set}" = set; then :
10611 $as_echo_n "(cached) " >&6
bec39cab 10612else
a3828db0 10613
81ecdfbb 10614 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
10615/* end confdefs.h. */
10616$gdb_ptrace_headers
10617int
10618main ()
10619{
10620extern long ptrace (enum __ptrace_request, ...);
10621 ;
10622 return 0;
10623}
10624_ACEOF
81ecdfbb 10625if ac_fn_c_try_compile "$LINENO"; then :
064ef605
DJ
10626 gdb_cv_func_ptrace_args='int,int,long,long'
10627else
064ef605 10628
a3828db0
MK
10629for gdb_arg1 in 'int' 'long'; do
10630 for gdb_arg2 in 'pid_t' 'int' 'long'; do
5ed10e6e 10631 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
96d7229d 10632 for gdb_arg4 in 'int' 'long' 'void *'; do
81ecdfbb 10633 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10634/* end confdefs.h. */
a3828db0 10635$gdb_ptrace_headers
bec39cab
AC
10636int
10637main ()
10638{
a3828db0
MK
10639
10640extern $gdb_cv_func_ptrace_ret
10641 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
10642
bec39cab
AC
10643 ;
10644 return 0;
10645}
10646_ACEOF
81ecdfbb 10647if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
10648 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
10649 break 4;
5c7f2947 10650fi
81ecdfbb 10651rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0 10652 for gdb_arg5 in 'int *' 'int' 'long'; do
81ecdfbb 10653 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10654/* end confdefs.h. */
a3828db0 10655$gdb_ptrace_headers
bec39cab
AC
10656int
10657main ()
10658{
a3828db0
MK
10659
10660extern $gdb_cv_func_ptrace_ret
10661 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
10662
bec39cab
AC
10663 ;
10664 return 0;
10665}
10666_ACEOF
81ecdfbb 10667if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
10668
10669gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
10670 break 5;
78434e59 10671fi
81ecdfbb 10672rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0
MK
10673 done
10674 done
10675 done
10676 done
10677done
10678# Provide a safe default value.
10679: ${gdb_cv_func_ptrace_args='int,int,long,long'}
10680
064ef605 10681fi
81ecdfbb 10682rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
78434e59 10683fi
81ecdfbb
RW
10684{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
10685$as_echo "$gdb_cv_func_ptrace_args" >&6; }
a3828db0
MK
10686ac_save_IFS=$IFS; IFS=','
10687set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
10688IFS=$ac_save_IFS
10689shift
bec39cab 10690
a3828db0
MK
10691cat >>confdefs.h <<_ACEOF
10692#define PTRACE_TYPE_ARG3 $3
10693_ACEOF
10694
96d7229d
LM
10695
10696cat >>confdefs.h <<_ACEOF
10697#define PTRACE_TYPE_ARG4 $4
10698_ACEOF
10699
a3828db0
MK
10700if test -n "$5"; then
10701
10702cat >>confdefs.h <<_ACEOF
10703#define PTRACE_TYPE_ARG5 $5
bec39cab 10704_ACEOF
78434e59
MK
10705
10706fi
10707
a3828db0 10708if test "$cross_compiling" = no; then
81ecdfbb
RW
10709 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
10710$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
10711if test "${ac_cv_func_setpgrp_void+set}" = set; then :
10712 $as_echo_n "(cached) " >&6
a3828db0 10713else
81ecdfbb
RW
10714 if test "$cross_compiling" = yes; then :
10715 as_fn_error "cannot check setpgrp when cross compiling" "$LINENO" 5
bec39cab 10716else
81ecdfbb 10717 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10718/* end confdefs.h. */
81ecdfbb 10719$ac_includes_default
bec39cab
AC
10720int
10721main ()
10722{
a3828db0
MK
10723/* If this system has a BSD-style setpgrp which takes arguments,
10724 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
10725 exit successfully. */
81ecdfbb 10726 return setpgrp (1,1) != -1;
bec39cab
AC
10727 ;
10728 return 0;
10729}
10730_ACEOF
81ecdfbb 10731if ac_fn_c_try_run "$LINENO"; then :
a3828db0 10732 ac_cv_func_setpgrp_void=no
c906108c 10733else
81ecdfbb 10734 ac_cv_func_setpgrp_void=yes
c906108c 10735fi
81ecdfbb
RW
10736rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10737 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 10738fi
81ecdfbb 10739
a3828db0 10740fi
81ecdfbb
RW
10741{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
10742$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0
MK
10743if test $ac_cv_func_setpgrp_void = yes; then
10744
81ecdfbb 10745$as_echo "#define SETPGRP_VOID 1" >>confdefs.h
97bf5e38
MK
10746
10747fi
a3828db0
MK
10748
10749else
81ecdfbb
RW
10750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
10751$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
10752if test "${ac_cv_func_setpgrp_void+set}" = set; then :
10753 $as_echo_n "(cached) " >&6
97bf5e38 10754else
81ecdfbb 10755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10756/* end confdefs.h. */
a3828db0
MK
10757
10758#include <unistd.h>
10759
bec39cab
AC
10760int
10761main ()
10762{
a3828db0
MK
10763
10764 if (setpgrp(1,1) == -1)
10765 exit (0);
10766 else
10767 exit (1);
10768
bec39cab
AC
10769 ;
10770 return 0;
10771}
10772_ACEOF
81ecdfbb 10773if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10774 ac_cv_func_setpgrp_void=no
c906108c 10775else
81ecdfbb 10776 ac_cv_func_setpgrp_void=yes
c906108c 10777fi
81ecdfbb 10778rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 10779fi
81ecdfbb
RW
10780{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
10781$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0 10782if test $ac_cv_func_setpgrp_void = yes; then
81ecdfbb 10783 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
c3f6f71d 10784
a3828db0 10785fi
c906108c
SS
10786fi
10787
a3828db0
MK
10788# Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do
10789# since sigsetjmp might only be defined as a macro.
81ecdfbb
RW
10790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
10791$as_echo_n "checking for sigsetjmp... " >&6; }
10792if test "${gdb_cv_func_sigsetjmp+set}" = set; then :
10793 $as_echo_n "(cached) " >&6
bec39cab 10794else
81ecdfbb 10795 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10796/* end confdefs.h. */
a3828db0
MK
10797
10798#include <setjmp.h>
10799
bec39cab
AC
10800int
10801main ()
10802{
a3828db0 10803sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
bec39cab
AC
10804 ;
10805 return 0;
10806}
10807_ACEOF
81ecdfbb 10808if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10809 gdb_cv_func_sigsetjmp=yes
c906108c 10810else
81ecdfbb 10811 gdb_cv_func_sigsetjmp=no
c906108c 10812fi
81ecdfbb 10813rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 10814fi
81ecdfbb
RW
10815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
10816$as_echo "$gdb_cv_func_sigsetjmp" >&6; }
a3828db0 10817if test $gdb_cv_func_sigsetjmp = yes; then
c906108c 10818
81ecdfbb 10819$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
c906108c 10820
97bf5e38 10821fi
c906108c 10822
a3828db0
MK
10823# Assume we'll default to using the included libiberty regex.
10824gdb_use_included_regex=yes
10825
10826# However, if the system regex is GNU regex, then default to *not*
10827# using the included regex.
81ecdfbb
RW
10828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5
10829$as_echo_n "checking for GNU regex... " >&6; }
10830if test "${gdb_cv_have_gnu_regex+set}" = set; then :
10831 $as_echo_n "(cached) " >&6
bec39cab 10832else
81ecdfbb 10833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10834/* end confdefs.h. */
a3828db0 10835#include <gnu-versions.h>
bec39cab
AC
10836int
10837main ()
10838{
81ecdfbb
RW
10839#define REGEX_INTERFACE_VERSION 1
10840#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
10841# error "Version mismatch"
10842#endif
5c45e068
MK
10843 ;
10844 return 0;
10845}
10846_ACEOF
81ecdfbb
RW
10847if ac_fn_c_try_compile "$LINENO"; then :
10848 gdb_cv_have_gnu_regex=yes
5c45e068 10849else
81ecdfbb
RW
10850 gdb_cv_have_gnu_regex=no
10851fi
10852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10853fi
10854{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
10855$as_echo "$gdb_cv_have_gnu_regex" >&6; }
10856if test $gdb_cv_have_gnu_regex = yes; then
10857 gdb_use_included_regex=no
5c45e068 10858fi
81ecdfbb
RW
10859
10860
10861# Check whether --with-included-regex was given.
10862if test "${with_included_regex+set}" = set; then :
10863 withval=$with_included_regex; gdb_with_regex=$withval
10864else
10865 gdb_with_regex=$gdb_use_included_regex
c906108c 10866fi
81ecdfbb
RW
10867
10868if test "$gdb_with_regex" = yes; then
10869
10870$as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h
10871
c906108c 10872fi
81ecdfbb
RW
10873
10874# Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
10875ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
10876#include <sys/proc.h>
10877
10878"
10879if test "x$ac_cv_member_struct_thread_td_pcb" = x""yes; then :
c906108c 10880
5c45e068 10881cat >>confdefs.h <<_ACEOF
a3828db0 10882#define HAVE_STRUCT_THREAD_TD_PCB 1
bec39cab 10883_ACEOF
c906108c 10884
5c45e068 10885
97bf5e38 10886fi
c906108c 10887
5c45e068 10888
a3828db0 10889# See if <sys/lwp.h> defines `struct lwp`.
81ecdfbb
RW
10890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
10891$as_echo_n "checking for struct lwp... " >&6; }
10892if test "${gdb_cv_struct_lwp+set}" = set; then :
10893 $as_echo_n "(cached) " >&6
bec39cab 10894else
81ecdfbb 10895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10896/* end confdefs.h. */
a3828db0
MK
10897#include <sys/param.h>
10898#include <sys/lwp.h>
bec39cab
AC
10899int
10900main ()
10901{
a3828db0 10902struct lwp l;
bec39cab
AC
10903 ;
10904 return 0;
10905}
10906_ACEOF
81ecdfbb 10907if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10908 gdb_cv_struct_lwp=yes
c906108c 10909else
81ecdfbb 10910 gdb_cv_struct_lwp=no
c906108c 10911fi
81ecdfbb 10912rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 10913fi
81ecdfbb
RW
10914{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
10915$as_echo "$gdb_cv_struct_lwp" >&6; }
a3828db0 10916if test $gdb_cv_struct_lwp = yes; then
c906108c 10917
81ecdfbb 10918$as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
c906108c 10919
97bf5e38 10920fi
c906108c 10921
a3828db0 10922# See if <machine/reg.h> degines `struct reg'.
81ecdfbb
RW
10923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
10924$as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
10925if test "${gdb_cv_struct_reg+set}" = set; then :
10926 $as_echo_n "(cached) " >&6
bec39cab 10927else
81ecdfbb 10928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10929/* end confdefs.h. */
a3828db0
MK
10930#include <sys/types.h>
10931#include <machine/reg.h>
bec39cab
AC
10932int
10933main ()
10934{
a3828db0 10935struct reg r;
bec39cab
AC
10936 ;
10937 return 0;
10938}
10939_ACEOF
81ecdfbb 10940if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10941 gdb_cv_struct_reg=yes
27ca5dad 10942else
81ecdfbb 10943 gdb_cv_struct_reg=no
27ca5dad 10944fi
81ecdfbb 10945rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27ca5dad 10946fi
81ecdfbb
RW
10947{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
10948$as_echo "$gdb_cv_struct_reg" >&6; }
a3828db0 10949if test $gdb_cv_struct_reg = yes; then
bec39cab 10950
81ecdfbb 10951$as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
27ca5dad
MC
10952
10953fi
97bf5e38 10954
a3828db0
MK
10955# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
10956# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
81ecdfbb
RW
10957ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <machine/reg.h>
10958"
10959if test "x$ac_cv_member_struct_reg_r_fs" = x""yes; then :
5c45e068
MK
10960
10961cat >>confdefs.h <<_ACEOF
a3828db0 10962#define HAVE_STRUCT_REG_R_FS 1
bec39cab 10963_ACEOF
3862412b 10964
5c45e068 10965
97bf5e38 10966fi
81ecdfbb
RW
10967ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <machine/reg.h>
10968"
10969if test "x$ac_cv_member_struct_reg_r_gs" = x""yes; then :
5c45e068
MK
10970
10971cat >>confdefs.h <<_ACEOF
a3828db0 10972#define HAVE_STRUCT_REG_R_GS 1
bec39cab 10973_ACEOF
3862412b 10974
5c45e068 10975
97bf5e38 10976fi
3862412b 10977
5c45e068 10978
6fea9e18
L
10979# See if <sys/user.h> supports the %fs_base and %gs_bas amd64 segment registers.
10980# Older amd64 Linux's don't have the fs_base and gs_base members of
10981# `struct user_regs_struct'.
10982ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "fs_base" "ac_cv_member_struct_user_regs_struct_fs_base" "#include <sys/user.h>
10983"
10984if test "x$ac_cv_member_struct_user_regs_struct_fs_base" = x""yes; then :
10985
10986cat >>confdefs.h <<_ACEOF
10987#define HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE 1
10988_ACEOF
10989
10990
10991fi
10992ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "gs_base" "ac_cv_member_struct_user_regs_struct_gs_base" "#include <sys/user.h>
10993"
10994if test "x$ac_cv_member_struct_user_regs_struct_gs_base" = x""yes; then :
10995
10996cat >>confdefs.h <<_ACEOF
10997#define HAVE_STRUCT_USER_REGS_STRUCT_GS_BASE 1
10998_ACEOF
10999
11000
11001fi
11002
11003
a3828db0 11004# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
81ecdfbb
RW
11005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
11006$as_echo_n "checking for PTRACE_GETREGS... " >&6; }
11007if test "${gdb_cv_have_ptrace_getregs+set}" = set; then :
11008 $as_echo_n "(cached) " >&6
451928c5 11009else
81ecdfbb 11010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11011/* end confdefs.h. */
a3828db0 11012#include <sys/ptrace.h>
bec39cab
AC
11013int
11014main ()
11015{
a3828db0 11016PTRACE_GETREGS;
bec39cab
AC
11017 ;
11018 return 0;
11019}
11020_ACEOF
81ecdfbb 11021if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 11022 gdb_cv_have_ptrace_getregs=yes
451928c5 11023else
81ecdfbb 11024 gdb_cv_have_ptrace_getregs=no
451928c5 11025fi
81ecdfbb 11026rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
11027fi
11028
81ecdfbb
RW
11029{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
11030$as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
a3828db0 11031if test $gdb_cv_have_ptrace_getregs = yes; then
60ca704f 11032
81ecdfbb 11033$as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
451928c5 11034
97bf5e38 11035fi
451928c5 11036
a3828db0 11037# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
81ecdfbb
RW
11038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
11039$as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
11040if test "${gdb_cv_have_ptrace_getfpxregs+set}" = set; then :
11041 $as_echo_n "(cached) " >&6
451928c5 11042else
81ecdfbb 11043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11044/* end confdefs.h. */
a3828db0 11045#include <sys/ptrace.h>
bec39cab
AC
11046int
11047main ()
11048{
a3828db0 11049PTRACE_GETFPXREGS;
bec39cab
AC
11050 ;
11051 return 0;
11052}
11053_ACEOF
81ecdfbb 11054if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 11055 gdb_cv_have_ptrace_getfpxregs=yes
451928c5 11056else
81ecdfbb 11057 gdb_cv_have_ptrace_getfpxregs=no
451928c5 11058fi
81ecdfbb 11059rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
11060fi
11061
81ecdfbb
RW
11062{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
11063$as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
a3828db0 11064if test $gdb_cv_have_ptrace_getfpxregs = yes; then
60ca704f 11065
81ecdfbb 11066$as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
451928c5 11067
97bf5e38 11068fi
451928c5 11069
a3828db0 11070# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
81ecdfbb
RW
11071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
11072$as_echo_n "checking for PT_GETDBREGS... " >&6; }
11073if test "${gdb_cv_have_pt_getdbregs+set}" = set; then :
11074 $as_echo_n "(cached) " >&6
3862412b 11075else
81ecdfbb 11076 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11077/* end confdefs.h. */
a3828db0
MK
11078#include <sys/types.h>
11079#include <sys/ptrace.h>
bec39cab
AC
11080int
11081main ()
11082{
a3828db0 11083PT_GETDBREGS;
bec39cab
AC
11084 ;
11085 return 0;
11086}
11087_ACEOF
81ecdfbb 11088if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 11089 gdb_cv_have_pt_getdbregs=yes
3862412b 11090else
81ecdfbb 11091 gdb_cv_have_pt_getdbregs=no
3862412b 11092fi
81ecdfbb 11093rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
11094fi
11095
81ecdfbb
RW
11096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
11097$as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
a3828db0 11098if test $gdb_cv_have_pt_getdbregs = yes; then
60ca704f 11099
81ecdfbb 11100$as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
3862412b 11101
97bf5e38 11102fi
3862412b 11103
a3828db0 11104# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
81ecdfbb
RW
11105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
11106$as_echo_n "checking for PT_GETXMMREGS... " >&6; }
11107if test "${gdb_cv_have_pt_getxmmregs+set}" = set; then :
11108 $as_echo_n "(cached) " >&6
3862412b 11109else
81ecdfbb 11110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11111/* end confdefs.h. */
a3828db0
MK
11112#include <sys/types.h>
11113#include <sys/ptrace.h>
bec39cab
AC
11114int
11115main ()
11116{
a3828db0 11117PT_GETXMMREGS;
bec39cab
AC
11118 ;
11119 return 0;
11120}
11121_ACEOF
81ecdfbb 11122if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 11123 gdb_cv_have_pt_getxmmregs=yes
3862412b 11124else
81ecdfbb 11125 gdb_cv_have_pt_getxmmregs=no
3862412b 11126fi
81ecdfbb 11127rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
11128fi
11129
81ecdfbb
RW
11130{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
11131$as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
a3828db0 11132if test $gdb_cv_have_pt_getxmmregs = yes; then
60ca704f 11133
81ecdfbb 11134$as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
3862412b 11135
97bf5e38 11136fi
3862412b 11137
05b4bd79 11138# Detect which type of /proc is in use, such as for Solaris.
97bf5e38
MK
11139
11140if test "${target}" = "${host}"; then
11141 case "${host}" in
7b00db47 11142 *-*-sysv4.2* | *-*-sysv5* )
60ca704f 11143
81ecdfbb 11144$as_echo "#define NEW_PROC_API 1" >>confdefs.h
97bf5e38
MK
11145
11146 ;;
c162e8c9 11147 *-*-solaris2.[6789] | *-*-solaris2.1[0-9]*)
60ca704f 11148
81ecdfbb 11149$as_echo "#define NEW_PROC_API 1" >>confdefs.h
c960c18f
AC
11150
11151 ;;
11152 mips-sgi-irix5*)
11153 # Work around <sys/proc.h> needing _KMEMUSER problem on IRIX 5.
60ca704f 11154
81ecdfbb 11155$as_echo "#define _KMEMUSER 1" >>confdefs.h
97bf5e38
MK
11156
11157 ;;
11158 esac
11159fi
11160
11161if test "$ac_cv_header_sys_procfs_h" = yes; then
81ecdfbb
RW
11162 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
11163$as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
11164 if test "${bfd_cv_have_sys_procfs_type_gregset_t+set}" = set; then :
11165 $as_echo_n "(cached) " >&6
596c9d4b 11166else
81ecdfbb 11167 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11168/* end confdefs.h. */
596c9d4b
KB
11169
11170#define _SYSCALL32
d30c5336
JK
11171/* Needed for new procfs interface on sparc-solaris. */
11172#define _STRUCTURED_PROC 1
596c9d4b 11173#include <sys/procfs.h>
bec39cab
AC
11174int
11175main ()
11176{
97bf5e38 11177gregset_t avar
bec39cab
AC
11178 ;
11179 return 0;
11180}
11181_ACEOF
81ecdfbb 11182if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11183 bfd_cv_have_sys_procfs_type_gregset_t=yes
596c9d4b 11184else
81ecdfbb 11185 bfd_cv_have_sys_procfs_type_gregset_t=no
bec39cab 11186
596c9d4b 11187fi
81ecdfbb 11188rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
11189fi
11190
97bf5e38 11191 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
bec39cab 11192
81ecdfbb 11193$as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
596c9d4b
KB
11194
11195 fi
81ecdfbb
RW
11196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
11197$as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
451928c5 11198
81ecdfbb
RW
11199 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
11200$as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
11201 if test "${bfd_cv_have_sys_procfs_type_fpregset_t+set}" = set; then :
11202 $as_echo_n "(cached) " >&6
d84dd0c5 11203else
81ecdfbb 11204 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11205/* end confdefs.h. */
97bf5e38
MK
11206
11207#define _SYSCALL32
d30c5336
JK
11208/* Needed for new procfs interface on sparc-solaris. */
11209#define _STRUCTURED_PROC 1
d84dd0c5 11210#include <sys/procfs.h>
bec39cab
AC
11211int
11212main ()
11213{
97bf5e38 11214fpregset_t avar
bec39cab
AC
11215 ;
11216 return 0;
11217}
11218_ACEOF
81ecdfbb 11219if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11220 bfd_cv_have_sys_procfs_type_fpregset_t=yes
d84dd0c5 11221else
81ecdfbb 11222 bfd_cv_have_sys_procfs_type_fpregset_t=no
bec39cab 11223
d84dd0c5 11224fi
81ecdfbb 11225rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d84dd0c5
MK
11226fi
11227
97bf5e38 11228 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
bec39cab 11229
81ecdfbb 11230$as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
d84dd0c5 11231
97bf5e38 11232 fi
81ecdfbb
RW
11233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
11234$as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
d84dd0c5 11235
81ecdfbb
RW
11236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
11237$as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
11238 if test "${bfd_cv_have_sys_procfs_type_prgregset_t+set}" = set; then :
11239 $as_echo_n "(cached) " >&6
c906108c 11240else
81ecdfbb 11241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11242/* end confdefs.h. */
c906108c 11243
97bf5e38 11244#define _SYSCALL32
d30c5336
JK
11245/* Needed for new procfs interface on sparc-solaris. */
11246#define _STRUCTURED_PROC 1
97bf5e38 11247#include <sys/procfs.h>
bec39cab
AC
11248int
11249main ()
11250{
97bf5e38 11251prgregset_t avar
bec39cab
AC
11252 ;
11253 return 0;
11254}
11255_ACEOF
81ecdfbb 11256if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11257 bfd_cv_have_sys_procfs_type_prgregset_t=yes
c906108c 11258else
81ecdfbb 11259 bfd_cv_have_sys_procfs_type_prgregset_t=no
bec39cab 11260
c906108c 11261fi
81ecdfbb 11262rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
11263fi
11264
97bf5e38 11265 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
bec39cab 11266
81ecdfbb 11267$as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
c906108c 11268
97bf5e38 11269 fi
81ecdfbb
RW
11270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
11271$as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
c906108c 11272
81ecdfbb
RW
11273 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
11274$as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
11275 if test "${bfd_cv_have_sys_procfs_type_prfpregset_t+set}" = set; then :
11276 $as_echo_n "(cached) " >&6
d45fe813 11277else
81ecdfbb 11278 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11279/* end confdefs.h. */
97bf5e38
MK
11280
11281#define _SYSCALL32
d30c5336
JK
11282/* Needed for new procfs interface on sparc-solaris. */
11283#define _STRUCTURED_PROC 1
97bf5e38 11284#include <sys/procfs.h>
bec39cab
AC
11285int
11286main ()
11287{
97bf5e38 11288prfpregset_t avar
bec39cab
AC
11289 ;
11290 return 0;
11291}
11292_ACEOF
81ecdfbb 11293if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11294 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
d45fe813 11295else
81ecdfbb 11296 bfd_cv_have_sys_procfs_type_prfpregset_t=no
bec39cab 11297
d45fe813 11298fi
81ecdfbb 11299rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
11300fi
11301
97bf5e38 11302 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
bec39cab 11303
81ecdfbb 11304$as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
d45fe813 11305
97bf5e38 11306 fi
81ecdfbb
RW
11307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
11308$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
d45fe813 11309
81ecdfbb
RW
11310 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
11311$as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
11312 if test "${bfd_cv_have_sys_procfs_type_prgregset32_t+set}" = set; then :
11313 $as_echo_n "(cached) " >&6
d45fe813 11314else
81ecdfbb 11315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11316/* end confdefs.h. */
97bf5e38
MK
11317
11318#define _SYSCALL32
d30c5336
JK
11319/* Needed for new procfs interface on sparc-solaris. */
11320#define _STRUCTURED_PROC 1
97bf5e38 11321#include <sys/procfs.h>
bec39cab
AC
11322int
11323main ()
11324{
97bf5e38 11325prgregset32_t avar
bec39cab
AC
11326 ;
11327 return 0;
11328}
11329_ACEOF
81ecdfbb 11330if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11331 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
d45fe813 11332else
81ecdfbb 11333 bfd_cv_have_sys_procfs_type_prgregset32_t=no
bec39cab 11334
d45fe813 11335fi
81ecdfbb 11336rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
11337fi
11338
97bf5e38 11339 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
bec39cab 11340
81ecdfbb 11341$as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
d45fe813 11342
97bf5e38 11343 fi
81ecdfbb
RW
11344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
11345$as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
d45fe813 11346
81ecdfbb
RW
11347 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
11348$as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
11349 if test "${bfd_cv_have_sys_procfs_type_lwpid_t+set}" = set; then :
11350 $as_echo_n "(cached) " >&6
d45fe813 11351else
81ecdfbb 11352 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11353/* end confdefs.h. */
97bf5e38 11354
d45fe813 11355#define _SYSCALL32
d30c5336
JK
11356/* Needed for new procfs interface on sparc-solaris. */
11357#define _STRUCTURED_PROC 1
97bf5e38 11358#include <sys/procfs.h>
bec39cab
AC
11359int
11360main ()
11361{
97bf5e38 11362lwpid_t avar
bec39cab
AC
11363 ;
11364 return 0;
11365}
11366_ACEOF
81ecdfbb 11367if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11368 bfd_cv_have_sys_procfs_type_lwpid_t=yes
d45fe813 11369else
81ecdfbb 11370 bfd_cv_have_sys_procfs_type_lwpid_t=no
bec39cab 11371
d45fe813 11372fi
81ecdfbb 11373rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
11374fi
11375
97bf5e38 11376 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
bec39cab 11377
81ecdfbb 11378$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
d45fe813 11379
97bf5e38 11380 fi
81ecdfbb
RW
11381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
11382$as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
c906108c 11383
81ecdfbb
RW
11384 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
11385$as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
11386 if test "${bfd_cv_have_sys_procfs_type_psaddr_t+set}" = set; then :
11387 $as_echo_n "(cached) " >&6
c906108c 11388else
81ecdfbb 11389 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11390/* end confdefs.h. */
c906108c 11391
97bf5e38 11392#define _SYSCALL32
d30c5336
JK
11393/* Needed for new procfs interface on sparc-solaris. */
11394#define _STRUCTURED_PROC 1
97bf5e38 11395#include <sys/procfs.h>
bec39cab
AC
11396int
11397main ()
11398{
97bf5e38 11399psaddr_t avar
bec39cab
AC
11400 ;
11401 return 0;
11402}
11403_ACEOF
81ecdfbb 11404if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11405 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c 11406else
81ecdfbb 11407 bfd_cv_have_sys_procfs_type_psaddr_t=no
bec39cab 11408
c906108c 11409fi
81ecdfbb 11410rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
11411fi
11412
97bf5e38 11413 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
bec39cab 11414
81ecdfbb 11415$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
c906108c 11416
97bf5e38 11417 fi
81ecdfbb
RW
11418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
11419$as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
c906108c 11420
81ecdfbb
RW
11421 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prsysent_t in sys/procfs.h" >&5
11422$as_echo_n "checking for prsysent_t in sys/procfs.h... " >&6; }
11423 if test "${bfd_cv_have_sys_procfs_type_prsysent_t+set}" = set; then :
11424 $as_echo_n "(cached) " >&6
c906108c 11425else
81ecdfbb 11426 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11427/* end confdefs.h. */
c906108c 11428
97bf5e38 11429#define _SYSCALL32
d30c5336
JK
11430/* Needed for new procfs interface on sparc-solaris. */
11431#define _STRUCTURED_PROC 1
97bf5e38 11432#include <sys/procfs.h>
bec39cab
AC
11433int
11434main ()
11435{
97bf5e38 11436prsysent_t avar
bec39cab
AC
11437 ;
11438 return 0;
11439}
11440_ACEOF
81ecdfbb 11441if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11442 bfd_cv_have_sys_procfs_type_prsysent_t=yes
c906108c 11443else
81ecdfbb 11444 bfd_cv_have_sys_procfs_type_prsysent_t=no
bec39cab 11445
c906108c 11446fi
81ecdfbb 11447rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
11448fi
11449
97bf5e38 11450 if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
bec39cab 11451
81ecdfbb 11452$as_echo "#define HAVE_PRSYSENT_T 1" >>confdefs.h
c906108c 11453
97bf5e38 11454 fi
81ecdfbb
RW
11455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prsysent_t" >&5
11456$as_echo "$bfd_cv_have_sys_procfs_type_prsysent_t" >&6; }
c906108c 11457
81ecdfbb
RW
11458 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigset_t in sys/procfs.h" >&5
11459$as_echo_n "checking for pr_sigset_t in sys/procfs.h... " >&6; }
11460 if test "${bfd_cv_have_sys_procfs_type_pr_sigset_t+set}" = set; then :
11461 $as_echo_n "(cached) " >&6
c906108c 11462else
81ecdfbb 11463 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11464/* end confdefs.h. */
c906108c 11465
97bf5e38 11466#define _SYSCALL32
d30c5336
JK
11467/* Needed for new procfs interface on sparc-solaris. */
11468#define _STRUCTURED_PROC 1
97bf5e38 11469#include <sys/procfs.h>
bec39cab
AC
11470int
11471main ()
11472{
97bf5e38 11473pr_sigset_t avar
bec39cab
AC
11474 ;
11475 return 0;
11476}
11477_ACEOF
81ecdfbb 11478if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11479 bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
c906108c 11480else
81ecdfbb 11481 bfd_cv_have_sys_procfs_type_pr_sigset_t=no
bec39cab 11482
c906108c 11483fi
81ecdfbb 11484rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
11485fi
11486
97bf5e38 11487 if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
bec39cab 11488
81ecdfbb 11489$as_echo "#define HAVE_PR_SIGSET_T 1" >>confdefs.h
c906108c 11490
97bf5e38 11491 fi
81ecdfbb
RW
11492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigset_t" >&5
11493$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigset_t" >&6; }
c906108c 11494
81ecdfbb
RW
11495 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigaction64_t in sys/procfs.h" >&5
11496$as_echo_n "checking for pr_sigaction64_t in sys/procfs.h... " >&6; }
11497 if test "${bfd_cv_have_sys_procfs_type_pr_sigaction64_t+set}" = set; then :
11498 $as_echo_n "(cached) " >&6
c906108c 11499else
81ecdfbb 11500 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11501/* end confdefs.h. */
c906108c 11502
97bf5e38 11503#define _SYSCALL32
d30c5336
JK
11504/* Needed for new procfs interface on sparc-solaris. */
11505#define _STRUCTURED_PROC 1
97bf5e38 11506#include <sys/procfs.h>
bec39cab
AC
11507int
11508main ()
11509{
97bf5e38 11510pr_sigaction64_t avar
bec39cab
AC
11511 ;
11512 return 0;
11513}
11514_ACEOF
81ecdfbb 11515if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11516 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
c906108c 11517else
81ecdfbb 11518 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
bec39cab 11519
c906108c 11520fi
81ecdfbb 11521rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
11522fi
11523
97bf5e38 11524 if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
bec39cab 11525
81ecdfbb 11526$as_echo "#define HAVE_PR_SIGACTION64_T 1" >>confdefs.h
c906108c 11527
97bf5e38 11528 fi
81ecdfbb
RW
11529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&5
11530$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&6; }
97bf5e38 11531
81ecdfbb
RW
11532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_siginfo64_t in sys/procfs.h" >&5
11533$as_echo_n "checking for pr_siginfo64_t in sys/procfs.h... " >&6; }
11534 if test "${bfd_cv_have_sys_procfs_type_pr_siginfo64_t+set}" = set; then :
11535 $as_echo_n "(cached) " >&6
97bf5e38 11536else
81ecdfbb 11537 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11538/* end confdefs.h. */
97bf5e38
MK
11539
11540#define _SYSCALL32
d30c5336
JK
11541/* Needed for new procfs interface on sparc-solaris. */
11542#define _STRUCTURED_PROC 1
97bf5e38 11543#include <sys/procfs.h>
bec39cab
AC
11544int
11545main ()
11546{
97bf5e38 11547pr_siginfo64_t avar
bec39cab
AC
11548 ;
11549 return 0;
11550}
11551_ACEOF
81ecdfbb 11552if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
11553 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
11554else
81ecdfbb 11555 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
bec39cab 11556
97bf5e38 11557fi
81ecdfbb 11558rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 11559fi
c906108c 11560
97bf5e38 11561 if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
bec39cab 11562
81ecdfbb 11563$as_echo "#define HAVE_PR_SIGINFO64_T 1" >>confdefs.h
c906108c 11564
97bf5e38 11565 fi
81ecdfbb
RW
11566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&5
11567$as_echo "$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&6; }
bec39cab
AC
11568
11569
97bf5e38
MK
11570
11571
11572
97bf5e38 11573 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
81ecdfbb
RW
11574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether prfpregset_t type is broken" >&5
11575$as_echo_n "checking whether prfpregset_t type is broken... " >&6; }
11576 if test "${gdb_cv_prfpregset_t_broken+set}" = set; then :
11577 $as_echo_n "(cached) " >&6
c906108c 11578else
81ecdfbb 11579 if test "$cross_compiling" = yes; then :
97bf5e38 11580 gdb_cv_prfpregset_t_broken=yes
c906108c 11581else
81ecdfbb 11582 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11583/* end confdefs.h. */
97bf5e38
MK
11584#include <sys/procfs.h>
11585 int main ()
11586 {
11587 if (sizeof (prfpregset_t) == sizeof (void *))
11588 return 1;
11589 return 0;
11590 }
bec39cab 11591_ACEOF
81ecdfbb 11592if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 11593 gdb_cv_prfpregset_t_broken=no
81ecdfbb
RW
11594else
11595 gdb_cv_prfpregset_t_broken=yes
c906108c 11596fi
81ecdfbb
RW
11597rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11598 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 11599fi
81ecdfbb 11600
c906108c
SS
11601fi
11602
81ecdfbb
RW
11603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_prfpregset_t_broken" >&5
11604$as_echo "$gdb_cv_prfpregset_t_broken" >&6; }
97bf5e38 11605 if test $gdb_cv_prfpregset_t_broken = yes; then
60ca704f 11606
81ecdfbb 11607$as_echo "#define PRFPREGSET_T_BROKEN 1" >>confdefs.h
c906108c 11608
97bf5e38
MK
11609 fi
11610 fi
c906108c 11611fi
c906108c 11612
bc8bcb4b 11613# Check if the compiler supports the `long long' type.
c906108c 11614
81ecdfbb
RW
11615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
11616$as_echo_n "checking for long long support in compiler... " >&6; }
11617if test "${gdb_cv_c_long_long+set}" = set; then :
11618 $as_echo_n "(cached) " >&6
97bf5e38 11619else
81ecdfbb 11620 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11621/* end confdefs.h. */
bc8bcb4b 11622extern long long foo;
bec39cab
AC
11623int
11624main ()
11625{
bc8bcb4b 11626switch (foo & 2) { case 0: return 1; }
bec39cab
AC
11627 ;
11628 return 0;
11629}
11630_ACEOF
81ecdfbb 11631if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
11632 gdb_cv_c_long_long=yes
11633else
81ecdfbb 11634 gdb_cv_c_long_long=no
97bf5e38 11635fi
81ecdfbb 11636rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 11637fi
81ecdfbb
RW
11638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
11639$as_echo "$gdb_cv_c_long_long" >&6; }
74a0d9f6
JK
11640if test $gdb_cv_c_long_long != yes; then
11641 # libdecnumber requires long long.
11642 as_fn_error "Compiler must support long long for GDB." "$LINENO" 5
97bf5e38
MK
11643fi
11644
bc8bcb4b 11645# Check if the compiler and runtime support printing long longs.
97bf5e38 11646
81ecdfbb
RW
11647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
11648$as_echo_n "checking for long long support in printf... " >&6; }
11649if test "${gdb_cv_printf_has_long_long+set}" = set; then :
11650 $as_echo_n "(cached) " >&6
97bf5e38 11651else
81ecdfbb 11652 if test "$cross_compiling" = yes; then :
97bf5e38
MK
11653 gdb_cv_printf_has_long_long=no
11654else
81ecdfbb 11655 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11656/* end confdefs.h. */
bc8bcb4b
MK
11657$ac_includes_default
11658int
11659main ()
11660{
11661char buf[32];
97bf5e38
MK
11662 long long l = 0;
11663 l = (l << 16) + 0x0123;
11664 l = (l << 16) + 0x4567;
11665 l = (l << 16) + 0x89ab;
11666 l = (l << 16) + 0xcdef;
11667 sprintf (buf, "0x%016llx", l);
11668 return (strcmp ("0x0123456789abcdef", buf));
bc8bcb4b
MK
11669 ;
11670 return 0;
c906108c 11671}
bec39cab 11672_ACEOF
81ecdfbb 11673if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
11674 gdb_cv_printf_has_long_long=yes
11675else
81ecdfbb 11676 gdb_cv_printf_has_long_long=no
97bf5e38 11677fi
81ecdfbb
RW
11678rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11679 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 11680fi
81ecdfbb 11681
97bf5e38 11682fi
81ecdfbb
RW
11683{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
11684$as_echo "$gdb_cv_printf_has_long_long" >&6; }
97bf5e38 11685if test $gdb_cv_printf_has_long_long = yes; then
bc8bcb4b 11686
81ecdfbb 11687$as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
97bf5e38
MK
11688
11689fi
97bf5e38 11690
1a619819
LM
11691# Check if the compiler and runtime support printing decfloats.
11692
81ecdfbb
RW
11693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
11694$as_echo_n "checking for decfloat support in printf... " >&6; }
11695if test "${gdb_cv_printf_has_decfloat+set}" = set; then :
11696 $as_echo_n "(cached) " >&6
1a619819 11697else
81ecdfbb 11698 if test "$cross_compiling" = yes; then :
1a619819
LM
11699 gdb_cv_printf_has_decfloat=no
11700else
81ecdfbb 11701 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1a619819
LM
11702/* end confdefs.h. */
11703$ac_includes_default
11704int
11705main ()
11706{
11707char buf[64];
11708 _Decimal32 d32 = 1.2345df;
11709 _Decimal64 d64 = 1.2345dd;
11710 _Decimal128 d128 = 1.2345dl;
11711 sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
11712 return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
11713 ;
11714 return 0;
11715}
11716_ACEOF
81ecdfbb 11717if ac_fn_c_try_run "$LINENO"; then :
1a619819
LM
11718 gdb_cv_printf_has_decfloat=yes
11719else
81ecdfbb 11720 gdb_cv_printf_has_decfloat=no
1a619819 11721fi
81ecdfbb
RW
11722rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11723 conftest.$ac_objext conftest.beam conftest.$ac_ext
1a619819 11724fi
81ecdfbb 11725
1a619819 11726fi
81ecdfbb
RW
11727{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
11728$as_echo "$gdb_cv_printf_has_decfloat" >&6; }
1a619819
LM
11729if test $gdb_cv_printf_has_decfloat = yes; then
11730
81ecdfbb 11731$as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
1a619819
LM
11732
11733fi
11734
bc8bcb4b
MK
11735# Check if the compiler supports the `long double' type. We can't use
11736# AC_C_LONG_DOUBLE because that one does additional checks on the
11737# constants defined in <float.h> that fail on some systems,
11738# e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
97bf5e38 11739
81ecdfbb
RW
11740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
11741$as_echo_n "checking for long double support in compiler... " >&6; }
11742if test "${gdb_cv_c_long_double+set}" = set; then :
11743 $as_echo_n "(cached) " >&6
97bf5e38 11744else
81ecdfbb 11745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11746/* end confdefs.h. */
97bf5e38 11747long double foo;
bec39cab 11748_ACEOF
81ecdfbb 11749if ac_fn_c_try_compile "$LINENO"; then :
bc8bcb4b 11750 gdb_cv_c_long_double=yes
97bf5e38 11751else
81ecdfbb 11752 gdb_cv_c_long_double=no
97bf5e38 11753fi
81ecdfbb 11754rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 11755fi
81ecdfbb
RW
11756{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
11757$as_echo "$gdb_cv_c_long_double" >&6; }
bc8bcb4b 11758if test $gdb_cv_c_long_double = yes; then
c906108c 11759
81ecdfbb 11760$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
11761
11762fi
11763
bc8bcb4b 11764# Check if the compiler and runtime support printing long doubles.
97bf5e38 11765
81ecdfbb
RW
11766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
11767$as_echo_n "checking for long double support in printf... " >&6; }
11768if test "${gdb_cv_printf_has_long_double+set}" = set; then :
11769 $as_echo_n "(cached) " >&6
97bf5e38 11770else
81ecdfbb 11771 if test "$cross_compiling" = yes; then :
97bf5e38
MK
11772 gdb_cv_printf_has_long_double=no
11773else
81ecdfbb 11774 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11775/* end confdefs.h. */
bc8bcb4b
MK
11776$ac_includes_default
11777int
11778main ()
11779{
11780char buf[16];
97bf5e38
MK
11781 long double f = 3.141592653;
11782 sprintf (buf, "%Lg", f);
11783 return (strncmp ("3.14159", buf, 7));
bc8bcb4b
MK
11784 ;
11785 return 0;
97bf5e38 11786}
bec39cab 11787_ACEOF
81ecdfbb 11788if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 11789 gdb_cv_printf_has_long_double=yes
c906108c 11790else
81ecdfbb 11791 gdb_cv_printf_has_long_double=no
c906108c 11792fi
81ecdfbb
RW
11793rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11794 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 11795fi
81ecdfbb 11796
c906108c 11797fi
81ecdfbb
RW
11798{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
11799$as_echo "$gdb_cv_printf_has_long_double" >&6; }
97bf5e38 11800if test $gdb_cv_printf_has_long_double = yes; then
bc8bcb4b 11801
81ecdfbb 11802$as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
11803
11804fi
97bf5e38 11805
bc8bcb4b 11806# Check if the compiler and runtime support scanning long doubles.
97bf5e38 11807
81ecdfbb
RW
11808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
11809$as_echo_n "checking for long double support in scanf... " >&6; }
11810if test "${gdb_cv_scanf_has_long_double+set}" = set; then :
11811 $as_echo_n "(cached) " >&6
97bf5e38 11812else
81ecdfbb 11813 if test "$cross_compiling" = yes; then :
97bf5e38
MK
11814 gdb_cv_scanf_has_long_double=no
11815else
81ecdfbb 11816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11817/* end confdefs.h. */
bc8bcb4b
MK
11818#include <stdio.h>
11819int
11820main ()
11821{
11822char *buf = "3.141592653";
97bf5e38
MK
11823 long double f = 0;
11824 sscanf (buf, "%Lg", &f);
11825 return !(f > 3.14159 && f < 3.14160);
bc8bcb4b
MK
11826 ;
11827 return 0;
97bf5e38 11828}
bec39cab 11829_ACEOF
81ecdfbb 11830if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
11831 gdb_cv_scanf_has_long_double=yes
11832else
81ecdfbb 11833 gdb_cv_scanf_has_long_double=no
97bf5e38 11834fi
81ecdfbb
RW
11835rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11836 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 11837fi
81ecdfbb 11838
c906108c 11839fi
81ecdfbb
RW
11840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
11841$as_echo "$gdb_cv_scanf_has_long_double" >&6; }
97bf5e38 11842if test $gdb_cv_scanf_has_long_double = yes; then
bc8bcb4b 11843
81ecdfbb 11844$as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
11845
11846fi
c906108c 11847
438013df
AO
11848case ${host_os} in
11849aix*)
81ecdfbb
RW
11850 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
11851$as_echo_n "checking for -bbigtoc option... " >&6; }
11852if test "${gdb_cv_bigtoc+set}" = set; then :
11853 $as_echo_n "(cached) " >&6
438013df 11854else
bec39cab 11855
438013df
AO
11856 SAVE_LDFLAGS=$LDFLAGS
11857
11858 case $GCC in
11859 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
11860 *) gdb_cv_bigtoc=-bbigtoc ;;
11861 esac
11862
11863 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
81ecdfbb 11864 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11865/* end confdefs.h. */
438013df 11866
bec39cab
AC
11867int
11868main ()
11869{
438013df 11870int i;
bec39cab
AC
11871 ;
11872 return 0;
11873}
11874_ACEOF
81ecdfbb 11875if ac_fn_c_try_link "$LINENO"; then :
bec39cab 11876
81ecdfbb
RW
11877else
11878 gdb_cv_bigtoc=
438013df 11879fi
81ecdfbb
RW
11880rm -f core conftest.err conftest.$ac_objext \
11881 conftest$ac_exeext conftest.$ac_ext
ec76baa5 11882 LDFLAGS="${SAVE_LDFLAGS}"
438013df 11883
bec39cab 11884fi
81ecdfbb
RW
11885{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
11886$as_echo "$gdb_cv_bigtoc" >&6; }
438013df
AO
11887 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
11888 ;;
11889esac
11890
38f6b338 11891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
f6528abd 11892$as_echo_n "checking for the dynamic export flag... " >&6; }
38f6b338
JK
11893dynamic_list=false
11894if test "${gdb_native}" = yes; then
11895 # The dynamically loaded libthread_db needs access to symbols in the gdb
11896 # executable. Older GNU ld supports --export-dynamic but --dynamic-list
11897 # may not be supported there.
11898 old_LDFLAGS="$LDFLAGS"
11899 # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
11900 RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
11901 LDFLAGS="$LDFLAGS $RDYNAMIC"
11902 if test "${have_libpython}" = no; then
11903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f6528abd
JK
11904/* end confdefs.h. */
11905
11906int
11907main ()
11908{
11909
11910 ;
11911 return 0;
11912}
11913_ACEOF
11914if ac_fn_c_try_link "$LINENO"; then :
3bebe2f2
JK
11915 dynamic_list=true
11916fi
11917rm -f core conftest.err conftest.$ac_objext \
11918 conftest$ac_exeext conftest.$ac_ext
38f6b338
JK
11919 else
11920 # Workaround http://bugs.python.org/issue4434 where static
11921 # libpythonX.Y.a would get its symbols required for
11922 # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
11923 # Problem does not happen for the recommended libpythonX.Y.so linkage.
11924 old_CFLAGS="$CFLAGS"
11925 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
8c1fb155
JK
11926 old_LIBS="$LIBS"
11927 LIBS="$LIBS $PYTHON_LIBS"
38f6b338 11928 if test "$cross_compiling" = yes; then :
3bebe2f2 11929 true
f6528abd 11930else
3bebe2f2
JK
11931 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11932/* end confdefs.h. */
11933#include "${have_libpython}/Python.h"
11934int
11935main ()
11936{
11937int err;
38f6b338
JK
11938 Py_Initialize ();
11939 err = PyRun_SimpleString ("import itertools\n");
11940 Py_Finalize ();
11941 return err == 0 ? 0 : 1;
3bebe2f2
JK
11942 ;
11943 return 0;
11944}
11945_ACEOF
11946if ac_fn_c_try_run "$LINENO"; then :
11947 dynamic_list=true
11948fi
11949rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11950 conftest.$ac_objext conftest.beam conftest.$ac_ext
11951fi
11952
8c1fb155 11953 LIBS="$old_LIBS"
38f6b338
JK
11954 CFLAGS="$old_CFLAGS"
11955 fi
11956 LDFLAGS="$old_LDFLAGS"
11957fi
11958if $dynamic_list; then
11959 found="-Wl,--dynamic-list"
11960 RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
f6528abd 11961else
38f6b338
JK
11962 found="-rdynamic"
11963 RDYNAMIC="-rdynamic"
f6528abd 11964fi
f6528abd 11965
38f6b338 11966{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
f6528abd 11967$as_echo "$found" >&6; }
0407b3f1 11968
f6528abd 11969
0407b3f1 11970if test ${build} = ${host} -a ${host} = ${target} ; then
c906108c 11971 case ${host_os} in
c906108c 11972 solaris*)
d92419e5
JB
11973 # See if thread_db library is around for Solaris thread debugging.
11974 # Note that we must explicitly test for version 1 of the library
11975 # because version 0 (present on Solaris 2.4 or earlier) doesn't have
11976 # the same API.
81ecdfbb
RW
11977 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris thread debugging library" >&5
11978$as_echo_n "checking for Solaris thread debugging library... " >&6; }
c906108c 11979 if test -f /usr/lib/libthread_db.so.1 ; then
81ecdfbb
RW
11980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11981$as_echo "yes" >&6; }
60ca704f 11982
81ecdfbb 11983$as_echo "#define HAVE_THREAD_DB_LIB 1" >>confdefs.h
c906108c 11984
3483b318 11985 CONFIG_OBS="${CONFIG_OBS} sol-thread.o"
c906108c 11986 CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
81ecdfbb
RW
11987 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
11988$as_echo_n "checking for dlopen in -ldl... " >&6; }
11989if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
11990 $as_echo_n "(cached) " >&6
c906108c 11991else
bec39cab 11992 ac_check_lib_save_LIBS=$LIBS
c906108c 11993LIBS="-ldl $LIBS"
81ecdfbb 11994cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
11995/* end confdefs.h. */
11996
81ecdfbb
RW
11997/* Override any GCC internal prototype to avoid an error.
11998 Use char because int might match the return type of a GCC
11999 builtin and then its argument prototype would still apply. */
bec39cab
AC
12000#ifdef __cplusplus
12001extern "C"
12002#endif
bec39cab
AC
12003char dlopen ();
12004int
12005main ()
12006{
81ecdfbb 12007return dlopen ();
bec39cab
AC
12008 ;
12009 return 0;
12010}
12011_ACEOF
81ecdfbb 12012if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
12013 ac_cv_lib_dl_dlopen=yes
12014else
81ecdfbb 12015 ac_cv_lib_dl_dlopen=no
bec39cab 12016fi
81ecdfbb
RW
12017rm -f core conftest.err conftest.$ac_objext \
12018 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
12019LIBS=$ac_check_lib_save_LIBS
12020fi
81ecdfbb
RW
12021{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
12022$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
12023if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
bec39cab
AC
12024 cat >>confdefs.h <<_ACEOF
12025#define HAVE_LIBDL 1
12026_ACEOF
c906108c
SS
12027
12028 LIBS="-ldl $LIBS"
12029
c906108c
SS
12030fi
12031
f6528abd 12032 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} $RDYNAMIC"
c906108c
SS
12033 # Sun randomly tweaked the prototypes in <proc_service.h>
12034 # at one point.
81ecdfbb
RW
12035 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if <proc_service.h> is old" >&5
12036$as_echo_n "checking if <proc_service.h> is old... " >&6; }
12037 if test "${gdb_cv_proc_service_is_old+set}" = set; then :
12038 $as_echo_n "(cached) " >&6
c906108c 12039else
bec39cab 12040
81ecdfbb 12041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12042/* end confdefs.h. */
c906108c
SS
12043
12044 #include <proc_service.h>
12045 ps_err_e ps_pdwrite
12046 (struct ps_prochandle*, psaddr_t, const void*, size_t);
c906108c 12047
bec39cab
AC
12048int
12049main ()
12050{
12051
12052 ;
12053 return 0;
12054}
12055_ACEOF
81ecdfbb 12056if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
12057 gdb_cv_proc_service_is_old=no
12058else
81ecdfbb 12059 gdb_cv_proc_service_is_old=yes
c906108c 12060fi
81ecdfbb 12061rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 12062
c906108c
SS
12063fi
12064
81ecdfbb
RW
12065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_proc_service_is_old" >&5
12066$as_echo "$gdb_cv_proc_service_is_old" >&6; }
c906108c 12067 if test $gdb_cv_proc_service_is_old = yes; then
60ca704f 12068
81ecdfbb 12069$as_echo "#define PROC_SERVICE_IS_OLD 1" >>confdefs.h
c906108c
SS
12070
12071 fi
12072 else
81ecdfbb
RW
12073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12074$as_echo "no" >&6; }
c906108c
SS
12075 fi
12076 ;;
d92419e5 12077 aix*)
81ecdfbb
RW
12078 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
12079$as_echo_n "checking for AiX thread debugging library... " >&6; }
12080 if test "${gdb_cv_have_aix_thread_debug+set}" = set; then :
12081 $as_echo_n "(cached) " >&6
bec39cab 12082else
81ecdfbb 12083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12084/* end confdefs.h. */
d92419e5 12085#include <sys/pthdebug.h>
bec39cab
AC
12086int
12087main ()
12088{
d92419e5
JB
12089#ifndef PTHDB_VERSION_3
12090 #error
12091 #endif
bec39cab
AC
12092 ;
12093 return 0;
12094}
12095_ACEOF
81ecdfbb 12096if ac_fn_c_try_compile "$LINENO"; then :
d92419e5
JB
12097 gdb_cv_have_aix_thread_debug=yes
12098else
81ecdfbb 12099 gdb_cv_have_aix_thread_debug=no
d92419e5 12100fi
81ecdfbb 12101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d92419e5
JB
12102fi
12103
81ecdfbb
RW
12104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
12105$as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
d92419e5
JB
12106 if test $gdb_cv_have_aix_thread_debug = yes; then
12107 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
3483b318 12108 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
7f533142 12109 LIBS="$LIBS -lpthdebug"
d645e32e
JB
12110
12111 # Older versions of AIX do not provide the declaration for
12112 # the getthrds function (it appears that it was introduced
12113 # with AIX 6.x).
12114 ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h>
12115"
12116if test "x$ac_cv_have_decl_getthrds" = x""yes; then :
12117 ac_have_decl=1
12118else
12119 ac_have_decl=0
12120fi
12121
12122cat >>confdefs.h <<_ACEOF
12123#define HAVE_DECL_GETTHRDS $ac_have_decl
12124_ACEOF
12125
d92419e5
JB
12126 fi
12127 ;;
c906108c 12128 esac
bec39cab 12129
c906108c
SS
12130fi
12131
3f47be5c 12132if test "x$ac_cv_header_thread_db_h" = "xyes"; then
81ecdfbb
RW
12133 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
12134$as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
12135if test "${gdb_cv_thread_db_h_has_td_notalloc+set}" = set; then :
12136 $as_echo_n "(cached) " >&6
bec39cab 12137else
81ecdfbb 12138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12139/* end confdefs.h. */
3f47be5c 12140#include <thread_db.h>
bec39cab
AC
12141int
12142main ()
12143{
3f47be5c 12144int i = TD_NOTALLOC;
bec39cab
AC
12145 ;
12146 return 0;
12147}
12148_ACEOF
81ecdfbb 12149if ac_fn_c_try_compile "$LINENO"; then :
3f47be5c
EZ
12150 gdb_cv_thread_db_h_has_td_notalloc=yes
12151else
81ecdfbb 12152 gdb_cv_thread_db_h_has_td_notalloc=no
bec39cab 12153
3f47be5c 12154fi
81ecdfbb 12155rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3f47be5c 12156
bec39cab 12157fi
81ecdfbb
RW
12158{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
12159$as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
12160 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
12161$as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
12162if test "${gdb_cv_thread_db_h_has_td_version+set}" = set; then :
12163 $as_echo_n "(cached) " >&6
59f80f10 12164else
81ecdfbb 12165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
12166/* end confdefs.h. */
12167#include <thread_db.h>
12168int
12169main ()
12170{
12171int i = TD_VERSION;
12172 ;
12173 return 0;
12174}
12175_ACEOF
81ecdfbb 12176if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
12177 gdb_cv_thread_db_h_has_td_version=yes
12178else
81ecdfbb 12179 gdb_cv_thread_db_h_has_td_version=no
59f80f10
DJ
12180
12181fi
81ecdfbb 12182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
12183
12184fi
81ecdfbb
RW
12185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
12186$as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
12187 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
12188$as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
12189if test "${gdb_cv_thread_db_h_has_td_notls+set}" = set; then :
12190 $as_echo_n "(cached) " >&6
59f80f10 12191else
81ecdfbb 12192 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
12193/* end confdefs.h. */
12194#include <thread_db.h>
12195int
12196main ()
12197{
12198int i = TD_NOTLS;
12199 ;
12200 return 0;
12201}
12202_ACEOF
81ecdfbb 12203if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
12204 gdb_cv_thread_db_h_has_td_notls=yes
12205else
81ecdfbb 12206 gdb_cv_thread_db_h_has_td_notls=no
59f80f10
DJ
12207
12208fi
81ecdfbb 12209rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
12210
12211fi
81ecdfbb
RW
12212{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
12213$as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
3f47be5c
EZ
12214fi
12215if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
bec39cab 12216
81ecdfbb 12217$as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
3f47be5c 12218
59f80f10
DJ
12219fi
12220if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
12221
81ecdfbb 12222$as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
59f80f10
DJ
12223
12224fi
12225if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
12226
81ecdfbb 12227$as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
59f80f10 12228
3f47be5c
EZ
12229fi
12230
b757528f 12231if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then
81ecdfbb
RW
12232 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/syscall.h> has __NR_tkill" >&5
12233$as_echo_n "checking whether <sys/syscall.h> has __NR_tkill... " >&6; }
12234if test "${gdb_cv_sys_syscall_h_has_tkill+set}" = set; then :
12235 $as_echo_n "(cached) " >&6
bec39cab 12236else
81ecdfbb 12237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12238/* end confdefs.h. */
b757528f 12239#include <sys/syscall.h>
bec39cab
AC
12240int
12241main ()
12242{
b757528f 12243int i = __NR_tkill;
bec39cab
AC
12244 ;
12245 return 0;
12246}
12247_ACEOF
81ecdfbb 12248if ac_fn_c_try_compile "$LINENO"; then :
b757528f
JJ
12249 gdb_cv_sys_syscall_h_has_tkill=yes
12250else
81ecdfbb 12251 gdb_cv_sys_syscall_h_has_tkill=no
bec39cab 12252
b757528f 12253fi
81ecdfbb 12254rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b757528f 12255
bec39cab 12256fi
81ecdfbb
RW
12257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_sys_syscall_h_has_tkill" >&5
12258$as_echo "$gdb_cv_sys_syscall_h_has_tkill" >&6; }
b757528f 12259fi
99c1d451
TT
12260if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes"; then
12261 ac_fn_c_check_func "$LINENO" "syscall" "ac_cv_func_syscall"
12262if test "x$ac_cv_func_syscall" = x""yes; then :
bec39cab 12263
81ecdfbb 12264$as_echo "#define HAVE_TKILL_SYSCALL 1" >>confdefs.h
b757528f 12265
99c1d451
TT
12266
12267fi
12268
b757528f
JJ
12269fi
12270
81ecdfbb
RW
12271ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
12272"
12273if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = x""yes; then :
12274 ac_have_decl=1
10568435 12275else
81ecdfbb 12276 ac_have_decl=0
10568435 12277fi
10568435
JK
12278
12279cat >>confdefs.h <<_ACEOF
81ecdfbb 12280#define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
10568435
JK
12281_ACEOF
12282
12283
81ecdfbb
RW
12284if test "$cross_compiling" = yes; then :
12285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
12286/* end confdefs.h. */
12287#include <sys/personality.h>
12288int
12289main ()
12290{
12291
12292# if !HAVE_DECL_ADDR_NO_RANDOMIZE
12293# define ADDR_NO_RANDOMIZE 0x0040000
12294# endif
12295 /* Test the flag could be set and stays set. */
12296 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
12297 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
12298 return 1
12299 ;
12300 return 0;
12301}
12302_ACEOF
81ecdfbb 12303if ac_fn_c_try_link "$LINENO"; then :
10568435
JK
12304 have_personality=true
12305else
81ecdfbb 12306 have_personality=false
10568435 12307fi
81ecdfbb
RW
12308rm -f core conftest.err conftest.$ac_objext \
12309 conftest$ac_exeext conftest.$ac_ext
10568435 12310else
81ecdfbb 12311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
12312/* end confdefs.h. */
12313#include <sys/personality.h>
12314int
12315main ()
12316{
12317
12318# if !HAVE_DECL_ADDR_NO_RANDOMIZE
12319# define ADDR_NO_RANDOMIZE 0x0040000
12320# endif
12321 /* Test the flag could be set and stays set. */
12322 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
12323 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
12324 return 1
12325 ;
12326 return 0;
12327}
12328_ACEOF
81ecdfbb 12329if ac_fn_c_try_run "$LINENO"; then :
10568435
JK
12330 have_personality=true
12331else
81ecdfbb 12332 have_personality=false
10568435 12333fi
81ecdfbb
RW
12334rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12335 conftest.$ac_objext conftest.beam conftest.$ac_ext
10568435 12336fi
81ecdfbb 12337
10568435
JK
12338if $have_personality
12339then
12340
81ecdfbb 12341$as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
10568435
JK
12342
12343fi
12344
e655c1a2
PA
12345case $host_os in
12346 go32* | *djgpp*)
12347 gdbinit=gdb.ini
12348 ;;
12349 *)
12350 gdbinit=.gdbinit
12351 ;;
12352esac
12353
12354cat >>confdefs.h <<_ACEOF
12355#define GDBINIT "$gdbinit"
12356_ACEOF
12357
12358
fb40c209 12359
f83d8a90
DE
12360# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
12361# except that the argument to --with-sysroot is optional.
12362# --with-sysroot (or --with-sysroot=yes) sets the default sysroot path.
12363if test "x$with_sysroot" = xyes; then
12364 with_sysroot="${exec_prefix}/${target_alias}/sys-root"
12365fi
bec39cab 12366
81ecdfbb
RW
12367# Check whether --with-sysroot was given.
12368if test "${with_sysroot+set}" = set; then :
f83d8a90
DE
12369 withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval
12370else
12371 TARGET_SYSTEM_ROOT=
12372fi
030292b7 12373
030292b7 12374
f83d8a90
DE
12375 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
12376 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
12377 ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT`
12378 ac_define_dir=`eval echo $ac_define_dir`
030292b7 12379
f83d8a90
DE
12380cat >>confdefs.h <<_ACEOF
12381#define TARGET_SYSTEM_ROOT "$ac_define_dir"
12382_ACEOF
bec39cab 12383
030292b7 12384
b14b1491 12385
f83d8a90
DE
12386
12387 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
12388 if test "x$prefix" = xNONE; then
12389 test_prefix=/usr/local
12390 else
12391 test_prefix=$prefix
12392 fi
12393 else
12394 test_prefix=$exec_prefix
12395 fi
12396 value=0
12397 case ${ac_define_dir} in
12398 "${test_prefix}"|"${test_prefix}/"*|\
12399 '${exec_prefix}'|'${exec_prefix}/'*)
12400 value=1
12401 ;;
12402 esac
12403
12404cat >>confdefs.h <<_ACEOF
12405#define TARGET_SYSTEM_ROOT_RELOCATABLE $value
12406_ACEOF
030292b7
DJ
12407
12408
12409
16e7150e 12410
16e7150e 12411
81ecdfbb
RW
12412# Check whether --with-system-gdbinit was given.
12413if test "${with_system_gdbinit+set}" = set; then :
12414 withval=$with_system_gdbinit;
b14b1491
TT
12415 SYSTEM_GDBINIT=$withval
12416else
12417 SYSTEM_GDBINIT=
81ecdfbb
RW
12418fi
12419
16e7150e
JG
12420
12421 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
12422 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 12423 ac_define_dir=`eval echo $SYSTEM_GDBINIT`
16e7150e
JG
12424 ac_define_dir=`eval echo $ac_define_dir`
12425
12426cat >>confdefs.h <<_ACEOF
12427#define SYSTEM_GDBINIT "$ac_define_dir"
12428_ACEOF
12429
12430
12431
0c4a4063 12432
b14b1491
TT
12433 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
12434 if test "x$prefix" = xNONE; then
12435 test_prefix=/usr/local
12436 else
12437 test_prefix=$prefix
12438 fi
12439 else
12440 test_prefix=$exec_prefix
12441 fi
12442 value=0
12443 case ${ac_define_dir} in
12444 "${test_prefix}"|"${test_prefix}/"*|\
12445 '${exec_prefix}'|'${exec_prefix}/'*)
12446 value=1
12447 ;;
12448 esac
16e7150e 12449
b14b1491
TT
12450cat >>confdefs.h <<_ACEOF
12451#define SYSTEM_GDBINIT_RELOCATABLE $value
16e7150e
JG
12452_ACEOF
12453
b14b1491 12454
16e7150e 12455
0c4a4063 12456
81ecdfbb
RW
12457# Check whether --enable-werror was given.
12458if test "${enable_werror+set}" = set; then :
12459 enableval=$enable_werror; case "${enableval}" in
094a342e
MK
12460 yes | y) ERROR_ON_WARNING="yes" ;;
12461 no | n) ERROR_ON_WARNING="no" ;;
81ecdfbb 12462 *) as_fn_error "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
094a342e 12463 esac
81ecdfbb
RW
12464fi
12465
094a342e 12466
a68ffae9
JK
12467# Enable -Werror by default when using gcc. Turn it off for releases.
12468if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
094a342e
MK
12469 ERROR_ON_WARNING=yes
12470fi
12471
12472WERROR_CFLAGS=""
12473if test "${ERROR_ON_WARNING}" = yes ; then
12474 WERROR_CFLAGS="-Werror"
12475fi
12476
aa79a185 12477build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
d3685d60 12478-Wpointer-sign \
1cb5e2a4 12479-Wno-unused -Wunused-value -Wunused-function \
352b3eda 12480-Wno-switch -Wno-char-subscripts -Wmissing-prototypes \
44d100c3 12481-Wdeclaration-after-statement -Wempty-body -Wmissing-parameter-type \
dd9aa048 12482-Wold-style-declaration -Wold-style-definition"
a3b362c4 12483
3526781e
DJ
12484# Enable -Wno-format by default when using gcc on mingw since many
12485# GCC versions complain about %I64.
12486case "${host}" in
12487 *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;;
d3685d60 12488 *) build_warnings="$build_warnings -Wformat-nonliteral" ;;
3526781e
DJ
12489esac
12490
81ecdfbb
RW
12491# Check whether --enable-build-warnings was given.
12492if test "${enable_build_warnings+set}" = set; then :
12493 enableval=$enable_build_warnings; case "${enableval}" in
c906108c
SS
12494 yes) ;;
12495 no) build_warnings="-w";;
12496 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
12497 build_warnings="${build_warnings} ${t}";;
12498 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
12499 build_warnings="${t} ${build_warnings}";;
12500 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
12501esac
d4f3574e 12502if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 12503 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 12504fi
81ecdfbb
RW
12505fi
12506# Check whether --enable-gdb-build-warnings was given.
12507if test "${enable_gdb_build_warnings+set}" = set; then :
12508 enableval=$enable_gdb_build_warnings; case "${enableval}" in
3b851bce
AC
12509 yes) ;;
12510 no) build_warnings="-w";;
12511 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
12512 build_warnings="${build_warnings} ${t}";;
12513 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
12514 build_warnings="${t} ${build_warnings}";;
12515 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
12516esac
12517if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
12518 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
12519fi
81ecdfbb
RW
12520fi
12521WARN_CFLAGS=""
c906108c
SS
12522if test "x${build_warnings}" != x -a "x$GCC" = xyes
12523then
81ecdfbb
RW
12524 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
12525$as_echo_n "checking compiler warning flags... " >&6; }
746a987d
AC
12526 # Separate out the -Werror flag as some files just cannot be
12527 # compiled with it enabled.
12528 for w in ${build_warnings}; do
12529 case $w in
12530 -Werr*) WERROR_CFLAGS=-Werror ;;
12531 *) # Check that GCC accepts it
4536bbc6
AC
12532 saved_CFLAGS="$CFLAGS"
12533 CFLAGS="$CFLAGS $w"
81ecdfbb 12534 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12535/* end confdefs.h. */
4536bbc6 12536
bec39cab
AC
12537int
12538main ()
12539{
4536bbc6 12540
bec39cab
AC
12541 ;
12542 return 0;
12543}
12544_ACEOF
81ecdfbb 12545if ac_fn_c_try_compile "$LINENO"; then :
4536bbc6 12546 WARN_CFLAGS="${WARN_CFLAGS} $w"
4536bbc6 12547fi
81ecdfbb 12548rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4536bbc6 12549 CFLAGS="$saved_CFLAGS"
746a987d
AC
12550 esac
12551 done
81ecdfbb
RW
12552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
12553$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
c906108c
SS
12554fi
12555
12556
104c1213 12557
7a292a7a 12558# In the Cygwin environment, we need some additional flags.
81ecdfbb
RW
12559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
12560$as_echo_n "checking for cygwin... " >&6; }
12561if test "${gdb_cv_os_cygwin+set}" = set; then :
12562 $as_echo_n "(cached) " >&6
bec39cab 12563else
81ecdfbb 12564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12565/* end confdefs.h. */
7a292a7a
SS
12566
12567#if defined (__CYGWIN__) || defined (__CYGWIN32__)
12568lose
12569#endif
bec39cab 12570_ACEOF
7a292a7a 12571if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
92a021de 12572 $EGREP "^lose$" >/dev/null 2>&1; then :
7a292a7a
SS
12573 gdb_cv_os_cygwin=yes
12574else
7a292a7a
SS
12575 gdb_cv_os_cygwin=no
12576fi
12577rm -f conftest*
12578
12579fi
81ecdfbb
RW
12580{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
12581$as_echo "$gdb_cv_os_cygwin" >&6; }
7a292a7a 12582
aff38e61 12583
3eb25fda 12584SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
aff38e61 12585case ${host} in
95cbc983
AC
12586 *go32* ) SER_HARDWIRE=ser-go32.o ;;
12587 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
0ea3f30e 12588 *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
aff38e61
AC
12589esac
12590
12591
cd0fc7c3
SS
12592# libreadline needs libuser32.a in a cygwin environment
12593WIN32LIBS=
12594if test x$gdb_cv_os_cygwin = xyes; then
c5394b80
JM
12595 WIN32LIBS="-luser32"
12596 case "${target}" in
12597 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
12598 ;;
12599 esac
cd0fc7c3 12600fi
c906108c 12601
b4505029
MM
12602# The ser-tcp.c module requires sockets.
12603case ${host} in
12604 *mingw32*)
12605
81ecdfbb 12606$as_echo "#define USE_WIN32API 1" >>confdefs.h
b4505029
MM
12607
12608 WIN32LIBS="$WIN32LIBS -lws2_32"
12609 ;;
12610esac
12611
7a292a7a 12612
31d99776 12613# Add ELF support to GDB, but only if BFD includes ELF support.
def63ff0
TT
12614
12615 OLD_CFLAGS=$CFLAGS
12616 OLD_LDFLAGS=$LDFLAGS
12617 OLD_LIBS=$LIBS
12618 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
12619 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
12620 # always want our bfd.
12621 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
12622 LDFLAGS="-L../bfd -L../libiberty $LDFLAGS"
12623 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
12624 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
12625 if test "$plugins" = "yes"; then
a48b32c0
L
12626 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
12627$as_echo_n "checking for library containing dlopen... " >&6; }
12628if test "${ac_cv_search_dlopen+set}" = set; then :
12629 $as_echo_n "(cached) " >&6
12630else
12631 ac_func_search_save_LIBS=$LIBS
12632cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12633/* end confdefs.h. */
12634
12635/* Override any GCC internal prototype to avoid an error.
12636 Use char because int might match the return type of a GCC
12637 builtin and then its argument prototype would still apply. */
12638#ifdef __cplusplus
12639extern "C"
12640#endif
12641char dlopen ();
12642int
12643main ()
12644{
12645return dlopen ();
12646 ;
12647 return 0;
12648}
12649_ACEOF
12650for ac_lib in '' dl; do
12651 if test -z "$ac_lib"; then
12652 ac_res="none required"
12653 else
12654 ac_res=-l$ac_lib
12655 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12656 fi
12657 if ac_fn_c_try_link "$LINENO"; then :
12658 ac_cv_search_dlopen=$ac_res
12659fi
12660rm -f core conftest.err conftest.$ac_objext \
12661 conftest$ac_exeext
12662 if test "${ac_cv_search_dlopen+set}" = set; then :
12663 break
12664fi
12665done
12666if test "${ac_cv_search_dlopen+set}" = set; then :
12667
12668else
12669 ac_cv_search_dlopen=no
12670fi
12671rm conftest.$ac_ext
12672LIBS=$ac_func_search_save_LIBS
12673fi
12674{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
12675$as_echo "$ac_cv_search_dlopen" >&6; }
12676ac_res=$ac_cv_search_dlopen
12677if test "$ac_res" != no; then :
12678 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12679
12680fi
12681
def63ff0
TT
12682 fi
12683 LIBS="-lbfd -liberty $intl $LIBS"
12684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
81ecdfbb
RW
12685$as_echo_n "checking for ELF support in BFD... " >&6; }
12686if test "${gdb_cv_var_elf+set}" = set; then :
12687 $as_echo_n "(cached) " >&6
31d99776 12688else
81ecdfbb 12689 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31d99776
DJ
12690/* end confdefs.h. */
12691#include <stdlib.h>
def63ff0
TT
12692 #include "bfd.h"
12693 #include "elf-bfd.h"
31d99776
DJ
12694
12695int
12696main ()
12697{
def63ff0 12698return bfd_get_elf_phdr_upper_bound (NULL);
31d99776
DJ
12699 ;
12700 return 0;
12701}
12702_ACEOF
81ecdfbb 12703if ac_fn_c_try_link "$LINENO"; then :
31d99776
DJ
12704 gdb_cv_var_elf=yes
12705else
81ecdfbb 12706 gdb_cv_var_elf=no
31d99776 12707fi
81ecdfbb
RW
12708rm -f core conftest.err conftest.$ac_objext \
12709 conftest$ac_exeext conftest.$ac_ext
31d99776 12710fi
81ecdfbb
RW
12711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
12712$as_echo "$gdb_cv_var_elf" >&6; }
def63ff0
TT
12713 CFLAGS=$OLD_CFLAGS
12714 LDFLAGS=$OLD_LDFLAGS
12715 LIBS=$OLD_LIBS
31d99776 12716if test $gdb_cv_var_elf = yes; then
55aa24fb 12717 CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o"
31d99776 12718
81ecdfbb 12719$as_echo "#define HAVE_ELF 1" >>confdefs.h
31d99776 12720
075ff26d
JK
12721 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
12722 if test "$plugins" = "yes"; then
a48b32c0
L
12723 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
12724$as_echo_n "checking for library containing dlopen... " >&6; }
12725if test "${ac_cv_search_dlopen+set}" = set; then :
12726 $as_echo_n "(cached) " >&6
12727else
12728 ac_func_search_save_LIBS=$LIBS
12729cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12730/* end confdefs.h. */
12731
12732/* Override any GCC internal prototype to avoid an error.
12733 Use char because int might match the return type of a GCC
12734 builtin and then its argument prototype would still apply. */
12735#ifdef __cplusplus
12736extern "C"
12737#endif
12738char dlopen ();
12739int
12740main ()
12741{
12742return dlopen ();
12743 ;
12744 return 0;
12745}
12746_ACEOF
12747for ac_lib in '' dl; do
12748 if test -z "$ac_lib"; then
12749 ac_res="none required"
12750 else
12751 ac_res=-l$ac_lib
12752 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12753 fi
12754 if ac_fn_c_try_link "$LINENO"; then :
12755 ac_cv_search_dlopen=$ac_res
12756fi
12757rm -f core conftest.err conftest.$ac_objext \
12758 conftest$ac_exeext
12759 if test "${ac_cv_search_dlopen+set}" = set; then :
12760 break
12761fi
12762done
12763if test "${ac_cv_search_dlopen+set}" = set; then :
12764
12765else
12766 ac_cv_search_dlopen=no
12767fi
12768rm conftest.$ac_ext
12769LIBS=$ac_func_search_save_LIBS
12770fi
12771{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
12772$as_echo "$ac_cv_search_dlopen" >&6; }
12773ac_res=$ac_cv_search_dlopen
12774if test "$ac_res" != no; then :
12775 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12776
12777fi
12778
075ff26d 12779 fi
31d99776 12780fi
31d99776 12781
4f05add4
TT
12782# Add macho support to GDB, but only if BFD includes it.
12783
12784 OLD_CFLAGS=$CFLAGS
12785 OLD_LDFLAGS=$LDFLAGS
12786 OLD_LIBS=$LIBS
12787 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
12788 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
12789 # always want our bfd.
12790 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
12791 LDFLAGS="-L../bfd -L../libiberty $LDFLAGS"
12792 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
12793 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
12794 if test "$plugins" = "yes"; then
a48b32c0
L
12795 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
12796$as_echo_n "checking for library containing dlopen... " >&6; }
12797if test "${ac_cv_search_dlopen+set}" = set; then :
12798 $as_echo_n "(cached) " >&6
12799else
12800 ac_func_search_save_LIBS=$LIBS
12801cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12802/* end confdefs.h. */
12803
12804/* Override any GCC internal prototype to avoid an error.
12805 Use char because int might match the return type of a GCC
12806 builtin and then its argument prototype would still apply. */
12807#ifdef __cplusplus
12808extern "C"
12809#endif
12810char dlopen ();
12811int
12812main ()
12813{
12814return dlopen ();
12815 ;
12816 return 0;
12817}
12818_ACEOF
12819for ac_lib in '' dl; do
12820 if test -z "$ac_lib"; then
12821 ac_res="none required"
12822 else
12823 ac_res=-l$ac_lib
12824 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12825 fi
12826 if ac_fn_c_try_link "$LINENO"; then :
12827 ac_cv_search_dlopen=$ac_res
12828fi
12829rm -f core conftest.err conftest.$ac_objext \
12830 conftest$ac_exeext
12831 if test "${ac_cv_search_dlopen+set}" = set; then :
12832 break
12833fi
12834done
12835if test "${ac_cv_search_dlopen+set}" = set; then :
12836
12837else
12838 ac_cv_search_dlopen=no
12839fi
12840rm conftest.$ac_ext
12841LIBS=$ac_func_search_save_LIBS
12842fi
12843{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
12844$as_echo "$ac_cv_search_dlopen" >&6; }
12845ac_res=$ac_cv_search_dlopen
12846if test "$ac_res" != no; then :
12847 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12848
12849fi
12850
4f05add4
TT
12851 fi
12852 LIBS="-lbfd -liberty $intl $LIBS"
12853 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5
12854$as_echo_n "checking for Mach-O support in BFD... " >&6; }
12855if test "${gdb_cv_var_macho+set}" = set; then :
12856 $as_echo_n "(cached) " >&6
12857else
12858 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12859/* end confdefs.h. */
12860#include <stdlib.h>
12861 #include "bfd.h"
12862 #include "mach-o.h"
12863
12864int
12865main ()
12866{
12867return bfd_mach_o_lookup_command (NULL, 0, NULL);
12868 ;
12869 return 0;
12870}
12871_ACEOF
12872if ac_fn_c_try_link "$LINENO"; then :
12873 gdb_cv_var_macho=yes
12874else
12875 gdb_cv_var_macho=no
12876fi
12877rm -f core conftest.err conftest.$ac_objext \
12878 conftest$ac_exeext conftest.$ac_ext
12879fi
12880{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5
12881$as_echo "$gdb_cv_var_macho" >&6; }
12882 CFLAGS=$OLD_CFLAGS
12883 LDFLAGS=$OLD_LDFLAGS
12884 LIBS=$OLD_LIBS
12885if test $gdb_cv_var_macho = yes; then
12886 CONFIG_OBS="$CONFIG_OBS machoread.o"
12887fi
12888
b2259038
TT
12889# Add SOM support to GDB, but only if BFD includes it.
12890
12891 OLD_CFLAGS=$CFLAGS
12892 OLD_LDFLAGS=$LDFLAGS
12893 OLD_LIBS=$LIBS
12894 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
12895 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
12896 # always want our bfd.
12897 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
12898 LDFLAGS="-L../bfd -L../libiberty $LDFLAGS"
12899 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
12900 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
12901 if test "$plugins" = "yes"; then
a48b32c0
L
12902 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
12903$as_echo_n "checking for library containing dlopen... " >&6; }
12904if test "${ac_cv_search_dlopen+set}" = set; then :
12905 $as_echo_n "(cached) " >&6
12906else
12907 ac_func_search_save_LIBS=$LIBS
12908cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12909/* end confdefs.h. */
12910
12911/* Override any GCC internal prototype to avoid an error.
12912 Use char because int might match the return type of a GCC
12913 builtin and then its argument prototype would still apply. */
12914#ifdef __cplusplus
12915extern "C"
12916#endif
12917char dlopen ();
12918int
12919main ()
12920{
12921return dlopen ();
12922 ;
12923 return 0;
12924}
12925_ACEOF
12926for ac_lib in '' dl; do
12927 if test -z "$ac_lib"; then
12928 ac_res="none required"
12929 else
12930 ac_res=-l$ac_lib
12931 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12932 fi
12933 if ac_fn_c_try_link "$LINENO"; then :
12934 ac_cv_search_dlopen=$ac_res
12935fi
12936rm -f core conftest.err conftest.$ac_objext \
12937 conftest$ac_exeext
12938 if test "${ac_cv_search_dlopen+set}" = set; then :
12939 break
12940fi
12941done
12942if test "${ac_cv_search_dlopen+set}" = set; then :
12943
12944else
12945 ac_cv_search_dlopen=no
12946fi
12947rm conftest.$ac_ext
12948LIBS=$ac_func_search_save_LIBS
12949fi
12950{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
12951$as_echo "$ac_cv_search_dlopen" >&6; }
12952ac_res=$ac_cv_search_dlopen
12953if test "$ac_res" != no; then :
12954 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12955
12956fi
12957
b2259038
TT
12958 fi
12959 LIBS="-lbfd -liberty $intl $LIBS"
12960 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SOM support in BFD" >&5
12961$as_echo_n "checking for SOM support in BFD... " >&6; }
12962if test "${gdb_cv_var_som+set}" = set; then :
12963 $as_echo_n "(cached) " >&6
12964else
12965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12966/* end confdefs.h. */
12967#include <stdlib.h>
12968 #include "bfd.h"
12969 #include "som.h"
12970
12971int
12972main ()
12973{
12974return bfd_som_attach_aux_hdr (NULL, 0, NULL);
12975 ;
12976 return 0;
12977}
12978_ACEOF
12979if ac_fn_c_try_link "$LINENO"; then :
12980 gdb_cv_var_som=yes
12981else
12982 gdb_cv_var_som=no
12983fi
12984rm -f core conftest.err conftest.$ac_objext \
12985 conftest$ac_exeext conftest.$ac_ext
12986fi
12987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_som" >&5
12988$as_echo "$gdb_cv_var_som" >&6; }
12989 CFLAGS=$OLD_CFLAGS
12990 LDFLAGS=$OLD_LDFLAGS
12991 LIBS=$OLD_LIBS
12992if test $gdb_cv_var_som = yes; then
12993 CONFIG_OBS="$CONFIG_OBS somread.o"
12994fi
12995
121ce6e5
DJ
12996# Add any host-specific objects to GDB.
12997CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
12998
608e2dbb
TT
12999# If building on ELF, look for lzma support for embedded compressed debug info.
13000if test $gdb_cv_var_elf = yes; then
13001
13002# Check whether --with-lzma was given.
13003if test "${with_lzma+set}" = set; then :
13004 withval=$with_lzma;
13005else
13006 with_lzma=auto
13007fi
13008
13009 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5
13010$as_echo_n "checking whether to use lzma... " >&6; }
13011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5
13012$as_echo "$with_lzma" >&6; }
13013
13014 if test "${with_lzma}" != no; then
13015
13016
13017
13018
13019
13020
13021
13022
13023 use_additional=yes
13024
13025 acl_save_prefix="$prefix"
13026 prefix="$acl_final_prefix"
13027 acl_save_exec_prefix="$exec_prefix"
13028 exec_prefix="$acl_final_exec_prefix"
13029
13030 eval additional_includedir=\"$includedir\"
13031 eval additional_libdir=\"$libdir\"
13032
13033 exec_prefix="$acl_save_exec_prefix"
13034 prefix="$acl_save_prefix"
13035
13036
13037# Check whether --with-liblzma-prefix was given.
13038if test "${with_liblzma_prefix+set}" = set; then :
13039 withval=$with_liblzma_prefix;
13040 if test "X$withval" = "Xno"; then
13041 use_additional=no
13042 else
13043 if test "X$withval" = "X"; then
13044
13045 acl_save_prefix="$prefix"
13046 prefix="$acl_final_prefix"
13047 acl_save_exec_prefix="$exec_prefix"
13048 exec_prefix="$acl_final_exec_prefix"
13049
13050 eval additional_includedir=\"$includedir\"
13051 eval additional_libdir=\"$libdir\"
13052
13053 exec_prefix="$acl_save_exec_prefix"
13054 prefix="$acl_save_prefix"
13055
13056 else
13057 additional_includedir="$withval/include"
13058 additional_libdir="$withval/lib"
13059 fi
13060 fi
13061
13062fi
13063
13064 LIBLZMA=
13065 LTLIBLZMA=
13066 INCLZMA=
13067 rpathdirs=
13068 ltrpathdirs=
13069 names_already_handled=
13070 names_next_round='lzma '
13071 while test -n "$names_next_round"; do
13072 names_this_round="$names_next_round"
13073 names_next_round=
13074 for name in $names_this_round; do
13075 already_handled=
13076 for n in $names_already_handled; do
13077 if test "$n" = "$name"; then
13078 already_handled=yes
13079 break
13080 fi
13081 done
13082 if test -z "$already_handled"; then
13083 names_already_handled="$names_already_handled $name"
13084 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
13085 eval value=\"\$HAVE_LIB$uppername\"
13086 if test -n "$value"; then
13087 if test "$value" = yes; then
13088 eval value=\"\$LIB$uppername\"
13089 test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value"
13090 eval value=\"\$LTLIB$uppername\"
13091 test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value"
13092 else
13093 :
13094 fi
13095 else
13096 found_dir=
13097 found_la=
13098 found_so=
13099 found_a=
13100 if test $use_additional = yes; then
13101 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
13102 found_dir="$additional_libdir"
13103 found_so="$additional_libdir/lib$name.$shlibext"
13104 if test -f "$additional_libdir/lib$name.la"; then
13105 found_la="$additional_libdir/lib$name.la"
13106 fi
13107 else
13108 if test -f "$additional_libdir/lib$name.$libext"; then
13109 found_dir="$additional_libdir"
13110 found_a="$additional_libdir/lib$name.$libext"
13111 if test -f "$additional_libdir/lib$name.la"; then
13112 found_la="$additional_libdir/lib$name.la"
13113 fi
13114 fi
13115 fi
13116 fi
13117 if test "X$found_dir" = "X"; then
13118 for x in $LDFLAGS $LTLIBLZMA; do
13119
13120 acl_save_prefix="$prefix"
13121 prefix="$acl_final_prefix"
13122 acl_save_exec_prefix="$exec_prefix"
13123 exec_prefix="$acl_final_exec_prefix"
13124 eval x=\"$x\"
13125 exec_prefix="$acl_save_exec_prefix"
13126 prefix="$acl_save_prefix"
13127
13128 case "$x" in
13129 -L*)
13130 dir=`echo "X$x" | sed -e 's/^X-L//'`
13131 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
13132 found_dir="$dir"
13133 found_so="$dir/lib$name.$shlibext"
13134 if test -f "$dir/lib$name.la"; then
13135 found_la="$dir/lib$name.la"
13136 fi
13137 else
13138 if test -f "$dir/lib$name.$libext"; then
13139 found_dir="$dir"
13140 found_a="$dir/lib$name.$libext"
13141 if test -f "$dir/lib$name.la"; then
13142 found_la="$dir/lib$name.la"
13143 fi
13144 fi
13145 fi
13146 ;;
13147 esac
13148 if test "X$found_dir" != "X"; then
13149 break
13150 fi
13151 done
13152 fi
13153 if test "X$found_dir" != "X"; then
13154 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name"
13155 if test "X$found_so" != "X"; then
13156 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
13157 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
13158 else
13159 haveit=
13160 for x in $ltrpathdirs; do
13161 if test "X$x" = "X$found_dir"; then
13162 haveit=yes
13163 break
13164 fi
13165 done
13166 if test -z "$haveit"; then
13167 ltrpathdirs="$ltrpathdirs $found_dir"
13168 fi
13169 if test "$hardcode_direct" = yes; then
13170 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
13171 else
13172 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
13173 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
13174 haveit=
13175 for x in $rpathdirs; do
13176 if test "X$x" = "X$found_dir"; then
13177 haveit=yes
13178 break
13179 fi
13180 done
13181 if test -z "$haveit"; then
13182 rpathdirs="$rpathdirs $found_dir"
13183 fi
13184 else
13185 haveit=
13186 for x in $LDFLAGS $LIBLZMA; do
13187
13188 acl_save_prefix="$prefix"
13189 prefix="$acl_final_prefix"
13190 acl_save_exec_prefix="$exec_prefix"
13191 exec_prefix="$acl_final_exec_prefix"
13192 eval x=\"$x\"
13193 exec_prefix="$acl_save_exec_prefix"
13194 prefix="$acl_save_prefix"
13195
13196 if test "X$x" = "X-L$found_dir"; then
13197 haveit=yes
13198 break
13199 fi
13200 done
13201 if test -z "$haveit"; then
13202 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir"
13203 fi
13204 if test "$hardcode_minus_L" != no; then
13205 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
13206 else
13207 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
13208 fi
13209 fi
13210 fi
13211 fi
13212 else
13213 if test "X$found_a" != "X"; then
13214 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a"
13215 else
13216 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name"
13217 fi
13218 fi
13219 additional_includedir=
13220 case "$found_dir" in
13221 */lib | */lib/)
13222 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
13223 additional_includedir="$basedir/include"
13224 ;;
13225 esac
13226 if test "X$additional_includedir" != "X"; then
13227 if test "X$additional_includedir" != "X/usr/include"; then
13228 haveit=
13229 if test "X$additional_includedir" = "X/usr/local/include"; then
13230 if test -n "$GCC"; then
13231 case $host_os in
13232 linux*) haveit=yes;;
13233 esac
13234 fi
13235 fi
13236 if test -z "$haveit"; then
13237 for x in $CPPFLAGS $INCLZMA; do
13238
13239 acl_save_prefix="$prefix"
13240 prefix="$acl_final_prefix"
13241 acl_save_exec_prefix="$exec_prefix"
13242 exec_prefix="$acl_final_exec_prefix"
13243 eval x=\"$x\"
13244 exec_prefix="$acl_save_exec_prefix"
13245 prefix="$acl_save_prefix"
13246
13247 if test "X$x" = "X-I$additional_includedir"; then
13248 haveit=yes
13249 break
13250 fi
13251 done
13252 if test -z "$haveit"; then
13253 if test -d "$additional_includedir"; then
13254 INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir"
13255 fi
13256 fi
13257 fi
13258 fi
13259 fi
13260 if test -n "$found_la"; then
13261 save_libdir="$libdir"
13262 case "$found_la" in
13263 */* | *\\*) . "$found_la" ;;
13264 *) . "./$found_la" ;;
13265 esac
13266 libdir="$save_libdir"
13267 for dep in $dependency_libs; do
13268 case "$dep" in
13269 -L*)
13270 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
13271 if test "X$additional_libdir" != "X/usr/lib"; then
13272 haveit=
13273 if test "X$additional_libdir" = "X/usr/local/lib"; then
13274 if test -n "$GCC"; then
13275 case $host_os in
13276 linux*) haveit=yes;;
13277 esac
13278 fi
13279 fi
13280 if test -z "$haveit"; then
13281 haveit=
13282 for x in $LDFLAGS $LIBLZMA; do
13283
13284 acl_save_prefix="$prefix"
13285 prefix="$acl_final_prefix"
13286 acl_save_exec_prefix="$exec_prefix"
13287 exec_prefix="$acl_final_exec_prefix"
13288 eval x=\"$x\"
13289 exec_prefix="$acl_save_exec_prefix"
13290 prefix="$acl_save_prefix"
13291
13292 if test "X$x" = "X-L$additional_libdir"; then
13293 haveit=yes
13294 break
13295 fi
13296 done
13297 if test -z "$haveit"; then
13298 if test -d "$additional_libdir"; then
13299 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir"
13300 fi
13301 fi
13302 haveit=
13303 for x in $LDFLAGS $LTLIBLZMA; do
13304
13305 acl_save_prefix="$prefix"
13306 prefix="$acl_final_prefix"
13307 acl_save_exec_prefix="$exec_prefix"
13308 exec_prefix="$acl_final_exec_prefix"
13309 eval x=\"$x\"
13310 exec_prefix="$acl_save_exec_prefix"
13311 prefix="$acl_save_prefix"
13312
13313 if test "X$x" = "X-L$additional_libdir"; then
13314 haveit=yes
13315 break
13316 fi
13317 done
13318 if test -z "$haveit"; then
13319 if test -d "$additional_libdir"; then
13320 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir"
13321 fi
13322 fi
13323 fi
13324 fi
13325 ;;
13326 -R*)
13327 dir=`echo "X$dep" | sed -e 's/^X-R//'`
13328 if test "$enable_rpath" != no; then
13329 haveit=
13330 for x in $rpathdirs; do
13331 if test "X$x" = "X$dir"; then
13332 haveit=yes
13333 break
13334 fi
13335 done
13336 if test -z "$haveit"; then
13337 rpathdirs="$rpathdirs $dir"
13338 fi
13339 haveit=
13340 for x in $ltrpathdirs; do
13341 if test "X$x" = "X$dir"; then
13342 haveit=yes
13343 break
13344 fi
13345 done
13346 if test -z "$haveit"; then
13347 ltrpathdirs="$ltrpathdirs $dir"
13348 fi
13349 fi
13350 ;;
13351 -l*)
13352 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
13353 ;;
13354 *.la)
13355 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
13356 ;;
13357 *)
13358 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep"
13359 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep"
13360 ;;
13361 esac
13362 done
13363 fi
13364 else
13365 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
13366 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name"
13367 fi
13368 fi
13369 fi
13370 done
13371 done
13372 if test "X$rpathdirs" != "X"; then
13373 if test -n "$hardcode_libdir_separator"; then
13374 alldirs=
13375 for found_dir in $rpathdirs; do
13376 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
13377 done
13378 acl_save_libdir="$libdir"
13379 libdir="$alldirs"
13380 eval flag=\"$hardcode_libdir_flag_spec\"
13381 libdir="$acl_save_libdir"
13382 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
13383 else
13384 for found_dir in $rpathdirs; do
13385 acl_save_libdir="$libdir"
13386 libdir="$found_dir"
13387 eval flag=\"$hardcode_libdir_flag_spec\"
13388 libdir="$acl_save_libdir"
13389 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
13390 done
13391 fi
13392 fi
13393 if test "X$ltrpathdirs" != "X"; then
13394 for found_dir in $ltrpathdirs; do
13395 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir"
13396 done
13397 fi
13398
13399
13400 ac_save_CPPFLAGS="$CPPFLAGS"
13401
13402 for element in $INCLZMA; do
13403 haveit=
13404 for x in $CPPFLAGS; do
13405
13406 acl_save_prefix="$prefix"
13407 prefix="$acl_final_prefix"
13408 acl_save_exec_prefix="$exec_prefix"
13409 exec_prefix="$acl_final_exec_prefix"
13410 eval x=\"$x\"
13411 exec_prefix="$acl_save_exec_prefix"
13412 prefix="$acl_save_prefix"
13413
13414 if test "X$x" = "X$element"; then
13415 haveit=yes
13416 break
13417 fi
13418 done
13419 if test -z "$haveit"; then
13420 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
13421 fi
13422 done
13423
13424
13425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5
13426$as_echo_n "checking for liblzma... " >&6; }
13427if test "${ac_cv_liblzma+set}" = set; then :
13428 $as_echo_n "(cached) " >&6
13429else
13430
13431 ac_save_LIBS="$LIBS"
13432 LIBS="$LIBS $LIBLZMA"
13433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13434/* end confdefs.h. */
13435#include "lzma.h"
13436int
13437main ()
13438{
13439lzma_index_iter iter;
13440 lzma_index_iter_init (&iter, 0);
13441 lzma_mf_is_supported (LZMA_MF_HC3);
13442 ;
13443 return 0;
13444}
13445_ACEOF
13446if ac_fn_c_try_link "$LINENO"; then :
13447 ac_cv_liblzma=yes
13448else
13449 ac_cv_liblzma=no
13450fi
13451rm -f core conftest.err conftest.$ac_objext \
13452 conftest$ac_exeext conftest.$ac_ext
13453 LIBS="$ac_save_LIBS"
13454
13455fi
13456{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5
13457$as_echo "$ac_cv_liblzma" >&6; }
13458 if test "$ac_cv_liblzma" = yes; then
13459 HAVE_LIBLZMA=yes
13460
13461$as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h
13462
13463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5
13464$as_echo_n "checking how to link with liblzma... " >&6; }
13465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5
13466$as_echo "$LIBLZMA" >&6; }
13467 else
13468 HAVE_LIBLZMA=no
13469 CPPFLAGS="$ac_save_CPPFLAGS"
13470 LIBLZMA=
13471 LTLIBLZMA=
13472 fi
13473
13474
13475
13476
13477
13478
13479 if test "$HAVE_LIBLZMA" != yes; then
13480 if test "$with_lzma" = yes; then
13481 as_fn_error "missing liblzma for --with-lzma" "$LINENO" 5
13482 fi
13483 fi
13484 fi
13485fi
13486
3fc11d3e
JM
13487LIBGUI="../libgui/src/libgui.a"
13488GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
13489
13490
7a292a7a 13491
3fc11d3e
JM
13492WIN32LDAPP=
13493
13494
13495
d91670b9 13496case "${host}" in
686a5eed 13497*-*-cygwin* | *-*-mingw* )
d91670b9
CV
13498 configdir="win"
13499 ;;
13500*)
13501 configdir="unix"
13502 ;;
13503esac
3fc11d3e
JM
13504
13505GDBTKLIBS=
13506if test "${enable_gdbtk}" = "yes"; then
13507
d1c3b63a
KS
13508 # Gdbtk must have an absolute path to srcdir in order to run
13509 # properly when not installed.
13510 here=`pwd`
13511 cd ${srcdir}
13512 GDBTK_SRC_DIR=`pwd`
13513 cd $here
13514
bec39cab 13515
5062cc19
KS
13516 #
13517 # Ok, lets find the tcl configuration
13518 # First, look for one uninstalled.
13519 # the alternative search directory is invoked by --with-tcl
13520 #
3fc11d3e 13521
5062cc19
KS
13522 if test x"${no_tcl}" = x ; then
13523 # we reset no_tcl in case something fails here
13524 no_tcl=true
bec39cab 13525
81ecdfbb
RW
13526# Check whether --with-tcl was given.
13527if test "${with_tcl+set}" = set; then :
13528 withval=$with_tcl; with_tclconfig=${withval}
13529fi
13530
13531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
13532$as_echo_n "checking for Tcl configuration... " >&6; }
13533 if test "${ac_cv_c_tclconfig+set}" = set; then :
13534 $as_echo_n "(cached) " >&6
3fc11d3e 13535else
bec39cab 13536
3fc11d3e 13537
5062cc19
KS
13538 # First check to see if --with-tcl was specified.
13539 case "${host}" in
13540 *-*-cygwin*) platDir="win" ;;
13541 *) platDir="unix" ;;
13542 esac
13543 if test x"${with_tclconfig}" != x ; then
13544 if test -f "${with_tclconfig}/tclConfig.sh" ; then
13545 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
13546 else
81ecdfbb 13547 as_fn_error "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
5062cc19
KS
13548 fi
13549 fi
13550
13551 # then check for a private Tcl installation
13552 if test x"${ac_cv_c_tclconfig}" = x ; then
13553 for i in \
13554 ../tcl \
13555 `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
13556 `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
13557 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
13558 ../../tcl \
13559 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
13560 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
13561 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
13562 ../../../tcl \
13563 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
13564 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
13565 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
13566 if test -f "$i/$platDir/tclConfig.sh" ; then
13567 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
13568 break
13569 fi
13570 done
13571 fi
13572
13573 # on Darwin, check in Framework installation locations
13574 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
13575 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
13576 `ls -d /Library/Frameworks 2>/dev/null` \
13577 `ls -d /Network/Library/Frameworks 2>/dev/null` \
13578 `ls -d /System/Library/Frameworks 2>/dev/null` \
13579 ; do
13580 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
13581 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
13582 break
13583 fi
13584 done
13585 fi
13586
13587 # check in a few common install locations
13588 if test x"${ac_cv_c_tclconfig}" = x ; then
13589 for i in `ls -d ${libdir} 2>/dev/null` \
13590 `ls -d ${exec_prefix}/lib 2>/dev/null` \
13591 `ls -d ${prefix}/lib 2>/dev/null` \
13592 `ls -d /usr/local/lib 2>/dev/null` \
13593 `ls -d /usr/contrib/lib 2>/dev/null` \
13594 `ls -d /usr/lib 2>/dev/null` \
13595 ; do
13596 if test -f "$i/tclConfig.sh" ; then
13597 ac_cv_c_tclconfig=`(cd $i; pwd)`
13598 break
13599 fi
13600 done
13601 fi
3fc11d3e 13602
5062cc19
KS
13603 # check in a few other private locations
13604 if test x"${ac_cv_c_tclconfig}" = x ; then
13605 for i in \
13606 ${srcdir}/../tcl \
13607 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
13608 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
13609 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
13610 if test -f "$i/$platDir/tclConfig.sh" ; then
13611 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
13612 break
13613 fi
13614 done
13615 fi
bec39cab 13616
3fc11d3e
JM
13617fi
13618
5062cc19
KS
13619
13620 if test x"${ac_cv_c_tclconfig}" = x ; then
13621 TCL_BIN_DIR="# no Tcl configs found"
81ecdfbb
RW
13622 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
13623$as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
5062cc19
KS
13624 else
13625 no_tcl=
13626 TCL_BIN_DIR=${ac_cv_c_tclconfig}
81ecdfbb
RW
13627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
13628$as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
5062cc19
KS
13629 fi
13630 fi
3fc11d3e 13631
bec39cab 13632
85541719
DE
13633 # If $no_tk is nonempty, then we can't do Tk, and there is no
13634 # point to doing Tcl.
bec39cab 13635
5062cc19
KS
13636 #
13637 # Ok, lets find the tk configuration
13638 # First, look for one uninstalled.
13639 # the alternative search directory is invoked by --with-tk
13640 #
3fc11d3e 13641
5062cc19
KS
13642 if test x"${no_tk}" = x ; then
13643 # we reset no_tk in case something fails here
13644 no_tk=true
bec39cab 13645
81ecdfbb
RW
13646# Check whether --with-tk was given.
13647if test "${with_tk+set}" = set; then :
13648 withval=$with_tk; with_tkconfig=${withval}
13649fi
13650
13651 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
13652$as_echo_n "checking for Tk configuration... " >&6; }
13653 if test "${ac_cv_c_tkconfig+set}" = set; then :
13654 $as_echo_n "(cached) " >&6
bec39cab 13655else
3fc11d3e
JM
13656
13657
5062cc19
KS
13658 # First check to see if --with-tkconfig was specified.
13659 if test x"${with_tkconfig}" != x ; then
13660 if test -f "${with_tkconfig}/tkConfig.sh" ; then
13661 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
13662 else
81ecdfbb 13663 as_fn_error "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
5062cc19
KS
13664 fi
13665 fi
3fc11d3e 13666
5062cc19
KS
13667 # then check for a private Tk library
13668 case "${host}" in
13669 *-*-cygwin*) platDir="win" ;;
13670 *) platDir="unix" ;;
13671 esac
13672 if test x"${ac_cv_c_tkconfig}" = x ; then
13673 for i in \
13674 ../tk \
13675 `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
13676 `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
13677 `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
13678 ../../tk \
13679 `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
13680 `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
13681 `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
13682 ../../../tk \
13683 `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
13684 `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
13685 `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
13686 if test -f "$i/$platDir/tkConfig.sh" ; then
13687 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
13688 break
13689 fi
13690 done
13691 fi
13692
13693 # on Darwin, check in Framework installation locations
13694 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
13695 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
13696 `ls -d /Library/Frameworks 2>/dev/null` \
13697 `ls -d /Network/Library/Frameworks 2>/dev/null` \
13698 `ls -d /System/Library/Frameworks 2>/dev/null` \
13699 ; do
13700 if test -f "$i/Tk.framework/tkConfig.sh" ; then
13701 ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
13702 break
13703 fi
13704 done
13705 fi
13706
13707 # check in a few common install locations
13708 if test x"${ac_cv_c_tkconfig}" = x ; then
13709 for i in `ls -d ${libdir} 2>/dev/null` \
13710 `ls -d ${exec_prefix}/lib 2>/dev/null` \
13711 `ls -d ${prefix}/lib 2>/dev/null` \
13712 `ls -d /usr/local/lib 2>/dev/null` \
13713 `ls -d /usr/contrib/lib 2>/dev/null` \
13714 `ls -d /usr/lib 2>/dev/null` \
13715 ; do
13716 if test -f "$i/tkConfig.sh" ; then
13717 ac_cv_c_tkconfig=`(cd $i; pwd)`
13718 break
13719 fi
13720 done
13721 fi
13722 # check in a few other private locations
13723 if test x"${ac_cv_c_tkconfig}" = x ; then
13724 for i in \
13725 ${srcdir}/../tk \
13726 `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
13727 `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
13728 `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
13729 if test -f "$i/$platDir/tkConfig.sh" ; then
13730 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
13731 break
13732 fi
13733 done
13734 fi
3fc11d3e 13735
3fc11d3e
JM
13736fi
13737
13738
5062cc19
KS
13739 if test x"${ac_cv_c_tkconfig}" = x ; then
13740 TK_BIN_DIR="# no Tk configs found"
81ecdfbb
RW
13741 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
13742$as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
5062cc19
KS
13743 else
13744 no_tk=
13745 TK_BIN_DIR=${ac_cv_c_tkconfig}
81ecdfbb
RW
13746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
13747$as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
5062cc19 13748 fi
3fc11d3e 13749 fi
dd2504ab 13750
dd2504ab 13751
85541719
DE
13752 if test -z "${no_tcl}" -a -z "${no_tk}"; then
13753
81ecdfbb
RW
13754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
13755$as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
85541719
DE
13756
13757 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
81ecdfbb
RW
13758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
13759$as_echo "loading" >&6; }
85541719
DE
13760 . ${TCL_BIN_DIR}/tclConfig.sh
13761 else
81ecdfbb
RW
13762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
13763$as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
85541719
DE
13764 fi
13765
13766 # eval is required to do the TCL_DBGX substitution
13767 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
13768 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
13769
13770 # If the TCL_BIN_DIR is the build directory (not the install directory),
13771 # then set the common variable name to the value of the build variables.
13772 # For example, the variable TCL_LIB_SPEC will be set to the value
13773 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
13774 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
13775 # installed and uninstalled version of Tcl.
13776 if test -f "${TCL_BIN_DIR}/Makefile" ; then
13777 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
13778 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
13779 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
13780 elif test "`uname -s`" = "Darwin"; then
13781 # If Tcl was built as a framework, attempt to use the libraries
13782 # from the framework at the given location so that linking works
a68ffae9 13783 # against Tcl.framework installed in an arbitrary location.
85541719
DE
13784 case ${TCL_DEFS} in
13785 *TCL_FRAMEWORK*)
13786 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
13787 for i in "`cd ${TCL_BIN_DIR}; pwd`" \
13788 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
13789 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
13790 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
13791 break
13792 fi
13793 done
13794 fi
13795 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
13796 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
13797 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
13798 fi
13799 ;;
13800 esac
13801 fi
13802
13803 # eval is required to do the TCL_DBGX substitution
13804 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
13805 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
13806 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
13807 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
13808
13809
13810
13811
13812
13813
13814
13815
13816
13817
13818
13819
13820
13821
13822
13823 # Check for in-tree tcl
13824 here=`pwd`
13825 cd ${srcdir}/..
13826 topdir=`pwd`
13827 cd ${here}
13828
13829 intree="no"
13830 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
13831 intree="yes"
13832 fi
13833
13834 # Find Tcl private headers
13835 if test x"${intree}" = xno; then
13836
81ecdfbb
RW
13837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
13838$as_echo_n "checking for Tcl private headers... " >&6; }
85541719
DE
13839 private_dir=""
13840 dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
13841 if test -f ${dir}/tclInt.h ; then
13842 private_dir=${dir}
13843 fi
13844
13845 if test x"${private_dir}" = x; then
81ecdfbb 13846 as_fn_error "could not find private Tcl headers" "$LINENO" 5
85541719
DE
13847 else
13848 TCL_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
13849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
13850$as_echo "${private_dir}" >&6; }
85541719
DE
13851 fi
13852
13853 TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
13854 TCL_LIBRARY="${TCL_LIB_SPEC}"
13855 TCL_DEPS=""
13856 else
13857 # If building tcl in the same src tree, private headers
13858 # are not needed, but we need to be sure to use the right
13859 # headers library
13860 TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
13861 TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
13862 TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
13863 fi
13864
13865
13866
13867
13868
81ecdfbb
RW
13869 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
13870$as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
dd2504ab 13871
5062cc19 13872 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
81ecdfbb
RW
13873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
13874$as_echo "loading" >&6; }
5062cc19 13875 . ${TK_BIN_DIR}/tkConfig.sh
3fc11d3e 13876 else
81ecdfbb
RW
13877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
13878$as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
3fc11d3e 13879 fi
bec39cab 13880
5062cc19
KS
13881 # eval is required to do the TK_DBGX substitution
13882 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
13883 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
13884
13885 # If the TK_BIN_DIR is the build directory (not the install directory),
13886 # then set the common variable name to the value of the build variables.
13887 # For example, the variable TK_LIB_SPEC will be set to the value
13888 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
13889 # instead of TK_BUILD_LIB_SPEC since it will work with both an
13890 # installed and uninstalled version of Tcl.
85541719 13891 if test -f "${TK_BIN_DIR}/Makefile" ; then
5062cc19
KS
13892 TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
13893 TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
13894 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
13895 elif test "`uname -s`" = "Darwin"; then
13896 # If Tk was built as a framework, attempt to use the libraries
13897 # from the framework at the given location so that linking works
a68ffae9 13898 # against Tk.framework installed in an arbitrary location.
5062cc19
KS
13899 case ${TK_DEFS} in
13900 *TK_FRAMEWORK*)
85541719 13901 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
5062cc19
KS
13902 for i in "`cd ${TK_BIN_DIR}; pwd`" \
13903 "`cd ${TK_BIN_DIR}/../..; pwd`"; do
13904 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
13905 TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
13906 break
13907 fi
13908 done
13909 fi
85541719 13910 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
5062cc19
KS
13911 TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
13912 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
13913 fi
13914 ;;
13915 esac
3fc11d3e
JM
13916 fi
13917
5062cc19
KS
13918 # eval is required to do the TK_DBGX substitution
13919 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
13920 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
13921 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
13922 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
3fc11d3e 13923
3fc11d3e
JM
13924
13925
bec39cab
AC
13926
13927
13928
13929
13930
13931
13932
3fc11d3e 13933
3fc11d3e 13934
bec39cab 13935
bec39cab 13936
85541719
DE
13937 # Check for in-tree Tk
13938 intree="no"
13939 if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
13940 intree="yes"
13941 fi
3fc11d3e 13942
85541719
DE
13943 # Find Tk private headers
13944 if test x"${intree}" = xno; then
3fc11d3e 13945
81ecdfbb
RW
13946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
13947$as_echo_n "checking for Tk private headers... " >&6; }
5062cc19
KS
13948 private_dir=""
13949 dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
13950 if test -f ${dir}/tkInt.h; then
13951 private_dir=${dir}
3fc11d3e 13952 fi
bec39cab 13953
5062cc19 13954 if test x"${private_dir}" = x; then
81ecdfbb 13955 as_fn_error "could not find Tk private headers" "$LINENO" 5
3fc11d3e 13956 else
5062cc19 13957 TK_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
13958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
13959$as_echo "${private_dir}" >&6; }
3fc11d3e 13960 fi
3fc11d3e 13961
85541719
DE
13962 TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
13963 TK_LIBRARY=${TK_LIB_SPEC}
13964 TK_DEPS=""
13965 else
13966 TK_INCLUDE="-I${TK_SRC_DIR}/generic"
13967 TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
13968 TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
13969 fi
3fc11d3e
JM
13970
13971
3fc11d3e
JM
13972
13973
3fc11d3e 13974
85541719 13975 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e 13976
85541719
DE
13977 # Include some libraries that Tcl and Tk want.
13978 TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
13979 # Yes, the ordering seems wrong here. But it isn't.
13980 # TK_LIBS is the list of libraries that need to be linked
13981 # after Tcl/Tk. Note that this isn't put into LIBS. If it
13982 # were in LIBS then any link tests after this point would
13983 # try to include things like `$(LIBGUI)', which wouldn't work.
13984 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5 13985
85541719
DE
13986 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
13987 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
13988 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
13989 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
13990 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
13991 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
13992 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
3fc11d3e 13993
85541719
DE
13994 if test x$gdb_cv_os_cygwin = xyes; then
13995 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
13996 WIN32LDAPP="-Wl,--subsystem,console"
13997 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
3fc11d3e 13998 fi
ffc6a242 13999
81ecdfbb 14000 subdirs="$subdirs gdbtk"
3ace7edb 14001
85541719 14002 fi
3fc11d3e
JM
14003fi
14004
14005
14006
14007
14008
14009
14010
14011
81ecdfbb
RW
14012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
14013$as_echo_n "checking for X... " >&6; }
bec39cab 14014
c906108c 14015
81ecdfbb
RW
14016# Check whether --with-x was given.
14017if test "${with_x+set}" = set; then :
14018 withval=$with_x;
14019fi
c906108c
SS
14020
14021# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
14022if test "x$with_x" = xno; then
14023 # The user explicitly disabled X.
14024 have_x=disabled
14025else
81ecdfbb
RW
14026 case $x_includes,$x_libraries in #(
14027 *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
14028 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
14029 $as_echo_n "(cached) " >&6
c906108c
SS
14030else
14031 # One or both of the vars are not set, and there is no cached value.
bec39cab 14032ac_x_includes=no ac_x_libraries=no
81ecdfbb 14033rm -f -r conftest.dir
bec39cab
AC
14034if mkdir conftest.dir; then
14035 cd conftest.dir
bec39cab 14036 cat >Imakefile <<'_ACEOF'
81ecdfbb
RW
14037incroot:
14038 @echo incroot='${INCROOT}'
14039usrlibdir:
14040 @echo usrlibdir='${USRLIBDIR}'
14041libdir:
14042 @echo libdir='${LIBDIR}'
14043_ACEOF
14044 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
c906108c 14045 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
81ecdfbb
RW
14046 for ac_var in incroot usrlibdir libdir; do
14047 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
14048 done
c906108c 14049 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
81ecdfbb
RW
14050 for ac_extension in a so sl dylib la dll; do
14051 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
14052 test -f "$ac_im_libdir/libX11.$ac_extension"; then
bec39cab 14053 ac_im_usrlibdir=$ac_im_libdir; break
c906108c
SS
14054 fi
14055 done
14056 # Screen out bogus values from the imake configuration. They are
14057 # bogus both because they are the default anyway, and because
14058 # using them would break gcc on systems where it needs fixed includes.
bec39cab 14059 case $ac_im_incroot in
81ecdfbb 14060 /usr/include) ac_x_includes= ;;
bec39cab 14061 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
c906108c 14062 esac
bec39cab 14063 case $ac_im_usrlibdir in
81ecdfbb 14064 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
bec39cab 14065 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
c906108c
SS
14066 esac
14067 fi
14068 cd ..
81ecdfbb 14069 rm -f -r conftest.dir
c906108c
SS
14070fi
14071
bec39cab
AC
14072# Standard set of common directories for X headers.
14073# Check X11 before X11Rn because it is often a symlink to the current release.
14074ac_x_header_dirs='
14075/usr/X11/include
81ecdfbb 14076/usr/X11R7/include
bec39cab
AC
14077/usr/X11R6/include
14078/usr/X11R5/include
14079/usr/X11R4/include
14080
14081/usr/include/X11
81ecdfbb 14082/usr/include/X11R7
bec39cab
AC
14083/usr/include/X11R6
14084/usr/include/X11R5
14085/usr/include/X11R4
14086
14087/usr/local/X11/include
81ecdfbb 14088/usr/local/X11R7/include
bec39cab
AC
14089/usr/local/X11R6/include
14090/usr/local/X11R5/include
14091/usr/local/X11R4/include
14092
14093/usr/local/include/X11
81ecdfbb 14094/usr/local/include/X11R7
bec39cab
AC
14095/usr/local/include/X11R6
14096/usr/local/include/X11R5
14097/usr/local/include/X11R4
14098
14099/usr/X386/include
14100/usr/x386/include
14101/usr/XFree86/include/X11
14102
14103/usr/include
14104/usr/local/include
14105/usr/unsupported/include
14106/usr/athena/include
14107/usr/local/x11r5/include
14108/usr/lpp/Xamples/include
14109
14110/usr/openwin/include
14111/usr/openwin/share/include'
14112
14113if test "$ac_x_includes" = no; then
81ecdfbb 14114 # Guess where to find include files, by looking for Xlib.h.
c906108c 14115 # First, try using that file with no special directory specified.
81ecdfbb 14116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14117/* end confdefs.h. */
81ecdfbb 14118#include <X11/Xlib.h>
bec39cab 14119_ACEOF
81ecdfbb 14120if ac_fn_c_try_cpp "$LINENO"; then :
c906108c
SS
14121 # We can compile using X headers with no special include directory.
14122ac_x_includes=
14123else
bec39cab 14124 for ac_dir in $ac_x_header_dirs; do
81ecdfbb 14125 if test -r "$ac_dir/X11/Xlib.h"; then
bec39cab
AC
14126 ac_x_includes=$ac_dir
14127 break
14128 fi
14129done
c906108c 14130fi
bec39cab
AC
14131rm -f conftest.err conftest.$ac_ext
14132fi # $ac_x_includes = no
c906108c 14133
bec39cab 14134if test "$ac_x_libraries" = no; then
c906108c 14135 # Check for the libraries.
c906108c
SS
14136 # See if we find them without any special options.
14137 # Don't add to $LIBS permanently.
bec39cab 14138 ac_save_LIBS=$LIBS
81ecdfbb
RW
14139 LIBS="-lX11 $LIBS"
14140 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14141/* end confdefs.h. */
81ecdfbb 14142#include <X11/Xlib.h>
bec39cab
AC
14143int
14144main ()
14145{
81ecdfbb 14146XrmInitialize ()
bec39cab
AC
14147 ;
14148 return 0;
14149}
14150_ACEOF
81ecdfbb 14151if ac_fn_c_try_link "$LINENO"; then :
bec39cab 14152 LIBS=$ac_save_LIBS
c906108c
SS
14153# We can link X programs with no special library path.
14154ac_x_libraries=
14155else
81ecdfbb
RW
14156 LIBS=$ac_save_LIBS
14157for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
c906108c 14158do
bec39cab 14159 # Don't even attempt the hair of trying to link an X program!
81ecdfbb
RW
14160 for ac_extension in a so sl dylib la dll; do
14161 if test -r "$ac_dir/libX11.$ac_extension"; then
c906108c
SS
14162 ac_x_libraries=$ac_dir
14163 break 2
14164 fi
14165 done
14166done
14167fi
81ecdfbb
RW
14168rm -f core conftest.err conftest.$ac_objext \
14169 conftest$ac_exeext conftest.$ac_ext
bec39cab 14170fi # $ac_x_libraries = no
c906108c 14171
81ecdfbb
RW
14172case $ac_x_includes,$ac_x_libraries in #(
14173 no,* | *,no | *\'*)
14174 # Didn't find X, or a directory has "'" in its name.
14175 ac_cv_have_x="have_x=no";; #(
14176 *)
14177 # Record where we found X for the cache.
14178 ac_cv_have_x="have_x=yes\
14179 ac_x_includes='$ac_x_includes'\
14180 ac_x_libraries='$ac_x_libraries'"
14181esac
c906108c 14182fi
81ecdfbb
RW
14183;; #(
14184 *) have_x=yes;;
14185 esac
c906108c
SS
14186 eval "$ac_cv_have_x"
14187fi # $with_x != no
14188
14189if test "$have_x" != yes; then
81ecdfbb
RW
14190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
14191$as_echo "$have_x" >&6; }
c906108c
SS
14192 no_x=yes
14193else
14194 # If each of the values was on the command line, it overrides each guess.
14195 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
14196 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
14197 # Update the cache value to reflect the command line values.
81ecdfbb
RW
14198 ac_cv_have_x="have_x=yes\
14199 ac_x_includes='$x_includes'\
14200 ac_x_libraries='$x_libraries'"
14201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
14202$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
c906108c
SS
14203fi
14204
14205
bec39cab 14206# Unlike the sim directory, whether a simulator is linked is controlled by
9b624dbe 14207# presence of a gdb_sim definition in the target configure.tgt entry.
7a292a7a
SS
14208# This code just checks for a few cases where we'd like to ignore those
14209# definitions, even when they're present in the '.mt' file. These cases
14210# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 14211# not part of the source tree.
7a292a7a 14212#
81ecdfbb
RW
14213# Check whether --enable-sim was given.
14214if test "${enable_sim+set}" = set; then :
14215 enableval=$enable_sim; echo "enable_sim = $enable_sim";
7a292a7a
SS
14216 echo "enableval = ${enableval}";
14217 case "${enableval}" in
14218 yes) ignore_sim=false ;;
14219 no) ignore_sim=true ;;
14220 *) ignore_sim=false ;;
14221 esac
14222else
14223 ignore_sim=false
81ecdfbb
RW
14224fi
14225
7a292a7a
SS
14226
14227if test ! -d "${srcdir}/../sim"; then
14228 ignore_sim=true
14229fi
14230
9b624dbe
UW
14231SIM=
14232SIM_OBS=
14233if test "${ignore_sim}" = "false"; then
14234 if test x"${gdb_sim}" != x ; then
14235 SIM="${gdb_sim}"
14236 SIM_OBS="remote-sim.o"
60ca704f 14237
81ecdfbb 14238$as_echo "#define WITH_SIM 1" >>confdefs.h
7a292a7a 14239
9b624dbe 14240 fi
7a292a7a
SS
14241fi
14242
14243
14244
c906108c
SS
14245
14246
14247
14248
14249
14250
dfcd3bfb 14251
e56ac5c3
AC
14252
14253
b3a90332
AC
14254
14255
c35f4ffc 14256# List of host floatformats.
bec39cab
AC
14257
14258cat >>confdefs.h <<_ACEOF
c35f4ffc 14259#define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
bec39cab 14260_ACEOF
c35f4ffc 14261
bec39cab
AC
14262
14263cat >>confdefs.h <<_ACEOF
c35f4ffc 14264#define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
bec39cab
AC
14265_ACEOF
14266
c35f4ffc 14267
bec39cab 14268cat >>confdefs.h <<_ACEOF
c35f4ffc 14269#define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
bec39cab 14270_ACEOF
c35f4ffc
AC
14271
14272
c906108c
SS
14273# target_subdir is used by the testsuite to find the target libraries.
14274target_subdir=
14275if test "${host}" != "${target}"; then
14276 target_subdir="${target_alias}/"
14277fi
14278
14279
14280frags=
771b4502 14281if test "${gdb_native}" = "yes"; then
0dad8a66
MK
14282 host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
14283 if test ! -f ${host_makefile_frag}; then
81ecdfbb 14284 as_fn_error "\"*** Gdb does not support native target ${host}\"" "$LINENO" 5
0dad8a66
MK
14285 fi
14286 frags="$frags $host_makefile_frag"
14287else
14288 host_makefile_frag=/dev/null
c906108c 14289fi
c906108c 14290
c906108c
SS
14291
14292
14293
771b4502 14294if test "${gdb_native}" = "yes"; then
a85f51e7
DJ
14295# We pick this up from the host configuration file (.mh) because we
14296# do not have a native configuration Makefile fragment.
c906108c
SS
14297nativefile=`sed -n '
14298s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
14299' ${host_makefile_frag}`
c906108c
SS
14300fi
14301
14302
b00a8037 14303if test x"${gdb_osabi}" != x ; then
bec39cab
AC
14304
14305cat >>confdefs.h <<_ACEOF
b00a8037 14306#define GDB_OSABI_DEFAULT $gdb_osabi
bec39cab 14307_ACEOF
b00a8037
DJ
14308
14309fi
14310
8dcde887 14311# Enable multi-ice-gdb-server.
81ecdfbb
RW
14312# Check whether --enable-multi-ice was given.
14313if test "${enable_multi_ice+set}" = set; then :
14314 enableval=$enable_multi_ice; case $enableval in
8dcde887
MK
14315 yes | no)
14316 ;;
81ecdfbb 14317 *) as_fn_error "bad value $enableval for --enable-multi-ice" "$LINENO" 5 ;;
8dcde887 14318 esac
81ecdfbb 14319fi
b4e70030 14320
81ecdfbb
RW
14321if test "x$enable_multi_ice" = xyes; then
14322 subdirs="$subdirs multi-ice"
3ace7edb 14323
a85f51e7
DJ
14324fi
14325
496c0e1b
JB
14326# Check whether --enable-gdbserver was given.
14327if test "${enable_gdbserver+set}" = set; then :
14328 enableval=$enable_gdbserver; case "${enableval}" in
14329 yes| no|auto) ;;
14330 *) as_fn_error "bad value ${enableval} for --enable-gdbserver option" "$LINENO" 5 ;;
14331esac
14332else
14333 enable_gdbserver=auto
14334fi
14335
14336
14337# We only build gdbserver automatically in a native configuration, and
14338# only if the user did not explicitly disable its build.
14339if test "$gdb_native" = "yes" -a "$enable_gdbserver" != "no"; then
81ecdfbb
RW
14340 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5
14341$as_echo_n "checking whether gdbserver is supported on this host... " >&6; }
8dcde887 14342 if test "x$build_gdbserver" = xyes; then
81ecdfbb
RW
14343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14344$as_echo "yes" >&6; }
14345 subdirs="$subdirs gdbserver"
3ace7edb 14346
496c0e1b 14347 gdbserver_build_enabled=yes
8dcde887 14348 else
81ecdfbb
RW
14349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14350$as_echo "no" >&6; }
8dcde887
MK
14351 fi
14352fi
14353
496c0e1b
JB
14354# If the user explicitly request the gdbserver to be built, verify that
14355# we were in fact able to enable it.
14356if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then
14357 as_fn_error "Automatic gdbserver build is not supported for this configuration" "$LINENO" 5
14358fi
14359
393fd4c3
YQ
14360# Check for babeltrace and babeltrace-ctf
14361
14362# Check whether --with-babeltrace was given.
14363if test "${with_babeltrace+set}" = set; then :
14364 withval=$with_babeltrace;
14365else
14366 with_babeltrace=auto
14367fi
14368
14369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltrace" >&5
14370$as_echo_n "checking whether to use babeltrace... " >&6; }
14371{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5
14372$as_echo "$with_babeltrace" >&6; }
14373
14374if test "x$with_babeltrace" = "xno"; then
14375 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&5
14376$as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&2;}
14377else
14378 # Append -Werror to CFLAGS so that configure can catch the warning
14379 # "assignment from incompatible pointer type", which is related to
14380 # the babeltrace change from 1.0.3 to 1.1.0. Babeltrace 1.1.0 works
14381 # in GDB, while babeltrace 1.0.3 is broken.
14382 # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be
14383 # safe to save and restore CFLAGS here.
14384 saved_CFLAGS=$CFLAGS
14385 CFLAGS="$CFLAGS -Werror"
14386
14387
14388
14389
14390
14391
14392
14393
14394 use_additional=yes
14395
14396 acl_save_prefix="$prefix"
14397 prefix="$acl_final_prefix"
14398 acl_save_exec_prefix="$exec_prefix"
14399 exec_prefix="$acl_final_exec_prefix"
14400
14401 eval additional_includedir=\"$includedir\"
14402 eval additional_libdir=\"$libdir\"
14403
14404 exec_prefix="$acl_save_exec_prefix"
14405 prefix="$acl_save_prefix"
14406
14407
14408# Check whether --with-libbabeltrace-prefix was given.
14409if test "${with_libbabeltrace_prefix+set}" = set; then :
14410 withval=$with_libbabeltrace_prefix;
14411 if test "X$withval" = "Xno"; then
14412 use_additional=no
14413 else
14414 if test "X$withval" = "X"; then
14415
14416 acl_save_prefix="$prefix"
14417 prefix="$acl_final_prefix"
14418 acl_save_exec_prefix="$exec_prefix"
14419 exec_prefix="$acl_final_exec_prefix"
14420
14421 eval additional_includedir=\"$includedir\"
14422 eval additional_libdir=\"$libdir\"
14423
14424 exec_prefix="$acl_save_exec_prefix"
14425 prefix="$acl_save_prefix"
14426
14427 else
14428 additional_includedir="$withval/include"
14429 additional_libdir="$withval/lib"
14430 fi
14431 fi
14432
14433fi
14434
14435 LIBBABELTRACE=
14436 LTLIBBABELTRACE=
14437 INCBABELTRACE=
14438 rpathdirs=
14439 ltrpathdirs=
14440 names_already_handled=
14441 names_next_round='babeltrace babeltrace-ctf'
14442 while test -n "$names_next_round"; do
14443 names_this_round="$names_next_round"
14444 names_next_round=
14445 for name in $names_this_round; do
14446 already_handled=
14447 for n in $names_already_handled; do
14448 if test "$n" = "$name"; then
14449 already_handled=yes
14450 break
14451 fi
14452 done
14453 if test -z "$already_handled"; then
14454 names_already_handled="$names_already_handled $name"
14455 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
14456 eval value=\"\$HAVE_LIB$uppername\"
14457 if test -n "$value"; then
14458 if test "$value" = yes; then
14459 eval value=\"\$LIB$uppername\"
14460 test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value"
14461 eval value=\"\$LTLIB$uppername\"
14462 test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value"
14463 else
14464 :
14465 fi
14466 else
14467 found_dir=
14468 found_la=
14469 found_so=
14470 found_a=
14471 if test $use_additional = yes; then
14472 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
14473 found_dir="$additional_libdir"
14474 found_so="$additional_libdir/lib$name.$shlibext"
14475 if test -f "$additional_libdir/lib$name.la"; then
14476 found_la="$additional_libdir/lib$name.la"
14477 fi
14478 else
14479 if test -f "$additional_libdir/lib$name.$libext"; then
14480 found_dir="$additional_libdir"
14481 found_a="$additional_libdir/lib$name.$libext"
14482 if test -f "$additional_libdir/lib$name.la"; then
14483 found_la="$additional_libdir/lib$name.la"
14484 fi
14485 fi
14486 fi
14487 fi
14488 if test "X$found_dir" = "X"; then
14489 for x in $LDFLAGS $LTLIBBABELTRACE; do
14490
14491 acl_save_prefix="$prefix"
14492 prefix="$acl_final_prefix"
14493 acl_save_exec_prefix="$exec_prefix"
14494 exec_prefix="$acl_final_exec_prefix"
14495 eval x=\"$x\"
14496 exec_prefix="$acl_save_exec_prefix"
14497 prefix="$acl_save_prefix"
14498
14499 case "$x" in
14500 -L*)
14501 dir=`echo "X$x" | sed -e 's/^X-L//'`
14502 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
14503 found_dir="$dir"
14504 found_so="$dir/lib$name.$shlibext"
14505 if test -f "$dir/lib$name.la"; then
14506 found_la="$dir/lib$name.la"
14507 fi
14508 else
14509 if test -f "$dir/lib$name.$libext"; then
14510 found_dir="$dir"
14511 found_a="$dir/lib$name.$libext"
14512 if test -f "$dir/lib$name.la"; then
14513 found_la="$dir/lib$name.la"
14514 fi
14515 fi
14516 fi
14517 ;;
14518 esac
14519 if test "X$found_dir" != "X"; then
14520 break
14521 fi
14522 done
14523 fi
14524 if test "X$found_dir" != "X"; then
14525 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name"
14526 if test "X$found_so" != "X"; then
14527 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
14528 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
14529 else
14530 haveit=
14531 for x in $ltrpathdirs; do
14532 if test "X$x" = "X$found_dir"; then
14533 haveit=yes
14534 break
14535 fi
14536 done
14537 if test -z "$haveit"; then
14538 ltrpathdirs="$ltrpathdirs $found_dir"
14539 fi
14540 if test "$hardcode_direct" = yes; then
14541 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
14542 else
14543 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
14544 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
14545 haveit=
14546 for x in $rpathdirs; do
14547 if test "X$x" = "X$found_dir"; then
14548 haveit=yes
14549 break
14550 fi
14551 done
14552 if test -z "$haveit"; then
14553 rpathdirs="$rpathdirs $found_dir"
14554 fi
14555 else
14556 haveit=
14557 for x in $LDFLAGS $LIBBABELTRACE; do
14558
14559 acl_save_prefix="$prefix"
14560 prefix="$acl_final_prefix"
14561 acl_save_exec_prefix="$exec_prefix"
14562 exec_prefix="$acl_final_exec_prefix"
14563 eval x=\"$x\"
14564 exec_prefix="$acl_save_exec_prefix"
14565 prefix="$acl_save_prefix"
14566
14567 if test "X$x" = "X-L$found_dir"; then
14568 haveit=yes
14569 break
14570 fi
14571 done
14572 if test -z "$haveit"; then
14573 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir"
14574 fi
14575 if test "$hardcode_minus_L" != no; then
14576 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
14577 else
14578 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
14579 fi
14580 fi
14581 fi
14582 fi
14583 else
14584 if test "X$found_a" != "X"; then
14585 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a"
14586 else
14587 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name"
14588 fi
14589 fi
14590 additional_includedir=
14591 case "$found_dir" in
14592 */lib | */lib/)
14593 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
14594 additional_includedir="$basedir/include"
14595 ;;
14596 esac
14597 if test "X$additional_includedir" != "X"; then
14598 if test "X$additional_includedir" != "X/usr/include"; then
14599 haveit=
14600 if test "X$additional_includedir" = "X/usr/local/include"; then
14601 if test -n "$GCC"; then
14602 case $host_os in
14603 linux*) haveit=yes;;
14604 esac
14605 fi
14606 fi
14607 if test -z "$haveit"; then
14608 for x in $CPPFLAGS $INCBABELTRACE; do
14609
14610 acl_save_prefix="$prefix"
14611 prefix="$acl_final_prefix"
14612 acl_save_exec_prefix="$exec_prefix"
14613 exec_prefix="$acl_final_exec_prefix"
14614 eval x=\"$x\"
14615 exec_prefix="$acl_save_exec_prefix"
14616 prefix="$acl_save_prefix"
14617
14618 if test "X$x" = "X-I$additional_includedir"; then
14619 haveit=yes
14620 break
14621 fi
14622 done
14623 if test -z "$haveit"; then
14624 if test -d "$additional_includedir"; then
14625 INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir"
14626 fi
14627 fi
14628 fi
14629 fi
14630 fi
14631 if test -n "$found_la"; then
14632 save_libdir="$libdir"
14633 case "$found_la" in
14634 */* | *\\*) . "$found_la" ;;
14635 *) . "./$found_la" ;;
14636 esac
14637 libdir="$save_libdir"
14638 for dep in $dependency_libs; do
14639 case "$dep" in
14640 -L*)
14641 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
14642 if test "X$additional_libdir" != "X/usr/lib"; then
14643 haveit=
14644 if test "X$additional_libdir" = "X/usr/local/lib"; then
14645 if test -n "$GCC"; then
14646 case $host_os in
14647 linux*) haveit=yes;;
14648 esac
14649 fi
14650 fi
14651 if test -z "$haveit"; then
14652 haveit=
14653 for x in $LDFLAGS $LIBBABELTRACE; do
14654
14655 acl_save_prefix="$prefix"
14656 prefix="$acl_final_prefix"
14657 acl_save_exec_prefix="$exec_prefix"
14658 exec_prefix="$acl_final_exec_prefix"
14659 eval x=\"$x\"
14660 exec_prefix="$acl_save_exec_prefix"
14661 prefix="$acl_save_prefix"
14662
14663 if test "X$x" = "X-L$additional_libdir"; then
14664 haveit=yes
14665 break
14666 fi
14667 done
14668 if test -z "$haveit"; then
14669 if test -d "$additional_libdir"; then
14670 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir"
14671 fi
14672 fi
14673 haveit=
14674 for x in $LDFLAGS $LTLIBBABELTRACE; do
14675
14676 acl_save_prefix="$prefix"
14677 prefix="$acl_final_prefix"
14678 acl_save_exec_prefix="$exec_prefix"
14679 exec_prefix="$acl_final_exec_prefix"
14680 eval x=\"$x\"
14681 exec_prefix="$acl_save_exec_prefix"
14682 prefix="$acl_save_prefix"
14683
14684 if test "X$x" = "X-L$additional_libdir"; then
14685 haveit=yes
14686 break
14687 fi
14688 done
14689 if test -z "$haveit"; then
14690 if test -d "$additional_libdir"; then
14691 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir"
14692 fi
14693 fi
14694 fi
14695 fi
14696 ;;
14697 -R*)
14698 dir=`echo "X$dep" | sed -e 's/^X-R//'`
14699 if test "$enable_rpath" != no; then
14700 haveit=
14701 for x in $rpathdirs; do
14702 if test "X$x" = "X$dir"; then
14703 haveit=yes
14704 break
14705 fi
14706 done
14707 if test -z "$haveit"; then
14708 rpathdirs="$rpathdirs $dir"
14709 fi
14710 haveit=
14711 for x in $ltrpathdirs; do
14712 if test "X$x" = "X$dir"; then
14713 haveit=yes
14714 break
14715 fi
14716 done
14717 if test -z "$haveit"; then
14718 ltrpathdirs="$ltrpathdirs $dir"
14719 fi
14720 fi
14721 ;;
14722 -l*)
14723 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
14724 ;;
14725 *.la)
14726 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
14727 ;;
14728 *)
14729 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$dep"
14730 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$dep"
14731 ;;
14732 esac
14733 done
14734 fi
14735 else
14736 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
14737 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name"
14738 fi
14739 fi
14740 fi
14741 done
14742 done
14743 if test "X$rpathdirs" != "X"; then
14744 if test -n "$hardcode_libdir_separator"; then
14745 alldirs=
14746 for found_dir in $rpathdirs; do
14747 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
14748 done
14749 acl_save_libdir="$libdir"
14750 libdir="$alldirs"
14751 eval flag=\"$hardcode_libdir_flag_spec\"
14752 libdir="$acl_save_libdir"
14753 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
14754 else
14755 for found_dir in $rpathdirs; do
14756 acl_save_libdir="$libdir"
14757 libdir="$found_dir"
14758 eval flag=\"$hardcode_libdir_flag_spec\"
14759 libdir="$acl_save_libdir"
14760 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
14761 done
14762 fi
14763 fi
14764 if test "X$ltrpathdirs" != "X"; then
14765 for found_dir in $ltrpathdirs; do
14766 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir"
14767 done
14768 fi
14769
14770
14771 ac_save_CPPFLAGS="$CPPFLAGS"
14772
14773 for element in $INCBABELTRACE; do
14774 haveit=
14775 for x in $CPPFLAGS; do
14776
14777 acl_save_prefix="$prefix"
14778 prefix="$acl_final_prefix"
14779 acl_save_exec_prefix="$exec_prefix"
14780 exec_prefix="$acl_final_exec_prefix"
14781 eval x=\"$x\"
14782 exec_prefix="$acl_save_exec_prefix"
14783 prefix="$acl_save_prefix"
14784
14785 if test "X$x" = "X$element"; then
14786 haveit=yes
14787 break
14788 fi
14789 done
14790 if test -z "$haveit"; then
14791 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
14792 fi
14793 done
14794
14795
14796 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5
14797$as_echo_n "checking for libbabeltrace... " >&6; }
14798if test "${ac_cv_libbabeltrace+set}" = set; then :
14799 $as_echo_n "(cached) " >&6
14800else
14801
14802 ac_save_LIBS="$LIBS"
14803 LIBS="$LIBS $LIBBABELTRACE"
14804 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14805/* end confdefs.h. */
14806#include <babeltrace/babeltrace.h>
14807 #include <babeltrace/ctf/events.h>
14808 #include <babeltrace/ctf/iterator.h>
14809int
14810main ()
14811{
14812struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL));
14813 struct bt_ctf_event *event = NULL;
14814 const struct bt_definition *scope;
14815
14816 scope = bt_ctf_get_top_level_scope (event,
14817 BT_STREAM_EVENT_HEADER);
14818 bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id"));
14819
14820 ;
14821 return 0;
14822}
14823_ACEOF
14824if ac_fn_c_try_link "$LINENO"; then :
14825 ac_cv_libbabeltrace=yes
14826else
14827 ac_cv_libbabeltrace=no
14828fi
14829rm -f core conftest.err conftest.$ac_objext \
14830 conftest$ac_exeext conftest.$ac_ext
14831 LIBS="$ac_save_LIBS"
14832
14833fi
14834{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5
14835$as_echo "$ac_cv_libbabeltrace" >&6; }
14836 if test "$ac_cv_libbabeltrace" = yes; then
14837 HAVE_LIBBABELTRACE=yes
14838
14839$as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h
14840
14841 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libbabeltrace" >&5
14842$as_echo_n "checking how to link with libbabeltrace... " >&6; }
14843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5
14844$as_echo "$LIBBABELTRACE" >&6; }
14845 else
14846 HAVE_LIBBABELTRACE=no
14847 CPPFLAGS="$ac_save_CPPFLAGS"
14848 LIBBABELTRACE=
14849 LTLIBBABELTRACE=
14850 fi
14851
14852
14853
14854
14855
14856
14857 CFLAGS=$saved_CFLAGS
14858
14859 if test "$HAVE_LIBBABELTRACE" != yes; then
14860 if test "$with_babeltrace" = yes; then
14861 as_fn_error "babeltrace is missing or unusable" "$LINENO" 5
14862 else
14863 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&5
14864$as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&2;}
14865 fi
14866 fi
14867fi
14868
db985757 14869# If nativefile (NAT_FILE) is not set in config/*/*.m[ht] files, we link
2c0fc042 14870# to an empty version.
c906108c
SS
14871
14872files=
14873links=
5a2402b8 14874
c906108c
SS
14875rm -f nm.h
14876if test "${nativefile}" != ""; then
0f475e27
AC
14877 case "${nativefile}" in
14878 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
14879 * ) GDB_NM_FILE="${nativefile}"
14880 esac
5a2402b8
AC
14881 files="${files} ${GDB_NM_FILE}"
14882 links="${links} nm.h"
60ca704f
SE
14883
14884cat >>confdefs.h <<_ACEOF
b78960be 14885#define GDB_NM_FILE "${GDB_NM_FILE}"
bec39cab 14886_ACEOF
5a2402b8 14887
c906108c 14888fi
5a2402b8
AC
14889
14890
bec39cab
AC
14891ac_sources="$files"
14892ac_dests="$links"
14893while test -n "$ac_sources"; do
14894 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
14895 set $ac_sources; ac_source=$1; shift; ac_sources=$*
14896 ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source"
14897done
81ecdfbb 14898ac_config_links="$ac_config_links $ac_config_links_1"
c906108c
SS
14899
14900
c906108c
SS
14901
14902
c906108c 14903
81ecdfbb 14904$as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
bec39cab 14905
bec39cab 14906
b292c783
JK
14907# Undo the $ec_script escaping suitable for Makefile.
14908transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
14909GDB_TRANSFORM_NAME=`echo gdb | sed -e "$transform"`
14910if test "x$GDB_TRANSFORM_NAME" = x; then
14911 GDB_TRANSFORM_NAME=gdb
14912fi
14913
14914GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$transform"`
14915if test "x$GCORE_TRANSFORM_NAME" = x; then
14916 GCORE_TRANSFORM_NAME=gcore
14917fi
14918
14919ac_config_files="$ac_config_files gcore"
14920
14921
c971b7fa 14922ac_config_files="$ac_config_files Makefile gdb-gdb.gdb doc/Makefile data-directory/Makefile"
81ecdfbb
RW
14923
14924ac_config_commands="$ac_config_commands default"
89a34d1b 14925
bec39cab
AC
14926cat >confcache <<\_ACEOF
14927# This file is a shell script that caches the results of configure
14928# tests run on this system so they can be shared between configure
14929# scripts and configure runs, see configure's option --config-cache.
14930# It is not useful on other systems. If it contains results you don't
14931# want to keep, you may remove or edit it.
14932#
14933# config.status only pays attention to the cache file if you give it
14934# the --recheck option to rerun configure.
14935#
14936# `ac_cv_env_foo' variables (set or unset) will be overridden when
14937# loading this file, other *unset* `ac_cv_foo' will be assigned the
14938# following values.
14939
14940_ACEOF
14941
14942# The following way of writing the cache mishandles newlines in values,
14943# but we know of no workaround that is simple, portable, and efficient.
81ecdfbb 14944# So, we kill variables containing newlines.
bec39cab
AC
14945# Ultrix sh set writes to stderr and can't be redirected directly,
14946# and sets the high bit in the cache file unless we assign to the vars.
81ecdfbb
RW
14947(
14948 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
14949 eval ac_val=\$$ac_var
14950 case $ac_val in #(
14951 *${as_nl}*)
14952 case $ac_var in #(
14953 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
14954$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
14955 esac
14956 case $ac_var in #(
14957 _ | IFS | as_nl) ;; #(
14958 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
14959 *) { eval $ac_var=; unset $ac_var;} ;;
14960 esac ;;
14961 esac
14962 done
14963
bec39cab 14964 (set) 2>&1 |
81ecdfbb
RW
14965 case $as_nl`(ac_space=' '; set) 2>&1` in #(
14966 *${as_nl}ac_space=\ *)
14967 # `set' does not quote correctly, so add quotes: double-quote
14968 # substitution turns \\\\ into \\, and sed turns \\ into \.
bec39cab
AC
14969 sed -n \
14970 "s/'/'\\\\''/g;
14971 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
81ecdfbb 14972 ;; #(
bec39cab
AC
14973 *)
14974 # `set' quotes correctly as required by POSIX, so do not add quotes.
81ecdfbb 14975 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
bec39cab 14976 ;;
81ecdfbb
RW
14977 esac |
14978 sort
14979) |
bec39cab 14980 sed '
81ecdfbb 14981 /^ac_cv_env_/b end
bec39cab 14982 t clear
81ecdfbb 14983 :clear
bec39cab
AC
14984 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
14985 t end
81ecdfbb
RW
14986 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
14987 :end' >>confcache
14988if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
14989 if test -w "$cache_file"; then
14990 test "x$cache_file" != "x/dev/null" &&
14991 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
14992$as_echo "$as_me: updating cache $cache_file" >&6;}
bec39cab
AC
14993 cat confcache >$cache_file
14994 else
81ecdfbb
RW
14995 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
14996$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
bec39cab
AC
14997 fi
14998fi
14999rm -f confcache
15000
15001test "x$prefix" = xNONE && prefix=$ac_default_prefix
15002# Let make expand exec_prefix.
15003test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15004
bec39cab
AC
15005DEFS=-DHAVE_CONFIG_H
15006
15007ac_libobjs=
15008ac_ltlibobjs=
15009for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15010 # 1. Remove the extension, and $U if already installed.
81ecdfbb
RW
15011 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
15012 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
15013 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
15014 # will be set to the directory where LIBOBJS objects are built.
15015 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15016 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
bec39cab
AC
15017done
15018LIBOBJS=$ac_libobjs
15019
15020LTLIBOBJS=$ac_ltlibobjs
15021
15022
85981d60 15023if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
81ecdfbb
RW
15024 as_fn_error "conditional \"MAINTAINER_MODE\" was never defined.
15025Usually this means the macro was only invoked conditionally." "$LINENO" 5
85981d60 15026fi
a417dc56 15027if test -z "${GMAKE_TRUE}" && test -z "${GMAKE_FALSE}"; then
81ecdfbb
RW
15028 as_fn_error "conditional \"GMAKE\" was never defined.
15029Usually this means the macro was only invoked conditionally." "$LINENO" 5
a417dc56 15030fi
81ecdfbb
RW
15031
15032
bec39cab 15033: ${CONFIG_STATUS=./config.status}
81ecdfbb 15034ac_write_fail=0
bec39cab
AC
15035ac_clean_files_save=$ac_clean_files
15036ac_clean_files="$ac_clean_files $CONFIG_STATUS"
81ecdfbb
RW
15037{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15038$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15039as_write_fail=0
15040cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
bec39cab
AC
15041#! $SHELL
15042# Generated by $as_me.
15043# Run this file to recreate the current configuration.
15044# Compiler output produced by configure, useful for debugging
15045# configure, is in config.log if it exists.
15046
15047debug=false
15048ac_cs_recheck=false
15049ac_cs_silent=false
bec39cab 15050
81ecdfbb
RW
15051SHELL=\${CONFIG_SHELL-$SHELL}
15052export SHELL
15053_ASEOF
15054cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15055## -------------------- ##
15056## M4sh Initialization. ##
15057## -------------------- ##
15058
15059# Be more Bourne compatible
15060DUALCASE=1; export DUALCASE # for MKS sh
15061if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
15062 emulate sh
15063 NULLCMD=:
81ecdfbb 15064 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
15065 # is contrary to our usage. Disable this feature.
15066 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
15067 setopt NO_GLOB_SUBST
15068else
15069 case `(set -o) 2>/dev/null` in #(
15070 *posix*) :
15071 set -o posix ;; #(
15072 *) :
15073 ;;
15074esac
bec39cab 15075fi
bec39cab 15076
81ecdfbb
RW
15077
15078as_nl='
15079'
15080export as_nl
15081# Printing a long string crashes Solaris 7 /usr/bin/printf.
15082as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15083as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15084as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15085# Prefer a ksh shell builtin over an external printf program on Solaris,
15086# but without wasting forks for bash or zsh.
15087if test -z "$BASH_VERSION$ZSH_VERSION" \
15088 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15089 as_echo='print -r --'
15090 as_echo_n='print -rn --'
15091elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15092 as_echo='printf %s\n'
15093 as_echo_n='printf %s'
15094else
15095 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15096 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15097 as_echo_n='/usr/ucb/echo -n'
15098 else
15099 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15100 as_echo_n_body='eval
15101 arg=$1;
15102 case $arg in #(
15103 *"$as_nl"*)
15104 expr "X$arg" : "X\\(.*\\)$as_nl";
15105 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15106 esac;
15107 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15108 '
15109 export as_echo_n_body
15110 as_echo_n='sh -c $as_echo_n_body as_echo'
15111 fi
15112 export as_echo_body
15113 as_echo='sh -c $as_echo_body as_echo'
15114fi
15115
15116# The user is always right.
15117if test "${PATH_SEPARATOR+set}" != set; then
15118 PATH_SEPARATOR=:
15119 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15120 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15121 PATH_SEPARATOR=';'
15122 }
bec39cab
AC
15123fi
15124
15125
81ecdfbb
RW
15126# IFS
15127# We need space, tab and new line, in precisely that order. Quoting is
15128# there to prevent editors from complaining about space-tab.
15129# (If _AS_PATH_WALK were called with IFS unset, it would disable word
15130# splitting by setting IFS to empty value.)
15131IFS=" "" $as_nl"
15132
15133# Find who we are. Look in the path if we contain no directory separator.
15134case $0 in #((
15135 *[\\/]* ) as_myself=$0 ;;
15136 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15137for as_dir in $PATH
15138do
15139 IFS=$as_save_IFS
15140 test -z "$as_dir" && as_dir=.
15141 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15142 done
15143IFS=$as_save_IFS
15144
15145 ;;
15146esac
15147# We did not find ourselves, most probably we were run as `sh COMMAND'
15148# in which case we are not to be found in the path.
15149if test "x$as_myself" = x; then
15150 as_myself=$0
15151fi
15152if test ! -f "$as_myself"; then
15153 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15154 exit 1
15155fi
15156
15157# Unset variables that we do not need and which cause bugs (e.g. in
15158# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
15159# suppresses any "Segmentation fault" message there. '((' could
15160# trigger a bug in pdksh 5.2.14.
15161for as_var in BASH_ENV ENV MAIL MAILPATH
15162do eval test x\${$as_var+set} = xset \
15163 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
15164done
bec39cab
AC
15165PS1='$ '
15166PS2='> '
15167PS4='+ '
15168
15169# NLS nuisances.
81ecdfbb
RW
15170LC_ALL=C
15171export LC_ALL
15172LANGUAGE=C
15173export LANGUAGE
15174
15175# CDPATH.
15176(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15177
15178
15179# as_fn_error ERROR [LINENO LOG_FD]
15180# ---------------------------------
15181# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15182# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
15183# script with status $?, using 1 if that was 0.
15184as_fn_error ()
15185{
15186 as_status=$?; test $as_status -eq 0 && as_status=1
15187 if test "$3"; then
15188 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15189 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
15190 fi
15191 $as_echo "$as_me: error: $1" >&2
15192 as_fn_exit $as_status
15193} # as_fn_error
15194
15195
15196# as_fn_set_status STATUS
15197# -----------------------
15198# Set $? to STATUS, without forking.
15199as_fn_set_status ()
15200{
15201 return $1
15202} # as_fn_set_status
15203
15204# as_fn_exit STATUS
15205# -----------------
15206# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15207as_fn_exit ()
15208{
15209 set +e
15210 as_fn_set_status $1
15211 exit $1
15212} # as_fn_exit
15213
15214# as_fn_unset VAR
15215# ---------------
15216# Portably unset VAR.
15217as_fn_unset ()
15218{
15219 { eval $1=; unset $1;}
15220}
15221as_unset=as_fn_unset
15222# as_fn_append VAR VALUE
15223# ----------------------
15224# Append the text in VALUE to the end of the definition contained in VAR. Take
15225# advantage of any shell optimizations that allow amortized linear growth over
15226# repeated appends, instead of the typical quadratic growth present in naive
15227# implementations.
15228if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15229 eval 'as_fn_append ()
15230 {
15231 eval $1+=\$2
15232 }'
15233else
15234 as_fn_append ()
15235 {
15236 eval $1=\$$1\$2
15237 }
15238fi # as_fn_append
15239
15240# as_fn_arith ARG...
15241# ------------------
15242# Perform arithmetic evaluation on the ARGs, and store the result in the
15243# global $as_val. Take advantage of shells that can avoid forks. The arguments
15244# must be portable across $(()) and expr.
15245if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15246 eval 'as_fn_arith ()
15247 {
15248 as_val=$(( $* ))
15249 }'
15250else
15251 as_fn_arith ()
15252 {
15253 as_val=`expr "$@" || test $? -eq 1`
15254 }
15255fi # as_fn_arith
bec39cab 15256
81ecdfbb
RW
15257
15258if expr a : '\(a\)' >/dev/null 2>&1 &&
15259 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
15260 as_expr=expr
15261else
15262 as_expr=false
15263fi
15264
81ecdfbb 15265if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
15266 as_basename=basename
15267else
15268 as_basename=false
15269fi
15270
81ecdfbb
RW
15271if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15272 as_dirname=dirname
15273else
15274 as_dirname=false
15275fi
bec39cab 15276
81ecdfbb 15277as_me=`$as_basename -- "$0" ||
bec39cab
AC
15278$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15279 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
15280 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
15281$as_echo X/"$0" |
15282 sed '/^.*\/\([^/][^/]*\)\/*$/{
15283 s//\1/
15284 q
15285 }
15286 /^X\/\(\/\/\)$/{
15287 s//\1/
15288 q
15289 }
15290 /^X\/\(\/\).*/{
15291 s//\1/
15292 q
15293 }
15294 s/.*/./; q'`
b4e70030 15295
b4e70030
JB
15296# Avoid depending upon Character Ranges.
15297as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15298as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15299as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15300as_cr_digits='0123456789'
15301as_cr_alnum=$as_cr_Letters$as_cr_digits
15302
81ecdfbb
RW
15303ECHO_C= ECHO_N= ECHO_T=
15304case `echo -n x` in #(((((
15305-n*)
15306 case `echo 'xy\c'` in
15307 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
15308 xy) ECHO_C='\c';;
15309 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
15310 ECHO_T=' ';;
15311 esac;;
15312*)
15313 ECHO_N='-n';;
bec39cab
AC
15314esac
15315
81ecdfbb
RW
15316rm -f conf$$ conf$$.exe conf$$.file
15317if test -d conf$$.dir; then
15318 rm -f conf$$.dir/conf$$.file
bec39cab 15319else
81ecdfbb
RW
15320 rm -f conf$$.dir
15321 mkdir conf$$.dir 2>/dev/null
bec39cab 15322fi
81ecdfbb
RW
15323if (echo >conf$$.file) 2>/dev/null; then
15324 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 15325 as_ln_s='ln -s'
81ecdfbb
RW
15326 # ... but there are two gotchas:
15327 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15328 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
15329 # In both cases, we have to default to `cp -p'.
15330 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
15331 as_ln_s='cp -p'
15332 elif ln conf$$.file conf$$ 2>/dev/null; then
15333 as_ln_s=ln
15334 else
15335 as_ln_s='cp -p'
b4e70030 15336 fi
bec39cab
AC
15337else
15338 as_ln_s='cp -p'
15339fi
81ecdfbb
RW
15340rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15341rmdir conf$$.dir 2>/dev/null
15342
15343
15344# as_fn_mkdir_p
15345# -------------
15346# Create "$as_dir" as a directory, including parents if necessary.
15347as_fn_mkdir_p ()
15348{
15349
15350 case $as_dir in #(
15351 -*) as_dir=./$as_dir;;
15352 esac
15353 test -d "$as_dir" || eval $as_mkdir_p || {
15354 as_dirs=
15355 while :; do
15356 case $as_dir in #(
15357 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15358 *) as_qdir=$as_dir;;
15359 esac
15360 as_dirs="'$as_qdir' $as_dirs"
15361 as_dir=`$as_dirname -- "$as_dir" ||
15362$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15363 X"$as_dir" : 'X\(//\)[^/]' \| \
15364 X"$as_dir" : 'X\(//\)$' \| \
15365 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15366$as_echo X"$as_dir" |
15367 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15368 s//\1/
15369 q
15370 }
15371 /^X\(\/\/\)[^/].*/{
15372 s//\1/
15373 q
15374 }
15375 /^X\(\/\/\)$/{
15376 s//\1/
15377 q
15378 }
15379 /^X\(\/\).*/{
15380 s//\1/
15381 q
15382 }
15383 s/.*/./; q'`
15384 test -d "$as_dir" && break
15385 done
15386 test -z "$as_dirs" || eval "mkdir $as_dirs"
15387 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
15388
bec39cab 15389
81ecdfbb 15390} # as_fn_mkdir_p
bec39cab 15391if mkdir -p . 2>/dev/null; then
81ecdfbb 15392 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
15393else
15394 test -d ./-p && rmdir ./-p
15395 as_mkdir_p=false
15396fi
15397
81ecdfbb
RW
15398if test -x / >/dev/null 2>&1; then
15399 as_test_x='test -x'
15400else
15401 if ls -dL / >/dev/null 2>&1; then
15402 as_ls_L_option=L
15403 else
15404 as_ls_L_option=
15405 fi
15406 as_test_x='
15407 eval sh -c '\''
15408 if test -d "$1"; then
15409 test -d "$1/.";
15410 else
15411 case $1 in #(
15412 -*)set "./$1";;
15413 esac;
15414 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
15415 ???[sx]*):;;*)false;;esac;fi
15416 '\'' sh
15417 '
15418fi
15419as_executable_p=$as_test_x
bec39cab
AC
15420
15421# Sed expression to map a string onto a valid CPP name.
15422as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
15423
15424# Sed expression to map a string onto a valid variable name.
15425as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
15426
15427
bec39cab 15428exec 6>&1
81ecdfbb
RW
15429## ----------------------------------- ##
15430## Main body of $CONFIG_STATUS script. ##
15431## ----------------------------------- ##
15432_ASEOF
15433test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
15434
15435cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15436# Save the log message, to keep $0 and so on meaningful, and to
bec39cab 15437# report actual input values of CONFIG_FILES etc. instead of their
81ecdfbb
RW
15438# values after options handling.
15439ac_log="
bec39cab 15440This file was extended by $as_me, which was
81ecdfbb 15441generated by GNU Autoconf 2.64. Invocation command line was
bec39cab
AC
15442
15443 CONFIG_FILES = $CONFIG_FILES
15444 CONFIG_HEADERS = $CONFIG_HEADERS
15445 CONFIG_LINKS = $CONFIG_LINKS
15446 CONFIG_COMMANDS = $CONFIG_COMMANDS
15447 $ $0 $@
15448
81ecdfbb
RW
15449on `(hostname || uname -n) 2>/dev/null | sed 1q`
15450"
15451
bec39cab
AC
15452_ACEOF
15453
81ecdfbb
RW
15454case $ac_config_files in *"
15455"*) set x $ac_config_files; shift; ac_config_files=$*;;
15456esac
234b45d4 15457
81ecdfbb
RW
15458case $ac_config_headers in *"
15459"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15460esac
b4e70030 15461
b4e70030 15462
81ecdfbb
RW
15463cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15464# Files that config.status was made for.
15465config_files="$ac_config_files"
15466config_headers="$ac_config_headers"
15467config_links="$ac_config_links"
15468config_commands="$ac_config_commands"
234b45d4 15469
81ecdfbb 15470_ACEOF
b4e70030 15471
81ecdfbb 15472cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab 15473ac_cs_usage="\
81ecdfbb
RW
15474\`$as_me' instantiates files and other configuration actions
15475from templates according to the current configuration. Unless the files
15476and actions are specified as TAGs, all are instantiated by default.
234b45d4 15477
81ecdfbb 15478Usage: $0 [OPTION]... [TAG]...
234b45d4 15479
bec39cab 15480 -h, --help print this help, then exit
81ecdfbb
RW
15481 -V, --version print version number and configuration settings, then exit
15482 -q, --quiet, --silent
15483 do not print progress messages
bec39cab
AC
15484 -d, --debug don't remove temporary files
15485 --recheck update $as_me by reconfiguring in the same conditions
81ecdfbb
RW
15486 --file=FILE[:TEMPLATE]
15487 instantiate the configuration file FILE
15488 --header=FILE[:TEMPLATE]
15489 instantiate the configuration header FILE
234b45d4 15490
bec39cab
AC
15491Configuration files:
15492$config_files
234b45d4 15493
bec39cab
AC
15494Configuration headers:
15495$config_headers
234b45d4 15496
bec39cab
AC
15497Configuration links:
15498$config_links
234b45d4 15499
bec39cab
AC
15500Configuration commands:
15501$config_commands
15502
81ecdfbb 15503Report bugs to the package provider."
b4e70030 15504
81ecdfbb
RW
15505_ACEOF
15506cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab
AC
15507ac_cs_version="\\
15508config.status
81ecdfbb
RW
15509configured by $0, generated by GNU Autoconf 2.64,
15510 with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
bec39cab 15511
81ecdfbb 15512Copyright (C) 2009 Free Software Foundation, Inc.
bec39cab
AC
15513This config.status script is free software; the Free Software Foundation
15514gives unlimited permission to copy, distribute and modify it."
81ecdfbb
RW
15515
15516ac_pwd='$ac_pwd'
15517srcdir='$srcdir'
15518INSTALL='$INSTALL'
81ecdfbb
RW
15519AWK='$AWK'
15520test -n "\$AWK" || AWK=awk
bec39cab
AC
15521_ACEOF
15522
81ecdfbb
RW
15523cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15524# The default lists apply if the user does not specify any file.
bec39cab
AC
15525ac_need_defaults=:
15526while test $# != 0
15527do
15528 case $1 in
15529 --*=*)
81ecdfbb
RW
15530 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15531 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
bec39cab 15532 ac_shift=:
c906108c 15533 ;;
81ecdfbb 15534 *)
bec39cab
AC
15535 ac_option=$1
15536 ac_optarg=$2
15537 ac_shift=shift
c906108c 15538 ;;
bec39cab 15539 esac
c906108c 15540
bec39cab
AC
15541 case $ac_option in
15542 # Handling of the options.
bec39cab
AC
15543 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15544 ac_cs_recheck=: ;;
81ecdfbb
RW
15545 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
15546 $as_echo "$ac_cs_version"; exit ;;
15547 --debug | --debu | --deb | --de | --d | -d )
bec39cab
AC
15548 debug=: ;;
15549 --file | --fil | --fi | --f )
15550 $ac_shift
81ecdfbb
RW
15551 case $ac_optarg in
15552 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15553 esac
15554 as_fn_append CONFIG_FILES " '$ac_optarg'"
bec39cab
AC
15555 ac_need_defaults=false;;
15556 --header | --heade | --head | --hea )
15557 $ac_shift
81ecdfbb
RW
15558 case $ac_optarg in
15559 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15560 esac
15561 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
bec39cab 15562 ac_need_defaults=false;;
81ecdfbb
RW
15563 --he | --h)
15564 # Conflict between --help and --header
15565 as_fn_error "ambiguous option: \`$1'
15566Try \`$0 --help' for more information.";;
15567 --help | --hel | -h )
15568 $as_echo "$ac_cs_usage"; exit ;;
bec39cab
AC
15569 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15570 | -silent | --silent | --silen | --sile | --sil | --si | --s)
15571 ac_cs_silent=: ;;
c906108c 15572
bec39cab 15573 # This is an error.
81ecdfbb
RW
15574 -*) as_fn_error "unrecognized option: \`$1'
15575Try \`$0 --help' for more information." ;;
c906108c 15576
81ecdfbb
RW
15577 *) as_fn_append ac_config_targets " $1"
15578 ac_need_defaults=false ;;
c906108c 15579
bec39cab
AC
15580 esac
15581 shift
15582done
c906108c 15583
bec39cab 15584ac_configure_extra_args=
c906108c 15585
bec39cab
AC
15586if $ac_cs_silent; then
15587 exec 6>/dev/null
15588 ac_configure_extra_args="$ac_configure_extra_args --silent"
15589fi
c906108c 15590
bec39cab 15591_ACEOF
81ecdfbb 15592cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab 15593if \$ac_cs_recheck; then
81ecdfbb
RW
15594 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
15595 shift
15596 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15597 CONFIG_SHELL='$SHELL'
15598 export CONFIG_SHELL
15599 exec "\$@"
bec39cab
AC
15600fi
15601
15602_ACEOF
81ecdfbb
RW
15603cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15604exec 5>>config.log
15605{
15606 echo
15607 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15608## Running $as_me. ##
15609_ASBOX
15610 $as_echo "$ac_log"
15611} >&5
bec39cab 15612
81ecdfbb
RW
15613_ACEOF
15614cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
c906108c 15615#
81ecdfbb 15616# INIT-COMMANDS
c906108c 15617#
a417dc56 15618ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
b4e70030 15619
bec39cab
AC
15620_ACEOF
15621
81ecdfbb 15622cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
4e8d927d 15623
81ecdfbb 15624# Handling of arguments.
bec39cab 15625for ac_config_target in $ac_config_targets
c906108c 15626do
81ecdfbb
RW
15627 case $ac_config_target in
15628 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
15629 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
f997c383 15630 "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
81ecdfbb 15631 "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;;
b292c783 15632 "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;;
81ecdfbb 15633 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
e2207b9a 15634 "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;;
5ae98d25 15635 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
aa2e2d8d 15636 "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
81ecdfbb
RW
15637 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
15638
15639 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
c906108c
SS
15640 esac
15641done
15642
81ecdfbb 15643
bec39cab
AC
15644# If the user did not use the arguments to specify the items to instantiate,
15645# then the envvar interface is used. Set only those that are not.
15646# We use the long form for the default assignment because of an extremely
15647# bizarre bug on SunOS 4.1.3.
15648if $ac_need_defaults; then
15649 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15650 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15651 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
15652 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
15653fi
15654
b4e70030 15655# Have a temporary directory for convenience. Make it in the build tree
81ecdfbb 15656# simply because there is no reason against having it here, and in addition,
b4e70030 15657# creating and moving files from /tmp can sometimes cause problems.
81ecdfbb
RW
15658# Hook for its removal unless debugging.
15659# Note that there is a small window in which the directory will not be cleaned:
15660# after its creation but before its name has been assigned to `$tmp'.
b4e70030
JB
15661$debug ||
15662{
81ecdfbb
RW
15663 tmp=
15664 trap 'exit_status=$?
15665 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
15666' 0
15667 trap 'as_fn_exit 1' 1 2 13 15
15668}
15669# Create a (secure) tmp directory for tmp files.
15670
15671{
15672 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
15673 test -n "$tmp" && test -d "$tmp"
15674} ||
15675{
15676 tmp=./conf$$-$RANDOM
15677 (umask 077 && mkdir "$tmp")
15678} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
15679
15680# Set up the scripts for CONFIG_FILES section.
15681# No need to generate them if there are no CONFIG_FILES.
15682# This happens for instance with `./config.status config.h'.
15683if test -n "$CONFIG_FILES"; then
15684
15685if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
15686 ac_cs_awk_getline=:
15687 ac_cs_awk_pipe_init=
15688 ac_cs_awk_read_file='
15689 while ((getline aline < (F[key])) > 0)
15690 print(aline)
15691 close(F[key])'
15692 ac_cs_awk_pipe_fini=
15693else
15694 ac_cs_awk_getline=false
15695 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
15696 ac_cs_awk_read_file='
15697 print "|#_!!_#|"
15698 print "cat " F[key] " &&"
15699 '$ac_cs_awk_pipe_init
15700 # The final `:' finishes the AND list.
15701 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
15702fi
15703ac_cr=`echo X | tr X '\015'`
15704# On cygwin, bash can eat \r inside `` if the user requested igncr.
15705# But we know of no other shell where ac_cr would be empty at this
15706# point, so we can use a bashism as a fallback.
15707if test "x$ac_cr" = x; then
15708 eval ac_cr=\$\'\\r\'
15709fi
15710ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15711if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
15712 ac_cs_awk_cr='\r'
15713else
15714 ac_cs_awk_cr=$ac_cr
15715fi
15716
15717echo 'BEGIN {' >"$tmp/subs1.awk" &&
15718_ACEOF
15719
15720# Create commands to substitute file output variables.
15721{
15722 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
15723 echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' &&
15724 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
15725 echo "_ACAWK" &&
15726 echo "_ACEOF"
15727} >conf$$files.sh &&
15728. ./conf$$files.sh ||
15729 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
15730rm -f conf$$files.sh
15731
15732{
15733 echo "cat >conf$$subs.awk <<_ACEOF" &&
15734 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15735 echo "_ACEOF"
15736} >conf$$subs.sh ||
15737 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
15738ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
15739ac_delim='%!_!# '
15740for ac_last_try in false false false false false :; do
15741 . ./conf$$subs.sh ||
15742 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
15743
15744 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15745 if test $ac_delim_n = $ac_delim_num; then
15746 break
15747 elif $ac_last_try; then
15748 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
15749 else
15750 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15751 fi
15752done
15753rm -f conf$$subs.sh
15754
15755cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15756cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
15757_ACEOF
15758sed -n '
15759h
15760s/^/S["/; s/!.*/"]=/
15761p
15762g
15763s/^[^!]*!//
15764:repl
15765t repl
15766s/'"$ac_delim"'$//
15767t delim
15768:nl
15769h
15770s/\(.\{148\}\).*/\1/
15771t more1
15772s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15773p
15774n
15775b repl
15776:more1
15777s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15778p
15779g
15780s/.\{148\}//
15781t nl
15782:delim
15783h
15784s/\(.\{148\}\).*/\1/
15785t more2
15786s/["\\]/\\&/g; s/^/"/; s/$/"/
15787p
15788b
15789:more2
15790s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15791p
15792g
15793s/.\{148\}//
15794t delim
15795' <conf$$subs.awk | sed '
15796/^[^""]/{
15797 N
15798 s/\n//
15799}
15800' >>$CONFIG_STATUS || ac_write_fail=1
15801rm -f conf$$subs.awk
15802cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15803_ACAWK
15804cat >>"\$tmp/subs1.awk" <<_ACAWK &&
15805 for (key in S) S_is_set[key] = 1
15806 FS = "\a"
15807 \$ac_cs_awk_pipe_init
15808}
15809{
15810 line = $ 0
15811 nfields = split(line, field, "@")
15812 substed = 0
15813 len = length(field[1])
15814 for (i = 2; i < nfields; i++) {
15815 key = field[i]
15816 keylen = length(key)
15817 if (S_is_set[key]) {
15818 value = S[key]
15819 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
15820 len += length(value) + length(field[++i])
15821 substed = 1
15822 } else
15823 len += 1 + keylen
15824 }
15825 if (nfields == 3 && !substed) {
15826 key = field[2]
15827 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
15828 \$ac_cs_awk_read_file
15829 next
15830 }
15831 }
15832 print line
b4e70030 15833}
81ecdfbb
RW
15834\$ac_cs_awk_pipe_fini
15835_ACAWK
15836_ACEOF
15837cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15838if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
15839 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
15840else
15841 cat
15842fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
15843 || as_fn_error "could not setup config files machinery" "$LINENO" 5
15844_ACEOF
15845
15846# VPATH may cause trouble with some makes, so we remove $(srcdir),
15847# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
15848# trailing colons and then remove the whole line if VPATH becomes empty
15849# (actually we leave an empty line to preserve line numbers).
15850if test "x$srcdir" = x.; then
15851 ac_vpsub='/^[ ]*VPATH[ ]*=/{
15852s/:*\$(srcdir):*/:/
15853s/:*\${srcdir}:*/:/
15854s/:*@srcdir@:*/:/
15855s/^\([^=]*=[ ]*\):*/\1/
15856s/:*$//
15857s/^[^=]*=[ ]*$//
15858}'
15859fi
15860
15861cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15862fi # test -n "$CONFIG_FILES"
15863
15864# Set up the scripts for CONFIG_HEADERS section.
15865# No need to generate them if there are no CONFIG_HEADERS.
15866# This happens for instance with `./config.status Makefile'.
15867if test -n "$CONFIG_HEADERS"; then
15868cat >"$tmp/defines.awk" <<\_ACAWK ||
15869BEGIN {
15870_ACEOF
15871
15872# Transform confdefs.h into an awk script `defines.awk', embedded as
15873# here-document in config.status, that substitutes the proper values into
15874# config.h.in to produce config.h.
4e8d927d 15875
81ecdfbb
RW
15876# Create a delimiter string that does not exist in confdefs.h, to ease
15877# handling of long lines.
15878ac_delim='%!_!# '
15879for ac_last_try in false false :; do
15880 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
15881 if test -z "$ac_t"; then
15882 break
15883 elif $ac_last_try; then
15884 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
15885 else
15886 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15887 fi
15888done
4e8d927d 15889
81ecdfbb
RW
15890# For the awk script, D is an array of macro values keyed by name,
15891# likewise P contains macro parameters if any. Preserve backslash
15892# newline sequences.
15893
15894ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
15895sed -n '
15896s/.\{148\}/&'"$ac_delim"'/g
15897t rset
15898:rset
15899s/^[ ]*#[ ]*define[ ][ ]*/ /
15900t def
15901d
15902:def
15903s/\\$//
15904t bsnl
15905s/["\\]/\\&/g
15906s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15907D["\1"]=" \3"/p
15908s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
15909d
15910:bsnl
15911s/["\\]/\\&/g
15912s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15913D["\1"]=" \3\\\\\\n"\\/p
15914t cont
15915s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
15916t cont
15917d
15918:cont
15919n
15920s/.\{148\}/&'"$ac_delim"'/g
15921t clear
15922:clear
15923s/\\$//
15924t bsnlc
15925s/["\\]/\\&/g; s/^/"/; s/$/"/p
15926d
15927:bsnlc
15928s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
15929b cont
15930' <confdefs.h | sed '
15931s/'"$ac_delim"'/"\\\
15932"/g' >>$CONFIG_STATUS || ac_write_fail=1
15933
15934cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15935 for (key in D) D_is_set[key] = 1
15936 FS = "\a"
15937}
15938/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
15939 line = \$ 0
15940 split(line, arg, " ")
15941 if (arg[1] == "#") {
15942 defundef = arg[2]
15943 mac1 = arg[3]
15944 } else {
15945 defundef = substr(arg[1], 2)
15946 mac1 = arg[2]
15947 }
15948 split(mac1, mac2, "(") #)
15949 macro = mac2[1]
15950 prefix = substr(line, 1, index(line, defundef) - 1)
15951 if (D_is_set[macro]) {
15952 # Preserve the white space surrounding the "#".
15953 print prefix "define", macro P[macro] D[macro]
15954 next
15955 } else {
15956 # Replace #undef with comments. This is necessary, for example,
15957 # in the case of _POSIX_SOURCE, which is predefined and required
15958 # on some systems where configure will not decide to define it.
15959 if (defundef == "undef") {
15960 print "/*", prefix defundef, macro, "*/"
15961 next
15962 }
15963 }
b4e70030 15964}
81ecdfbb
RW
15965{ print }
15966_ACAWK
b4e70030 15967_ACEOF
81ecdfbb
RW
15968cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15969 as_fn_error "could not setup config headers machinery" "$LINENO" 5
15970fi # test -n "$CONFIG_HEADERS"
4e8d927d 15971
4e8d927d 15972
81ecdfbb
RW
15973eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
15974shift
15975for ac_tag
15976do
15977 case $ac_tag in
15978 :[FHLC]) ac_mode=$ac_tag; continue;;
15979 esac
15980 case $ac_mode$ac_tag in
15981 :[FHL]*:*);;
15982 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
15983 :[FH]-) ac_tag=-:-;;
15984 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
15985 esac
15986 ac_save_IFS=$IFS
15987 IFS=:
15988 set x $ac_tag
15989 IFS=$ac_save_IFS
15990 shift
15991 ac_file=$1
15992 shift
4e8d927d 15993
81ecdfbb
RW
15994 case $ac_mode in
15995 :L) ac_source=$1;;
15996 :[FH])
15997 ac_file_inputs=
15998 for ac_f
15999 do
16000 case $ac_f in
16001 -) ac_f="$tmp/stdin";;
16002 *) # Look for the file first in the build tree, then in the source tree
16003 # (if the path is not absolute). The absolute path cannot be DOS-style,
16004 # because $ac_f cannot contain `:'.
16005 test -f "$ac_f" ||
16006 case $ac_f in
16007 [\\/$]*) false;;
16008 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16009 esac ||
16010 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
16011 esac
16012 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16013 as_fn_append ac_file_inputs " '$ac_f'"
16014 done
16015
16016 # Let's still pretend it is `configure' which instantiates (i.e., don't
16017 # use $as_me), people would be surprised to read:
16018 # /* config.h. Generated by config.status. */
16019 configure_input='Generated from '`
16020 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16021 `' by configure.'
16022 if test x"$ac_file" != x-; then
16023 configure_input="$ac_file. $configure_input"
16024 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16025$as_echo "$as_me: creating $ac_file" >&6;}
b4e70030 16026 fi
81ecdfbb
RW
16027 # Neutralize special characters interpreted by sed in replacement strings.
16028 case $configure_input in #(
16029 *\&* | *\|* | *\\* )
16030 ac_sed_conf_input=`$as_echo "$configure_input" |
16031 sed 's/[\\\\&|]/\\\\&/g'`;; #(
16032 *) ac_sed_conf_input=$configure_input;;
16033 esac
4e8d927d 16034
81ecdfbb
RW
16035 case $ac_tag in
16036 *:-:* | *:-) cat >"$tmp/stdin" \
16037 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
16038 esac
16039 ;;
c906108c
SS
16040 esac
16041
81ecdfbb 16042 ac_dir=`$as_dirname -- "$ac_file" ||
bec39cab
AC
16043$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16044 X"$ac_file" : 'X\(//\)[^/]' \| \
16045 X"$ac_file" : 'X\(//\)$' \| \
81ecdfbb
RW
16046 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
16047$as_echo X"$ac_file" |
16048 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16049 s//\1/
16050 q
16051 }
16052 /^X\(\/\/\)[^/].*/{
16053 s//\1/
16054 q
16055 }
16056 /^X\(\/\/\)$/{
16057 s//\1/
16058 q
16059 }
16060 /^X\(\/\).*/{
16061 s//\1/
16062 q
16063 }
16064 s/.*/./; q'`
16065 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
16066 ac_builddir=.
16067
81ecdfbb
RW
16068case "$ac_dir" in
16069.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16070*)
16071 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
16072 # A ".." for each directory in $ac_dir_suffix.
16073 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
16074 case $ac_top_builddir_sub in
16075 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16076 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16077 esac ;;
16078esac
16079ac_abs_top_builddir=$ac_pwd
16080ac_abs_builddir=$ac_pwd$ac_dir_suffix
16081# for backward compatibility:
16082ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
16083
16084case $srcdir in
81ecdfbb 16085 .) # We are building in place.
bec39cab 16086 ac_srcdir=.
81ecdfbb
RW
16087 ac_top_srcdir=$ac_top_builddir_sub
16088 ac_abs_top_srcdir=$ac_pwd ;;
16089 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 16090 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
16091 ac_top_srcdir=$srcdir
16092 ac_abs_top_srcdir=$srcdir ;;
16093 *) # Relative name.
16094 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16095 ac_top_srcdir=$ac_top_build_prefix$srcdir
16096 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 16097esac
81ecdfbb 16098ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 16099
c906108c 16100
81ecdfbb
RW
16101 case $ac_mode in
16102 :F)
16103 #
16104 # CONFIG_FILE
16105 #
c906108c 16106
bec39cab
AC
16107 case $INSTALL in
16108 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
81ecdfbb 16109 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
c906108c 16110 esac
81ecdfbb 16111_ACEOF
121ce6e5 16112
81ecdfbb
RW
16113cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16114# If the template does not know about datarootdir, expand it.
16115# FIXME: This hack should be removed a few years after 2.60.
16116ac_datarootdir_hack=; ac_datarootdir_seen=
16117ac_sed_dataroot='
16118/datarootdir/ {
16119 p
16120 q
16121}
16122/@datadir@/p
16123/@docdir@/p
16124/@infodir@/p
16125/@localedir@/p
16126/@mandir@/p'
16127case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
16128*datarootdir*) ac_datarootdir_seen=yes;;
16129*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
16130 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16131$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
16132_ACEOF
16133cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16134 ac_datarootdir_hack='
16135 s&@datadir@&$datadir&g
16136 s&@docdir@&$docdir&g
16137 s&@infodir@&$infodir&g
16138 s&@localedir@&$localedir&g
16139 s&@mandir@&$mandir&g
16140 s&\\\${datarootdir}&$datarootdir&g' ;;
16141esac
4e8d927d 16142_ACEOF
81ecdfbb
RW
16143
16144# Neutralize VPATH when `$srcdir' = `.'.
16145# Shell code in configure.ac might set extrasub.
16146# FIXME: do we really want to maintain this feature?
16147cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16148ac_sed_extra="$ac_vpsub
bec39cab
AC
16149$extrasub
16150_ACEOF
81ecdfbb 16151cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab
AC
16152:t
16153/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
81ecdfbb
RW
16154s|@configure_input@|$ac_sed_conf_input|;t t
16155s&@top_builddir@&$ac_top_builddir_sub&;t t
16156s&@top_build_prefix@&$ac_top_build_prefix&;t t
16157s&@srcdir@&$ac_srcdir&;t t
16158s&@abs_srcdir@&$ac_abs_srcdir&;t t
16159s&@top_srcdir@&$ac_top_srcdir&;t t
16160s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16161s&@builddir@&$ac_builddir&;t t
16162s&@abs_builddir@&$ac_abs_builddir&;t t
16163s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16164s&@INSTALL@&$ac_INSTALL&;t t
81ecdfbb
RW
16165$ac_datarootdir_hack
16166"
16167eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
16168if $ac_cs_awk_getline; then
16169 $AWK -f "$tmp/subs.awk"
16170else
16171 $AWK -f "$tmp/subs.awk" | $SHELL
16172fi >$tmp/out \
16173 || as_fn_error "could not create $ac_file" "$LINENO" 5
16174
16175test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
16176 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
16177 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
16178 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
16179which seems to be undefined. Please make sure it is defined." >&5
16180$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
16181which seems to be undefined. Please make sure it is defined." >&2;}
16182
16183 rm -f "$tmp/stdin"
bec39cab 16184 case $ac_file in
81ecdfbb
RW
16185 -) cat "$tmp/out" && rm -f "$tmp/out";;
16186 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
16187 esac \
16188 || as_fn_error "could not create $ac_file" "$LINENO" 5
16189 ;;
16190 :H)
16191 #
16192 # CONFIG_HEADER
16193 #
bec39cab 16194 if test x"$ac_file" != x-; then
81ecdfbb
RW
16195 {
16196 $as_echo "/* $configure_input */" \
16197 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
16198 } >"$tmp/config.h" \
16199 || as_fn_error "could not create $ac_file" "$LINENO" 5
16200 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
16201 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16202$as_echo "$as_me: $ac_file is unchanged" >&6;}
bec39cab 16203 else
81ecdfbb
RW
16204 rm -f "$ac_file"
16205 mv "$tmp/config.h" "$ac_file" \
16206 || as_fn_error "could not create $ac_file" "$LINENO" 5
bec39cab
AC
16207 fi
16208 else
81ecdfbb
RW
16209 $as_echo "/* $configure_input */" \
16210 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
16211 || as_fn_error "could not create -" "$LINENO" 5
bec39cab 16212 fi
81ecdfbb
RW
16213 ;;
16214 :L)
16215 #
16216 # CONFIG_LINK
16217 #
c906108c 16218
81ecdfbb
RW
16219 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
16220 :
b4e70030 16221 else
81ecdfbb
RW
16222 # Prefer the file from the source tree if names are identical.
16223 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
16224 ac_source=$srcdir/$ac_source
16225 fi
b4e70030 16226
81ecdfbb
RW
16227 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
16228$as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
b4e70030 16229
81ecdfbb
RW
16230 if test ! -r "$ac_source"; then
16231 as_fn_error "$ac_source: file not found" "$LINENO" 5
16232 fi
16233 rm -f "$ac_file"
bec39cab 16234
81ecdfbb
RW
16235 # Try a relative symlink, then a hard link, then a copy.
16236 case $srcdir in
16237 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
16238 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
16239 esac
16240 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
16241 ln "$ac_source" "$ac_file" 2>/dev/null ||
16242 cp -p "$ac_source" "$ac_file" ||
16243 as_fn_error "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
16244 fi
16245 ;;
16246 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
16247$as_echo "$as_me: executing $ac_file commands" >&6;}
16248 ;;
c906108c 16249 esac
b4e70030 16250
bec39cab 16251
81ecdfbb
RW
16252 case $ac_file$ac_mode in
16253 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
b292c783 16254 "gcore":F) chmod +x gcore ;;
81ecdfbb 16255 "default":C)
c906108c
SS
16256case x$CONFIG_HEADERS in
16257xconfig.h:config.in)
16258echo > stamp-h ;;
16259esac
bec39cab 16260 ;;
81ecdfbb 16261
bec39cab 16262 esac
81ecdfbb 16263done # for ac_tag
c906108c 16264
bec39cab 16265
81ecdfbb 16266as_fn_exit 0
bec39cab 16267_ACEOF
bec39cab
AC
16268ac_clean_files=$ac_clean_files_save
16269
81ecdfbb
RW
16270test $ac_write_fail = 0 ||
16271 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
16272
bec39cab
AC
16273
16274# configure is writing to config.log, and then calls config.status.
16275# config.status does its own redirection, appending to config.log.
16276# Unfortunately, on DOS this fails, as config.log is still kept open
16277# by configure, so config.status won't be able to write to it; its
16278# output is simply discarded. So we exec the FD to /dev/null,
16279# effectively closing config.log, so it can be properly (re)opened and
16280# appended to by config.status. When coming back to configure, we
16281# need to make the FD available again.
16282if test "$no_create" != yes; then
16283 ac_cs_success=:
16284 ac_config_status_args=
16285 test "$silent" = yes &&
16286 ac_config_status_args="$ac_config_status_args --quiet"
16287 exec 5>/dev/null
16288 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
16289 exec 5>>config.log
16290 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16291 # would make configure fail if this is the last instruction.
81ecdfbb 16292 $ac_cs_success || as_fn_exit $?
bec39cab 16293fi
c906108c 16294
bec39cab 16295#
81ecdfbb 16296# CONFIG_SUBDIRS section.
bec39cab 16297#
c906108c
SS
16298if test "$no_recursion" != yes; then
16299
81ecdfbb
RW
16300 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
16301 # so they do not pile up.
c906108c
SS
16302 ac_sub_configure_args=
16303 ac_prev=
fdc59709
PB
16304 eval "set x $ac_configure_args"
16305 shift
16306 for ac_arg
16307 do
c906108c
SS
16308 if test -n "$ac_prev"; then
16309 ac_prev=
16310 continue
16311 fi
bec39cab 16312 case $ac_arg in
c906108c
SS
16313 -cache-file | --cache-file | --cache-fil | --cache-fi \
16314 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
16315 ac_prev=cache_file ;;
16316 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
bec39cab
AC
16317 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
16318 | --c=*)
16319 ;;
16320 --config-cache | -C)
c906108c
SS
16321 ;;
16322 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
16323 ac_prev=srcdir ;;
16324 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
16325 ;;
bec39cab
AC
16326 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
16327 ac_prev=prefix ;;
16328 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
16329 ;;
81ecdfbb
RW
16330 --disable-option-checking)
16331 ;;
fdc59709
PB
16332 *)
16333 case $ac_arg in
81ecdfbb 16334 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 16335 esac
81ecdfbb 16336 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
c906108c
SS
16337 esac
16338 done
16339
bec39cab
AC
16340 # Always prepend --prefix to ensure using the same prefix
16341 # in subdir configurations.
fdc59709
PB
16342 ac_arg="--prefix=$prefix"
16343 case $ac_arg in
81ecdfbb 16344 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 16345 esac
81ecdfbb
RW
16346 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
16347
16348 # Pass --silent
16349 if test "$silent" = yes; then
16350 ac_sub_configure_args="--silent $ac_sub_configure_args"
16351 fi
16352
16353 # Always prepend --disable-option-checking to silence warnings, since
16354 # different subdirs can have different --enable and --with options.
16355 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
bec39cab 16356
b4e70030 16357 ac_popdir=`pwd`
bec39cab 16358 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
c906108c
SS
16359
16360 # Do not complain, so a configure script can configure whichever
16361 # parts of a large source tree are present.
fdc59709 16362 test -d "$srcdir/$ac_dir" || continue
c906108c 16363
81ecdfbb
RW
16364 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
16365 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
16366 $as_echo "$ac_msg" >&6
16367 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
16368 ac_builddir=.
16369
81ecdfbb
RW
16370case "$ac_dir" in
16371.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16372*)
16373 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
16374 # A ".." for each directory in $ac_dir_suffix.
16375 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
16376 case $ac_top_builddir_sub in
16377 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16378 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16379 esac ;;
16380esac
16381ac_abs_top_builddir=$ac_pwd
16382ac_abs_builddir=$ac_pwd$ac_dir_suffix
16383# for backward compatibility:
16384ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
16385
16386case $srcdir in
81ecdfbb 16387 .) # We are building in place.
bec39cab 16388 ac_srcdir=.
81ecdfbb
RW
16389 ac_top_srcdir=$ac_top_builddir_sub
16390 ac_abs_top_srcdir=$ac_pwd ;;
16391 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 16392 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
16393 ac_top_srcdir=$srcdir
16394 ac_abs_top_srcdir=$srcdir ;;
16395 *) # Relative name.
16396 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16397 ac_top_srcdir=$ac_top_build_prefix$srcdir
16398 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 16399esac
81ecdfbb 16400ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
c906108c 16401
c906108c 16402
fdc59709 16403 cd "$ac_dir"
c906108c
SS
16404
16405 # Check for guested configure; otherwise get Cygnus style configure.
fdc59709
PB
16406 if test -f "$ac_srcdir/configure.gnu"; then
16407 ac_sub_configure=$ac_srcdir/configure.gnu
16408 elif test -f "$ac_srcdir/configure"; then
16409 ac_sub_configure=$ac_srcdir/configure
16410 elif test -f "$ac_srcdir/configure.in"; then
16411 # This should be Cygnus configure.
16412 ac_sub_configure=$ac_aux_dir/configure
c906108c 16413 else
81ecdfbb
RW
16414 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
16415$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
c906108c
SS
16416 ac_sub_configure=
16417 fi
16418
16419 # The recursion is here.
16420 if test -n "$ac_sub_configure"; then
c906108c 16421 # Make the cache file name correct relative to the subdirectory.
bec39cab
AC
16422 case $cache_file in
16423 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
81ecdfbb
RW
16424 *) # Relative name.
16425 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
c906108c 16426 esac
c906108c 16427
81ecdfbb
RW
16428 { $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
16429$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
c906108c 16430 # The eval makes quoting arguments work.
fdc59709
PB
16431 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
16432 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
81ecdfbb 16433 as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
c906108c
SS
16434 fi
16435
fdc59709 16436 cd "$ac_popdir"
c906108c
SS
16437 done
16438fi
81ecdfbb
RW
16439if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16440 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16441$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
16442fi
c906108c
SS
16443
16444
16445exit 0
This page took 2.643302 seconds and 4 git commands to generate.