2013-04-22 Edjunior Machado <emachado@linux.vnet.ibm.com>
[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
718target_os
719target_vendor
720target_cpu
721target
722host_os
723host_vendor
724host_cpu
725host
726build_os
727build_vendor
728build_cpu
729build
c971b7fa
PA
730EGREP
731GREP
732CPP
81ecdfbb
RW
733OBJEXT
734EXEEXT
735ac_ct_CC
736CPPFLAGS
737LDFLAGS
738CFLAGS
739CC
740MAINT
741MAINTAINER_MODE_FALSE
742MAINTAINER_MODE_TRUE
743target_alias
744host_alias
745build_alias
746LIBS
747ECHO_T
748ECHO_N
749ECHO_C
750DEFS
751mandir
752localedir
753libdir
754psdir
755pdfdir
756dvidir
757htmldir
758infodir
759docdir
760oldincludedir
761includedir
762localstatedir
763sharedstatedir
764sysconfdir
765datadir
766datarootdir
767libexecdir
768sbindir
769bindir
770program_transform_name
771prefix
772exec_prefix
773PACKAGE_URL
774PACKAGE_BUGREPORT
775PACKAGE_STRING
776PACKAGE_VERSION
777PACKAGE_TARNAME
778PACKAGE_NAME
779PATH_SEPARATOR
780SHELL'
a4ce5b0d 781ac_subst_files='host_makefile_frag'
81ecdfbb
RW
782ac_user_opts='
783enable_option_checking
784enable_maintainer_mode
da2f07f1
JK
785enable_plugins
786enable_largefile
81ecdfbb
RW
787with_separate_debug_dir
788with_gdb_datadir
789with_relocated_sources
7349ff92 790with_auto_load_dir
bccbefd2 791with_auto_load_safe_path
81ecdfbb
RW
792enable_targets
793enable_64_bit_bfd
794enable_gdbcli
795enable_gdbmi
796enable_tui
797enable_gdbtk
05e7c244 798with_libunwind_ia64
81ecdfbb
RW
799with_curses
800enable_profiling
801with_pkgversion
802with_bugurl
b040ad30 803with_zlib
81ecdfbb 804with_libiconv_prefix
478aac75 805with_iconv_bin
81ecdfbb 806with_system_readline
b8e0a31c 807with_jit_reader_dir
81ecdfbb
RW
808with_expat
809with_gnu_ld
810enable_rpath
811with_libexpat_prefix
812with_python
a8db4212 813enable_libmcheck
81ecdfbb
RW
814with_included_regex
815with_sysroot
816with_system_gdbinit
817enable_werror
818enable_build_warnings
819enable_gdb_build_warnings
608e2dbb
TT
820with_lzma
821with_liblzma_prefix
81ecdfbb
RW
822with_tcl
823with_tk
824with_x
825enable_sim
826enable_multi_ice
496c0e1b 827enable_gdbserver
393fd4c3
YQ
828with_babeltrace
829with_libbabeltrace_prefix
81ecdfbb
RW
830'
831 ac_precious_vars='build_alias
832host_alias
833target_alias
834CC
835CFLAGS
836LDFLAGS
837LIBS
838CPPFLAGS
839CPP
f06e05e0
JK
840MAKEINFO
841MAKEINFOFLAGS
81ecdfbb
RW
842YACC
843YFLAGS
844XMKMF'
5ae98d25 845ac_subdirs_all='testsuite
81ecdfbb
RW
846gdbtk
847multi-ice
848gdbserver'
c906108c
SS
849
850# Initialize some variables set by options.
bec39cab
AC
851ac_init_help=
852ac_init_version=false
81ecdfbb
RW
853ac_unrecognized_opts=
854ac_unrecognized_sep=
c906108c
SS
855# The variables have the same names as the options, with
856# dashes changed to underlines.
bec39cab 857cache_file=/dev/null
c906108c 858exec_prefix=NONE
c906108c 859no_create=
c906108c
SS
860no_recursion=
861prefix=NONE
862program_prefix=NONE
863program_suffix=NONE
864program_transform_name=s,x,x,
865silent=
866site=
867srcdir=
c906108c
SS
868verbose=
869x_includes=NONE
870x_libraries=NONE
bec39cab
AC
871
872# Installation directory options.
873# These are left unexpanded so users can "make install exec_prefix=/foo"
874# and all the variables that are supposed to be based on exec_prefix
875# by default will actually change.
876# Use braces instead of parens because sh, perl, etc. also accept them.
81ecdfbb 877# (The list follows the same order as the GNU Coding Standards.)
c906108c
SS
878bindir='${exec_prefix}/bin'
879sbindir='${exec_prefix}/sbin'
880libexecdir='${exec_prefix}/libexec'
81ecdfbb
RW
881datarootdir='${prefix}/share'
882datadir='${datarootdir}'
c906108c
SS
883sysconfdir='${prefix}/etc'
884sharedstatedir='${prefix}/com'
885localstatedir='${prefix}/var'
c906108c
SS
886includedir='${prefix}/include'
887oldincludedir='/usr/include'
81ecdfbb
RW
888docdir='${datarootdir}/doc/${PACKAGE}'
889infodir='${datarootdir}/info'
890htmldir='${docdir}'
891dvidir='${docdir}'
892pdfdir='${docdir}'
893psdir='${docdir}'
894libdir='${exec_prefix}/lib'
895localedir='${datarootdir}/locale'
896mandir='${datarootdir}/man'
c906108c 897
c906108c 898ac_prev=
81ecdfbb 899ac_dashdash=
c906108c
SS
900for ac_option
901do
c906108c
SS
902 # If the previous option needs an argument, assign it.
903 if test -n "$ac_prev"; then
81ecdfbb 904 eval $ac_prev=\$ac_option
c906108c
SS
905 ac_prev=
906 continue
907 fi
908
81ecdfbb
RW
909 case $ac_option in
910 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
911 *) ac_optarg=yes ;;
912 esac
c906108c
SS
913
914 # Accept the important Cygnus configure options, so we can diagnose typos.
915
81ecdfbb
RW
916 case $ac_dashdash$ac_option in
917 --)
918 ac_dashdash=yes ;;
c906108c
SS
919
920 -bindir | --bindir | --bindi | --bind | --bin | --bi)
921 ac_prev=bindir ;;
922 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
bec39cab 923 bindir=$ac_optarg ;;
c906108c
SS
924
925 -build | --build | --buil | --bui | --bu)
bec39cab 926 ac_prev=build_alias ;;
c906108c 927 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
bec39cab 928 build_alias=$ac_optarg ;;
c906108c
SS
929
930 -cache-file | --cache-file | --cache-fil | --cache-fi \
931 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
932 ac_prev=cache_file ;;
933 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
934 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
bec39cab
AC
935 cache_file=$ac_optarg ;;
936
937 --config-cache | -C)
938 cache_file=config.cache ;;
c906108c 939
81ecdfbb 940 -datadir | --datadir | --datadi | --datad)
c906108c 941 ac_prev=datadir ;;
81ecdfbb 942 -datadir=* | --datadir=* | --datadi=* | --datad=*)
bec39cab 943 datadir=$ac_optarg ;;
c906108c 944
81ecdfbb
RW
945 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
946 | --dataroo | --dataro | --datar)
947 ac_prev=datarootdir ;;
948 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
949 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
950 datarootdir=$ac_optarg ;;
951
c906108c 952 -disable-* | --disable-*)
81ecdfbb 953 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
c906108c 954 # Reject names that are not valid shell variable names.
81ecdfbb
RW
955 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
956 as_fn_error "invalid feature name: $ac_useropt"
957 ac_useropt_orig=$ac_useropt
958 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
959 case $ac_user_opts in
960 *"
961"enable_$ac_useropt"
962"*) ;;
963 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
964 ac_unrecognized_sep=', ';;
965 esac
966 eval enable_$ac_useropt=no ;;
967
968 -docdir | --docdir | --docdi | --doc | --do)
969 ac_prev=docdir ;;
970 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
971 docdir=$ac_optarg ;;
972
973 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
974 ac_prev=dvidir ;;
975 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
976 dvidir=$ac_optarg ;;
c906108c
SS
977
978 -enable-* | --enable-*)
81ecdfbb 979 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
c906108c 980 # Reject names that are not valid shell variable names.
81ecdfbb
RW
981 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
982 as_fn_error "invalid feature name: $ac_useropt"
983 ac_useropt_orig=$ac_useropt
984 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
985 case $ac_user_opts in
986 *"
987"enable_$ac_useropt"
988"*) ;;
989 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
990 ac_unrecognized_sep=', ';;
b4e70030 991 esac
81ecdfbb 992 eval enable_$ac_useropt=\$ac_optarg ;;
c906108c
SS
993
994 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
995 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
996 | --exec | --exe | --ex)
997 ac_prev=exec_prefix ;;
998 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
999 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1000 | --exec=* | --exe=* | --ex=*)
bec39cab 1001 exec_prefix=$ac_optarg ;;
c906108c
SS
1002
1003 -gas | --gas | --ga | --g)
1004 # Obsolete; use --with-gas.
1005 with_gas=yes ;;
1006
bec39cab
AC
1007 -help | --help | --hel | --he | -h)
1008 ac_init_help=long ;;
1009 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1010 ac_init_help=recursive ;;
1011 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1012 ac_init_help=short ;;
c906108c
SS
1013
1014 -host | --host | --hos | --ho)
bec39cab 1015 ac_prev=host_alias ;;
c906108c 1016 -host=* | --host=* | --hos=* | --ho=*)
bec39cab 1017 host_alias=$ac_optarg ;;
c906108c 1018
81ecdfbb
RW
1019 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1020 ac_prev=htmldir ;;
1021 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1022 | --ht=*)
1023 htmldir=$ac_optarg ;;
1024
c906108c
SS
1025 -includedir | --includedir | --includedi | --included | --include \
1026 | --includ | --inclu | --incl | --inc)
1027 ac_prev=includedir ;;
1028 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1029 | --includ=* | --inclu=* | --incl=* | --inc=*)
bec39cab 1030 includedir=$ac_optarg ;;
c906108c
SS
1031
1032 -infodir | --infodir | --infodi | --infod | --info | --inf)
1033 ac_prev=infodir ;;
1034 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
bec39cab 1035 infodir=$ac_optarg ;;
c906108c
SS
1036
1037 -libdir | --libdir | --libdi | --libd)
1038 ac_prev=libdir ;;
1039 -libdir=* | --libdir=* | --libdi=* | --libd=*)
bec39cab 1040 libdir=$ac_optarg ;;
c906108c
SS
1041
1042 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1043 | --libexe | --libex | --libe)
1044 ac_prev=libexecdir ;;
1045 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1046 | --libexe=* | --libex=* | --libe=*)
bec39cab 1047 libexecdir=$ac_optarg ;;
c906108c 1048
81ecdfbb
RW
1049 -localedir | --localedir | --localedi | --localed | --locale)
1050 ac_prev=localedir ;;
1051 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1052 localedir=$ac_optarg ;;
1053
c906108c 1054 -localstatedir | --localstatedir | --localstatedi | --localstated \
81ecdfbb 1055 | --localstate | --localstat | --localsta | --localst | --locals)
c906108c
SS
1056 ac_prev=localstatedir ;;
1057 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
81ecdfbb 1058 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
bec39cab 1059 localstatedir=$ac_optarg ;;
c906108c
SS
1060
1061 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1062 ac_prev=mandir ;;
1063 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
bec39cab 1064 mandir=$ac_optarg ;;
c906108c
SS
1065
1066 -nfp | --nfp | --nf)
1067 # Obsolete; use --without-fp.
1068 with_fp=no ;;
1069
1070 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
bec39cab 1071 | --no-cr | --no-c | -n)
c906108c
SS
1072 no_create=yes ;;
1073
1074 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1075 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1076 no_recursion=yes ;;
1077
1078 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1079 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1080 | --oldin | --oldi | --old | --ol | --o)
1081 ac_prev=oldincludedir ;;
1082 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1083 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1084 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
bec39cab 1085 oldincludedir=$ac_optarg ;;
c906108c
SS
1086
1087 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1088 ac_prev=prefix ;;
1089 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
bec39cab 1090 prefix=$ac_optarg ;;
c906108c
SS
1091
1092 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1093 | --program-pre | --program-pr | --program-p)
1094 ac_prev=program_prefix ;;
1095 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1096 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
bec39cab 1097 program_prefix=$ac_optarg ;;
c906108c
SS
1098
1099 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1100 | --program-suf | --program-su | --program-s)
1101 ac_prev=program_suffix ;;
1102 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1103 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
bec39cab 1104 program_suffix=$ac_optarg ;;
c906108c
SS
1105
1106 -program-transform-name | --program-transform-name \
1107 | --program-transform-nam | --program-transform-na \
1108 | --program-transform-n | --program-transform- \
1109 | --program-transform | --program-transfor \
1110 | --program-transfo | --program-transf \
1111 | --program-trans | --program-tran \
1112 | --progr-tra | --program-tr | --program-t)
1113 ac_prev=program_transform_name ;;
1114 -program-transform-name=* | --program-transform-name=* \
1115 | --program-transform-nam=* | --program-transform-na=* \
1116 | --program-transform-n=* | --program-transform-=* \
1117 | --program-transform=* | --program-transfor=* \
1118 | --program-transfo=* | --program-transf=* \
1119 | --program-trans=* | --program-tran=* \
1120 | --progr-tra=* | --program-tr=* | --program-t=*)
bec39cab 1121 program_transform_name=$ac_optarg ;;
c906108c 1122
81ecdfbb
RW
1123 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1124 ac_prev=pdfdir ;;
1125 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1126 pdfdir=$ac_optarg ;;
1127
1128 -psdir | --psdir | --psdi | --psd | --ps)
1129 ac_prev=psdir ;;
1130 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1131 psdir=$ac_optarg ;;
1132
c906108c
SS
1133 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1134 | -silent | --silent | --silen | --sile | --sil)
1135 silent=yes ;;
1136
1137 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1138 ac_prev=sbindir ;;
1139 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1140 | --sbi=* | --sb=*)
bec39cab 1141 sbindir=$ac_optarg ;;
c906108c
SS
1142
1143 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1144 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1145 | --sharedst | --shareds | --shared | --share | --shar \
1146 | --sha | --sh)
1147 ac_prev=sharedstatedir ;;
1148 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1149 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1150 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1151 | --sha=* | --sh=*)
bec39cab 1152 sharedstatedir=$ac_optarg ;;
c906108c
SS
1153
1154 -site | --site | --sit)
1155 ac_prev=site ;;
1156 -site=* | --site=* | --sit=*)
bec39cab 1157 site=$ac_optarg ;;
3ace7edb 1158
c906108c
SS
1159 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1160 ac_prev=srcdir ;;
1161 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
bec39cab 1162 srcdir=$ac_optarg ;;
c906108c
SS
1163
1164 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1165 | --syscon | --sysco | --sysc | --sys | --sy)
1166 ac_prev=sysconfdir ;;
1167 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1168 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
bec39cab 1169 sysconfdir=$ac_optarg ;;
c906108c
SS
1170
1171 -target | --target | --targe | --targ | --tar | --ta | --t)
bec39cab 1172 ac_prev=target_alias ;;
c906108c 1173 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
bec39cab 1174 target_alias=$ac_optarg ;;
c906108c
SS
1175
1176 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1177 verbose=yes ;;
1178
bec39cab
AC
1179 -version | --version | --versio | --versi | --vers | -V)
1180 ac_init_version=: ;;
c906108c
SS
1181
1182 -with-* | --with-*)
81ecdfbb 1183 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
c906108c 1184 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1185 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1186 as_fn_error "invalid package name: $ac_useropt"
1187 ac_useropt_orig=$ac_useropt
1188 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1189 case $ac_user_opts in
1190 *"
1191"with_$ac_useropt"
1192"*) ;;
1193 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1194 ac_unrecognized_sep=', ';;
b4e70030 1195 esac
81ecdfbb 1196 eval with_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1197
1198 -without-* | --without-*)
81ecdfbb 1199 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
c906108c 1200 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1201 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1202 as_fn_error "invalid package name: $ac_useropt"
1203 ac_useropt_orig=$ac_useropt
1204 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1205 case $ac_user_opts in
1206 *"
1207"with_$ac_useropt"
1208"*) ;;
1209 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1210 ac_unrecognized_sep=', ';;
1211 esac
1212 eval with_$ac_useropt=no ;;
c906108c
SS
1213
1214 --x)
1215 # Obsolete; use --with-x.
1216 with_x=yes ;;
1217
1218 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1219 | --x-incl | --x-inc | --x-in | --x-i)
1220 ac_prev=x_includes ;;
1221 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1222 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
bec39cab 1223 x_includes=$ac_optarg ;;
c906108c
SS
1224
1225 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1226 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1227 ac_prev=x_libraries ;;
1228 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1229 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
bec39cab 1230 x_libraries=$ac_optarg ;;
c906108c 1231
81ecdfbb
RW
1232 -*) as_fn_error "unrecognized option: \`$ac_option'
1233Try \`$0 --help' for more information."
c906108c
SS
1234 ;;
1235
bec39cab
AC
1236 *=*)
1237 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1238 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1239 case $ac_envvar in #(
1240 '' | [0-9]* | *[!_$as_cr_alnum]* )
1241 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1242 esac
1243 eval $ac_envvar=\$ac_optarg
bec39cab
AC
1244 export $ac_envvar ;;
1245
c906108c 1246 *)
bec39cab 1247 # FIXME: should be removed in autoconf 3.0.
81ecdfbb 1248 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
bec39cab 1249 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
81ecdfbb 1250 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
bec39cab 1251 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
c906108c
SS
1252 ;;
1253
1254 esac
1255done
1256
1257if test -n "$ac_prev"; then
bec39cab 1258 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
81ecdfbb 1259 as_fn_error "missing argument to $ac_option"
c906108c 1260fi
c906108c 1261
81ecdfbb
RW
1262if test -n "$ac_unrecognized_opts"; then
1263 case $enable_option_checking in
1264 no) ;;
1265 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
1266 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
b4e70030 1267 esac
81ecdfbb 1268fi
b4e70030 1269
81ecdfbb
RW
1270# Check all directory arguments for consistency.
1271for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1272 datadir sysconfdir sharedstatedir localstatedir includedir \
1273 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1274 libdir localedir mandir
b4e70030 1275do
81ecdfbb
RW
1276 eval ac_val=\$$ac_var
1277 # Remove trailing slashes.
1278 case $ac_val in
1279 */ )
1280 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1281 eval $ac_var=\$ac_val;;
1282 esac
1283 # Be sure to have absolute directory names.
b4e70030 1284 case $ac_val in
81ecdfbb
RW
1285 [\\/$]* | ?:[\\/]* ) continue;;
1286 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
c906108c 1287 esac
81ecdfbb 1288 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
c906108c
SS
1289done
1290
bec39cab
AC
1291# There might be people who depend on the old broken behavior: `$host'
1292# used to hold the argument of --host etc.
1293# FIXME: To remove some day.
1294build=$build_alias
1295host=$host_alias
1296target=$target_alias
1297
1298# FIXME: To remove some day.
1299if test "x$host_alias" != x; then
1300 if test "x$build_alias" = x; then
1301 cross_compiling=maybe
81ecdfbb 1302 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
bec39cab
AC
1303 If a cross compiler is detected then cross compile mode will be used." >&2
1304 elif test "x$build_alias" != "x$host_alias"; then
1305 cross_compiling=yes
1306 fi
1307fi
c906108c 1308
bec39cab
AC
1309ac_tool_prefix=
1310test -n "$host_alias" && ac_tool_prefix=$host_alias-
1311
1312test "$silent" = yes && exec 6>/dev/null
c906108c 1313
c906108c 1314
81ecdfbb
RW
1315ac_pwd=`pwd` && test -n "$ac_pwd" &&
1316ac_ls_di=`ls -di .` &&
1317ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1318 as_fn_error "working directory cannot be determined"
1319test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1320 as_fn_error "pwd does not report name of working directory"
1321
1322
c906108c
SS
1323# Find the source files, if location was not specified.
1324if test -z "$srcdir"; then
1325 ac_srcdir_defaulted=yes
81ecdfbb
RW
1326 # Try the directory containing this script, then the parent directory.
1327 ac_confdir=`$as_dirname -- "$as_myself" ||
1328$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1329 X"$as_myself" : 'X\(//\)[^/]' \| \
1330 X"$as_myself" : 'X\(//\)$' \| \
1331 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1332$as_echo X"$as_myself" |
1333 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1334 s//\1/
1335 q
1336 }
1337 /^X\(\/\/\)[^/].*/{
1338 s//\1/
1339 q
1340 }
1341 /^X\(\/\/\)$/{
1342 s//\1/
1343 q
1344 }
1345 /^X\(\/\).*/{
1346 s//\1/
1347 q
1348 }
1349 s/.*/./; q'`
c906108c 1350 srcdir=$ac_confdir
81ecdfbb 1351 if test ! -r "$srcdir/$ac_unique_file"; then
c906108c
SS
1352 srcdir=..
1353 fi
1354else
1355 ac_srcdir_defaulted=no
1356fi
81ecdfbb
RW
1357if test ! -r "$srcdir/$ac_unique_file"; then
1358 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1359 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
1360fi
1361ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1362ac_abs_confdir=`(
1363 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
1364 pwd)`
1365# When building in place, set srcdir=.
1366if test "$ac_abs_confdir" = "$ac_pwd"; then
1367 srcdir=.
1368fi
1369# Remove unnecessary trailing slashes from srcdir.
1370# Double slashes in file names in object file debugging info
1371# mess up M-x gdb in Emacs.
1372case $srcdir in
1373*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1374esac
1375for ac_var in $ac_precious_vars; do
1376 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1377 eval ac_env_${ac_var}_value=\$${ac_var}
1378 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1379 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1380done
c906108c 1381
bec39cab
AC
1382#
1383# Report the --help message.
1384#
1385if test "$ac_init_help" = "long"; then
1386 # Omit some internal or obsolete options to make the list less imposing.
1387 # This message is too long to be a string in the A/UX 3.1 sh.
1388 cat <<_ACEOF
1389\`configure' configures this package to adapt to many kinds of systems.
1390
1391Usage: $0 [OPTION]... [VAR=VALUE]...
1392
1393To assign environment variables (e.g., CC, CFLAGS...), specify them as
1394VAR=VALUE. See below for descriptions of some of the useful variables.
1395
1396Defaults for the options are specified in brackets.
1397
1398Configuration:
1399 -h, --help display this help and exit
1400 --help=short display options specific to this package
1401 --help=recursive display the short help of all the included packages
1402 -V, --version display version information and exit
1403 -q, --quiet, --silent do not print \`checking...' messages
1404 --cache-file=FILE cache test results in FILE [disabled]
1405 -C, --config-cache alias for \`--cache-file=config.cache'
1406 -n, --no-create do not create output files
1407 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1408
bec39cab
AC
1409Installation directories:
1410 --prefix=PREFIX install architecture-independent files in PREFIX
81ecdfbb 1411 [$ac_default_prefix]
bec39cab 1412 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
81ecdfbb 1413 [PREFIX]
bec39cab
AC
1414
1415By default, \`make install' will install all the files in
1416\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1417an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1418for instance \`--prefix=\$HOME'.
1419
1420For better control, use the options below.
1421
1422Fine tuning of the installation directories:
81ecdfbb
RW
1423 --bindir=DIR user executables [EPREFIX/bin]
1424 --sbindir=DIR system admin executables [EPREFIX/sbin]
1425 --libexecdir=DIR program executables [EPREFIX/libexec]
1426 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1427 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1428 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1429 --libdir=DIR object code libraries [EPREFIX/lib]
1430 --includedir=DIR C header files [PREFIX/include]
1431 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1432 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1433 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1434 --infodir=DIR info documentation [DATAROOTDIR/info]
1435 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1436 --mandir=DIR man documentation [DATAROOTDIR/man]
1437 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1438 --htmldir=DIR html documentation [DOCDIR]
1439 --dvidir=DIR dvi documentation [DOCDIR]
1440 --pdfdir=DIR pdf documentation [DOCDIR]
1441 --psdir=DIR ps documentation [DOCDIR]
bec39cab
AC
1442_ACEOF
1443
1444 cat <<\_ACEOF
1445
9009e1ae
MR
1446Program names:
1447 --program-prefix=PREFIX prepend PREFIX to installed program names
1448 --program-suffix=SUFFIX append SUFFIX to installed program names
1449 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1450
bec39cab
AC
1451X features:
1452 --x-includes=DIR X include files are in DIR
1453 --x-libraries=DIR X library files are in DIR
1454
1455System types:
1456 --build=BUILD configure for building on BUILD [guessed]
1457 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1458 --target=TARGET configure for building compilers for TARGET [HOST]
1459_ACEOF
1460fi
1461
1462if test -n "$ac_init_help"; then
1463
1464 cat <<\_ACEOF
1465
1466Optional Features:
81ecdfbb 1467 --disable-option-checking ignore unrecognized --enable/--with options
bec39cab
AC
1468 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1469 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
85981d60
AC
1470 --enable-maintainer-mode enable make rules and dependencies not useful
1471 (and sometimes confusing) to the casual installer
da2f07f1
JK
1472 --enable-plugins Enable support for plugins (defaults no)
1473 --disable-largefile omit support for large files
a1220294
TT
1474 --enable-targets=TARGETS
1475 alternative target configurations
c0993dbe 1476 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
bec39cab
AC
1477 --disable-gdbcli disable command-line interface (CLI)
1478 --disable-gdbmi disable machine-interface (MI)
1479 --enable-tui enable full-screen terminal user interface (TUI)
1480 --enable-gdbtk enable gdbtk graphical user interface (GUI)
1481 --enable-profiling enable profiling of GDB
3841debe 1482 --disable-rpath do not hardcode runtime library paths
a8db4212 1483 --enable-libmcheck Try building GDB with -lmcheck if available
a1220294 1484 --enable-werror treat compile warnings as errors
32c1c914 1485 --enable-build-warnings enable build-time compiler warnings if gcc is used
a1220294 1486 --enable-gdb-build-warnings
32c1c914 1487 enable GDB specific build-time compiler warnings if
a1220294 1488 gcc is used
32c1c914 1489 --enable-sim link gdb with simulator
bec39cab 1490 --enable-multi-ice build the multi-ice-gdb-server
496c0e1b
JB
1491 --enable-gdbserver automatically build gdbserver (yes/no/auto, default
1492 is auto)
bec39cab
AC
1493
1494Optional Packages:
1495 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1496 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
a1220294 1497 --with-separate-debug-dir=PATH
32c1c914 1498 look for global separate debug info in this path
62e4f60c 1499 [LIBDIR/debug]
b14b1491
TT
1500 --with-gdb-datadir=PATH look for global separate data files in this path
1501 [DATADIR/gdb]
29b0e8a2 1502 --with-relocated-sources=PATH
32c1c914 1503 automatically relocate this path for source files
7349ff92 1504 --with-auto-load-dir=PATH
aff139ff 1505 directories from which to load auto-loaded scripts
1564a261 1506 [$debugdir:$datadir/auto-load]
bccbefd2 1507 --with-auto-load-safe-path=PATH
aff139ff 1508 directories safe to hold auto-loaded files
7349ff92 1509 [--with-auto-load-dir]
bccbefd2
JK
1510 --without-auto-load-safe-path
1511 do not restrict auto-loaded files locations
05e7c244 1512 --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets
cb01cfba
JB
1513 --with-curses use the curses library instead of the termcap
1514 library
c16158bc
JM
1515 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
1516 --with-bugurl=URL Direct users to URL to report a bug
b040ad30 1517 --with-zlib include zlib support (auto/yes/no) default=auto
a1220294
TT
1518 --with-libiconv-prefix=DIR
1519 search for libiconv in DIR/include and DIR/lib
478aac75 1520 --with-iconv-bin=PATH specify where to find the iconv program
6a30b0a5 1521 --with-system-readline use installed readline library
b8e0a31c
SD
1522 --with-jit-reader-dir=PATH
1523 directory to load the JIT readers from
5c39566f 1524 --with-expat include expat support (auto/yes/no)
3841debe
DJ
1525 --with-gnu-ld assume the C compiler uses GNU ld default=no
1526 --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib
1527 --without-libexpat-prefix don't search for libexpat in includedir and libdir
0c4a4063
DE
1528 --with-python[=PYTHON] include python support
1529 (auto/yes/no/<python-program>)
a1220294
TT
1530 --without-included-regex
1531 don't use included regex; this is the default on
1532 systems with version 2 of the GNU C library (use
1533 with caution on other system)
81ecdfbb 1534 --with-sysroot[=DIR] search for usr/lib et al within DIR
b14b1491 1535 --with-system-gdbinit=PATH
32c1c914 1536 automatically load a system-wide gdbinit file
608e2dbb
TT
1537 --with-lzma support lzma compression (auto/yes/no)
1538 --with-liblzma-prefix[=DIR] search for liblzma in DIR/include and DIR/lib
1539 --without-liblzma-prefix don't search for liblzma in includedir and libdir
5062cc19
KS
1540 --with-tcl directory containing tcl configuration (tclConfig.sh)
1541 --with-tk directory containing tk configuration (tkConfig.sh)
bec39cab 1542 --with-x use the X Window System
393fd4c3
YQ
1543 --with-babeltrace include babeltrace support (auto/yes/no)
1544 --with-libbabeltrace-prefix[=DIR] search for libbabeltrace in DIR/include and DIR/lib
1545 --without-libbabeltrace-prefix don't search for libbabeltrace in includedir and libdir
bec39cab
AC
1546
1547Some influential environment variables:
1548 CC C compiler command
1549 CFLAGS C compiler flags
1550 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1551 nonstandard directory <lib dir>
81ecdfbb
RW
1552 LIBS libraries to pass to the linker, e.g. -l<library>
1553 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1554 you have headers in a nonstandard directory <include dir>
bec39cab 1555 CPP C preprocessor
f06e05e0
JK
1556 MAKEINFO Parent configure detects if it is of sufficient version.
1557 MAKEINFOFLAGS
1558 Parameters for MAKEINFO.
81ecdfbb
RW
1559 YACC The `Yet Another C Compiler' implementation to use. Defaults to
1560 the first program found out of: `bison -y', `byacc', `yacc'.
1561 YFLAGS The list of arguments that will be passed by default to $YACC.
1562 This script will default YFLAGS to the empty string to avoid a
1563 default value of `-d' given by some make applications.
1564 XMKMF Path to xmkmf, Makefile generator for X Window System
bec39cab
AC
1565
1566Use these variables to override the choices made by `configure' or to help
1567it to find libraries and programs with nonstandard names/locations.
1568
81ecdfbb 1569Report bugs to the package provider.
bec39cab 1570_ACEOF
81ecdfbb 1571ac_status=$?
bec39cab
AC
1572fi
1573
1574if test "$ac_init_help" = "recursive"; then
1575 # If there are subdirs, report their specific --help.
bec39cab 1576 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
81ecdfbb
RW
1577 test -d "$ac_dir" ||
1578 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1579 continue
bec39cab
AC
1580 ac_builddir=.
1581
81ecdfbb
RW
1582case "$ac_dir" in
1583.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1584*)
1585 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1586 # A ".." for each directory in $ac_dir_suffix.
1587 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1588 case $ac_top_builddir_sub in
1589 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1590 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1591 esac ;;
1592esac
1593ac_abs_top_builddir=$ac_pwd
1594ac_abs_builddir=$ac_pwd$ac_dir_suffix
1595# for backward compatibility:
1596ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
1597
1598case $srcdir in
81ecdfbb 1599 .) # We are building in place.
bec39cab 1600 ac_srcdir=.
81ecdfbb
RW
1601 ac_top_srcdir=$ac_top_builddir_sub
1602 ac_abs_top_srcdir=$ac_pwd ;;
1603 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 1604 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
1605 ac_top_srcdir=$srcdir
1606 ac_abs_top_srcdir=$srcdir ;;
1607 *) # Relative name.
1608 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1609 ac_top_srcdir=$ac_top_build_prefix$srcdir
1610 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 1611esac
81ecdfbb 1612ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 1613
81ecdfbb
RW
1614 cd "$ac_dir" || { ac_status=$?; continue; }
1615 # Check for guested configure.
1616 if test -f "$ac_srcdir/configure.gnu"; then
1617 echo &&
1618 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1619 elif test -f "$ac_srcdir/configure"; then
1620 echo &&
1621 $SHELL "$ac_srcdir/configure" --help=recursive
3ace7edb 1622 else
81ecdfbb
RW
1623 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1624 fi || ac_status=$?
1625 cd "$ac_pwd" || { ac_status=$?; break; }
bec39cab
AC
1626 done
1627fi
1628
81ecdfbb 1629test -n "$ac_init_help" && exit $ac_status
bec39cab
AC
1630if $ac_init_version; then
1631 cat <<\_ACEOF
81ecdfbb
RW
1632configure
1633generated by GNU Autoconf 2.64
bec39cab 1634
81ecdfbb 1635Copyright (C) 2009 Free Software Foundation, Inc.
bec39cab
AC
1636This configure script is free software; the Free Software Foundation
1637gives unlimited permission to copy, distribute and modify it.
1638_ACEOF
81ecdfbb 1639 exit
bec39cab 1640fi
bec39cab 1641
81ecdfbb
RW
1642## ------------------------ ##
1643## Autoconf initialization. ##
1644## ------------------------ ##
bec39cab 1645
81ecdfbb
RW
1646# ac_fn_c_try_compile LINENO
1647# --------------------------
1648# Try to compile conftest.$ac_ext, and return whether this succeeded.
1649ac_fn_c_try_compile ()
1650{
1651 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1652 rm -f conftest.$ac_objext
1653 if { { ac_try="$ac_compile"
1654case "(($ac_try" in
1655 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1656 *) ac_try_echo=$ac_try;;
1657esac
1658eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1659$as_echo "$ac_try_echo"; } >&5
1660 (eval "$ac_compile") 2>conftest.err
1661 ac_status=$?
1662 if test -s conftest.err; then
1663 grep -v '^ *+' conftest.err >conftest.er1
1664 cat conftest.er1 >&5
1665 mv -f conftest.er1 conftest.err
1666 fi
1667 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1668 test $ac_status = 0; } && {
1669 test -z "$ac_c_werror_flag" ||
1670 test ! -s conftest.err
1671 } && test -s conftest.$ac_objext; then :
1672 ac_retval=0
1673else
1674 $as_echo "$as_me: failed program was:" >&5
1675sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1676
81ecdfbb
RW
1677 ac_retval=1
1678fi
1679 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1680 return $ac_retval
1681
1682} # ac_fn_c_try_compile
1683
1684# ac_fn_c_try_cpp LINENO
1685# ----------------------
1686# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1687ac_fn_c_try_cpp ()
bec39cab 1688{
81ecdfbb
RW
1689 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1690 if { { ac_try="$ac_cpp conftest.$ac_ext"
1691case "(($ac_try" in
1692 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1693 *) ac_try_echo=$ac_try;;
1694esac
1695eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1696$as_echo "$ac_try_echo"; } >&5
1697 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1698 ac_status=$?
1699 if test -s conftest.err; then
1700 grep -v '^ *+' conftest.err >conftest.er1
1701 cat conftest.er1 >&5
1702 mv -f conftest.er1 conftest.err
1703 fi
1704 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1705 test $ac_status = 0; } >/dev/null && {
1706 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1707 test ! -s conftest.err
1708 }; then :
1709 ac_retval=0
1710else
1711 $as_echo "$as_me: failed program was:" >&5
1712sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1713
81ecdfbb
RW
1714 ac_retval=1
1715fi
1716 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1717 return $ac_retval
bec39cab 1718
81ecdfbb 1719} # ac_fn_c_try_cpp
bec39cab 1720
81ecdfbb
RW
1721# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1722# -------------------------------------------------------
1723# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1724# the include files in INCLUDES and setting the cache variable VAR
1725# accordingly.
1726ac_fn_c_check_header_mongrel ()
1727{
1728 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1729 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1730 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1731$as_echo_n "checking for $2... " >&6; }
1732if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1733 $as_echo_n "(cached) " >&6
1734fi
1735eval ac_res=\$$3
1736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1737$as_echo "$ac_res" >&6; }
1738else
1739 # Is the header compilable?
1740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1741$as_echo_n "checking $2 usability... " >&6; }
1742cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1743/* end confdefs.h. */
1744$4
1745#include <$2>
1746_ACEOF
1747if ac_fn_c_try_compile "$LINENO"; then :
1748 ac_header_compiler=yes
1749else
1750 ac_header_compiler=no
1751fi
1752rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1753{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1754$as_echo "$ac_header_compiler" >&6; }
bec39cab 1755
81ecdfbb
RW
1756# Is the header present?
1757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1758$as_echo_n "checking $2 presence... " >&6; }
1759cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1760/* end confdefs.h. */
1761#include <$2>
1762_ACEOF
1763if ac_fn_c_try_cpp "$LINENO"; then :
1764 ac_header_preproc=yes
1765else
1766 ac_header_preproc=no
1767fi
1768rm -f conftest.err conftest.$ac_ext
1769{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1770$as_echo "$ac_header_preproc" >&6; }
bec39cab 1771
81ecdfbb
RW
1772# So? What about this header?
1773case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1774 yes:no: )
1775 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1776$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1777 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1778$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1779 ;;
1780 no:yes:* )
1781 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1782$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1783 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1784$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1785 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1786$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1787 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1788$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1789 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1790$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1791 ;;
1792esac
1793 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1794$as_echo_n "checking for $2... " >&6; }
1795if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1796 $as_echo_n "(cached) " >&6
1797else
1798 eval "$3=\$ac_header_compiler"
1799fi
1800eval ac_res=\$$3
1801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1802$as_echo "$ac_res" >&6; }
1803fi
1804 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 1805
81ecdfbb 1806} # ac_fn_c_check_header_mongrel
bec39cab 1807
81ecdfbb
RW
1808# ac_fn_c_try_run LINENO
1809# ----------------------
1810# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1811# that executables *can* be run.
1812ac_fn_c_try_run ()
1813{
1814 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1815 if { { ac_try="$ac_link"
1816case "(($ac_try" in
1817 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1818 *) ac_try_echo=$ac_try;;
1819esac
1820eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1821$as_echo "$ac_try_echo"; } >&5
1822 (eval "$ac_link") 2>&5
1823 ac_status=$?
1824 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1825 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1826 { { case "(($ac_try" in
1827 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1828 *) ac_try_echo=$ac_try;;
1829esac
1830eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1831$as_echo "$ac_try_echo"; } >&5
1832 (eval "$ac_try") 2>&5
1833 ac_status=$?
1834 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1835 test $ac_status = 0; }; }; then :
1836 ac_retval=0
1837else
1838 $as_echo "$as_me: program exited with status $ac_status" >&5
1839 $as_echo "$as_me: failed program was:" >&5
1840sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1841
81ecdfbb
RW
1842 ac_retval=$ac_status
1843fi
1844 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1845 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1846 return $ac_retval
bec39cab 1847
81ecdfbb 1848} # ac_fn_c_try_run
bec39cab 1849
81ecdfbb
RW
1850# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1851# -------------------------------------------------------
1852# Tests whether HEADER exists and can be compiled using the include files in
1853# INCLUDES, setting the cache variable VAR accordingly.
1854ac_fn_c_check_header_compile ()
1855{
1856 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1857 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1858$as_echo_n "checking for $2... " >&6; }
1859if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1860 $as_echo_n "(cached) " >&6
1861else
1862 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1863/* end confdefs.h. */
1864$4
1865#include <$2>
bec39cab 1866_ACEOF
81ecdfbb
RW
1867if ac_fn_c_try_compile "$LINENO"; then :
1868 eval "$3=yes"
1869else
1870 eval "$3=no"
1871fi
1872rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1873fi
1874eval ac_res=\$$3
1875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1876$as_echo "$ac_res" >&6; }
1877 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 1878
81ecdfbb 1879} # ac_fn_c_check_header_compile
bec39cab 1880
81ecdfbb
RW
1881# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1882# --------------------------------------------
1883# Tries to find the compile-time value of EXPR in a program that includes
1884# INCLUDES, setting VAR accordingly. Returns whether the value could be
1885# computed
1886ac_fn_c_compute_int ()
1887{
1888 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1889 if test "$cross_compiling" = yes; then
1890 # Depending upon the size, compute the lo and hi bounds.
1891cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1892/* end confdefs.h. */
1893$4
1894int
1895main ()
1896{
1897static int test_array [1 - 2 * !(($2) >= 0)];
1898test_array [0] = 0
bec39cab 1899
81ecdfbb
RW
1900 ;
1901 return 0;
1902}
1903_ACEOF
1904if ac_fn_c_try_compile "$LINENO"; then :
1905 ac_lo=0 ac_mid=0
1906 while :; do
1907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1908/* end confdefs.h. */
1909$4
1910int
1911main ()
1912{
1913static int test_array [1 - 2 * !(($2) <= $ac_mid)];
1914test_array [0] = 0
bec39cab 1915
81ecdfbb
RW
1916 ;
1917 return 0;
1918}
1919_ACEOF
1920if ac_fn_c_try_compile "$LINENO"; then :
1921 ac_hi=$ac_mid; break
1922else
1923 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
1924 if test $ac_lo -le $ac_mid; then
1925 ac_lo= ac_hi=
1926 break
1927 fi
1928 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
c906108c 1929fi
81ecdfbb
RW
1930rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1931 done
c906108c 1932else
81ecdfbb
RW
1933 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1934/* end confdefs.h. */
1935$4
1936int
1937main ()
1938{
1939static int test_array [1 - 2 * !(($2) < 0)];
1940test_array [0] = 0
bec39cab 1941
81ecdfbb
RW
1942 ;
1943 return 0;
1944}
1945_ACEOF
1946if ac_fn_c_try_compile "$LINENO"; then :
1947 ac_hi=-1 ac_mid=-1
1948 while :; do
1949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1950/* end confdefs.h. */
1951$4
1952int
1953main ()
1954{
1955static int test_array [1 - 2 * !(($2) >= $ac_mid)];
1956test_array [0] = 0
bec39cab 1957
81ecdfbb
RW
1958 ;
1959 return 0;
1960}
1961_ACEOF
1962if ac_fn_c_try_compile "$LINENO"; then :
1963 ac_lo=$ac_mid; break
1964else
1965 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
1966 if test $ac_mid -le $ac_hi; then
1967 ac_lo= ac_hi=
1968 break
1969 fi
1970 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
1971fi
1972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1973 done
1974else
1975 ac_lo= ac_hi=
1976fi
1977rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1978fi
1979rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1980# Binary search between lo and hi bounds.
1981while test "x$ac_lo" != "x$ac_hi"; do
1982 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
1983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1984/* end confdefs.h. */
1985$4
1986int
1987main ()
1988{
1989static int test_array [1 - 2 * !(($2) <= $ac_mid)];
1990test_array [0] = 0
bec39cab 1991
81ecdfbb
RW
1992 ;
1993 return 0;
1994}
1995_ACEOF
1996if ac_fn_c_try_compile "$LINENO"; then :
1997 ac_hi=$ac_mid
1998else
1999 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2000fi
2001rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2002done
2003case $ac_lo in #((
2004?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2005'') ac_retval=1 ;;
2006esac
2007 else
2008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2009/* end confdefs.h. */
2010$4
2011static long int longval () { return $2; }
2012static unsigned long int ulongval () { return $2; }
2013#include <stdio.h>
2014#include <stdlib.h>
2015int
2016main ()
2017{
bec39cab 2018
81ecdfbb
RW
2019 FILE *f = fopen ("conftest.val", "w");
2020 if (! f)
2021 return 1;
2022 if (($2) < 0)
2023 {
2024 long int i = longval ();
2025 if (i != ($2))
2026 return 1;
2027 fprintf (f, "%ld", i);
2028 }
2029 else
2030 {
2031 unsigned long int i = ulongval ();
2032 if (i != ($2))
2033 return 1;
2034 fprintf (f, "%lu", i);
2035 }
2036 /* Do not output a trailing newline, as this causes \r\n confusion
2037 on some platforms. */
2038 return ferror (f) || fclose (f) != 0;
bec39cab 2039
81ecdfbb
RW
2040 ;
2041 return 0;
2042}
2043_ACEOF
2044if ac_fn_c_try_run "$LINENO"; then :
2045 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2046else
2047 ac_retval=1
2048fi
2049rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2050 conftest.$ac_objext conftest.beam conftest.$ac_ext
2051rm -f conftest.val
bec39cab 2052
81ecdfbb
RW
2053 fi
2054 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2055 return $ac_retval
bec39cab 2056
81ecdfbb 2057} # ac_fn_c_compute_int
bec39cab 2058
c971b7fa
PA
2059# ac_fn_c_try_link LINENO
2060# -----------------------
2061# Try to link conftest.$ac_ext, and return whether this succeeded.
2062ac_fn_c_try_link ()
2063{
2064 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2065 rm -f conftest.$ac_objext conftest$ac_exeext
2066 if { { ac_try="$ac_link"
2067case "(($ac_try" in
2068 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2069 *) ac_try_echo=$ac_try;;
2070esac
2071eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2072$as_echo "$ac_try_echo"; } >&5
2073 (eval "$ac_link") 2>conftest.err
2074 ac_status=$?
2075 if test -s conftest.err; then
2076 grep -v '^ *+' conftest.err >conftest.er1
2077 cat conftest.er1 >&5
2078 mv -f conftest.er1 conftest.err
2079 fi
2080 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2081 test $ac_status = 0; } && {
2082 test -z "$ac_c_werror_flag" ||
2083 test ! -s conftest.err
2084 } && test -s conftest$ac_exeext && {
2085 test "$cross_compiling" = yes ||
2086 $as_test_x conftest$ac_exeext
2087 }; then :
2088 ac_retval=0
2089else
2090 $as_echo "$as_me: failed program was:" >&5
2091sed 's/^/| /' conftest.$ac_ext >&5
2092
2093 ac_retval=1
2094fi
2095 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2096 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2097 # interfere with the next link command; also delete a directory that is
2098 # left behind by Apple's compiler. We do this before executing the actions.
2099 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2100 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2101 return $ac_retval
2102
2103} # ac_fn_c_try_link
2104
55a8c076
YQ
2105# ac_fn_c_check_func LINENO FUNC VAR
2106# ----------------------------------
2107# Tests whether FUNC exists, setting the cache variable VAR accordingly
2108ac_fn_c_check_func ()
81ecdfbb
RW
2109{
2110 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2111 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2112$as_echo_n "checking for $2... " >&6; }
2113if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2114 $as_echo_n "(cached) " >&6
2115else
81ecdfbb
RW
2116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2117/* end confdefs.h. */
55a8c076
YQ
2118/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2119 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2120#define $2 innocuous_$2
2121
2122/* System header to define __stub macros and hopefully few prototypes,
2123 which can conflict with char $2 (); below.
2124 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2125 <limits.h> exists even on freestanding compilers. */
2126
2127#ifdef __STDC__
2128# include <limits.h>
2129#else
2130# include <assert.h>
2131#endif
2132
2133#undef $2
2134
2135/* Override any GCC internal prototype to avoid an error.
2136 Use char because int might match the return type of a GCC
2137 builtin and then its argument prototype would still apply. */
2138#ifdef __cplusplus
2139extern "C"
2140#endif
2141char $2 ();
2142/* The GNU C library defines this for functions which it implements
2143 to always fail with ENOSYS. Some functions are actually named
2144 something starting with __ and the normal name is an alias. */
2145#if defined __stub_$2 || defined __stub___$2
2146choke me
2147#endif
2148
2149int
2150main ()
2151{
2152return $2 ();
2153 ;
2154 return 0;
2155}
2156_ACEOF
2157if ac_fn_c_try_link "$LINENO"; then :
2158 eval "$3=yes"
2159else
2160 eval "$3=no"
2161fi
2162rm -f core conftest.err conftest.$ac_objext \
2163 conftest$ac_exeext conftest.$ac_ext
2164fi
2165eval ac_res=\$$3
2166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2167$as_echo "$ac_res" >&6; }
2168 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2169
2170} # ac_fn_c_check_func
2171
770d76d7
PA
2172# ac_fn_c_check_decl LINENO SYMBOL VAR
2173# ------------------------------------
2174# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2175ac_fn_c_check_decl ()
2176{
2177 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2178 as_decl_name=`echo $2|sed 's/ *(.*//'`
2179 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2180 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2181$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2182if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2183 $as_echo_n "(cached) " >&6
2184else
2185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2186/* end confdefs.h. */
2187$4
2188int
2189main ()
2190{
2191#ifndef $as_decl_name
2192#ifdef __cplusplus
2193 (void) $as_decl_use;
2194#else
2195 (void) $as_decl_name;
2196#endif
2197#endif
2198
2199 ;
2200 return 0;
2201}
2202_ACEOF
2203if ac_fn_c_try_compile "$LINENO"; then :
2204 eval "$3=yes"
2205else
2206 eval "$3=no"
2207fi
2208rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2209fi
2210eval ac_res=\$$3
2211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2212$as_echo "$ac_res" >&6; }
2213 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2214
2215} # ac_fn_c_check_decl
2216
55a8c076
YQ
2217# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2218# ----------------------------------------------------
2219# Tries to find if the field MEMBER exists in type AGGR, after including
2220# INCLUDES, setting cache variable VAR accordingly.
2221ac_fn_c_check_member ()
2222{
2223 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2224 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2225$as_echo_n "checking for $2.$3... " >&6; }
2226if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
2227 $as_echo_n "(cached) " >&6
2228else
2229 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2230/* end confdefs.h. */
2231$5
2232int
2233main ()
2234{
2235static $2 ac_aggr;
2236if (ac_aggr.$3)
2237return 0;
2238 ;
2239 return 0;
2240}
2241_ACEOF
2242if ac_fn_c_try_compile "$LINENO"; then :
2243 eval "$4=yes"
2244else
2245 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2246/* end confdefs.h. */
2247$5
2248int
2249main ()
2250{
2251static $2 ac_aggr;
2252if (sizeof ac_aggr.$3)
2253return 0;
2254 ;
2255 return 0;
2256}
2257_ACEOF
2258if ac_fn_c_try_compile "$LINENO"; then :
2259 eval "$4=yes"
2260else
2261 eval "$4=no"
2262fi
2263rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2264fi
2265rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2266fi
2267eval ac_res=\$$4
2268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2269$as_echo "$ac_res" >&6; }
2270 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2271
2272} # ac_fn_c_check_member
2273
2274# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2275# -------------------------------------------
2276# Tests whether TYPE exists after having included INCLUDES, setting cache
2277# variable VAR accordingly.
2278ac_fn_c_check_type ()
2279{
2280 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2281 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2282$as_echo_n "checking for $2... " >&6; }
2283if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2284 $as_echo_n "(cached) " >&6
2285else
2286 eval "$3=no"
2287 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2288/* end confdefs.h. */
2289$4
2290int
2291main ()
2292{
2293if (sizeof ($2))
2294 return 0;
2295 ;
2296 return 0;
2297}
2298_ACEOF
2299if ac_fn_c_try_compile "$LINENO"; then :
2300 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2301/* end confdefs.h. */
2302$4
2303int
2304main ()
2305{
2306if (sizeof (($2)))
2307 return 0;
2308 ;
2309 return 0;
2310}
2311_ACEOF
2312if ac_fn_c_try_compile "$LINENO"; then :
d5af19ba 2313
81ecdfbb
RW
2314else
2315 eval "$3=yes"
2316fi
2317rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2318fi
2319rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2320fi
2321eval ac_res=\$$3
2322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2323$as_echo "$ac_res" >&6; }
2324 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
d5af19ba 2325
81ecdfbb
RW
2326} # ac_fn_c_check_type
2327cat >config.log <<_ACEOF
2328This file contains any messages produced by compilers while
2329running configure, to aid debugging if configure makes a mistake.
d5af19ba 2330
81ecdfbb
RW
2331It was created by $as_me, which was
2332generated by GNU Autoconf 2.64. Invocation command line was
b4e70030 2333
81ecdfbb 2334 $ $0 $@
413ccac7 2335
81ecdfbb
RW
2336_ACEOF
2337exec 5>>config.log
2338{
2339cat <<_ASUNAME
2340## --------- ##
2341## Platform. ##
2342## --------- ##
413ccac7 2343
81ecdfbb
RW
2344hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2345uname -m = `(uname -m) 2>/dev/null || echo unknown`
2346uname -r = `(uname -r) 2>/dev/null || echo unknown`
2347uname -s = `(uname -s) 2>/dev/null || echo unknown`
2348uname -v = `(uname -v) 2>/dev/null || echo unknown`
85981d60 2349
81ecdfbb
RW
2350/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2351/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
413ccac7 2352
81ecdfbb
RW
2353/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2354/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2355/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2356/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2357/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2358/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2359/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
c906108c 2360
81ecdfbb 2361_ASUNAME
bec39cab 2362
bec39cab
AC
2363as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2364for as_dir in $PATH
2365do
2366 IFS=$as_save_IFS
2367 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2368 $as_echo "PATH: $as_dir"
2369 done
2370IFS=$as_save_IFS
bec39cab 2371
81ecdfbb 2372} >&5
bec39cab 2373
81ecdfbb 2374cat >&5 <<_ACEOF
bec39cab 2375
bec39cab 2376
81ecdfbb
RW
2377## ----------- ##
2378## Core tests. ##
2379## ----------- ##
2380
2381_ACEOF
2382
2383
2384# Keep a trace of the command line.
2385# Strip out --no-create and --no-recursion so they do not pile up.
2386# Strip out --silent because we don't want to record it for future runs.
2387# Also quote any args containing shell meta-characters.
2388# Make two passes to allow for proper duplicate-argument suppression.
2389ac_configure_args=
2390ac_configure_args0=
2391ac_configure_args1=
2392ac_must_keep_next=false
2393for ac_pass in 1 2
2394do
2395 for ac_arg
2396 do
2397 case $ac_arg in
2398 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2399 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2400 | -silent | --silent | --silen | --sile | --sil)
2401 continue ;;
2402 *\'*)
2403 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2404 esac
2405 case $ac_pass in
2406 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2407 2)
2408 as_fn_append ac_configure_args1 " '$ac_arg'"
2409 if test $ac_must_keep_next = true; then
2410 ac_must_keep_next=false # Got value, back to normal.
2411 else
2412 case $ac_arg in
2413 *=* | --config-cache | -C | -disable-* | --disable-* \
2414 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2415 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2416 | -with-* | --with-* | -without-* | --without-* | --x)
2417 case "$ac_configure_args0 " in
2418 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2419 esac
2420 ;;
2421 -* ) ac_must_keep_next=true ;;
2422 esac
2423 fi
2424 as_fn_append ac_configure_args " '$ac_arg'"
2425 ;;
2426 esac
2427 done
2428done
2429{ ac_configure_args0=; unset ac_configure_args0;}
2430{ ac_configure_args1=; unset ac_configure_args1;}
2431
2432# When interrupted or exit'd, cleanup temporary files, and complete
2433# config.log. We remove comments because anyway the quotes in there
2434# would cause problems or look ugly.
2435# WARNING: Use '\'' to represent an apostrophe within the trap.
2436# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2437trap 'exit_status=$?
2438 # Save into config.log some information that might help in debugging.
2439 {
2440 echo
2441
2442 cat <<\_ASBOX
2443## ---------------- ##
2444## Cache variables. ##
2445## ---------------- ##
2446_ASBOX
2447 echo
2448 # The following way of writing the cache mishandles newlines in values,
2449(
2450 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2451 eval ac_val=\$$ac_var
2452 case $ac_val in #(
2453 *${as_nl}*)
2454 case $ac_var in #(
2455 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2456$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2457 esac
2458 case $ac_var in #(
2459 _ | IFS | as_nl) ;; #(
2460 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2461 *) { eval $ac_var=; unset $ac_var;} ;;
2462 esac ;;
2463 esac
2464 done
2465 (set) 2>&1 |
2466 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2467 *${as_nl}ac_space=\ *)
2468 sed -n \
2469 "s/'\''/'\''\\\\'\'''\''/g;
2470 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2471 ;; #(
2472 *)
2473 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2474 ;;
2475 esac |
2476 sort
2477)
2478 echo
2479
2480 cat <<\_ASBOX
2481## ----------------- ##
2482## Output variables. ##
2483## ----------------- ##
2484_ASBOX
2485 echo
2486 for ac_var in $ac_subst_vars
2487 do
2488 eval ac_val=\$$ac_var
2489 case $ac_val in
2490 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2491 esac
2492 $as_echo "$ac_var='\''$ac_val'\''"
2493 done | sort
2494 echo
2495
2496 if test -n "$ac_subst_files"; then
2497 cat <<\_ASBOX
2498## ------------------- ##
2499## File substitutions. ##
2500## ------------------- ##
2501_ASBOX
2502 echo
2503 for ac_var in $ac_subst_files
2504 do
2505 eval ac_val=\$$ac_var
2506 case $ac_val in
2507 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2508 esac
2509 $as_echo "$ac_var='\''$ac_val'\''"
2510 done | sort
2511 echo
2512 fi
2513
2514 if test -s confdefs.h; then
2515 cat <<\_ASBOX
2516## ----------- ##
2517## confdefs.h. ##
2518## ----------- ##
2519_ASBOX
2520 echo
2521 cat confdefs.h
2522 echo
2523 fi
2524 test "$ac_signal" != 0 &&
2525 $as_echo "$as_me: caught signal $ac_signal"
2526 $as_echo "$as_me: exit $exit_status"
2527 } >&5
2528 rm -f core *.core core.conftest.* &&
2529 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2530 exit $exit_status
2531' 0
2532for ac_signal in 1 2 13 15; do
2533 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2534done
2535ac_signal=0
2536
2537# confdefs.h avoids OS command line length limits that DEFS can exceed.
2538rm -f -r conftest* confdefs.h
2539
2540$as_echo "/* confdefs.h */" > confdefs.h
2541
2542# Predefined preprocessor variables.
2543
2544cat >>confdefs.h <<_ACEOF
2545#define PACKAGE_NAME "$PACKAGE_NAME"
2546_ACEOF
2547
2548cat >>confdefs.h <<_ACEOF
2549#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2550_ACEOF
2551
2552cat >>confdefs.h <<_ACEOF
2553#define PACKAGE_VERSION "$PACKAGE_VERSION"
2554_ACEOF
2555
2556cat >>confdefs.h <<_ACEOF
2557#define PACKAGE_STRING "$PACKAGE_STRING"
2558_ACEOF
2559
2560cat >>confdefs.h <<_ACEOF
2561#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2562_ACEOF
2563
2564cat >>confdefs.h <<_ACEOF
2565#define PACKAGE_URL "$PACKAGE_URL"
2566_ACEOF
2567
2568
2569# Let the site file select an alternate cache file if it wants to.
2570# Prefer an explicitly selected file to automatically selected ones.
2571ac_site_file1=NONE
2572ac_site_file2=NONE
2573if test -n "$CONFIG_SITE"; then
2574 ac_site_file1=$CONFIG_SITE
2575elif test "x$prefix" != xNONE; then
2576 ac_site_file1=$prefix/share/config.site
2577 ac_site_file2=$prefix/etc/config.site
2578else
2579 ac_site_file1=$ac_default_prefix/share/config.site
2580 ac_site_file2=$ac_default_prefix/etc/config.site
2581fi
2582for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2583do
2584 test "x$ac_site_file" = xNONE && continue
2585 if test -r "$ac_site_file"; then
2586 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2587$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2588 sed 's/^/| /' "$ac_site_file" >&5
2589 . "$ac_site_file"
2590 fi
2591done
2592
2593if test -r "$cache_file"; then
2594 # Some versions of bash will fail to source /dev/null (special
2595 # files actually), so we avoid doing that.
2596 if test -f "$cache_file"; then
2597 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2598$as_echo "$as_me: loading cache $cache_file" >&6;}
2599 case $cache_file in
2600 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2601 *) . "./$cache_file";;
2602 esac
2603 fi
2604else
2605 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2606$as_echo "$as_me: creating cache $cache_file" >&6;}
2607 >$cache_file
bec39cab
AC
2608fi
2609
81ecdfbb
RW
2610# Check that the precious variables saved in the cache have kept the same
2611# value.
2612ac_cache_corrupted=false
2613for ac_var in $ac_precious_vars; do
2614 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2615 eval ac_new_set=\$ac_env_${ac_var}_set
2616 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2617 eval ac_new_val=\$ac_env_${ac_var}_value
2618 case $ac_old_set,$ac_new_set in
2619 set,)
2620 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2621$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2622 ac_cache_corrupted=: ;;
2623 ,set)
2624 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2625$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2626 ac_cache_corrupted=: ;;
2627 ,);;
2628 *)
2629 if test "x$ac_old_val" != "x$ac_new_val"; then
2630 # differences in whitespace do not lead to failure.
2631 ac_old_val_w=`echo x $ac_old_val`
2632 ac_new_val_w=`echo x $ac_new_val`
2633 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2634 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2635$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2636 ac_cache_corrupted=:
2637 else
2638 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2639$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2640 eval $ac_var=\$ac_old_val
2641 fi
2642 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2643$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2644 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2645$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2646 fi;;
2647 esac
2648 # Pass precious variables to config.status.
2649 if test "$ac_new_set" = set; then
2650 case $ac_new_val in
2651 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2652 *) ac_arg=$ac_var=$ac_new_val ;;
2653 esac
2654 case " $ac_configure_args " in
2655 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2656 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2657 esac
2658 fi
2659done
2660if $ac_cache_corrupted; then
2661 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2662$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2663 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2664$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2665 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2666fi
2667## -------------------- ##
2668## Main body of script. ##
2669## -------------------- ##
2670
2671ac_ext=c
2672ac_cpp='$CPP $CPPFLAGS'
2673ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2674ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2675ac_compiler_gnu=$ac_cv_c_compiler_gnu
2676
2677
2678
2679
2680
2681ac_config_headers="$ac_config_headers config.h:config.in"
2682
2683
2684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2685$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2686 # Check whether --enable-maintainer-mode was given.
2687if test "${enable_maintainer_mode+set}" = set; then :
2688 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2689else
2690 USE_MAINTAINER_MODE=no
2691fi
2692
2693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
2694$as_echo "$USE_MAINTAINER_MODE" >&6; }
2695 if test $USE_MAINTAINER_MODE = yes; then
2696 MAINTAINER_MODE_TRUE=
2697 MAINTAINER_MODE_FALSE='#'
2698else
2699 MAINTAINER_MODE_TRUE='#'
2700 MAINTAINER_MODE_FALSE=
2701fi
2702
2703 MAINT=$MAINTAINER_MODE_TRUE
2704
2705
2706
f5f1cdb6
JK
2707# Provide more thorough testing by -lmcheck.
2708# Set it to 'true' for development snapshots, 'false' for releases or
2709# pre-releases.
2710development=true
2711
81ecdfbb
RW
2712ac_ext=c
2713ac_cpp='$CPP $CPPFLAGS'
2714ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2715ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2716ac_compiler_gnu=$ac_cv_c_compiler_gnu
2717if test -n "$ac_tool_prefix"; then
2718 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2719set dummy ${ac_tool_prefix}gcc; ac_word=$2
2720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2721$as_echo_n "checking for $ac_word... " >&6; }
2722if test "${ac_cv_prog_CC+set}" = set; then :
2723 $as_echo_n "(cached) " >&6
c906108c
SS
2724else
2725 if test -n "$CC"; then
2726 ac_cv_prog_CC="$CC" # Let the user override the test.
2727else
bec39cab
AC
2728as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2729for as_dir in $PATH
2730do
2731 IFS=$as_save_IFS
2732 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2733 for ac_exec_ext in '' $ac_executable_extensions; do
2734 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2735 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2736 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2737 break 2
2738 fi
2739done
81ecdfbb
RW
2740 done
2741IFS=$as_save_IFS
bec39cab 2742
c906108c
SS
2743fi
2744fi
bec39cab 2745CC=$ac_cv_prog_CC
c906108c 2746if test -n "$CC"; then
81ecdfbb
RW
2747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2748$as_echo "$CC" >&6; }
c906108c 2749else
81ecdfbb
RW
2750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2751$as_echo "no" >&6; }
c906108c
SS
2752fi
2753
81ecdfbb 2754
b4e70030
JB
2755fi
2756if test -z "$ac_cv_prog_CC"; then
2757 ac_ct_CC=$CC
81ecdfbb
RW
2758 # Extract the first word of "gcc", so it can be a program name with args.
2759set dummy gcc; ac_word=$2
2760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2761$as_echo_n "checking for $ac_word... " >&6; }
2762if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
2763 $as_echo_n "(cached) " >&6
b4e70030
JB
2764else
2765 if test -n "$ac_ct_CC"; then
2766 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2767else
2768as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2769for as_dir in $PATH
2770do
2771 IFS=$as_save_IFS
2772 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2773 for ac_exec_ext in '' $ac_executable_extensions; do
2774 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2775 ac_cv_prog_ac_ct_CC="gcc"
2776 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b4e70030 2777 break 2
4e8d927d 2778 fi
b4e70030 2779done
81ecdfbb
RW
2780 done
2781IFS=$as_save_IFS
b4e70030
JB
2782
2783fi
2784fi
2785ac_ct_CC=$ac_cv_prog_ac_ct_CC
2786if test -n "$ac_ct_CC"; then
81ecdfbb
RW
2787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2788$as_echo "$ac_ct_CC" >&6; }
b4e70030 2789else
81ecdfbb
RW
2790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2791$as_echo "no" >&6; }
b4e70030
JB
2792fi
2793
81ecdfbb
RW
2794 if test "x$ac_ct_CC" = x; then
2795 CC=""
2796 else
2797 case $cross_compiling:$ac_tool_warned in
2798yes:)
2799{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2800$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2801ac_tool_warned=yes ;;
2802esac
2803 CC=$ac_ct_CC
2804 fi
b4e70030
JB
2805else
2806 CC="$ac_cv_prog_CC"
2807fi
2808
c906108c 2809if test -z "$CC"; then
81ecdfbb
RW
2810 if test -n "$ac_tool_prefix"; then
2811 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2812set dummy ${ac_tool_prefix}cc; ac_word=$2
2813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2814$as_echo_n "checking for $ac_word... " >&6; }
2815if test "${ac_cv_prog_CC+set}" = set; then :
2816 $as_echo_n "(cached) " >&6
c906108c
SS
2817else
2818 if test -n "$CC"; then
2819 ac_cv_prog_CC="$CC" # Let the user override the test.
2820else
bec39cab
AC
2821as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2822for as_dir in $PATH
2823do
2824 IFS=$as_save_IFS
2825 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2826 for ac_exec_ext in '' $ac_executable_extensions; do
2827 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2828 ac_cv_prog_CC="${ac_tool_prefix}cc"
2829 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2830 break 2
2831 fi
2832done
81ecdfbb
RW
2833 done
2834IFS=$as_save_IFS
2835
2836fi
2837fi
2838CC=$ac_cv_prog_CC
2839if test -n "$CC"; then
2840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2841$as_echo "$CC" >&6; }
2842else
2843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2844$as_echo "no" >&6; }
2845fi
2846
2847
2848 fi
2849fi
2850if test -z "$CC"; then
2851 # Extract the first word of "cc", so it can be a program name with args.
2852set dummy cc; ac_word=$2
2853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2854$as_echo_n "checking for $ac_word... " >&6; }
2855if test "${ac_cv_prog_CC+set}" = set; then :
2856 $as_echo_n "(cached) " >&6
2857else
2858 if test -n "$CC"; then
2859 ac_cv_prog_CC="$CC" # Let the user override the test.
2860else
2861 ac_prog_rejected=no
2862as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2863for as_dir in $PATH
2864do
2865 IFS=$as_save_IFS
2866 test -z "$as_dir" && as_dir=.
2867 for ac_exec_ext in '' $ac_executable_extensions; do
2868 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2869 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2870 ac_prog_rejected=yes
2871 continue
2872 fi
2873 ac_cv_prog_CC="cc"
2874 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2875 break 2
2876 fi
2877done
2878 done
2879IFS=$as_save_IFS
bec39cab 2880
c906108c
SS
2881if test $ac_prog_rejected = yes; then
2882 # We found a bogon in the path, so make sure we never use it.
2883 set dummy $ac_cv_prog_CC
2884 shift
bec39cab 2885 if test $# != 0; then
c906108c
SS
2886 # We chose a different compiler from the bogus one.
2887 # However, it has the same basename, so the bogon will be chosen
2888 # first if we set CC to just the basename; use the full file name.
2889 shift
bec39cab 2890 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
c906108c
SS
2891 fi
2892fi
2893fi
2894fi
bec39cab 2895CC=$ac_cv_prog_CC
c906108c 2896if test -n "$CC"; then
81ecdfbb
RW
2897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2898$as_echo "$CC" >&6; }
c906108c 2899else
81ecdfbb
RW
2900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2901$as_echo "no" >&6; }
c906108c
SS
2902fi
2903
81ecdfbb 2904
bec39cab
AC
2905fi
2906if test -z "$CC"; then
2907 if test -n "$ac_tool_prefix"; then
81ecdfbb 2908 for ac_prog in cl.exe
bec39cab
AC
2909 do
2910 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2911set dummy $ac_tool_prefix$ac_prog; ac_word=$2
81ecdfbb
RW
2912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2913$as_echo_n "checking for $ac_word... " >&6; }
2914if test "${ac_cv_prog_CC+set}" = set; then :
2915 $as_echo_n "(cached) " >&6
c906108c
SS
2916else
2917 if test -n "$CC"; then
2918 ac_cv_prog_CC="$CC" # Let the user override the test.
2919else
bec39cab
AC
2920as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2921for as_dir in $PATH
2922do
2923 IFS=$as_save_IFS
2924 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2925 for ac_exec_ext in '' $ac_executable_extensions; do
2926 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 2927 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
81ecdfbb 2928 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2929 break 2
2930 fi
2931done
81ecdfbb
RW
2932 done
2933IFS=$as_save_IFS
bec39cab 2934
c906108c
SS
2935fi
2936fi
bec39cab 2937CC=$ac_cv_prog_CC
c906108c 2938if test -n "$CC"; then
81ecdfbb
RW
2939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2940$as_echo "$CC" >&6; }
c906108c 2941else
81ecdfbb
RW
2942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2943$as_echo "no" >&6; }
c906108c 2944fi
bec39cab 2945
81ecdfbb 2946
bec39cab
AC
2947 test -n "$CC" && break
2948 done
2949fi
2950if test -z "$CC"; then
2951 ac_ct_CC=$CC
81ecdfbb 2952 for ac_prog in cl.exe
bec39cab
AC
2953do
2954 # Extract the first word of "$ac_prog", so it can be a program name with args.
2955set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
2956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2957$as_echo_n "checking for $ac_word... " >&6; }
2958if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
2959 $as_echo_n "(cached) " >&6
bec39cab
AC
2960else
2961 if test -n "$ac_ct_CC"; then
2962 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2963else
2964as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2965for as_dir in $PATH
2966do
2967 IFS=$as_save_IFS
2968 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2969 for ac_exec_ext in '' $ac_executable_extensions; do
2970 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 2971 ac_cv_prog_ac_ct_CC="$ac_prog"
81ecdfbb 2972 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab 2973 break 2
c906108c 2974 fi
bec39cab 2975done
81ecdfbb
RW
2976 done
2977IFS=$as_save_IFS
bec39cab
AC
2978
2979fi
2980fi
2981ac_ct_CC=$ac_cv_prog_ac_ct_CC
2982if test -n "$ac_ct_CC"; then
81ecdfbb
RW
2983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2984$as_echo "$ac_ct_CC" >&6; }
bec39cab 2985else
81ecdfbb
RW
2986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2987$as_echo "no" >&6; }
c906108c
SS
2988fi
2989
81ecdfbb 2990
bec39cab
AC
2991 test -n "$ac_ct_CC" && break
2992done
c906108c 2993
81ecdfbb
RW
2994 if test "x$ac_ct_CC" = x; then
2995 CC=""
2996 else
2997 case $cross_compiling:$ac_tool_warned in
2998yes:)
2999{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3000$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3001ac_tool_warned=yes ;;
3002esac
3003 CC=$ac_ct_CC
3004 fi
bec39cab
AC
3005fi
3006
3007fi
3008
3009
81ecdfbb
RW
3010test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3011$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3012as_fn_error "no acceptable C compiler found in \$PATH
3013See \`config.log' for more details." "$LINENO" 5; }
bec39cab
AC
3014
3015# Provide some information about the compiler.
81ecdfbb
RW
3016$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3017set X $ac_compile
3018ac_compiler=$2
3019for ac_option in --version -v -V -qversion; do
3020 { { ac_try="$ac_compiler $ac_option >&5"
3021case "(($ac_try" in
3022 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3023 *) ac_try_echo=$ac_try;;
3024esac
3025eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3026$as_echo "$ac_try_echo"; } >&5
3027 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
bec39cab 3028 ac_status=$?
81ecdfbb
RW
3029 if test -s conftest.err; then
3030 sed '10a\
3031... rest of stderr output deleted ...
3032 10q' conftest.err >conftest.er1
3033 cat conftest.er1 >&5
3034 rm -f conftest.er1 conftest.err
3035 fi
3036 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3037 test $ac_status = 0; }
3038done
bec39cab 3039
81ecdfbb 3040cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3041/* end confdefs.h. */
3042
3043int
3044main ()
3045{
3046
3047 ;
3048 return 0;
3049}
3050_ACEOF
3051ac_clean_files_save=$ac_clean_files
81ecdfbb 3052ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out"
bec39cab
AC
3053# Try to create an executable without -o first, disregard a.out.
3054# It will help us diagnose broken compilers, and finding out an intuition
3055# of exeext.
81ecdfbb
RW
3056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3057$as_echo_n "checking for C compiler default output file name... " >&6; }
3058ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3059
3060# The possible output files:
3061ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3062
3063ac_rmfiles=
3064for ac_file in $ac_files
3065do
3066 case $ac_file in
3067 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3068 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3069 esac
3070done
3071rm -f $ac_rmfiles
3072
3073if { { ac_try="$ac_link_default"
3074case "(($ac_try" in
3075 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3076 *) ac_try_echo=$ac_try;;
3077esac
3078eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3079$as_echo "$ac_try_echo"; } >&5
3080 (eval "$ac_link_default") 2>&5
3081 ac_status=$?
3082 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3083 test $ac_status = 0; }; then :
3084 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3085# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3086# in a Makefile. We should not override ac_cv_exeext if it was cached,
3087# so that the user can short-circuit this test for compilers unknown to
3088# Autoconf.
3089for ac_file in $ac_files ''
bec39cab
AC
3090do
3091 test -f "$ac_file" || continue
3092 case $ac_file in
81ecdfbb 3093 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
b4e70030
JB
3094 ;;
3095 [ab].out )
3096 # We found the default executable, but exeext='' is most
3097 # certainly right.
3098 break;;
3099 *.* )
81ecdfbb
RW
3100 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3101 then :; else
3102 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3103 fi
3104 # We set ac_cv_exeext here because the later test for it is not
3105 # safe: cross compilers may not add the suffix if given an `-o'
3106 # argument, so we may need to know it at that point already.
3107 # Even if this section looks crufty: it has the advantage of
3108 # actually working.
b4e70030
JB
3109 break;;
3110 * )
3111 break;;
bec39cab
AC
3112 esac
3113done
81ecdfbb
RW
3114test "$ac_cv_exeext" = no && ac_cv_exeext=
3115
bec39cab 3116else
81ecdfbb
RW
3117 ac_file=''
3118fi
3119{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3120$as_echo "$ac_file" >&6; }
3121if test -z "$ac_file"; then :
3122 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3123sed 's/^/| /' conftest.$ac_ext >&5
3124
81ecdfbb
RW
3125{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3126$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3127{ as_fn_set_status 77
3128as_fn_error "C compiler cannot create executables
3129See \`config.log' for more details." "$LINENO" 5; }; }
bec39cab 3130fi
b4e70030 3131ac_exeext=$ac_cv_exeext
b4e70030 3132
81ecdfbb 3133# Check that the compiler produces executables we can run. If not, either
bec39cab 3134# the compiler is broken, or we cross compile.
81ecdfbb
RW
3135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3136$as_echo_n "checking whether the C compiler works... " >&6; }
bec39cab
AC
3137# If not cross compiling, check that we can run a simple program.
3138if test "$cross_compiling" != yes; then
3139 if { ac_try='./$ac_file'
81ecdfbb
RW
3140 { { case "(($ac_try" in
3141 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3142 *) ac_try_echo=$ac_try;;
3143esac
3144eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3145$as_echo "$ac_try_echo"; } >&5
3146 (eval "$ac_try") 2>&5
bec39cab 3147 ac_status=$?
81ecdfbb
RW
3148 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3149 test $ac_status = 0; }; }; then
bec39cab 3150 cross_compiling=no
c906108c 3151 else
bec39cab
AC
3152 if test "$cross_compiling" = maybe; then
3153 cross_compiling=yes
3154 else
81ecdfbb
RW
3155 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3156$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3157as_fn_error "cannot run C compiled programs.
bec39cab 3158If you meant to cross compile, use \`--host'.
81ecdfbb 3159See \`config.log' for more details." "$LINENO" 5; }
bec39cab 3160 fi
c906108c 3161 fi
bec39cab 3162fi
81ecdfbb
RW
3163{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3164$as_echo "yes" >&6; }
bec39cab 3165
81ecdfbb 3166rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out
b4e70030 3167ac_clean_files=$ac_clean_files_save
81ecdfbb 3168# Check that the compiler produces executables we can run. If not, either
b4e70030 3169# the compiler is broken, or we cross compile.
81ecdfbb
RW
3170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3171$as_echo_n "checking whether we are cross compiling... " >&6; }
3172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3173$as_echo "$cross_compiling" >&6; }
3174
3175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3176$as_echo_n "checking for suffix of executables... " >&6; }
3177if { { ac_try="$ac_link"
3178case "(($ac_try" in
3179 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3180 *) ac_try_echo=$ac_try;;
3181esac
3182eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3183$as_echo "$ac_try_echo"; } >&5
3184 (eval "$ac_link") 2>&5
bec39cab 3185 ac_status=$?
81ecdfbb
RW
3186 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3187 test $ac_status = 0; }; then :
b4e70030
JB
3188 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3189# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3190# work properly (i.e., refer to `conftest.exe'), while it won't with
3191# `rm'.
3192for ac_file in conftest.exe conftest conftest.*; do
3193 test -f "$ac_file" || continue
3194 case $ac_file in
81ecdfbb 3195 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
b4e70030 3196 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
b4e70030
JB
3197 break;;
3198 * ) break;;
3199 esac
3200done
c906108c 3201else
81ecdfbb
RW
3202 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3203$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3204as_fn_error "cannot compute suffix of executables: cannot compile and link
3205See \`config.log' for more details." "$LINENO" 5; }
c906108c 3206fi
b4e70030 3207rm -f conftest$ac_cv_exeext
81ecdfbb
RW
3208{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3209$as_echo "$ac_cv_exeext" >&6; }
c906108c 3210
b4e70030 3211rm -f conftest.$ac_ext
bec39cab
AC
3212EXEEXT=$ac_cv_exeext
3213ac_exeext=$EXEEXT
81ecdfbb
RW
3214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3215$as_echo_n "checking for suffix of object files... " >&6; }
3216if test "${ac_cv_objext+set}" = set; then :
3217 $as_echo_n "(cached) " >&6
bec39cab 3218else
81ecdfbb 3219 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
3220/* end confdefs.h. */
3221
3222int
3223main ()
3224{
3225
3226 ;
3227 return 0;
3228}
3229_ACEOF
3230rm -f conftest.o conftest.obj
81ecdfbb
RW
3231if { { ac_try="$ac_compile"
3232case "(($ac_try" in
3233 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3234 *) ac_try_echo=$ac_try;;
3235esac
3236eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3237$as_echo "$ac_try_echo"; } >&5
3238 (eval "$ac_compile") 2>&5
3239 ac_status=$?
3240 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3241 test $ac_status = 0; }; then :
3242 for ac_file in conftest.o conftest.obj conftest.*; do
3243 test -f "$ac_file" || continue;
bec39cab 3244 case $ac_file in
81ecdfbb 3245 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
bec39cab
AC
3246 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3247 break;;
3248 esac
3249done
c906108c 3250else
81ecdfbb 3251 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3252sed 's/^/| /' conftest.$ac_ext >&5
3253
81ecdfbb
RW
3254{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3255$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3256as_fn_error "cannot compute suffix of object files: cannot compile
3257See \`config.log' for more details." "$LINENO" 5; }
c906108c 3258fi
b4e70030 3259rm -f conftest.$ac_cv_objext conftest.$ac_ext
bec39cab 3260fi
81ecdfbb
RW
3261{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3262$as_echo "$ac_cv_objext" >&6; }
bec39cab
AC
3263OBJEXT=$ac_cv_objext
3264ac_objext=$OBJEXT
81ecdfbb
RW
3265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3266$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3267if test "${ac_cv_c_compiler_gnu+set}" = set; then :
3268 $as_echo_n "(cached) " >&6
c906108c 3269else
81ecdfbb 3270 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3271/* end confdefs.h. */
3272
3273int
3274main ()
3275{
3276#ifndef __GNUC__
3277 choke me
3278#endif
3279
3280 ;
3281 return 0;
3282}
3283_ACEOF
81ecdfbb 3284if ac_fn_c_try_compile "$LINENO"; then :
bec39cab
AC
3285 ac_compiler_gnu=yes
3286else
81ecdfbb 3287 ac_compiler_gnu=no
bec39cab 3288fi
81ecdfbb 3289rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab
AC
3290ac_cv_c_compiler_gnu=$ac_compiler_gnu
3291
3292fi
81ecdfbb
RW
3293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3294$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3295if test $ac_compiler_gnu = yes; then
3296 GCC=yes
3297else
3298 GCC=
3299fi
bec39cab
AC
3300ac_test_CFLAGS=${CFLAGS+set}
3301ac_save_CFLAGS=$CFLAGS
81ecdfbb
RW
3302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3303$as_echo_n "checking whether $CC accepts -g... " >&6; }
3304if test "${ac_cv_prog_cc_g+set}" = set; then :
3305 $as_echo_n "(cached) " >&6
bec39cab 3306else
81ecdfbb
RW
3307 ac_save_c_werror_flag=$ac_c_werror_flag
3308 ac_c_werror_flag=yes
3309 ac_cv_prog_cc_g=no
3310 CFLAGS="-g"
3311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3312/* end confdefs.h. */
3313
3314int
3315main ()
3316{
3317
3318 ;
3319 return 0;
3320}
3321_ACEOF
81ecdfbb 3322if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
3323 ac_cv_prog_cc_g=yes
3324else
81ecdfbb
RW
3325 CFLAGS=""
3326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3327/* end confdefs.h. */
3328
3329int
3330main ()
3331{
3332
3333 ;
3334 return 0;
3335}
3336_ACEOF
3337if ac_fn_c_try_compile "$LINENO"; then :
3338
3339else
3340 ac_c_werror_flag=$ac_save_c_werror_flag
3341 CFLAGS="-g"
3342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3343/* end confdefs.h. */
3344
3345int
3346main ()
3347{
c906108c 3348
81ecdfbb
RW
3349 ;
3350 return 0;
3351}
3352_ACEOF
3353if ac_fn_c_try_compile "$LINENO"; then :
3354 ac_cv_prog_cc_g=yes
3355fi
3356rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3357fi
3358rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4e8d927d 3359fi
81ecdfbb
RW
3360rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3361 ac_c_werror_flag=$ac_save_c_werror_flag
bec39cab 3362fi
81ecdfbb
RW
3363{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3364$as_echo "$ac_cv_prog_cc_g" >&6; }
c906108c 3365if test "$ac_test_CFLAGS" = set; then
bec39cab 3366 CFLAGS=$ac_save_CFLAGS
c906108c
SS
3367elif test $ac_cv_prog_cc_g = yes; then
3368 if test "$GCC" = yes; then
3369 CFLAGS="-g -O2"
3370 else
3371 CFLAGS="-g"
3372 fi
3373else
3374 if test "$GCC" = yes; then
3375 CFLAGS="-O2"
3376 else
3377 CFLAGS=
3378 fi
3379fi
81ecdfbb
RW
3380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3381$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3382if test "${ac_cv_prog_cc_c89+set}" = set; then :
3383 $as_echo_n "(cached) " >&6
bec39cab 3384else
81ecdfbb 3385 ac_cv_prog_cc_c89=no
bec39cab 3386ac_save_CC=$CC
81ecdfbb 3387cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3388/* end confdefs.h. */
c906108c
SS
3389#include <stdarg.h>
3390#include <stdio.h>
3391#include <sys/types.h>
3392#include <sys/stat.h>
3393/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3394struct buf { int x; };
3395FILE * (*rcsopen) (struct buf *, struct stat *, int);
3396static char *e (p, i)
3397 char **p;
3398 int i;
3399{
3400 return p[i];
3401}
3402static char *f (char * (*g) (char **, int), char **p, ...)
3403{
3404 char *s;
3405 va_list v;
3406 va_start (v,p);
3407 s = g (p, va_arg (v,int));
3408 va_end (v);
3409 return s;
3410}
bec39cab
AC
3411
3412/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3413 function prototypes and stuff, but not '\xHH' hex character constants.
3414 These don't provoke an error unfortunately, instead are silently treated
81ecdfbb 3415 as 'x'. The following induces an error, until -std is added to get
bec39cab
AC
3416 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3417 array size at least. It's necessary to write '\x00'==0 to get something
81ecdfbb 3418 that's true only with -std. */
bec39cab
AC
3419int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3420
81ecdfbb
RW
3421/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3422 inside strings and character constants. */
3423#define FOO(x) 'x'
3424int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3425
c906108c
SS
3426int test (int i, double x);
3427struct s1 {int (*f) (int a);};
3428struct s2 {int (*f) (double a);};
3429int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3430int argc;
3431char **argv;
bec39cab
AC
3432int
3433main ()
3434{
c906108c 3435return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
bec39cab
AC
3436 ;
3437 return 0;
3438}
3439_ACEOF
81ecdfbb
RW
3440for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3441 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
bec39cab
AC
3442do
3443 CC="$ac_save_CC $ac_arg"
81ecdfbb
RW
3444 if ac_fn_c_try_compile "$LINENO"; then :
3445 ac_cv_prog_cc_c89=$ac_arg
c906108c 3446fi
81ecdfbb
RW
3447rm -f core conftest.err conftest.$ac_objext
3448 test "x$ac_cv_prog_cc_c89" != "xno" && break
c906108c 3449done
81ecdfbb 3450rm -f conftest.$ac_ext
bec39cab 3451CC=$ac_save_CC
c906108c
SS
3452
3453fi
81ecdfbb
RW
3454# AC_CACHE_VAL
3455case "x$ac_cv_prog_cc_c89" in
3456 x)
3457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3458$as_echo "none needed" >&6; } ;;
3459 xno)
3460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3461$as_echo "unsupported" >&6; } ;;
bec39cab 3462 *)
81ecdfbb
RW
3463 CC="$CC $ac_cv_prog_cc_c89"
3464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3465$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
c906108c 3466esac
81ecdfbb 3467if test "x$ac_cv_prog_cc_c89" != xno; then :
c906108c 3468
b4e70030
JB
3469fi
3470
bec39cab
AC
3471ac_ext=c
3472ac_cpp='$CPP $CPPFLAGS'
3473ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3474ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3475ac_compiler_gnu=$ac_cv_c_compiler_gnu
c906108c 3476
60ca704f 3477
bec39cab
AC
3478ac_ext=c
3479ac_cpp='$CPP $CPPFLAGS'
3480ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3481ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3482ac_compiler_gnu=$ac_cv_c_compiler_gnu
81ecdfbb
RW
3483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3484$as_echo_n "checking how to run the C preprocessor... " >&6; }
bec39cab
AC
3485# On Suns, sometimes $CPP names a directory.
3486if test -n "$CPP" && test -d "$CPP"; then
3487 CPP=
8bb2c122 3488fi
bec39cab 3489if test -z "$CPP"; then
81ecdfbb
RW
3490 if test "${ac_cv_prog_CPP+set}" = set; then :
3491 $as_echo_n "(cached) " >&6
bec39cab
AC
3492else
3493 # Double quotes because CPP needs to be expanded
3494 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3495 do
3496 ac_preproc_ok=false
3497for ac_c_preproc_warn_flag in '' yes
3498do
3499 # Use a header file that comes with gcc, so configuring glibc
3500 # with a fresh cross-compiler works.
3501 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3502 # <limits.h> exists even on freestanding compilers.
3503 # On the NeXT, cc -E runs the code through the compiler's parser,
3504 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3506/* end confdefs.h. */
3507#ifdef __STDC__
3508# include <limits.h>
3509#else
3510# include <assert.h>
3511#endif
3512 Syntax error
3513_ACEOF
81ecdfbb 3514if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3515
81ecdfbb 3516else
bec39cab
AC
3517 # Broken: fails on valid input.
3518continue
3519fi
3520rm -f conftest.err conftest.$ac_ext
3521
81ecdfbb 3522 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3523 # can be detected and how.
81ecdfbb 3524 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3525/* end confdefs.h. */
3526#include <ac_nonexistent.h>
3527_ACEOF
81ecdfbb 3528if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3529 # Broken: success on invalid input.
3530continue
8bb2c122 3531else
bec39cab
AC
3532 # Passes both tests.
3533ac_preproc_ok=:
3534break
8bb2c122 3535fi
bec39cab 3536rm -f conftest.err conftest.$ac_ext
8bb2c122 3537
bec39cab
AC
3538done
3539# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3540rm -f conftest.err conftest.$ac_ext
81ecdfbb 3541if $ac_preproc_ok; then :
bec39cab
AC
3542 break
3543fi
8bb2c122 3544
bec39cab
AC
3545 done
3546 ac_cv_prog_CPP=$CPP
ddc9cd0f 3547
c906108c 3548fi
bec39cab
AC
3549 CPP=$ac_cv_prog_CPP
3550else
3551 ac_cv_prog_CPP=$CPP
c906108c 3552fi
81ecdfbb
RW
3553{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3554$as_echo "$CPP" >&6; }
bec39cab
AC
3555ac_preproc_ok=false
3556for ac_c_preproc_warn_flag in '' yes
3557do
3558 # Use a header file that comes with gcc, so configuring glibc
3559 # with a fresh cross-compiler works.
3560 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3561 # <limits.h> exists even on freestanding compilers.
3562 # On the NeXT, cc -E runs the code through the compiler's parser,
3563 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3565/* end confdefs.h. */
3566#ifdef __STDC__
3567# include <limits.h>
3568#else
3569# include <assert.h>
3570#endif
3571 Syntax error
3572_ACEOF
81ecdfbb 3573if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3574
81ecdfbb 3575else
bec39cab
AC
3576 # Broken: fails on valid input.
3577continue
3578fi
3579rm -f conftest.err conftest.$ac_ext
3580
81ecdfbb 3581 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3582 # can be detected and how.
81ecdfbb 3583 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3584/* end confdefs.h. */
3585#include <ac_nonexistent.h>
3586_ACEOF
81ecdfbb 3587if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3588 # Broken: success on invalid input.
3589continue
c906108c 3590else
bec39cab
AC
3591 # Passes both tests.
3592ac_preproc_ok=:
3593break
c906108c 3594fi
bec39cab 3595rm -f conftest.err conftest.$ac_ext
c906108c 3596
bec39cab
AC
3597done
3598# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3599rm -f conftest.err conftest.$ac_ext
81ecdfbb
RW
3600if $ac_preproc_ok; then :
3601
c906108c 3602else
81ecdfbb
RW
3603 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3604$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3605as_fn_error "C preprocessor \"$CPP\" fails sanity check
3606See \`config.log' for more details." "$LINENO" 5; }
c906108c 3607fi
c906108c 3608
bec39cab
AC
3609ac_ext=c
3610ac_cpp='$CPP $CPPFLAGS'
3611ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3612ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3613ac_compiler_gnu=$ac_cv_c_compiler_gnu
3614
3615
81ecdfbb
RW
3616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3617$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3618if test "${ac_cv_path_GREP+set}" = set; then :
3619 $as_echo_n "(cached) " >&6
4e8d927d 3620else
81ecdfbb
RW
3621 if test -z "$GREP"; then
3622 ac_path_GREP_found=false
3623 # Loop through the user's path and test for each of PROGNAME-LIST
3624 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3625for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3626do
3627 IFS=$as_save_IFS
3628 test -z "$as_dir" && as_dir=.
3629 for ac_prog in grep ggrep; do
3630 for ac_exec_ext in '' $ac_executable_extensions; do
3631 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3632 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3633# Check for GNU ac_path_GREP and select it if it is found.
3634 # Check for GNU $ac_path_GREP
3635case `"$ac_path_GREP" --version 2>&1` in
3636*GNU*)
3637 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3638*)
3639 ac_count=0
3640 $as_echo_n 0123456789 >"conftest.in"
3641 while :
3642 do
3643 cat "conftest.in" "conftest.in" >"conftest.tmp"
3644 mv "conftest.tmp" "conftest.in"
3645 cp "conftest.in" "conftest.nl"
3646 $as_echo 'GREP' >> "conftest.nl"
3647 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3648 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3649 as_fn_arith $ac_count + 1 && ac_count=$as_val
3650 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3651 # Best one so far, save it but keep looking for a better one
3652 ac_cv_path_GREP="$ac_path_GREP"
3653 ac_path_GREP_max=$ac_count
bec39cab 3654 fi
81ecdfbb
RW
3655 # 10*(2^10) chars as input seems more than enough
3656 test $ac_count -gt 10 && break
3657 done
3658 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3659esac
bec39cab 3660
81ecdfbb
RW
3661 $ac_path_GREP_found && break 3
3662 done
3663 done
3664 done
3665IFS=$as_save_IFS
3666 if test -z "$ac_cv_path_GREP"; then
3667 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3668 fi
c906108c 3669else
81ecdfbb 3670 ac_cv_path_GREP=$GREP
c906108c 3671fi
c906108c 3672
81ecdfbb
RW
3673fi
3674{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
3675$as_echo "$ac_cv_path_GREP" >&6; }
3676 GREP="$ac_cv_path_GREP"
c906108c 3677
c906108c 3678
81ecdfbb
RW
3679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
3680$as_echo_n "checking for egrep... " >&6; }
3681if test "${ac_cv_path_EGREP+set}" = set; then :
3682 $as_echo_n "(cached) " >&6
783e057b 3683else
81ecdfbb
RW
3684 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3685 then ac_cv_path_EGREP="$GREP -E"
3686 else
3687 if test -z "$EGREP"; then
3688 ac_path_EGREP_found=false
3689 # Loop through the user's path and test for each of PROGNAME-LIST
3690 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3691for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
783e057b
DJ
3692do
3693 IFS=$as_save_IFS
3694 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
3695 for ac_prog in egrep; do
3696 for ac_exec_ext in '' $ac_executable_extensions; do
3697 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3698 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3699# Check for GNU ac_path_EGREP and select it if it is found.
3700 # Check for GNU $ac_path_EGREP
3701case `"$ac_path_EGREP" --version 2>&1` in
3702*GNU*)
3703 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3704*)
3705 ac_count=0
3706 $as_echo_n 0123456789 >"conftest.in"
3707 while :
3708 do
3709 cat "conftest.in" "conftest.in" >"conftest.tmp"
3710 mv "conftest.tmp" "conftest.in"
3711 cp "conftest.in" "conftest.nl"
3712 $as_echo 'EGREP' >> "conftest.nl"
3713 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3714 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3715 as_fn_arith $ac_count + 1 && ac_count=$as_val
3716 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3717 # Best one so far, save it but keep looking for a better one
3718 ac_cv_path_EGREP="$ac_path_EGREP"
3719 ac_path_EGREP_max=$ac_count
3720 fi
3721 # 10*(2^10) chars as input seems more than enough
3722 test $ac_count -gt 10 && break
3723 done
3724 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3725esac
bec39cab 3726
81ecdfbb
RW
3727 $ac_path_EGREP_found && break 3
3728 done
3729 done
3730 done
3731IFS=$as_save_IFS
3732 if test -z "$ac_cv_path_EGREP"; then
3733 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
783e057b 3734 fi
783e057b 3735else
81ecdfbb 3736 ac_cv_path_EGREP=$EGREP
783e057b
DJ
3737fi
3738
81ecdfbb 3739 fi
783e057b 3740fi
81ecdfbb
RW
3741{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
3742$as_echo "$ac_cv_path_EGREP" >&6; }
3743 EGREP="$ac_cv_path_EGREP"
3744
783e057b 3745
81ecdfbb
RW
3746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
3747$as_echo_n "checking for ANSI C header files... " >&6; }
3748if test "${ac_cv_header_stdc+set}" = set; then :
3749 $as_echo_n "(cached) " >&6
783e057b 3750else
81ecdfbb 3751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3752/* end confdefs.h. */
783e057b 3753#include <stdlib.h>
bec39cab 3754#include <stdarg.h>
783e057b
DJ
3755#include <string.h>
3756#include <float.h>
c906108c 3757
bec39cab
AC
3758int
3759main ()
3760{
c906108c 3761
bec39cab
AC
3762 ;
3763 return 0;
3764}
3765_ACEOF
81ecdfbb 3766if ac_fn_c_try_compile "$LINENO"; then :
783e057b 3767 ac_cv_header_stdc=yes
c906108c 3768else
81ecdfbb 3769 ac_cv_header_stdc=no
c906108c 3770fi
81ecdfbb 3771rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 3772
783e057b
DJ
3773if test $ac_cv_header_stdc = yes; then
3774 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
81ecdfbb 3775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
3776/* end confdefs.h. */
3777#include <string.h>
c906108c 3778
783e057b
DJ
3779_ACEOF
3780if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
3781 $EGREP "memchr" >/dev/null 2>&1; then :
3782
c906108c 3783else
783e057b 3784 ac_cv_header_stdc=no
c906108c 3785fi
783e057b 3786rm -f conftest*
c906108c
SS
3787
3788fi
3789
783e057b
DJ
3790if test $ac_cv_header_stdc = yes; then
3791 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
81ecdfbb 3792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
3793/* end confdefs.h. */
3794#include <stdlib.h>
bec39cab 3795
783e057b
DJ
3796_ACEOF
3797if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
3798 $EGREP "free" >/dev/null 2>&1; then :
3799
bec39cab 3800else
783e057b 3801 ac_cv_header_stdc=no
bec39cab 3802fi
783e057b 3803rm -f conftest*
bec39cab
AC
3804
3805fi
bec39cab 3806
783e057b
DJ
3807if test $ac_cv_header_stdc = yes; then
3808 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
81ecdfbb 3809 if test "$cross_compiling" = yes; then :
783e057b 3810 :
bec39cab 3811else
81ecdfbb 3812 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
3813/* end confdefs.h. */
3814#include <ctype.h>
81ecdfbb 3815#include <stdlib.h>
783e057b
DJ
3816#if ((' ' & 0x0FF) == 0x020)
3817# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3818# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3819#else
3820# define ISLOWER(c) \
3821 (('a' <= (c) && (c) <= 'i') \
3822 || ('j' <= (c) && (c) <= 'r') \
3823 || ('s' <= (c) && (c) <= 'z'))
3824# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3825#endif
3826
3827#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3828int
3829main ()
3830{
3831 int i;
3832 for (i = 0; i < 256; i++)
3833 if (XOR (islower (i), ISLOWER (i))
3834 || toupper (i) != TOUPPER (i))
81ecdfbb
RW
3835 return 2;
3836 return 0;
783e057b
DJ
3837}
3838_ACEOF
81ecdfbb 3839if ac_fn_c_try_run "$LINENO"; then :
783e057b 3840
81ecdfbb
RW
3841else
3842 ac_cv_header_stdc=no
783e057b 3843fi
81ecdfbb
RW
3844rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3845 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 3846fi
81ecdfbb 3847
783e057b
DJ
3848fi
3849fi
81ecdfbb
RW
3850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
3851$as_echo "$ac_cv_header_stdc" >&6; }
783e057b
DJ
3852if test $ac_cv_header_stdc = yes; then
3853
81ecdfbb 3854$as_echo "#define STDC_HEADERS 1" >>confdefs.h
783e057b
DJ
3855
3856fi
3857
3858# On IRIX 5.3, sys/types and inttypes.h are conflicting.
783e057b
DJ
3859for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3860 inttypes.h stdint.h unistd.h
81ecdfbb
RW
3861do :
3862 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
3863ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
3864"
3865eval as_val=\$$as_ac_Header
3866 if test "x$as_val" = x""yes; then :
783e057b 3867 cat >>confdefs.h <<_ACEOF
81ecdfbb 3868#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
783e057b
DJ
3869_ACEOF
3870
3871fi
3872
3873done
3874
3875
3876
81ecdfbb
RW
3877 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
3878if test "x$ac_cv_header_minix_config_h" = x""yes; then :
783e057b
DJ
3879 MINIX=yes
3880else
3881 MINIX=
3882fi
3883
3884
3885 if test "$MINIX" = yes; then
3886
81ecdfbb 3887$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
783e057b
DJ
3888
3889
81ecdfbb 3890$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
783e057b
DJ
3891
3892
81ecdfbb 3893$as_echo "#define _MINIX 1" >>confdefs.h
783e057b
DJ
3894
3895 fi
3896
3897
81ecdfbb
RW
3898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
3899$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
3900if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
3901 $as_echo_n "(cached) " >&6
783e057b 3902else
81ecdfbb 3903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
3904/* end confdefs.h. */
3905
c971b7fa
PA
3906# define __EXTENSIONS__ 1
3907 $ac_includes_default
783e057b
DJ
3908int
3909main ()
3910{
3911
3912 ;
3913 return 0;
3914}
3915_ACEOF
81ecdfbb 3916if ac_fn_c_try_compile "$LINENO"; then :
783e057b
DJ
3917 ac_cv_safe_to_define___extensions__=yes
3918else
81ecdfbb 3919 ac_cv_safe_to_define___extensions__=no
783e057b 3920fi
81ecdfbb 3921rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b 3922fi
81ecdfbb
RW
3923{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
3924$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
783e057b 3925 test $ac_cv_safe_to_define___extensions__ = yes &&
81ecdfbb 3926 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
783e057b 3927
81ecdfbb 3928 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
783e057b 3929
81ecdfbb 3930 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
783e057b 3931
81ecdfbb 3932 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
783e057b 3933
81ecdfbb 3934 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
783e057b
DJ
3935
3936
c971b7fa
PA
3937ac_aux_dir=
3938for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
3939 for ac_t in install-sh install.sh shtool; do
3940 if test -f "$ac_dir/$ac_t"; then
3941 ac_aux_dir=$ac_dir
3942 ac_install_sh="$ac_aux_dir/$ac_t -c"
3943 break 2
3944 fi
3945 done
3946done
3947if test -z "$ac_aux_dir"; then
3948 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
3949fi
770d76d7 3950
c971b7fa
PA
3951# These three variables are undocumented and unsupported,
3952# and are intended to be withdrawn in a future Autoconf release.
3953# They can cause serious problems if a builder's source tree is in a directory
3954# whose full name contains unusual characters.
3955ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
3956ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
3957ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
770d76d7 3958
770d76d7 3959
c971b7fa
PA
3960# Make sure we can run config.sub.
3961$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
3962 as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
770d76d7 3963
c971b7fa
PA
3964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
3965$as_echo_n "checking build system type... " >&6; }
3966if test "${ac_cv_build+set}" = set; then :
3967 $as_echo_n "(cached) " >&6
770d76d7 3968else
c971b7fa
PA
3969 ac_build_alias=$build_alias
3970test "x$ac_build_alias" = x &&
3971 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
3972test "x$ac_build_alias" = x &&
3973 as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
3974ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
3975 as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
3976
770d76d7 3977fi
c971b7fa
PA
3978{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
3979$as_echo "$ac_cv_build" >&6; }
3980case $ac_cv_build in
3981*-*-*) ;;
3982*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
770d76d7 3983esac
c971b7fa
PA
3984build=$ac_cv_build
3985ac_save_IFS=$IFS; IFS='-'
3986set x $ac_cv_build
3987shift
3988build_cpu=$1
3989build_vendor=$2
3990shift; shift
3991# Remember, the first character of IFS is used to create $*,
3992# except with old shells:
3993build_os=$*
3994IFS=$ac_save_IFS
3995case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
770d76d7
PA
3996
3997
c971b7fa
PA
3998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
3999$as_echo_n "checking host system type... " >&6; }
4000if test "${ac_cv_host+set}" = set; then :
81ecdfbb
RW
4001 $as_echo_n "(cached) " >&6
4002else
c971b7fa
PA
4003 if test "x$host_alias" = x; then
4004 ac_cv_host=$ac_cv_build
81ecdfbb 4005else
c971b7fa
PA
4006 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
4007 as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
81ecdfbb 4008fi
81ecdfbb
RW
4009
4010fi
c971b7fa
PA
4011{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4012$as_echo "$ac_cv_host" >&6; }
4013case $ac_cv_host in
4014*-*-*) ;;
4015*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
81ecdfbb 4016esac
c971b7fa
PA
4017host=$ac_cv_host
4018ac_save_IFS=$IFS; IFS='-'
4019set x $ac_cv_host
4020shift
4021host_cpu=$1
4022host_vendor=$2
4023shift; shift
4024# Remember, the first character of IFS is used to create $*,
4025# except with old shells:
4026host_os=$*
4027IFS=$ac_save_IFS
4028case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3388710e
JM
4029
4030
4031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4032$as_echo_n "checking target system type... " >&6; }
4033if test "${ac_cv_target+set}" = set; then :
4034 $as_echo_n "(cached) " >&6
4035else
4036 if test "x$target_alias" = x; then
4037 ac_cv_target=$ac_cv_host
4038else
4039 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
4040 as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
4041fi
4042
4043fi
4044{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4045$as_echo "$ac_cv_target" >&6; }
4046case $ac_cv_target in
4047*-*-*) ;;
4048*) as_fn_error "invalid value of canonical target" "$LINENO" 5;;
4049esac
4050target=$ac_cv_target
4051ac_save_IFS=$IFS; IFS='-'
4052set x $ac_cv_target
4053shift
4054target_cpu=$1
4055target_vendor=$2
4056shift; shift
4057# Remember, the first character of IFS is used to create $*,
4058# except with old shells:
4059target_os=$*
4060IFS=$ac_save_IFS
4061case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4062
4063
4064# The aliases save the names the user supplied, while $host etc.
4065# will get canonicalized.
4066test -n "$target_alias" &&
4067 test "$program_prefix$program_suffix$program_transform_name" = \
4068 NONENONEs,x,x, &&
4069 program_prefix=${target_alias}-
4070
4071# The tests for host and target for $enable_largefile require
4072# canonical names.
4073
4074
81ecdfbb 4075
da2f07f1
JK
4076# As the $enable_largefile decision depends on --enable-plugins we must set it
4077# even in directories otherwise not depending on the $plugins option.
4078
4079
4080# Check whether --enable-plugins was given.
4081if test "${enable_plugins+set}" = set; then :
4082 enableval=$enable_plugins; case "${enableval}" in
4083 yes | "") plugins=yes ;;
4084 no) plugins=no ;;
4085 *) plugins=yes ;;
4086 esac
4087else
4088 plugins=no
4089fi
4090
4091
4092
4093case "${host}" in
4094 sparc-*-solaris*|i[3-7]86-*-solaris*)
4095 # On native 32bit sparc and ia32 solaris, large-file and procfs support
4096 # are mutually exclusive; and without procfs support, the bfd/ elf module
4097 # cannot provide certain routines such as elfcore_write_prpsinfo
4098 # or elfcore_write_prstatus. So unless the user explicitly requested
4099 # large-file support through the --enable-largefile switch, disable
4100 # large-file support in favor of procfs support.
4101 test "${target}" = "${host}" -a "x$plugins" = xno \
4102 && : ${enable_largefile="no"}
4103 ;;
4104esac
4105
4106# Check whether --enable-largefile was given.
4107if test "${enable_largefile+set}" = set; then :
4108 enableval=$enable_largefile;
4109fi
4110
4111if test "$enable_largefile" != no; then
4112
4113 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4114$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
4115if test "${ac_cv_sys_largefile_CC+set}" = set; then :
4116 $as_echo_n "(cached) " >&6
4117else
4118 ac_cv_sys_largefile_CC=no
4119 if test "$GCC" != yes; then
4120 ac_save_CC=$CC
4121 while :; do
4122 # IRIX 6.2 and later do not support large files by default,
4123 # so use the C compiler's -n32 option if that helps.
4124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4125/* end confdefs.h. */
4126#include <sys/types.h>
4127 /* Check that off_t can represent 2**63 - 1 correctly.
4128 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4129 since some C++ compilers masquerading as C compilers
4130 incorrectly reject 9223372036854775807. */
4131#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4132 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4133 && LARGE_OFF_T % 2147483647 == 1)
4134 ? 1 : -1];
4135int
4136main ()
4137{
4138
4139 ;
4140 return 0;
4141}
4142_ACEOF
4143 if ac_fn_c_try_compile "$LINENO"; then :
4144 break
4145fi
4146rm -f core conftest.err conftest.$ac_objext
4147 CC="$CC -n32"
4148 if ac_fn_c_try_compile "$LINENO"; then :
4149 ac_cv_sys_largefile_CC=' -n32'; break
4150fi
4151rm -f core conftest.err conftest.$ac_objext
4152 break
4153 done
4154 CC=$ac_save_CC
4155 rm -f conftest.$ac_ext
4156 fi
4157fi
4158{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4159$as_echo "$ac_cv_sys_largefile_CC" >&6; }
4160 if test "$ac_cv_sys_largefile_CC" != no; then
4161 CC=$CC$ac_cv_sys_largefile_CC
4162 fi
4163
4164 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4165$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
4166if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
4167 $as_echo_n "(cached) " >&6
4168else
4169 while :; do
4170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4171/* end confdefs.h. */
4172#include <sys/types.h>
4173 /* Check that off_t can represent 2**63 - 1 correctly.
4174 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4175 since some C++ compilers masquerading as C compilers
4176 incorrectly reject 9223372036854775807. */
4177#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4178 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4179 && LARGE_OFF_T % 2147483647 == 1)
4180 ? 1 : -1];
4181int
4182main ()
4183{
4184
4185 ;
4186 return 0;
4187}
4188_ACEOF
4189if ac_fn_c_try_compile "$LINENO"; then :
4190 ac_cv_sys_file_offset_bits=no; break
4191fi
4192rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4193 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4194/* end confdefs.h. */
4195#define _FILE_OFFSET_BITS 64
4196#include <sys/types.h>
4197 /* Check that off_t can represent 2**63 - 1 correctly.
4198 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4199 since some C++ compilers masquerading as C compilers
4200 incorrectly reject 9223372036854775807. */
4201#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4202 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4203 && LARGE_OFF_T % 2147483647 == 1)
4204 ? 1 : -1];
4205int
4206main ()
4207{
4208
4209 ;
4210 return 0;
4211}
4212_ACEOF
4213if ac_fn_c_try_compile "$LINENO"; then :
4214 ac_cv_sys_file_offset_bits=64; break
4215fi
4216rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4217 ac_cv_sys_file_offset_bits=unknown
4218 break
4219done
4220fi
4221{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4222$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4223case $ac_cv_sys_file_offset_bits in #(
4224 no | unknown) ;;
4225 *)
4226cat >>confdefs.h <<_ACEOF
4227#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4228_ACEOF
4229;;
4230esac
4231rm -rf conftest*
4232 if test $ac_cv_sys_file_offset_bits = unknown; then
4233 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4234$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
4235if test "${ac_cv_sys_large_files+set}" = set; then :
4236 $as_echo_n "(cached) " >&6
4237else
4238 while :; do
4239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4240/* end confdefs.h. */
4241#include <sys/types.h>
4242 /* Check that off_t can represent 2**63 - 1 correctly.
4243 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4244 since some C++ compilers masquerading as C compilers
4245 incorrectly reject 9223372036854775807. */
4246#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4247 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4248 && LARGE_OFF_T % 2147483647 == 1)
4249 ? 1 : -1];
4250int
4251main ()
4252{
4253
4254 ;
4255 return 0;
4256}
4257_ACEOF
4258if ac_fn_c_try_compile "$LINENO"; then :
4259 ac_cv_sys_large_files=no; break
4260fi
4261rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4263/* end confdefs.h. */
4264#define _LARGE_FILES 1
4265#include <sys/types.h>
4266 /* Check that off_t can represent 2**63 - 1 correctly.
4267 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4268 since some C++ compilers masquerading as C compilers
4269 incorrectly reject 9223372036854775807. */
4270#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4271 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4272 && LARGE_OFF_T % 2147483647 == 1)
4273 ? 1 : -1];
4274int
4275main ()
4276{
4277
4278 ;
4279 return 0;
4280}
4281_ACEOF
4282if ac_fn_c_try_compile "$LINENO"; then :
4283 ac_cv_sys_large_files=1; break
4284fi
4285rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4286 ac_cv_sys_large_files=unknown
4287 break
4288done
4289fi
4290{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4291$as_echo "$ac_cv_sys_large_files" >&6; }
4292case $ac_cv_sys_large_files in #(
4293 no | unknown) ;;
4294 *)
4295cat >>confdefs.h <<_ACEOF
4296#define _LARGE_FILES $ac_cv_sys_large_files
4297_ACEOF
4298;;
4299esac
4300rm -rf conftest*
4301 fi
4302fi
4303
4304
4305
81ecdfbb
RW
4306
4307
4308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5
4309$as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; }
4310if test "${am_cv_prog_cc_stdc+set}" = set; then :
4311 $as_echo_n "(cached) " >&6
4312else
4313 am_cv_prog_cc_stdc=no
4314ac_save_CC="$CC"
4315# Don't try gcc -ansi; that turns off useful extensions and
4316# breaks some systems' header files.
4317# AIX -qlanglvl=ansi
4318# Ultrix and OSF/1 -std1
4319# HP-UX 10.20 and later -Ae
4320# HP-UX older versions -Aa -D_HPUX_SOURCE
4321# SVR4 -Xc -D__EXTENSIONS__
4322for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4323do
783e057b 4324 CC="$ac_save_CC $ac_arg"
81ecdfbb 4325 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4326/* end confdefs.h. */
4327#include <stdarg.h>
4328#include <stdio.h>
4329#include <sys/types.h>
4330#include <sys/stat.h>
4331/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4332struct buf { int x; };
4333FILE * (*rcsopen) (struct buf *, struct stat *, int);
4334static char *e (p, i)
4335 char **p;
4336 int i;
4337{
4338 return p[i];
4339}
4340static char *f (char * (*g) (char **, int), char **p, ...)
4341{
4342 char *s;
4343 va_list v;
4344 va_start (v,p);
4345 s = g (p, va_arg (v,int));
4346 va_end (v);
4347 return s;
4348}
4349int test (int i, double x);
4350struct s1 {int (*f) (int a);};
4351struct s2 {int (*f) (double a);};
4352int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4353int argc;
4354char **argv;
4355
4356int
4357main ()
4358{
4359
4360return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4361
4362 ;
4363 return 0;
4364}
4365_ACEOF
81ecdfbb 4366if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4367 am_cv_prog_cc_stdc="$ac_arg"; break
783e057b 4368fi
81ecdfbb 4369rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
4370done
4371CC="$ac_save_CC"
4372
4373fi
4374
4375if test -z "$am_cv_prog_cc_stdc"; then
81ecdfbb
RW
4376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4377$as_echo "none needed" >&6; }
783e057b 4378else
81ecdfbb
RW
4379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5
4380$as_echo "$am_cv_prog_cc_stdc" >&6; }
783e057b
DJ
4381fi
4382case "x$am_cv_prog_cc_stdc" in
4383 x|xno) ;;
4384 *) CC="$CC $am_cv_prog_cc_stdc" ;;
4385esac
4386
4387
4388ac_aux_dir=
81ecdfbb
RW
4389for ac_dir in .. "$srcdir"/..; do
4390 for ac_t in install-sh install.sh shtool; do
4391 if test -f "$ac_dir/$ac_t"; then
4392 ac_aux_dir=$ac_dir
4393 ac_install_sh="$ac_aux_dir/$ac_t -c"
4394 break 2
4395 fi
4396 done
783e057b
DJ
4397done
4398if test -z "$ac_aux_dir"; then
81ecdfbb 4399 as_fn_error "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
783e057b 4400fi
81ecdfbb
RW
4401
4402# These three variables are undocumented and unsupported,
4403# and are intended to be withdrawn in a future Autoconf release.
4404# They can cause serious problems if a builder's source tree is in a directory
4405# whose full name contains unusual characters.
4406ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4407ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4408ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4409
783e057b 4410
783e057b 4411
9009e1ae
MR
4412test "$program_prefix" != NONE &&
4413 program_transform_name="s&^&$program_prefix&;$program_transform_name"
4414# Use a double $ so make ignores it.
4415test "$program_suffix" != NONE &&
4416 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
4417# Double any \ or $.
4418# By default was `s,x,x', remove it if useless.
4419ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
4420program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
4421
81ecdfbb 4422
a417dc56
RW
4423# Dependency checking.
4424rm -rf .tst 2>/dev/null
4425mkdir .tst 2>/dev/null
4426if test -d .tst; then
4427 am__leading_dot=.
4428else
4429 am__leading_dot=_
4430fi
4431rmdir .tst 2>/dev/null
4432
4433DEPDIR="${am__leading_dot}deps"
4434
81ecdfbb 4435ac_config_commands="$ac_config_commands depdir"
a417dc56
RW
4436
4437
4438depcc="$CC" am_compiler_list=
4439
4440am_depcomp=$ac_aux_dir/depcomp
81ecdfbb
RW
4441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
4442$as_echo_n "checking dependency style of $depcc... " >&6; }
4443if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
4444 $as_echo_n "(cached) " >&6
a417dc56
RW
4445else
4446 if test -f "$am_depcomp"; then
4447 # We make a subdir and do the tests there. Otherwise we can end up
4448 # making bogus files that we don't know about and never remove. For
4449 # instance it was reported that on HP-UX the gcc test will end up
4450 # making a dummy file named `D' -- because `-MD' means `put the output
4451 # in D'.
4452 mkdir conftest.dir
4453 # Copy depcomp to subdir because otherwise we won't find it if we're
4454 # using a relative directory.
4455 cp "$am_depcomp" conftest.dir
4456 cd conftest.dir
4457 # We will build objects and dependencies in a subdirectory because
4458 # it helps to detect inapplicable dependency modes. For instance
4459 # both Tru64's cc and ICC support -MD to output dependencies as a
4460 # side effect of compilation, but ICC will put the dependencies in
4461 # the current directory while Tru64 will put them in the object
4462 # directory.
4463 mkdir sub
4464
4465 am_cv_CC_dependencies_compiler_type=none
4466 if test "$am_compiler_list" = ""; then
4467 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
4468 fi
4469 for depmode in $am_compiler_list; do
4470 if test $depmode = none; then break; fi
4471
81ecdfbb 4472 $as_echo "$as_me:$LINENO: trying $depmode" >&5
a417dc56
RW
4473 # Setup a source with many dependencies, because some compilers
4474 # like to wrap large dependency lists on column 80 (with \), and
4475 # we should not choose a depcomp mode which is confused by this.
4476 #
4477 # We need to recreate these files for each test, as the compiler may
4478 # overwrite some of them when testing with obscure command lines.
4479 # This happens at least with the AIX C compiler.
4480 : > sub/conftest.c
4481 for i in 1 2 3 4 5 6; do
4482 echo '#include "conftst'$i'.h"' >> sub/conftest.c
4483 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
4484 # Solaris 8's {/usr,}/bin/sh.
4485 touch sub/conftst$i.h
4486 done
4487 echo "include sub/conftest.Po" > confmf
4488
4489 # We check with `-c' and `-o' for the sake of the "dashmstdout"
4490 # mode. It turns out that the SunPro C++ compiler does not properly
4491 # handle `-M -o', and we need to detect this.
4492 depcmd="depmode=$depmode \
4493 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
4494 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
4495 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
4496 echo "| $depcmd" | sed -e 's/ */ /g' >&5
4497 if env $depcmd > conftest.err 2>&1 &&
4498 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
4499 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
4500 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
4501 # icc doesn't choke on unknown options, it will just issue warnings
4502 # or remarks (even with -Werror). So we grep stderr for any message
4503 # that says an option was ignored or not supported.
4504 # When given -MP, icc 7.0 and 7.1 complain thusly:
4505 # icc: Command line warning: ignoring option '-M'; no argument required
4506 # The diagnosis changed in icc 8.0:
4507 # icc: Command line remark: option '-MP' not supported
4508 if (grep 'ignoring option' conftest.err ||
4509 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
4510 am_cv_CC_dependencies_compiler_type=$depmode
81ecdfbb 4511 $as_echo "$as_me:$LINENO: success" >&5
a417dc56
RW
4512 break
4513 fi
4514 fi
81ecdfbb 4515 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
a417dc56
RW
4516 sed -e 's/^/| /' < conftest.err >&5
4517 done
4518
4519 cd ..
4520 rm -rf conftest.dir
4521else
4522 am_cv_CC_dependencies_compiler_type=none
4523fi
4524
4525fi
81ecdfbb
RW
4526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
4527$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
a417dc56 4528if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
81ecdfbb 4529then as_fn_error "no usable dependency style found" "$LINENO" 5
a417dc56
RW
4530else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
4531
4532fi
4533
4534
4535# Check for the 'make' the user wants to use.
4536for ac_prog in make
4537do
4538 # Extract the first word of "$ac_prog", so it can be a program name with args.
4539set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
4540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4541$as_echo_n "checking for $ac_word... " >&6; }
4542if test "${ac_cv_prog_MAKE+set}" = set; then :
4543 $as_echo_n "(cached) " >&6
a417dc56
RW
4544else
4545 if test -n "$MAKE"; then
4546 ac_cv_prog_MAKE="$MAKE" # Let the user override the test.
4547else
4548as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4549for as_dir in $PATH
4550do
4551 IFS=$as_save_IFS
4552 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
4553 for ac_exec_ext in '' $ac_executable_extensions; do
4554 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
a417dc56 4555 ac_cv_prog_MAKE="$ac_prog"
81ecdfbb 4556 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
a417dc56
RW
4557 break 2
4558 fi
4559done
81ecdfbb
RW
4560 done
4561IFS=$as_save_IFS
a417dc56
RW
4562
4563fi
4564fi
4565MAKE=$ac_cv_prog_MAKE
4566if test -n "$MAKE"; then
81ecdfbb
RW
4567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
4568$as_echo "$MAKE" >&6; }
a417dc56 4569else
81ecdfbb
RW
4570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4571$as_echo "no" >&6; }
a417dc56
RW
4572fi
4573
81ecdfbb 4574
a417dc56
RW
4575 test -n "$MAKE" && break
4576done
4577
4578MAKE_IS_GNU=
4579case "`$MAKE --version 2>&1 | sed 1q`" in
4580 *GNU*)
4581 MAKE_IS_GNU=yes
4582 ;;
4583esac
81ecdfbb 4584 if test "$MAKE_IS_GNU" = yes; then
a417dc56
RW
4585 GMAKE_TRUE=
4586 GMAKE_FALSE='#'
4587else
4588 GMAKE_TRUE='#'
4589 GMAKE_FALSE=
4590fi
4591
81ecdfbb
RW
4592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
4593$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
4594set x ${MAKE-make}
4595ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
4596if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
4597 $as_echo_n "(cached) " >&6
a417dc56
RW
4598else
4599 cat >conftest.make <<\_ACEOF
81ecdfbb 4600SHELL = /bin/sh
a417dc56 4601all:
81ecdfbb 4602 @echo '@@@%%%=$(MAKE)=@@@%%%'
a417dc56
RW
4603_ACEOF
4604# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
81ecdfbb
RW
4605case `${MAKE-make} -f conftest.make 2>/dev/null` in
4606 *@@@%%%=?*=@@@%%%*)
4607 eval ac_cv_prog_make_${ac_make}_set=yes;;
4608 *)
4609 eval ac_cv_prog_make_${ac_make}_set=no;;
4610esac
a417dc56
RW
4611rm -f conftest.make
4612fi
81ecdfbb
RW
4613if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
4614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4615$as_echo "yes" >&6; }
a417dc56
RW
4616 SET_MAKE=
4617else
81ecdfbb
RW
4618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4619$as_echo "no" >&6; }
a417dc56
RW
4620 SET_MAKE="MAKE=${MAKE-make}"
4621fi
4622
4623
c971b7fa
PA
4624# Configure gnulib. We need to build gnulib under some other
4625# directory not "gnulib", to avoid the problem of both GDB and
4626# GDBserver wanting to build it in the same directory, when building
4627# in the source dir.
783e057b 4628
c971b7fa
PA
4629 in_src="gnulib"
4630 in_build="build-gnulib"
4631
4632 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
4633 # so they do not pile up.
4634 ac_sub_configure_args=
4635 ac_prev=
4636 eval "set x $ac_configure_args"
4637 shift
4638 for ac_arg
4639 do
4640 if test -n "$ac_prev"; then
4641 ac_prev=
4642 continue
4643 fi
4644 case $ac_arg in
4645 -cache-file | --cache-file | --cache-fil | --cache-fi \
4646 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
4647 ac_prev=cache_file ;;
4648 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
4649 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
4650 | --c=*)
4651 ;;
4652 --config-cache | -C)
4653 ;;
4654 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
4655 ac_prev=srcdir ;;
4656 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
4657 ;;
4658 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
4659 ac_prev=prefix ;;
4660 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
4661 ;;
4662 --disable-option-checking)
4663 ;;
4664 *)
4665 case $ac_arg in
4666 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
4667 esac
4668 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
4669 esac
4670 done
4671
4672 # Always prepend --prefix to ensure using the same prefix
4673 # in subdir configurations.
4674 ac_arg="--prefix=$prefix"
4675 case $ac_arg in
4676 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
4677 esac
4678 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
4679
4680 # Pass --silent
4681 if test "$silent" = yes; then
4682 ac_sub_configure_args="--silent $ac_sub_configure_args"
4683 fi
4684
4685 # Always prepend --disable-option-checking to silence warnings, since
4686 # different subdirs can have different --enable and --with options.
4687 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
4688
4689 ac_popdir=`pwd`
4690 ac_dir=$in_build
4691
4692 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
4693 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
4694 $as_echo "$ac_msg" >&6
4695 as_dir="$ac_dir"; as_fn_mkdir_p
4696
38ea300a
PA
4697 case $srcdir in
4698 [\\/]* | ?:[\\/]* )
4699 ac_srcdir=$srcdir/$in_src ;;
4700 *) # Relative name.
4701 ac_srcdir=../$srcdir/$in_src ;;
4702 esac
c971b7fa
PA
4703
4704 cd "$ac_dir"
4705
4706 ac_sub_configure=$ac_srcdir/configure
4707
4708 # Make the cache file name correct relative to the subdirectory.
4709 case $cache_file in
4710 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
4711 *) # Relative name.
4712 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
4713 esac
4714
4715 { $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
4716$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
4717 # The eval makes quoting arguments work.
4718 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
4719 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
4720 as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
4721
4722 cd "$ac_popdir"
783e057b 4723
c971b7fa
PA
4724
4725
4726CONFIG_OBS=
4727CONFIG_DEPS=
4728CONFIG_SRCS=
4729ENABLE_CFLAGS=
4730
4731CONFIG_ALL=
4732CONFIG_CLEAN=
4733CONFIG_INSTALL=
4734CONFIG_UNINSTALL=
4735
4736# If we haven't got the data from the intl directory,
4737# assume NLS is disabled.
4738USE_NLS=no
4739LIBINTL=
4740LIBINTL_DEP=
4741INCINTL=
4742XGETTEXT=
4743GMSGFMT=
4744POSUB=
783e057b
DJ
4745
4746if test -f ../intl/config.intl; then
4747 . ../intl/config.intl
4748fi
81ecdfbb
RW
4749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
4750$as_echo_n "checking whether NLS is requested... " >&6; }
783e057b 4751if test x"$USE_NLS" != xyes; then
81ecdfbb
RW
4752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4753$as_echo "no" >&6; }
783e057b 4754else
81ecdfbb
RW
4755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4756$as_echo "yes" >&6; }
783e057b 4757
81ecdfbb 4758$as_echo "#define ENABLE_NLS 1" >>confdefs.h
783e057b
DJ
4759
4760
81ecdfbb
RW
4761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
4762$as_echo_n "checking for catalogs to be installed... " >&6; }
783e057b
DJ
4763 # Look for .po and .gmo files in the source directory.
4764 CATALOGS=
4765 XLINGUAS=
4766 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
4767 # If there aren't any .gmo files the shell will give us the
4768 # literal string "../path/to/srcdir/po/*.gmo" which has to be
4769 # weeded out.
4770 case "$cat" in *\**)
4771 continue;;
4772 esac
4773 # The quadruple backslash is collapsed to a double backslash
4774 # by the backticks, then collapsed again by the double quotes,
4775 # leaving us with one backslash in the sed expression (right
4776 # before the dot that mustn't act as a wildcard).
c971b7fa
PA
4777 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
4778 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
4779 # The user is allowed to set LINGUAS to a list of languages to
4780 # install catalogs for. If it's empty that means "all of them."
4781 if test "x$LINGUAS" = x; then
4782 CATALOGS="$CATALOGS $cat"
4783 XLINGUAS="$XLINGUAS $lang"
4784 else
4785 case "$LINGUAS" in *$lang*)
4786 CATALOGS="$CATALOGS $cat"
4787 XLINGUAS="$XLINGUAS $lang"
4788 ;;
4789 esac
e28b3332
DJ
4790 fi
4791 done
c971b7fa
PA
4792 LINGUAS="$XLINGUAS"
4793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
4794$as_echo "$LINGUAS" >&6; }
4795
4796
4797 DATADIRNAME=share
4798
4799 INSTOBJEXT=.mo
4800
4801 GENCAT=gencat
4802
4803 CATOBJEXT=.gmo
e28b3332 4804
e28b3332
DJ
4805fi
4806
c971b7fa
PA
4807localedir='${datadir}/locale'
4808
4809
4810if test x"$USE_NLS" = xyes; then
4811 CONFIG_ALL="$CONFIG_ALL all-po"
4812 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
4813 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
4814 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
e28b3332 4815fi
e28b3332 4816
c971b7fa
PA
4817GNULIB=build-gnulib/import
4818
4819# For Makefile dependencies.
4820GNULIB_STDINT_H=
4821if test x"$STDINT_H" != x; then
4822 GNULIB_STDINT_H=$GNULIB/$STDINT_H
e28b3332
DJ
4823fi
4824
4825
c971b7fa
PA
4826PACKAGE=gdb
4827
4828cat >>confdefs.h <<_ACEOF
4829#define PACKAGE "$PACKAGE"
4830_ACEOF
4831
4832
4833
4834# We never need to detect it in this sub-configure.
4835# But preserve it for config.status --recheck.
4836
4837
4838
4839MAKEINFO_EXTRA_FLAGS=""
4840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5
4841$as_echo_n "checking whether $MAKEINFO supports @click... " >&6; }
4842if test "${gdb_cv_have_makeinfo_click+set}" = set; then :
4843 $as_echo_n "(cached) " >&6
4844else
4845 echo '@clicksequence{a @click{} b}' >conftest.texinfo
4846 if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then
4847 gdb_cv_have_makeinfo_click=yes
4848 else
4849 gdb_cv_have_makeinfo_click=no
4850 fi
4851fi
4852{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5
4853$as_echo "$gdb_cv_have_makeinfo_click" >&6; }
4854if test x"$gdb_cv_have_makeinfo_click" = xyes; then
4855 MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK"
4856fi
e28b3332
DJ
4857
4858
bec39cab
AC
4859
4860
81ecdfbb
RW
4861# Check whether --with-separate-debug-dir was given.
4862if test "${with_separate_debug_dir+set}" = set; then :
4863 withval=$with_separate_debug_dir;
b14b1491
TT
4864 DEBUGDIR=$withval
4865else
4866 DEBUGDIR=${libdir}/debug
81ecdfbb
RW
4867fi
4868
20e95c23 4869
783e057b
DJ
4870 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
4871 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 4872 ac_define_dir=`eval echo $DEBUGDIR`
783e057b 4873 ac_define_dir=`eval echo $ac_define_dir`
20e95c23 4874
783e057b
DJ
4875cat >>confdefs.h <<_ACEOF
4876#define DEBUGDIR "$ac_define_dir"
20e95c23 4877_ACEOF
20e95c23 4878
20e95c23 4879
20e95c23 4880
0c4a4063 4881
b14b1491
TT
4882 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
4883 if test "x$prefix" = xNONE; then
4884 test_prefix=/usr/local
4885 else
4886 test_prefix=$prefix
4887 fi
783e057b 4888 else
b14b1491 4889 test_prefix=$exec_prefix
783e057b 4890 fi
b14b1491
TT
4891 value=0
4892 case ${ac_define_dir} in
4893 "${test_prefix}"|"${test_prefix}/"*|\
4894 '${exec_prefix}'|'${exec_prefix}/'*)
4895 value=1
4896 ;;
4897 esac
4898
4899cat >>confdefs.h <<_ACEOF
4900#define DEBUGDIR_RELOCATABLE $value
4901_ACEOF
4902
4903
4904
0c4a4063 4905
f83d8a90
DE
4906# We can't pass paths as command line arguments.
4907# Mingw32 tries to be clever and will convert the paths for us.
4908# For example -DBINDIR="/usr/local/bin" passed on the command line may get
4909# converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin".
4910# This breaks GDB's relocatable path conversions since paths passed in
4911# config.h would not get so translated, the path prefixes no longer match.
4912
4913 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
4914 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4915 ac_define_dir=`eval echo $bindir`
4916 ac_define_dir=`eval echo $ac_define_dir`
4917
4918cat >>confdefs.h <<_ACEOF
4919#define BINDIR "$ac_define_dir"
4920_ACEOF
4921
4922
4923
b14b1491
TT
4924# GDB's datadir relocation
4925
4926
4927
81ecdfbb
RW
4928# Check whether --with-gdb-datadir was given.
4929if test "${with_gdb_datadir+set}" = set; then :
4930 withval=$with_gdb_datadir;
b14b1491 4931 GDB_DATADIR=$withval
20e95c23 4932else
b14b1491 4933 GDB_DATADIR=${datadir}/gdb
81ecdfbb
RW
4934fi
4935
20e95c23 4936
b14b1491
TT
4937 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
4938 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4939 ac_define_dir=`eval echo $GDB_DATADIR`
4940 ac_define_dir=`eval echo $ac_define_dir`
4941
4942cat >>confdefs.h <<_ACEOF
4943#define GDB_DATADIR "$ac_define_dir"
20e95c23
DJ
4944_ACEOF
4945
b14b1491
TT
4946
4947
0c4a4063 4948
b14b1491
TT
4949 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
4950 if test "x$prefix" = xNONE; then
4951 test_prefix=/usr/local
4952 else
4953 test_prefix=$prefix
4954 fi
4955 else
4956 test_prefix=$exec_prefix
4957 fi
4958 value=0
4959 case ${ac_define_dir} in
4960 "${test_prefix}"|"${test_prefix}/"*|\
4961 '${exec_prefix}'|'${exec_prefix}/'*)
4962 value=1
4963 ;;
4964 esac
4965
4966cat >>confdefs.h <<_ACEOF
4967#define GDB_DATADIR_RELOCATABLE $value
4968_ACEOF
4969
4970
783e057b 4971
20e95c23 4972
0c4a4063 4973
81ecdfbb
RW
4974# Check whether --with-relocated-sources was given.
4975if test "${with_relocated_sources+set}" = set; then :
4976 withval=$with_relocated_sources; reloc_srcdir="${withval}"
29b0e8a2
JM
4977
4978 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
4979 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4980 ac_define_dir=`eval echo $reloc_srcdir`
4981 ac_define_dir=`eval echo $ac_define_dir`
4982
4983cat >>confdefs.h <<_ACEOF
4984#define RELOC_SRCDIR "$ac_define_dir"
4985_ACEOF
4986
4987
4988
81ecdfbb
RW
4989fi
4990
29b0e8a2 4991
7349ff92
JK
4992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5
4993$as_echo_n "checking for default auto-load directory... " >&6; }
4994
4995# Check whether --with-auto-load-dir was given.
4996if test "${with_auto_load_dir+set}" = set; then :
4997 withval=$with_auto_load_dir;
4998else
1564a261 4999 with_auto_load_dir='$debugdir:$datadir/auto-load'
7349ff92
JK
5000fi
5001
1564a261 5002escape_dir=`echo $with_auto_load_dir | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'`
7349ff92
JK
5003
5004 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5005 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5006 ac_define_dir=`eval echo $escape_dir`
5007 ac_define_dir=`eval echo $ac_define_dir`
5008
5009cat >>confdefs.h <<_ACEOF
5010#define AUTO_LOAD_DIR "$ac_define_dir"
5011_ACEOF
5012
5013
5014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5
5015$as_echo "$with_auto_load_dir" >&6; }
5016
bccbefd2
JK
5017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5
5018$as_echo_n "checking for default auto-load safe-path... " >&6; }
5019
5020# Check whether --with-auto-load-safe-path was given.
5021if test "${with_auto_load_safe_path+set}" = set; then :
5022 withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then
6dea1fbd
JK
5023 with_auto_load_safe_path="/"
5024 fi
bccbefd2 5025else
7349ff92 5026 with_auto_load_safe_path="$with_auto_load_dir"
bccbefd2
JK
5027fi
5028
1564a261 5029escape_dir=`echo $with_auto_load_safe_path | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'`
bccbefd2
JK
5030
5031 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5032 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6dea1fbd 5033 ac_define_dir=`eval echo $escape_dir`
bccbefd2
JK
5034 ac_define_dir=`eval echo $ac_define_dir`
5035
5036cat >>confdefs.h <<_ACEOF
6dea1fbd 5037#define AUTO_LOAD_SAFE_PATH "$ac_define_dir"
bccbefd2
JK
5038_ACEOF
5039
5040
5041{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
5042$as_echo "$with_auto_load_safe_path" >&6; }
5043
29b0e8a2 5044
20e95c23 5045
5ae98d25 5046subdirs="$subdirs testsuite"
20e95c23
DJ
5047
5048
783e057b 5049# Check whether to support alternative target configurations
81ecdfbb
RW
5050# Check whether --enable-targets was given.
5051if test "${enable_targets+set}" = set; then :
5052 enableval=$enable_targets; case "${enableval}" in
5053 yes | "") as_fn_error "enable-targets option must specify target names or 'all'" "$LINENO" 5
783e057b
DJ
5054 ;;
5055 no) enable_targets= ;;
5056 *) enable_targets=$enableval ;;
5057esac
81ecdfbb
RW
5058fi
5059
20e95c23 5060
783e057b 5061# Check whether to enable 64-bit support on 32-bit hosts
81ecdfbb
RW
5062# Check whether --enable-64-bit-bfd was given.
5063if test "${enable_64_bit_bfd+set}" = set; then :
5064 enableval=$enable_64_bit_bfd; case "${enableval}" in
783e057b
DJ
5065 yes) want64=true ;;
5066 no) want64=false ;;
81ecdfbb 5067 *) as_fn_error "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
783e057b
DJ
5068esac
5069else
5070 want64=false
81ecdfbb
RW
5071fi
5072
783e057b
DJ
5073# Provide defaults for some variables set by the per-host and per-target
5074# configuration.
5075gdb_host_obs=posix-hdep.o
20e95c23 5076
783e057b
DJ
5077if test "${target}" = "${host}"; then
5078 gdb_native=yes
5079else
5080 gdb_native=no
5081fi
20e95c23 5082
783e057b 5083. $srcdir/configure.host
20e95c23 5084
783e057b 5085# Accumulate some settings from configure.tgt over all enabled targets
20e95c23 5086
783e057b
DJ
5087TARGET_OBS=
5088all_targets=
b292c783 5089HAVE_NATIVE_GCORE_TARGET=
20e95c23 5090
783e057b 5091for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
20e95c23 5092do
783e057b
DJ
5093 if test "$targ_alias" = "all"; then
5094 all_targets=true
5095 else
5096 # Canonicalize the secondary target names.
5097 result=`$ac_config_sub $targ_alias 2>/dev/null`
5098 if test -n "$result"; then
5099 targ=$result
5100 else
5101 targ=$targ_alias
5102 fi
20e95c23 5103
783e057b 5104 . ${srcdir}/configure.tgt
20e95c23 5105
bf307134
JB
5106 if test -z "${gdb_target_obs}"; then :
5107 as_fn_error "configuration ${targ} is unsupported." "$LINENO" 5
5108fi
5109
783e057b
DJ
5110 # Target-specific object files
5111 for i in ${gdb_target_obs}; do
5112 case " $TARGET_OBS " in
5113 *" ${i} "*) ;;
5114 *)
5115 TARGET_OBS="$TARGET_OBS ${i}"
5116 ;;
5117 esac
5118 done
20e95c23 5119
783e057b
DJ
5120 # Check whether this target needs 64-bit CORE_ADDR
5121 if test x${want64} = xfalse; then
5122 . ${srcdir}/../bfd/config.bfd
5123 fi
b292c783
JK
5124
5125 # Check whether this target is native and supports gcore.
5126 if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \
5127 && $gdb_have_gcore; then
5128 HAVE_NATIVE_GCORE_TARGET=1
5129 fi
783e057b 5130 fi
20e95c23
DJ
5131done
5132
783e057b
DJ
5133if test x${all_targets} = xtrue; then
5134
5135 # We want all 64-bit targets if we either:
5136 # - run on a 64-bit host or
5137 # - already require 64-bit support for some other target or
5138 # - the --enable-64-bit-bfd option was supplied
5139 # Otherwise we only support all 32-bit targets.
5140 #
5141 # NOTE: This test must be in sync with the corresponding
5142 # tests in BFD!
20e95c23 5143
783e057b 5144 if test x${want64} = xfalse; then
81ecdfbb
RW
5145 # The cast to long int works around a bug in the HP C Compiler
5146# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5147# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5148# This bug is HP SR number 8606223364.
5149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
5150$as_echo_n "checking size of long... " >&6; }
5151if test "${ac_cv_sizeof_long+set}" = set; then :
5152 $as_echo_n "(cached) " >&6
c0993dbe 5153else
81ecdfbb 5154 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
c0993dbe 5155
81ecdfbb
RW
5156else
5157 if test "$ac_cv_type_long" = yes; then
5158 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5159$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5160{ as_fn_set_status 77
5161as_fn_error "cannot compute sizeof (long)
5162See \`config.log' for more details." "$LINENO" 5; }; }
5163 else
5164 ac_cv_sizeof_long=0
5165 fi
c0993dbe 5166fi
81ecdfbb 5167
c0993dbe 5168fi
81ecdfbb
RW
5169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
5170$as_echo "$ac_cv_sizeof_long" >&6; }
c0993dbe 5171
c0993dbe 5172
c0993dbe 5173
c0993dbe
UW
5174cat >>confdefs.h <<_ACEOF
5175#define SIZEOF_LONG $ac_cv_sizeof_long
5176_ACEOF
5177
5178
5179 if test "x${ac_cv_sizeof_long}" = "x8"; then
5180 want64=true
5181 fi
5182 fi
5183 if test x${want64} = xtrue; then
5184 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
5185 else
5186 TARGET_OBS='$(ALL_TARGET_OBS)'
5187 fi
5188fi
5189
5190
5191
b292c783 5192
c0993dbe
UW
5193# For other settings, only the main target counts.
5194gdb_sim=
5195gdb_osabi=
5196build_gdbserver=
5197targ=$target; . ${srcdir}/configure.tgt
5198
5199# Fetch the default architecture and default target vector from BFD.
5200targ=$target; . $srcdir/../bfd/config.bfd
5201
5202# We only want the first architecture, so strip off the others if
5203# there is more than one.
5204targ_archs=`echo $targ_archs | sed 's/ .*//'`
5205
5206if test "x$targ_archs" != x; then
5207
5208cat >>confdefs.h <<_ACEOF
5209#define DEFAULT_BFD_ARCH $targ_archs
5210_ACEOF
5211
5212fi
5213if test "x$targ_defvec" != x; then
5214
5215cat >>confdefs.h <<_ACEOF
5216#define DEFAULT_BFD_VEC $targ_defvec
5217_ACEOF
5218
5219fi
5220
c0993dbe
UW
5221# The CLI cannot be disabled yet, but may be in the future.
5222
5223# Enable CLI.
81ecdfbb
RW
5224# Check whether --enable-gdbcli was given.
5225if test "${enable_gdbcli+set}" = set; then :
5226 enableval=$enable_gdbcli; case $enableval in
c0993dbe
UW
5227 yes)
5228 ;;
5229 no)
81ecdfbb 5230 as_fn_error "the command-line interface cannot be disabled yet" "$LINENO" 5 ;;
c0993dbe 5231 *)
81ecdfbb 5232 as_fn_error "bad value $enableval for --enable-gdbcli" "$LINENO" 5 ;;
c0993dbe
UW
5233 esac
5234else
5235 enable_gdbcli=yes
81ecdfbb
RW
5236fi
5237
c0993dbe
UW
5238if test x"$enable_gdbcli" = xyes; then
5239 if test -d $srcdir/cli; then
5240 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
5241 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
5242 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
5243 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
5244 fi
5245fi
5246
5247# Enable MI.
81ecdfbb
RW
5248# Check whether --enable-gdbmi was given.
5249if test "${enable_gdbmi+set}" = set; then :
5250 enableval=$enable_gdbmi; case $enableval in
c0993dbe
UW
5251 yes | no)
5252 ;;
5253 *)
81ecdfbb 5254 as_fn_error "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
c0993dbe
UW
5255 esac
5256else
5257 enable_gdbmi=yes
81ecdfbb
RW
5258fi
5259
c0993dbe
UW
5260if test x"$enable_gdbmi" = xyes; then
5261 if test -d $srcdir/mi; then
5262 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
5263 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
5264 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
5265 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
5266 fi
5267fi
5268
5269# Enable TUI.
81ecdfbb
RW
5270# Check whether --enable-tui was given.
5271if test "${enable_tui+set}" = set; then :
5272 enableval=$enable_tui; case $enableval in
3ca64bd3 5273 yes | no | auto)
c0993dbe
UW
5274 ;;
5275 *)
81ecdfbb 5276 as_fn_error "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
c0993dbe
UW
5277 esac
5278else
3ca64bd3 5279 enable_tui=auto
81ecdfbb
RW
5280fi
5281
c0993dbe
UW
5282
5283# Enable gdbtk.
81ecdfbb
RW
5284# Check whether --enable-gdbtk was given.
5285if test "${enable_gdbtk+set}" = set; then :
5286 enableval=$enable_gdbtk; case $enableval in
c0993dbe
UW
5287 yes | no)
5288 ;;
5289 *)
81ecdfbb 5290 as_fn_error "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
c0993dbe
UW
5291 esac
5292else
5062cc19 5293 if test -d $srcdir/gdbtk; then
c0993dbe
UW
5294 enable_gdbtk=yes
5295 else
5296 enable_gdbtk=no
5297 fi
81ecdfbb
RW
5298fi
5299
c0993dbe
UW
5300# We unconditionally disable gdbtk tests on selected platforms.
5301case $host_os in
5302 go32* | windows*)
81ecdfbb
RW
5303 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
5304$as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
c0993dbe
UW
5305 enable_gdbtk=no ;;
5306esac
5307
05e7c244 5308# Libunwind support for ia64.
bec39cab 5309
05e7c244
JK
5310
5311# Check whether --with-libunwind-ia64 was given.
5312if test "${with_libunwind_ia64+set}" = set; then :
5313 withval=$with_libunwind_ia64;
bec39cab 5314else
05e7c244
JK
5315 with_libunwind_ia64=auto
5316fi
bec39cab 5317
05e7c244
JK
5318
5319# Backward compatibility option.
5320if test "${with_libunwind+set}" = set; then
5321 if test x"$with_libunwind_ia64" != xauto; then
5322 as_fn_error "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5
5323 fi
5324 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5
5325$as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;}
5326 with_libunwind_ia64="$with_libunwind"
5327fi
5328
5329case "$with_libunwind_ia64" in
5330 yes | no)
5331 ;;
5332 auto)
5333 for ac_header in libunwind-ia64.h
81ecdfbb 5334do :
b54a8fd7
PA
5335 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
5336if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
bec39cab 5337 cat >>confdefs.h <<_ACEOF
b54a8fd7 5338#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
5339_ACEOF
5340
5341fi
5342
5343done
5344
05e7c244
JK
5345 with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h
5346 ;;
5347 *)
5348 as_fn_error "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5
5349 ;;
5350esac
bec39cab 5351
05e7c244 5352if test x"$with_libunwind_ia64" = xyes; then
b54a8fd7 5353 for ac_header in libunwind-ia64.h
81ecdfbb 5354do :
b54a8fd7
PA
5355 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
5356if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
bec39cab 5357 cat >>confdefs.h <<_ACEOF
b54a8fd7 5358#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
5359_ACEOF
5360
5361fi
5362
5363done
5364
05e7c244
JK
5365 if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then
5366 as_fn_error "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5
5367 fi
5368 CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o"
5369 CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o"
5370 CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c"
a9322a30
TT
5371fi
5372
cb01cfba
JB
5373opt_curses=no
5374
81ecdfbb
RW
5375# Check whether --with-curses was given.
5376if test "${with_curses+set}" = set; then :
5377 withval=$with_curses; opt_curses=$withval
5378fi
5379
cb01cfba 5380
76a39ba7 5381prefer_curses=no
cb01cfba 5382if test "$opt_curses" = "yes"; then
76a39ba7 5383 prefer_curses=yes
cb01cfba
JB
5384fi
5385
a9322a30 5386# Profiling support.
81ecdfbb
RW
5387# Check whether --enable-profiling was given.
5388if test "${enable_profiling+set}" = set; then :
5389 enableval=$enable_profiling; case $enableval in
a9322a30
TT
5390 yes | no)
5391 ;;
5392 *)
81ecdfbb 5393 as_fn_error "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
a9322a30
TT
5394 esac
5395else
5396 enable_profiling=no
81ecdfbb 5397fi
bec39cab 5398
a9322a30
TT
5399
5400for ac_func in monstartup _mcleanup
81ecdfbb
RW
5401do :
5402 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
5403ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
5404eval as_val=\$$as_ac_var
5405 if test "x$as_val" = x""yes; then :
5406 cat >>confdefs.h <<_ACEOF
5407#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 5408_ACEOF
a9322a30 5409
81ecdfbb
RW
5410fi
5411done
a9322a30 5412
81ecdfbb
RW
5413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
5414$as_echo_n "checking for _etext... " >&6; }
5415if test "${ac_cv_var__etext+set}" = set; then :
5416 $as_echo_n "(cached) " >&6
5417else
5418 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5419/* end confdefs.h. */
5420#include <stdlib.h>
5421extern char _etext;
a9322a30
TT
5422
5423int
5424main ()
5425{
5426free (&_etext);
5427 ;
5428 return 0;
5429}
bec39cab 5430_ACEOF
81ecdfbb 5431if ac_fn_c_try_link "$LINENO"; then :
a9322a30 5432 ac_cv_var__etext=yes
bec39cab 5433else
81ecdfbb 5434 ac_cv_var__etext=no
bec39cab 5435fi
81ecdfbb
RW
5436rm -f core conftest.err conftest.$ac_objext \
5437 conftest$ac_exeext conftest.$ac_ext
bec39cab 5438fi
81ecdfbb
RW
5439{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
5440$as_echo "$ac_cv_var__etext" >&6; }
a9322a30 5441if test $ac_cv_var__etext = yes; then
60ca704f 5442
81ecdfbb 5443$as_echo "#define HAVE__ETEXT 1" >>confdefs.h
bec39cab 5444
bec39cab 5445fi
81ecdfbb
RW
5446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
5447$as_echo_n "checking for etext... " >&6; }
5448if test "${ac_cv_var_etext+set}" = set; then :
5449 $as_echo_n "(cached) " >&6
bec39cab 5450else
81ecdfbb 5451 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 5452/* end confdefs.h. */
a9322a30
TT
5453#include <stdlib.h>
5454extern char etext;
bec39cab
AC
5455
5456int
5457main ()
5458{
a9322a30 5459free (&etext);
bec39cab
AC
5460 ;
5461 return 0;
5462}
5463_ACEOF
81ecdfbb 5464if ac_fn_c_try_link "$LINENO"; then :
a9322a30 5465 ac_cv_var_etext=yes
bec39cab 5466else
81ecdfbb 5467 ac_cv_var_etext=no
bec39cab 5468fi
81ecdfbb
RW
5469rm -f core conftest.err conftest.$ac_objext \
5470 conftest$ac_exeext conftest.$ac_ext
bec39cab 5471fi
81ecdfbb
RW
5472{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
5473$as_echo "$ac_cv_var_etext" >&6; }
a9322a30
TT
5474if test $ac_cv_var_etext = yes; then
5475
81ecdfbb 5476$as_echo "#define HAVE_ETEXT 1" >>confdefs.h
bec39cab
AC
5477
5478fi
a9322a30
TT
5479if test "$enable_profiling" = yes ; then
5480 if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
81ecdfbb 5481 as_fn_error "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
a9322a30
TT
5482 fi
5483 PROFILE_CFLAGS=-pg
5484 OLD_CFLAGS="$CFLAGS"
5485 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
bec39cab 5486
81ecdfbb
RW
5487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
5488$as_echo_n "checking whether $CC supports -pg... " >&6; }
5489if test "${ac_cv_cc_supports_pg+set}" = set; then :
5490 $as_echo_n "(cached) " >&6
bec39cab 5491else
81ecdfbb 5492 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 5493/* end confdefs.h. */
bec39cab
AC
5494
5495int
5496main ()
5497{
a9322a30 5498int x;
bec39cab
AC
5499 ;
5500 return 0;
5501}
5502_ACEOF
81ecdfbb 5503if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 5504 ac_cv_cc_supports_pg=yes
bec39cab 5505else
81ecdfbb 5506 ac_cv_cc_supports_pg=no
bec39cab 5507fi
81ecdfbb 5508rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 5509fi
81ecdfbb
RW
5510{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
5511$as_echo "$ac_cv_cc_supports_pg" >&6; }
bec39cab 5512
a9322a30 5513 if test $ac_cv_cc_supports_pg = no; then
81ecdfbb 5514 as_fn_error "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
a9322a30 5515 fi
bec39cab 5516
a9322a30 5517 CFLAGS="$OLD_CFLAGS"
bec39cab
AC
5518fi
5519
c16158bc
JM
5520
5521
81ecdfbb
RW
5522# Check whether --with-pkgversion was given.
5523if test "${with_pkgversion+set}" = set; then :
5524 withval=$with_pkgversion; case "$withval" in
5525 yes) as_fn_error "package version not specified" "$LINENO" 5 ;;
c16158bc
JM
5526 no) PKGVERSION= ;;
5527 *) PKGVERSION="($withval) " ;;
5528 esac
5529else
5530 PKGVERSION="(GDB) "
5531
81ecdfbb 5532fi
c16158bc
JM
5533
5534
5535
5536
81ecdfbb
RW
5537
5538# Check whether --with-bugurl was given.
5539if test "${with_bugurl+set}" = set; then :
5540 withval=$with_bugurl; case "$withval" in
5541 yes) as_fn_error "bug URL not specified" "$LINENO" 5 ;;
c16158bc
JM
5542 no) BUGURL=
5543 ;;
5544 *) BUGURL="$withval"
5545 ;;
5546 esac
5547else
5548 BUGURL="http://www.gnu.org/software/gdb/bugs/"
5549
81ecdfbb
RW
5550fi
5551
c16158bc
JM
5552 case ${BUGURL} in
5553 "")
5554 REPORT_BUGS_TO=
5555 REPORT_BUGS_TEXI=
5556 ;;
5557 *)
5558 REPORT_BUGS_TO="<$BUGURL>"
5559 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
5560 ;;
5561 esac;
5562
5563
5564
5565
5566cat >>confdefs.h <<_ACEOF
5567#define PKGVERSION "$PKGVERSION"
5568_ACEOF
5569
5570
5571cat >>confdefs.h <<_ACEOF
5572#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
5573_ACEOF
5574
5575
bec39cab
AC
5576# --------------------- #
5577# Checks for programs. #
5578# --------------------- #
5579
5580for ac_prog in gawk mawk nawk awk
5581do
5582 # Extract the first word of "$ac_prog", so it can be a program name with args.
5583set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
5584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5585$as_echo_n "checking for $ac_word... " >&6; }
5586if test "${ac_cv_prog_AWK+set}" = set; then :
5587 $as_echo_n "(cached) " >&6
bec39cab
AC
5588else
5589 if test -n "$AWK"; then
5590 ac_cv_prog_AWK="$AWK" # Let the user override the test.
5591else
5592as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5593for as_dir in $PATH
5594do
5595 IFS=$as_save_IFS
5596 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5597 for ac_exec_ext in '' $ac_executable_extensions; do
5598 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5599 ac_cv_prog_AWK="$ac_prog"
81ecdfbb 5600 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
5601 break 2
5602 fi
5603done
81ecdfbb
RW
5604 done
5605IFS=$as_save_IFS
bec39cab
AC
5606
5607fi
5608fi
5609AWK=$ac_cv_prog_AWK
5610if test -n "$AWK"; then
81ecdfbb
RW
5611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
5612$as_echo "$AWK" >&6; }
bec39cab 5613else
81ecdfbb
RW
5614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5615$as_echo "no" >&6; }
bec39cab
AC
5616fi
5617
bec39cab 5618
81ecdfbb 5619 test -n "$AWK" && break
bec39cab
AC
5620done
5621
c971b7fa
PA
5622# Find a good install program. We prefer a C program (faster),
5623# so one script is as good as another. But avoid the broken or
5624# incompatible versions:
5625# SysV /etc/install, /usr/sbin/install
5626# SunOS /usr/etc/install
5627# IRIX /sbin/install
5628# AIX /bin/install
5629# AmigaOS /C/install, which installs bootblocks on floppy discs
5630# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5631# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5632# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5633# OS/2's system install, which has a completely different semantic
5634# ./install, which can be erroneously created by make from ./install.sh.
5635# Reject install programs that cannot install multiple files.
5636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5637$as_echo_n "checking for a BSD-compatible install... " >&6; }
5638if test -z "$INSTALL"; then
5639if test "${ac_cv_path_install+set}" = set; then :
5640 $as_echo_n "(cached) " >&6
5641else
5642 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5643for as_dir in $PATH
5644do
5645 IFS=$as_save_IFS
5646 test -z "$as_dir" && as_dir=.
5647 # Account for people who put trailing slashes in PATH elements.
5648case $as_dir/ in #((
5649 ./ | .// | /[cC]/* | \
5650 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
5651 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
5652 /usr/ucb/* ) ;;
5653 *)
5654 # OSF1 and SCO ODT 3.0 have their own names for install.
5655 # Don't use installbsd from OSF since it installs stuff as root
5656 # by default.
5657 for ac_prog in ginstall scoinst install; do
5658 for ac_exec_ext in '' $ac_executable_extensions; do
5659 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5660 if test $ac_prog = install &&
5661 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5662 # AIX install. It has an incompatible calling convention.
5663 :
5664 elif test $ac_prog = install &&
5665 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5666 # program-specific install script used by HP pwplus--don't use.
5667 :
5668 else
5669 rm -rf conftest.one conftest.two conftest.dir
5670 echo one > conftest.one
5671 echo two > conftest.two
5672 mkdir conftest.dir
5673 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5674 test -s conftest.one && test -s conftest.two &&
5675 test -s conftest.dir/conftest.one &&
5676 test -s conftest.dir/conftest.two
5677 then
5678 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5679 break 3
5680 fi
5681 fi
5682 fi
5683 done
5684 done
5685 ;;
5686esac
5687
5688 done
5689IFS=$as_save_IFS
5690
5691rm -rf conftest.one conftest.two conftest.dir
5692
5693fi
5694 if test "${ac_cv_path_install+set}" = set; then
5695 INSTALL=$ac_cv_path_install
5696 else
5697 # As a last resort, use the slow shell script. Don't cache a
5698 # value for INSTALL within a source directory, because that will
5699 # break other packages using the cache if that directory is
5700 # removed, or if the value is a relative name.
5701 INSTALL=$ac_install_sh
5702 fi
5703fi
5704{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5705$as_echo "$INSTALL" >&6; }
5706
5707# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5708# It thinks the first close brace ends the variable substitution.
5709test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5710
5711test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5712
5713test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
bec39cab 5714
81ecdfbb
RW
5715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
5716$as_echo_n "checking whether ln -s works... " >&6; }
bec39cab
AC
5717LN_S=$as_ln_s
5718if test "$LN_S" = "ln -s"; then
81ecdfbb
RW
5719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5720$as_echo "yes" >&6; }
bec39cab 5721else
81ecdfbb
RW
5722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
5723$as_echo "no, using $LN_S" >&6; }
bec39cab
AC
5724fi
5725
5726if test -n "$ac_tool_prefix"; then
5727 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5728set dummy ${ac_tool_prefix}ranlib; ac_word=$2
81ecdfbb
RW
5729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5730$as_echo_n "checking for $ac_word... " >&6; }
5731if test "${ac_cv_prog_RANLIB+set}" = set; then :
5732 $as_echo_n "(cached) " >&6
bec39cab
AC
5733else
5734 if test -n "$RANLIB"; then
5735 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5736else
5737as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5738for as_dir in $PATH
5739do
5740 IFS=$as_save_IFS
5741 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5742 for ac_exec_ext in '' $ac_executable_extensions; do
5743 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5744 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
81ecdfbb 5745 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
5746 break 2
5747 fi
5748done
81ecdfbb
RW
5749 done
5750IFS=$as_save_IFS
bec39cab
AC
5751
5752fi
5753fi
5754RANLIB=$ac_cv_prog_RANLIB
5755if test -n "$RANLIB"; then
81ecdfbb
RW
5756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5757$as_echo "$RANLIB" >&6; }
bec39cab 5758else
81ecdfbb
RW
5759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5760$as_echo "no" >&6; }
bec39cab
AC
5761fi
5762
81ecdfbb 5763
bec39cab
AC
5764fi
5765if test -z "$ac_cv_prog_RANLIB"; then
5766 ac_ct_RANLIB=$RANLIB
5767 # Extract the first word of "ranlib", so it can be a program name with args.
5768set dummy ranlib; ac_word=$2
81ecdfbb
RW
5769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5770$as_echo_n "checking for $ac_word... " >&6; }
5771if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
5772 $as_echo_n "(cached) " >&6
bec39cab
AC
5773else
5774 if test -n "$ac_ct_RANLIB"; then
5775 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5776else
5777as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5778for as_dir in $PATH
5779do
5780 IFS=$as_save_IFS
5781 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5782 for ac_exec_ext in '' $ac_executable_extensions; do
5783 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5784 ac_cv_prog_ac_ct_RANLIB="ranlib"
81ecdfbb 5785 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
5786 break 2
5787 fi
5788done
81ecdfbb
RW
5789 done
5790IFS=$as_save_IFS
bec39cab 5791
bec39cab
AC
5792fi
5793fi
5794ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5795if test -n "$ac_ct_RANLIB"; then
81ecdfbb
RW
5796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5797$as_echo "$ac_ct_RANLIB" >&6; }
bec39cab 5798else
81ecdfbb
RW
5799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5800$as_echo "no" >&6; }
bec39cab
AC
5801fi
5802
81ecdfbb
RW
5803 if test "x$ac_ct_RANLIB" = x; then
5804 RANLIB=":"
5805 else
5806 case $cross_compiling:$ac_tool_warned in
5807yes:)
5808{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5809$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5810ac_tool_warned=yes ;;
5811esac
5812 RANLIB=$ac_ct_RANLIB
5813 fi
bec39cab
AC
5814else
5815 RANLIB="$ac_cv_prog_RANLIB"
5816fi
5817
5818for ac_prog in 'bison -y' byacc
5819do
5820 # Extract the first word of "$ac_prog", so it can be a program name with args.
5821set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
5822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5823$as_echo_n "checking for $ac_word... " >&6; }
5824if test "${ac_cv_prog_YACC+set}" = set; then :
5825 $as_echo_n "(cached) " >&6
bec39cab
AC
5826else
5827 if test -n "$YACC"; then
5828 ac_cv_prog_YACC="$YACC" # Let the user override the test.
5829else
5830as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5831for as_dir in $PATH
5832do
5833 IFS=$as_save_IFS
5834 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5835 for ac_exec_ext in '' $ac_executable_extensions; do
5836 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5837 ac_cv_prog_YACC="$ac_prog"
81ecdfbb 5838 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
5839 break 2
5840 fi
5841done
81ecdfbb
RW
5842 done
5843IFS=$as_save_IFS
bec39cab
AC
5844
5845fi
5846fi
5847YACC=$ac_cv_prog_YACC
5848if test -n "$YACC"; then
81ecdfbb
RW
5849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
5850$as_echo "$YACC" >&6; }
bec39cab 5851else
81ecdfbb
RW
5852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5853$as_echo "no" >&6; }
bec39cab
AC
5854fi
5855
81ecdfbb 5856
bec39cab
AC
5857 test -n "$YACC" && break
5858done
5859test -n "$YACC" || YACC="yacc"
5860
5861
5862if test -n "$ac_tool_prefix"; then
5863 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
5864set dummy ${ac_tool_prefix}ar; ac_word=$2
81ecdfbb
RW
5865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5866$as_echo_n "checking for $ac_word... " >&6; }
5867if test "${ac_cv_prog_AR+set}" = set; then :
5868 $as_echo_n "(cached) " >&6
bec39cab
AC
5869else
5870 if test -n "$AR"; then
5871 ac_cv_prog_AR="$AR" # Let the user override the test.
5872else
5873as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5874for as_dir in $PATH
5875do
5876 IFS=$as_save_IFS
5877 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5878 for ac_exec_ext in '' $ac_executable_extensions; do
5879 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5880 ac_cv_prog_AR="${ac_tool_prefix}ar"
81ecdfbb 5881 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
5882 break 2
5883 fi
5884done
81ecdfbb
RW
5885 done
5886IFS=$as_save_IFS
bec39cab
AC
5887
5888fi
5889fi
5890AR=$ac_cv_prog_AR
5891if test -n "$AR"; then
81ecdfbb
RW
5892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5893$as_echo "$AR" >&6; }
bec39cab 5894else
81ecdfbb
RW
5895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5896$as_echo "no" >&6; }
bec39cab
AC
5897fi
5898
81ecdfbb 5899
bec39cab
AC
5900fi
5901if test -z "$ac_cv_prog_AR"; then
5902 ac_ct_AR=$AR
5903 # Extract the first word of "ar", so it can be a program name with args.
5904set dummy ar; ac_word=$2
81ecdfbb
RW
5905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5906$as_echo_n "checking for $ac_word... " >&6; }
5907if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
5908 $as_echo_n "(cached) " >&6
bec39cab
AC
5909else
5910 if test -n "$ac_ct_AR"; then
5911 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5912else
5913as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5914for as_dir in $PATH
5915do
5916 IFS=$as_save_IFS
5917 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5918 for ac_exec_ext in '' $ac_executable_extensions; do
5919 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5920 ac_cv_prog_ac_ct_AR="ar"
81ecdfbb 5921 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
5922 break 2
5923 fi
5924done
81ecdfbb
RW
5925 done
5926IFS=$as_save_IFS
bec39cab
AC
5927
5928fi
5929fi
5930ac_ct_AR=$ac_cv_prog_ac_ct_AR
5931if test -n "$ac_ct_AR"; then
81ecdfbb
RW
5932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5933$as_echo "$ac_ct_AR" >&6; }
bec39cab 5934else
81ecdfbb
RW
5935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5936$as_echo "no" >&6; }
bec39cab
AC
5937fi
5938
81ecdfbb
RW
5939 if test "x$ac_ct_AR" = x; then
5940 AR=""
5941 else
5942 case $cross_compiling:$ac_tool_warned in
5943yes:)
5944{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5945$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5946ac_tool_warned=yes ;;
5947esac
5948 AR=$ac_ct_AR
5949 fi
bec39cab
AC
5950else
5951 AR="$ac_cv_prog_AR"
5952fi
5953
5954if test -n "$ac_tool_prefix"; then
5955 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
5956set dummy ${ac_tool_prefix}dlltool; ac_word=$2
81ecdfbb
RW
5957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5958$as_echo_n "checking for $ac_word... " >&6; }
5959if test "${ac_cv_prog_DLLTOOL+set}" = set; then :
5960 $as_echo_n "(cached) " >&6
bec39cab
AC
5961else
5962 if test -n "$DLLTOOL"; then
5963 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
5964else
5965as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5966for as_dir in $PATH
5967do
5968 IFS=$as_save_IFS
5969 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5970 for ac_exec_ext in '' $ac_executable_extensions; do
5971 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5972 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
81ecdfbb 5973 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
5974 break 2
5975 fi
5976done
81ecdfbb
RW
5977 done
5978IFS=$as_save_IFS
bec39cab
AC
5979
5980fi
5981fi
5982DLLTOOL=$ac_cv_prog_DLLTOOL
5983if test -n "$DLLTOOL"; then
81ecdfbb
RW
5984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
5985$as_echo "$DLLTOOL" >&6; }
bec39cab 5986else
81ecdfbb
RW
5987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5988$as_echo "no" >&6; }
bec39cab
AC
5989fi
5990
81ecdfbb 5991
bec39cab
AC
5992fi
5993if test -z "$ac_cv_prog_DLLTOOL"; then
5994 ac_ct_DLLTOOL=$DLLTOOL
5995 # Extract the first word of "dlltool", so it can be a program name with args.
5996set dummy dlltool; ac_word=$2
81ecdfbb
RW
5997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5998$as_echo_n "checking for $ac_word... " >&6; }
5999if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then :
6000 $as_echo_n "(cached) " >&6
bec39cab
AC
6001else
6002 if test -n "$ac_ct_DLLTOOL"; then
6003 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
6004else
6005as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6006for as_dir in $PATH
6007do
6008 IFS=$as_save_IFS
6009 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6010 for ac_exec_ext in '' $ac_executable_extensions; do
6011 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6012 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
81ecdfbb 6013 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6014 break 2
6015 fi
6016done
81ecdfbb
RW
6017 done
6018IFS=$as_save_IFS
bec39cab
AC
6019
6020fi
6021fi
6022ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
6023if test -n "$ac_ct_DLLTOOL"; then
81ecdfbb
RW
6024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
6025$as_echo "$ac_ct_DLLTOOL" >&6; }
bec39cab 6026else
81ecdfbb
RW
6027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6028$as_echo "no" >&6; }
bec39cab
AC
6029fi
6030
81ecdfbb
RW
6031 if test "x$ac_ct_DLLTOOL" = x; then
6032 DLLTOOL=""
6033 else
6034 case $cross_compiling:$ac_tool_warned in
6035yes:)
6036{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6037$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6038ac_tool_warned=yes ;;
6039esac
6040 DLLTOOL=$ac_ct_DLLTOOL
6041 fi
bec39cab
AC
6042else
6043 DLLTOOL="$ac_cv_prog_DLLTOOL"
6044fi
6045
6046if test -n "$ac_tool_prefix"; then
6047 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
6048set dummy ${ac_tool_prefix}windres; ac_word=$2
81ecdfbb
RW
6049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6050$as_echo_n "checking for $ac_word... " >&6; }
6051if test "${ac_cv_prog_WINDRES+set}" = set; then :
6052 $as_echo_n "(cached) " >&6
bec39cab
AC
6053else
6054 if test -n "$WINDRES"; then
6055 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
6056else
6057as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6058for as_dir in $PATH
6059do
6060 IFS=$as_save_IFS
6061 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6062 for ac_exec_ext in '' $ac_executable_extensions; do
6063 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6064 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
81ecdfbb 6065 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6066 break 2
6067 fi
6068done
81ecdfbb
RW
6069 done
6070IFS=$as_save_IFS
bec39cab
AC
6071
6072fi
6073fi
6074WINDRES=$ac_cv_prog_WINDRES
6075if test -n "$WINDRES"; then
81ecdfbb
RW
6076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
6077$as_echo "$WINDRES" >&6; }
bec39cab 6078else
81ecdfbb
RW
6079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6080$as_echo "no" >&6; }
bec39cab
AC
6081fi
6082
81ecdfbb 6083
bec39cab
AC
6084fi
6085if test -z "$ac_cv_prog_WINDRES"; then
6086 ac_ct_WINDRES=$WINDRES
6087 # Extract the first word of "windres", so it can be a program name with args.
6088set dummy windres; ac_word=$2
81ecdfbb
RW
6089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6090$as_echo_n "checking for $ac_word... " >&6; }
6091if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then :
6092 $as_echo_n "(cached) " >&6
bec39cab
AC
6093else
6094 if test -n "$ac_ct_WINDRES"; then
6095 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
6096else
6097as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6098for as_dir in $PATH
6099do
6100 IFS=$as_save_IFS
6101 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6102 for ac_exec_ext in '' $ac_executable_extensions; do
6103 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6104 ac_cv_prog_ac_ct_WINDRES="windres"
81ecdfbb 6105 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6106 break 2
6107 fi
6108done
81ecdfbb
RW
6109 done
6110IFS=$as_save_IFS
bec39cab
AC
6111
6112fi
6113fi
6114ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
6115if test -n "$ac_ct_WINDRES"; then
81ecdfbb
RW
6116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
6117$as_echo "$ac_ct_WINDRES" >&6; }
bec39cab 6118else
81ecdfbb
RW
6119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6120$as_echo "no" >&6; }
c906108c 6121fi
bec39cab 6122
81ecdfbb
RW
6123 if test "x$ac_ct_WINDRES" = x; then
6124 WINDRES=""
6125 else
6126 case $cross_compiling:$ac_tool_warned in
6127yes:)
6128{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6129$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6130ac_tool_warned=yes ;;
6131esac
6132 WINDRES=$ac_ct_WINDRES
6133 fi
c906108c 6134else
bec39cab 6135 WINDRES="$ac_cv_prog_WINDRES"
c906108c
SS
6136fi
6137
bec39cab
AC
6138
6139# Needed for GNU/Hurd.
6140if test -n "$ac_tool_prefix"; then
6141 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
6142set dummy ${ac_tool_prefix}mig; ac_word=$2
81ecdfbb
RW
6143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6144$as_echo_n "checking for $ac_word... " >&6; }
6145if test "${ac_cv_prog_MIG+set}" = set; then :
6146 $as_echo_n "(cached) " >&6
c906108c 6147else
bec39cab
AC
6148 if test -n "$MIG"; then
6149 ac_cv_prog_MIG="$MIG" # Let the user override the test.
6150else
6151as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6152for as_dir in $PATH
6153do
6154 IFS=$as_save_IFS
6155 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6156 for ac_exec_ext in '' $ac_executable_extensions; do
6157 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6158 ac_cv_prog_MIG="${ac_tool_prefix}mig"
81ecdfbb 6159 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6160 break 2
6161 fi
6162done
81ecdfbb
RW
6163 done
6164IFS=$as_save_IFS
bec39cab 6165
c906108c 6166fi
bec39cab
AC
6167fi
6168MIG=$ac_cv_prog_MIG
6169if test -n "$MIG"; then
81ecdfbb
RW
6170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
6171$as_echo "$MIG" >&6; }
c906108c 6172else
81ecdfbb
RW
6173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6174$as_echo "no" >&6; }
c906108c
SS
6175fi
6176
81ecdfbb 6177
bec39cab
AC
6178fi
6179if test -z "$ac_cv_prog_MIG"; then
6180 ac_ct_MIG=$MIG
6181 # Extract the first word of "mig", so it can be a program name with args.
6182set dummy mig; ac_word=$2
81ecdfbb
RW
6183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6184$as_echo_n "checking for $ac_word... " >&6; }
6185if test "${ac_cv_prog_ac_ct_MIG+set}" = set; then :
6186 $as_echo_n "(cached) " >&6
bec39cab
AC
6187else
6188 if test -n "$ac_ct_MIG"; then
6189 ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
6190else
6191as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6192for as_dir in $PATH
6193do
6194 IFS=$as_save_IFS
6195 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6196 for ac_exec_ext in '' $ac_executable_extensions; do
6197 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6198 ac_cv_prog_ac_ct_MIG="mig"
81ecdfbb 6199 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6200 break 2
6201 fi
6202done
81ecdfbb
RW
6203 done
6204IFS=$as_save_IFS
c906108c 6205
bec39cab
AC
6206fi
6207fi
6208ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
6209if test -n "$ac_ct_MIG"; then
81ecdfbb
RW
6210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
6211$as_echo "$ac_ct_MIG" >&6; }
bec39cab 6212else
81ecdfbb
RW
6213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6214$as_echo "no" >&6; }
bec39cab 6215fi
c906108c 6216
81ecdfbb
RW
6217 if test "x$ac_ct_MIG" = x; then
6218 MIG=""
6219 else
6220 case $cross_compiling:$ac_tool_warned in
6221yes:)
6222{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6223$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6224ac_tool_warned=yes ;;
6225esac
6226 MIG=$ac_ct_MIG
6227 fi
bec39cab
AC
6228else
6229 MIG="$ac_cv_prog_MIG"
6230fi
c906108c 6231
c906108c 6232
bec39cab
AC
6233# ---------------------- #
6234# Checks for libraries. #
6235# ---------------------- #
c906108c 6236
bec39cab 6237# We might need to link with -lm; most simulators need it.
81ecdfbb
RW
6238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
6239$as_echo_n "checking for main in -lm... " >&6; }
6240if test "${ac_cv_lib_m_main+set}" = set; then :
6241 $as_echo_n "(cached) " >&6
bec39cab
AC
6242else
6243 ac_check_lib_save_LIBS=$LIBS
6244LIBS="-lm $LIBS"
81ecdfbb 6245cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6246/* end confdefs.h. */
c906108c 6247
c906108c 6248
bec39cab
AC
6249int
6250main ()
6251{
81ecdfbb 6252return main ();
bec39cab
AC
6253 ;
6254 return 0;
6255}
6256_ACEOF
81ecdfbb 6257if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
6258 ac_cv_lib_m_main=yes
6259else
81ecdfbb 6260 ac_cv_lib_m_main=no
bec39cab 6261fi
81ecdfbb
RW
6262rm -f core conftest.err conftest.$ac_objext \
6263 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
6264LIBS=$ac_check_lib_save_LIBS
6265fi
81ecdfbb
RW
6266{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
6267$as_echo "$ac_cv_lib_m_main" >&6; }
6268if test "x$ac_cv_lib_m_main" = x""yes; then :
bec39cab
AC
6269 cat >>confdefs.h <<_ACEOF
6270#define HAVE_LIBM 1
6271_ACEOF
6272
6273 LIBS="-lm $LIBS"
c906108c 6274
c906108c 6275fi
bec39cab
AC
6276
6277
6278# We need to link with -lw to get `wctype' on Solaris before Solaris
6279# 2.6. Solaris 2.6 and beyond have this function in libc, and have a
6280# libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
6281# is known to have this problem). Therefore we avoid libw if we can.
81ecdfbb
RW
6282ac_fn_c_check_func "$LINENO" "wctype" "ac_cv_func_wctype"
6283if test "x$ac_cv_func_wctype" = x""yes; then :
bec39cab 6284
c906108c 6285else
81ecdfbb
RW
6286 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype in -lw" >&5
6287$as_echo_n "checking for wctype in -lw... " >&6; }
6288if test "${ac_cv_lib_w_wctype+set}" = set; then :
6289 $as_echo_n "(cached) " >&6
bec39cab
AC
6290else
6291 ac_check_lib_save_LIBS=$LIBS
6292LIBS="-lw $LIBS"
81ecdfbb 6293cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6294/* end confdefs.h. */
c906108c 6295
81ecdfbb
RW
6296/* Override any GCC internal prototype to avoid an error.
6297 Use char because int might match the return type of a GCC
6298 builtin and then its argument prototype would still apply. */
bec39cab
AC
6299#ifdef __cplusplus
6300extern "C"
6301#endif
bec39cab
AC
6302char wctype ();
6303int
6304main ()
6305{
81ecdfbb 6306return wctype ();
bec39cab
AC
6307 ;
6308 return 0;
6309}
6310_ACEOF
81ecdfbb 6311if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
6312 ac_cv_lib_w_wctype=yes
6313else
81ecdfbb 6314 ac_cv_lib_w_wctype=no
bec39cab 6315fi
81ecdfbb
RW
6316rm -f core conftest.err conftest.$ac_objext \
6317 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
6318LIBS=$ac_check_lib_save_LIBS
6319fi
81ecdfbb
RW
6320{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_w_wctype" >&5
6321$as_echo "$ac_cv_lib_w_wctype" >&6; }
6322if test "x$ac_cv_lib_w_wctype" = x""yes; then :
bec39cab
AC
6323 cat >>confdefs.h <<_ACEOF
6324#define HAVE_LIBW 1
6325_ACEOF
c906108c 6326
bec39cab 6327 LIBS="-lw $LIBS"
c906108c 6328
bec39cab 6329fi
c906108c 6330
bec39cab 6331fi
c906108c 6332
ddc9cd0f 6333
bec39cab 6334# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
81ecdfbb
RW
6335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
6336$as_echo_n "checking for library containing gethostbyname... " >&6; }
6337if test "${ac_cv_search_gethostbyname+set}" = set; then :
6338 $as_echo_n "(cached) " >&6
bec39cab
AC
6339else
6340 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6341cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6342/* end confdefs.h. */
ddc9cd0f 6343
81ecdfbb
RW
6344/* Override any GCC internal prototype to avoid an error.
6345 Use char because int might match the return type of a GCC
6346 builtin and then its argument prototype would still apply. */
bec39cab
AC
6347#ifdef __cplusplus
6348extern "C"
6349#endif
bec39cab
AC
6350char gethostbyname ();
6351int
6352main ()
6353{
81ecdfbb 6354return gethostbyname ();
bec39cab
AC
6355 ;
6356 return 0;
6357}
6358_ACEOF
81ecdfbb
RW
6359for ac_lib in '' nsl; do
6360 if test -z "$ac_lib"; then
6361 ac_res="none required"
6362 else
6363 ac_res=-l$ac_lib
b4e70030 6364 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
6365 fi
6366 if ac_fn_c_try_link "$LINENO"; then :
6367 ac_cv_search_gethostbyname=$ac_res
6368fi
6369rm -f core conftest.err conftest.$ac_objext \
6370 conftest$ac_exeext
6371 if test "${ac_cv_search_gethostbyname+set}" = set; then :
6372 break
6373fi
6374done
6375if test "${ac_cv_search_gethostbyname+set}" = set; then :
ddc9cd0f 6376
bec39cab 6377else
81ecdfbb 6378 ac_cv_search_gethostbyname=no
bec39cab 6379fi
81ecdfbb 6380rm conftest.$ac_ext
bec39cab
AC
6381LIBS=$ac_func_search_save_LIBS
6382fi
81ecdfbb
RW
6383{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
6384$as_echo "$ac_cv_search_gethostbyname" >&6; }
6385ac_res=$ac_cv_search_gethostbyname
6386if test "$ac_res" != no; then :
6387 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
96baa820 6388
bec39cab 6389fi
96baa820 6390
c906108c 6391
b4e70030 6392# Some systems (e.g. Solaris) have `socketpair' in libsocket.
81ecdfbb
RW
6393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
6394$as_echo_n "checking for library containing socketpair... " >&6; }
6395if test "${ac_cv_search_socketpair+set}" = set; then :
6396 $as_echo_n "(cached) " >&6
b4e70030
JB
6397else
6398 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6399cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
6400/* end confdefs.h. */
6401
81ecdfbb
RW
6402/* Override any GCC internal prototype to avoid an error.
6403 Use char because int might match the return type of a GCC
6404 builtin and then its argument prototype would still apply. */
b4e70030
JB
6405#ifdef __cplusplus
6406extern "C"
6407#endif
b4e70030
JB
6408char socketpair ();
6409int
6410main ()
6411{
81ecdfbb 6412return socketpair ();
b4e70030
JB
6413 ;
6414 return 0;
6415}
6416_ACEOF
81ecdfbb
RW
6417for ac_lib in '' socket; do
6418 if test -z "$ac_lib"; then
6419 ac_res="none required"
6420 else
6421 ac_res=-l$ac_lib
b4e70030 6422 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
6423 fi
6424 if ac_fn_c_try_link "$LINENO"; then :
6425 ac_cv_search_socketpair=$ac_res
6426fi
6427rm -f core conftest.err conftest.$ac_objext \
6428 conftest$ac_exeext
6429 if test "${ac_cv_search_socketpair+set}" = set; then :
6430 break
6431fi
6432done
6433if test "${ac_cv_search_socketpair+set}" = set; then :
b4e70030 6434
b4e70030 6435else
81ecdfbb 6436 ac_cv_search_socketpair=no
b4e70030 6437fi
81ecdfbb 6438rm conftest.$ac_ext
b4e70030
JB
6439LIBS=$ac_func_search_save_LIBS
6440fi
81ecdfbb
RW
6441{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
6442$as_echo "$ac_cv_search_socketpair" >&6; }
6443ac_res=$ac_cv_search_socketpair
6444if test "$ac_res" != no; then :
6445 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
b4e70030
JB
6446
6447fi
6448
6449
233a11ab 6450# Link in zlib if we can. This allows us to read compressed debug sections.
b040ad30
JB
6451
6452 # See if the user specified whether he wants zlib support or not.
6453
6454# Check whether --with-zlib was given.
6455if test "${with_zlib+set}" = set; then :
6456 withval=$with_zlib;
6457else
6458 with_zlib=auto
6459fi
6460
6461
6462 if test "$with_zlib" != "no"; then
6463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing zlibVersion" >&5
81ecdfbb
RW
6464$as_echo_n "checking for library containing zlibVersion... " >&6; }
6465if test "${ac_cv_search_zlibVersion+set}" = set; then :
6466 $as_echo_n "(cached) " >&6
233a11ab
CS
6467else
6468 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6469cat confdefs.h - <<_ACEOF >conftest.$ac_ext
233a11ab
CS
6470/* end confdefs.h. */
6471
81ecdfbb
RW
6472/* Override any GCC internal prototype to avoid an error.
6473 Use char because int might match the return type of a GCC
233a11ab 6474 builtin and then its argument prototype would still apply. */
233a11ab
CS
6475#ifdef __cplusplus
6476extern "C"
6477#endif
233a11ab
CS
6478char zlibVersion ();
6479int
6480main ()
6481{
81ecdfbb 6482return zlibVersion ();
233a11ab
CS
6483 ;
6484 return 0;
6485}
6486_ACEOF
81ecdfbb
RW
6487for ac_lib in '' z; do
6488 if test -z "$ac_lib"; then
6489 ac_res="none required"
233a11ab 6490 else
81ecdfbb
RW
6491 ac_res=-l$ac_lib
6492 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
233a11ab 6493 fi
81ecdfbb
RW
6494 if ac_fn_c_try_link "$LINENO"; then :
6495 ac_cv_search_zlibVersion=$ac_res
233a11ab 6496fi
81ecdfbb
RW
6497rm -f core conftest.err conftest.$ac_objext \
6498 conftest$ac_exeext
6499 if test "${ac_cv_search_zlibVersion+set}" = set; then :
6500 break
233a11ab 6501fi
81ecdfbb
RW
6502done
6503if test "${ac_cv_search_zlibVersion+set}" = set; then :
233a11ab 6504
233a11ab 6505else
81ecdfbb 6506 ac_cv_search_zlibVersion=no
233a11ab 6507fi
81ecdfbb
RW
6508rm conftest.$ac_ext
6509LIBS=$ac_func_search_save_LIBS
233a11ab 6510fi
81ecdfbb
RW
6511{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_zlibVersion" >&5
6512$as_echo "$ac_cv_search_zlibVersion" >&6; }
6513ac_res=$ac_cv_search_zlibVersion
6514if test "$ac_res" != no; then :
6515 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6516 for ac_header in zlib.h
6517do :
6518 ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
6519if test "x$ac_cv_header_zlib_h" = x""yes; then :
233a11ab 6520 cat >>confdefs.h <<_ACEOF
81ecdfbb 6521#define HAVE_ZLIB_H 1
233a11ab
CS
6522_ACEOF
6523
6524fi
6525
6526done
6527
6528fi
6529
b040ad30
JB
6530 if test "$with_zlib" = "yes" -a "$ac_cv_header_zlib_h" != "yes"; then
6531 as_fn_error "zlib (libz) library was explicitly requested but not found" "$LINENO" 5
6532 fi
6533 fi
6534
233a11ab 6535
77f120bf 6536# On HP/UX we may need libxpdl for dlgetmodinfo (used by solib-pa64.c).
81ecdfbb
RW
6537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlgetmodinfo" >&5
6538$as_echo_n "checking for library containing dlgetmodinfo... " >&6; }
6539if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
6540 $as_echo_n "(cached) " >&6
bec39cab
AC
6541else
6542 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6543cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6544/* end confdefs.h. */
c906108c 6545
81ecdfbb
RW
6546/* Override any GCC internal prototype to avoid an error.
6547 Use char because int might match the return type of a GCC
6548 builtin and then its argument prototype would still apply. */
bec39cab
AC
6549#ifdef __cplusplus
6550extern "C"
6551#endif
77f120bf 6552char dlgetmodinfo ();
bec39cab
AC
6553int
6554main ()
6555{
81ecdfbb 6556return dlgetmodinfo ();
bec39cab
AC
6557 ;
6558 return 0;
6559}
6560_ACEOF
81ecdfbb
RW
6561for ac_lib in '' dl xpdl; do
6562 if test -z "$ac_lib"; then
6563 ac_res="none required"
6564 else
6565 ac_res=-l$ac_lib
b4e70030 6566 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
6567 fi
6568 if ac_fn_c_try_link "$LINENO"; then :
6569 ac_cv_search_dlgetmodinfo=$ac_res
6570fi
6571rm -f core conftest.err conftest.$ac_objext \
6572 conftest$ac_exeext
6573 if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
6574 break
6575fi
6576done
6577if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
b4e70030 6578
4e8d927d 6579else
81ecdfbb 6580 ac_cv_search_dlgetmodinfo=no
1ba607ad 6581fi
81ecdfbb 6582rm conftest.$ac_ext
bec39cab
AC
6583LIBS=$ac_func_search_save_LIBS
6584fi
81ecdfbb
RW
6585{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlgetmodinfo" >&5
6586$as_echo "$ac_cv_search_dlgetmodinfo" >&6; }
6587ac_res=$ac_cv_search_dlgetmodinfo
6588if test "$ac_res" != no; then :
6589 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
c906108c 6590
8bb2c122 6591fi
8bb2c122 6592
8bb2c122 6593
77f120bf 6594
77f120bf 6595
6c7a06a3 6596
81ecdfbb
RW
6597# Check whether --with-libiconv-prefix was given.
6598if test "${with_libiconv_prefix+set}" = set; then :
6599 withval=$with_libiconv_prefix;
6c7a06a3 6600 for dir in `echo "$withval" | tr : ' '`; do
94ae1714
TT
6601 if test -d $dir/include; then LIBICONV_INCLUDE="-I$dir/include"; fi
6602 if test -d $dir/lib; then LIBICONV_LIBDIR="-L$dir/lib"; fi
6c7a06a3
TT
6603 done
6604
81ecdfbb
RW
6605fi
6606
6c7a06a3 6607
f18c4681 6608 BUILD_LIBICONV_LIBDIRS="../libiconv/lib/.libs ../libiconv/lib/_libs"
6c7a06a3
TT
6609 BUILD_LIBICONV_INCLUDE="-I../libiconv/include"
6610
81ecdfbb
RW
6611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
6612$as_echo_n "checking for iconv... " >&6; }
6613if test "${am_cv_func_iconv+set}" = set; then :
6614 $as_echo_n "(cached) " >&6
d542061a 6615else
6c7a06a3
TT
6616
6617 am_cv_func_iconv="no, consider installing GNU libiconv"
6618 am_cv_lib_iconv=no
6619 am_cv_use_build_libiconv=no
f0f20949 6620 am_cv_build_libiconv_path=
4edb1e84
JB
6621
6622 # If libiconv is part of the build tree, then try using it over
6623 # any system iconv.
6624 if test -d ../libiconv; then
f18c4681
JB
6625 for lib_dir in $BUILD_LIBICONV_LIBDIRS; do
6626 am_save_LIBS="$LIBS"
6627 am_save_CPPFLAGS="$CPPFLAGS"
6628 LIBS="$LIBS $lib_dir/libiconv.a"
6629 CPPFLAGS="$CPPFLAGS $BUILD_LIBICONV_INCLUDE"
6630 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 6631/* end confdefs.h. */
6c7a06a3
TT
6632#include <stdlib.h>
6633#include <iconv.h>
d542061a
UW
6634int
6635main ()
6636{
6c7a06a3 6637iconv_t cd = iconv_open("","");
f18c4681
JB
6638 iconv(cd,NULL,NULL,NULL,NULL);
6639 iconv_close(cd);
d542061a
UW
6640 ;
6641 return 0;
6642}
6643_ACEOF
81ecdfbb 6644if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 6645 am_cv_use_build_libiconv=yes
f0f20949 6646 am_cv_build_libiconv_path=$lib_dir/libiconv.a
f18c4681
JB
6647 am_cv_lib_iconv=yes
6648 am_cv_func_iconv=yes
d542061a 6649fi
81ecdfbb
RW
6650rm -f core conftest.err conftest.$ac_objext \
6651 conftest$ac_exeext conftest.$ac_ext
f18c4681
JB
6652 LIBS="$am_save_LIBS"
6653 CPPFLAGS="$am_save_CPPFLAGS"
6654 if test "$am_cv_use_build_libiconv" = "yes"; then
f18c4681
JB
6655 break
6656 fi
6657 done
4edb1e84 6658 fi
94ae1714 6659
4edb1e84 6660 # Next, try to find iconv in libc.
6c7a06a3 6661 if test "$am_cv_func_iconv" != yes; then
81ecdfbb 6662 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 6663/* end confdefs.h. */
6c7a06a3
TT
6664#include <stdlib.h>
6665#include <iconv.h>
d542061a
UW
6666int
6667main ()
6668{
6c7a06a3
TT
6669iconv_t cd = iconv_open("","");
6670 iconv(cd,NULL,NULL,NULL,NULL);
6671 iconv_close(cd);
d542061a
UW
6672 ;
6673 return 0;
6674}
6675_ACEOF
81ecdfbb 6676if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 6677 am_cv_func_iconv=yes
d542061a 6678fi
81ecdfbb
RW
6679rm -f core conftest.err conftest.$ac_objext \
6680 conftest$ac_exeext conftest.$ac_ext
77f120bf 6681 fi
94ae1714 6682
4edb1e84
JB
6683 # If iconv was not in libc, try -liconv. In this case, arrange to
6684 # look in the libiconv prefix, if it was specified by the user.
6685 if test "$am_cv_func_iconv" != yes; then
6c7a06a3 6686 am_save_CPPFLAGS="$CPPFLAGS"
4edb1e84
JB
6687 am_save_LIBS="$LIBS"
6688 if test -n "$LIBICONV_INCLUDE"; then
6689 CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE"
6690 LIBS="$LIBS $LIBICONV_LIBDIR"
6691 fi
6692 LIBS="$LIBS -liconv"
81ecdfbb 6693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6694/* end confdefs.h. */
6c7a06a3
TT
6695#include <stdlib.h>
6696#include <iconv.h>
bec39cab
AC
6697int
6698main ()
6699{
6c7a06a3
TT
6700iconv_t cd = iconv_open("","");
6701 iconv(cd,NULL,NULL,NULL,NULL);
6702 iconv_close(cd);
bec39cab
AC
6703 ;
6704 return 0;
6705}
6706_ACEOF
81ecdfbb 6707if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 6708 am_cv_lib_iconv=yes
6c7a06a3 6709 am_cv_func_iconv=yes
627af7ea 6710fi
81ecdfbb
RW
6711rm -f core conftest.err conftest.$ac_objext \
6712 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 6713 LIBS="$am_save_LIBS"
fc3b640d 6714 CPPFLAGS="$am_save_CPPFLAGS"
6c7a06a3
TT
6715 fi
6716
6717fi
81ecdfbb
RW
6718{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
6719$as_echo "$am_cv_func_iconv" >&6; }
94ae1714
TT
6720
6721 # Set the various flags based on the cache variables. We can't rely
6722 # on the flags to remain set from the above code, due to caching.
fc3b640d
TT
6723 LIBICONV=
6724 if test "$am_cv_lib_iconv" = yes; then
6725 LIBICONV="-liconv"
94ae1714
TT
6726 else
6727 LIBICONV_LIBDIR=
6728 LIBICONV_INCLUDE=
fc3b640d
TT
6729 fi
6730 if test "$am_cv_use_build_libiconv" = yes; then
f0f20949 6731 LIBICONV="$am_cv_build_libiconv_path"
f18c4681 6732 LIBICONV_LIBDIR=""
fc3b640d
TT
6733 LIBICONV_INCLUDE="$BUILD_LIBICONV_INCLUDE"
6734 fi
6735 CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE"
6736 LIBS="$LIBS $LIBICONV_LIBDIR $LIBICONV"
94ae1714 6737
6c7a06a3
TT
6738 if test "$am_cv_func_iconv" = yes; then
6739
81ecdfbb 6740$as_echo "#define HAVE_ICONV 1" >>confdefs.h
6c7a06a3 6741
81ecdfbb
RW
6742 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
6743$as_echo_n "checking for iconv declaration... " >&6; }
6744 if test "${am_cv_proto_iconv+set}" = set; then :
6745 $as_echo_n "(cached) " >&6
6c7a06a3
TT
6746else
6747
81ecdfbb 6748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
6749/* end confdefs.h. */
6750
6c7a06a3
TT
6751#include <stdlib.h>
6752#include <iconv.h>
6753extern
b4e70030 6754#ifdef __cplusplus
6c7a06a3 6755"C"
b4e70030 6756#endif
6c7a06a3
TT
6757#if defined(__STDC__) || defined(__cplusplus)
6758size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
6759#else
6760size_t iconv();
6761#endif
6762
b4e70030
JB
6763int
6764main ()
6765{
6c7a06a3 6766
b4e70030
JB
6767 ;
6768 return 0;
6769}
6770_ACEOF
81ecdfbb 6771if ac_fn_c_try_compile "$LINENO"; then :
6c7a06a3 6772 am_cv_proto_iconv_arg1=""
4e8d927d 6773else
81ecdfbb 6774 am_cv_proto_iconv_arg1="const"
b4e70030 6775fi
81ecdfbb 6776rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6c7a06a3
TT
6777 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);"
6778fi
6779
6780 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
81ecdfbb 6781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
6c7a06a3 6782 }$am_cv_proto_iconv" >&5
81ecdfbb
RW
6783$as_echo "${ac_t:-
6784 }$am_cv_proto_iconv" >&6; }
6c7a06a3
TT
6785
6786cat >>confdefs.h <<_ACEOF
6787#define ICONV_CONST $am_cv_proto_iconv_arg1
6788_ACEOF
6789
6790 fi
6c7a06a3
TT
6791
6792
478aac75
DE
6793# GDB may fork/exec the iconv program to get the list of supported character
6794# sets. Allow the user to specify where to find it.
6795# There are several factors affecting the choice of option name:
6796# - There is already --with-libiconv-prefix but we can't use it, it specifies
6797# the build-time location of libiconv files.
6798# - The program we need to find is iconv, which comes with glibc. The user
6799# doesn't necessarily have libiconv installed. Therefore naming this
6800# --with-libiconv-foo feels wrong.
6801# - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is
6802# defined to work on directories not files (though it really doesn't know
6803# the difference).
6804# - Calling this --with-iconv-prefix is perceived to cause too much confusion
6805# with --with-libiconv-prefix.
6806# Putting these together is why the option name is --with-iconv-bin.
6807
6808
6809# Check whether --with-iconv-bin was given.
6810if test "${with_iconv_bin+set}" = set; then :
6811 withval=$with_iconv_bin; iconv_bin="${withval}"
6812
6813cat >>confdefs.h <<_ACEOF
6814#define ICONV_BIN "${iconv_bin}"
6815_ACEOF
6816
6817
6818 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6819 if test "x$prefix" = xNONE; then
6820 test_prefix=/usr/local
6821 else
6822 test_prefix=$prefix
6823 fi
6824 else
6825 test_prefix=$exec_prefix
6826 fi
6827 value=0
6828 case ${iconv_bin} in
6829 "${test_prefix}"|"${test_prefix}/"*|\
6830 '${exec_prefix}'|'${exec_prefix}/'*)
6831 value=1
6832 ;;
6833 esac
6834
6835cat >>confdefs.h <<_ACEOF
6836#define ICONV_BIN_RELOCATABLE $value
6837_ACEOF
6838
6839
6840
6841fi
6842
6843
6c7a06a3
TT
6844# On alpha-osf, it appears that libtermcap and libcurses are not compatible.
6845# There is a very specific comment in /usr/include/curses.h explaining that
6846# termcap routines built into libcurses must not be used.
6847#
6848# The symptoms we observed so far is GDB unexpectedly changing
6849# the terminal settings when tgetent is called - this is particularly
6850# visible as the output is missing carriage returns, and so rapidly
6851# becomes very hard to read.
6852#
6853# The readline configure script has already decided that libtermcap
6854# was enough for its purposes, and so decided to build readline using
6855# libtermcap. Since the TUI mode requires curses, building GDB with
6856# TUI enabled results in both libraries to be used at the same time,
6857# which is not allowed. This basically means that GDB with TUI is
6858# broken on alpha-osf.
6859
6860case $host_os in
6bcc772d
RO
6861 osf* )
6862 if test x"$enable_tui" = xyes; then
81ecdfbb 6863 as_fn_error "Building GDB with TUI mode is not supported on this host" "$LINENO" 5
6c7a06a3 6864 fi
6bcc772d 6865 if test x"$enable_tui" = xauto; then
6c7a06a3
TT
6866 enable_tui=no
6867 fi
6868 ;;
6869esac
6870
cb01cfba 6871# For the TUI, we need enhanced curses functionality.
bd8a8e1b 6872if test x"$enable_tui" != xno; then
cb01cfba
JB
6873 prefer_curses=yes
6874fi
6875
6876curses_found=no
6877if test x"$prefer_curses" = xyes; then
6878 # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
6879 # curses library because the latter might not provide all the
6880 # functionality we need. However, this leads to problems on systems
6881 # where the linker searches /usr/local/lib, but the compiler doesn't
6882 # search /usr/local/include, if ncurses is installed in /usr/local. A
6883 # default installation of ncurses on alpha*-dec-osf* will lead to such
6884 # a situation.
81ecdfbb
RW
6885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
6886$as_echo_n "checking for library containing waddstr... " >&6; }
6887if test "${ac_cv_search_waddstr+set}" = set; then :
6888 $as_echo_n "(cached) " >&6
6c7a06a3
TT
6889else
6890 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6891cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
6892/* end confdefs.h. */
6893
81ecdfbb
RW
6894/* Override any GCC internal prototype to avoid an error.
6895 Use char because int might match the return type of a GCC
6896 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
6897#ifdef __cplusplus
6898extern "C"
6899#endif
6c7a06a3
TT
6900char waddstr ();
6901int
6902main ()
6903{
81ecdfbb 6904return waddstr ();
6c7a06a3
TT
6905 ;
6906 return 0;
6907}
6908_ACEOF
81ecdfbb
RW
6909for ac_lib in '' ncurses cursesX curses; do
6910 if test -z "$ac_lib"; then
6911 ac_res="none required"
6912 else
6913 ac_res=-l$ac_lib
6914 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
6915 fi
6916 if ac_fn_c_try_link "$LINENO"; then :
6917 ac_cv_search_waddstr=$ac_res
6918fi
6919rm -f core conftest.err conftest.$ac_objext \
6920 conftest$ac_exeext
6921 if test "${ac_cv_search_waddstr+set}" = set; then :
6922 break
6923fi
6924done
6925if test "${ac_cv_search_waddstr+set}" = set; then :
6926
6c7a06a3 6927else
81ecdfbb
RW
6928 ac_cv_search_waddstr=no
6929fi
6930rm conftest.$ac_ext
6931LIBS=$ac_func_search_save_LIBS
6932fi
6933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
6934$as_echo "$ac_cv_search_waddstr" >&6; }
6935ac_res=$ac_cv_search_waddstr
6936if test "$ac_res" != no; then :
6937 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3
TT
6938
6939fi
6940
6941
cb01cfba
JB
6942 if test "$ac_cv_search_waddstr" != no; then
6943 curses_found=yes
6944 fi
6945fi
6946
6947# Check whether we should enable the TUI, but only do so if we really
6948# can.
6949if test x"$enable_tui" != xno; then
6950 if test -d $srcdir/tui; then
6951 if test "$curses_found" != no; then
6c7a06a3
TT
6952 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
6953 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
6954 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
6955 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
6c7a06a3
TT
6956 else
6957 if test x"$enable_tui" = xyes; then
81ecdfbb 6958 as_fn_error "no enhanced curses library found; disable TUI" "$LINENO" 5
6c7a06a3 6959 else
81ecdfbb
RW
6960 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
6961$as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
6c7a06a3
TT
6962 fi
6963 fi
6964 fi
6965fi
6966
6967# Since GDB uses Readline, we need termcap functionality. In many
6968# cases this will be provided by the curses library, but some systems
6969# have a seperate termcap library, or no curses library at all.
6970
6971case $host_os in
6972 cygwin*)
6973 if test -d $srcdir/libtermcap; then
6974 LIBS="../libtermcap/libtermcap.a $LIBS"
6975 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
6976 fi ;;
6977 go32* | *djgpp*)
6978 ac_cv_search_tgetent="none required"
6979 ;;
6980 *mingw32*)
6981 ac_cv_search_tgetent="none required"
6982 CONFIG_OBS="$CONFIG_OBS windows-termcap.o"
6983 ;;
6984esac
6985
6986# These are the libraries checked by Readline.
81ecdfbb
RW
6987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
6988$as_echo_n "checking for library containing tgetent... " >&6; }
6989if test "${ac_cv_search_tgetent+set}" = set; then :
6990 $as_echo_n "(cached) " >&6
6c7a06a3
TT
6991else
6992 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6993cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
6994/* end confdefs.h. */
6995
81ecdfbb
RW
6996/* Override any GCC internal prototype to avoid an error.
6997 Use char because int might match the return type of a GCC
6998 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
6999#ifdef __cplusplus
7000extern "C"
7001#endif
6c7a06a3
TT
7002char tgetent ();
7003int
7004main ()
7005{
81ecdfbb 7006return tgetent ();
6c7a06a3
TT
7007 ;
7008 return 0;
7009}
7010_ACEOF
81ecdfbb
RW
7011for ac_lib in '' termcap tinfo curses ncurses; do
7012 if test -z "$ac_lib"; then
7013 ac_res="none required"
7014 else
7015 ac_res=-l$ac_lib
6c7a06a3 7016 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
7017 fi
7018 if ac_fn_c_try_link "$LINENO"; then :
7019 ac_cv_search_tgetent=$ac_res
7020fi
7021rm -f core conftest.err conftest.$ac_objext \
7022 conftest$ac_exeext
7023 if test "${ac_cv_search_tgetent+set}" = set; then :
7024 break
7025fi
7026done
7027if test "${ac_cv_search_tgetent+set}" = set; then :
6c7a06a3 7028
6c7a06a3 7029else
81ecdfbb 7030 ac_cv_search_tgetent=no
6c7a06a3 7031fi
81ecdfbb 7032rm conftest.$ac_ext
6c7a06a3
TT
7033LIBS=$ac_func_search_save_LIBS
7034fi
81ecdfbb
RW
7035{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
7036$as_echo "$ac_cv_search_tgetent" >&6; }
7037ac_res=$ac_cv_search_tgetent
7038if test "$ac_res" != no; then :
7039 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3 7040
06825bd1
MK
7041fi
7042
06825bd1 7043
bec39cab 7044if test "$ac_cv_search_tgetent" = no; then
81ecdfbb 7045 as_fn_error "no termcap library found" "$LINENO" 5
8ee53726
MK
7046fi
7047
3841debe 7048
81ecdfbb
RW
7049# Check whether --with-system-readline was given.
7050if test "${with_system_readline+set}" = set; then :
7051 withval=$with_system_readline;
7052fi
6a30b0a5 7053
6a30b0a5
AS
7054
7055if test "$with_system_readline" = yes; then
7056 READLINE=-lreadline
7057 READLINE_DEPS=
7058 READLINE_CFLAGS=
39037522 7059 READLINE_TEXI_INCFLAG=
6a30b0a5
AS
7060else
7061 READLINE='$(READLINE_DIR)/libreadline.a'
7062 READLINE_DEPS='$(READLINE)'
7063 READLINE_CFLAGS='-I$(READLINE_SRC)/..'
39037522 7064 READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
6a30b0a5
AS
7065fi
7066
7067
7068
7069
7070
f997c383
SD
7071# Generate jit-reader.h
7072
7073# This is typedeffed to GDB_CORE_ADDR in jit-reader.h
7074TARGET_PTR=
7075
7076# The cast to long int works around a bug in the HP C Compiler
7077# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7078# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7079# This bug is HP SR number 8606223364.
7080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5
7081$as_echo_n "checking size of unsigned long long... " >&6; }
7082if test "${ac_cv_sizeof_unsigned_long_long+set}" = set; then :
7083 $as_echo_n "(cached) " >&6
7084else
7085 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then :
7086
7087else
7088 if test "$ac_cv_type_unsigned_long_long" = yes; then
7089 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7090$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7091{ as_fn_set_status 77
7092as_fn_error "cannot compute sizeof (unsigned long long)
7093See \`config.log' for more details." "$LINENO" 5; }; }
7094 else
7095 ac_cv_sizeof_unsigned_long_long=0
7096 fi
7097fi
7098
7099fi
7100{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5
7101$as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; }
7102
7103
7104
7105cat >>confdefs.h <<_ACEOF
7106#define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
7107_ACEOF
7108
7109
7110# The cast to long int works around a bug in the HP C Compiler
7111# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7112# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7113# This bug is HP SR number 8606223364.
7114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
7115$as_echo_n "checking size of unsigned long... " >&6; }
7116if test "${ac_cv_sizeof_unsigned_long+set}" = set; then :
7117 $as_echo_n "(cached) " >&6
7118else
7119 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then :
7120
7121else
7122 if test "$ac_cv_type_unsigned_long" = yes; then
7123 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7124$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7125{ as_fn_set_status 77
7126as_fn_error "cannot compute sizeof (unsigned long)
7127See \`config.log' for more details." "$LINENO" 5; }; }
7128 else
7129 ac_cv_sizeof_unsigned_long=0
7130 fi
7131fi
7132
7133fi
7134{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
7135$as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
7136
7137
7138
7139cat >>confdefs.h <<_ACEOF
7140#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
7141_ACEOF
7142
7143
7144# The cast to long int works around a bug in the HP C Compiler
7145# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7146# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7147# This bug is HP SR number 8606223364.
7148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5
7149$as_echo_n "checking size of unsigned __int128... " >&6; }
7150if test "${ac_cv_sizeof_unsigned___int128+set}" = set; then :
7151 $as_echo_n "(cached) " >&6
7152else
7153 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then :
7154
7155else
7156 if test "$ac_cv_type_unsigned___int128" = yes; then
7157 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7158$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7159{ as_fn_set_status 77
7160as_fn_error "cannot compute sizeof (unsigned __int128)
7161See \`config.log' for more details." "$LINENO" 5; }; }
7162 else
7163 ac_cv_sizeof_unsigned___int128=0
7164 fi
7165fi
7166
7167fi
7168{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5
7169$as_echo "$ac_cv_sizeof_unsigned___int128" >&6; }
7170
7171
7172
7173cat >>confdefs.h <<_ACEOF
7174#define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128
7175_ACEOF
7176
7177
7178
7179if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
7180 TARGET_PTR="unsigned long"
7181elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
7182 TARGET_PTR="unsigned long long"
7183elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
7184 TARGET_PTR="unsigned __int128"
7185else
7186 TARGET_PTR="unsigned long"
7187fi
7188
7189
7190ac_config_files="$ac_config_files jit-reader.h:jit-reader.in"
7191
7192
a2d08b9e
SD
7193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
7194$as_echo_n "checking for library containing dlopen... " >&6; }
7195if test "${ac_cv_search_dlopen+set}" = set; then :
7196 $as_echo_n "(cached) " >&6
7197else
7198 ac_func_search_save_LIBS=$LIBS
7199cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7200/* end confdefs.h. */
7201
7202/* Override any GCC internal prototype to avoid an error.
7203 Use char because int might match the return type of a GCC
7204 builtin and then its argument prototype would still apply. */
7205#ifdef __cplusplus
7206extern "C"
7207#endif
7208char dlopen ();
7209int
7210main ()
7211{
7212return dlopen ();
7213 ;
7214 return 0;
7215}
7216_ACEOF
7217for ac_lib in '' dl; do
7218 if test -z "$ac_lib"; then
7219 ac_res="none required"
7220 else
7221 ac_res=-l$ac_lib
7222 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7223 fi
7224 if ac_fn_c_try_link "$LINENO"; then :
7225 ac_cv_search_dlopen=$ac_res
7226fi
7227rm -f core conftest.err conftest.$ac_objext \
7228 conftest$ac_exeext
7229 if test "${ac_cv_search_dlopen+set}" = set; then :
7230 break
7231fi
7232done
7233if test "${ac_cv_search_dlopen+set}" = set; then :
7234
7235else
7236 ac_cv_search_dlopen=no
7237fi
7238rm conftest.$ac_ext
7239LIBS=$ac_func_search_save_LIBS
7240fi
7241{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
7242$as_echo "$ac_cv_search_dlopen" >&6; }
7243ac_res=$ac_cv_search_dlopen
7244if test "$ac_res" != no; then :
7245 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7246
7247fi
7248
7249
39037522 7250
b8e0a31c
SD
7251
7252# Check whether --with-jit-reader-dir was given.
7253if test "${with_jit_reader_dir+set}" = set; then :
7254 withval=$with_jit_reader_dir;
7255 JIT_READER_DIR=$withval
7256else
7257 JIT_READER_DIR=${libdir}/gdb
7258fi
7259
7260
7261 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
7262 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7263 ac_define_dir=`eval echo $JIT_READER_DIR`
7264 ac_define_dir=`eval echo $ac_define_dir`
7265
7266cat >>confdefs.h <<_ACEOF
7267#define JIT_READER_DIR "$ac_define_dir"
7268_ACEOF
7269
7270
7271
7272
7273 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
7274 if test "x$prefix" = xNONE; then
7275 test_prefix=/usr/local
7276 else
7277 test_prefix=$prefix
7278 fi
7279 else
7280 test_prefix=$exec_prefix
7281 fi
7282 value=0
7283 case ${ac_define_dir} in
7284 "${test_prefix}"|"${test_prefix}/"*|\
7285 '${exec_prefix}'|'${exec_prefix}/'*)
7286 value=1
7287 ;;
7288 esac
7289
7290cat >>confdefs.h <<_ACEOF
7291#define JIT_READER_DIR_RELOCATABLE $value
7292_ACEOF
7293
7294
7295
7296
7297
81ecdfbb
RW
7298# Check whether --with-expat was given.
7299if test "${with_expat+set}" = set; then :
7300 withval=$with_expat;
5c39566f
DJ
7301else
7302 with_expat=auto
81ecdfbb
RW
7303fi
7304
7305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
7306$as_echo_n "checking whether to use expat... " >&6; }
7307{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
7308$as_echo "$with_expat" >&6; }
5c39566f
DJ
7309
7310if test "${with_expat}" = no; then
81ecdfbb
RW
7311 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
7312$as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
5c39566f
DJ
7313 HAVE_LIBEXPAT=no
7314else
7315
3841debe
DJ
7316 if test "X$prefix" = "XNONE"; then
7317 acl_final_prefix="$ac_default_prefix"
7318 else
7319 acl_final_prefix="$prefix"
7320 fi
7321 if test "X$exec_prefix" = "XNONE"; then
7322 acl_final_exec_prefix='${prefix}'
7323 else
7324 acl_final_exec_prefix="$exec_prefix"
7325 fi
7326 acl_save_prefix="$prefix"
7327 prefix="$acl_final_prefix"
7328 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
7329 prefix="$acl_save_prefix"
7330
7331
81ecdfbb
RW
7332# Check whether --with-gnu-ld was given.
7333if test "${with_gnu_ld+set}" = set; then :
7334 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
3841debe
DJ
7335else
7336 with_gnu_ld=no
81ecdfbb
RW
7337fi
7338
3841debe
DJ
7339# Prepare PATH_SEPARATOR.
7340# The user is always right.
7341if test "${PATH_SEPARATOR+set}" != set; then
7342 echo "#! /bin/sh" >conf$$.sh
7343 echo "exit 0" >>conf$$.sh
7344 chmod +x conf$$.sh
7345 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
7346 PATH_SEPARATOR=';'
7347 else
7348 PATH_SEPARATOR=:
7349 fi
7350 rm -f conf$$.sh
7351fi
7352ac_prog=ld
7353if test "$GCC" = yes; then
7354 # Check if gcc -print-prog-name=ld gives a path.
81ecdfbb
RW
7355 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
7356$as_echo_n "checking for ld used by GCC... " >&6; }
3841debe
DJ
7357 case $host in
7358 *-*-mingw*)
7359 # gcc leaves a trailing carriage return which upsets mingw
7360 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
7361 *)
7362 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
7363 esac
7364 case $ac_prog in
7365 # Accept absolute paths.
7366 [\\/]* | [A-Za-z]:[\\/]*)
7367 re_direlt='/[^/][^/]*/\.\./'
7368 # Canonicalize the path of ld
7369 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
7370 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
7371 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
7372 done
7373 test -z "$LD" && LD="$ac_prog"
7374 ;;
7375 "")
7376 # If it fails, then pretend we aren't using GCC.
7377 ac_prog=ld
7378 ;;
7379 *)
7380 # If it is relative, then search for the first ld in PATH.
7381 with_gnu_ld=unknown
7382 ;;
7383 esac
7384elif test "$with_gnu_ld" = yes; then
81ecdfbb
RW
7385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
7386$as_echo_n "checking for GNU ld... " >&6; }
3841debe 7387else
81ecdfbb
RW
7388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
7389$as_echo_n "checking for non-GNU ld... " >&6; }
3841debe 7390fi
81ecdfbb
RW
7391if test "${acl_cv_path_LD+set}" = set; then :
7392 $as_echo_n "(cached) " >&6
3841debe
DJ
7393else
7394 if test -z "$LD"; then
7395 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
7396 for ac_dir in $PATH; do
7397 test -z "$ac_dir" && ac_dir=.
7398 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
7399 acl_cv_path_LD="$ac_dir/$ac_prog"
7400 # Check to see if the program is GNU ld. I'd rather use --version,
7401 # but apparently some GNU ld's only accept -v.
7402 # Break only if it was the GNU/non-GNU ld that we prefer.
7403 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
7404 test "$with_gnu_ld" != no && break
7405 else
7406 test "$with_gnu_ld" != yes && break
7407 fi
7408 fi
7409 done
7410 IFS="$ac_save_ifs"
7411else
7412 acl_cv_path_LD="$LD" # Let the user override the test with a path.
7413fi
7414fi
7415
7416LD="$acl_cv_path_LD"
7417if test -n "$LD"; then
81ecdfbb
RW
7418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
7419$as_echo "$LD" >&6; }
3841debe 7420else
81ecdfbb
RW
7421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7422$as_echo "no" >&6; }
3841debe 7423fi
81ecdfbb
RW
7424test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
7425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
7426$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
7427if test "${acl_cv_prog_gnu_ld+set}" = set; then :
7428 $as_echo_n "(cached) " >&6
3841debe
DJ
7429else
7430 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
7431if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
7432 acl_cv_prog_gnu_ld=yes
7433else
7434 acl_cv_prog_gnu_ld=no
7435fi
7436fi
81ecdfbb
RW
7437{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
7438$as_echo "$acl_cv_prog_gnu_ld" >&6; }
3841debe
DJ
7439with_gnu_ld=$acl_cv_prog_gnu_ld
7440
7441
7442
81ecdfbb
RW
7443 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
7444$as_echo_n "checking for shared library run path origin... " >&6; }
7445if test "${acl_cv_rpath+set}" = set; then :
7446 $as_echo_n "(cached) " >&6
3841debe
DJ
7447else
7448
7449 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
7450 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
7451 . ./conftest.sh
7452 rm -f ./conftest.sh
7453 acl_cv_rpath=done
7454
7455fi
81ecdfbb
RW
7456{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
7457$as_echo "$acl_cv_rpath" >&6; }
3841debe
DJ
7458 wl="$acl_cv_wl"
7459 libext="$acl_cv_libext"
7460 shlibext="$acl_cv_shlibext"
7461 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
7462 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
7463 hardcode_direct="$acl_cv_hardcode_direct"
7464 hardcode_minus_L="$acl_cv_hardcode_minus_L"
81ecdfbb
RW
7465 # Check whether --enable-rpath was given.
7466if test "${enable_rpath+set}" = set; then :
7467 enableval=$enable_rpath; :
3841debe
DJ
7468else
7469 enable_rpath=yes
81ecdfbb
RW
7470fi
7471
3841debe
DJ
7472
7473
7474
7475
7476
7477
7478
7479
7480
7481 use_additional=yes
7482
7483 acl_save_prefix="$prefix"
7484 prefix="$acl_final_prefix"
7485 acl_save_exec_prefix="$exec_prefix"
7486 exec_prefix="$acl_final_exec_prefix"
7487
7488 eval additional_includedir=\"$includedir\"
7489 eval additional_libdir=\"$libdir\"
7490
7491 exec_prefix="$acl_save_exec_prefix"
7492 prefix="$acl_save_prefix"
7493
7494
81ecdfbb
RW
7495# Check whether --with-libexpat-prefix was given.
7496if test "${with_libexpat_prefix+set}" = set; then :
7497 withval=$with_libexpat_prefix;
3841debe
DJ
7498 if test "X$withval" = "Xno"; then
7499 use_additional=no
7500 else
7501 if test "X$withval" = "X"; then
7502
7503 acl_save_prefix="$prefix"
7504 prefix="$acl_final_prefix"
7505 acl_save_exec_prefix="$exec_prefix"
7506 exec_prefix="$acl_final_exec_prefix"
7507
7508 eval additional_includedir=\"$includedir\"
7509 eval additional_libdir=\"$libdir\"
7510
7511 exec_prefix="$acl_save_exec_prefix"
7512 prefix="$acl_save_prefix"
7513
7514 else
7515 additional_includedir="$withval/include"
7516 additional_libdir="$withval/lib"
7517 fi
7518 fi
7519
81ecdfbb
RW
7520fi
7521
3841debe
DJ
7522 LIBEXPAT=
7523 LTLIBEXPAT=
7524 INCEXPAT=
7525 rpathdirs=
7526 ltrpathdirs=
7527 names_already_handled=
7528 names_next_round='expat '
7529 while test -n "$names_next_round"; do
7530 names_this_round="$names_next_round"
7531 names_next_round=
7532 for name in $names_this_round; do
7533 already_handled=
7534 for n in $names_already_handled; do
7535 if test "$n" = "$name"; then
7536 already_handled=yes
7537 break
7538 fi
7539 done
7540 if test -z "$already_handled"; then
7541 names_already_handled="$names_already_handled $name"
7542 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
7543 eval value=\"\$HAVE_LIB$uppername\"
7544 if test -n "$value"; then
7545 if test "$value" = yes; then
7546 eval value=\"\$LIB$uppername\"
7547 test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
7548 eval value=\"\$LTLIB$uppername\"
7549 test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
7550 else
7551 :
7552 fi
7553 else
7554 found_dir=
7555 found_la=
7556 found_so=
7557 found_a=
7558 if test $use_additional = yes; then
7559 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
7560 found_dir="$additional_libdir"
7561 found_so="$additional_libdir/lib$name.$shlibext"
7562 if test -f "$additional_libdir/lib$name.la"; then
7563 found_la="$additional_libdir/lib$name.la"
7564 fi
7565 else
7566 if test -f "$additional_libdir/lib$name.$libext"; then
7567 found_dir="$additional_libdir"
7568 found_a="$additional_libdir/lib$name.$libext"
7569 if test -f "$additional_libdir/lib$name.la"; then
7570 found_la="$additional_libdir/lib$name.la"
7571 fi
7572 fi
7573 fi
7574 fi
7575 if test "X$found_dir" = "X"; then
7576 for x in $LDFLAGS $LTLIBEXPAT; do
7577
7578 acl_save_prefix="$prefix"
7579 prefix="$acl_final_prefix"
7580 acl_save_exec_prefix="$exec_prefix"
7581 exec_prefix="$acl_final_exec_prefix"
7582 eval x=\"$x\"
7583 exec_prefix="$acl_save_exec_prefix"
7584 prefix="$acl_save_prefix"
7585
7586 case "$x" in
7587 -L*)
7588 dir=`echo "X$x" | sed -e 's/^X-L//'`
7589 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
7590 found_dir="$dir"
7591 found_so="$dir/lib$name.$shlibext"
7592 if test -f "$dir/lib$name.la"; then
7593 found_la="$dir/lib$name.la"
7594 fi
7595 else
7596 if test -f "$dir/lib$name.$libext"; then
7597 found_dir="$dir"
7598 found_a="$dir/lib$name.$libext"
7599 if test -f "$dir/lib$name.la"; then
7600 found_la="$dir/lib$name.la"
7601 fi
7602 fi
7603 fi
7604 ;;
7605 esac
7606 if test "X$found_dir" != "X"; then
7607 break
7608 fi
7609 done
7610 fi
7611 if test "X$found_dir" != "X"; then
7612 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
7613 if test "X$found_so" != "X"; then
7614 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
7615 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
7616 else
7617 haveit=
7618 for x in $ltrpathdirs; do
7619 if test "X$x" = "X$found_dir"; then
7620 haveit=yes
7621 break
7622 fi
7623 done
7624 if test -z "$haveit"; then
7625 ltrpathdirs="$ltrpathdirs $found_dir"
7626 fi
7627 if test "$hardcode_direct" = yes; then
7628 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
7629 else
7630 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
7631 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
7632 haveit=
7633 for x in $rpathdirs; do
7634 if test "X$x" = "X$found_dir"; then
7635 haveit=yes
7636 break
7637 fi
7638 done
7639 if test -z "$haveit"; then
7640 rpathdirs="$rpathdirs $found_dir"
7641 fi
7642 else
7643 haveit=
7644 for x in $LDFLAGS $LIBEXPAT; do
7645
7646 acl_save_prefix="$prefix"
7647 prefix="$acl_final_prefix"
7648 acl_save_exec_prefix="$exec_prefix"
7649 exec_prefix="$acl_final_exec_prefix"
7650 eval x=\"$x\"
7651 exec_prefix="$acl_save_exec_prefix"
7652 prefix="$acl_save_prefix"
7653
7654 if test "X$x" = "X-L$found_dir"; then
7655 haveit=yes
7656 break
7657 fi
7658 done
7659 if test -z "$haveit"; then
7660 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
7661 fi
7662 if test "$hardcode_minus_L" != no; then
7663 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
7664 else
7665 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
7666 fi
7667 fi
7668 fi
7669 fi
7670 else
7671 if test "X$found_a" != "X"; then
7672 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
7673 else
7674 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
7675 fi
7676 fi
7677 additional_includedir=
7678 case "$found_dir" in
7679 */lib | */lib/)
7680 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
7681 additional_includedir="$basedir/include"
7682 ;;
7683 esac
7684 if test "X$additional_includedir" != "X"; then
7685 if test "X$additional_includedir" != "X/usr/include"; then
7686 haveit=
7687 if test "X$additional_includedir" = "X/usr/local/include"; then
7688 if test -n "$GCC"; then
7689 case $host_os in
7690 linux*) haveit=yes;;
7691 esac
7692 fi
7693 fi
7694 if test -z "$haveit"; then
7695 for x in $CPPFLAGS $INCEXPAT; do
7696
7697 acl_save_prefix="$prefix"
7698 prefix="$acl_final_prefix"
7699 acl_save_exec_prefix="$exec_prefix"
7700 exec_prefix="$acl_final_exec_prefix"
7701 eval x=\"$x\"
7702 exec_prefix="$acl_save_exec_prefix"
7703 prefix="$acl_save_prefix"
7704
7705 if test "X$x" = "X-I$additional_includedir"; then
7706 haveit=yes
7707 break
7708 fi
7709 done
7710 if test -z "$haveit"; then
7711 if test -d "$additional_includedir"; then
7712 INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
7713 fi
7714 fi
7715 fi
7716 fi
7717 fi
7718 if test -n "$found_la"; then
7719 save_libdir="$libdir"
7720 case "$found_la" in
7721 */* | *\\*) . "$found_la" ;;
7722 *) . "./$found_la" ;;
7723 esac
7724 libdir="$save_libdir"
7725 for dep in $dependency_libs; do
7726 case "$dep" in
7727 -L*)
7728 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
7729 if test "X$additional_libdir" != "X/usr/lib"; then
7730 haveit=
7731 if test "X$additional_libdir" = "X/usr/local/lib"; then
7732 if test -n "$GCC"; then
7733 case $host_os in
7734 linux*) haveit=yes;;
7735 esac
7736 fi
7737 fi
7738 if test -z "$haveit"; then
7739 haveit=
7740 for x in $LDFLAGS $LIBEXPAT; do
7741
7742 acl_save_prefix="$prefix"
7743 prefix="$acl_final_prefix"
7744 acl_save_exec_prefix="$exec_prefix"
7745 exec_prefix="$acl_final_exec_prefix"
7746 eval x=\"$x\"
7747 exec_prefix="$acl_save_exec_prefix"
7748 prefix="$acl_save_prefix"
7749
7750 if test "X$x" = "X-L$additional_libdir"; then
7751 haveit=yes
7752 break
7753 fi
7754 done
7755 if test -z "$haveit"; then
7756 if test -d "$additional_libdir"; then
7757 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
7758 fi
7759 fi
7760 haveit=
7761 for x in $LDFLAGS $LTLIBEXPAT; do
7762
7763 acl_save_prefix="$prefix"
7764 prefix="$acl_final_prefix"
7765 acl_save_exec_prefix="$exec_prefix"
7766 exec_prefix="$acl_final_exec_prefix"
7767 eval x=\"$x\"
7768 exec_prefix="$acl_save_exec_prefix"
7769 prefix="$acl_save_prefix"
7770
7771 if test "X$x" = "X-L$additional_libdir"; then
7772 haveit=yes
7773 break
7774 fi
7775 done
7776 if test -z "$haveit"; then
7777 if test -d "$additional_libdir"; then
7778 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
7779 fi
7780 fi
7781 fi
7782 fi
7783 ;;
7784 -R*)
7785 dir=`echo "X$dep" | sed -e 's/^X-R//'`
7786 if test "$enable_rpath" != no; then
7787 haveit=
7788 for x in $rpathdirs; do
7789 if test "X$x" = "X$dir"; then
7790 haveit=yes
7791 break
7792 fi
7793 done
7794 if test -z "$haveit"; then
7795 rpathdirs="$rpathdirs $dir"
7796 fi
7797 haveit=
7798 for x in $ltrpathdirs; do
7799 if test "X$x" = "X$dir"; then
7800 haveit=yes
7801 break
7802 fi
7803 done
7804 if test -z "$haveit"; then
7805 ltrpathdirs="$ltrpathdirs $dir"
7806 fi
7807 fi
7808 ;;
7809 -l*)
7810 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
7811 ;;
7812 *.la)
7813 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
7814 ;;
7815 *)
7816 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
7817 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
7818 ;;
81ecdfbb
RW
7819 esac
7820 done
7821 fi
7822 else
7823 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
7824 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
7825 fi
7826 fi
7827 fi
7828 done
7829 done
7830 if test "X$rpathdirs" != "X"; then
7831 if test -n "$hardcode_libdir_separator"; then
7832 alldirs=
7833 for found_dir in $rpathdirs; do
7834 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
7835 done
7836 acl_save_libdir="$libdir"
7837 libdir="$alldirs"
7838 eval flag=\"$hardcode_libdir_flag_spec\"
7839 libdir="$acl_save_libdir"
7840 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
7841 else
7842 for found_dir in $rpathdirs; do
7843 acl_save_libdir="$libdir"
7844 libdir="$found_dir"
7845 eval flag=\"$hardcode_libdir_flag_spec\"
7846 libdir="$acl_save_libdir"
7847 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
7848 done
7849 fi
7850 fi
7851 if test "X$ltrpathdirs" != "X"; then
7852 for found_dir in $ltrpathdirs; do
7853 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
7854 done
7855 fi
a9322a30
TT
7856
7857
81ecdfbb 7858 ac_save_CPPFLAGS="$CPPFLAGS"
a9322a30 7859
81ecdfbb
RW
7860 for element in $INCEXPAT; do
7861 haveit=
7862 for x in $CPPFLAGS; do
a9322a30 7863
81ecdfbb
RW
7864 acl_save_prefix="$prefix"
7865 prefix="$acl_final_prefix"
7866 acl_save_exec_prefix="$exec_prefix"
7867 exec_prefix="$acl_final_exec_prefix"
7868 eval x=\"$x\"
7869 exec_prefix="$acl_save_exec_prefix"
7870 prefix="$acl_save_prefix"
a8111142 7871
81ecdfbb
RW
7872 if test "X$x" = "X$element"; then
7873 haveit=yes
7874 break
7875 fi
7876 done
7877 if test -z "$haveit"; then
7878 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
7879 fi
7880 done
a9322a30
TT
7881
7882
81ecdfbb
RW
7883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
7884$as_echo_n "checking for libexpat... " >&6; }
7885if test "${ac_cv_libexpat+set}" = set; then :
7886 $as_echo_n "(cached) " >&6
bec39cab 7887else
bec39cab 7888
81ecdfbb
RW
7889 ac_save_LIBS="$LIBS"
7890 LIBS="$LIBS $LIBEXPAT"
7891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7892/* end confdefs.h. */
81ecdfbb
RW
7893#include "expat.h"
7894int
7895main ()
7896{
7897XML_Parser p = XML_ParserCreate (0);
7898 ;
7899 return 0;
7900}
bec39cab 7901_ACEOF
81ecdfbb
RW
7902if ac_fn_c_try_link "$LINENO"; then :
7903 ac_cv_libexpat=yes
c906108c 7904else
81ecdfbb 7905 ac_cv_libexpat=no
bec39cab 7906fi
81ecdfbb
RW
7907rm -f core conftest.err conftest.$ac_objext \
7908 conftest$ac_exeext conftest.$ac_ext
7909 LIBS="$ac_save_LIBS"
c906108c 7910
95ca63c4 7911fi
81ecdfbb
RW
7912{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
7913$as_echo "$ac_cv_libexpat" >&6; }
7914 if test "$ac_cv_libexpat" = yes; then
7915 HAVE_LIBEXPAT=yes
bec39cab 7916
81ecdfbb 7917$as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
bec39cab 7918
81ecdfbb
RW
7919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
7920$as_echo_n "checking how to link with libexpat... " >&6; }
7921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
7922$as_echo "$LIBEXPAT" >&6; }
7923 else
7924 HAVE_LIBEXPAT=no
7925 CPPFLAGS="$ac_save_CPPFLAGS"
7926 LIBEXPAT=
7927 LTLIBEXPAT=
7928 fi
95ca63c4
CF
7929
7930
7931
7cb9022a
MK
7932
7933
bec39cab 7934
81ecdfbb
RW
7935 if test "$HAVE_LIBEXPAT" != yes; then
7936 if test "$with_expat" = yes; then
7937 as_fn_error "expat is missing or unusable" "$LINENO" 5
7938 else
7939 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
7940$as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
7941 fi
7942 else
7943 save_LIBS=$LIBS
7944 LIBS="$LIBS $LIBEXPAT"
7945 for ac_func in XML_StopParser
7946do :
7947 ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
7948if test "x$ac_cv_func_XML_StopParser" = x""yes; then :
bec39cab 7949 cat >>confdefs.h <<_ACEOF
81ecdfbb 7950#define HAVE_XML_STOPPARSER 1
bec39cab 7951_ACEOF
95ca63c4 7952
bec39cab 7953fi
bec39cab 7954done
95ca63c4 7955
81ecdfbb
RW
7956 LIBS=$save_LIBS
7957 fi
a9322a30
TT
7958fi
7959
a9322a30 7960
a9322a30
TT
7961
7962
ec685c5e 7963
0c4a4063 7964
81ecdfbb
RW
7965# Check whether --with-python was given.
7966if test "${with_python+set}" = set; then :
7967 withval=$with_python;
bec39cab 7968else
81ecdfbb 7969 with_python=auto
bec39cab 7970fi
bec39cab 7971
81ecdfbb
RW
7972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
7973$as_echo_n "checking whether to use python... " >&6; }
7974{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
7975$as_echo "$with_python" >&6; }
9a156167 7976
81ecdfbb
RW
7977if test "${with_python}" = no; then
7978 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
7979$as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
7980 have_libpython=no
bec39cab 7981else
81ecdfbb 7982 case "${with_python}" in
8c85a4e2 7983 [\\/]* | ?:[\\/]*)
ec685c5e
DE
7984 if test -d ${with_python}; then
7985 # Assume the python binary is ${with_python}/bin/python.
ec685c5e 7986 python_prog="${with_python}/bin/python"
0c4a4063 7987 python_prefix=
9c4ea6c5
JB
7988 # If python does not exit ${with_python}/bin, then try in
7989 # ${with_python}. On Windows/MinGW, this is where the Python
7990 # executable is.
7991 if test ! -x "${python_prog}"; then
7992 python_prog="${with_python}/python"
7993 python_prefix=
7994 fi
e7a30f46 7995 if test ! -x "${python_prog}"; then
ec685c5e
DE
7996 # Fall back to gdb 7.0/7.1 behaviour.
7997 python_prog=missing
0c4a4063 7998 python_prefix=${with_python}
ec685c5e 7999 fi
e7a30f46 8000 elif test -x "${with_python}"; then
ec685c5e
DE
8001 # While we can't run python compiled for $host (unless host == build),
8002 # the user could write a script that provides the needed information,
8003 # so we support that.
ec685c5e 8004 python_prog=${with_python}
0c4a4063 8005 python_prefix=
ec685c5e
DE
8006 else
8007 as_fn_error "invalid value for --with-python" "$LINENO" 5
8008 fi
81ecdfbb 8009 ;;
ec685c5e
DE
8010 */*)
8011 # Disallow --with-python=foo/bar.
81ecdfbb
RW
8012 as_fn_error "invalid value for --with-python" "$LINENO" 5
8013 ;;
ec685c5e
DE
8014 *)
8015 # The user has either specified auto, yes, or the name of the python
8016 # program assumed to be in $PATH.
8017 python_prefix=
8018 case "${with_python}" in
8019 yes | auto)
8020 if test ${build} = ${host}; then
8021 # Extract the first word of "python", so it can be a program name with args.
8022set dummy python; ac_word=$2
8023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8024$as_echo_n "checking for $ac_word... " >&6; }
8025if test "${ac_cv_path_python_prog_path+set}" = set; then :
8026 $as_echo_n "(cached) " >&6
8027else
8028 case $python_prog_path in
8029 [\\/]* | ?:[\\/]*)
8030 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
8031 ;;
8032 *)
8033 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8034for as_dir in $PATH
8035do
8036 IFS=$as_save_IFS
8037 test -z "$as_dir" && as_dir=.
8038 for ac_exec_ext in '' $ac_executable_extensions; do
8039 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8040 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
8041 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8042 break 2
8043 fi
8044done
8045 done
8046IFS=$as_save_IFS
8047
8048 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
8049 ;;
8050esac
8051fi
8052python_prog_path=$ac_cv_path_python_prog_path
8053if test -n "$python_prog_path"; then
8054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
8055$as_echo "$python_prog_path" >&6; }
8056else
8057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8058$as_echo "no" >&6; }
8059fi
8060
8061
8062 if test "${python_prog_path}" = missing; then
8063 python_prog=missing
8064 else
8065 python_prog=${python_prog_path}
8066 fi
8067 else
8068 # Not much we can do except assume the cross-compiler will find the
8069 # right files.
8070 python_prog=missing
8071 fi
8072 ;;
8073 *)
8074 # While we can't run python compiled for $host (unless host == build),
8075 # the user could write a script that provides the needed information,
8076 # so we support that.
8077 python_prog="${with_python}"
8078 # Extract the first word of "${python_prog}", so it can be a program name with args.
8079set dummy ${python_prog}; ac_word=$2
8080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8081$as_echo_n "checking for $ac_word... " >&6; }
8082if test "${ac_cv_path_python_prog_path+set}" = set; then :
8083 $as_echo_n "(cached) " >&6
8084else
8085 case $python_prog_path in
8086 [\\/]* | ?:[\\/]*)
8087 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
8088 ;;
8089 *)
8090 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8091for as_dir in $PATH
8092do
8093 IFS=$as_save_IFS
8094 test -z "$as_dir" && as_dir=.
8095 for ac_exec_ext in '' $ac_executable_extensions; do
8096 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8097 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
8098 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8099 break 2
8100 fi
8101done
8102 done
8103IFS=$as_save_IFS
8104
8105 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
8106 ;;
8107esac
8108fi
8109python_prog_path=$ac_cv_path_python_prog_path
8110if test -n "$python_prog_path"; then
8111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
8112$as_echo "$python_prog_path" >&6; }
8113else
8114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8115$as_echo "no" >&6; }
8116fi
8117
8118
8119 if test "${python_prog_path}" = missing; then
8120 as_fn_error "unable to find python program ${python_prog}" "$LINENO" 5
8121 fi
8122 ;;
8123 esac
81ecdfbb
RW
8124 esac
8125
ec685c5e 8126 if test "${python_prog}" != missing; then
e7a30f46
DE
8127 # We have a python program to use, but it may be too old.
8128 # Don't flag an error for --with-python=auto (the default).
8129 have_python_config=yes
ec685c5e
DE
8130 python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
8131 if test $? != 0; then
e7a30f46
DE
8132 have_python_config=failed
8133 if test "${with_python}" != auto; then
8134 as_fn_error "failure running python-config --includes" "$LINENO" 5
8135 fi
ec685c5e
DE
8136 fi
8137 python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
8138 if test $? != 0; then
e7a30f46
DE
8139 have_python_config=failed
8140 if test "${with_python}" != auto; then
8141 as_fn_error "failure running python-config --ldflags" "$LINENO" 5
8142 fi
ec685c5e 8143 fi
0c4a4063
DE
8144 python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
8145 if test $? != 0; then
e7a30f46
DE
8146 have_python_config=failed
8147 if test "${with_python}" != auto; then
8148 as_fn_error "failure running python-config --exec-prefix" "$LINENO" 5
8149 fi
0c4a4063 8150 fi
ec685c5e 8151 else
ac534cba
JB
8152 # We do not have a python executable we can use to determine where
8153 # to find the Python headers and libs. We cannot guess the include
8154 # path from the python_prefix either, because that include path
8155 # depends on the Python version. So, there is nothing much we can
8156 # do except assume that the compiler will be able to find those files.
8157 python_includes=
8158 python_libs=
0c4a4063 8159 have_python_config=no
ec685c5e 8160 fi
bec39cab 8161
ec685c5e
DE
8162 # If we have python-config, only try the configuration it provides.
8163 # Otherwise fallback on the old way of trying different versions of
8164 # python in turn.
81ecdfbb 8165
ec685c5e
DE
8166 have_libpython=no
8167 if test "${have_python_config}" = yes; then
c1039e3c
JB
8168 # Determine the Python version by extracting "-lpython<version>"
8169 # part of the python_libs. <version> is usually X.Y with X and Y
8170 # being decimal numbers, but can also be XY (seen on Windows).
8171 #
8172 # The extraction is performed using sed with a regular expression.
8173 # Initially, the regexp used was using the '?' quantifier to make
8174 # the dot in the version number optional. Unfortunately, this
8175 # does not work with non-GNU versions of sed because, because of
8176 # what looks like a limitation (the '?' quantifier does not work
8177 # with back-references). We work around this limitation by using
8178 # the '*' quantifier instead. It means that, in theory, we might
8179 # match unexpected version strings such as "-lpython2..7", but
8180 # this seems unlikely in practice. And even if that happens,
8181 # an error will be triggered later on, when checking that version
8182 # number.
ec685c5e 8183 python_version=`echo " ${python_libs} " \
c1039e3c 8184 | sed -e 's,^.* -l\(python[0-9]*[.]*[0-9]*\).*$,\1,'`
0c4a4063
DE
8185 case "${python_version}" in
8186 python*)
ec685c5e
DE
8187
8188 version=${python_version}
8189
8190 new_CPPFLAGS=${python_includes}
8191 new_LIBS=${python_libs}
81ecdfbb
RW
8192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8193$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 8194 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 8195 save_LIBS=$LIBS
ec685c5e
DE
8196 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8197 LIBS="$LIBS $new_LIBS"
8198 found_usable_python=no
81ecdfbb 8199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8200/* end confdefs.h. */
ac534cba 8201#include "Python.h"
81ecdfbb
RW
8202int
8203main ()
8204{
8205Py_Initialize ();
8206 ;
8207 return 0;
8208}
bec39cab 8209_ACEOF
81ecdfbb 8210if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
8211 have_libpython=${version}
8212 found_usable_python=yes
ac534cba
JB
8213 PYTHON_CPPFLAGS=$new_CPPFLAGS
8214 PYTHON_LIBS=$new_LIBS
9a156167 8215fi
81ecdfbb
RW
8216rm -f core conftest.err conftest.$ac_objext \
8217 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
8218 CPPFLAGS=$save_CPPFLAGS
8219 LIBS=$save_LIBS
ec685c5e
DE
8220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8221$as_echo "${found_usable_python}" >&6; }
9a156167 8222
0c4a4063
DE
8223 ;;
8224 *)
ec685c5e 8225 as_fn_error "unable to determine python version from ${python_libs}" "$LINENO" 5
0c4a4063
DE
8226 ;;
8227 esac
e7a30f46 8228 elif test "${have_python_config}" != failed; then
ec685c5e 8229 if test "${have_libpython}" = no; then
9a156167 8230
420697bb
TT
8231 version=python2.7
8232
8233 new_CPPFLAGS=${python_includes}
8234 new_LIBS="${python_libs} -lpython2.7"
8235 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8236$as_echo_n "checking for ${version}... " >&6; }
8237 save_CPPFLAGS=$CPPFLAGS
8238 save_LIBS=$LIBS
8239 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8240 LIBS="$LIBS $new_LIBS"
8241 found_usable_python=no
8242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8243/* end confdefs.h. */
ac534cba 8244#include "Python.h"
420697bb
TT
8245int
8246main ()
8247{
8248Py_Initialize ();
8249 ;
8250 return 0;
8251}
8252_ACEOF
8253if ac_fn_c_try_link "$LINENO"; then :
8254 have_libpython=${version}
8255 found_usable_python=yes
ac534cba
JB
8256 PYTHON_CPPFLAGS=$new_CPPFLAGS
8257 PYTHON_LIBS=$new_LIBS
420697bb
TT
8258fi
8259rm -f core conftest.err conftest.$ac_objext \
8260 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
8261 CPPFLAGS=$save_CPPFLAGS
8262 LIBS=$save_LIBS
420697bb
TT
8263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8264$as_echo "${found_usable_python}" >&6; }
8265
8266 fi
8267 if test "${have_libpython}" = no; then
8268
ec685c5e
DE
8269 version=python2.6
8270
8271 new_CPPFLAGS=${python_includes}
8272 new_LIBS="${python_libs} -lpython2.6"
8273 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8274$as_echo_n "checking for ${version}... " >&6; }
8275 save_CPPFLAGS=$CPPFLAGS
8276 save_LIBS=$LIBS
8277 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8278 LIBS="$LIBS $new_LIBS"
8279 found_usable_python=no
8280 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8281/* end confdefs.h. */
ac534cba 8282#include "Python.h"
ec685c5e
DE
8283int
8284main ()
8285{
8286Py_Initialize ();
8287 ;
8288 return 0;
8289}
8290_ACEOF
8291if ac_fn_c_try_link "$LINENO"; then :
8292 have_libpython=${version}
8293 found_usable_python=yes
ac534cba
JB
8294 PYTHON_CPPFLAGS=$new_CPPFLAGS
8295 PYTHON_LIBS=$new_LIBS
ec685c5e
DE
8296fi
8297rm -f core conftest.err conftest.$ac_objext \
8298 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
8299 CPPFLAGS=$save_CPPFLAGS
8300 LIBS=$save_LIBS
ec685c5e
DE
8301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8302$as_echo "${found_usable_python}" >&6; }
9a156167 8303
81ecdfbb 8304 fi
ec685c5e 8305 if test ${have_libpython} = no; then
9a156167 8306
81ecdfbb 8307 version=python2.5
9a156167 8308
ec685c5e
DE
8309 new_CPPFLAGS=${python_includes}
8310 new_LIBS="${python_libs} -lpython2.5"
81ecdfbb
RW
8311 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8312$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 8313 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 8314 save_LIBS=$LIBS
ec685c5e
DE
8315 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8316 LIBS="$LIBS $new_LIBS"
8317 found_usable_python=no
81ecdfbb 8318 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 8319/* end confdefs.h. */
ac534cba 8320#include "Python.h"
81ecdfbb
RW
8321int
8322main ()
8323{
8324Py_Initialize ();
8325 ;
8326 return 0;
8327}
436868fb 8328_ACEOF
81ecdfbb 8329if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
8330 have_libpython=${version}
8331 found_usable_python=yes
ac534cba
JB
8332 PYTHON_CPPFLAGS=$new_CPPFLAGS
8333 PYTHON_LIBS=$new_LIBS
436868fb 8334fi
81ecdfbb
RW
8335rm -f core conftest.err conftest.$ac_objext \
8336 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
8337 CPPFLAGS=$save_CPPFLAGS
8338 LIBS=$save_LIBS
ec685c5e
DE
8339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8340$as_echo "${found_usable_python}" >&6; }
a9322a30 8341
81ecdfbb 8342 fi
ec685c5e 8343 if test ${have_libpython} = no; then
a9322a30 8344
81ecdfbb 8345 version=python2.4
a9322a30 8346
ec685c5e
DE
8347 new_CPPFLAGS=${python_includes}
8348 new_LIBS="${python_libs} -lpython2.4"
81ecdfbb
RW
8349 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8350$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 8351 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 8352 save_LIBS=$LIBS
ec685c5e
DE
8353 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8354 LIBS="$LIBS $new_LIBS"
8355 found_usable_python=no
81ecdfbb 8356 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 8357/* end confdefs.h. */
ac534cba 8358#include "Python.h"
a9322a30
TT
8359int
8360main ()
8361{
81ecdfbb 8362Py_Initialize ();
a9322a30
TT
8363 ;
8364 return 0;
8365}
436868fb 8366_ACEOF
81ecdfbb 8367if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
8368 have_libpython=${version}
8369 found_usable_python=yes
ac534cba
JB
8370 PYTHON_CPPFLAGS=$new_CPPFLAGS
8371 PYTHON_LIBS=$new_LIBS
436868fb 8372fi
81ecdfbb
RW
8373rm -f core conftest.err conftest.$ac_objext \
8374 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
8375 CPPFLAGS=$save_CPPFLAGS
8376 LIBS=$save_LIBS
ec685c5e
DE
8377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8378$as_echo "${found_usable_python}" >&6; }
81ecdfbb 8379
ec685c5e
DE
8380 fi
8381 fi
9c4ea6c5 8382 if test "${have_libpython}" = python2.7 -o "${have_libpython}" = python27; then
11763c18
TT
8383
8384$as_echo "#define HAVE_LIBPYTHON2_7 1" >>confdefs.h
8385
9c4ea6c5 8386 elif test "${have_libpython}" = python2.6 -o "${have_libpython}" = python26; then
ec685c5e
DE
8387
8388$as_echo "#define HAVE_LIBPYTHON2_6 1" >>confdefs.h
8389
9c4ea6c5 8390 elif test "${have_libpython}" = python2.5 -o "${have_libpython}" = python25; then
ec685c5e
DE
8391
8392$as_echo "#define HAVE_LIBPYTHON2_5 1" >>confdefs.h
8393
9c4ea6c5 8394 elif test "${have_libpython}" = python2.4 -o "${have_libpython}" = python24; then
81ecdfbb
RW
8395
8396$as_echo "#define HAVE_LIBPYTHON2_4 1" >>confdefs.h
8397
81ecdfbb 8398 fi
ec685c5e
DE
8399
8400 if test "${have_libpython}" = no; then
81ecdfbb
RW
8401 case "${with_python}" in
8402 yes)
8403 as_fn_error "python is missing or unusable" "$LINENO" 5
8404 ;;
8405 auto)
8406 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
8407$as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
8408 ;;
8409 *)
8410 as_fn_error "no usable python found at ${with_python}" "$LINENO" 5
8411 ;;
8412 esac
0c4a4063
DE
8413 else
8414 if test -n "${python_prefix}"; then
8415
8416cat >>confdefs.h <<_ACEOF
8417#define WITH_PYTHON_PATH "${python_prefix}"
8418_ACEOF
8419
8420
8421 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
8422 if test "x$prefix" = xNONE; then
8423 test_prefix=/usr/local
8424 else
8425 test_prefix=$prefix
8426 fi
8427 else
8428 test_prefix=$exec_prefix
8429 fi
8430 value=0
8431 case ${python_prefix} in
8432 "${test_prefix}"|"${test_prefix}/"*|\
8433 '${exec_prefix}'|'${exec_prefix}/'*)
8434 value=1
8435 ;;
8436 esac
8437
8438cat >>confdefs.h <<_ACEOF
8439#define PYTHON_PATH_RELOCATABLE $value
8440_ACEOF
8441
8442
8443 fi
81ecdfbb 8444 fi
436868fb 8445fi
436868fb 8446
ec685c5e 8447if test "${have_libpython}" != no; then
436868fb 8448
81ecdfbb 8449$as_echo "#define HAVE_PYTHON 1" >>confdefs.h
436868fb 8450
81ecdfbb
RW
8451 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
8452 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
8453 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
94f7449c 8454 CONFIG_INSTALL="$CONFIG_INSTALL install-python"
81ecdfbb 8455 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
436868fb 8456
81ecdfbb
RW
8457 # Flags needed to compile Python code (taken from python-config --cflags).
8458 # We cannot call python-config directly because it will output whatever was
8459 # used when compiling the Python interpreter itself, including flags which
8460 # would make the python-related objects be compiled differently from the
8461 # rest of GDB (e.g., -O2 and -fPIC).
8462 if test "${GCC}" = yes; then
8463 tentative_python_cflags="-fno-strict-aliasing -DNDEBUG -fwrapv"
8464 fi
436868fb 8465
81ecdfbb
RW
8466 if test "x${tentative_python_cflags}" != x; then
8467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
8468$as_echo_n "checking compiler flags for python code... " >&6; }
8469 for flag in ${tentative_python_cflags}; do
8470 # Check that the compiler accepts it
8471 saved_CFLAGS="$CFLAGS"
8472 CFLAGS="$CFLAGS $flag"
8473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8474/* end confdefs.h. */
81ecdfbb 8475
a9322a30
TT
8476int
8477main ()
8478{
a9322a30
TT
8479
8480 ;
8481 return 0;
8482}
bec39cab 8483_ACEOF
81ecdfbb
RW
8484if ac_fn_c_try_compile "$LINENO"; then :
8485 PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
bec39cab 8486fi
81ecdfbb
RW
8487rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8488 CFLAGS="$saved_CFLAGS"
8489 done
8490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
8491$as_echo "${PYTHON_CFLAGS}" >&6; }
8492 fi
043b6510
JB
8493
8494 # On IRIX, type siginfo is not defined. Instead, sys/siginfo.h provides:
8495 # #if _SGIAPI
8496 # #define siginfo __siginfo
8497 # #endif
8498 # The problem is that including Python causes some XOPEN macros to be
8499 # unilaterally defined, and that in turn causes _SGIAPI to evaluate
8500 # to false. So, we work around this issue by defining siginfo ourself
8501 # though the command-line.
c83393b9
JB
8502 #
8503 # On x64 Windows, Python's include headers, and pyconfig.h in
8504 # particular, rely on MS_WIN64 macro to detect that it's a 64bit
8505 # version of Windows. Unfortunately, MS_WIN64 is only defined if
8506 # _MSC_VER, a Microsoft-specific macro, is defined. So, when
8507 # building on x64 Windows with GCC, we define MS_WIN64 ourselves.
8508 # The issue was reported to the Python community, but still isn't
8509 # solved as of 2012-10-02 (http://bugs.python.org/issue4709).
8510
043b6510
JB
8511 case "$gdb_host" in
8512 irix*) if test "${GCC}" = yes; then
8513 CPPFLAGS="$CPPFLAGS -Dsiginfo=__siginfo"
8514 fi
8515 ;;
c83393b9
JB
8516 mingw64)
8517 if test "${GCC}" = yes; then
8518 CPPFLAGS="$CPPFLAGS -DMS_WIN64"
8519 fi
8520 ;;
043b6510 8521 esac
a8db4212
YPK
8522
8523 # Note that "python -m threading" cannot be used to check for
8524 # threading support due to a bug in Python 2.7.3
8525 # (http://bugs.python.org/issue15567).
8526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether python supports threads" >&5
8527$as_echo_n "checking whether python supports threads... " >&6; }
8528 saved_CPPFLAGS="${CPPFLAGS}"
8529 CPPFLAGS="${PYTHON_CPPFLAGS}"
8530 # Note that the test is reversed so that python_has_threads=yes on
8531 # unexpected failures.
8532 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8533/* end confdefs.h. */
8534
8535#include <Python.h>
8536#ifdef WITH_THREAD
8537# error
8538#endif
8539
8540_ACEOF
8541if ac_fn_c_try_cpp "$LINENO"; then :
8542 python_has_threads=no
8543else
8544 python_has_threads=yes
8545fi
8546rm -f conftest.err conftest.$ac_ext
8547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_has_threads}" >&5
8548$as_echo "${python_has_threads}" >&6; }
8549 CPPFLAGS="${saved_CPPFLAGS}"
81ecdfbb
RW
8550else
8551 # Even if Python support is not compiled in, we need to have these files
88a1906b
DE
8552 # included.
8553 CONFIG_OBS="$CONFIG_OBS python.o py-value.o py-prettyprint.o py-auto-load.o"
8554 CONFIG_SRCS="$CONFIG_SRCS python/python.c python/py-value.c \
8555 python/py-prettyprint.c python/py-auto-load.c"
a9322a30 8556fi
9a156167 8557
9a156167 8558
ac534cba
JB
8559
8560
a8db4212
YPK
8561# Provide a --enable-libmcheck/--disable-libmcheck set of options
8562# allowing a user to enable this option even when building releases,
8563# or to disable it when building a snapshot.
8564# Check whether --enable-libmcheck was given.
8565if test "${enable_libmcheck+set}" = set; then :
8566 enableval=$enable_libmcheck; case "${enableval}" in
8567 yes | y) ENABLE_LIBMCHECK="yes" ;;
8568 no | n) ENABLE_LIBMCHECK="no" ;;
8569 *) as_fn_error "bad value ${enableval} for --enable-libmcheck" "$LINENO" 5 ;;
8570 esac
8571fi
8572
8573
8574# Enable -lmcheck by default (it provides cheap-enough memory mangling),
8575# but turn it off if Python is enabled with threads, since -lmcheck is
8576# not thread safe (http://sourceware.org/bugzilla/show_bug.cgi?id=9939),
8577# and for releases.
8578if test -z "${ENABLE_LIBMCHECK}" \
8579 -a \( "${have_libpython}" = "no" \
8580 -o "${python_has_threads}" = "no" \) \
8581 && $development; then
8582 ENABLE_LIBMCHECK=yes
8583fi
8584
8585if test "$ENABLE_LIBMCHECK" = "yes" ; then
8586 if test "${have_libpython}" != "no" -a "${python_has_threads}" = "yes" ; then
8587 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&5
8588$as_echo "$as_me: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&2;}
8589 fi
8590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lmcheck" >&5
8591$as_echo_n "checking for main in -lmcheck... " >&6; }
8592if test "${ac_cv_lib_mcheck_main+set}" = set; then :
8593 $as_echo_n "(cached) " >&6
8594else
8595 ac_check_lib_save_LIBS=$LIBS
8596LIBS="-lmcheck $LIBS"
8597cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8598/* end confdefs.h. */
8599
8600
8601int
8602main ()
8603{
8604return main ();
8605 ;
8606 return 0;
8607}
8608_ACEOF
8609if ac_fn_c_try_link "$LINENO"; then :
8610 ac_cv_lib_mcheck_main=yes
8611else
8612 ac_cv_lib_mcheck_main=no
8613fi
8614rm -f core conftest.err conftest.$ac_objext \
8615 conftest$ac_exeext conftest.$ac_ext
8616LIBS=$ac_check_lib_save_LIBS
8617fi
8618{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mcheck_main" >&5
8619$as_echo "$ac_cv_lib_mcheck_main" >&6; }
8620if test "x$ac_cv_lib_mcheck_main" = x""yes; then :
8621 cat >>confdefs.h <<_ACEOF
8622#define HAVE_LIBMCHECK 1
8623_ACEOF
8624
8625 LIBS="-lmcheck $LIBS"
8626
8627fi
8628
8629fi
8630
81ecdfbb
RW
8631# ------------------------- #
8632# Checks for header files. #
8633# ------------------------- #
c890192f 8634
81ecdfbb
RW
8635ac_header_dirent=no
8636for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
8637 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
8638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
8639$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
8640if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then :
8641 $as_echo_n "(cached) " >&6
bec39cab 8642else
81ecdfbb 8643 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8644/* end confdefs.h. */
81ecdfbb
RW
8645#include <sys/types.h>
8646#include <$ac_hdr>
8647
a9322a30
TT
8648int
8649main ()
8650{
81ecdfbb
RW
8651if ((DIR *) 0)
8652return 0;
a9322a30
TT
8653 ;
8654 return 0;
8655}
bec39cab 8656_ACEOF
81ecdfbb
RW
8657if ac_fn_c_try_compile "$LINENO"; then :
8658 eval "$as_ac_Header=yes"
bec39cab 8659else
81ecdfbb 8660 eval "$as_ac_Header=no"
bec39cab 8661fi
81ecdfbb 8662rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30 8663fi
81ecdfbb
RW
8664eval ac_res=\$$as_ac_Header
8665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8666$as_echo "$ac_res" >&6; }
8667eval as_val=\$$as_ac_Header
8668 if test "x$as_val" = x""yes; then :
8669 cat >>confdefs.h <<_ACEOF
8670#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
bec39cab 8671_ACEOF
bec39cab 8672
81ecdfbb
RW
8673ac_header_dirent=$ac_hdr; break
8674fi
bec39cab 8675
81ecdfbb
RW
8676done
8677# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8678if test $ac_header_dirent = dirent.h; then
8679 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
8680$as_echo_n "checking for library containing opendir... " >&6; }
8681if test "${ac_cv_search_opendir+set}" = set; then :
8682 $as_echo_n "(cached) " >&6
c890192f 8683else
81ecdfbb
RW
8684 ac_func_search_save_LIBS=$LIBS
8685cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8686/* end confdefs.h. */
8687
8688/* Override any GCC internal prototype to avoid an error.
8689 Use char because int might match the return type of a GCC
8690 builtin and then its argument prototype would still apply. */
8691#ifdef __cplusplus
8692extern "C"
8693#endif
8694char opendir ();
8695int
8696main ()
8697{
8698return opendir ();
8699 ;
8700 return 0;
8701}
bec39cab 8702_ACEOF
81ecdfbb
RW
8703for ac_lib in '' dir; do
8704 if test -z "$ac_lib"; then
8705 ac_res="none required"
8706 else
8707 ac_res=-l$ac_lib
8708 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8709 fi
8710 if ac_fn_c_try_link "$LINENO"; then :
8711 ac_cv_search_opendir=$ac_res
8712fi
8713rm -f core conftest.err conftest.$ac_objext \
8714 conftest$ac_exeext
8715 if test "${ac_cv_search_opendir+set}" = set; then :
8716 break
8717fi
8718done
8719if test "${ac_cv_search_opendir+set}" = set; then :
c890192f 8720
81ecdfbb
RW
8721else
8722 ac_cv_search_opendir=no
8723fi
8724rm conftest.$ac_ext
8725LIBS=$ac_func_search_save_LIBS
8726fi
8727{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8728$as_echo "$ac_cv_search_opendir" >&6; }
8729ac_res=$ac_cv_search_opendir
8730if test "$ac_res" != no; then :
8731 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
bec39cab 8732
bec39cab 8733fi
81ecdfbb 8734
bec39cab 8735else
81ecdfbb
RW
8736 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
8737$as_echo_n "checking for library containing opendir... " >&6; }
8738if test "${ac_cv_search_opendir+set}" = set; then :
8739 $as_echo_n "(cached) " >&6
8740else
8741 ac_func_search_save_LIBS=$LIBS
8742cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8743/* end confdefs.h. */
81ecdfbb
RW
8744
8745/* Override any GCC internal prototype to avoid an error.
8746 Use char because int might match the return type of a GCC
8747 builtin and then its argument prototype would still apply. */
8748#ifdef __cplusplus
8749extern "C"
8750#endif
8751char opendir ();
a9322a30
TT
8752int
8753main ()
8754{
81ecdfbb 8755return opendir ();
a9322a30
TT
8756 ;
8757 return 0;
8758}
bec39cab 8759_ACEOF
81ecdfbb
RW
8760for ac_lib in '' x; do
8761 if test -z "$ac_lib"; then
8762 ac_res="none required"
8763 else
8764 ac_res=-l$ac_lib
8765 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8766 fi
8767 if ac_fn_c_try_link "$LINENO"; then :
8768 ac_cv_search_opendir=$ac_res
8769fi
8770rm -f core conftest.err conftest.$ac_objext \
8771 conftest$ac_exeext
8772 if test "${ac_cv_search_opendir+set}" = set; then :
8773 break
8774fi
8775done
8776if test "${ac_cv_search_opendir+set}" = set; then :
bec39cab 8777
81ecdfbb
RW
8778else
8779 ac_cv_search_opendir=no
bec39cab 8780fi
81ecdfbb
RW
8781rm conftest.$ac_ext
8782LIBS=$ac_func_search_save_LIBS
a9322a30 8783fi
81ecdfbb
RW
8784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8785$as_echo "$ac_cv_search_opendir" >&6; }
8786ac_res=$ac_cv_search_opendir
8787if test "$ac_res" != no; then :
8788 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
bec39cab 8789
81ecdfbb 8790fi
bec39cab 8791
81ecdfbb 8792fi
bec39cab 8793
81ecdfbb
RW
8794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
8795$as_echo_n "checking for ANSI C header files... " >&6; }
8796if test "${ac_cv_header_stdc+set}" = set; then :
8797 $as_echo_n "(cached) " >&6
bec39cab 8798else
81ecdfbb 8799 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8800/* end confdefs.h. */
81ecdfbb
RW
8801#include <stdlib.h>
8802#include <stdarg.h>
8803#include <string.h>
8804#include <float.h>
8805
a9322a30
TT
8806int
8807main ()
8808{
a9322a30
TT
8809
8810 ;
8811 return 0;
8812}
bec39cab 8813_ACEOF
81ecdfbb
RW
8814if ac_fn_c_try_compile "$LINENO"; then :
8815 ac_cv_header_stdc=yes
bec39cab 8816else
81ecdfbb 8817 ac_cv_header_stdc=no
a9322a30 8818fi
81ecdfbb 8819rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 8820
81ecdfbb
RW
8821if test $ac_cv_header_stdc = yes; then
8822 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8824/* end confdefs.h. */
8825#include <string.h>
bec39cab 8826
81ecdfbb
RW
8827_ACEOF
8828if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8829 $EGREP "memchr" >/dev/null 2>&1; then :
bec39cab 8830
bec39cab 8831else
81ecdfbb
RW
8832 ac_cv_header_stdc=no
8833fi
8834rm -f conftest*
8835
8836fi
8837
8838if test $ac_cv_header_stdc = yes; then
8839 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8841/* end confdefs.h. */
8842#include <stdlib.h>
8843
bec39cab 8844_ACEOF
81ecdfbb
RW
8845if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8846 $EGREP "free" >/dev/null 2>&1; then :
06825bd1 8847
81ecdfbb
RW
8848else
8849 ac_cv_header_stdc=no
8850fi
8851rm -f conftest*
bec39cab 8852
bec39cab 8853fi
81ecdfbb
RW
8854
8855if test $ac_cv_header_stdc = yes; then
8856 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8857 if test "$cross_compiling" = yes; then :
8858 :
bec39cab 8859else
81ecdfbb 8860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8861/* end confdefs.h. */
81ecdfbb
RW
8862#include <ctype.h>
8863#include <stdlib.h>
8864#if ((' ' & 0x0FF) == 0x020)
8865# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8866# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8867#else
8868# define ISLOWER(c) \
8869 (('a' <= (c) && (c) <= 'i') \
8870 || ('j' <= (c) && (c) <= 'r') \
8871 || ('s' <= (c) && (c) <= 'z'))
8872# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
8873#endif
8874
8875#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
a9322a30
TT
8876int
8877main ()
8878{
81ecdfbb
RW
8879 int i;
8880 for (i = 0; i < 256; i++)
8881 if (XOR (islower (i), ISLOWER (i))
8882 || toupper (i) != TOUPPER (i))
8883 return 2;
a9322a30
TT
8884 return 0;
8885}
bec39cab 8886_ACEOF
81ecdfbb
RW
8887if ac_fn_c_try_run "$LINENO"; then :
8888
bec39cab 8889else
81ecdfbb
RW
8890 ac_cv_header_stdc=no
8891fi
8892rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8893 conftest.$ac_objext conftest.beam conftest.$ac_ext
8894fi
bec39cab 8895
bec39cab 8896fi
a9322a30 8897fi
81ecdfbb
RW
8898{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
8899$as_echo "$ac_cv_header_stdc" >&6; }
8900if test $ac_cv_header_stdc = yes; then
bec39cab 8901
81ecdfbb 8902$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5ee754fc 8903
81ecdfbb 8904fi
bec39cab 8905
81ecdfbb 8906# elf_hp.h is for HP/UX 64-bit shared library support.
81ecdfbb 8907for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
8775fd2d 8908 thread_db.h signal.h stddef.h \
81ecdfbb
RW
8909 stdlib.h string.h memory.h strings.h sys/fault.h \
8910 sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
8911 sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
8912 sys/reg.h sys/debugreg.h sys/select.h sys/syscall.h \
8913 sys/types.h sys/wait.h wait.h termios.h termio.h \
e68227b9 8914 sgtty.h unistd.h elf_hp.h locale.h \
945bf713 8915 dlfcn.h sys/socket.h sys/un.h linux/perf_event.h
81ecdfbb
RW
8916do :
8917 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8918ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
8919eval as_val=\$$as_ac_Header
8920 if test "x$as_val" = x""yes; then :
bec39cab 8921 cat >>confdefs.h <<_ACEOF
81ecdfbb 8922#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 8923_ACEOF
c906108c 8924
bec39cab 8925fi
81ecdfbb
RW
8926
8927done
8928
8929for ac_header in link.h
8930do :
8931 ac_fn_c_check_header_compile "$LINENO" "link.h" "ac_cv_header_link_h" "#if HAVE_SYS_TYPES_H
8932# include <sys/types.h>
8933#endif
8934#if HAVE_NLIST_H
8935# include <nlist.h>
a9322a30
TT
8936#endif
8937
81ecdfbb
RW
8938"
8939if test "x$ac_cv_header_link_h" = x""yes; then :
8940 cat >>confdefs.h <<_ACEOF
8941#define HAVE_LINK_H 1
bec39cab 8942_ACEOF
bec39cab 8943
a9322a30 8944fi
bec39cab 8945
81ecdfbb 8946done
c906108c 8947
81ecdfbb
RW
8948for ac_header in sys/proc.h
8949do :
8950 ac_fn_c_check_header_compile "$LINENO" "sys/proc.h" "ac_cv_header_sys_proc_h" "#if HAVE_SYS_PARAM_H
8951# include <sys/param.h>
8952#endif
c906108c 8953
81ecdfbb
RW
8954"
8955if test "x$ac_cv_header_sys_proc_h" = x""yes; then :
bec39cab 8956 cat >>confdefs.h <<_ACEOF
81ecdfbb 8957#define HAVE_SYS_PROC_H 1
bec39cab 8958_ACEOF
5ee754fc 8959
bec39cab 8960fi
81ecdfbb
RW
8961
8962done
8963
8964for ac_header in sys/user.h
8965do :
8966 ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
8967# include <sys/param.h>
a9322a30
TT
8968#endif
8969
81ecdfbb
RW
8970"
8971if test "x$ac_cv_header_sys_user_h" = x""yes; then :
8972 cat >>confdefs.h <<_ACEOF
8973#define HAVE_SYS_USER_H 1
bec39cab 8974_ACEOF
bec39cab 8975
a9322a30 8976fi
bec39cab 8977
81ecdfbb 8978done
5ee754fc 8979
5ee754fc 8980
81ecdfbb
RW
8981# On Solaris 2.[789], we need to define _MSE_INT_H to avoid a clash
8982# between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
8983# think that we don't have <curses.h> if we're using GCC.
8984case $host_os in
8985 solaris2.[789])
8986 if test "$GCC" = yes; then
8987
8988$as_echo "#define _MSE_INT_H 1" >>confdefs.h
8989
8990 fi ;;
8991esac
8992for ac_header in curses.h cursesX.h ncurses.h ncurses/ncurses.h ncurses/term.h
8993do :
8994 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8995ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
8996eval as_val=\$$as_ac_Header
8997 if test "x$as_val" = x""yes; then :
bec39cab 8998 cat >>confdefs.h <<_ACEOF
81ecdfbb 8999#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 9000_ACEOF
5ee754fc
MK
9001
9002fi
9003
81ecdfbb 9004done
bec39cab 9005
81ecdfbb
RW
9006for ac_header in term.h
9007do :
9008 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
9009# include <curses.h>
9010#endif
bec39cab 9011
81ecdfbb
RW
9012"
9013if test "x$ac_cv_header_term_h" = x""yes; then :
9014 cat >>confdefs.h <<_ACEOF
9015#define HAVE_TERM_H 1
a8111142 9016_ACEOF
a8111142 9017
a8111142 9018fi
a8111142 9019
81ecdfbb 9020done
a8111142
TT
9021
9022
81ecdfbb
RW
9023# ------------------------- #
9024# Checks for declarations. #
9025# ------------------------- #
a9322a30 9026
81ecdfbb
RW
9027ac_fn_c_check_decl "$LINENO" "free" "ac_cv_have_decl_free" "$ac_includes_default"
9028if test "x$ac_cv_have_decl_free" = x""yes; then :
9029 ac_have_decl=1
bec39cab 9030else
81ecdfbb
RW
9031 ac_have_decl=0
9032fi
9033
9034cat >>confdefs.h <<_ACEOF
9035#define HAVE_DECL_FREE $ac_have_decl
bec39cab 9036_ACEOF
81ecdfbb
RW
9037ac_fn_c_check_decl "$LINENO" "malloc" "ac_cv_have_decl_malloc" "$ac_includes_default"
9038if test "x$ac_cv_have_decl_malloc" = x""yes; then :
9039 ac_have_decl=1
9040else
9041 ac_have_decl=0
9042fi
9043
9044cat >>confdefs.h <<_ACEOF
9045#define HAVE_DECL_MALLOC $ac_have_decl
bec39cab 9046_ACEOF
81ecdfbb
RW
9047ac_fn_c_check_decl "$LINENO" "realloc" "ac_cv_have_decl_realloc" "$ac_includes_default"
9048if test "x$ac_cv_have_decl_realloc" = x""yes; then :
9049 ac_have_decl=1
bec39cab 9050else
81ecdfbb
RW
9051 ac_have_decl=0
9052fi
bec39cab 9053
81ecdfbb
RW
9054cat >>confdefs.h <<_ACEOF
9055#define HAVE_DECL_REALLOC $ac_have_decl
bec39cab 9056_ACEOF
81ecdfbb
RW
9057ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default"
9058if test "x$ac_cv_have_decl_strerror" = x""yes; then :
9059 ac_have_decl=1
9060else
9061 ac_have_decl=0
9062fi
9063
9064cat >>confdefs.h <<_ACEOF
9065#define HAVE_DECL_STRERROR $ac_have_decl
bec39cab 9066_ACEOF
81ecdfbb
RW
9067ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
9068if test "x$ac_cv_have_decl_strstr" = x""yes; then :
9069 ac_have_decl=1
bec39cab 9070else
81ecdfbb
RW
9071 ac_have_decl=0
9072fi
5ee754fc 9073
81ecdfbb
RW
9074cat >>confdefs.h <<_ACEOF
9075#define HAVE_DECL_STRSTR $ac_have_decl
9076_ACEOF
9077ac_fn_c_check_decl "$LINENO" "getopt" "ac_cv_have_decl_getopt" "$ac_includes_default"
9078if test "x$ac_cv_have_decl_getopt" = x""yes; then :
9079 ac_have_decl=1
9080else
9081 ac_have_decl=0
5ee754fc 9082fi
81ecdfbb
RW
9083
9084cat >>confdefs.h <<_ACEOF
9085#define HAVE_DECL_GETOPT $ac_have_decl
9086_ACEOF
9087ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
9088if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
9089 ac_have_decl=1
9090else
9091 ac_have_decl=0
5ee754fc 9092fi
81ecdfbb
RW
9093
9094cat >>confdefs.h <<_ACEOF
9095#define HAVE_DECL_SNPRINTF $ac_have_decl
9096_ACEOF
9097ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
9098if test "x$ac_cv_have_decl_vsnprintf" = x""yes; then :
9099 ac_have_decl=1
9100else
9101 ac_have_decl=0
5ee754fc
MK
9102fi
9103
a9322a30 9104cat >>confdefs.h <<_ACEOF
81ecdfbb 9105#define HAVE_DECL_VSNPRINTF $ac_have_decl
a9322a30 9106_ACEOF
5ee754fc 9107
5ee754fc 9108
81ecdfbb
RW
9109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
9110$as_echo_n "checking for LC_MESSAGES... " >&6; }
9111if test "${am_cv_val_LC_MESSAGES+set}" = set; then :
9112 $as_echo_n "(cached) " >&6
bec39cab 9113else
81ecdfbb 9114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9115/* end confdefs.h. */
81ecdfbb 9116#include <locale.h>
a9322a30
TT
9117int
9118main ()
9119{
81ecdfbb 9120return LC_MESSAGES
a9322a30
TT
9121 ;
9122 return 0;
9123}
bec39cab 9124_ACEOF
81ecdfbb
RW
9125if ac_fn_c_try_link "$LINENO"; then :
9126 am_cv_val_LC_MESSAGES=yes
bec39cab 9127else
81ecdfbb
RW
9128 am_cv_val_LC_MESSAGES=no
9129fi
9130rm -f core conftest.err conftest.$ac_objext \
9131 conftest$ac_exeext conftest.$ac_ext
9132fi
9133{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
9134$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
9135 if test $am_cv_val_LC_MESSAGES = yes; then
bec39cab 9136
81ecdfbb
RW
9137$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
9138
9139 fi
9140
9141
9142# ----------------------- #
9143# Checks for structures. #
9144# ----------------------- #
9145
9146ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
9147if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
9148
9149cat >>confdefs.h <<_ACEOF
9150#define HAVE_STRUCT_STAT_ST_BLOCKS 1
7eb368b3 9151_ACEOF
7eb368b3 9152
81ecdfbb 9153
7eb368b3 9154fi
81ecdfbb
RW
9155ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
9156if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
7eb368b3 9157
a9322a30
TT
9158cat >>confdefs.h <<_ACEOF
9159#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
7eb368b3
NR
9160_ACEOF
9161
a9322a30 9162
7eb368b3
NR
9163fi
9164
7eb368b3 9165
a9322a30
TT
9166# ------------------ #
9167# Checks for types. #
9168# ------------------ #
7eb368b3 9169
81ecdfbb
RW
9170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
9171$as_echo_n "checking return type of signal handlers... " >&6; }
9172if test "${ac_cv_type_signal+set}" = set; then :
9173 $as_echo_n "(cached) " >&6
bec39cab 9174else
81ecdfbb 9175 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9176/* end confdefs.h. */
a9322a30
TT
9177#include <sys/types.h>
9178#include <signal.h>
7cb9022a 9179
a9322a30
TT
9180int
9181main ()
9182{
81ecdfbb 9183return *(signal (0, 0)) (0) == 1;
a9322a30
TT
9184 ;
9185 return 0;
9186}
bec39cab 9187_ACEOF
81ecdfbb
RW
9188if ac_fn_c_try_compile "$LINENO"; then :
9189 ac_cv_type_signal=int
bec39cab 9190else
81ecdfbb 9191 ac_cv_type_signal=void
bec39cab 9192fi
81ecdfbb 9193rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 9194fi
81ecdfbb
RW
9195{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
9196$as_echo "$ac_cv_type_signal" >&6; }
bec39cab 9197
a9322a30
TT
9198cat >>confdefs.h <<_ACEOF
9199#define RETSIGTYPE $ac_cv_type_signal
9200_ACEOF
5ee754fc 9201
bec39cab 9202
81ecdfbb 9203ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
a9322a30
TT
9204#include <sys/socket.h>
9205
81ecdfbb
RW
9206"
9207if test "x$ac_cv_type_socklen_t" = x""yes; then :
bec39cab 9208
a9322a30
TT
9209cat >>confdefs.h <<_ACEOF
9210#define HAVE_SOCKLEN_T 1
9211_ACEOF
9212
9213
9214fi
9215
9216
9217# ------------------------------------- #
9218# Checks for compiler characteristics. #
9219# ------------------------------------- #
9220
81ecdfbb
RW
9221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
9222$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
9223if test "${ac_cv_c_const+set}" = set; then :
9224 $as_echo_n "(cached) " >&6
a9322a30 9225else
81ecdfbb 9226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9227/* end confdefs.h. */
a9322a30
TT
9228
9229int
9230main ()
9231{
9232/* FIXME: Include the comments suggested by Paul. */
9233#ifndef __cplusplus
9234 /* Ultrix mips cc rejects this. */
9235 typedef int charset[2];
81ecdfbb 9236 const charset cs;
a9322a30 9237 /* SunOS 4.1.1 cc rejects this. */
81ecdfbb
RW
9238 char const *const *pcpcc;
9239 char **ppc;
a9322a30
TT
9240 /* NEC SVR4.0.2 mips cc rejects this. */
9241 struct point {int x, y;};
9242 static struct point const zero = {0,0};
9243 /* AIX XL C 1.02.0.0 rejects this.
9244 It does not let you subtract one const X* pointer from another in
9245 an arm of an if-expression whose if-part is not a constant
9246 expression */
9247 const char *g = "string";
81ecdfbb 9248 pcpcc = &g + (g ? g-g : 0);
a9322a30 9249 /* HPUX 7.0 cc rejects these. */
81ecdfbb
RW
9250 ++pcpcc;
9251 ppc = (char**) pcpcc;
9252 pcpcc = (char const *const *) ppc;
a9322a30
TT
9253 { /* SCO 3.2v4 cc rejects this. */
9254 char *t;
9255 char const *s = 0 ? (char *) 0 : (char const *) 0;
9256
9257 *t++ = 0;
81ecdfbb 9258 if (s) return 0;
a9322a30
TT
9259 }
9260 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
9261 int x[] = {25, 17};
9262 const int *foo = &x[0];
9263 ++foo;
9264 }
9265 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
9266 typedef const int *iptr;
9267 iptr p = 0;
9268 ++p;
9269 }
9270 { /* AIX XL C 1.02.0.0 rejects this saying
9271 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
9272 struct s { int j; const int *ap[3]; };
9273 struct s *b; b->j = 5;
9274 }
9275 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
9276 const int foo = 10;
81ecdfbb 9277 if (!foo) return 0;
a9322a30 9278 }
81ecdfbb 9279 return !cs[0] && !zero.x;
a9322a30
TT
9280#endif
9281
9282 ;
9283 return 0;
9284}
bec39cab 9285_ACEOF
81ecdfbb 9286if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 9287 ac_cv_c_const=yes
5ee754fc 9288else
81ecdfbb 9289 ac_cv_c_const=no
5ee754fc 9290fi
81ecdfbb 9291rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 9292fi
81ecdfbb
RW
9293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
9294$as_echo "$ac_cv_c_const" >&6; }
a9322a30 9295if test $ac_cv_c_const = no; then
bec39cab 9296
81ecdfbb 9297$as_echo "#define const /**/" >>confdefs.h
bec39cab 9298
5ee754fc 9299fi
bec39cab 9300
81ecdfbb
RW
9301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
9302$as_echo_n "checking for inline... " >&6; }
9303if test "${ac_cv_c_inline+set}" = set; then :
9304 $as_echo_n "(cached) " >&6
bec39cab 9305else
a9322a30
TT
9306 ac_cv_c_inline=no
9307for ac_kw in inline __inline__ __inline; do
81ecdfbb 9308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9309/* end confdefs.h. */
a9322a30
TT
9310#ifndef __cplusplus
9311typedef int foo_t;
9312static $ac_kw foo_t static_foo () {return 0; }
9313$ac_kw foo_t foo () {return 0; }
9314#endif
9315
bec39cab 9316_ACEOF
81ecdfbb
RW
9317if ac_fn_c_try_compile "$LINENO"; then :
9318 ac_cv_c_inline=$ac_kw
bec39cab 9319fi
81ecdfbb
RW
9320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9321 test "$ac_cv_c_inline" != no && break
a9322a30 9322done
bec39cab 9323
5ee754fc 9324fi
81ecdfbb
RW
9325{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
9326$as_echo "$ac_cv_c_inline" >&6; }
5ee754fc 9327
a9322a30
TT
9328case $ac_cv_c_inline in
9329 inline | yes) ;;
9330 *)
9331 case $ac_cv_c_inline in
9332 no) ac_val=;;
9333 *) ac_val=$ac_cv_c_inline;;
9334 esac
9335 cat >>confdefs.h <<_ACEOF
9336#ifndef __cplusplus
9337#define inline $ac_val
9338#endif
9339_ACEOF
bec39cab
AC
9340 ;;
9341esac
bec39cab 9342
81ecdfbb
RW
9343 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
9344$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
9345if test "${ac_cv_c_bigendian+set}" = set; then :
9346 $as_echo_n "(cached) " >&6
bec39cab 9347else
81ecdfbb
RW
9348 ac_cv_c_bigendian=unknown
9349 # See if we're dealing with a universal compiler.
9350 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9351/* end confdefs.h. */
9352#ifndef __APPLE_CC__
9353 not a universal capable compiler
9354 #endif
9355 typedef int dummy;
9356
9357_ACEOF
9358if ac_fn_c_try_compile "$LINENO"; then :
9359
9360 # Check for potential -arch flags. It is not universal unless
9361 # there are at least two -arch flags with different values.
9362 ac_arch=
9363 ac_prev=
9364 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
9365 if test -n "$ac_prev"; then
9366 case $ac_word in
9367 i?86 | x86_64 | ppc | ppc64)
9368 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
9369 ac_arch=$ac_word
9370 else
9371 ac_cv_c_bigendian=universal
9372 break
9373 fi
9374 ;;
9375 esac
9376 ac_prev=
9377 elif test "x$ac_word" = "x-arch"; then
9378 ac_prev=arch
9379 fi
9380 done
9381fi
9382rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9383 if test $ac_cv_c_bigendian = unknown; then
9384 # See if sys/param.h defines the BYTE_ORDER macro.
9385 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9386/* end confdefs.h. */
a9322a30 9387#include <sys/types.h>
81ecdfbb 9388 #include <sys/param.h>
a9322a30
TT
9389
9390int
9391main ()
9392{
81ecdfbb
RW
9393#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
9394 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
9395 && LITTLE_ENDIAN)
9396 bogus endian macros
9397 #endif
a9322a30
TT
9398
9399 ;
9400 return 0;
9401}
bec39cab 9402_ACEOF
81ecdfbb 9403if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 9404 # It does; now see whether it defined to BIG_ENDIAN or not.
81ecdfbb 9405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9406/* end confdefs.h. */
a9322a30 9407#include <sys/types.h>
81ecdfbb 9408 #include <sys/param.h>
a9322a30
TT
9409
9410int
9411main ()
9412{
9413#if BYTE_ORDER != BIG_ENDIAN
81ecdfbb
RW
9414 not big endian
9415 #endif
a9322a30
TT
9416
9417 ;
9418 return 0;
9419}
bec39cab 9420_ACEOF
81ecdfbb 9421if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 9422 ac_cv_c_bigendian=yes
5ee754fc 9423else
81ecdfbb 9424 ac_cv_c_bigendian=no
5ee754fc 9425fi
81ecdfbb
RW
9426rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9427fi
9428rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9429 fi
9430 if test $ac_cv_c_bigendian = unknown; then
9431 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
9432 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9433/* end confdefs.h. */
9434#include <limits.h>
bec39cab 9435
81ecdfbb
RW
9436int
9437main ()
9438{
9439#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
9440 bogus endian macros
9441 #endif
9442
9443 ;
9444 return 0;
9445}
7eb368b3 9446_ACEOF
81ecdfbb
RW
9447if ac_fn_c_try_compile "$LINENO"; then :
9448 # It does; now see whether it defined to _BIG_ENDIAN or not.
9449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7eb368b3 9450/* end confdefs.h. */
81ecdfbb
RW
9451#include <limits.h>
9452
7eb368b3
NR
9453int
9454main ()
9455{
81ecdfbb
RW
9456#ifndef _BIG_ENDIAN
9457 not big endian
9458 #endif
9459
7eb368b3
NR
9460 ;
9461 return 0;
9462}
9463_ACEOF
81ecdfbb 9464if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 9465 ac_cv_c_bigendian=yes
81ecdfbb
RW
9466else
9467 ac_cv_c_bigendian=no
a9322a30 9468fi
81ecdfbb 9469rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30 9470fi
81ecdfbb
RW
9471rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9472 fi
9473 if test $ac_cv_c_bigendian = unknown; then
9474 # Compile a test program.
9475 if test "$cross_compiling" = yes; then :
9476 # Try to guess by grepping values from an object file.
9477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9478/* end confdefs.h. */
9479short int ascii_mm[] =
9480 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
9481 short int ascii_ii[] =
9482 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
9483 int use_ascii (int i) {
9484 return ascii_mm[i] + ascii_ii[i];
9485 }
9486 short int ebcdic_ii[] =
9487 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
9488 short int ebcdic_mm[] =
9489 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
9490 int use_ebcdic (int i) {
9491 return ebcdic_mm[i] + ebcdic_ii[i];
9492 }
9493 extern int foo;
7eb368b3 9494
81ecdfbb
RW
9495int
9496main ()
9497{
9498return use_ascii (foo) == use_ebcdic (foo);
9499 ;
9500 return 0;
9501}
9502_ACEOF
9503if ac_fn_c_try_compile "$LINENO"; then :
9504 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
9505 ac_cv_c_bigendian=yes
9506 fi
9507 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
9508 if test "$ac_cv_c_bigendian" = unknown; then
9509 ac_cv_c_bigendian=no
9510 else
9511 # finding both strings is unlikely to happen, but who knows?
9512 ac_cv_c_bigendian=unknown
9513 fi
9514 fi
7eb368b3 9515fi
81ecdfbb 9516rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 9517else
81ecdfbb 9518 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9519/* end confdefs.h. */
81ecdfbb 9520$ac_includes_default
d3ea6809
MM
9521int
9522main ()
9523{
81ecdfbb
RW
9524
9525 /* Are we little or big endian? From Harbison&Steele. */
9526 union
9527 {
9528 long int l;
9529 char c[sizeof (long int)];
9530 } u;
9531 u.l = 1;
9532 return u.c[sizeof (long int) - 1] == 1;
9533
9534 ;
9535 return 0;
d3ea6809
MM
9536}
9537_ACEOF
81ecdfbb 9538if ac_fn_c_try_run "$LINENO"; then :
a9322a30 9539 ac_cv_c_bigendian=no
d3ea6809 9540else
81ecdfbb 9541 ac_cv_c_bigendian=yes
d3ea6809 9542fi
81ecdfbb
RW
9543rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9544 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 9545fi
a9322a30 9546
81ecdfbb
RW
9547 fi
9548fi
9549{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
9550$as_echo "$ac_cv_c_bigendian" >&6; }
9551 case $ac_cv_c_bigendian in #(
9552 yes)
9553 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
9554;; #(
9555 no)
9556 ;; #(
9557 universal)
9558
9559$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
9560
9561 ;; #(
9562 *)
9563 as_fn_error "unknown endianness
9564 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
9565 esac
d3ea6809
MM
9566
9567
a9322a30
TT
9568# ------------------------------ #
9569# Checks for library functions. #
9570# ------------------------------ #
d3ea6809 9571
a9322a30
TT
9572# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
9573# for constant arguments. Useless!
81ecdfbb
RW
9574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
9575$as_echo_n "checking for working alloca.h... " >&6; }
9576if test "${ac_cv_working_alloca_h+set}" = set; then :
9577 $as_echo_n "(cached) " >&6
d3ea6809 9578else
81ecdfbb 9579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d3ea6809 9580/* end confdefs.h. */
a9322a30 9581#include <alloca.h>
bec39cab
AC
9582int
9583main ()
9584{
a9322a30 9585char *p = (char *) alloca (2 * sizeof (int));
81ecdfbb 9586 if (p) return 0;
bec39cab
AC
9587 ;
9588 return 0;
9589}
9590_ACEOF
81ecdfbb 9591if ac_fn_c_try_link "$LINENO"; then :
a9322a30 9592 ac_cv_working_alloca_h=yes
bec39cab 9593else
81ecdfbb 9594 ac_cv_working_alloca_h=no
bec39cab 9595fi
81ecdfbb
RW
9596rm -f core conftest.err conftest.$ac_objext \
9597 conftest$ac_exeext conftest.$ac_ext
bec39cab 9598fi
81ecdfbb
RW
9599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
9600$as_echo "$ac_cv_working_alloca_h" >&6; }
a9322a30
TT
9601if test $ac_cv_working_alloca_h = yes; then
9602
81ecdfbb 9603$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
c906108c 9604
c906108c 9605fi
bec39cab 9606
81ecdfbb
RW
9607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
9608$as_echo_n "checking for alloca... " >&6; }
9609if test "${ac_cv_func_alloca_works+set}" = set; then :
9610 $as_echo_n "(cached) " >&6
bec39cab 9611else
81ecdfbb 9612 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9613/* end confdefs.h. */
a9322a30
TT
9614#ifdef __GNUC__
9615# define alloca __builtin_alloca
b4e70030 9616#else
a9322a30
TT
9617# ifdef _MSC_VER
9618# include <malloc.h>
9619# define alloca _alloca
9620# else
81ecdfbb 9621# ifdef HAVE_ALLOCA_H
a9322a30
TT
9622# include <alloca.h>
9623# else
9624# ifdef _AIX
9625 #pragma alloca
9626# else
9627# ifndef alloca /* predefined by HP cc +Olibcalls */
9628char *alloca ();
9629# endif
9630# endif
9631# endif
9632# endif
c906108c 9633#endif
97bf5e38 9634
bec39cab
AC
9635int
9636main ()
9637{
a9322a30 9638char *p = (char *) alloca (1);
81ecdfbb 9639 if (p) return 0;
bec39cab
AC
9640 ;
9641 return 0;
9642}
9643_ACEOF
81ecdfbb 9644if ac_fn_c_try_link "$LINENO"; then :
a9322a30 9645 ac_cv_func_alloca_works=yes
bec39cab 9646else
81ecdfbb 9647 ac_cv_func_alloca_works=no
bec39cab 9648fi
81ecdfbb
RW
9649rm -f core conftest.err conftest.$ac_objext \
9650 conftest$ac_exeext conftest.$ac_ext
bec39cab 9651fi
81ecdfbb
RW
9652{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
9653$as_echo "$ac_cv_func_alloca_works" >&6; }
a9322a30
TT
9654
9655if test $ac_cv_func_alloca_works = yes; then
9656
81ecdfbb 9657$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
c906108c 9658
a9322a30
TT
9659else
9660 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
9661# that cause trouble. Some versions do not even contain alloca or
9662# contain a buggy version. If you still want to use their alloca,
9663# use ar to extract alloca.o from them instead of compiling alloca.c.
9664
81ecdfbb 9665ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
a9322a30 9666
81ecdfbb 9667$as_echo "#define C_ALLOCA 1" >>confdefs.h
c906108c 9668
bec39cab 9669
81ecdfbb
RW
9670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
9671$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
9672if test "${ac_cv_os_cray+set}" = set; then :
9673 $as_echo_n "(cached) " >&6
a9322a30 9674else
81ecdfbb 9675 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30 9676/* end confdefs.h. */
81ecdfbb 9677#if defined CRAY && ! defined CRAY2
a9322a30
TT
9678webecray
9679#else
9680wenotbecray
9681#endif
9682
9683_ACEOF
9684if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb 9685 $EGREP "webecray" >/dev/null 2>&1; then :
a9322a30
TT
9686 ac_cv_os_cray=yes
9687else
81ecdfbb 9688 ac_cv_os_cray=no
bec39cab 9689fi
81ecdfbb
RW
9690rm -f conftest*
9691
bec39cab 9692fi
81ecdfbb
RW
9693{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
9694$as_echo "$ac_cv_os_cray" >&6; }
9695if test $ac_cv_os_cray = yes; then
9696 for ac_func in _getb67 GETB67 getb67; do
9697 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9698ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9699eval as_val=\$$as_ac_var
9700 if test "x$as_val" = x""yes; then :
a9322a30
TT
9701
9702cat >>confdefs.h <<_ACEOF
9703#define CRAY_STACKSEG_END $ac_func
bec39cab 9704_ACEOF
c906108c 9705
a9322a30 9706 break
c906108c
SS
9707fi
9708
a9322a30
TT
9709 done
9710fi
bec39cab 9711
81ecdfbb
RW
9712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
9713$as_echo_n "checking stack direction for C alloca... " >&6; }
9714if test "${ac_cv_c_stack_direction+set}" = set; then :
9715 $as_echo_n "(cached) " >&6
a9322a30 9716else
81ecdfbb 9717 if test "$cross_compiling" = yes; then :
a9322a30 9718 ac_cv_c_stack_direction=0
bec39cab 9719else
81ecdfbb 9720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9721/* end confdefs.h. */
81ecdfbb 9722$ac_includes_default
a9322a30
TT
9723int
9724find_stack_direction ()
b4e70030 9725{
a9322a30
TT
9726 static char *addr = 0;
9727 auto char dummy;
9728 if (addr == 0)
9729 {
9730 addr = &dummy;
9731 return find_stack_direction ();
9732 }
9733 else
9734 return (&dummy > addr) ? 1 : -1;
b4e70030 9735}
b757528f 9736
bec39cab
AC
9737int
9738main ()
9739{
81ecdfbb 9740 return find_stack_direction () < 0;
bec39cab
AC
9741}
9742_ACEOF
81ecdfbb 9743if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
9744 ac_cv_c_stack_direction=1
9745else
81ecdfbb 9746 ac_cv_c_stack_direction=-1
a9322a30 9747fi
81ecdfbb
RW
9748rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9749 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 9750fi
a9322a30 9751
81ecdfbb
RW
9752fi
9753{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
9754$as_echo "$ac_cv_c_stack_direction" >&6; }
a9322a30
TT
9755cat >>confdefs.h <<_ACEOF
9756#define STACK_DIRECTION $ac_cv_c_stack_direction
9757_ACEOF
9758
9759
9760fi
9761
a9322a30 9762for ac_header in stdlib.h unistd.h
81ecdfbb
RW
9763do :
9764 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9765ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9766eval as_val=\$$as_ac_Header
9767 if test "x$as_val" = x""yes; then :
bec39cab 9768 cat >>confdefs.h <<_ACEOF
81ecdfbb 9769#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 9770_ACEOF
b757528f 9771
b757528f 9772fi
bec39cab 9773
a9322a30 9774done
a3828db0 9775
a9322a30 9776for ac_func in getpagesize
81ecdfbb
RW
9777do :
9778 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
9779if test "x$ac_cv_func_getpagesize" = x""yes; then :
bec39cab 9780 cat >>confdefs.h <<_ACEOF
81ecdfbb 9781#define HAVE_GETPAGESIZE 1
bec39cab 9782_ACEOF
bcb3dc3d 9783
bcb3dc3d
MK
9784fi
9785done
9786
81ecdfbb
RW
9787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
9788$as_echo_n "checking for working mmap... " >&6; }
9789if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then :
9790 $as_echo_n "(cached) " >&6
a9322a30 9791else
81ecdfbb 9792 if test "$cross_compiling" = yes; then :
a9322a30 9793 ac_cv_func_mmap_fixed_mapped=no
bec39cab 9794else
81ecdfbb 9795 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9796/* end confdefs.h. */
a9322a30
TT
9797$ac_includes_default
9798/* malloc might have been renamed as rpl_malloc. */
9799#undef malloc
bec39cab 9800
a9322a30
TT
9801/* Thanks to Mike Haertel and Jim Avera for this test.
9802 Here is a matrix of mmap possibilities:
9803 mmap private not fixed
9804 mmap private fixed at somewhere currently unmapped
9805 mmap private fixed at somewhere already mapped
9806 mmap shared not fixed
9807 mmap shared fixed at somewhere currently unmapped
9808 mmap shared fixed at somewhere already mapped
9809 For private mappings, we should verify that changes cannot be read()
9810 back from the file, nor mmap's back from the file at a different
9811 address. (There have been systems where private was not correctly
9812 implemented like the infamous i386 svr4.0, and systems where the
9813 VM page cache was not coherent with the file system buffer cache
9814 like early versions of FreeBSD and possibly contemporary NetBSD.)
9815 For shared mappings, we should conversely verify that changes get
9816 propagated back to all the places they're supposed to be.
bec39cab 9817
a9322a30
TT
9818 Grep wants private fixed already mapped.
9819 The main things grep needs to know about mmap are:
9820 * does it exist and is it safe to write into the mmap'd area
9821 * how to use it (BSD variants) */
8b9cf735 9822
a9322a30
TT
9823#include <fcntl.h>
9824#include <sys/mman.h>
8b9cf735 9825
81ecdfbb 9826#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
a9322a30 9827char *malloc ();
a3828db0
MK
9828#endif
9829
a9322a30 9830/* This mess was copied from the GNU getpagesize.h. */
81ecdfbb 9831#ifndef HAVE_GETPAGESIZE
a9322a30 9832/* Assume that all systems that can run configure have sys/param.h. */
81ecdfbb 9833# ifndef HAVE_SYS_PARAM_H
a9322a30
TT
9834# define HAVE_SYS_PARAM_H 1
9835# endif
9836
9837# ifdef _SC_PAGESIZE
9838# define getpagesize() sysconf(_SC_PAGESIZE)
9839# else /* no _SC_PAGESIZE */
81ecdfbb 9840# ifdef HAVE_SYS_PARAM_H
a9322a30
TT
9841# include <sys/param.h>
9842# ifdef EXEC_PAGESIZE
9843# define getpagesize() EXEC_PAGESIZE
9844# else /* no EXEC_PAGESIZE */
9845# ifdef NBPG
9846# define getpagesize() NBPG * CLSIZE
9847# ifndef CLSIZE
9848# define CLSIZE 1
9849# endif /* no CLSIZE */
9850# else /* no NBPG */
9851# ifdef NBPC
9852# define getpagesize() NBPC
9853# else /* no NBPC */
9854# ifdef PAGESIZE
9855# define getpagesize() PAGESIZE
9856# endif /* PAGESIZE */
9857# endif /* no NBPC */
9858# endif /* no NBPG */
9859# endif /* no EXEC_PAGESIZE */
9860# else /* no HAVE_SYS_PARAM_H */
9861# define getpagesize() 8192 /* punt totally */
9862# endif /* no HAVE_SYS_PARAM_H */
9863# endif /* no _SC_PAGESIZE */
9864
9865#endif /* no HAVE_GETPAGESIZE */
9866
bec39cab
AC
9867int
9868main ()
9869{
a9322a30
TT
9870 char *data, *data2, *data3;
9871 int i, pagesize;
9872 int fd;
9873
9874 pagesize = getpagesize ();
9875
9876 /* First, make a file with some known garbage in it. */
9877 data = (char *) malloc (pagesize);
9878 if (!data)
81ecdfbb 9879 return 1;
a9322a30
TT
9880 for (i = 0; i < pagesize; ++i)
9881 *(data + i) = rand ();
9882 umask (0);
9883 fd = creat ("conftest.mmap", 0600);
9884 if (fd < 0)
81ecdfbb 9885 return 1;
a9322a30 9886 if (write (fd, data, pagesize) != pagesize)
81ecdfbb 9887 return 1;
a9322a30
TT
9888 close (fd);
9889
9890 /* Next, try to mmap the file at a fixed address which already has
9891 something else allocated at it. If we can, also make sure that
9892 we see the same garbage. */
9893 fd = open ("conftest.mmap", O_RDWR);
9894 if (fd < 0)
81ecdfbb 9895 return 1;
a9322a30
TT
9896 data2 = (char *) malloc (2 * pagesize);
9897 if (!data2)
81ecdfbb
RW
9898 return 1;
9899 data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
a9322a30
TT
9900 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
9901 MAP_PRIVATE | MAP_FIXED, fd, 0L))
81ecdfbb 9902 return 1;
a9322a30
TT
9903 for (i = 0; i < pagesize; ++i)
9904 if (*(data + i) != *(data2 + i))
81ecdfbb 9905 return 1;
a9322a30
TT
9906
9907 /* Finally, make sure that changes to the mapped area do not
9908 percolate back to the file as seen by read(). (This is a bug on
9909 some variants of i386 svr4.0.) */
9910 for (i = 0; i < pagesize; ++i)
9911 *(data2 + i) = *(data2 + i) + 1;
9912 data3 = (char *) malloc (pagesize);
9913 if (!data3)
81ecdfbb 9914 return 1;
a9322a30 9915 if (read (fd, data3, pagesize) != pagesize)
81ecdfbb 9916 return 1;
a9322a30
TT
9917 for (i = 0; i < pagesize; ++i)
9918 if (*(data + i) != *(data3 + i))
81ecdfbb 9919 return 1;
a9322a30 9920 close (fd);
81ecdfbb 9921 return 0;
bec39cab
AC
9922}
9923_ACEOF
81ecdfbb 9924if ac_fn_c_try_run "$LINENO"; then :
a9322a30 9925 ac_cv_func_mmap_fixed_mapped=yes
086ec9eb 9926else
81ecdfbb 9927 ac_cv_func_mmap_fixed_mapped=no
a3828db0 9928fi
81ecdfbb
RW
9929rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9930 conftest.$ac_objext conftest.beam conftest.$ac_ext
a3828db0 9931fi
81ecdfbb 9932
a9322a30 9933fi
81ecdfbb
RW
9934{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
9935$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
a9322a30
TT
9936if test $ac_cv_func_mmap_fixed_mapped = yes; then
9937
81ecdfbb 9938$as_echo "#define HAVE_MMAP 1" >>confdefs.h
a3828db0 9939
086ec9eb 9940fi
a9322a30 9941rm -f conftest.mmap
a3828db0 9942
81ecdfbb
RW
9943ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
9944if test "x$ac_cv_type_pid_t" = x""yes; then :
bec39cab 9945
a9322a30
TT
9946else
9947
9948cat >>confdefs.h <<_ACEOF
9949#define pid_t int
bec39cab 9950_ACEOF
086ec9eb
MK
9951
9952fi
9953
81ecdfbb
RW
9954for ac_header in vfork.h
9955do :
9956 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
9957if test "x$ac_cv_header_vfork_h" = x""yes; then :
a3828db0 9958 cat >>confdefs.h <<_ACEOF
81ecdfbb 9959#define HAVE_VFORK_H 1
bec39cab 9960_ACEOF
c906108c
SS
9961
9962fi
a9322a30 9963
a3828db0 9964done
c906108c 9965
a9322a30 9966for ac_func in fork vfork
81ecdfbb
RW
9967do :
9968 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9969ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9970eval as_val=\$$as_ac_var
9971 if test "x$as_val" = x""yes; then :
a3828db0 9972 cat >>confdefs.h <<_ACEOF
81ecdfbb 9973#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 9974_ACEOF
b83266a0 9975
97bf5e38 9976fi
a3828db0 9977done
b83266a0 9978
a9322a30 9979if test "x$ac_cv_func_fork" = xyes; then
81ecdfbb
RW
9980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
9981$as_echo_n "checking for working fork... " >&6; }
9982if test "${ac_cv_func_fork_works+set}" = set; then :
9983 $as_echo_n "(cached) " >&6
a9322a30 9984else
81ecdfbb 9985 if test "$cross_compiling" = yes; then :
a9322a30
TT
9986 ac_cv_func_fork_works=cross
9987else
81ecdfbb
RW
9988 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9989/* end confdefs.h. */
9990$ac_includes_default
9991int
9992main ()
9993{
9994
9995 /* By Ruediger Kuhlmann. */
9996 return fork () < 0;
9997
9998 ;
9999 return 0;
10000}
a9322a30 10001_ACEOF
81ecdfbb 10002if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
10003 ac_cv_func_fork_works=yes
10004else
81ecdfbb 10005 ac_cv_func_fork_works=no
a9322a30 10006fi
81ecdfbb
RW
10007rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10008 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 10009fi
81ecdfbb 10010
a9322a30 10011fi
81ecdfbb
RW
10012{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
10013$as_echo "$ac_cv_func_fork_works" >&6; }
a9322a30
TT
10014
10015else
10016 ac_cv_func_fork_works=$ac_cv_func_fork
10017fi
10018if test "x$ac_cv_func_fork_works" = xcross; then
10019 case $host in
10020 *-*-amigaos* | *-*-msdosdjgpp*)
10021 # Override, as these systems have only a dummy fork() stub
10022 ac_cv_func_fork_works=no
10023 ;;
10024 *)
10025 ac_cv_func_fork_works=yes
10026 ;;
10027 esac
81ecdfbb
RW
10028 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
10029$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
a9322a30
TT
10030fi
10031ac_cv_func_vfork_works=$ac_cv_func_vfork
10032if test "x$ac_cv_func_vfork" = xyes; then
81ecdfbb
RW
10033 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
10034$as_echo_n "checking for working vfork... " >&6; }
10035if test "${ac_cv_func_vfork_works+set}" = set; then :
10036 $as_echo_n "(cached) " >&6
a9322a30 10037else
81ecdfbb 10038 if test "$cross_compiling" = yes; then :
a9322a30
TT
10039 ac_cv_func_vfork_works=cross
10040else
81ecdfbb 10041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30
TT
10042/* end confdefs.h. */
10043/* Thanks to Paul Eggert for this test. */
81ecdfbb 10044$ac_includes_default
a9322a30 10045#include <sys/wait.h>
81ecdfbb 10046#ifdef HAVE_VFORK_H
a9322a30
TT
10047# include <vfork.h>
10048#endif
10049/* On some sparc systems, changes by the child to local and incoming
10050 argument registers are propagated back to the parent. The compiler
10051 is told about this with #include <vfork.h>, but some compilers
10052 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
10053 static variable whose address is put into a register that is
10054 clobbered by the vfork. */
10055static void
10056#ifdef __cplusplus
10057sparc_address_test (int arg)
10058# else
10059sparc_address_test (arg) int arg;
10060#endif
10061{
10062 static pid_t child;
10063 if (!child) {
10064 child = vfork ();
10065 if (child < 0) {
10066 perror ("vfork");
10067 _exit(2);
10068 }
10069 if (!child) {
10070 arg = getpid();
10071 write(-1, "", 0);
10072 _exit (arg);
10073 }
10074 }
10075}
10076
10077int
10078main ()
10079{
10080 pid_t parent = getpid ();
10081 pid_t child;
10082
10083 sparc_address_test (0);
10084
10085 child = vfork ();
10086
10087 if (child == 0) {
10088 /* Here is another test for sparc vfork register problems. This
10089 test uses lots of local variables, at least as many local
10090 variables as main has allocated so far including compiler
10091 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
10092 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
10093 reuse the register of parent for one of the local variables,
10094 since it will think that parent can't possibly be used any more
10095 in this routine. Assigning to the local variable will thus
10096 munge parent in the parent process. */
10097 pid_t
10098 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
10099 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
10100 /* Convince the compiler that p..p7 are live; otherwise, it might
10101 use the same hardware register for all 8 local variables. */
10102 if (p != p1 || p != p2 || p != p3 || p != p4
10103 || p != p5 || p != p6 || p != p7)
10104 _exit(1);
10105
10106 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
10107 from child file descriptors. If the child closes a descriptor
10108 before it execs or exits, this munges the parent's descriptor
10109 as well. Test for this by closing stdout in the child. */
10110 _exit(close(fileno(stdout)) != 0);
10111 } else {
10112 int status;
10113 struct stat st;
10114
10115 while (wait(&status) != child)
10116 ;
81ecdfbb 10117 return (
a9322a30
TT
10118 /* Was there some problem with vforking? */
10119 child < 0
10120
10121 /* Did the child fail? (This shouldn't happen.) */
10122 || status
10123
10124 /* Did the vfork/compiler bug occur? */
10125 || parent != getpid()
10126
10127 /* Did the file descriptor bug occur? */
10128 || fstat(fileno(stdout), &st) != 0
10129 );
10130 }
10131}
10132_ACEOF
81ecdfbb 10133if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
10134 ac_cv_func_vfork_works=yes
10135else
81ecdfbb 10136 ac_cv_func_vfork_works=no
a9322a30 10137fi
81ecdfbb
RW
10138rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10139 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 10140fi
81ecdfbb 10141
a9322a30 10142fi
81ecdfbb
RW
10143{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
10144$as_echo "$ac_cv_func_vfork_works" >&6; }
a9322a30
TT
10145
10146fi;
10147if test "x$ac_cv_func_fork_works" = xcross; then
10148 ac_cv_func_vfork_works=$ac_cv_func_vfork
81ecdfbb
RW
10149 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
10150$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
a9322a30
TT
10151fi
10152
10153if test "x$ac_cv_func_vfork_works" = xyes; then
10154
81ecdfbb 10155$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
a9322a30
TT
10156
10157else
10158
81ecdfbb 10159$as_echo "#define vfork fork" >>confdefs.h
a9322a30
TT
10160
10161fi
10162if test "x$ac_cv_func_fork_works" = xyes; then
10163
81ecdfbb 10164$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
a9322a30
TT
10165
10166fi
10167
7313baad 10168for ac_func in canonicalize_file_name realpath getrusage getuid getgid \
b9e7b9c3 10169 pipe poll pread pread64 pwrite readlink resize_term \
7313baad 10170 sbrk setpgid setpgrp setsid \
a9322a30 10171 sigaction sigprocmask sigsetmask socketpair syscall \
110ed339 10172 ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
1db33378 10173 setrlimit getrlimit posix_madvise waitpid lstat
81ecdfbb
RW
10174do :
10175 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10176ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10177eval as_val=\$$as_ac_var
10178 if test "x$as_val" = x""yes; then :
6c7a06a3 10179 cat >>confdefs.h <<_ACEOF
81ecdfbb 10180#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6c7a06a3
TT
10181_ACEOF
10182
10183fi
10184done
10185
10186
81ecdfbb
RW
10187 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
10188$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
10189if test "${am_cv_langinfo_codeset+set}" = set; then :
10190 $as_echo_n "(cached) " >&6
6c7a06a3 10191else
81ecdfbb 10192 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
10193/* end confdefs.h. */
10194#include <langinfo.h>
10195int
10196main ()
10197{
10198char* cs = nl_langinfo(CODESET);
bec39cab
AC
10199 ;
10200 return 0;
10201}
10202_ACEOF
81ecdfbb 10203if ac_fn_c_try_link "$LINENO"; then :
6c7a06a3 10204 am_cv_langinfo_codeset=yes
a4db0f07 10205else
81ecdfbb 10206 am_cv_langinfo_codeset=no
a4db0f07 10207fi
81ecdfbb
RW
10208rm -f core conftest.err conftest.$ac_objext \
10209 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 10210
a4db0f07 10211fi
81ecdfbb
RW
10212{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
10213$as_echo "$am_cv_langinfo_codeset" >&6; }
6c7a06a3
TT
10214 if test $am_cv_langinfo_codeset = yes; then
10215
81ecdfbb 10216$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
a4db0f07 10217
6c7a06a3 10218 fi
c906108c 10219
06825bd1 10220
a3828db0
MK
10221# Check the return and argument types of ptrace. No canned test for
10222# this, so roll our own.
10223gdb_ptrace_headers='
10224#if HAVE_SYS_TYPES_H
10225# include <sys/types.h>
10226#endif
10227#if HAVE_SYS_PTRACE_H
10228# include <sys/ptrace.h>
10229#endif
10230#if HAVE_UNISTD_H
10231# include <unistd.h>
10232#endif
10233'
10234# There is no point in checking if we don't have a prototype.
81ecdfbb
RW
10235ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers
10236"
10237if test "x$ac_cv_have_decl_ptrace" = x""yes; then :
10238 ac_have_decl=1
06825bd1 10239else
81ecdfbb 10240 ac_have_decl=0
06825bd1 10241fi
06825bd1 10242
a3828db0 10243cat >>confdefs.h <<_ACEOF
81ecdfbb 10244#define HAVE_DECL_PTRACE $ac_have_decl
a3828db0 10245_ACEOF
81ecdfbb 10246if test $ac_have_decl = 1; then :
bec39cab 10247
a3828db0 10248else
a3828db0
MK
10249
10250 : ${gdb_cv_func_ptrace_ret='int'}
10251 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
10252
06825bd1
MK
10253fi
10254
064ef605
DJ
10255# Check return type. Varargs (used on GNU/Linux) conflict with the
10256# empty argument list, so check for that explicitly.
81ecdfbb
RW
10257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
10258$as_echo_n "checking return type of ptrace... " >&6; }
10259if test "${gdb_cv_func_ptrace_ret+set}" = set; then :
10260 $as_echo_n "(cached) " >&6
bec39cab 10261else
81ecdfbb 10262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10263/* end confdefs.h. */
a3828db0 10264$gdb_ptrace_headers
bec39cab
AC
10265int
10266main ()
10267{
064ef605
DJ
10268extern long ptrace (enum __ptrace_request, ...);
10269 ;
10270 return 0;
10271}
10272_ACEOF
81ecdfbb 10273if ac_fn_c_try_compile "$LINENO"; then :
064ef605
DJ
10274 gdb_cv_func_ptrace_ret='long'
10275else
81ecdfbb 10276 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
10277/* end confdefs.h. */
10278$gdb_ptrace_headers
10279int
10280main ()
10281{
a3828db0 10282extern int ptrace ();
bec39cab
AC
10283 ;
10284 return 0;
10285}
10286_ACEOF
81ecdfbb 10287if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10288 gdb_cv_func_ptrace_ret='int'
70f9f479 10289else
81ecdfbb 10290 gdb_cv_func_ptrace_ret='long'
70f9f479 10291fi
81ecdfbb 10292rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
70f9f479 10293fi
81ecdfbb 10294rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
064ef605 10295fi
81ecdfbb
RW
10296{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
10297$as_echo "$gdb_cv_func_ptrace_ret" >&6; }
bec39cab 10298
a3828db0
MK
10299cat >>confdefs.h <<_ACEOF
10300#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
bec39cab 10301_ACEOF
70f9f479 10302
a3828db0 10303# Check argument types.
81ecdfbb
RW
10304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
10305$as_echo_n "checking types of arguments for ptrace... " >&6; }
10306if test "${gdb_cv_func_ptrace_args+set}" = set; then :
10307 $as_echo_n "(cached) " >&6
bec39cab 10308else
a3828db0 10309
81ecdfbb 10310 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
10311/* end confdefs.h. */
10312$gdb_ptrace_headers
10313int
10314main ()
10315{
10316extern long ptrace (enum __ptrace_request, ...);
10317 ;
10318 return 0;
10319}
10320_ACEOF
81ecdfbb 10321if ac_fn_c_try_compile "$LINENO"; then :
064ef605
DJ
10322 gdb_cv_func_ptrace_args='int,int,long,long'
10323else
064ef605 10324
a3828db0
MK
10325for gdb_arg1 in 'int' 'long'; do
10326 for gdb_arg2 in 'pid_t' 'int' 'long'; do
5ed10e6e 10327 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
a3828db0 10328 for gdb_arg4 in 'int' 'long'; do
81ecdfbb 10329 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10330/* end confdefs.h. */
a3828db0 10331$gdb_ptrace_headers
bec39cab
AC
10332int
10333main ()
10334{
a3828db0
MK
10335
10336extern $gdb_cv_func_ptrace_ret
10337 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
10338
bec39cab
AC
10339 ;
10340 return 0;
10341}
10342_ACEOF
81ecdfbb 10343if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
10344 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
10345 break 4;
5c7f2947 10346fi
81ecdfbb 10347rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0 10348 for gdb_arg5 in 'int *' 'int' 'long'; do
81ecdfbb 10349 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10350/* end confdefs.h. */
a3828db0 10351$gdb_ptrace_headers
bec39cab
AC
10352int
10353main ()
10354{
a3828db0
MK
10355
10356extern $gdb_cv_func_ptrace_ret
10357 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
10358
bec39cab
AC
10359 ;
10360 return 0;
10361}
10362_ACEOF
81ecdfbb 10363if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
10364
10365gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
10366 break 5;
78434e59 10367fi
81ecdfbb 10368rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0
MK
10369 done
10370 done
10371 done
10372 done
10373done
10374# Provide a safe default value.
10375: ${gdb_cv_func_ptrace_args='int,int,long,long'}
10376
064ef605 10377fi
81ecdfbb 10378rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
78434e59 10379fi
81ecdfbb
RW
10380{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
10381$as_echo "$gdb_cv_func_ptrace_args" >&6; }
a3828db0
MK
10382ac_save_IFS=$IFS; IFS=','
10383set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
10384IFS=$ac_save_IFS
10385shift
bec39cab 10386
a3828db0
MK
10387cat >>confdefs.h <<_ACEOF
10388#define PTRACE_TYPE_ARG3 $3
10389_ACEOF
10390
10391if test -n "$5"; then
10392
10393cat >>confdefs.h <<_ACEOF
10394#define PTRACE_TYPE_ARG5 $5
bec39cab 10395_ACEOF
78434e59
MK
10396
10397fi
10398
a3828db0 10399if test "$cross_compiling" = no; then
81ecdfbb
RW
10400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
10401$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
10402if test "${ac_cv_func_setpgrp_void+set}" = set; then :
10403 $as_echo_n "(cached) " >&6
a3828db0 10404else
81ecdfbb
RW
10405 if test "$cross_compiling" = yes; then :
10406 as_fn_error "cannot check setpgrp when cross compiling" "$LINENO" 5
bec39cab 10407else
81ecdfbb 10408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10409/* end confdefs.h. */
81ecdfbb 10410$ac_includes_default
bec39cab
AC
10411int
10412main ()
10413{
a3828db0
MK
10414/* If this system has a BSD-style setpgrp which takes arguments,
10415 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
10416 exit successfully. */
81ecdfbb 10417 return setpgrp (1,1) != -1;
bec39cab
AC
10418 ;
10419 return 0;
10420}
10421_ACEOF
81ecdfbb 10422if ac_fn_c_try_run "$LINENO"; then :
a3828db0 10423 ac_cv_func_setpgrp_void=no
c906108c 10424else
81ecdfbb 10425 ac_cv_func_setpgrp_void=yes
c906108c 10426fi
81ecdfbb
RW
10427rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10428 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 10429fi
81ecdfbb 10430
a3828db0 10431fi
81ecdfbb
RW
10432{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
10433$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0
MK
10434if test $ac_cv_func_setpgrp_void = yes; then
10435
81ecdfbb 10436$as_echo "#define SETPGRP_VOID 1" >>confdefs.h
97bf5e38
MK
10437
10438fi
a3828db0
MK
10439
10440else
81ecdfbb
RW
10441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
10442$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
10443if test "${ac_cv_func_setpgrp_void+set}" = set; then :
10444 $as_echo_n "(cached) " >&6
97bf5e38 10445else
81ecdfbb 10446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10447/* end confdefs.h. */
a3828db0
MK
10448
10449#include <unistd.h>
10450
bec39cab
AC
10451int
10452main ()
10453{
a3828db0
MK
10454
10455 if (setpgrp(1,1) == -1)
10456 exit (0);
10457 else
10458 exit (1);
10459
bec39cab
AC
10460 ;
10461 return 0;
10462}
10463_ACEOF
81ecdfbb 10464if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10465 ac_cv_func_setpgrp_void=no
c906108c 10466else
81ecdfbb 10467 ac_cv_func_setpgrp_void=yes
c906108c 10468fi
81ecdfbb 10469rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 10470fi
81ecdfbb
RW
10471{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
10472$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0 10473if test $ac_cv_func_setpgrp_void = yes; then
81ecdfbb 10474 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
c3f6f71d 10475
a3828db0 10476fi
c906108c
SS
10477fi
10478
a3828db0
MK
10479# Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do
10480# since sigsetjmp might only be defined as a macro.
81ecdfbb
RW
10481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
10482$as_echo_n "checking for sigsetjmp... " >&6; }
10483if test "${gdb_cv_func_sigsetjmp+set}" = set; then :
10484 $as_echo_n "(cached) " >&6
bec39cab 10485else
81ecdfbb 10486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10487/* end confdefs.h. */
a3828db0
MK
10488
10489#include <setjmp.h>
10490
bec39cab
AC
10491int
10492main ()
10493{
a3828db0 10494sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
bec39cab
AC
10495 ;
10496 return 0;
10497}
10498_ACEOF
81ecdfbb 10499if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10500 gdb_cv_func_sigsetjmp=yes
c906108c 10501else
81ecdfbb 10502 gdb_cv_func_sigsetjmp=no
c906108c 10503fi
81ecdfbb 10504rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 10505fi
81ecdfbb
RW
10506{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
10507$as_echo "$gdb_cv_func_sigsetjmp" >&6; }
a3828db0 10508if test $gdb_cv_func_sigsetjmp = yes; then
c906108c 10509
81ecdfbb 10510$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
c906108c 10511
97bf5e38 10512fi
c906108c 10513
a3828db0
MK
10514# Assume we'll default to using the included libiberty regex.
10515gdb_use_included_regex=yes
10516
10517# However, if the system regex is GNU regex, then default to *not*
10518# using the included regex.
81ecdfbb
RW
10519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5
10520$as_echo_n "checking for GNU regex... " >&6; }
10521if test "${gdb_cv_have_gnu_regex+set}" = set; then :
10522 $as_echo_n "(cached) " >&6
bec39cab 10523else
81ecdfbb 10524 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10525/* end confdefs.h. */
a3828db0 10526#include <gnu-versions.h>
bec39cab
AC
10527int
10528main ()
10529{
81ecdfbb
RW
10530#define REGEX_INTERFACE_VERSION 1
10531#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
10532# error "Version mismatch"
10533#endif
5c45e068
MK
10534 ;
10535 return 0;
10536}
10537_ACEOF
81ecdfbb
RW
10538if ac_fn_c_try_compile "$LINENO"; then :
10539 gdb_cv_have_gnu_regex=yes
5c45e068 10540else
81ecdfbb
RW
10541 gdb_cv_have_gnu_regex=no
10542fi
10543rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10544fi
10545{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
10546$as_echo "$gdb_cv_have_gnu_regex" >&6; }
10547if test $gdb_cv_have_gnu_regex = yes; then
10548 gdb_use_included_regex=no
5c45e068 10549fi
81ecdfbb
RW
10550
10551
10552# Check whether --with-included-regex was given.
10553if test "${with_included_regex+set}" = set; then :
10554 withval=$with_included_regex; gdb_with_regex=$withval
10555else
10556 gdb_with_regex=$gdb_use_included_regex
c906108c 10557fi
81ecdfbb
RW
10558
10559if test "$gdb_with_regex" = yes; then
10560
10561$as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h
10562
c906108c 10563fi
81ecdfbb
RW
10564
10565# Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
10566ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
10567#include <sys/proc.h>
10568
10569"
10570if test "x$ac_cv_member_struct_thread_td_pcb" = x""yes; then :
c906108c 10571
5c45e068 10572cat >>confdefs.h <<_ACEOF
a3828db0 10573#define HAVE_STRUCT_THREAD_TD_PCB 1
bec39cab 10574_ACEOF
c906108c 10575
5c45e068 10576
97bf5e38 10577fi
c906108c 10578
5c45e068 10579
a3828db0 10580# See if <sys/lwp.h> defines `struct lwp`.
81ecdfbb
RW
10581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
10582$as_echo_n "checking for struct lwp... " >&6; }
10583if test "${gdb_cv_struct_lwp+set}" = set; then :
10584 $as_echo_n "(cached) " >&6
bec39cab 10585else
81ecdfbb 10586 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10587/* end confdefs.h. */
a3828db0
MK
10588#include <sys/param.h>
10589#include <sys/lwp.h>
bec39cab
AC
10590int
10591main ()
10592{
a3828db0 10593struct lwp l;
bec39cab
AC
10594 ;
10595 return 0;
10596}
10597_ACEOF
81ecdfbb 10598if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10599 gdb_cv_struct_lwp=yes
c906108c 10600else
81ecdfbb 10601 gdb_cv_struct_lwp=no
c906108c 10602fi
81ecdfbb 10603rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 10604fi
81ecdfbb
RW
10605{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
10606$as_echo "$gdb_cv_struct_lwp" >&6; }
a3828db0 10607if test $gdb_cv_struct_lwp = yes; then
c906108c 10608
81ecdfbb 10609$as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
c906108c 10610
97bf5e38 10611fi
c906108c 10612
a3828db0 10613# See if <machine/reg.h> degines `struct reg'.
81ecdfbb
RW
10614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
10615$as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
10616if test "${gdb_cv_struct_reg+set}" = set; then :
10617 $as_echo_n "(cached) " >&6
bec39cab 10618else
81ecdfbb 10619 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10620/* end confdefs.h. */
a3828db0
MK
10621#include <sys/types.h>
10622#include <machine/reg.h>
bec39cab
AC
10623int
10624main ()
10625{
a3828db0 10626struct reg r;
bec39cab
AC
10627 ;
10628 return 0;
10629}
10630_ACEOF
81ecdfbb 10631if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10632 gdb_cv_struct_reg=yes
27ca5dad 10633else
81ecdfbb 10634 gdb_cv_struct_reg=no
27ca5dad 10635fi
81ecdfbb 10636rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27ca5dad 10637fi
81ecdfbb
RW
10638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
10639$as_echo "$gdb_cv_struct_reg" >&6; }
a3828db0 10640if test $gdb_cv_struct_reg = yes; then
bec39cab 10641
81ecdfbb 10642$as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
27ca5dad
MC
10643
10644fi
97bf5e38 10645
a3828db0
MK
10646# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
10647# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
81ecdfbb
RW
10648ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <machine/reg.h>
10649"
10650if test "x$ac_cv_member_struct_reg_r_fs" = x""yes; then :
5c45e068
MK
10651
10652cat >>confdefs.h <<_ACEOF
a3828db0 10653#define HAVE_STRUCT_REG_R_FS 1
bec39cab 10654_ACEOF
3862412b 10655
5c45e068 10656
97bf5e38 10657fi
81ecdfbb
RW
10658ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <machine/reg.h>
10659"
10660if test "x$ac_cv_member_struct_reg_r_gs" = x""yes; then :
5c45e068
MK
10661
10662cat >>confdefs.h <<_ACEOF
a3828db0 10663#define HAVE_STRUCT_REG_R_GS 1
bec39cab 10664_ACEOF
3862412b 10665
5c45e068 10666
97bf5e38 10667fi
3862412b 10668
5c45e068 10669
6fea9e18
L
10670# See if <sys/user.h> supports the %fs_base and %gs_bas amd64 segment registers.
10671# Older amd64 Linux's don't have the fs_base and gs_base members of
10672# `struct user_regs_struct'.
10673ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "fs_base" "ac_cv_member_struct_user_regs_struct_fs_base" "#include <sys/user.h>
10674"
10675if test "x$ac_cv_member_struct_user_regs_struct_fs_base" = x""yes; then :
10676
10677cat >>confdefs.h <<_ACEOF
10678#define HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE 1
10679_ACEOF
10680
10681
10682fi
10683ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "gs_base" "ac_cv_member_struct_user_regs_struct_gs_base" "#include <sys/user.h>
10684"
10685if test "x$ac_cv_member_struct_user_regs_struct_gs_base" = x""yes; then :
10686
10687cat >>confdefs.h <<_ACEOF
10688#define HAVE_STRUCT_USER_REGS_STRUCT_GS_BASE 1
10689_ACEOF
10690
10691
10692fi
10693
10694
a3828db0 10695# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
81ecdfbb
RW
10696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
10697$as_echo_n "checking for PTRACE_GETREGS... " >&6; }
10698if test "${gdb_cv_have_ptrace_getregs+set}" = set; then :
10699 $as_echo_n "(cached) " >&6
451928c5 10700else
81ecdfbb 10701 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10702/* end confdefs.h. */
a3828db0 10703#include <sys/ptrace.h>
bec39cab
AC
10704int
10705main ()
10706{
a3828db0 10707PTRACE_GETREGS;
bec39cab
AC
10708 ;
10709 return 0;
10710}
10711_ACEOF
81ecdfbb 10712if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10713 gdb_cv_have_ptrace_getregs=yes
451928c5 10714else
81ecdfbb 10715 gdb_cv_have_ptrace_getregs=no
451928c5 10716fi
81ecdfbb 10717rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
10718fi
10719
81ecdfbb
RW
10720{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
10721$as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
a3828db0 10722if test $gdb_cv_have_ptrace_getregs = yes; then
60ca704f 10723
81ecdfbb 10724$as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
451928c5 10725
97bf5e38 10726fi
451928c5 10727
a3828db0 10728# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
81ecdfbb
RW
10729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
10730$as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
10731if test "${gdb_cv_have_ptrace_getfpxregs+set}" = set; then :
10732 $as_echo_n "(cached) " >&6
451928c5 10733else
81ecdfbb 10734 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10735/* end confdefs.h. */
a3828db0 10736#include <sys/ptrace.h>
bec39cab
AC
10737int
10738main ()
10739{
a3828db0 10740PTRACE_GETFPXREGS;
bec39cab
AC
10741 ;
10742 return 0;
10743}
10744_ACEOF
81ecdfbb 10745if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10746 gdb_cv_have_ptrace_getfpxregs=yes
451928c5 10747else
81ecdfbb 10748 gdb_cv_have_ptrace_getfpxregs=no
451928c5 10749fi
81ecdfbb 10750rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
10751fi
10752
81ecdfbb
RW
10753{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
10754$as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
a3828db0 10755if test $gdb_cv_have_ptrace_getfpxregs = yes; then
60ca704f 10756
81ecdfbb 10757$as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
451928c5 10758
97bf5e38 10759fi
451928c5 10760
a3828db0 10761# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
81ecdfbb
RW
10762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
10763$as_echo_n "checking for PT_GETDBREGS... " >&6; }
10764if test "${gdb_cv_have_pt_getdbregs+set}" = set; then :
10765 $as_echo_n "(cached) " >&6
3862412b 10766else
81ecdfbb 10767 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10768/* end confdefs.h. */
a3828db0
MK
10769#include <sys/types.h>
10770#include <sys/ptrace.h>
bec39cab
AC
10771int
10772main ()
10773{
a3828db0 10774PT_GETDBREGS;
bec39cab
AC
10775 ;
10776 return 0;
10777}
10778_ACEOF
81ecdfbb 10779if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10780 gdb_cv_have_pt_getdbregs=yes
3862412b 10781else
81ecdfbb 10782 gdb_cv_have_pt_getdbregs=no
3862412b 10783fi
81ecdfbb 10784rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
10785fi
10786
81ecdfbb
RW
10787{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
10788$as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
a3828db0 10789if test $gdb_cv_have_pt_getdbregs = yes; then
60ca704f 10790
81ecdfbb 10791$as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
3862412b 10792
97bf5e38 10793fi
3862412b 10794
a3828db0 10795# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
81ecdfbb
RW
10796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
10797$as_echo_n "checking for PT_GETXMMREGS... " >&6; }
10798if test "${gdb_cv_have_pt_getxmmregs+set}" = set; then :
10799 $as_echo_n "(cached) " >&6
3862412b 10800else
81ecdfbb 10801 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10802/* end confdefs.h. */
a3828db0
MK
10803#include <sys/types.h>
10804#include <sys/ptrace.h>
bec39cab
AC
10805int
10806main ()
10807{
a3828db0 10808PT_GETXMMREGS;
bec39cab
AC
10809 ;
10810 return 0;
10811}
10812_ACEOF
81ecdfbb 10813if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10814 gdb_cv_have_pt_getxmmregs=yes
3862412b 10815else
81ecdfbb 10816 gdb_cv_have_pt_getxmmregs=no
3862412b 10817fi
81ecdfbb 10818rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
10819fi
10820
81ecdfbb
RW
10821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
10822$as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
a3828db0 10823if test $gdb_cv_have_pt_getxmmregs = yes; then
60ca704f 10824
81ecdfbb 10825$as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
3862412b 10826
97bf5e38 10827fi
3862412b 10828
05b4bd79 10829# Detect which type of /proc is in use, such as for Solaris.
97bf5e38
MK
10830
10831if test "${target}" = "${host}"; then
10832 case "${host}" in
05b4bd79 10833 *-*-sysv4.2* | *-*-sysv5* | *-*-interix* )
60ca704f 10834
81ecdfbb 10835$as_echo "#define NEW_PROC_API 1" >>confdefs.h
97bf5e38
MK
10836
10837 ;;
c162e8c9 10838 *-*-solaris2.[6789] | *-*-solaris2.1[0-9]*)
60ca704f 10839
81ecdfbb 10840$as_echo "#define NEW_PROC_API 1" >>confdefs.h
c960c18f
AC
10841
10842 ;;
10843 mips-sgi-irix5*)
10844 # Work around <sys/proc.h> needing _KMEMUSER problem on IRIX 5.
60ca704f 10845
81ecdfbb 10846$as_echo "#define _KMEMUSER 1" >>confdefs.h
97bf5e38
MK
10847
10848 ;;
10849 esac
10850fi
10851
10852if test "$ac_cv_header_sys_procfs_h" = yes; then
81ecdfbb
RW
10853 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pstatus_t in sys/procfs.h" >&5
10854$as_echo_n "checking for pstatus_t in sys/procfs.h... " >&6; }
10855 if test "${bfd_cv_have_sys_procfs_type_pstatus_t+set}" = set; then :
10856 $as_echo_n "(cached) " >&6
bec39cab 10857else
81ecdfbb 10858 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10859/* end confdefs.h. */
596c9d4b
KB
10860
10861#define _SYSCALL32
d30c5336
JK
10862/* Needed for new procfs interface on sparc-solaris. */
10863#define _STRUCTURED_PROC 1
596c9d4b 10864#include <sys/procfs.h>
bec39cab
AC
10865int
10866main ()
10867{
97bf5e38 10868pstatus_t avar
bec39cab
AC
10869 ;
10870 return 0;
10871}
10872_ACEOF
81ecdfbb 10873if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 10874 bfd_cv_have_sys_procfs_type_pstatus_t=yes
596c9d4b 10875else
81ecdfbb 10876 bfd_cv_have_sys_procfs_type_pstatus_t=no
bec39cab 10877
596c9d4b 10878fi
81ecdfbb 10879rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
10880fi
10881
97bf5e38 10882 if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then
bec39cab 10883
81ecdfbb 10884$as_echo "#define HAVE_PSTATUS_T 1" >>confdefs.h
596c9d4b
KB
10885
10886 fi
81ecdfbb
RW
10887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pstatus_t" >&5
10888$as_echo "$bfd_cv_have_sys_procfs_type_pstatus_t" >&6; }
596c9d4b 10889
81ecdfbb
RW
10890 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prrun_t in sys/procfs.h" >&5
10891$as_echo_n "checking for prrun_t in sys/procfs.h... " >&6; }
10892 if test "${bfd_cv_have_sys_procfs_type_prrun_t+set}" = set; then :
10893 $as_echo_n "(cached) " >&6
596c9d4b 10894else
81ecdfbb 10895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10896/* end confdefs.h. */
596c9d4b
KB
10897
10898#define _SYSCALL32
d30c5336
JK
10899/* Needed for new procfs interface on sparc-solaris. */
10900#define _STRUCTURED_PROC 1
596c9d4b 10901#include <sys/procfs.h>
bec39cab
AC
10902int
10903main ()
10904{
97bf5e38 10905prrun_t avar
bec39cab
AC
10906 ;
10907 return 0;
10908}
10909_ACEOF
81ecdfbb 10910if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 10911 bfd_cv_have_sys_procfs_type_prrun_t=yes
596c9d4b 10912else
81ecdfbb 10913 bfd_cv_have_sys_procfs_type_prrun_t=no
bec39cab 10914
596c9d4b 10915fi
81ecdfbb 10916rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
10917fi
10918
97bf5e38 10919 if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then
bec39cab 10920
81ecdfbb 10921$as_echo "#define HAVE_PRRUN_T 1" >>confdefs.h
596c9d4b
KB
10922
10923 fi
81ecdfbb
RW
10924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prrun_t" >&5
10925$as_echo "$bfd_cv_have_sys_procfs_type_prrun_t" >&6; }
596c9d4b 10926
81ecdfbb
RW
10927 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
10928$as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
10929 if test "${bfd_cv_have_sys_procfs_type_gregset_t+set}" = set; then :
10930 $as_echo_n "(cached) " >&6
596c9d4b 10931else
81ecdfbb 10932 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10933/* end confdefs.h. */
596c9d4b
KB
10934
10935#define _SYSCALL32
d30c5336
JK
10936/* Needed for new procfs interface on sparc-solaris. */
10937#define _STRUCTURED_PROC 1
596c9d4b 10938#include <sys/procfs.h>
bec39cab
AC
10939int
10940main ()
10941{
97bf5e38 10942gregset_t avar
bec39cab
AC
10943 ;
10944 return 0;
10945}
10946_ACEOF
81ecdfbb 10947if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 10948 bfd_cv_have_sys_procfs_type_gregset_t=yes
596c9d4b 10949else
81ecdfbb 10950 bfd_cv_have_sys_procfs_type_gregset_t=no
bec39cab 10951
596c9d4b 10952fi
81ecdfbb 10953rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
10954fi
10955
97bf5e38 10956 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
bec39cab 10957
81ecdfbb 10958$as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
596c9d4b
KB
10959
10960 fi
81ecdfbb
RW
10961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
10962$as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
451928c5 10963
81ecdfbb
RW
10964 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
10965$as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
10966 if test "${bfd_cv_have_sys_procfs_type_fpregset_t+set}" = set; then :
10967 $as_echo_n "(cached) " >&6
d84dd0c5 10968else
81ecdfbb 10969 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10970/* end confdefs.h. */
97bf5e38
MK
10971
10972#define _SYSCALL32
d30c5336
JK
10973/* Needed for new procfs interface on sparc-solaris. */
10974#define _STRUCTURED_PROC 1
d84dd0c5 10975#include <sys/procfs.h>
bec39cab
AC
10976int
10977main ()
10978{
97bf5e38 10979fpregset_t avar
bec39cab
AC
10980 ;
10981 return 0;
10982}
10983_ACEOF
81ecdfbb 10984if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 10985 bfd_cv_have_sys_procfs_type_fpregset_t=yes
d84dd0c5 10986else
81ecdfbb 10987 bfd_cv_have_sys_procfs_type_fpregset_t=no
bec39cab 10988
d84dd0c5 10989fi
81ecdfbb 10990rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d84dd0c5
MK
10991fi
10992
97bf5e38 10993 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
bec39cab 10994
81ecdfbb 10995$as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
d84dd0c5 10996
97bf5e38 10997 fi
81ecdfbb
RW
10998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
10999$as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
d84dd0c5 11000
81ecdfbb
RW
11001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
11002$as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
11003 if test "${bfd_cv_have_sys_procfs_type_prgregset_t+set}" = set; then :
11004 $as_echo_n "(cached) " >&6
c906108c 11005else
81ecdfbb 11006 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11007/* end confdefs.h. */
c906108c 11008
97bf5e38 11009#define _SYSCALL32
d30c5336
JK
11010/* Needed for new procfs interface on sparc-solaris. */
11011#define _STRUCTURED_PROC 1
97bf5e38 11012#include <sys/procfs.h>
bec39cab
AC
11013int
11014main ()
11015{
97bf5e38 11016prgregset_t avar
bec39cab
AC
11017 ;
11018 return 0;
11019}
11020_ACEOF
81ecdfbb 11021if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11022 bfd_cv_have_sys_procfs_type_prgregset_t=yes
c906108c 11023else
81ecdfbb 11024 bfd_cv_have_sys_procfs_type_prgregset_t=no
bec39cab 11025
c906108c 11026fi
81ecdfbb 11027rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
11028fi
11029
97bf5e38 11030 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
bec39cab 11031
81ecdfbb 11032$as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
c906108c 11033
97bf5e38 11034 fi
81ecdfbb
RW
11035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
11036$as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
c906108c 11037
81ecdfbb
RW
11038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
11039$as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
11040 if test "${bfd_cv_have_sys_procfs_type_prfpregset_t+set}" = set; then :
11041 $as_echo_n "(cached) " >&6
d45fe813 11042else
81ecdfbb 11043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11044/* end confdefs.h. */
97bf5e38
MK
11045
11046#define _SYSCALL32
d30c5336
JK
11047/* Needed for new procfs interface on sparc-solaris. */
11048#define _STRUCTURED_PROC 1
97bf5e38 11049#include <sys/procfs.h>
bec39cab
AC
11050int
11051main ()
11052{
97bf5e38 11053prfpregset_t avar
bec39cab
AC
11054 ;
11055 return 0;
11056}
11057_ACEOF
81ecdfbb 11058if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11059 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
d45fe813 11060else
81ecdfbb 11061 bfd_cv_have_sys_procfs_type_prfpregset_t=no
bec39cab 11062
d45fe813 11063fi
81ecdfbb 11064rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
11065fi
11066
97bf5e38 11067 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
bec39cab 11068
81ecdfbb 11069$as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
d45fe813 11070
97bf5e38 11071 fi
81ecdfbb
RW
11072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
11073$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
d45fe813 11074
81ecdfbb
RW
11075 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
11076$as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
11077 if test "${bfd_cv_have_sys_procfs_type_prgregset32_t+set}" = set; then :
11078 $as_echo_n "(cached) " >&6
d45fe813 11079else
81ecdfbb 11080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11081/* end confdefs.h. */
97bf5e38
MK
11082
11083#define _SYSCALL32
d30c5336
JK
11084/* Needed for new procfs interface on sparc-solaris. */
11085#define _STRUCTURED_PROC 1
97bf5e38 11086#include <sys/procfs.h>
bec39cab
AC
11087int
11088main ()
11089{
97bf5e38 11090prgregset32_t avar
bec39cab
AC
11091 ;
11092 return 0;
11093}
11094_ACEOF
81ecdfbb 11095if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11096 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
d45fe813 11097else
81ecdfbb 11098 bfd_cv_have_sys_procfs_type_prgregset32_t=no
bec39cab 11099
d45fe813 11100fi
81ecdfbb 11101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
11102fi
11103
97bf5e38 11104 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
bec39cab 11105
81ecdfbb 11106$as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
d45fe813 11107
97bf5e38 11108 fi
81ecdfbb
RW
11109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
11110$as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
d45fe813 11111
81ecdfbb
RW
11112 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset32_t in sys/procfs.h" >&5
11113$as_echo_n "checking for prfpregset32_t in sys/procfs.h... " >&6; }
11114 if test "${bfd_cv_have_sys_procfs_type_prfpregset32_t+set}" = set; then :
11115 $as_echo_n "(cached) " >&6
d45fe813 11116else
81ecdfbb 11117 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11118/* end confdefs.h. */
97bf5e38
MK
11119
11120#define _SYSCALL32
d30c5336
JK
11121/* Needed for new procfs interface on sparc-solaris. */
11122#define _STRUCTURED_PROC 1
97bf5e38 11123#include <sys/procfs.h>
bec39cab
AC
11124int
11125main ()
11126{
97bf5e38 11127prfpregset32_t avar
bec39cab
AC
11128 ;
11129 return 0;
11130}
11131_ACEOF
81ecdfbb 11132if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11133 bfd_cv_have_sys_procfs_type_prfpregset32_t=yes
d45fe813 11134else
81ecdfbb 11135 bfd_cv_have_sys_procfs_type_prfpregset32_t=no
bec39cab 11136
d45fe813 11137fi
81ecdfbb 11138rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
11139fi
11140
97bf5e38 11141 if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then
bec39cab 11142
81ecdfbb 11143$as_echo "#define HAVE_PRFPREGSET32_T 1" >>confdefs.h
d45fe813 11144
97bf5e38 11145 fi
81ecdfbb
RW
11146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset32_t" >&5
11147$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset32_t" >&6; }
d45fe813 11148
81ecdfbb
RW
11149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
11150$as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
11151 if test "${bfd_cv_have_sys_procfs_type_lwpid_t+set}" = set; then :
11152 $as_echo_n "(cached) " >&6
d45fe813 11153else
81ecdfbb 11154 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11155/* end confdefs.h. */
97bf5e38 11156
d45fe813 11157#define _SYSCALL32
d30c5336
JK
11158/* Needed for new procfs interface on sparc-solaris. */
11159#define _STRUCTURED_PROC 1
97bf5e38 11160#include <sys/procfs.h>
bec39cab
AC
11161int
11162main ()
11163{
97bf5e38 11164lwpid_t avar
bec39cab
AC
11165 ;
11166 return 0;
11167}
11168_ACEOF
81ecdfbb 11169if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11170 bfd_cv_have_sys_procfs_type_lwpid_t=yes
d45fe813 11171else
81ecdfbb 11172 bfd_cv_have_sys_procfs_type_lwpid_t=no
bec39cab 11173
d45fe813 11174fi
81ecdfbb 11175rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
11176fi
11177
97bf5e38 11178 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
bec39cab 11179
81ecdfbb 11180$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
d45fe813 11181
97bf5e38 11182 fi
81ecdfbb
RW
11183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
11184$as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
c906108c 11185
81ecdfbb
RW
11186 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
11187$as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
11188 if test "${bfd_cv_have_sys_procfs_type_psaddr_t+set}" = set; then :
11189 $as_echo_n "(cached) " >&6
c906108c 11190else
81ecdfbb 11191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11192/* end confdefs.h. */
c906108c 11193
97bf5e38 11194#define _SYSCALL32
d30c5336
JK
11195/* Needed for new procfs interface on sparc-solaris. */
11196#define _STRUCTURED_PROC 1
97bf5e38 11197#include <sys/procfs.h>
bec39cab
AC
11198int
11199main ()
11200{
97bf5e38 11201psaddr_t avar
bec39cab
AC
11202 ;
11203 return 0;
11204}
11205_ACEOF
81ecdfbb 11206if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11207 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c 11208else
81ecdfbb 11209 bfd_cv_have_sys_procfs_type_psaddr_t=no
bec39cab 11210
c906108c 11211fi
81ecdfbb 11212rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
11213fi
11214
97bf5e38 11215 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
bec39cab 11216
81ecdfbb 11217$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
c906108c 11218
97bf5e38 11219 fi
81ecdfbb
RW
11220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
11221$as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
c906108c 11222
81ecdfbb
RW
11223 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prsysent_t in sys/procfs.h" >&5
11224$as_echo_n "checking for prsysent_t in sys/procfs.h... " >&6; }
11225 if test "${bfd_cv_have_sys_procfs_type_prsysent_t+set}" = set; then :
11226 $as_echo_n "(cached) " >&6
c906108c 11227else
81ecdfbb 11228 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11229/* end confdefs.h. */
c906108c 11230
97bf5e38 11231#define _SYSCALL32
d30c5336
JK
11232/* Needed for new procfs interface on sparc-solaris. */
11233#define _STRUCTURED_PROC 1
97bf5e38 11234#include <sys/procfs.h>
bec39cab
AC
11235int
11236main ()
11237{
97bf5e38 11238prsysent_t avar
bec39cab
AC
11239 ;
11240 return 0;
11241}
11242_ACEOF
81ecdfbb 11243if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11244 bfd_cv_have_sys_procfs_type_prsysent_t=yes
c906108c 11245else
81ecdfbb 11246 bfd_cv_have_sys_procfs_type_prsysent_t=no
bec39cab 11247
c906108c 11248fi
81ecdfbb 11249rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
11250fi
11251
97bf5e38 11252 if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
bec39cab 11253
81ecdfbb 11254$as_echo "#define HAVE_PRSYSENT_T 1" >>confdefs.h
c906108c 11255
97bf5e38 11256 fi
81ecdfbb
RW
11257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prsysent_t" >&5
11258$as_echo "$bfd_cv_have_sys_procfs_type_prsysent_t" >&6; }
c906108c 11259
81ecdfbb
RW
11260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigset_t in sys/procfs.h" >&5
11261$as_echo_n "checking for pr_sigset_t in sys/procfs.h... " >&6; }
11262 if test "${bfd_cv_have_sys_procfs_type_pr_sigset_t+set}" = set; then :
11263 $as_echo_n "(cached) " >&6
c906108c 11264else
81ecdfbb 11265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11266/* end confdefs.h. */
c906108c 11267
97bf5e38 11268#define _SYSCALL32
d30c5336
JK
11269/* Needed for new procfs interface on sparc-solaris. */
11270#define _STRUCTURED_PROC 1
97bf5e38 11271#include <sys/procfs.h>
bec39cab
AC
11272int
11273main ()
11274{
97bf5e38 11275pr_sigset_t avar
bec39cab
AC
11276 ;
11277 return 0;
11278}
11279_ACEOF
81ecdfbb 11280if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11281 bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
c906108c 11282else
81ecdfbb 11283 bfd_cv_have_sys_procfs_type_pr_sigset_t=no
bec39cab 11284
c906108c 11285fi
81ecdfbb 11286rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
11287fi
11288
97bf5e38 11289 if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
bec39cab 11290
81ecdfbb 11291$as_echo "#define HAVE_PR_SIGSET_T 1" >>confdefs.h
c906108c 11292
97bf5e38 11293 fi
81ecdfbb
RW
11294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigset_t" >&5
11295$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigset_t" >&6; }
c906108c 11296
81ecdfbb
RW
11297 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigaction64_t in sys/procfs.h" >&5
11298$as_echo_n "checking for pr_sigaction64_t in sys/procfs.h... " >&6; }
11299 if test "${bfd_cv_have_sys_procfs_type_pr_sigaction64_t+set}" = set; then :
11300 $as_echo_n "(cached) " >&6
c906108c 11301else
81ecdfbb 11302 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11303/* end confdefs.h. */
c906108c 11304
97bf5e38 11305#define _SYSCALL32
d30c5336
JK
11306/* Needed for new procfs interface on sparc-solaris. */
11307#define _STRUCTURED_PROC 1
97bf5e38 11308#include <sys/procfs.h>
bec39cab
AC
11309int
11310main ()
11311{
97bf5e38 11312pr_sigaction64_t avar
bec39cab
AC
11313 ;
11314 return 0;
11315}
11316_ACEOF
81ecdfbb 11317if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11318 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
c906108c 11319else
81ecdfbb 11320 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
bec39cab 11321
c906108c 11322fi
81ecdfbb 11323rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
11324fi
11325
97bf5e38 11326 if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
bec39cab 11327
81ecdfbb 11328$as_echo "#define HAVE_PR_SIGACTION64_T 1" >>confdefs.h
c906108c 11329
97bf5e38 11330 fi
81ecdfbb
RW
11331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&5
11332$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&6; }
97bf5e38 11333
81ecdfbb
RW
11334 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_siginfo64_t in sys/procfs.h" >&5
11335$as_echo_n "checking for pr_siginfo64_t in sys/procfs.h... " >&6; }
11336 if test "${bfd_cv_have_sys_procfs_type_pr_siginfo64_t+set}" = set; then :
11337 $as_echo_n "(cached) " >&6
97bf5e38 11338else
81ecdfbb 11339 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11340/* end confdefs.h. */
97bf5e38
MK
11341
11342#define _SYSCALL32
d30c5336
JK
11343/* Needed for new procfs interface on sparc-solaris. */
11344#define _STRUCTURED_PROC 1
97bf5e38 11345#include <sys/procfs.h>
bec39cab
AC
11346int
11347main ()
11348{
97bf5e38 11349pr_siginfo64_t avar
bec39cab
AC
11350 ;
11351 return 0;
11352}
11353_ACEOF
81ecdfbb 11354if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
11355 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
11356else
81ecdfbb 11357 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
bec39cab 11358
97bf5e38 11359fi
81ecdfbb 11360rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 11361fi
c906108c 11362
97bf5e38 11363 if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
bec39cab 11364
81ecdfbb 11365$as_echo "#define HAVE_PR_SIGINFO64_T 1" >>confdefs.h
c906108c 11366
97bf5e38 11367 fi
81ecdfbb
RW
11368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&5
11369$as_echo "$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&6; }
bec39cab
AC
11370
11371
97bf5e38
MK
11372
11373
11374
97bf5e38 11375 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
81ecdfbb
RW
11376 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether prfpregset_t type is broken" >&5
11377$as_echo_n "checking whether prfpregset_t type is broken... " >&6; }
11378 if test "${gdb_cv_prfpregset_t_broken+set}" = set; then :
11379 $as_echo_n "(cached) " >&6
c906108c 11380else
81ecdfbb 11381 if test "$cross_compiling" = yes; then :
97bf5e38 11382 gdb_cv_prfpregset_t_broken=yes
c906108c 11383else
81ecdfbb 11384 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11385/* end confdefs.h. */
97bf5e38
MK
11386#include <sys/procfs.h>
11387 int main ()
11388 {
11389 if (sizeof (prfpregset_t) == sizeof (void *))
11390 return 1;
11391 return 0;
11392 }
bec39cab 11393_ACEOF
81ecdfbb 11394if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 11395 gdb_cv_prfpregset_t_broken=no
81ecdfbb
RW
11396else
11397 gdb_cv_prfpregset_t_broken=yes
c906108c 11398fi
81ecdfbb
RW
11399rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11400 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 11401fi
81ecdfbb 11402
c906108c
SS
11403fi
11404
81ecdfbb
RW
11405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_prfpregset_t_broken" >&5
11406$as_echo "$gdb_cv_prfpregset_t_broken" >&6; }
97bf5e38 11407 if test $gdb_cv_prfpregset_t_broken = yes; then
60ca704f 11408
81ecdfbb 11409$as_echo "#define PRFPREGSET_T_BROKEN 1" >>confdefs.h
c906108c 11410
97bf5e38
MK
11411 fi
11412 fi
c906108c 11413
bec39cab 11414
81ecdfbb
RW
11415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
11416$as_echo_n "checking for PIOCSET ioctl entry in sys/procfs.h... " >&6; }
11417 if test "${gdb_cv_have_procfs_piocset+set}" = set; then :
11418 $as_echo_n "(cached) " >&6
c906108c 11419else
81ecdfbb 11420 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11421/* end confdefs.h. */
97bf5e38
MK
11422#include <unistd.h>
11423#include <sys/types.h>
11424#include <sys/procfs.h>
11425
bec39cab
AC
11426int
11427main ()
11428{
97bf5e38
MK
11429
11430 int dummy;;
11431 dummy = ioctl(0, PIOCSET, &dummy);
bec39cab
AC
11432
11433 ;
11434 return 0;
11435}
11436_ACEOF
81ecdfbb 11437if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11438 gdb_cv_have_procfs_piocset=yes
c906108c 11439else
81ecdfbb 11440 gdb_cv_have_procfs_piocset=no
c906108c 11441fi
81ecdfbb 11442rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 11443fi
97bf5e38 11444
81ecdfbb
RW
11445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_procfs_piocset" >&5
11446$as_echo "$gdb_cv_have_procfs_piocset" >&6; }
97bf5e38 11447 if test $gdb_cv_have_procfs_piocset = yes; then
60ca704f 11448
81ecdfbb 11449$as_echo "#define HAVE_PROCFS_PIOCSET 1" >>confdefs.h
97bf5e38
MK
11450
11451 fi
c906108c 11452fi
c906108c 11453
97bf5e38 11454if test ${host} = ${target} ; then
bec39cab 11455
81ecdfbb
RW
11456 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member l_addr in struct link_map" >&5
11457$as_echo_n "checking for member l_addr in struct link_map... " >&6; }
11458 if test "${gdb_cv_have_struct_link_map_with_l_members+set}" = set; then :
11459 $as_echo_n "(cached) " >&6
bec39cab 11460else
81ecdfbb 11461 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11462/* end confdefs.h. */
97bf5e38 11463#include <link.h>
bec39cab
AC
11464int
11465main ()
11466{
97bf5e38 11467struct link_map lm; (void) lm.l_addr;
bec39cab
AC
11468 ;
11469 return 0;
11470}
11471_ACEOF
81ecdfbb 11472if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11473 gdb_cv_have_struct_link_map_with_l_members=yes
c906108c 11474else
81ecdfbb 11475 gdb_cv_have_struct_link_map_with_l_members=no
c906108c 11476fi
81ecdfbb 11477rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
11478fi
11479
81ecdfbb
RW
11480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map_with_l_members" >&5
11481$as_echo "$gdb_cv_have_struct_link_map_with_l_members" >&6; }
97bf5e38 11482 if test $gdb_cv_have_struct_link_map_with_l_members = yes; then
60ca704f 11483
81ecdfbb 11484$as_echo "#define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1" >>confdefs.h
97bf5e38
MK
11485
11486 fi
11487
bec39cab 11488
81ecdfbb
RW
11489 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member lm_addr in struct link_map" >&5
11490$as_echo_n "checking for member lm_addr in struct link_map... " >&6; }
11491 if test "${gdb_cv_have_struct_link_map_with_lm_members+set}" = set; then :
11492 $as_echo_n "(cached) " >&6
c906108c 11493else
81ecdfbb 11494 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11495/* end confdefs.h. */
97bf5e38
MK
11496#include <sys/types.h>
11497#include <link.h>
bec39cab
AC
11498int
11499main ()
11500{
97bf5e38 11501struct link_map lm; (void) lm.lm_addr;
bec39cab
AC
11502 ;
11503 return 0;
11504}
11505_ACEOF
81ecdfbb 11506if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
11507 gdb_cv_have_struct_link_map_with_lm_members=yes
11508else
81ecdfbb 11509 gdb_cv_have_struct_link_map_with_lm_members=no
97bf5e38 11510fi
81ecdfbb 11511rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 11512fi
c906108c 11513
81ecdfbb
RW
11514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map_with_lm_members" >&5
11515$as_echo "$gdb_cv_have_struct_link_map_with_lm_members" >&6; }
97bf5e38 11516 if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then
60ca704f 11517
81ecdfbb 11518$as_echo "#define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1" >>confdefs.h
97bf5e38
MK
11519
11520 fi
11521
bec39cab 11522
81ecdfbb
RW
11523 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member som_addr in struct so_map" >&5
11524$as_echo_n "checking for member som_addr in struct so_map... " >&6; }
11525 if test "${gdb_cv_have_struct_so_map_with_som_members+set}" = set; then :
11526 $as_echo_n "(cached) " >&6
c906108c 11527else
81ecdfbb 11528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11529/* end confdefs.h. */
97bf5e38
MK
11530#include <sys/types.h>
11531#ifdef HAVE_NLIST_H
11532#include <nlist.h>
11533#endif
11534#include <link.h>
bec39cab
AC
11535int
11536main ()
11537{
97bf5e38 11538struct so_map lm; (void) lm.som_addr;
bec39cab
AC
11539 ;
11540 return 0;
11541}
11542_ACEOF
81ecdfbb 11543if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
11544 gdb_cv_have_struct_so_map_with_som_members=yes
11545else
81ecdfbb 11546 gdb_cv_have_struct_so_map_with_som_members=no
97bf5e38 11547fi
81ecdfbb 11548rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 11549fi
c906108c 11550
81ecdfbb
RW
11551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_so_map_with_som_members" >&5
11552$as_echo "$gdb_cv_have_struct_so_map_with_som_members" >&6; }
97bf5e38 11553 if test $gdb_cv_have_struct_so_map_with_som_members = yes; then
60ca704f 11554
81ecdfbb 11555$as_echo "#define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1" >>confdefs.h
c906108c 11556
97bf5e38 11557 fi
c906108c 11558
bec39cab 11559
81ecdfbb
RW
11560 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct link_map32 in sys/link.h" >&5
11561$as_echo_n "checking for struct link_map32 in sys/link.h... " >&6; }
11562 if test "${gdb_cv_have_struct_link_map32+set}" = set; then :
11563 $as_echo_n "(cached) " >&6
97bf5e38 11564else
81ecdfbb 11565 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11566/* end confdefs.h. */
97bf5e38
MK
11567#define _SYSCALL32
11568#include <sys/link.h>
bec39cab
AC
11569int
11570main ()
11571{
97bf5e38 11572struct link_map32 l;
bec39cab
AC
11573 ;
11574 return 0;
11575}
11576_ACEOF
81ecdfbb 11577if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
11578 gdb_cv_have_struct_link_map32=yes
11579else
81ecdfbb 11580 gdb_cv_have_struct_link_map32=no
97bf5e38 11581fi
81ecdfbb 11582rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 11583fi
c906108c 11584
81ecdfbb
RW
11585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map32" >&5
11586$as_echo "$gdb_cv_have_struct_link_map32" >&6; }
97bf5e38 11587 if test $gdb_cv_have_struct_link_map32 = yes; then
60ca704f 11588
81ecdfbb 11589$as_echo "#define HAVE_STRUCT_LINK_MAP32 1" >>confdefs.h
c906108c 11590
60ca704f 11591
81ecdfbb 11592$as_echo "#define _SYSCALL32 1" >>confdefs.h
c906108c 11593
97bf5e38
MK
11594 fi
11595fi
c906108c 11596
bc8bcb4b 11597# Check if the compiler supports the `long long' type.
c906108c 11598
81ecdfbb
RW
11599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
11600$as_echo_n "checking for long long support in compiler... " >&6; }
11601if test "${gdb_cv_c_long_long+set}" = set; then :
11602 $as_echo_n "(cached) " >&6
97bf5e38 11603else
81ecdfbb 11604 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11605/* end confdefs.h. */
bc8bcb4b 11606extern long long foo;
bec39cab
AC
11607int
11608main ()
11609{
bc8bcb4b 11610switch (foo & 2) { case 0: return 1; }
bec39cab
AC
11611 ;
11612 return 0;
11613}
11614_ACEOF
81ecdfbb 11615if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
11616 gdb_cv_c_long_long=yes
11617else
81ecdfbb 11618 gdb_cv_c_long_long=no
97bf5e38 11619fi
81ecdfbb 11620rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 11621fi
81ecdfbb
RW
11622{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
11623$as_echo "$gdb_cv_c_long_long" >&6; }
74a0d9f6
JK
11624if test $gdb_cv_c_long_long != yes; then
11625 # libdecnumber requires long long.
11626 as_fn_error "Compiler must support long long for GDB." "$LINENO" 5
97bf5e38
MK
11627fi
11628
bc8bcb4b 11629# Check if the compiler and runtime support printing long longs.
97bf5e38 11630
81ecdfbb
RW
11631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
11632$as_echo_n "checking for long long support in printf... " >&6; }
11633if test "${gdb_cv_printf_has_long_long+set}" = set; then :
11634 $as_echo_n "(cached) " >&6
97bf5e38 11635else
81ecdfbb 11636 if test "$cross_compiling" = yes; then :
97bf5e38
MK
11637 gdb_cv_printf_has_long_long=no
11638else
81ecdfbb 11639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11640/* end confdefs.h. */
bc8bcb4b
MK
11641$ac_includes_default
11642int
11643main ()
11644{
11645char buf[32];
97bf5e38
MK
11646 long long l = 0;
11647 l = (l << 16) + 0x0123;
11648 l = (l << 16) + 0x4567;
11649 l = (l << 16) + 0x89ab;
11650 l = (l << 16) + 0xcdef;
11651 sprintf (buf, "0x%016llx", l);
11652 return (strcmp ("0x0123456789abcdef", buf));
bc8bcb4b
MK
11653 ;
11654 return 0;
c906108c 11655}
bec39cab 11656_ACEOF
81ecdfbb 11657if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
11658 gdb_cv_printf_has_long_long=yes
11659else
81ecdfbb 11660 gdb_cv_printf_has_long_long=no
97bf5e38 11661fi
81ecdfbb
RW
11662rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11663 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 11664fi
81ecdfbb 11665
97bf5e38 11666fi
81ecdfbb
RW
11667{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
11668$as_echo "$gdb_cv_printf_has_long_long" >&6; }
97bf5e38 11669if test $gdb_cv_printf_has_long_long = yes; then
bc8bcb4b 11670
81ecdfbb 11671$as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
97bf5e38
MK
11672
11673fi
97bf5e38 11674
1a619819
LM
11675# Check if the compiler and runtime support printing decfloats.
11676
81ecdfbb
RW
11677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
11678$as_echo_n "checking for decfloat support in printf... " >&6; }
11679if test "${gdb_cv_printf_has_decfloat+set}" = set; then :
11680 $as_echo_n "(cached) " >&6
1a619819 11681else
81ecdfbb 11682 if test "$cross_compiling" = yes; then :
1a619819
LM
11683 gdb_cv_printf_has_decfloat=no
11684else
81ecdfbb 11685 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1a619819
LM
11686/* end confdefs.h. */
11687$ac_includes_default
11688int
11689main ()
11690{
11691char buf[64];
11692 _Decimal32 d32 = 1.2345df;
11693 _Decimal64 d64 = 1.2345dd;
11694 _Decimal128 d128 = 1.2345dl;
11695 sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
11696 return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
11697 ;
11698 return 0;
11699}
11700_ACEOF
81ecdfbb 11701if ac_fn_c_try_run "$LINENO"; then :
1a619819
LM
11702 gdb_cv_printf_has_decfloat=yes
11703else
81ecdfbb 11704 gdb_cv_printf_has_decfloat=no
1a619819 11705fi
81ecdfbb
RW
11706rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11707 conftest.$ac_objext conftest.beam conftest.$ac_ext
1a619819 11708fi
81ecdfbb 11709
1a619819 11710fi
81ecdfbb
RW
11711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
11712$as_echo "$gdb_cv_printf_has_decfloat" >&6; }
1a619819
LM
11713if test $gdb_cv_printf_has_decfloat = yes; then
11714
81ecdfbb 11715$as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
1a619819
LM
11716
11717fi
11718
bc8bcb4b
MK
11719# Check if the compiler supports the `long double' type. We can't use
11720# AC_C_LONG_DOUBLE because that one does additional checks on the
11721# constants defined in <float.h> that fail on some systems,
11722# e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
97bf5e38 11723
81ecdfbb
RW
11724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
11725$as_echo_n "checking for long double support in compiler... " >&6; }
11726if test "${gdb_cv_c_long_double+set}" = set; then :
11727 $as_echo_n "(cached) " >&6
97bf5e38 11728else
81ecdfbb 11729 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11730/* end confdefs.h. */
97bf5e38 11731long double foo;
bec39cab 11732_ACEOF
81ecdfbb 11733if ac_fn_c_try_compile "$LINENO"; then :
bc8bcb4b 11734 gdb_cv_c_long_double=yes
97bf5e38 11735else
81ecdfbb 11736 gdb_cv_c_long_double=no
97bf5e38 11737fi
81ecdfbb 11738rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 11739fi
81ecdfbb
RW
11740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
11741$as_echo "$gdb_cv_c_long_double" >&6; }
bc8bcb4b 11742if test $gdb_cv_c_long_double = yes; then
c906108c 11743
81ecdfbb 11744$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
11745
11746fi
11747
bc8bcb4b 11748# Check if the compiler and runtime support printing long doubles.
97bf5e38 11749
81ecdfbb
RW
11750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
11751$as_echo_n "checking for long double support in printf... " >&6; }
11752if test "${gdb_cv_printf_has_long_double+set}" = set; then :
11753 $as_echo_n "(cached) " >&6
97bf5e38 11754else
81ecdfbb 11755 if test "$cross_compiling" = yes; then :
97bf5e38
MK
11756 gdb_cv_printf_has_long_double=no
11757else
81ecdfbb 11758 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11759/* end confdefs.h. */
bc8bcb4b
MK
11760$ac_includes_default
11761int
11762main ()
11763{
11764char buf[16];
97bf5e38
MK
11765 long double f = 3.141592653;
11766 sprintf (buf, "%Lg", f);
11767 return (strncmp ("3.14159", buf, 7));
bc8bcb4b
MK
11768 ;
11769 return 0;
97bf5e38 11770}
bec39cab 11771_ACEOF
81ecdfbb 11772if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 11773 gdb_cv_printf_has_long_double=yes
c906108c 11774else
81ecdfbb 11775 gdb_cv_printf_has_long_double=no
c906108c 11776fi
81ecdfbb
RW
11777rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11778 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 11779fi
81ecdfbb 11780
c906108c 11781fi
81ecdfbb
RW
11782{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
11783$as_echo "$gdb_cv_printf_has_long_double" >&6; }
97bf5e38 11784if test $gdb_cv_printf_has_long_double = yes; then
bc8bcb4b 11785
81ecdfbb 11786$as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
11787
11788fi
97bf5e38 11789
bc8bcb4b 11790# Check if the compiler and runtime support scanning long doubles.
97bf5e38 11791
81ecdfbb
RW
11792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
11793$as_echo_n "checking for long double support in scanf... " >&6; }
11794if test "${gdb_cv_scanf_has_long_double+set}" = set; then :
11795 $as_echo_n "(cached) " >&6
97bf5e38 11796else
81ecdfbb 11797 if test "$cross_compiling" = yes; then :
97bf5e38
MK
11798 gdb_cv_scanf_has_long_double=no
11799else
81ecdfbb 11800 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11801/* end confdefs.h. */
bc8bcb4b
MK
11802#include <stdio.h>
11803int
11804main ()
11805{
11806char *buf = "3.141592653";
97bf5e38
MK
11807 long double f = 0;
11808 sscanf (buf, "%Lg", &f);
11809 return !(f > 3.14159 && f < 3.14160);
bc8bcb4b
MK
11810 ;
11811 return 0;
97bf5e38 11812}
bec39cab 11813_ACEOF
81ecdfbb 11814if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
11815 gdb_cv_scanf_has_long_double=yes
11816else
81ecdfbb 11817 gdb_cv_scanf_has_long_double=no
97bf5e38 11818fi
81ecdfbb
RW
11819rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11820 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 11821fi
81ecdfbb 11822
c906108c 11823fi
81ecdfbb
RW
11824{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
11825$as_echo "$gdb_cv_scanf_has_long_double" >&6; }
97bf5e38 11826if test $gdb_cv_scanf_has_long_double = yes; then
bc8bcb4b 11827
81ecdfbb 11828$as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
11829
11830fi
c906108c 11831
438013df
AO
11832case ${host_os} in
11833aix*)
81ecdfbb
RW
11834 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
11835$as_echo_n "checking for -bbigtoc option... " >&6; }
11836if test "${gdb_cv_bigtoc+set}" = set; then :
11837 $as_echo_n "(cached) " >&6
438013df 11838else
bec39cab 11839
438013df
AO
11840 SAVE_LDFLAGS=$LDFLAGS
11841
11842 case $GCC in
11843 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
11844 *) gdb_cv_bigtoc=-bbigtoc ;;
11845 esac
11846
11847 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
81ecdfbb 11848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11849/* end confdefs.h. */
438013df 11850
bec39cab
AC
11851int
11852main ()
11853{
438013df 11854int i;
bec39cab
AC
11855 ;
11856 return 0;
11857}
11858_ACEOF
81ecdfbb 11859if ac_fn_c_try_link "$LINENO"; then :
bec39cab 11860
81ecdfbb
RW
11861else
11862 gdb_cv_bigtoc=
438013df 11863fi
81ecdfbb
RW
11864rm -f core conftest.err conftest.$ac_objext \
11865 conftest$ac_exeext conftest.$ac_ext
ec76baa5 11866 LDFLAGS="${SAVE_LDFLAGS}"
438013df 11867
bec39cab 11868fi
81ecdfbb
RW
11869{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
11870$as_echo "$gdb_cv_bigtoc" >&6; }
438013df
AO
11871 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
11872 ;;
11873esac
11874
38f6b338 11875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
f6528abd 11876$as_echo_n "checking for the dynamic export flag... " >&6; }
38f6b338
JK
11877dynamic_list=false
11878if test "${gdb_native}" = yes; then
11879 # The dynamically loaded libthread_db needs access to symbols in the gdb
11880 # executable. Older GNU ld supports --export-dynamic but --dynamic-list
11881 # may not be supported there.
11882 old_LDFLAGS="$LDFLAGS"
11883 # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
11884 RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
11885 LDFLAGS="$LDFLAGS $RDYNAMIC"
11886 if test "${have_libpython}" = no; then
11887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f6528abd
JK
11888/* end confdefs.h. */
11889
11890int
11891main ()
11892{
11893
11894 ;
11895 return 0;
11896}
11897_ACEOF
11898if ac_fn_c_try_link "$LINENO"; then :
3bebe2f2
JK
11899 dynamic_list=true
11900fi
11901rm -f core conftest.err conftest.$ac_objext \
11902 conftest$ac_exeext conftest.$ac_ext
38f6b338
JK
11903 else
11904 # Workaround http://bugs.python.org/issue4434 where static
11905 # libpythonX.Y.a would get its symbols required for
11906 # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
11907 # Problem does not happen for the recommended libpythonX.Y.so linkage.
11908 old_CFLAGS="$CFLAGS"
11909 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
8c1fb155
JK
11910 old_LIBS="$LIBS"
11911 LIBS="$LIBS $PYTHON_LIBS"
38f6b338 11912 if test "$cross_compiling" = yes; then :
3bebe2f2 11913 true
f6528abd 11914else
3bebe2f2
JK
11915 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11916/* end confdefs.h. */
11917#include "${have_libpython}/Python.h"
11918int
11919main ()
11920{
11921int err;
38f6b338
JK
11922 Py_Initialize ();
11923 err = PyRun_SimpleString ("import itertools\n");
11924 Py_Finalize ();
11925 return err == 0 ? 0 : 1;
3bebe2f2
JK
11926 ;
11927 return 0;
11928}
11929_ACEOF
11930if ac_fn_c_try_run "$LINENO"; then :
11931 dynamic_list=true
11932fi
11933rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11934 conftest.$ac_objext conftest.beam conftest.$ac_ext
11935fi
11936
8c1fb155 11937 LIBS="$old_LIBS"
38f6b338
JK
11938 CFLAGS="$old_CFLAGS"
11939 fi
11940 LDFLAGS="$old_LDFLAGS"
11941fi
11942if $dynamic_list; then
11943 found="-Wl,--dynamic-list"
11944 RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
f6528abd 11945else
38f6b338
JK
11946 found="-rdynamic"
11947 RDYNAMIC="-rdynamic"
f6528abd 11948fi
f6528abd 11949
38f6b338 11950{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
f6528abd 11951$as_echo "$found" >&6; }
0407b3f1 11952
f6528abd 11953
0407b3f1 11954if test ${build} = ${host} -a ${host} = ${target} ; then
c906108c 11955 case ${host_os} in
c906108c 11956 solaris*)
d92419e5
JB
11957 # See if thread_db library is around for Solaris thread debugging.
11958 # Note that we must explicitly test for version 1 of the library
11959 # because version 0 (present on Solaris 2.4 or earlier) doesn't have
11960 # the same API.
81ecdfbb
RW
11961 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris thread debugging library" >&5
11962$as_echo_n "checking for Solaris thread debugging library... " >&6; }
c906108c 11963 if test -f /usr/lib/libthread_db.so.1 ; then
81ecdfbb
RW
11964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11965$as_echo "yes" >&6; }
60ca704f 11966
81ecdfbb 11967$as_echo "#define HAVE_THREAD_DB_LIB 1" >>confdefs.h
c906108c 11968
3483b318 11969 CONFIG_OBS="${CONFIG_OBS} sol-thread.o"
c906108c 11970 CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
43c75337
JB
11971 # On SPARC CPUs, we also need to build sparc-sol-thread.
11972 case ${host_cpu} in
11973 sparc*)
11974 CONFIG_OBS="${CONFIG_OBS} sparc-sol-thread.o"
11975 CONFIG_SRCS="${CONFIG_SRCS} sparc-sol-thread.c"
11976 ;;
11977 esac
81ecdfbb
RW
11978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
11979$as_echo_n "checking for dlopen in -ldl... " >&6; }
11980if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
11981 $as_echo_n "(cached) " >&6
c906108c 11982else
bec39cab 11983 ac_check_lib_save_LIBS=$LIBS
c906108c 11984LIBS="-ldl $LIBS"
81ecdfbb 11985cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
11986/* end confdefs.h. */
11987
81ecdfbb
RW
11988/* Override any GCC internal prototype to avoid an error.
11989 Use char because int might match the return type of a GCC
11990 builtin and then its argument prototype would still apply. */
bec39cab
AC
11991#ifdef __cplusplus
11992extern "C"
11993#endif
bec39cab
AC
11994char dlopen ();
11995int
11996main ()
11997{
81ecdfbb 11998return dlopen ();
bec39cab
AC
11999 ;
12000 return 0;
12001}
12002_ACEOF
81ecdfbb 12003if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
12004 ac_cv_lib_dl_dlopen=yes
12005else
81ecdfbb 12006 ac_cv_lib_dl_dlopen=no
bec39cab 12007fi
81ecdfbb
RW
12008rm -f core conftest.err conftest.$ac_objext \
12009 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
12010LIBS=$ac_check_lib_save_LIBS
12011fi
81ecdfbb
RW
12012{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
12013$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
12014if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
bec39cab
AC
12015 cat >>confdefs.h <<_ACEOF
12016#define HAVE_LIBDL 1
12017_ACEOF
c906108c
SS
12018
12019 LIBS="-ldl $LIBS"
12020
c906108c
SS
12021fi
12022
f6528abd 12023 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} $RDYNAMIC"
c906108c
SS
12024 # Sun randomly tweaked the prototypes in <proc_service.h>
12025 # at one point.
81ecdfbb
RW
12026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if <proc_service.h> is old" >&5
12027$as_echo_n "checking if <proc_service.h> is old... " >&6; }
12028 if test "${gdb_cv_proc_service_is_old+set}" = set; then :
12029 $as_echo_n "(cached) " >&6
c906108c 12030else
bec39cab 12031
81ecdfbb 12032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12033/* end confdefs.h. */
c906108c
SS
12034
12035 #include <proc_service.h>
12036 ps_err_e ps_pdwrite
12037 (struct ps_prochandle*, psaddr_t, const void*, size_t);
c906108c 12038
bec39cab
AC
12039int
12040main ()
12041{
12042
12043 ;
12044 return 0;
12045}
12046_ACEOF
81ecdfbb 12047if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
12048 gdb_cv_proc_service_is_old=no
12049else
81ecdfbb 12050 gdb_cv_proc_service_is_old=yes
c906108c 12051fi
81ecdfbb 12052rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 12053
c906108c
SS
12054fi
12055
81ecdfbb
RW
12056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_proc_service_is_old" >&5
12057$as_echo "$gdb_cv_proc_service_is_old" >&6; }
c906108c 12058 if test $gdb_cv_proc_service_is_old = yes; then
60ca704f 12059
81ecdfbb 12060$as_echo "#define PROC_SERVICE_IS_OLD 1" >>confdefs.h
c906108c
SS
12061
12062 fi
12063 else
81ecdfbb
RW
12064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12065$as_echo "no" >&6; }
c906108c
SS
12066 fi
12067 ;;
d92419e5 12068 aix*)
81ecdfbb
RW
12069 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
12070$as_echo_n "checking for AiX thread debugging library... " >&6; }
12071 if test "${gdb_cv_have_aix_thread_debug+set}" = set; then :
12072 $as_echo_n "(cached) " >&6
bec39cab 12073else
81ecdfbb 12074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12075/* end confdefs.h. */
d92419e5 12076#include <sys/pthdebug.h>
bec39cab
AC
12077int
12078main ()
12079{
d92419e5
JB
12080#ifndef PTHDB_VERSION_3
12081 #error
12082 #endif
bec39cab
AC
12083 ;
12084 return 0;
12085}
12086_ACEOF
81ecdfbb 12087if ac_fn_c_try_compile "$LINENO"; then :
d92419e5
JB
12088 gdb_cv_have_aix_thread_debug=yes
12089else
81ecdfbb 12090 gdb_cv_have_aix_thread_debug=no
d92419e5 12091fi
81ecdfbb 12092rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d92419e5
JB
12093fi
12094
81ecdfbb
RW
12095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
12096$as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
d92419e5
JB
12097 if test $gdb_cv_have_aix_thread_debug = yes; then
12098 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
3483b318 12099 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
7f533142 12100 LIBS="$LIBS -lpthdebug"
d645e32e
JB
12101
12102 # Older versions of AIX do not provide the declaration for
12103 # the getthrds function (it appears that it was introduced
12104 # with AIX 6.x).
12105 ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h>
12106"
12107if test "x$ac_cv_have_decl_getthrds" = x""yes; then :
12108 ac_have_decl=1
12109else
12110 ac_have_decl=0
12111fi
12112
12113cat >>confdefs.h <<_ACEOF
12114#define HAVE_DECL_GETTHRDS $ac_have_decl
12115_ACEOF
12116
d92419e5
JB
12117 fi
12118 ;;
c906108c 12119 esac
bec39cab 12120
c906108c
SS
12121fi
12122
3f47be5c 12123if test "x$ac_cv_header_thread_db_h" = "xyes"; then
81ecdfbb
RW
12124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
12125$as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
12126if test "${gdb_cv_thread_db_h_has_td_notalloc+set}" = set; then :
12127 $as_echo_n "(cached) " >&6
bec39cab 12128else
81ecdfbb 12129 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12130/* end confdefs.h. */
3f47be5c 12131#include <thread_db.h>
bec39cab
AC
12132int
12133main ()
12134{
3f47be5c 12135int i = TD_NOTALLOC;
bec39cab
AC
12136 ;
12137 return 0;
12138}
12139_ACEOF
81ecdfbb 12140if ac_fn_c_try_compile "$LINENO"; then :
3f47be5c
EZ
12141 gdb_cv_thread_db_h_has_td_notalloc=yes
12142else
81ecdfbb 12143 gdb_cv_thread_db_h_has_td_notalloc=no
bec39cab 12144
3f47be5c 12145fi
81ecdfbb 12146rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3f47be5c 12147
bec39cab 12148fi
81ecdfbb
RW
12149{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
12150$as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
12151 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
12152$as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
12153if test "${gdb_cv_thread_db_h_has_td_version+set}" = set; then :
12154 $as_echo_n "(cached) " >&6
59f80f10 12155else
81ecdfbb 12156 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
12157/* end confdefs.h. */
12158#include <thread_db.h>
12159int
12160main ()
12161{
12162int i = TD_VERSION;
12163 ;
12164 return 0;
12165}
12166_ACEOF
81ecdfbb 12167if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
12168 gdb_cv_thread_db_h_has_td_version=yes
12169else
81ecdfbb 12170 gdb_cv_thread_db_h_has_td_version=no
59f80f10
DJ
12171
12172fi
81ecdfbb 12173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
12174
12175fi
81ecdfbb
RW
12176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
12177$as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
12178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
12179$as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
12180if test "${gdb_cv_thread_db_h_has_td_notls+set}" = set; then :
12181 $as_echo_n "(cached) " >&6
59f80f10 12182else
81ecdfbb 12183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
12184/* end confdefs.h. */
12185#include <thread_db.h>
12186int
12187main ()
12188{
12189int i = TD_NOTLS;
12190 ;
12191 return 0;
12192}
12193_ACEOF
81ecdfbb 12194if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
12195 gdb_cv_thread_db_h_has_td_notls=yes
12196else
81ecdfbb 12197 gdb_cv_thread_db_h_has_td_notls=no
59f80f10
DJ
12198
12199fi
81ecdfbb 12200rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
12201
12202fi
81ecdfbb
RW
12203{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
12204$as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
3f47be5c
EZ
12205fi
12206if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
bec39cab 12207
81ecdfbb 12208$as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
3f47be5c 12209
59f80f10
DJ
12210fi
12211if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
12212
81ecdfbb 12213$as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
59f80f10
DJ
12214
12215fi
12216if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
12217
81ecdfbb 12218$as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
59f80f10 12219
3f47be5c
EZ
12220fi
12221
b757528f 12222if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then
81ecdfbb
RW
12223 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/syscall.h> has __NR_tkill" >&5
12224$as_echo_n "checking whether <sys/syscall.h> has __NR_tkill... " >&6; }
12225if test "${gdb_cv_sys_syscall_h_has_tkill+set}" = set; then :
12226 $as_echo_n "(cached) " >&6
bec39cab 12227else
81ecdfbb 12228 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12229/* end confdefs.h. */
b757528f 12230#include <sys/syscall.h>
bec39cab
AC
12231int
12232main ()
12233{
b757528f 12234int i = __NR_tkill;
bec39cab
AC
12235 ;
12236 return 0;
12237}
12238_ACEOF
81ecdfbb 12239if ac_fn_c_try_compile "$LINENO"; then :
b757528f
JJ
12240 gdb_cv_sys_syscall_h_has_tkill=yes
12241else
81ecdfbb 12242 gdb_cv_sys_syscall_h_has_tkill=no
bec39cab 12243
b757528f 12244fi
81ecdfbb 12245rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b757528f 12246
bec39cab 12247fi
81ecdfbb
RW
12248{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_sys_syscall_h_has_tkill" >&5
12249$as_echo "$gdb_cv_sys_syscall_h_has_tkill" >&6; }
b757528f
JJ
12250fi
12251if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes" && test "x$ac_cv_func_syscall" = "xyes"; then
bec39cab 12252
81ecdfbb 12253$as_echo "#define HAVE_TKILL_SYSCALL 1" >>confdefs.h
b757528f
JJ
12254
12255fi
12256
81ecdfbb
RW
12257ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
12258"
12259if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = x""yes; then :
12260 ac_have_decl=1
10568435 12261else
81ecdfbb 12262 ac_have_decl=0
10568435 12263fi
10568435
JK
12264
12265cat >>confdefs.h <<_ACEOF
81ecdfbb 12266#define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
10568435
JK
12267_ACEOF
12268
12269
81ecdfbb
RW
12270if test "$cross_compiling" = yes; then :
12271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
12272/* end confdefs.h. */
12273#include <sys/personality.h>
12274int
12275main ()
12276{
12277
12278# if !HAVE_DECL_ADDR_NO_RANDOMIZE
12279# define ADDR_NO_RANDOMIZE 0x0040000
12280# endif
12281 /* Test the flag could be set and stays set. */
12282 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
12283 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
12284 return 1
12285 ;
12286 return 0;
12287}
12288_ACEOF
81ecdfbb 12289if ac_fn_c_try_link "$LINENO"; then :
10568435
JK
12290 have_personality=true
12291else
81ecdfbb 12292 have_personality=false
10568435 12293fi
81ecdfbb
RW
12294rm -f core conftest.err conftest.$ac_objext \
12295 conftest$ac_exeext conftest.$ac_ext
10568435 12296else
81ecdfbb 12297 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
12298/* end confdefs.h. */
12299#include <sys/personality.h>
12300int
12301main ()
12302{
12303
12304# if !HAVE_DECL_ADDR_NO_RANDOMIZE
12305# define ADDR_NO_RANDOMIZE 0x0040000
12306# endif
12307 /* Test the flag could be set and stays set. */
12308 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
12309 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
12310 return 1
12311 ;
12312 return 0;
12313}
12314_ACEOF
81ecdfbb 12315if ac_fn_c_try_run "$LINENO"; then :
10568435
JK
12316 have_personality=true
12317else
81ecdfbb 12318 have_personality=false
10568435 12319fi
81ecdfbb
RW
12320rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12321 conftest.$ac_objext conftest.beam conftest.$ac_ext
10568435 12322fi
81ecdfbb 12323
10568435
JK
12324if $have_personality
12325then
12326
81ecdfbb 12327$as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
10568435
JK
12328
12329fi
12330
fb40c209 12331
f83d8a90
DE
12332# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
12333# except that the argument to --with-sysroot is optional.
12334# --with-sysroot (or --with-sysroot=yes) sets the default sysroot path.
12335if test "x$with_sysroot" = xyes; then
12336 with_sysroot="${exec_prefix}/${target_alias}/sys-root"
12337fi
bec39cab 12338
81ecdfbb
RW
12339# Check whether --with-sysroot was given.
12340if test "${with_sysroot+set}" = set; then :
f83d8a90
DE
12341 withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval
12342else
12343 TARGET_SYSTEM_ROOT=
12344fi
030292b7 12345
030292b7 12346
f83d8a90
DE
12347 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
12348 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
12349 ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT`
12350 ac_define_dir=`eval echo $ac_define_dir`
030292b7 12351
f83d8a90
DE
12352cat >>confdefs.h <<_ACEOF
12353#define TARGET_SYSTEM_ROOT "$ac_define_dir"
12354_ACEOF
bec39cab 12355
030292b7 12356
b14b1491 12357
f83d8a90
DE
12358
12359 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
12360 if test "x$prefix" = xNONE; then
12361 test_prefix=/usr/local
12362 else
12363 test_prefix=$prefix
12364 fi
12365 else
12366 test_prefix=$exec_prefix
12367 fi
12368 value=0
12369 case ${ac_define_dir} in
12370 "${test_prefix}"|"${test_prefix}/"*|\
12371 '${exec_prefix}'|'${exec_prefix}/'*)
12372 value=1
12373 ;;
12374 esac
12375
12376cat >>confdefs.h <<_ACEOF
12377#define TARGET_SYSTEM_ROOT_RELOCATABLE $value
12378_ACEOF
030292b7
DJ
12379
12380
12381
16e7150e 12382
16e7150e 12383
81ecdfbb
RW
12384# Check whether --with-system-gdbinit was given.
12385if test "${with_system_gdbinit+set}" = set; then :
12386 withval=$with_system_gdbinit;
b14b1491
TT
12387 SYSTEM_GDBINIT=$withval
12388else
12389 SYSTEM_GDBINIT=
81ecdfbb
RW
12390fi
12391
16e7150e
JG
12392
12393 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
12394 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 12395 ac_define_dir=`eval echo $SYSTEM_GDBINIT`
16e7150e
JG
12396 ac_define_dir=`eval echo $ac_define_dir`
12397
12398cat >>confdefs.h <<_ACEOF
12399#define SYSTEM_GDBINIT "$ac_define_dir"
12400_ACEOF
12401
12402
12403
0c4a4063 12404
b14b1491
TT
12405 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
12406 if test "x$prefix" = xNONE; then
12407 test_prefix=/usr/local
12408 else
12409 test_prefix=$prefix
12410 fi
12411 else
12412 test_prefix=$exec_prefix
12413 fi
12414 value=0
12415 case ${ac_define_dir} in
12416 "${test_prefix}"|"${test_prefix}/"*|\
12417 '${exec_prefix}'|'${exec_prefix}/'*)
12418 value=1
12419 ;;
12420 esac
16e7150e 12421
b14b1491
TT
12422cat >>confdefs.h <<_ACEOF
12423#define SYSTEM_GDBINIT_RELOCATABLE $value
16e7150e
JG
12424_ACEOF
12425
b14b1491 12426
16e7150e 12427
0c4a4063 12428
81ecdfbb
RW
12429# Check whether --enable-werror was given.
12430if test "${enable_werror+set}" = set; then :
12431 enableval=$enable_werror; case "${enableval}" in
094a342e
MK
12432 yes | y) ERROR_ON_WARNING="yes" ;;
12433 no | n) ERROR_ON_WARNING="no" ;;
81ecdfbb 12434 *) as_fn_error "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
094a342e 12435 esac
81ecdfbb
RW
12436fi
12437
094a342e 12438
a68ffae9
JK
12439# Enable -Werror by default when using gcc. Turn it off for releases.
12440if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
094a342e
MK
12441 ERROR_ON_WARNING=yes
12442fi
12443
12444WERROR_CFLAGS=""
12445if test "${ERROR_ON_WARNING}" = yes ; then
12446 WERROR_CFLAGS="-Werror"
12447fi
12448
aa79a185
DJ
12449# The entries after -Wno-pointer-sign are disabled warnings which may
12450# be enabled in the future, which can not currently be used to build
12451# GDB.
12452# NOTE: If you change this list, remember to update
3b851bce 12453# gdb/doc/gdbint.texinfo.
aa79a185 12454build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
bd3f3b55 12455-Wformat-nonliteral -Wpointer-sign \
1cb5e2a4 12456-Wno-unused -Wunused-value -Wunused-function \
352b3eda 12457-Wno-switch -Wno-char-subscripts -Wmissing-prototypes \
d4fb63e1 12458-Wdeclaration-after-statement -Wempty-body"
a3b362c4 12459
3526781e
DJ
12460# Enable -Wno-format by default when using gcc on mingw since many
12461# GCC versions complain about %I64.
12462case "${host}" in
12463 *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;;
12464esac
12465
81ecdfbb
RW
12466# Check whether --enable-build-warnings was given.
12467if test "${enable_build_warnings+set}" = set; then :
12468 enableval=$enable_build_warnings; case "${enableval}" in
c906108c
SS
12469 yes) ;;
12470 no) build_warnings="-w";;
12471 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
12472 build_warnings="${build_warnings} ${t}";;
12473 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
12474 build_warnings="${t} ${build_warnings}";;
12475 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
12476esac
d4f3574e 12477if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 12478 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 12479fi
81ecdfbb
RW
12480fi
12481# Check whether --enable-gdb-build-warnings was given.
12482if test "${enable_gdb_build_warnings+set}" = set; then :
12483 enableval=$enable_gdb_build_warnings; case "${enableval}" in
3b851bce
AC
12484 yes) ;;
12485 no) build_warnings="-w";;
12486 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
12487 build_warnings="${build_warnings} ${t}";;
12488 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
12489 build_warnings="${t} ${build_warnings}";;
12490 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
12491esac
12492if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
12493 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
12494fi
81ecdfbb
RW
12495fi
12496WARN_CFLAGS=""
c906108c
SS
12497if test "x${build_warnings}" != x -a "x$GCC" = xyes
12498then
81ecdfbb
RW
12499 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
12500$as_echo_n "checking compiler warning flags... " >&6; }
746a987d
AC
12501 # Separate out the -Werror flag as some files just cannot be
12502 # compiled with it enabled.
12503 for w in ${build_warnings}; do
12504 case $w in
12505 -Werr*) WERROR_CFLAGS=-Werror ;;
12506 *) # Check that GCC accepts it
4536bbc6
AC
12507 saved_CFLAGS="$CFLAGS"
12508 CFLAGS="$CFLAGS $w"
81ecdfbb 12509 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12510/* end confdefs.h. */
4536bbc6 12511
bec39cab
AC
12512int
12513main ()
12514{
4536bbc6 12515
bec39cab
AC
12516 ;
12517 return 0;
12518}
12519_ACEOF
81ecdfbb 12520if ac_fn_c_try_compile "$LINENO"; then :
4536bbc6 12521 WARN_CFLAGS="${WARN_CFLAGS} $w"
4536bbc6 12522fi
81ecdfbb 12523rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4536bbc6 12524 CFLAGS="$saved_CFLAGS"
746a987d
AC
12525 esac
12526 done
81ecdfbb
RW
12527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
12528$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
c906108c
SS
12529fi
12530
12531
104c1213 12532
7a292a7a 12533# In the Cygwin environment, we need some additional flags.
81ecdfbb
RW
12534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
12535$as_echo_n "checking for cygwin... " >&6; }
12536if test "${gdb_cv_os_cygwin+set}" = set; then :
12537 $as_echo_n "(cached) " >&6
bec39cab 12538else
81ecdfbb 12539 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12540/* end confdefs.h. */
7a292a7a
SS
12541
12542#if defined (__CYGWIN__) || defined (__CYGWIN32__)
12543lose
12544#endif
bec39cab 12545_ACEOF
7a292a7a 12546if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb 12547 $EGREP "lose" >/dev/null 2>&1; then :
7a292a7a
SS
12548 gdb_cv_os_cygwin=yes
12549else
7a292a7a
SS
12550 gdb_cv_os_cygwin=no
12551fi
12552rm -f conftest*
12553
12554fi
81ecdfbb
RW
12555{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
12556$as_echo "$gdb_cv_os_cygwin" >&6; }
7a292a7a 12557
aff38e61 12558
3eb25fda 12559SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
aff38e61 12560case ${host} in
95cbc983
AC
12561 *go32* ) SER_HARDWIRE=ser-go32.o ;;
12562 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
0ea3f30e 12563 *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
aff38e61
AC
12564esac
12565
12566
cd0fc7c3
SS
12567# libreadline needs libuser32.a in a cygwin environment
12568WIN32LIBS=
12569if test x$gdb_cv_os_cygwin = xyes; then
c5394b80
JM
12570 WIN32LIBS="-luser32"
12571 case "${target}" in
12572 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
12573 ;;
12574 esac
cd0fc7c3 12575fi
c906108c 12576
b4505029
MM
12577# The ser-tcp.c module requires sockets.
12578case ${host} in
12579 *mingw32*)
12580
81ecdfbb 12581$as_echo "#define USE_WIN32API 1" >>confdefs.h
b4505029
MM
12582
12583 WIN32LIBS="$WIN32LIBS -lws2_32"
12584 ;;
12585esac
12586
7a292a7a 12587
31d99776 12588# Add ELF support to GDB, but only if BFD includes ELF support.
def63ff0
TT
12589
12590 OLD_CFLAGS=$CFLAGS
12591 OLD_LDFLAGS=$LDFLAGS
12592 OLD_LIBS=$LIBS
12593 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
12594 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
12595 # always want our bfd.
12596 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
12597 LDFLAGS="-L../bfd -L../libiberty $LDFLAGS"
12598 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
12599 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
12600 if test "$plugins" = "yes"; then
12601 LIBS="-ldl $LIBS"
12602 fi
12603 LIBS="-lbfd -liberty $intl $LIBS"
12604 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
81ecdfbb
RW
12605$as_echo_n "checking for ELF support in BFD... " >&6; }
12606if test "${gdb_cv_var_elf+set}" = set; then :
12607 $as_echo_n "(cached) " >&6
31d99776 12608else
81ecdfbb 12609 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31d99776
DJ
12610/* end confdefs.h. */
12611#include <stdlib.h>
def63ff0
TT
12612 #include "bfd.h"
12613 #include "elf-bfd.h"
31d99776
DJ
12614
12615int
12616main ()
12617{
def63ff0 12618return bfd_get_elf_phdr_upper_bound (NULL);
31d99776
DJ
12619 ;
12620 return 0;
12621}
12622_ACEOF
81ecdfbb 12623if ac_fn_c_try_link "$LINENO"; then :
31d99776
DJ
12624 gdb_cv_var_elf=yes
12625else
81ecdfbb 12626 gdb_cv_var_elf=no
31d99776 12627fi
81ecdfbb
RW
12628rm -f core conftest.err conftest.$ac_objext \
12629 conftest$ac_exeext conftest.$ac_ext
31d99776 12630fi
81ecdfbb
RW
12631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
12632$as_echo "$gdb_cv_var_elf" >&6; }
def63ff0
TT
12633 CFLAGS=$OLD_CFLAGS
12634 LDFLAGS=$OLD_LDFLAGS
12635 LIBS=$OLD_LIBS
31d99776 12636if test $gdb_cv_var_elf = yes; then
55aa24fb 12637 CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o"
31d99776 12638
81ecdfbb 12639$as_echo "#define HAVE_ELF 1" >>confdefs.h
31d99776 12640
075ff26d
JK
12641 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
12642 if test "$plugins" = "yes"; then
def63ff0 12643 LIBS="-ldl $LIBS"
075ff26d 12644 fi
31d99776 12645fi
31d99776 12646
4f05add4
TT
12647# Add macho support to GDB, but only if BFD includes it.
12648
12649 OLD_CFLAGS=$CFLAGS
12650 OLD_LDFLAGS=$LDFLAGS
12651 OLD_LIBS=$LIBS
12652 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
12653 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
12654 # always want our bfd.
12655 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
12656 LDFLAGS="-L../bfd -L../libiberty $LDFLAGS"
12657 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
12658 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
12659 if test "$plugins" = "yes"; then
12660 LIBS="-ldl $LIBS"
12661 fi
12662 LIBS="-lbfd -liberty $intl $LIBS"
12663 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5
12664$as_echo_n "checking for Mach-O support in BFD... " >&6; }
12665if test "${gdb_cv_var_macho+set}" = set; then :
12666 $as_echo_n "(cached) " >&6
12667else
12668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12669/* end confdefs.h. */
12670#include <stdlib.h>
12671 #include "bfd.h"
12672 #include "mach-o.h"
12673
12674int
12675main ()
12676{
12677return bfd_mach_o_lookup_command (NULL, 0, NULL);
12678 ;
12679 return 0;
12680}
12681_ACEOF
12682if ac_fn_c_try_link "$LINENO"; then :
12683 gdb_cv_var_macho=yes
12684else
12685 gdb_cv_var_macho=no
12686fi
12687rm -f core conftest.err conftest.$ac_objext \
12688 conftest$ac_exeext conftest.$ac_ext
12689fi
12690{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5
12691$as_echo "$gdb_cv_var_macho" >&6; }
12692 CFLAGS=$OLD_CFLAGS
12693 LDFLAGS=$OLD_LDFLAGS
12694 LIBS=$OLD_LIBS
12695if test $gdb_cv_var_macho = yes; then
12696 CONFIG_OBS="$CONFIG_OBS machoread.o"
12697fi
12698
b2259038
TT
12699# Add SOM support to GDB, but only if BFD includes it.
12700
12701 OLD_CFLAGS=$CFLAGS
12702 OLD_LDFLAGS=$LDFLAGS
12703 OLD_LIBS=$LIBS
12704 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
12705 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
12706 # always want our bfd.
12707 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
12708 LDFLAGS="-L../bfd -L../libiberty $LDFLAGS"
12709 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
12710 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
12711 if test "$plugins" = "yes"; then
12712 LIBS="-ldl $LIBS"
12713 fi
12714 LIBS="-lbfd -liberty $intl $LIBS"
12715 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SOM support in BFD" >&5
12716$as_echo_n "checking for SOM support in BFD... " >&6; }
12717if test "${gdb_cv_var_som+set}" = set; then :
12718 $as_echo_n "(cached) " >&6
12719else
12720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12721/* end confdefs.h. */
12722#include <stdlib.h>
12723 #include "bfd.h"
12724 #include "som.h"
12725
12726int
12727main ()
12728{
12729return bfd_som_attach_aux_hdr (NULL, 0, NULL);
12730 ;
12731 return 0;
12732}
12733_ACEOF
12734if ac_fn_c_try_link "$LINENO"; then :
12735 gdb_cv_var_som=yes
12736else
12737 gdb_cv_var_som=no
12738fi
12739rm -f core conftest.err conftest.$ac_objext \
12740 conftest$ac_exeext conftest.$ac_ext
12741fi
12742{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_som" >&5
12743$as_echo "$gdb_cv_var_som" >&6; }
12744 CFLAGS=$OLD_CFLAGS
12745 LDFLAGS=$OLD_LDFLAGS
12746 LIBS=$OLD_LIBS
12747if test $gdb_cv_var_som = yes; then
12748 CONFIG_OBS="$CONFIG_OBS somread.o"
12749fi
12750
121ce6e5
DJ
12751# Add any host-specific objects to GDB.
12752CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
12753
608e2dbb
TT
12754# If building on ELF, look for lzma support for embedded compressed debug info.
12755if test $gdb_cv_var_elf = yes; then
12756
12757# Check whether --with-lzma was given.
12758if test "${with_lzma+set}" = set; then :
12759 withval=$with_lzma;
12760else
12761 with_lzma=auto
12762fi
12763
12764 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5
12765$as_echo_n "checking whether to use lzma... " >&6; }
12766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5
12767$as_echo "$with_lzma" >&6; }
12768
12769 if test "${with_lzma}" != no; then
12770
12771
12772
12773
12774
12775
12776
12777
12778 use_additional=yes
12779
12780 acl_save_prefix="$prefix"
12781 prefix="$acl_final_prefix"
12782 acl_save_exec_prefix="$exec_prefix"
12783 exec_prefix="$acl_final_exec_prefix"
12784
12785 eval additional_includedir=\"$includedir\"
12786 eval additional_libdir=\"$libdir\"
12787
12788 exec_prefix="$acl_save_exec_prefix"
12789 prefix="$acl_save_prefix"
12790
12791
12792# Check whether --with-liblzma-prefix was given.
12793if test "${with_liblzma_prefix+set}" = set; then :
12794 withval=$with_liblzma_prefix;
12795 if test "X$withval" = "Xno"; then
12796 use_additional=no
12797 else
12798 if test "X$withval" = "X"; then
12799
12800 acl_save_prefix="$prefix"
12801 prefix="$acl_final_prefix"
12802 acl_save_exec_prefix="$exec_prefix"
12803 exec_prefix="$acl_final_exec_prefix"
12804
12805 eval additional_includedir=\"$includedir\"
12806 eval additional_libdir=\"$libdir\"
12807
12808 exec_prefix="$acl_save_exec_prefix"
12809 prefix="$acl_save_prefix"
12810
12811 else
12812 additional_includedir="$withval/include"
12813 additional_libdir="$withval/lib"
12814 fi
12815 fi
12816
12817fi
12818
12819 LIBLZMA=
12820 LTLIBLZMA=
12821 INCLZMA=
12822 rpathdirs=
12823 ltrpathdirs=
12824 names_already_handled=
12825 names_next_round='lzma '
12826 while test -n "$names_next_round"; do
12827 names_this_round="$names_next_round"
12828 names_next_round=
12829 for name in $names_this_round; do
12830 already_handled=
12831 for n in $names_already_handled; do
12832 if test "$n" = "$name"; then
12833 already_handled=yes
12834 break
12835 fi
12836 done
12837 if test -z "$already_handled"; then
12838 names_already_handled="$names_already_handled $name"
12839 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
12840 eval value=\"\$HAVE_LIB$uppername\"
12841 if test -n "$value"; then
12842 if test "$value" = yes; then
12843 eval value=\"\$LIB$uppername\"
12844 test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value"
12845 eval value=\"\$LTLIB$uppername\"
12846 test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value"
12847 else
12848 :
12849 fi
12850 else
12851 found_dir=
12852 found_la=
12853 found_so=
12854 found_a=
12855 if test $use_additional = yes; then
12856 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
12857 found_dir="$additional_libdir"
12858 found_so="$additional_libdir/lib$name.$shlibext"
12859 if test -f "$additional_libdir/lib$name.la"; then
12860 found_la="$additional_libdir/lib$name.la"
12861 fi
12862 else
12863 if test -f "$additional_libdir/lib$name.$libext"; then
12864 found_dir="$additional_libdir"
12865 found_a="$additional_libdir/lib$name.$libext"
12866 if test -f "$additional_libdir/lib$name.la"; then
12867 found_la="$additional_libdir/lib$name.la"
12868 fi
12869 fi
12870 fi
12871 fi
12872 if test "X$found_dir" = "X"; then
12873 for x in $LDFLAGS $LTLIBLZMA; do
12874
12875 acl_save_prefix="$prefix"
12876 prefix="$acl_final_prefix"
12877 acl_save_exec_prefix="$exec_prefix"
12878 exec_prefix="$acl_final_exec_prefix"
12879 eval x=\"$x\"
12880 exec_prefix="$acl_save_exec_prefix"
12881 prefix="$acl_save_prefix"
12882
12883 case "$x" in
12884 -L*)
12885 dir=`echo "X$x" | sed -e 's/^X-L//'`
12886 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
12887 found_dir="$dir"
12888 found_so="$dir/lib$name.$shlibext"
12889 if test -f "$dir/lib$name.la"; then
12890 found_la="$dir/lib$name.la"
12891 fi
12892 else
12893 if test -f "$dir/lib$name.$libext"; then
12894 found_dir="$dir"
12895 found_a="$dir/lib$name.$libext"
12896 if test -f "$dir/lib$name.la"; then
12897 found_la="$dir/lib$name.la"
12898 fi
12899 fi
12900 fi
12901 ;;
12902 esac
12903 if test "X$found_dir" != "X"; then
12904 break
12905 fi
12906 done
12907 fi
12908 if test "X$found_dir" != "X"; then
12909 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name"
12910 if test "X$found_so" != "X"; then
12911 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
12912 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
12913 else
12914 haveit=
12915 for x in $ltrpathdirs; do
12916 if test "X$x" = "X$found_dir"; then
12917 haveit=yes
12918 break
12919 fi
12920 done
12921 if test -z "$haveit"; then
12922 ltrpathdirs="$ltrpathdirs $found_dir"
12923 fi
12924 if test "$hardcode_direct" = yes; then
12925 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
12926 else
12927 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
12928 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
12929 haveit=
12930 for x in $rpathdirs; do
12931 if test "X$x" = "X$found_dir"; then
12932 haveit=yes
12933 break
12934 fi
12935 done
12936 if test -z "$haveit"; then
12937 rpathdirs="$rpathdirs $found_dir"
12938 fi
12939 else
12940 haveit=
12941 for x in $LDFLAGS $LIBLZMA; do
12942
12943 acl_save_prefix="$prefix"
12944 prefix="$acl_final_prefix"
12945 acl_save_exec_prefix="$exec_prefix"
12946 exec_prefix="$acl_final_exec_prefix"
12947 eval x=\"$x\"
12948 exec_prefix="$acl_save_exec_prefix"
12949 prefix="$acl_save_prefix"
12950
12951 if test "X$x" = "X-L$found_dir"; then
12952 haveit=yes
12953 break
12954 fi
12955 done
12956 if test -z "$haveit"; then
12957 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir"
12958 fi
12959 if test "$hardcode_minus_L" != no; then
12960 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
12961 else
12962 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
12963 fi
12964 fi
12965 fi
12966 fi
12967 else
12968 if test "X$found_a" != "X"; then
12969 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a"
12970 else
12971 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name"
12972 fi
12973 fi
12974 additional_includedir=
12975 case "$found_dir" in
12976 */lib | */lib/)
12977 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
12978 additional_includedir="$basedir/include"
12979 ;;
12980 esac
12981 if test "X$additional_includedir" != "X"; then
12982 if test "X$additional_includedir" != "X/usr/include"; then
12983 haveit=
12984 if test "X$additional_includedir" = "X/usr/local/include"; then
12985 if test -n "$GCC"; then
12986 case $host_os in
12987 linux*) haveit=yes;;
12988 esac
12989 fi
12990 fi
12991 if test -z "$haveit"; then
12992 for x in $CPPFLAGS $INCLZMA; do
12993
12994 acl_save_prefix="$prefix"
12995 prefix="$acl_final_prefix"
12996 acl_save_exec_prefix="$exec_prefix"
12997 exec_prefix="$acl_final_exec_prefix"
12998 eval x=\"$x\"
12999 exec_prefix="$acl_save_exec_prefix"
13000 prefix="$acl_save_prefix"
13001
13002 if test "X$x" = "X-I$additional_includedir"; then
13003 haveit=yes
13004 break
13005 fi
13006 done
13007 if test -z "$haveit"; then
13008 if test -d "$additional_includedir"; then
13009 INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir"
13010 fi
13011 fi
13012 fi
13013 fi
13014 fi
13015 if test -n "$found_la"; then
13016 save_libdir="$libdir"
13017 case "$found_la" in
13018 */* | *\\*) . "$found_la" ;;
13019 *) . "./$found_la" ;;
13020 esac
13021 libdir="$save_libdir"
13022 for dep in $dependency_libs; do
13023 case "$dep" in
13024 -L*)
13025 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
13026 if test "X$additional_libdir" != "X/usr/lib"; then
13027 haveit=
13028 if test "X$additional_libdir" = "X/usr/local/lib"; then
13029 if test -n "$GCC"; then
13030 case $host_os in
13031 linux*) haveit=yes;;
13032 esac
13033 fi
13034 fi
13035 if test -z "$haveit"; then
13036 haveit=
13037 for x in $LDFLAGS $LIBLZMA; do
13038
13039 acl_save_prefix="$prefix"
13040 prefix="$acl_final_prefix"
13041 acl_save_exec_prefix="$exec_prefix"
13042 exec_prefix="$acl_final_exec_prefix"
13043 eval x=\"$x\"
13044 exec_prefix="$acl_save_exec_prefix"
13045 prefix="$acl_save_prefix"
13046
13047 if test "X$x" = "X-L$additional_libdir"; then
13048 haveit=yes
13049 break
13050 fi
13051 done
13052 if test -z "$haveit"; then
13053 if test -d "$additional_libdir"; then
13054 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir"
13055 fi
13056 fi
13057 haveit=
13058 for x in $LDFLAGS $LTLIBLZMA; do
13059
13060 acl_save_prefix="$prefix"
13061 prefix="$acl_final_prefix"
13062 acl_save_exec_prefix="$exec_prefix"
13063 exec_prefix="$acl_final_exec_prefix"
13064 eval x=\"$x\"
13065 exec_prefix="$acl_save_exec_prefix"
13066 prefix="$acl_save_prefix"
13067
13068 if test "X$x" = "X-L$additional_libdir"; then
13069 haveit=yes
13070 break
13071 fi
13072 done
13073 if test -z "$haveit"; then
13074 if test -d "$additional_libdir"; then
13075 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir"
13076 fi
13077 fi
13078 fi
13079 fi
13080 ;;
13081 -R*)
13082 dir=`echo "X$dep" | sed -e 's/^X-R//'`
13083 if test "$enable_rpath" != no; then
13084 haveit=
13085 for x in $rpathdirs; do
13086 if test "X$x" = "X$dir"; then
13087 haveit=yes
13088 break
13089 fi
13090 done
13091 if test -z "$haveit"; then
13092 rpathdirs="$rpathdirs $dir"
13093 fi
13094 haveit=
13095 for x in $ltrpathdirs; do
13096 if test "X$x" = "X$dir"; then
13097 haveit=yes
13098 break
13099 fi
13100 done
13101 if test -z "$haveit"; then
13102 ltrpathdirs="$ltrpathdirs $dir"
13103 fi
13104 fi
13105 ;;
13106 -l*)
13107 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
13108 ;;
13109 *.la)
13110 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
13111 ;;
13112 *)
13113 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep"
13114 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep"
13115 ;;
13116 esac
13117 done
13118 fi
13119 else
13120 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
13121 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name"
13122 fi
13123 fi
13124 fi
13125 done
13126 done
13127 if test "X$rpathdirs" != "X"; then
13128 if test -n "$hardcode_libdir_separator"; then
13129 alldirs=
13130 for found_dir in $rpathdirs; do
13131 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
13132 done
13133 acl_save_libdir="$libdir"
13134 libdir="$alldirs"
13135 eval flag=\"$hardcode_libdir_flag_spec\"
13136 libdir="$acl_save_libdir"
13137 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
13138 else
13139 for found_dir in $rpathdirs; do
13140 acl_save_libdir="$libdir"
13141 libdir="$found_dir"
13142 eval flag=\"$hardcode_libdir_flag_spec\"
13143 libdir="$acl_save_libdir"
13144 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
13145 done
13146 fi
13147 fi
13148 if test "X$ltrpathdirs" != "X"; then
13149 for found_dir in $ltrpathdirs; do
13150 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir"
13151 done
13152 fi
13153
13154
13155 ac_save_CPPFLAGS="$CPPFLAGS"
13156
13157 for element in $INCLZMA; do
13158 haveit=
13159 for x in $CPPFLAGS; do
13160
13161 acl_save_prefix="$prefix"
13162 prefix="$acl_final_prefix"
13163 acl_save_exec_prefix="$exec_prefix"
13164 exec_prefix="$acl_final_exec_prefix"
13165 eval x=\"$x\"
13166 exec_prefix="$acl_save_exec_prefix"
13167 prefix="$acl_save_prefix"
13168
13169 if test "X$x" = "X$element"; then
13170 haveit=yes
13171 break
13172 fi
13173 done
13174 if test -z "$haveit"; then
13175 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
13176 fi
13177 done
13178
13179
13180 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5
13181$as_echo_n "checking for liblzma... " >&6; }
13182if test "${ac_cv_liblzma+set}" = set; then :
13183 $as_echo_n "(cached) " >&6
13184else
13185
13186 ac_save_LIBS="$LIBS"
13187 LIBS="$LIBS $LIBLZMA"
13188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13189/* end confdefs.h. */
13190#include "lzma.h"
13191int
13192main ()
13193{
13194lzma_index_iter iter;
13195 lzma_index_iter_init (&iter, 0);
13196 lzma_mf_is_supported (LZMA_MF_HC3);
13197 ;
13198 return 0;
13199}
13200_ACEOF
13201if ac_fn_c_try_link "$LINENO"; then :
13202 ac_cv_liblzma=yes
13203else
13204 ac_cv_liblzma=no
13205fi
13206rm -f core conftest.err conftest.$ac_objext \
13207 conftest$ac_exeext conftest.$ac_ext
13208 LIBS="$ac_save_LIBS"
13209
13210fi
13211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5
13212$as_echo "$ac_cv_liblzma" >&6; }
13213 if test "$ac_cv_liblzma" = yes; then
13214 HAVE_LIBLZMA=yes
13215
13216$as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h
13217
13218 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5
13219$as_echo_n "checking how to link with liblzma... " >&6; }
13220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5
13221$as_echo "$LIBLZMA" >&6; }
13222 else
13223 HAVE_LIBLZMA=no
13224 CPPFLAGS="$ac_save_CPPFLAGS"
13225 LIBLZMA=
13226 LTLIBLZMA=
13227 fi
13228
13229
13230
13231
13232
13233
13234 if test "$HAVE_LIBLZMA" != yes; then
13235 if test "$with_lzma" = yes; then
13236 as_fn_error "missing liblzma for --with-lzma" "$LINENO" 5
13237 fi
13238 fi
13239 fi
13240fi
13241
3fc11d3e
JM
13242LIBGUI="../libgui/src/libgui.a"
13243GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
13244
13245
7a292a7a 13246
3fc11d3e
JM
13247WIN32LDAPP=
13248
13249
13250
d91670b9 13251case "${host}" in
686a5eed 13252*-*-cygwin* | *-*-mingw* )
d91670b9
CV
13253 configdir="win"
13254 ;;
13255*)
13256 configdir="unix"
13257 ;;
13258esac
3fc11d3e
JM
13259
13260GDBTKLIBS=
13261if test "${enable_gdbtk}" = "yes"; then
13262
d1c3b63a
KS
13263 # Gdbtk must have an absolute path to srcdir in order to run
13264 # properly when not installed.
13265 here=`pwd`
13266 cd ${srcdir}
13267 GDBTK_SRC_DIR=`pwd`
13268 cd $here
13269
bec39cab 13270
5062cc19
KS
13271 #
13272 # Ok, lets find the tcl configuration
13273 # First, look for one uninstalled.
13274 # the alternative search directory is invoked by --with-tcl
13275 #
3fc11d3e 13276
5062cc19
KS
13277 if test x"${no_tcl}" = x ; then
13278 # we reset no_tcl in case something fails here
13279 no_tcl=true
bec39cab 13280
81ecdfbb
RW
13281# Check whether --with-tcl was given.
13282if test "${with_tcl+set}" = set; then :
13283 withval=$with_tcl; with_tclconfig=${withval}
13284fi
13285
13286 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
13287$as_echo_n "checking for Tcl configuration... " >&6; }
13288 if test "${ac_cv_c_tclconfig+set}" = set; then :
13289 $as_echo_n "(cached) " >&6
3fc11d3e 13290else
bec39cab 13291
3fc11d3e 13292
5062cc19
KS
13293 # First check to see if --with-tcl was specified.
13294 case "${host}" in
13295 *-*-cygwin*) platDir="win" ;;
13296 *) platDir="unix" ;;
13297 esac
13298 if test x"${with_tclconfig}" != x ; then
13299 if test -f "${with_tclconfig}/tclConfig.sh" ; then
13300 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
13301 else
81ecdfbb 13302 as_fn_error "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
5062cc19
KS
13303 fi
13304 fi
13305
13306 # then check for a private Tcl installation
13307 if test x"${ac_cv_c_tclconfig}" = x ; then
13308 for i in \
13309 ../tcl \
13310 `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
13311 `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
13312 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
13313 ../../tcl \
13314 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
13315 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
13316 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
13317 ../../../tcl \
13318 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
13319 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
13320 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
13321 if test -f "$i/$platDir/tclConfig.sh" ; then
13322 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
13323 break
13324 fi
13325 done
13326 fi
13327
13328 # on Darwin, check in Framework installation locations
13329 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
13330 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
13331 `ls -d /Library/Frameworks 2>/dev/null` \
13332 `ls -d /Network/Library/Frameworks 2>/dev/null` \
13333 `ls -d /System/Library/Frameworks 2>/dev/null` \
13334 ; do
13335 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
13336 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
13337 break
13338 fi
13339 done
13340 fi
13341
13342 # check in a few common install locations
13343 if test x"${ac_cv_c_tclconfig}" = x ; then
13344 for i in `ls -d ${libdir} 2>/dev/null` \
13345 `ls -d ${exec_prefix}/lib 2>/dev/null` \
13346 `ls -d ${prefix}/lib 2>/dev/null` \
13347 `ls -d /usr/local/lib 2>/dev/null` \
13348 `ls -d /usr/contrib/lib 2>/dev/null` \
13349 `ls -d /usr/lib 2>/dev/null` \
13350 ; do
13351 if test -f "$i/tclConfig.sh" ; then
13352 ac_cv_c_tclconfig=`(cd $i; pwd)`
13353 break
13354 fi
13355 done
13356 fi
3fc11d3e 13357
5062cc19
KS
13358 # check in a few other private locations
13359 if test x"${ac_cv_c_tclconfig}" = x ; then
13360 for i in \
13361 ${srcdir}/../tcl \
13362 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
13363 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
13364 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
13365 if test -f "$i/$platDir/tclConfig.sh" ; then
13366 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
13367 break
13368 fi
13369 done
13370 fi
bec39cab 13371
3fc11d3e
JM
13372fi
13373
5062cc19
KS
13374
13375 if test x"${ac_cv_c_tclconfig}" = x ; then
13376 TCL_BIN_DIR="# no Tcl configs found"
81ecdfbb
RW
13377 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
13378$as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
5062cc19
KS
13379 else
13380 no_tcl=
13381 TCL_BIN_DIR=${ac_cv_c_tclconfig}
81ecdfbb
RW
13382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
13383$as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
5062cc19
KS
13384 fi
13385 fi
3fc11d3e 13386
bec39cab 13387
85541719
DE
13388 # If $no_tk is nonempty, then we can't do Tk, and there is no
13389 # point to doing Tcl.
bec39cab 13390
5062cc19
KS
13391 #
13392 # Ok, lets find the tk configuration
13393 # First, look for one uninstalled.
13394 # the alternative search directory is invoked by --with-tk
13395 #
3fc11d3e 13396
5062cc19
KS
13397 if test x"${no_tk}" = x ; then
13398 # we reset no_tk in case something fails here
13399 no_tk=true
bec39cab 13400
81ecdfbb
RW
13401# Check whether --with-tk was given.
13402if test "${with_tk+set}" = set; then :
13403 withval=$with_tk; with_tkconfig=${withval}
13404fi
13405
13406 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
13407$as_echo_n "checking for Tk configuration... " >&6; }
13408 if test "${ac_cv_c_tkconfig+set}" = set; then :
13409 $as_echo_n "(cached) " >&6
bec39cab 13410else
3fc11d3e
JM
13411
13412
5062cc19
KS
13413 # First check to see if --with-tkconfig was specified.
13414 if test x"${with_tkconfig}" != x ; then
13415 if test -f "${with_tkconfig}/tkConfig.sh" ; then
13416 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
13417 else
81ecdfbb 13418 as_fn_error "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
5062cc19
KS
13419 fi
13420 fi
3fc11d3e 13421
5062cc19
KS
13422 # then check for a private Tk library
13423 case "${host}" in
13424 *-*-cygwin*) platDir="win" ;;
13425 *) platDir="unix" ;;
13426 esac
13427 if test x"${ac_cv_c_tkconfig}" = x ; then
13428 for i in \
13429 ../tk \
13430 `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
13431 `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
13432 `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
13433 ../../tk \
13434 `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
13435 `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
13436 `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
13437 ../../../tk \
13438 `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
13439 `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
13440 `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
13441 if test -f "$i/$platDir/tkConfig.sh" ; then
13442 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
13443 break
13444 fi
13445 done
13446 fi
13447
13448 # on Darwin, check in Framework installation locations
13449 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
13450 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
13451 `ls -d /Library/Frameworks 2>/dev/null` \
13452 `ls -d /Network/Library/Frameworks 2>/dev/null` \
13453 `ls -d /System/Library/Frameworks 2>/dev/null` \
13454 ; do
13455 if test -f "$i/Tk.framework/tkConfig.sh" ; then
13456 ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
13457 break
13458 fi
13459 done
13460 fi
13461
13462 # check in a few common install locations
13463 if test x"${ac_cv_c_tkconfig}" = x ; then
13464 for i in `ls -d ${libdir} 2>/dev/null` \
13465 `ls -d ${exec_prefix}/lib 2>/dev/null` \
13466 `ls -d ${prefix}/lib 2>/dev/null` \
13467 `ls -d /usr/local/lib 2>/dev/null` \
13468 `ls -d /usr/contrib/lib 2>/dev/null` \
13469 `ls -d /usr/lib 2>/dev/null` \
13470 ; do
13471 if test -f "$i/tkConfig.sh" ; then
13472 ac_cv_c_tkconfig=`(cd $i; pwd)`
13473 break
13474 fi
13475 done
13476 fi
13477 # check in a few other private locations
13478 if test x"${ac_cv_c_tkconfig}" = x ; then
13479 for i in \
13480 ${srcdir}/../tk \
13481 `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
13482 `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
13483 `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
13484 if test -f "$i/$platDir/tkConfig.sh" ; then
13485 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
13486 break
13487 fi
13488 done
13489 fi
3fc11d3e 13490
3fc11d3e
JM
13491fi
13492
13493
5062cc19
KS
13494 if test x"${ac_cv_c_tkconfig}" = x ; then
13495 TK_BIN_DIR="# no Tk configs found"
81ecdfbb
RW
13496 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
13497$as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
5062cc19
KS
13498 else
13499 no_tk=
13500 TK_BIN_DIR=${ac_cv_c_tkconfig}
81ecdfbb
RW
13501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
13502$as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
5062cc19 13503 fi
3fc11d3e 13504 fi
dd2504ab 13505
dd2504ab 13506
85541719
DE
13507 if test -z "${no_tcl}" -a -z "${no_tk}"; then
13508
81ecdfbb
RW
13509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
13510$as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
85541719
DE
13511
13512 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
81ecdfbb
RW
13513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
13514$as_echo "loading" >&6; }
85541719
DE
13515 . ${TCL_BIN_DIR}/tclConfig.sh
13516 else
81ecdfbb
RW
13517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
13518$as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
85541719
DE
13519 fi
13520
13521 # eval is required to do the TCL_DBGX substitution
13522 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
13523 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
13524
13525 # If the TCL_BIN_DIR is the build directory (not the install directory),
13526 # then set the common variable name to the value of the build variables.
13527 # For example, the variable TCL_LIB_SPEC will be set to the value
13528 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
13529 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
13530 # installed and uninstalled version of Tcl.
13531 if test -f "${TCL_BIN_DIR}/Makefile" ; then
13532 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
13533 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
13534 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
13535 elif test "`uname -s`" = "Darwin"; then
13536 # If Tcl was built as a framework, attempt to use the libraries
13537 # from the framework at the given location so that linking works
a68ffae9 13538 # against Tcl.framework installed in an arbitrary location.
85541719
DE
13539 case ${TCL_DEFS} in
13540 *TCL_FRAMEWORK*)
13541 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
13542 for i in "`cd ${TCL_BIN_DIR}; pwd`" \
13543 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
13544 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
13545 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
13546 break
13547 fi
13548 done
13549 fi
13550 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
13551 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
13552 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
13553 fi
13554 ;;
13555 esac
13556 fi
13557
13558 # eval is required to do the TCL_DBGX substitution
13559 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
13560 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
13561 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
13562 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
13563
13564
13565
13566
13567
13568
13569
13570
13571
13572
13573
13574
13575
13576
13577
13578 # Check for in-tree tcl
13579 here=`pwd`
13580 cd ${srcdir}/..
13581 topdir=`pwd`
13582 cd ${here}
13583
13584 intree="no"
13585 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
13586 intree="yes"
13587 fi
13588
13589 # Find Tcl private headers
13590 if test x"${intree}" = xno; then
13591
81ecdfbb
RW
13592 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
13593$as_echo_n "checking for Tcl private headers... " >&6; }
85541719
DE
13594 private_dir=""
13595 dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
13596 if test -f ${dir}/tclInt.h ; then
13597 private_dir=${dir}
13598 fi
13599
13600 if test x"${private_dir}" = x; then
81ecdfbb 13601 as_fn_error "could not find private Tcl headers" "$LINENO" 5
85541719
DE
13602 else
13603 TCL_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
13604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
13605$as_echo "${private_dir}" >&6; }
85541719
DE
13606 fi
13607
13608 TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
13609 TCL_LIBRARY="${TCL_LIB_SPEC}"
13610 TCL_DEPS=""
13611 else
13612 # If building tcl in the same src tree, private headers
13613 # are not needed, but we need to be sure to use the right
13614 # headers library
13615 TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
13616 TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
13617 TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
13618 fi
13619
13620
13621
13622
13623
81ecdfbb
RW
13624 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
13625$as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
dd2504ab 13626
5062cc19 13627 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
81ecdfbb
RW
13628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
13629$as_echo "loading" >&6; }
5062cc19 13630 . ${TK_BIN_DIR}/tkConfig.sh
3fc11d3e 13631 else
81ecdfbb
RW
13632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
13633$as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
3fc11d3e 13634 fi
bec39cab 13635
5062cc19
KS
13636 # eval is required to do the TK_DBGX substitution
13637 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
13638 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
13639
13640 # If the TK_BIN_DIR is the build directory (not the install directory),
13641 # then set the common variable name to the value of the build variables.
13642 # For example, the variable TK_LIB_SPEC will be set to the value
13643 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
13644 # instead of TK_BUILD_LIB_SPEC since it will work with both an
13645 # installed and uninstalled version of Tcl.
85541719 13646 if test -f "${TK_BIN_DIR}/Makefile" ; then
5062cc19
KS
13647 TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
13648 TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
13649 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
13650 elif test "`uname -s`" = "Darwin"; then
13651 # If Tk was built as a framework, attempt to use the libraries
13652 # from the framework at the given location so that linking works
a68ffae9 13653 # against Tk.framework installed in an arbitrary location.
5062cc19
KS
13654 case ${TK_DEFS} in
13655 *TK_FRAMEWORK*)
85541719 13656 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
5062cc19
KS
13657 for i in "`cd ${TK_BIN_DIR}; pwd`" \
13658 "`cd ${TK_BIN_DIR}/../..; pwd`"; do
13659 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
13660 TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
13661 break
13662 fi
13663 done
13664 fi
85541719 13665 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
5062cc19
KS
13666 TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
13667 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
13668 fi
13669 ;;
13670 esac
3fc11d3e
JM
13671 fi
13672
5062cc19
KS
13673 # eval is required to do the TK_DBGX substitution
13674 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
13675 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
13676 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
13677 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
3fc11d3e 13678
3fc11d3e
JM
13679
13680
bec39cab
AC
13681
13682
13683
13684
13685
13686
13687
3fc11d3e 13688
3fc11d3e 13689
bec39cab 13690
bec39cab 13691
85541719
DE
13692 # Check for in-tree Tk
13693 intree="no"
13694 if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
13695 intree="yes"
13696 fi
3fc11d3e 13697
85541719
DE
13698 # Find Tk private headers
13699 if test x"${intree}" = xno; then
3fc11d3e 13700
81ecdfbb
RW
13701 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
13702$as_echo_n "checking for Tk private headers... " >&6; }
5062cc19
KS
13703 private_dir=""
13704 dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
13705 if test -f ${dir}/tkInt.h; then
13706 private_dir=${dir}
3fc11d3e 13707 fi
bec39cab 13708
5062cc19 13709 if test x"${private_dir}" = x; then
81ecdfbb 13710 as_fn_error "could not find Tk private headers" "$LINENO" 5
3fc11d3e 13711 else
5062cc19 13712 TK_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
13713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
13714$as_echo "${private_dir}" >&6; }
3fc11d3e 13715 fi
3fc11d3e 13716
85541719
DE
13717 TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
13718 TK_LIBRARY=${TK_LIB_SPEC}
13719 TK_DEPS=""
13720 else
13721 TK_INCLUDE="-I${TK_SRC_DIR}/generic"
13722 TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
13723 TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
13724 fi
3fc11d3e
JM
13725
13726
3fc11d3e
JM
13727
13728
3fc11d3e 13729
85541719 13730 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e 13731
85541719
DE
13732 # Include some libraries that Tcl and Tk want.
13733 TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
13734 # Yes, the ordering seems wrong here. But it isn't.
13735 # TK_LIBS is the list of libraries that need to be linked
13736 # after Tcl/Tk. Note that this isn't put into LIBS. If it
13737 # were in LIBS then any link tests after this point would
13738 # try to include things like `$(LIBGUI)', which wouldn't work.
13739 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5 13740
85541719
DE
13741 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
13742 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
13743 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
13744 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
13745 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
13746 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
13747 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
3fc11d3e 13748
85541719
DE
13749 if test x$gdb_cv_os_cygwin = xyes; then
13750 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
13751 WIN32LDAPP="-Wl,--subsystem,console"
13752 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
3fc11d3e 13753 fi
ffc6a242 13754
81ecdfbb 13755 subdirs="$subdirs gdbtk"
3ace7edb 13756
85541719 13757 fi
3fc11d3e
JM
13758fi
13759
13760
13761
13762
13763
13764
13765
13766
81ecdfbb
RW
13767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
13768$as_echo_n "checking for X... " >&6; }
bec39cab 13769
c906108c 13770
81ecdfbb
RW
13771# Check whether --with-x was given.
13772if test "${with_x+set}" = set; then :
13773 withval=$with_x;
13774fi
c906108c
SS
13775
13776# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
13777if test "x$with_x" = xno; then
13778 # The user explicitly disabled X.
13779 have_x=disabled
13780else
81ecdfbb
RW
13781 case $x_includes,$x_libraries in #(
13782 *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
13783 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
13784 $as_echo_n "(cached) " >&6
c906108c
SS
13785else
13786 # One or both of the vars are not set, and there is no cached value.
bec39cab 13787ac_x_includes=no ac_x_libraries=no
81ecdfbb 13788rm -f -r conftest.dir
bec39cab
AC
13789if mkdir conftest.dir; then
13790 cd conftest.dir
bec39cab 13791 cat >Imakefile <<'_ACEOF'
81ecdfbb
RW
13792incroot:
13793 @echo incroot='${INCROOT}'
13794usrlibdir:
13795 @echo usrlibdir='${USRLIBDIR}'
13796libdir:
13797 @echo libdir='${LIBDIR}'
13798_ACEOF
13799 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
c906108c 13800 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
81ecdfbb
RW
13801 for ac_var in incroot usrlibdir libdir; do
13802 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
13803 done
c906108c 13804 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
81ecdfbb
RW
13805 for ac_extension in a so sl dylib la dll; do
13806 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
13807 test -f "$ac_im_libdir/libX11.$ac_extension"; then
bec39cab 13808 ac_im_usrlibdir=$ac_im_libdir; break
c906108c
SS
13809 fi
13810 done
13811 # Screen out bogus values from the imake configuration. They are
13812 # bogus both because they are the default anyway, and because
13813 # using them would break gcc on systems where it needs fixed includes.
bec39cab 13814 case $ac_im_incroot in
81ecdfbb 13815 /usr/include) ac_x_includes= ;;
bec39cab 13816 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
c906108c 13817 esac
bec39cab 13818 case $ac_im_usrlibdir in
81ecdfbb 13819 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
bec39cab 13820 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
c906108c
SS
13821 esac
13822 fi
13823 cd ..
81ecdfbb 13824 rm -f -r conftest.dir
c906108c
SS
13825fi
13826
bec39cab
AC
13827# Standard set of common directories for X headers.
13828# Check X11 before X11Rn because it is often a symlink to the current release.
13829ac_x_header_dirs='
13830/usr/X11/include
81ecdfbb 13831/usr/X11R7/include
bec39cab
AC
13832/usr/X11R6/include
13833/usr/X11R5/include
13834/usr/X11R4/include
13835
13836/usr/include/X11
81ecdfbb 13837/usr/include/X11R7
bec39cab
AC
13838/usr/include/X11R6
13839/usr/include/X11R5
13840/usr/include/X11R4
13841
13842/usr/local/X11/include
81ecdfbb 13843/usr/local/X11R7/include
bec39cab
AC
13844/usr/local/X11R6/include
13845/usr/local/X11R5/include
13846/usr/local/X11R4/include
13847
13848/usr/local/include/X11
81ecdfbb 13849/usr/local/include/X11R7
bec39cab
AC
13850/usr/local/include/X11R6
13851/usr/local/include/X11R5
13852/usr/local/include/X11R4
13853
13854/usr/X386/include
13855/usr/x386/include
13856/usr/XFree86/include/X11
13857
13858/usr/include
13859/usr/local/include
13860/usr/unsupported/include
13861/usr/athena/include
13862/usr/local/x11r5/include
13863/usr/lpp/Xamples/include
13864
13865/usr/openwin/include
13866/usr/openwin/share/include'
13867
13868if test "$ac_x_includes" = no; then
81ecdfbb 13869 # Guess where to find include files, by looking for Xlib.h.
c906108c 13870 # First, try using that file with no special directory specified.
81ecdfbb 13871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13872/* end confdefs.h. */
81ecdfbb 13873#include <X11/Xlib.h>
bec39cab 13874_ACEOF
81ecdfbb 13875if ac_fn_c_try_cpp "$LINENO"; then :
c906108c
SS
13876 # We can compile using X headers with no special include directory.
13877ac_x_includes=
13878else
bec39cab 13879 for ac_dir in $ac_x_header_dirs; do
81ecdfbb 13880 if test -r "$ac_dir/X11/Xlib.h"; then
bec39cab
AC
13881 ac_x_includes=$ac_dir
13882 break
13883 fi
13884done
c906108c 13885fi
bec39cab
AC
13886rm -f conftest.err conftest.$ac_ext
13887fi # $ac_x_includes = no
c906108c 13888
bec39cab 13889if test "$ac_x_libraries" = no; then
c906108c 13890 # Check for the libraries.
c906108c
SS
13891 # See if we find them without any special options.
13892 # Don't add to $LIBS permanently.
bec39cab 13893 ac_save_LIBS=$LIBS
81ecdfbb
RW
13894 LIBS="-lX11 $LIBS"
13895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13896/* end confdefs.h. */
81ecdfbb 13897#include <X11/Xlib.h>
bec39cab
AC
13898int
13899main ()
13900{
81ecdfbb 13901XrmInitialize ()
bec39cab
AC
13902 ;
13903 return 0;
13904}
13905_ACEOF
81ecdfbb 13906if ac_fn_c_try_link "$LINENO"; then :
bec39cab 13907 LIBS=$ac_save_LIBS
c906108c
SS
13908# We can link X programs with no special library path.
13909ac_x_libraries=
13910else
81ecdfbb
RW
13911 LIBS=$ac_save_LIBS
13912for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
c906108c 13913do
bec39cab 13914 # Don't even attempt the hair of trying to link an X program!
81ecdfbb
RW
13915 for ac_extension in a so sl dylib la dll; do
13916 if test -r "$ac_dir/libX11.$ac_extension"; then
c906108c
SS
13917 ac_x_libraries=$ac_dir
13918 break 2
13919 fi
13920 done
13921done
13922fi
81ecdfbb
RW
13923rm -f core conftest.err conftest.$ac_objext \
13924 conftest$ac_exeext conftest.$ac_ext
bec39cab 13925fi # $ac_x_libraries = no
c906108c 13926
81ecdfbb
RW
13927case $ac_x_includes,$ac_x_libraries in #(
13928 no,* | *,no | *\'*)
13929 # Didn't find X, or a directory has "'" in its name.
13930 ac_cv_have_x="have_x=no";; #(
13931 *)
13932 # Record where we found X for the cache.
13933 ac_cv_have_x="have_x=yes\
13934 ac_x_includes='$ac_x_includes'\
13935 ac_x_libraries='$ac_x_libraries'"
13936esac
c906108c 13937fi
81ecdfbb
RW
13938;; #(
13939 *) have_x=yes;;
13940 esac
c906108c
SS
13941 eval "$ac_cv_have_x"
13942fi # $with_x != no
13943
13944if test "$have_x" != yes; then
81ecdfbb
RW
13945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
13946$as_echo "$have_x" >&6; }
c906108c
SS
13947 no_x=yes
13948else
13949 # If each of the values was on the command line, it overrides each guess.
13950 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
13951 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
13952 # Update the cache value to reflect the command line values.
81ecdfbb
RW
13953 ac_cv_have_x="have_x=yes\
13954 ac_x_includes='$x_includes'\
13955 ac_x_libraries='$x_libraries'"
13956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
13957$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
c906108c
SS
13958fi
13959
13960
bec39cab 13961# Unlike the sim directory, whether a simulator is linked is controlled by
9b624dbe 13962# presence of a gdb_sim definition in the target configure.tgt entry.
7a292a7a
SS
13963# This code just checks for a few cases where we'd like to ignore those
13964# definitions, even when they're present in the '.mt' file. These cases
13965# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 13966# not part of the source tree.
7a292a7a 13967#
81ecdfbb
RW
13968# Check whether --enable-sim was given.
13969if test "${enable_sim+set}" = set; then :
13970 enableval=$enable_sim; echo "enable_sim = $enable_sim";
7a292a7a
SS
13971 echo "enableval = ${enableval}";
13972 case "${enableval}" in
13973 yes) ignore_sim=false ;;
13974 no) ignore_sim=true ;;
13975 *) ignore_sim=false ;;
13976 esac
13977else
13978 ignore_sim=false
81ecdfbb
RW
13979fi
13980
7a292a7a
SS
13981
13982if test ! -d "${srcdir}/../sim"; then
13983 ignore_sim=true
13984fi
13985
9b624dbe
UW
13986SIM=
13987SIM_OBS=
13988if test "${ignore_sim}" = "false"; then
13989 if test x"${gdb_sim}" != x ; then
13990 SIM="${gdb_sim}"
13991 SIM_OBS="remote-sim.o"
60ca704f 13992
81ecdfbb 13993$as_echo "#define WITH_SIM 1" >>confdefs.h
7a292a7a 13994
9b624dbe 13995 fi
7a292a7a
SS
13996fi
13997
13998
13999
c906108c
SS
14000
14001
14002
14003
14004
14005
dfcd3bfb 14006
e56ac5c3
AC
14007
14008
b3a90332
AC
14009
14010
c35f4ffc 14011# List of host floatformats.
bec39cab
AC
14012
14013cat >>confdefs.h <<_ACEOF
c35f4ffc 14014#define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
bec39cab 14015_ACEOF
c35f4ffc 14016
bec39cab
AC
14017
14018cat >>confdefs.h <<_ACEOF
c35f4ffc 14019#define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
bec39cab
AC
14020_ACEOF
14021
c35f4ffc 14022
bec39cab 14023cat >>confdefs.h <<_ACEOF
c35f4ffc 14024#define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
bec39cab 14025_ACEOF
c35f4ffc
AC
14026
14027
c906108c
SS
14028# target_subdir is used by the testsuite to find the target libraries.
14029target_subdir=
14030if test "${host}" != "${target}"; then
14031 target_subdir="${target_alias}/"
14032fi
14033
14034
14035frags=
771b4502 14036if test "${gdb_native}" = "yes"; then
0dad8a66
MK
14037 host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
14038 if test ! -f ${host_makefile_frag}; then
81ecdfbb 14039 as_fn_error "\"*** Gdb does not support native target ${host}\"" "$LINENO" 5
0dad8a66
MK
14040 fi
14041 frags="$frags $host_makefile_frag"
14042else
14043 host_makefile_frag=/dev/null
c906108c 14044fi
c906108c 14045
c906108c
SS
14046
14047
14048
771b4502 14049if test "${gdb_native}" = "yes"; then
a85f51e7
DJ
14050# We pick this up from the host configuration file (.mh) because we
14051# do not have a native configuration Makefile fragment.
c906108c
SS
14052nativefile=`sed -n '
14053s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
14054' ${host_makefile_frag}`
c906108c
SS
14055fi
14056
14057
b00a8037 14058if test x"${gdb_osabi}" != x ; then
bec39cab
AC
14059
14060cat >>confdefs.h <<_ACEOF
b00a8037 14061#define GDB_OSABI_DEFAULT $gdb_osabi
bec39cab 14062_ACEOF
b00a8037
DJ
14063
14064fi
14065
8dcde887 14066# Enable multi-ice-gdb-server.
81ecdfbb
RW
14067# Check whether --enable-multi-ice was given.
14068if test "${enable_multi_ice+set}" = set; then :
14069 enableval=$enable_multi_ice; case $enableval in
8dcde887
MK
14070 yes | no)
14071 ;;
81ecdfbb 14072 *) as_fn_error "bad value $enableval for --enable-multi-ice" "$LINENO" 5 ;;
8dcde887 14073 esac
81ecdfbb 14074fi
b4e70030 14075
81ecdfbb
RW
14076if test "x$enable_multi_ice" = xyes; then
14077 subdirs="$subdirs multi-ice"
3ace7edb 14078
a85f51e7
DJ
14079fi
14080
496c0e1b
JB
14081# Check whether --enable-gdbserver was given.
14082if test "${enable_gdbserver+set}" = set; then :
14083 enableval=$enable_gdbserver; case "${enableval}" in
14084 yes| no|auto) ;;
14085 *) as_fn_error "bad value ${enableval} for --enable-gdbserver option" "$LINENO" 5 ;;
14086esac
14087else
14088 enable_gdbserver=auto
14089fi
14090
14091
14092# We only build gdbserver automatically in a native configuration, and
14093# only if the user did not explicitly disable its build.
14094if test "$gdb_native" = "yes" -a "$enable_gdbserver" != "no"; then
81ecdfbb
RW
14095 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5
14096$as_echo_n "checking whether gdbserver is supported on this host... " >&6; }
8dcde887 14097 if test "x$build_gdbserver" = xyes; then
81ecdfbb
RW
14098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14099$as_echo "yes" >&6; }
14100 subdirs="$subdirs gdbserver"
3ace7edb 14101
496c0e1b 14102 gdbserver_build_enabled=yes
8dcde887 14103 else
81ecdfbb
RW
14104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14105$as_echo "no" >&6; }
8dcde887
MK
14106 fi
14107fi
14108
496c0e1b
JB
14109# If the user explicitly request the gdbserver to be built, verify that
14110# we were in fact able to enable it.
14111if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then
14112 as_fn_error "Automatic gdbserver build is not supported for this configuration" "$LINENO" 5
14113fi
14114
393fd4c3
YQ
14115# Check for babeltrace and babeltrace-ctf
14116
14117# Check whether --with-babeltrace was given.
14118if test "${with_babeltrace+set}" = set; then :
14119 withval=$with_babeltrace;
14120else
14121 with_babeltrace=auto
14122fi
14123
14124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltrace" >&5
14125$as_echo_n "checking whether to use babeltrace... " >&6; }
14126{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5
14127$as_echo "$with_babeltrace" >&6; }
14128
14129if test "x$with_babeltrace" = "xno"; then
14130 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&5
14131$as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&2;}
14132else
14133 # Append -Werror to CFLAGS so that configure can catch the warning
14134 # "assignment from incompatible pointer type", which is related to
14135 # the babeltrace change from 1.0.3 to 1.1.0. Babeltrace 1.1.0 works
14136 # in GDB, while babeltrace 1.0.3 is broken.
14137 # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be
14138 # safe to save and restore CFLAGS here.
14139 saved_CFLAGS=$CFLAGS
14140 CFLAGS="$CFLAGS -Werror"
14141
14142
14143
14144
14145
14146
14147
14148
14149 use_additional=yes
14150
14151 acl_save_prefix="$prefix"
14152 prefix="$acl_final_prefix"
14153 acl_save_exec_prefix="$exec_prefix"
14154 exec_prefix="$acl_final_exec_prefix"
14155
14156 eval additional_includedir=\"$includedir\"
14157 eval additional_libdir=\"$libdir\"
14158
14159 exec_prefix="$acl_save_exec_prefix"
14160 prefix="$acl_save_prefix"
14161
14162
14163# Check whether --with-libbabeltrace-prefix was given.
14164if test "${with_libbabeltrace_prefix+set}" = set; then :
14165 withval=$with_libbabeltrace_prefix;
14166 if test "X$withval" = "Xno"; then
14167 use_additional=no
14168 else
14169 if test "X$withval" = "X"; then
14170
14171 acl_save_prefix="$prefix"
14172 prefix="$acl_final_prefix"
14173 acl_save_exec_prefix="$exec_prefix"
14174 exec_prefix="$acl_final_exec_prefix"
14175
14176 eval additional_includedir=\"$includedir\"
14177 eval additional_libdir=\"$libdir\"
14178
14179 exec_prefix="$acl_save_exec_prefix"
14180 prefix="$acl_save_prefix"
14181
14182 else
14183 additional_includedir="$withval/include"
14184 additional_libdir="$withval/lib"
14185 fi
14186 fi
14187
14188fi
14189
14190 LIBBABELTRACE=
14191 LTLIBBABELTRACE=
14192 INCBABELTRACE=
14193 rpathdirs=
14194 ltrpathdirs=
14195 names_already_handled=
14196 names_next_round='babeltrace babeltrace-ctf'
14197 while test -n "$names_next_round"; do
14198 names_this_round="$names_next_round"
14199 names_next_round=
14200 for name in $names_this_round; do
14201 already_handled=
14202 for n in $names_already_handled; do
14203 if test "$n" = "$name"; then
14204 already_handled=yes
14205 break
14206 fi
14207 done
14208 if test -z "$already_handled"; then
14209 names_already_handled="$names_already_handled $name"
14210 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
14211 eval value=\"\$HAVE_LIB$uppername\"
14212 if test -n "$value"; then
14213 if test "$value" = yes; then
14214 eval value=\"\$LIB$uppername\"
14215 test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value"
14216 eval value=\"\$LTLIB$uppername\"
14217 test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value"
14218 else
14219 :
14220 fi
14221 else
14222 found_dir=
14223 found_la=
14224 found_so=
14225 found_a=
14226 if test $use_additional = yes; then
14227 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
14228 found_dir="$additional_libdir"
14229 found_so="$additional_libdir/lib$name.$shlibext"
14230 if test -f "$additional_libdir/lib$name.la"; then
14231 found_la="$additional_libdir/lib$name.la"
14232 fi
14233 else
14234 if test -f "$additional_libdir/lib$name.$libext"; then
14235 found_dir="$additional_libdir"
14236 found_a="$additional_libdir/lib$name.$libext"
14237 if test -f "$additional_libdir/lib$name.la"; then
14238 found_la="$additional_libdir/lib$name.la"
14239 fi
14240 fi
14241 fi
14242 fi
14243 if test "X$found_dir" = "X"; then
14244 for x in $LDFLAGS $LTLIBBABELTRACE; do
14245
14246 acl_save_prefix="$prefix"
14247 prefix="$acl_final_prefix"
14248 acl_save_exec_prefix="$exec_prefix"
14249 exec_prefix="$acl_final_exec_prefix"
14250 eval x=\"$x\"
14251 exec_prefix="$acl_save_exec_prefix"
14252 prefix="$acl_save_prefix"
14253
14254 case "$x" in
14255 -L*)
14256 dir=`echo "X$x" | sed -e 's/^X-L//'`
14257 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
14258 found_dir="$dir"
14259 found_so="$dir/lib$name.$shlibext"
14260 if test -f "$dir/lib$name.la"; then
14261 found_la="$dir/lib$name.la"
14262 fi
14263 else
14264 if test -f "$dir/lib$name.$libext"; then
14265 found_dir="$dir"
14266 found_a="$dir/lib$name.$libext"
14267 if test -f "$dir/lib$name.la"; then
14268 found_la="$dir/lib$name.la"
14269 fi
14270 fi
14271 fi
14272 ;;
14273 esac
14274 if test "X$found_dir" != "X"; then
14275 break
14276 fi
14277 done
14278 fi
14279 if test "X$found_dir" != "X"; then
14280 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name"
14281 if test "X$found_so" != "X"; then
14282 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
14283 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
14284 else
14285 haveit=
14286 for x in $ltrpathdirs; do
14287 if test "X$x" = "X$found_dir"; then
14288 haveit=yes
14289 break
14290 fi
14291 done
14292 if test -z "$haveit"; then
14293 ltrpathdirs="$ltrpathdirs $found_dir"
14294 fi
14295 if test "$hardcode_direct" = yes; then
14296 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
14297 else
14298 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
14299 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
14300 haveit=
14301 for x in $rpathdirs; do
14302 if test "X$x" = "X$found_dir"; then
14303 haveit=yes
14304 break
14305 fi
14306 done
14307 if test -z "$haveit"; then
14308 rpathdirs="$rpathdirs $found_dir"
14309 fi
14310 else
14311 haveit=
14312 for x in $LDFLAGS $LIBBABELTRACE; do
14313
14314 acl_save_prefix="$prefix"
14315 prefix="$acl_final_prefix"
14316 acl_save_exec_prefix="$exec_prefix"
14317 exec_prefix="$acl_final_exec_prefix"
14318 eval x=\"$x\"
14319 exec_prefix="$acl_save_exec_prefix"
14320 prefix="$acl_save_prefix"
14321
14322 if test "X$x" = "X-L$found_dir"; then
14323 haveit=yes
14324 break
14325 fi
14326 done
14327 if test -z "$haveit"; then
14328 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir"
14329 fi
14330 if test "$hardcode_minus_L" != no; then
14331 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
14332 else
14333 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
14334 fi
14335 fi
14336 fi
14337 fi
14338 else
14339 if test "X$found_a" != "X"; then
14340 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a"
14341 else
14342 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name"
14343 fi
14344 fi
14345 additional_includedir=
14346 case "$found_dir" in
14347 */lib | */lib/)
14348 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
14349 additional_includedir="$basedir/include"
14350 ;;
14351 esac
14352 if test "X$additional_includedir" != "X"; then
14353 if test "X$additional_includedir" != "X/usr/include"; then
14354 haveit=
14355 if test "X$additional_includedir" = "X/usr/local/include"; then
14356 if test -n "$GCC"; then
14357 case $host_os in
14358 linux*) haveit=yes;;
14359 esac
14360 fi
14361 fi
14362 if test -z "$haveit"; then
14363 for x in $CPPFLAGS $INCBABELTRACE; do
14364
14365 acl_save_prefix="$prefix"
14366 prefix="$acl_final_prefix"
14367 acl_save_exec_prefix="$exec_prefix"
14368 exec_prefix="$acl_final_exec_prefix"
14369 eval x=\"$x\"
14370 exec_prefix="$acl_save_exec_prefix"
14371 prefix="$acl_save_prefix"
14372
14373 if test "X$x" = "X-I$additional_includedir"; then
14374 haveit=yes
14375 break
14376 fi
14377 done
14378 if test -z "$haveit"; then
14379 if test -d "$additional_includedir"; then
14380 INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir"
14381 fi
14382 fi
14383 fi
14384 fi
14385 fi
14386 if test -n "$found_la"; then
14387 save_libdir="$libdir"
14388 case "$found_la" in
14389 */* | *\\*) . "$found_la" ;;
14390 *) . "./$found_la" ;;
14391 esac
14392 libdir="$save_libdir"
14393 for dep in $dependency_libs; do
14394 case "$dep" in
14395 -L*)
14396 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
14397 if test "X$additional_libdir" != "X/usr/lib"; then
14398 haveit=
14399 if test "X$additional_libdir" = "X/usr/local/lib"; then
14400 if test -n "$GCC"; then
14401 case $host_os in
14402 linux*) haveit=yes;;
14403 esac
14404 fi
14405 fi
14406 if test -z "$haveit"; then
14407 haveit=
14408 for x in $LDFLAGS $LIBBABELTRACE; do
14409
14410 acl_save_prefix="$prefix"
14411 prefix="$acl_final_prefix"
14412 acl_save_exec_prefix="$exec_prefix"
14413 exec_prefix="$acl_final_exec_prefix"
14414 eval x=\"$x\"
14415 exec_prefix="$acl_save_exec_prefix"
14416 prefix="$acl_save_prefix"
14417
14418 if test "X$x" = "X-L$additional_libdir"; then
14419 haveit=yes
14420 break
14421 fi
14422 done
14423 if test -z "$haveit"; then
14424 if test -d "$additional_libdir"; then
14425 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir"
14426 fi
14427 fi
14428 haveit=
14429 for x in $LDFLAGS $LTLIBBABELTRACE; do
14430
14431 acl_save_prefix="$prefix"
14432 prefix="$acl_final_prefix"
14433 acl_save_exec_prefix="$exec_prefix"
14434 exec_prefix="$acl_final_exec_prefix"
14435 eval x=\"$x\"
14436 exec_prefix="$acl_save_exec_prefix"
14437 prefix="$acl_save_prefix"
14438
14439 if test "X$x" = "X-L$additional_libdir"; then
14440 haveit=yes
14441 break
14442 fi
14443 done
14444 if test -z "$haveit"; then
14445 if test -d "$additional_libdir"; then
14446 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir"
14447 fi
14448 fi
14449 fi
14450 fi
14451 ;;
14452 -R*)
14453 dir=`echo "X$dep" | sed -e 's/^X-R//'`
14454 if test "$enable_rpath" != no; then
14455 haveit=
14456 for x in $rpathdirs; do
14457 if test "X$x" = "X$dir"; then
14458 haveit=yes
14459 break
14460 fi
14461 done
14462 if test -z "$haveit"; then
14463 rpathdirs="$rpathdirs $dir"
14464 fi
14465 haveit=
14466 for x in $ltrpathdirs; do
14467 if test "X$x" = "X$dir"; then
14468 haveit=yes
14469 break
14470 fi
14471 done
14472 if test -z "$haveit"; then
14473 ltrpathdirs="$ltrpathdirs $dir"
14474 fi
14475 fi
14476 ;;
14477 -l*)
14478 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
14479 ;;
14480 *.la)
14481 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
14482 ;;
14483 *)
14484 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$dep"
14485 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$dep"
14486 ;;
14487 esac
14488 done
14489 fi
14490 else
14491 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
14492 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name"
14493 fi
14494 fi
14495 fi
14496 done
14497 done
14498 if test "X$rpathdirs" != "X"; then
14499 if test -n "$hardcode_libdir_separator"; then
14500 alldirs=
14501 for found_dir in $rpathdirs; do
14502 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
14503 done
14504 acl_save_libdir="$libdir"
14505 libdir="$alldirs"
14506 eval flag=\"$hardcode_libdir_flag_spec\"
14507 libdir="$acl_save_libdir"
14508 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
14509 else
14510 for found_dir in $rpathdirs; do
14511 acl_save_libdir="$libdir"
14512 libdir="$found_dir"
14513 eval flag=\"$hardcode_libdir_flag_spec\"
14514 libdir="$acl_save_libdir"
14515 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
14516 done
14517 fi
14518 fi
14519 if test "X$ltrpathdirs" != "X"; then
14520 for found_dir in $ltrpathdirs; do
14521 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir"
14522 done
14523 fi
14524
14525
14526 ac_save_CPPFLAGS="$CPPFLAGS"
14527
14528 for element in $INCBABELTRACE; do
14529 haveit=
14530 for x in $CPPFLAGS; do
14531
14532 acl_save_prefix="$prefix"
14533 prefix="$acl_final_prefix"
14534 acl_save_exec_prefix="$exec_prefix"
14535 exec_prefix="$acl_final_exec_prefix"
14536 eval x=\"$x\"
14537 exec_prefix="$acl_save_exec_prefix"
14538 prefix="$acl_save_prefix"
14539
14540 if test "X$x" = "X$element"; then
14541 haveit=yes
14542 break
14543 fi
14544 done
14545 if test -z "$haveit"; then
14546 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
14547 fi
14548 done
14549
14550
14551 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5
14552$as_echo_n "checking for libbabeltrace... " >&6; }
14553if test "${ac_cv_libbabeltrace+set}" = set; then :
14554 $as_echo_n "(cached) " >&6
14555else
14556
14557 ac_save_LIBS="$LIBS"
14558 LIBS="$LIBS $LIBBABELTRACE"
14559 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14560/* end confdefs.h. */
14561#include <babeltrace/babeltrace.h>
14562 #include <babeltrace/ctf/events.h>
14563 #include <babeltrace/ctf/iterator.h>
14564int
14565main ()
14566{
14567struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL));
14568 struct bt_ctf_event *event = NULL;
14569 const struct bt_definition *scope;
14570
14571 scope = bt_ctf_get_top_level_scope (event,
14572 BT_STREAM_EVENT_HEADER);
14573 bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id"));
14574
14575 ;
14576 return 0;
14577}
14578_ACEOF
14579if ac_fn_c_try_link "$LINENO"; then :
14580 ac_cv_libbabeltrace=yes
14581else
14582 ac_cv_libbabeltrace=no
14583fi
14584rm -f core conftest.err conftest.$ac_objext \
14585 conftest$ac_exeext conftest.$ac_ext
14586 LIBS="$ac_save_LIBS"
14587
14588fi
14589{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5
14590$as_echo "$ac_cv_libbabeltrace" >&6; }
14591 if test "$ac_cv_libbabeltrace" = yes; then
14592 HAVE_LIBBABELTRACE=yes
14593
14594$as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h
14595
14596 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libbabeltrace" >&5
14597$as_echo_n "checking how to link with libbabeltrace... " >&6; }
14598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5
14599$as_echo "$LIBBABELTRACE" >&6; }
14600 else
14601 HAVE_LIBBABELTRACE=no
14602 CPPFLAGS="$ac_save_CPPFLAGS"
14603 LIBBABELTRACE=
14604 LTLIBBABELTRACE=
14605 fi
14606
14607
14608
14609
14610
14611
14612 CFLAGS=$saved_CFLAGS
14613
14614 if test "$HAVE_LIBBABELTRACE" != yes; then
14615 if test "$with_babeltrace" = yes; then
14616 as_fn_error "babeltrace is missing or unusable" "$LINENO" 5
14617 else
14618 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&5
14619$as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&2;}
14620 fi
14621 fi
14622fi
14623
db985757 14624# If nativefile (NAT_FILE) is not set in config/*/*.m[ht] files, we link
2c0fc042 14625# to an empty version.
c906108c
SS
14626
14627files=
14628links=
5a2402b8 14629
c906108c
SS
14630rm -f nm.h
14631if test "${nativefile}" != ""; then
0f475e27
AC
14632 case "${nativefile}" in
14633 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
14634 * ) GDB_NM_FILE="${nativefile}"
14635 esac
5a2402b8
AC
14636 files="${files} ${GDB_NM_FILE}"
14637 links="${links} nm.h"
60ca704f
SE
14638
14639cat >>confdefs.h <<_ACEOF
b78960be 14640#define GDB_NM_FILE "${GDB_NM_FILE}"
bec39cab 14641_ACEOF
5a2402b8 14642
c906108c 14643fi
5a2402b8
AC
14644
14645
bec39cab
AC
14646ac_sources="$files"
14647ac_dests="$links"
14648while test -n "$ac_sources"; do
14649 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
14650 set $ac_sources; ac_source=$1; shift; ac_sources=$*
14651 ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source"
14652done
81ecdfbb 14653ac_config_links="$ac_config_links $ac_config_links_1"
c906108c
SS
14654
14655
c906108c
SS
14656
14657
c906108c 14658
81ecdfbb 14659$as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
bec39cab 14660
bec39cab 14661
b292c783
JK
14662# Undo the $ec_script escaping suitable for Makefile.
14663transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
14664GDB_TRANSFORM_NAME=`echo gdb | sed -e "$transform"`
14665if test "x$GDB_TRANSFORM_NAME" = x; then
14666 GDB_TRANSFORM_NAME=gdb
14667fi
14668
14669GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$transform"`
14670if test "x$GCORE_TRANSFORM_NAME" = x; then
14671 GCORE_TRANSFORM_NAME=gcore
14672fi
14673
14674ac_config_files="$ac_config_files gcore"
14675
14676
c971b7fa 14677ac_config_files="$ac_config_files Makefile gdb-gdb.gdb doc/Makefile data-directory/Makefile"
81ecdfbb
RW
14678
14679ac_config_commands="$ac_config_commands default"
89a34d1b 14680
bec39cab
AC
14681cat >confcache <<\_ACEOF
14682# This file is a shell script that caches the results of configure
14683# tests run on this system so they can be shared between configure
14684# scripts and configure runs, see configure's option --config-cache.
14685# It is not useful on other systems. If it contains results you don't
14686# want to keep, you may remove or edit it.
14687#
14688# config.status only pays attention to the cache file if you give it
14689# the --recheck option to rerun configure.
14690#
14691# `ac_cv_env_foo' variables (set or unset) will be overridden when
14692# loading this file, other *unset* `ac_cv_foo' will be assigned the
14693# following values.
14694
14695_ACEOF
14696
14697# The following way of writing the cache mishandles newlines in values,
14698# but we know of no workaround that is simple, portable, and efficient.
81ecdfbb 14699# So, we kill variables containing newlines.
bec39cab
AC
14700# Ultrix sh set writes to stderr and can't be redirected directly,
14701# and sets the high bit in the cache file unless we assign to the vars.
81ecdfbb
RW
14702(
14703 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
14704 eval ac_val=\$$ac_var
14705 case $ac_val in #(
14706 *${as_nl}*)
14707 case $ac_var in #(
14708 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
14709$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
14710 esac
14711 case $ac_var in #(
14712 _ | IFS | as_nl) ;; #(
14713 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
14714 *) { eval $ac_var=; unset $ac_var;} ;;
14715 esac ;;
14716 esac
14717 done
14718
bec39cab 14719 (set) 2>&1 |
81ecdfbb
RW
14720 case $as_nl`(ac_space=' '; set) 2>&1` in #(
14721 *${as_nl}ac_space=\ *)
14722 # `set' does not quote correctly, so add quotes: double-quote
14723 # substitution turns \\\\ into \\, and sed turns \\ into \.
bec39cab
AC
14724 sed -n \
14725 "s/'/'\\\\''/g;
14726 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
81ecdfbb 14727 ;; #(
bec39cab
AC
14728 *)
14729 # `set' quotes correctly as required by POSIX, so do not add quotes.
81ecdfbb 14730 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
bec39cab 14731 ;;
81ecdfbb
RW
14732 esac |
14733 sort
14734) |
bec39cab 14735 sed '
81ecdfbb 14736 /^ac_cv_env_/b end
bec39cab 14737 t clear
81ecdfbb 14738 :clear
bec39cab
AC
14739 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
14740 t end
81ecdfbb
RW
14741 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
14742 :end' >>confcache
14743if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
14744 if test -w "$cache_file"; then
14745 test "x$cache_file" != "x/dev/null" &&
14746 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
14747$as_echo "$as_me: updating cache $cache_file" >&6;}
bec39cab
AC
14748 cat confcache >$cache_file
14749 else
81ecdfbb
RW
14750 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
14751$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
bec39cab
AC
14752 fi
14753fi
14754rm -f confcache
14755
14756test "x$prefix" = xNONE && prefix=$ac_default_prefix
14757# Let make expand exec_prefix.
14758test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14759
bec39cab
AC
14760DEFS=-DHAVE_CONFIG_H
14761
14762ac_libobjs=
14763ac_ltlibobjs=
14764for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
14765 # 1. Remove the extension, and $U if already installed.
81ecdfbb
RW
14766 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
14767 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
14768 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
14769 # will be set to the directory where LIBOBJS objects are built.
14770 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
14771 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
bec39cab
AC
14772done
14773LIBOBJS=$ac_libobjs
14774
14775LTLIBOBJS=$ac_ltlibobjs
14776
14777
85981d60 14778if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
81ecdfbb
RW
14779 as_fn_error "conditional \"MAINTAINER_MODE\" was never defined.
14780Usually this means the macro was only invoked conditionally." "$LINENO" 5
85981d60 14781fi
a417dc56 14782if test -z "${GMAKE_TRUE}" && test -z "${GMAKE_FALSE}"; then
81ecdfbb
RW
14783 as_fn_error "conditional \"GMAKE\" was never defined.
14784Usually this means the macro was only invoked conditionally." "$LINENO" 5
a417dc56 14785fi
81ecdfbb
RW
14786
14787
bec39cab 14788: ${CONFIG_STATUS=./config.status}
81ecdfbb 14789ac_write_fail=0
bec39cab
AC
14790ac_clean_files_save=$ac_clean_files
14791ac_clean_files="$ac_clean_files $CONFIG_STATUS"
81ecdfbb
RW
14792{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
14793$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
14794as_write_fail=0
14795cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
bec39cab
AC
14796#! $SHELL
14797# Generated by $as_me.
14798# Run this file to recreate the current configuration.
14799# Compiler output produced by configure, useful for debugging
14800# configure, is in config.log if it exists.
14801
14802debug=false
14803ac_cs_recheck=false
14804ac_cs_silent=false
bec39cab 14805
81ecdfbb
RW
14806SHELL=\${CONFIG_SHELL-$SHELL}
14807export SHELL
14808_ASEOF
14809cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
14810## -------------------- ##
14811## M4sh Initialization. ##
14812## -------------------- ##
14813
14814# Be more Bourne compatible
14815DUALCASE=1; export DUALCASE # for MKS sh
14816if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
14817 emulate sh
14818 NULLCMD=:
81ecdfbb 14819 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
14820 # is contrary to our usage. Disable this feature.
14821 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
14822 setopt NO_GLOB_SUBST
14823else
14824 case `(set -o) 2>/dev/null` in #(
14825 *posix*) :
14826 set -o posix ;; #(
14827 *) :
14828 ;;
14829esac
bec39cab 14830fi
bec39cab 14831
81ecdfbb
RW
14832
14833as_nl='
14834'
14835export as_nl
14836# Printing a long string crashes Solaris 7 /usr/bin/printf.
14837as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14838as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14839as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
14840# Prefer a ksh shell builtin over an external printf program on Solaris,
14841# but without wasting forks for bash or zsh.
14842if test -z "$BASH_VERSION$ZSH_VERSION" \
14843 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14844 as_echo='print -r --'
14845 as_echo_n='print -rn --'
14846elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
14847 as_echo='printf %s\n'
14848 as_echo_n='printf %s'
14849else
14850 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14851 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14852 as_echo_n='/usr/ucb/echo -n'
14853 else
14854 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14855 as_echo_n_body='eval
14856 arg=$1;
14857 case $arg in #(
14858 *"$as_nl"*)
14859 expr "X$arg" : "X\\(.*\\)$as_nl";
14860 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14861 esac;
14862 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14863 '
14864 export as_echo_n_body
14865 as_echo_n='sh -c $as_echo_n_body as_echo'
14866 fi
14867 export as_echo_body
14868 as_echo='sh -c $as_echo_body as_echo'
14869fi
14870
14871# The user is always right.
14872if test "${PATH_SEPARATOR+set}" != set; then
14873 PATH_SEPARATOR=:
14874 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14875 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14876 PATH_SEPARATOR=';'
14877 }
bec39cab
AC
14878fi
14879
14880
81ecdfbb
RW
14881# IFS
14882# We need space, tab and new line, in precisely that order. Quoting is
14883# there to prevent editors from complaining about space-tab.
14884# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14885# splitting by setting IFS to empty value.)
14886IFS=" "" $as_nl"
14887
14888# Find who we are. Look in the path if we contain no directory separator.
14889case $0 in #((
14890 *[\\/]* ) as_myself=$0 ;;
14891 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14892for as_dir in $PATH
14893do
14894 IFS=$as_save_IFS
14895 test -z "$as_dir" && as_dir=.
14896 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14897 done
14898IFS=$as_save_IFS
14899
14900 ;;
14901esac
14902# We did not find ourselves, most probably we were run as `sh COMMAND'
14903# in which case we are not to be found in the path.
14904if test "x$as_myself" = x; then
14905 as_myself=$0
14906fi
14907if test ! -f "$as_myself"; then
14908 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14909 exit 1
14910fi
14911
14912# Unset variables that we do not need and which cause bugs (e.g. in
14913# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14914# suppresses any "Segmentation fault" message there. '((' could
14915# trigger a bug in pdksh 5.2.14.
14916for as_var in BASH_ENV ENV MAIL MAILPATH
14917do eval test x\${$as_var+set} = xset \
14918 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
14919done
bec39cab
AC
14920PS1='$ '
14921PS2='> '
14922PS4='+ '
14923
14924# NLS nuisances.
81ecdfbb
RW
14925LC_ALL=C
14926export LC_ALL
14927LANGUAGE=C
14928export LANGUAGE
14929
14930# CDPATH.
14931(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14932
14933
14934# as_fn_error ERROR [LINENO LOG_FD]
14935# ---------------------------------
14936# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14937# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
14938# script with status $?, using 1 if that was 0.
14939as_fn_error ()
14940{
14941 as_status=$?; test $as_status -eq 0 && as_status=1
14942 if test "$3"; then
14943 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14944 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
14945 fi
14946 $as_echo "$as_me: error: $1" >&2
14947 as_fn_exit $as_status
14948} # as_fn_error
14949
14950
14951# as_fn_set_status STATUS
14952# -----------------------
14953# Set $? to STATUS, without forking.
14954as_fn_set_status ()
14955{
14956 return $1
14957} # as_fn_set_status
14958
14959# as_fn_exit STATUS
14960# -----------------
14961# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14962as_fn_exit ()
14963{
14964 set +e
14965 as_fn_set_status $1
14966 exit $1
14967} # as_fn_exit
14968
14969# as_fn_unset VAR
14970# ---------------
14971# Portably unset VAR.
14972as_fn_unset ()
14973{
14974 { eval $1=; unset $1;}
14975}
14976as_unset=as_fn_unset
14977# as_fn_append VAR VALUE
14978# ----------------------
14979# Append the text in VALUE to the end of the definition contained in VAR. Take
14980# advantage of any shell optimizations that allow amortized linear growth over
14981# repeated appends, instead of the typical quadratic growth present in naive
14982# implementations.
14983if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14984 eval 'as_fn_append ()
14985 {
14986 eval $1+=\$2
14987 }'
14988else
14989 as_fn_append ()
14990 {
14991 eval $1=\$$1\$2
14992 }
14993fi # as_fn_append
14994
14995# as_fn_arith ARG...
14996# ------------------
14997# Perform arithmetic evaluation on the ARGs, and store the result in the
14998# global $as_val. Take advantage of shells that can avoid forks. The arguments
14999# must be portable across $(()) and expr.
15000if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15001 eval 'as_fn_arith ()
15002 {
15003 as_val=$(( $* ))
15004 }'
15005else
15006 as_fn_arith ()
15007 {
15008 as_val=`expr "$@" || test $? -eq 1`
15009 }
15010fi # as_fn_arith
bec39cab 15011
81ecdfbb
RW
15012
15013if expr a : '\(a\)' >/dev/null 2>&1 &&
15014 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
15015 as_expr=expr
15016else
15017 as_expr=false
15018fi
15019
81ecdfbb 15020if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
15021 as_basename=basename
15022else
15023 as_basename=false
15024fi
15025
81ecdfbb
RW
15026if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15027 as_dirname=dirname
15028else
15029 as_dirname=false
15030fi
bec39cab 15031
81ecdfbb 15032as_me=`$as_basename -- "$0" ||
bec39cab
AC
15033$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15034 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
15035 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
15036$as_echo X/"$0" |
15037 sed '/^.*\/\([^/][^/]*\)\/*$/{
15038 s//\1/
15039 q
15040 }
15041 /^X\/\(\/\/\)$/{
15042 s//\1/
15043 q
15044 }
15045 /^X\/\(\/\).*/{
15046 s//\1/
15047 q
15048 }
15049 s/.*/./; q'`
b4e70030 15050
b4e70030
JB
15051# Avoid depending upon Character Ranges.
15052as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15053as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15054as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15055as_cr_digits='0123456789'
15056as_cr_alnum=$as_cr_Letters$as_cr_digits
15057
81ecdfbb
RW
15058ECHO_C= ECHO_N= ECHO_T=
15059case `echo -n x` in #(((((
15060-n*)
15061 case `echo 'xy\c'` in
15062 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
15063 xy) ECHO_C='\c';;
15064 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
15065 ECHO_T=' ';;
15066 esac;;
15067*)
15068 ECHO_N='-n';;
bec39cab
AC
15069esac
15070
81ecdfbb
RW
15071rm -f conf$$ conf$$.exe conf$$.file
15072if test -d conf$$.dir; then
15073 rm -f conf$$.dir/conf$$.file
bec39cab 15074else
81ecdfbb
RW
15075 rm -f conf$$.dir
15076 mkdir conf$$.dir 2>/dev/null
bec39cab 15077fi
81ecdfbb
RW
15078if (echo >conf$$.file) 2>/dev/null; then
15079 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 15080 as_ln_s='ln -s'
81ecdfbb
RW
15081 # ... but there are two gotchas:
15082 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15083 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
15084 # In both cases, we have to default to `cp -p'.
15085 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
15086 as_ln_s='cp -p'
15087 elif ln conf$$.file conf$$ 2>/dev/null; then
15088 as_ln_s=ln
15089 else
15090 as_ln_s='cp -p'
b4e70030 15091 fi
bec39cab
AC
15092else
15093 as_ln_s='cp -p'
15094fi
81ecdfbb
RW
15095rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15096rmdir conf$$.dir 2>/dev/null
15097
15098
15099# as_fn_mkdir_p
15100# -------------
15101# Create "$as_dir" as a directory, including parents if necessary.
15102as_fn_mkdir_p ()
15103{
15104
15105 case $as_dir in #(
15106 -*) as_dir=./$as_dir;;
15107 esac
15108 test -d "$as_dir" || eval $as_mkdir_p || {
15109 as_dirs=
15110 while :; do
15111 case $as_dir in #(
15112 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15113 *) as_qdir=$as_dir;;
15114 esac
15115 as_dirs="'$as_qdir' $as_dirs"
15116 as_dir=`$as_dirname -- "$as_dir" ||
15117$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15118 X"$as_dir" : 'X\(//\)[^/]' \| \
15119 X"$as_dir" : 'X\(//\)$' \| \
15120 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15121$as_echo X"$as_dir" |
15122 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15123 s//\1/
15124 q
15125 }
15126 /^X\(\/\/\)[^/].*/{
15127 s//\1/
15128 q
15129 }
15130 /^X\(\/\/\)$/{
15131 s//\1/
15132 q
15133 }
15134 /^X\(\/\).*/{
15135 s//\1/
15136 q
15137 }
15138 s/.*/./; q'`
15139 test -d "$as_dir" && break
15140 done
15141 test -z "$as_dirs" || eval "mkdir $as_dirs"
15142 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
15143
bec39cab 15144
81ecdfbb 15145} # as_fn_mkdir_p
bec39cab 15146if mkdir -p . 2>/dev/null; then
81ecdfbb 15147 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
15148else
15149 test -d ./-p && rmdir ./-p
15150 as_mkdir_p=false
15151fi
15152
81ecdfbb
RW
15153if test -x / >/dev/null 2>&1; then
15154 as_test_x='test -x'
15155else
15156 if ls -dL / >/dev/null 2>&1; then
15157 as_ls_L_option=L
15158 else
15159 as_ls_L_option=
15160 fi
15161 as_test_x='
15162 eval sh -c '\''
15163 if test -d "$1"; then
15164 test -d "$1/.";
15165 else
15166 case $1 in #(
15167 -*)set "./$1";;
15168 esac;
15169 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
15170 ???[sx]*):;;*)false;;esac;fi
15171 '\'' sh
15172 '
15173fi
15174as_executable_p=$as_test_x
bec39cab
AC
15175
15176# Sed expression to map a string onto a valid CPP name.
15177as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
15178
15179# Sed expression to map a string onto a valid variable name.
15180as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
15181
15182
bec39cab 15183exec 6>&1
81ecdfbb
RW
15184## ----------------------------------- ##
15185## Main body of $CONFIG_STATUS script. ##
15186## ----------------------------------- ##
15187_ASEOF
15188test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
15189
15190cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15191# Save the log message, to keep $0 and so on meaningful, and to
bec39cab 15192# report actual input values of CONFIG_FILES etc. instead of their
81ecdfbb
RW
15193# values after options handling.
15194ac_log="
bec39cab 15195This file was extended by $as_me, which was
81ecdfbb 15196generated by GNU Autoconf 2.64. Invocation command line was
bec39cab
AC
15197
15198 CONFIG_FILES = $CONFIG_FILES
15199 CONFIG_HEADERS = $CONFIG_HEADERS
15200 CONFIG_LINKS = $CONFIG_LINKS
15201 CONFIG_COMMANDS = $CONFIG_COMMANDS
15202 $ $0 $@
15203
81ecdfbb
RW
15204on `(hostname || uname -n) 2>/dev/null | sed 1q`
15205"
15206
bec39cab
AC
15207_ACEOF
15208
81ecdfbb
RW
15209case $ac_config_files in *"
15210"*) set x $ac_config_files; shift; ac_config_files=$*;;
15211esac
234b45d4 15212
81ecdfbb
RW
15213case $ac_config_headers in *"
15214"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15215esac
b4e70030 15216
b4e70030 15217
81ecdfbb
RW
15218cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15219# Files that config.status was made for.
15220config_files="$ac_config_files"
15221config_headers="$ac_config_headers"
15222config_links="$ac_config_links"
15223config_commands="$ac_config_commands"
234b45d4 15224
81ecdfbb 15225_ACEOF
b4e70030 15226
81ecdfbb 15227cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab 15228ac_cs_usage="\
81ecdfbb
RW
15229\`$as_me' instantiates files and other configuration actions
15230from templates according to the current configuration. Unless the files
15231and actions are specified as TAGs, all are instantiated by default.
234b45d4 15232
81ecdfbb 15233Usage: $0 [OPTION]... [TAG]...
234b45d4 15234
bec39cab 15235 -h, --help print this help, then exit
81ecdfbb
RW
15236 -V, --version print version number and configuration settings, then exit
15237 -q, --quiet, --silent
15238 do not print progress messages
bec39cab
AC
15239 -d, --debug don't remove temporary files
15240 --recheck update $as_me by reconfiguring in the same conditions
81ecdfbb
RW
15241 --file=FILE[:TEMPLATE]
15242 instantiate the configuration file FILE
15243 --header=FILE[:TEMPLATE]
15244 instantiate the configuration header FILE
234b45d4 15245
bec39cab
AC
15246Configuration files:
15247$config_files
234b45d4 15248
bec39cab
AC
15249Configuration headers:
15250$config_headers
234b45d4 15251
bec39cab
AC
15252Configuration links:
15253$config_links
234b45d4 15254
bec39cab
AC
15255Configuration commands:
15256$config_commands
15257
81ecdfbb 15258Report bugs to the package provider."
b4e70030 15259
81ecdfbb
RW
15260_ACEOF
15261cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab
AC
15262ac_cs_version="\\
15263config.status
81ecdfbb
RW
15264configured by $0, generated by GNU Autoconf 2.64,
15265 with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
bec39cab 15266
81ecdfbb 15267Copyright (C) 2009 Free Software Foundation, Inc.
bec39cab
AC
15268This config.status script is free software; the Free Software Foundation
15269gives unlimited permission to copy, distribute and modify it."
81ecdfbb
RW
15270
15271ac_pwd='$ac_pwd'
15272srcdir='$srcdir'
15273INSTALL='$INSTALL'
81ecdfbb
RW
15274AWK='$AWK'
15275test -n "\$AWK" || AWK=awk
bec39cab
AC
15276_ACEOF
15277
81ecdfbb
RW
15278cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15279# The default lists apply if the user does not specify any file.
bec39cab
AC
15280ac_need_defaults=:
15281while test $# != 0
15282do
15283 case $1 in
15284 --*=*)
81ecdfbb
RW
15285 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15286 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
bec39cab 15287 ac_shift=:
c906108c 15288 ;;
81ecdfbb 15289 *)
bec39cab
AC
15290 ac_option=$1
15291 ac_optarg=$2
15292 ac_shift=shift
c906108c 15293 ;;
bec39cab 15294 esac
c906108c 15295
bec39cab
AC
15296 case $ac_option in
15297 # Handling of the options.
bec39cab
AC
15298 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15299 ac_cs_recheck=: ;;
81ecdfbb
RW
15300 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
15301 $as_echo "$ac_cs_version"; exit ;;
15302 --debug | --debu | --deb | --de | --d | -d )
bec39cab
AC
15303 debug=: ;;
15304 --file | --fil | --fi | --f )
15305 $ac_shift
81ecdfbb
RW
15306 case $ac_optarg in
15307 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15308 esac
15309 as_fn_append CONFIG_FILES " '$ac_optarg'"
bec39cab
AC
15310 ac_need_defaults=false;;
15311 --header | --heade | --head | --hea )
15312 $ac_shift
81ecdfbb
RW
15313 case $ac_optarg in
15314 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15315 esac
15316 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
bec39cab 15317 ac_need_defaults=false;;
81ecdfbb
RW
15318 --he | --h)
15319 # Conflict between --help and --header
15320 as_fn_error "ambiguous option: \`$1'
15321Try \`$0 --help' for more information.";;
15322 --help | --hel | -h )
15323 $as_echo "$ac_cs_usage"; exit ;;
bec39cab
AC
15324 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15325 | -silent | --silent | --silen | --sile | --sil | --si | --s)
15326 ac_cs_silent=: ;;
c906108c 15327
bec39cab 15328 # This is an error.
81ecdfbb
RW
15329 -*) as_fn_error "unrecognized option: \`$1'
15330Try \`$0 --help' for more information." ;;
c906108c 15331
81ecdfbb
RW
15332 *) as_fn_append ac_config_targets " $1"
15333 ac_need_defaults=false ;;
c906108c 15334
bec39cab
AC
15335 esac
15336 shift
15337done
c906108c 15338
bec39cab 15339ac_configure_extra_args=
c906108c 15340
bec39cab
AC
15341if $ac_cs_silent; then
15342 exec 6>/dev/null
15343 ac_configure_extra_args="$ac_configure_extra_args --silent"
15344fi
c906108c 15345
bec39cab 15346_ACEOF
81ecdfbb 15347cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab 15348if \$ac_cs_recheck; then
81ecdfbb
RW
15349 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
15350 shift
15351 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15352 CONFIG_SHELL='$SHELL'
15353 export CONFIG_SHELL
15354 exec "\$@"
bec39cab
AC
15355fi
15356
15357_ACEOF
81ecdfbb
RW
15358cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15359exec 5>>config.log
15360{
15361 echo
15362 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15363## Running $as_me. ##
15364_ASBOX
15365 $as_echo "$ac_log"
15366} >&5
bec39cab 15367
81ecdfbb
RW
15368_ACEOF
15369cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
c906108c 15370#
81ecdfbb 15371# INIT-COMMANDS
c906108c 15372#
a417dc56 15373ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
b4e70030 15374
bec39cab
AC
15375_ACEOF
15376
81ecdfbb 15377cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
4e8d927d 15378
81ecdfbb 15379# Handling of arguments.
bec39cab 15380for ac_config_target in $ac_config_targets
c906108c 15381do
81ecdfbb
RW
15382 case $ac_config_target in
15383 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
15384 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
f997c383 15385 "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
81ecdfbb 15386 "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;;
b292c783 15387 "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;;
81ecdfbb 15388 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
e2207b9a 15389 "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;;
5ae98d25 15390 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
aa2e2d8d 15391 "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
81ecdfbb
RW
15392 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
15393
15394 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
c906108c
SS
15395 esac
15396done
15397
81ecdfbb 15398
bec39cab
AC
15399# If the user did not use the arguments to specify the items to instantiate,
15400# then the envvar interface is used. Set only those that are not.
15401# We use the long form for the default assignment because of an extremely
15402# bizarre bug on SunOS 4.1.3.
15403if $ac_need_defaults; then
15404 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15405 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15406 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
15407 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
15408fi
15409
b4e70030 15410# Have a temporary directory for convenience. Make it in the build tree
81ecdfbb 15411# simply because there is no reason against having it here, and in addition,
b4e70030 15412# creating and moving files from /tmp can sometimes cause problems.
81ecdfbb
RW
15413# Hook for its removal unless debugging.
15414# Note that there is a small window in which the directory will not be cleaned:
15415# after its creation but before its name has been assigned to `$tmp'.
b4e70030
JB
15416$debug ||
15417{
81ecdfbb
RW
15418 tmp=
15419 trap 'exit_status=$?
15420 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
15421' 0
15422 trap 'as_fn_exit 1' 1 2 13 15
15423}
15424# Create a (secure) tmp directory for tmp files.
15425
15426{
15427 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
15428 test -n "$tmp" && test -d "$tmp"
15429} ||
15430{
15431 tmp=./conf$$-$RANDOM
15432 (umask 077 && mkdir "$tmp")
15433} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
15434
15435# Set up the scripts for CONFIG_FILES section.
15436# No need to generate them if there are no CONFIG_FILES.
15437# This happens for instance with `./config.status config.h'.
15438if test -n "$CONFIG_FILES"; then
15439
15440if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
15441 ac_cs_awk_getline=:
15442 ac_cs_awk_pipe_init=
15443 ac_cs_awk_read_file='
15444 while ((getline aline < (F[key])) > 0)
15445 print(aline)
15446 close(F[key])'
15447 ac_cs_awk_pipe_fini=
15448else
15449 ac_cs_awk_getline=false
15450 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
15451 ac_cs_awk_read_file='
15452 print "|#_!!_#|"
15453 print "cat " F[key] " &&"
15454 '$ac_cs_awk_pipe_init
15455 # The final `:' finishes the AND list.
15456 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
15457fi
15458ac_cr=`echo X | tr X '\015'`
15459# On cygwin, bash can eat \r inside `` if the user requested igncr.
15460# But we know of no other shell where ac_cr would be empty at this
15461# point, so we can use a bashism as a fallback.
15462if test "x$ac_cr" = x; then
15463 eval ac_cr=\$\'\\r\'
15464fi
15465ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15466if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
15467 ac_cs_awk_cr='\r'
15468else
15469 ac_cs_awk_cr=$ac_cr
15470fi
15471
15472echo 'BEGIN {' >"$tmp/subs1.awk" &&
15473_ACEOF
15474
15475# Create commands to substitute file output variables.
15476{
15477 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
15478 echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' &&
15479 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
15480 echo "_ACAWK" &&
15481 echo "_ACEOF"
15482} >conf$$files.sh &&
15483. ./conf$$files.sh ||
15484 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
15485rm -f conf$$files.sh
15486
15487{
15488 echo "cat >conf$$subs.awk <<_ACEOF" &&
15489 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15490 echo "_ACEOF"
15491} >conf$$subs.sh ||
15492 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
15493ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
15494ac_delim='%!_!# '
15495for ac_last_try in false false false false false :; do
15496 . ./conf$$subs.sh ||
15497 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
15498
15499 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15500 if test $ac_delim_n = $ac_delim_num; then
15501 break
15502 elif $ac_last_try; then
15503 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
15504 else
15505 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15506 fi
15507done
15508rm -f conf$$subs.sh
15509
15510cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15511cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
15512_ACEOF
15513sed -n '
15514h
15515s/^/S["/; s/!.*/"]=/
15516p
15517g
15518s/^[^!]*!//
15519:repl
15520t repl
15521s/'"$ac_delim"'$//
15522t delim
15523:nl
15524h
15525s/\(.\{148\}\).*/\1/
15526t more1
15527s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15528p
15529n
15530b repl
15531:more1
15532s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15533p
15534g
15535s/.\{148\}//
15536t nl
15537:delim
15538h
15539s/\(.\{148\}\).*/\1/
15540t more2
15541s/["\\]/\\&/g; s/^/"/; s/$/"/
15542p
15543b
15544:more2
15545s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15546p
15547g
15548s/.\{148\}//
15549t delim
15550' <conf$$subs.awk | sed '
15551/^[^""]/{
15552 N
15553 s/\n//
15554}
15555' >>$CONFIG_STATUS || ac_write_fail=1
15556rm -f conf$$subs.awk
15557cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15558_ACAWK
15559cat >>"\$tmp/subs1.awk" <<_ACAWK &&
15560 for (key in S) S_is_set[key] = 1
15561 FS = "\a"
15562 \$ac_cs_awk_pipe_init
15563}
15564{
15565 line = $ 0
15566 nfields = split(line, field, "@")
15567 substed = 0
15568 len = length(field[1])
15569 for (i = 2; i < nfields; i++) {
15570 key = field[i]
15571 keylen = length(key)
15572 if (S_is_set[key]) {
15573 value = S[key]
15574 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
15575 len += length(value) + length(field[++i])
15576 substed = 1
15577 } else
15578 len += 1 + keylen
15579 }
15580 if (nfields == 3 && !substed) {
15581 key = field[2]
15582 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
15583 \$ac_cs_awk_read_file
15584 next
15585 }
15586 }
15587 print line
b4e70030 15588}
81ecdfbb
RW
15589\$ac_cs_awk_pipe_fini
15590_ACAWK
15591_ACEOF
15592cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15593if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
15594 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
15595else
15596 cat
15597fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
15598 || as_fn_error "could not setup config files machinery" "$LINENO" 5
15599_ACEOF
15600
15601# VPATH may cause trouble with some makes, so we remove $(srcdir),
15602# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
15603# trailing colons and then remove the whole line if VPATH becomes empty
15604# (actually we leave an empty line to preserve line numbers).
15605if test "x$srcdir" = x.; then
15606 ac_vpsub='/^[ ]*VPATH[ ]*=/{
15607s/:*\$(srcdir):*/:/
15608s/:*\${srcdir}:*/:/
15609s/:*@srcdir@:*/:/
15610s/^\([^=]*=[ ]*\):*/\1/
15611s/:*$//
15612s/^[^=]*=[ ]*$//
15613}'
15614fi
15615
15616cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15617fi # test -n "$CONFIG_FILES"
15618
15619# Set up the scripts for CONFIG_HEADERS section.
15620# No need to generate them if there are no CONFIG_HEADERS.
15621# This happens for instance with `./config.status Makefile'.
15622if test -n "$CONFIG_HEADERS"; then
15623cat >"$tmp/defines.awk" <<\_ACAWK ||
15624BEGIN {
15625_ACEOF
15626
15627# Transform confdefs.h into an awk script `defines.awk', embedded as
15628# here-document in config.status, that substitutes the proper values into
15629# config.h.in to produce config.h.
4e8d927d 15630
81ecdfbb
RW
15631# Create a delimiter string that does not exist in confdefs.h, to ease
15632# handling of long lines.
15633ac_delim='%!_!# '
15634for ac_last_try in false false :; do
15635 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
15636 if test -z "$ac_t"; then
15637 break
15638 elif $ac_last_try; then
15639 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
15640 else
15641 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15642 fi
15643done
4e8d927d 15644
81ecdfbb
RW
15645# For the awk script, D is an array of macro values keyed by name,
15646# likewise P contains macro parameters if any. Preserve backslash
15647# newline sequences.
15648
15649ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
15650sed -n '
15651s/.\{148\}/&'"$ac_delim"'/g
15652t rset
15653:rset
15654s/^[ ]*#[ ]*define[ ][ ]*/ /
15655t def
15656d
15657:def
15658s/\\$//
15659t bsnl
15660s/["\\]/\\&/g
15661s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15662D["\1"]=" \3"/p
15663s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
15664d
15665:bsnl
15666s/["\\]/\\&/g
15667s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15668D["\1"]=" \3\\\\\\n"\\/p
15669t cont
15670s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
15671t cont
15672d
15673:cont
15674n
15675s/.\{148\}/&'"$ac_delim"'/g
15676t clear
15677:clear
15678s/\\$//
15679t bsnlc
15680s/["\\]/\\&/g; s/^/"/; s/$/"/p
15681d
15682:bsnlc
15683s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
15684b cont
15685' <confdefs.h | sed '
15686s/'"$ac_delim"'/"\\\
15687"/g' >>$CONFIG_STATUS || ac_write_fail=1
15688
15689cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15690 for (key in D) D_is_set[key] = 1
15691 FS = "\a"
15692}
15693/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
15694 line = \$ 0
15695 split(line, arg, " ")
15696 if (arg[1] == "#") {
15697 defundef = arg[2]
15698 mac1 = arg[3]
15699 } else {
15700 defundef = substr(arg[1], 2)
15701 mac1 = arg[2]
15702 }
15703 split(mac1, mac2, "(") #)
15704 macro = mac2[1]
15705 prefix = substr(line, 1, index(line, defundef) - 1)
15706 if (D_is_set[macro]) {
15707 # Preserve the white space surrounding the "#".
15708 print prefix "define", macro P[macro] D[macro]
15709 next
15710 } else {
15711 # Replace #undef with comments. This is necessary, for example,
15712 # in the case of _POSIX_SOURCE, which is predefined and required
15713 # on some systems where configure will not decide to define it.
15714 if (defundef == "undef") {
15715 print "/*", prefix defundef, macro, "*/"
15716 next
15717 }
15718 }
b4e70030 15719}
81ecdfbb
RW
15720{ print }
15721_ACAWK
b4e70030 15722_ACEOF
81ecdfbb
RW
15723cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15724 as_fn_error "could not setup config headers machinery" "$LINENO" 5
15725fi # test -n "$CONFIG_HEADERS"
4e8d927d 15726
4e8d927d 15727
81ecdfbb
RW
15728eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
15729shift
15730for ac_tag
15731do
15732 case $ac_tag in
15733 :[FHLC]) ac_mode=$ac_tag; continue;;
15734 esac
15735 case $ac_mode$ac_tag in
15736 :[FHL]*:*);;
15737 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
15738 :[FH]-) ac_tag=-:-;;
15739 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
15740 esac
15741 ac_save_IFS=$IFS
15742 IFS=:
15743 set x $ac_tag
15744 IFS=$ac_save_IFS
15745 shift
15746 ac_file=$1
15747 shift
4e8d927d 15748
81ecdfbb
RW
15749 case $ac_mode in
15750 :L) ac_source=$1;;
15751 :[FH])
15752 ac_file_inputs=
15753 for ac_f
15754 do
15755 case $ac_f in
15756 -) ac_f="$tmp/stdin";;
15757 *) # Look for the file first in the build tree, then in the source tree
15758 # (if the path is not absolute). The absolute path cannot be DOS-style,
15759 # because $ac_f cannot contain `:'.
15760 test -f "$ac_f" ||
15761 case $ac_f in
15762 [\\/$]*) false;;
15763 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
15764 esac ||
15765 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
15766 esac
15767 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
15768 as_fn_append ac_file_inputs " '$ac_f'"
15769 done
15770
15771 # Let's still pretend it is `configure' which instantiates (i.e., don't
15772 # use $as_me), people would be surprised to read:
15773 # /* config.h. Generated by config.status. */
15774 configure_input='Generated from '`
15775 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
15776 `' by configure.'
15777 if test x"$ac_file" != x-; then
15778 configure_input="$ac_file. $configure_input"
15779 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
15780$as_echo "$as_me: creating $ac_file" >&6;}
b4e70030 15781 fi
81ecdfbb
RW
15782 # Neutralize special characters interpreted by sed in replacement strings.
15783 case $configure_input in #(
15784 *\&* | *\|* | *\\* )
15785 ac_sed_conf_input=`$as_echo "$configure_input" |
15786 sed 's/[\\\\&|]/\\\\&/g'`;; #(
15787 *) ac_sed_conf_input=$configure_input;;
15788 esac
4e8d927d 15789
81ecdfbb
RW
15790 case $ac_tag in
15791 *:-:* | *:-) cat >"$tmp/stdin" \
15792 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
15793 esac
15794 ;;
c906108c
SS
15795 esac
15796
81ecdfbb 15797 ac_dir=`$as_dirname -- "$ac_file" ||
bec39cab
AC
15798$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15799 X"$ac_file" : 'X\(//\)[^/]' \| \
15800 X"$ac_file" : 'X\(//\)$' \| \
81ecdfbb
RW
15801 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
15802$as_echo X"$ac_file" |
15803 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15804 s//\1/
15805 q
15806 }
15807 /^X\(\/\/\)[^/].*/{
15808 s//\1/
15809 q
15810 }
15811 /^X\(\/\/\)$/{
15812 s//\1/
15813 q
15814 }
15815 /^X\(\/\).*/{
15816 s//\1/
15817 q
15818 }
15819 s/.*/./; q'`
15820 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
15821 ac_builddir=.
15822
81ecdfbb
RW
15823case "$ac_dir" in
15824.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
15825*)
15826 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
15827 # A ".." for each directory in $ac_dir_suffix.
15828 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
15829 case $ac_top_builddir_sub in
15830 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
15831 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
15832 esac ;;
15833esac
15834ac_abs_top_builddir=$ac_pwd
15835ac_abs_builddir=$ac_pwd$ac_dir_suffix
15836# for backward compatibility:
15837ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
15838
15839case $srcdir in
81ecdfbb 15840 .) # We are building in place.
bec39cab 15841 ac_srcdir=.
81ecdfbb
RW
15842 ac_top_srcdir=$ac_top_builddir_sub
15843 ac_abs_top_srcdir=$ac_pwd ;;
15844 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 15845 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
15846 ac_top_srcdir=$srcdir
15847 ac_abs_top_srcdir=$srcdir ;;
15848 *) # Relative name.
15849 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15850 ac_top_srcdir=$ac_top_build_prefix$srcdir
15851 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 15852esac
81ecdfbb 15853ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 15854
c906108c 15855
81ecdfbb
RW
15856 case $ac_mode in
15857 :F)
15858 #
15859 # CONFIG_FILE
15860 #
c906108c 15861
bec39cab
AC
15862 case $INSTALL in
15863 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
81ecdfbb 15864 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
c906108c 15865 esac
81ecdfbb 15866_ACEOF
121ce6e5 15867
81ecdfbb
RW
15868cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15869# If the template does not know about datarootdir, expand it.
15870# FIXME: This hack should be removed a few years after 2.60.
15871ac_datarootdir_hack=; ac_datarootdir_seen=
15872ac_sed_dataroot='
15873/datarootdir/ {
15874 p
15875 q
15876}
15877/@datadir@/p
15878/@docdir@/p
15879/@infodir@/p
15880/@localedir@/p
15881/@mandir@/p'
15882case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
15883*datarootdir*) ac_datarootdir_seen=yes;;
15884*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
15885 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
15886$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
15887_ACEOF
15888cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15889 ac_datarootdir_hack='
15890 s&@datadir@&$datadir&g
15891 s&@docdir@&$docdir&g
15892 s&@infodir@&$infodir&g
15893 s&@localedir@&$localedir&g
15894 s&@mandir@&$mandir&g
15895 s&\\\${datarootdir}&$datarootdir&g' ;;
15896esac
4e8d927d 15897_ACEOF
81ecdfbb
RW
15898
15899# Neutralize VPATH when `$srcdir' = `.'.
15900# Shell code in configure.ac might set extrasub.
15901# FIXME: do we really want to maintain this feature?
15902cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15903ac_sed_extra="$ac_vpsub
bec39cab
AC
15904$extrasub
15905_ACEOF
81ecdfbb 15906cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab
AC
15907:t
15908/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
81ecdfbb
RW
15909s|@configure_input@|$ac_sed_conf_input|;t t
15910s&@top_builddir@&$ac_top_builddir_sub&;t t
15911s&@top_build_prefix@&$ac_top_build_prefix&;t t
15912s&@srcdir@&$ac_srcdir&;t t
15913s&@abs_srcdir@&$ac_abs_srcdir&;t t
15914s&@top_srcdir@&$ac_top_srcdir&;t t
15915s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15916s&@builddir@&$ac_builddir&;t t
15917s&@abs_builddir@&$ac_abs_builddir&;t t
15918s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15919s&@INSTALL@&$ac_INSTALL&;t t
81ecdfbb
RW
15920$ac_datarootdir_hack
15921"
15922eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
15923if $ac_cs_awk_getline; then
15924 $AWK -f "$tmp/subs.awk"
15925else
15926 $AWK -f "$tmp/subs.awk" | $SHELL
15927fi >$tmp/out \
15928 || as_fn_error "could not create $ac_file" "$LINENO" 5
15929
15930test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
15931 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
15932 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
15933 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
15934which seems to be undefined. Please make sure it is defined." >&5
15935$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
15936which seems to be undefined. Please make sure it is defined." >&2;}
15937
15938 rm -f "$tmp/stdin"
bec39cab 15939 case $ac_file in
81ecdfbb
RW
15940 -) cat "$tmp/out" && rm -f "$tmp/out";;
15941 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
15942 esac \
15943 || as_fn_error "could not create $ac_file" "$LINENO" 5
15944 ;;
15945 :H)
15946 #
15947 # CONFIG_HEADER
15948 #
bec39cab 15949 if test x"$ac_file" != x-; then
81ecdfbb
RW
15950 {
15951 $as_echo "/* $configure_input */" \
15952 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
15953 } >"$tmp/config.h" \
15954 || as_fn_error "could not create $ac_file" "$LINENO" 5
15955 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
15956 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15957$as_echo "$as_me: $ac_file is unchanged" >&6;}
bec39cab 15958 else
81ecdfbb
RW
15959 rm -f "$ac_file"
15960 mv "$tmp/config.h" "$ac_file" \
15961 || as_fn_error "could not create $ac_file" "$LINENO" 5
bec39cab
AC
15962 fi
15963 else
81ecdfbb
RW
15964 $as_echo "/* $configure_input */" \
15965 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
15966 || as_fn_error "could not create -" "$LINENO" 5
bec39cab 15967 fi
81ecdfbb
RW
15968 ;;
15969 :L)
15970 #
15971 # CONFIG_LINK
15972 #
c906108c 15973
81ecdfbb
RW
15974 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
15975 :
b4e70030 15976 else
81ecdfbb
RW
15977 # Prefer the file from the source tree if names are identical.
15978 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
15979 ac_source=$srcdir/$ac_source
15980 fi
b4e70030 15981
81ecdfbb
RW
15982 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
15983$as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
b4e70030 15984
81ecdfbb
RW
15985 if test ! -r "$ac_source"; then
15986 as_fn_error "$ac_source: file not found" "$LINENO" 5
15987 fi
15988 rm -f "$ac_file"
bec39cab 15989
81ecdfbb
RW
15990 # Try a relative symlink, then a hard link, then a copy.
15991 case $srcdir in
15992 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
15993 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
15994 esac
15995 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
15996 ln "$ac_source" "$ac_file" 2>/dev/null ||
15997 cp -p "$ac_source" "$ac_file" ||
15998 as_fn_error "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
15999 fi
16000 ;;
16001 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
16002$as_echo "$as_me: executing $ac_file commands" >&6;}
16003 ;;
c906108c 16004 esac
b4e70030 16005
bec39cab 16006
81ecdfbb
RW
16007 case $ac_file$ac_mode in
16008 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
b292c783 16009 "gcore":F) chmod +x gcore ;;
81ecdfbb 16010 "default":C)
c906108c
SS
16011case x$CONFIG_HEADERS in
16012xconfig.h:config.in)
16013echo > stamp-h ;;
16014esac
bec39cab 16015 ;;
81ecdfbb 16016
bec39cab 16017 esac
81ecdfbb 16018done # for ac_tag
c906108c 16019
bec39cab 16020
81ecdfbb 16021as_fn_exit 0
bec39cab 16022_ACEOF
bec39cab
AC
16023ac_clean_files=$ac_clean_files_save
16024
81ecdfbb
RW
16025test $ac_write_fail = 0 ||
16026 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
16027
bec39cab
AC
16028
16029# configure is writing to config.log, and then calls config.status.
16030# config.status does its own redirection, appending to config.log.
16031# Unfortunately, on DOS this fails, as config.log is still kept open
16032# by configure, so config.status won't be able to write to it; its
16033# output is simply discarded. So we exec the FD to /dev/null,
16034# effectively closing config.log, so it can be properly (re)opened and
16035# appended to by config.status. When coming back to configure, we
16036# need to make the FD available again.
16037if test "$no_create" != yes; then
16038 ac_cs_success=:
16039 ac_config_status_args=
16040 test "$silent" = yes &&
16041 ac_config_status_args="$ac_config_status_args --quiet"
16042 exec 5>/dev/null
16043 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
16044 exec 5>>config.log
16045 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16046 # would make configure fail if this is the last instruction.
81ecdfbb 16047 $ac_cs_success || as_fn_exit $?
bec39cab 16048fi
c906108c 16049
bec39cab 16050#
81ecdfbb 16051# CONFIG_SUBDIRS section.
bec39cab 16052#
c906108c
SS
16053if test "$no_recursion" != yes; then
16054
81ecdfbb
RW
16055 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
16056 # so they do not pile up.
c906108c
SS
16057 ac_sub_configure_args=
16058 ac_prev=
fdc59709
PB
16059 eval "set x $ac_configure_args"
16060 shift
16061 for ac_arg
16062 do
c906108c
SS
16063 if test -n "$ac_prev"; then
16064 ac_prev=
16065 continue
16066 fi
bec39cab 16067 case $ac_arg in
c906108c
SS
16068 -cache-file | --cache-file | --cache-fil | --cache-fi \
16069 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
16070 ac_prev=cache_file ;;
16071 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
bec39cab
AC
16072 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
16073 | --c=*)
16074 ;;
16075 --config-cache | -C)
c906108c
SS
16076 ;;
16077 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
16078 ac_prev=srcdir ;;
16079 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
16080 ;;
bec39cab
AC
16081 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
16082 ac_prev=prefix ;;
16083 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
16084 ;;
81ecdfbb
RW
16085 --disable-option-checking)
16086 ;;
fdc59709
PB
16087 *)
16088 case $ac_arg in
81ecdfbb 16089 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 16090 esac
81ecdfbb 16091 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
c906108c
SS
16092 esac
16093 done
16094
bec39cab
AC
16095 # Always prepend --prefix to ensure using the same prefix
16096 # in subdir configurations.
fdc59709
PB
16097 ac_arg="--prefix=$prefix"
16098 case $ac_arg in
81ecdfbb 16099 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 16100 esac
81ecdfbb
RW
16101 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
16102
16103 # Pass --silent
16104 if test "$silent" = yes; then
16105 ac_sub_configure_args="--silent $ac_sub_configure_args"
16106 fi
16107
16108 # Always prepend --disable-option-checking to silence warnings, since
16109 # different subdirs can have different --enable and --with options.
16110 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
bec39cab 16111
b4e70030 16112 ac_popdir=`pwd`
bec39cab 16113 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
c906108c
SS
16114
16115 # Do not complain, so a configure script can configure whichever
16116 # parts of a large source tree are present.
fdc59709 16117 test -d "$srcdir/$ac_dir" || continue
c906108c 16118
81ecdfbb
RW
16119 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
16120 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
16121 $as_echo "$ac_msg" >&6
16122 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
16123 ac_builddir=.
16124
81ecdfbb
RW
16125case "$ac_dir" in
16126.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16127*)
16128 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
16129 # A ".." for each directory in $ac_dir_suffix.
16130 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
16131 case $ac_top_builddir_sub in
16132 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16133 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16134 esac ;;
16135esac
16136ac_abs_top_builddir=$ac_pwd
16137ac_abs_builddir=$ac_pwd$ac_dir_suffix
16138# for backward compatibility:
16139ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
16140
16141case $srcdir in
81ecdfbb 16142 .) # We are building in place.
bec39cab 16143 ac_srcdir=.
81ecdfbb
RW
16144 ac_top_srcdir=$ac_top_builddir_sub
16145 ac_abs_top_srcdir=$ac_pwd ;;
16146 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 16147 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
16148 ac_top_srcdir=$srcdir
16149 ac_abs_top_srcdir=$srcdir ;;
16150 *) # Relative name.
16151 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16152 ac_top_srcdir=$ac_top_build_prefix$srcdir
16153 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 16154esac
81ecdfbb 16155ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
c906108c 16156
c906108c 16157
fdc59709 16158 cd "$ac_dir"
c906108c
SS
16159
16160 # Check for guested configure; otherwise get Cygnus style configure.
fdc59709
PB
16161 if test -f "$ac_srcdir/configure.gnu"; then
16162 ac_sub_configure=$ac_srcdir/configure.gnu
16163 elif test -f "$ac_srcdir/configure"; then
16164 ac_sub_configure=$ac_srcdir/configure
16165 elif test -f "$ac_srcdir/configure.in"; then
16166 # This should be Cygnus configure.
16167 ac_sub_configure=$ac_aux_dir/configure
c906108c 16168 else
81ecdfbb
RW
16169 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
16170$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
c906108c
SS
16171 ac_sub_configure=
16172 fi
16173
16174 # The recursion is here.
16175 if test -n "$ac_sub_configure"; then
c906108c 16176 # Make the cache file name correct relative to the subdirectory.
bec39cab
AC
16177 case $cache_file in
16178 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
81ecdfbb
RW
16179 *) # Relative name.
16180 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
c906108c 16181 esac
c906108c 16182
81ecdfbb
RW
16183 { $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
16184$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
c906108c 16185 # The eval makes quoting arguments work.
fdc59709
PB
16186 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
16187 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
81ecdfbb 16188 as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
c906108c
SS
16189 fi
16190
fdc59709 16191 cd "$ac_popdir"
c906108c
SS
16192 done
16193fi
81ecdfbb
RW
16194if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16195 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16196$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
16197fi
c906108c
SS
16198
16199
16200exit 0
This page took 2.310173 seconds and 4 git commands to generate.