Import strtok_r gnulib module
[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
4df42755
DE
661HAVE_GUILE_FALSE
662HAVE_GUILE_TRUE
ed3ef339
DE
663GUILE_LIBS
664GUILE_CPPFLAGS
e76c5d17
DE
665GUILD_TARGET_FLAG
666GUILD
ed3ef339 667pkg_config_prog_path
4df42755
DE
668HAVE_PYTHON_FALSE
669HAVE_PYTHON_TRUE
ac534cba
JB
670PYTHON_LIBS
671PYTHON_CPPFLAGS
81ecdfbb 672PYTHON_CFLAGS
ec685c5e 673python_prog_path
81ecdfbb
RW
674LTLIBEXPAT
675LIBEXPAT
676HAVE_LIBEXPAT
b8e0a31c 677JIT_READER_DIR
f997c383 678TARGET_PTR
39037522 679READLINE_TEXI_INCFLAG
81ecdfbb
RW
680READLINE_CFLAGS
681READLINE_DEPS
682READLINE
711a72d3
L
683zlibinc
684zlibdir
81ecdfbb
RW
685MIG
686WINDRES
687DLLTOOL
c971b7fa 688AR
81ecdfbb
RW
689YFLAGS
690YACC
c971b7fa 691RANLIB
81ecdfbb 692LN_S
c971b7fa
PA
693INSTALL_DATA
694INSTALL_SCRIPT
695INSTALL_PROGRAM
696AWK
81ecdfbb
RW
697REPORT_BUGS_TEXI
698REPORT_BUGS_TO
699PKGVERSION
b292c783 700HAVE_NATIVE_GCORE_TARGET
81ecdfbb
RW
701TARGET_OBS
702subdirs
703GDB_DATADIR
704DEBUGDIR
5048e516
JK
705MAKEINFO_EXTRA_FLAGS
706MAKEINFOFLAGS
707MAKEINFO
81ecdfbb
RW
708PACKAGE
709GNULIB_STDINT_H
81ecdfbb
RW
710CATOBJEXT
711GENCAT
712INSTOBJEXT
713DATADIRNAME
714CATALOGS
715POSUB
716GMSGFMT
717XGETTEXT
718INCINTL
719LIBINTL_DEP
720LIBINTL
721USE_NLS
722SET_MAKE
723GMAKE_FALSE
724GMAKE_TRUE
725MAKE
726CCDEPMODE
727DEPDIR
728am__leading_dot
3bc3d82a 729COMPILER
4869db5e
RM
730INSTALL_STRIP_PROGRAM
731STRIP
732install_sh
81ecdfbb
RW
733target_os
734target_vendor
735target_cpu
736target
737host_os
738host_vendor
739host_cpu
740host
741build_os
742build_vendor
743build_cpu
744build
c971b7fa
PA
745EGREP
746GREP
747CPP
3bc3d82a
PA
748ac_ct_CXX
749CXXFLAGS
750CXX
81ecdfbb
RW
751OBJEXT
752EXEEXT
753ac_ct_CC
754CPPFLAGS
755LDFLAGS
756CFLAGS
757CC
758MAINT
759MAINTAINER_MODE_FALSE
760MAINTAINER_MODE_TRUE
761target_alias
762host_alias
763build_alias
764LIBS
765ECHO_T
766ECHO_N
767ECHO_C
768DEFS
769mandir
770localedir
771libdir
772psdir
773pdfdir
774dvidir
775htmldir
776infodir
777docdir
778oldincludedir
779includedir
780localstatedir
781sharedstatedir
782sysconfdir
783datadir
784datarootdir
785libexecdir
786sbindir
787bindir
788program_transform_name
789prefix
790exec_prefix
791PACKAGE_URL
792PACKAGE_BUGREPORT
793PACKAGE_STRING
794PACKAGE_VERSION
795PACKAGE_TARNAME
796PACKAGE_NAME
797PATH_SEPARATOR
798SHELL'
a4ce5b0d 799ac_subst_files='host_makefile_frag'
81ecdfbb
RW
800ac_user_opts='
801enable_option_checking
802enable_maintainer_mode
da2f07f1
JK
803enable_plugins
804enable_largefile
3bc3d82a 805enable_build_with_cxx
81ecdfbb
RW
806with_separate_debug_dir
807with_gdb_datadir
808with_relocated_sources
7349ff92 809with_auto_load_dir
bccbefd2 810with_auto_load_safe_path
81ecdfbb
RW
811enable_targets
812enable_64_bit_bfd
813enable_gdbcli
814enable_gdbmi
815enable_tui
816enable_gdbtk
05e7c244 817with_libunwind_ia64
81ecdfbb
RW
818with_curses
819enable_profiling
820with_pkgversion
821with_bugurl
711a72d3 822with_system_zlib
81ecdfbb 823with_libiconv_prefix
478aac75 824with_iconv_bin
81ecdfbb 825with_system_readline
b8e0a31c 826with_jit_reader_dir
81ecdfbb
RW
827with_expat
828with_gnu_ld
829enable_rpath
830with_libexpat_prefix
831with_python
ed3ef339 832with_guile
a8db4212 833enable_libmcheck
81ecdfbb
RW
834with_included_regex
835with_sysroot
836with_system_gdbinit
837enable_werror
838enable_build_warnings
839enable_gdb_build_warnings
608e2dbb
TT
840with_lzma
841with_liblzma_prefix
81ecdfbb
RW
842with_tcl
843with_tk
844with_x
845enable_sim
846enable_multi_ice
496c0e1b 847enable_gdbserver
393fd4c3
YQ
848with_babeltrace
849with_libbabeltrace_prefix
81ecdfbb
RW
850'
851 ac_precious_vars='build_alias
852host_alias
853target_alias
854CC
855CFLAGS
856LDFLAGS
857LIBS
858CPPFLAGS
3bc3d82a
PA
859CXX
860CXXFLAGS
861CCC
81ecdfbb 862CPP
f06e05e0
JK
863MAKEINFO
864MAKEINFOFLAGS
81ecdfbb
RW
865YACC
866YFLAGS
867XMKMF'
5ae98d25 868ac_subdirs_all='testsuite
81ecdfbb
RW
869gdbtk
870multi-ice
871gdbserver'
c906108c
SS
872
873# Initialize some variables set by options.
bec39cab
AC
874ac_init_help=
875ac_init_version=false
81ecdfbb
RW
876ac_unrecognized_opts=
877ac_unrecognized_sep=
c906108c
SS
878# The variables have the same names as the options, with
879# dashes changed to underlines.
bec39cab 880cache_file=/dev/null
c906108c 881exec_prefix=NONE
c906108c 882no_create=
c906108c
SS
883no_recursion=
884prefix=NONE
885program_prefix=NONE
886program_suffix=NONE
887program_transform_name=s,x,x,
888silent=
889site=
890srcdir=
c906108c
SS
891verbose=
892x_includes=NONE
893x_libraries=NONE
bec39cab
AC
894
895# Installation directory options.
896# These are left unexpanded so users can "make install exec_prefix=/foo"
897# and all the variables that are supposed to be based on exec_prefix
898# by default will actually change.
899# Use braces instead of parens because sh, perl, etc. also accept them.
81ecdfbb 900# (The list follows the same order as the GNU Coding Standards.)
c906108c
SS
901bindir='${exec_prefix}/bin'
902sbindir='${exec_prefix}/sbin'
903libexecdir='${exec_prefix}/libexec'
81ecdfbb
RW
904datarootdir='${prefix}/share'
905datadir='${datarootdir}'
c906108c
SS
906sysconfdir='${prefix}/etc'
907sharedstatedir='${prefix}/com'
908localstatedir='${prefix}/var'
c906108c
SS
909includedir='${prefix}/include'
910oldincludedir='/usr/include'
81ecdfbb
RW
911docdir='${datarootdir}/doc/${PACKAGE}'
912infodir='${datarootdir}/info'
913htmldir='${docdir}'
914dvidir='${docdir}'
915pdfdir='${docdir}'
916psdir='${docdir}'
917libdir='${exec_prefix}/lib'
918localedir='${datarootdir}/locale'
919mandir='${datarootdir}/man'
c906108c 920
c906108c 921ac_prev=
81ecdfbb 922ac_dashdash=
c906108c
SS
923for ac_option
924do
c906108c
SS
925 # If the previous option needs an argument, assign it.
926 if test -n "$ac_prev"; then
81ecdfbb 927 eval $ac_prev=\$ac_option
c906108c
SS
928 ac_prev=
929 continue
930 fi
931
81ecdfbb
RW
932 case $ac_option in
933 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
934 *) ac_optarg=yes ;;
935 esac
c906108c
SS
936
937 # Accept the important Cygnus configure options, so we can diagnose typos.
938
81ecdfbb
RW
939 case $ac_dashdash$ac_option in
940 --)
941 ac_dashdash=yes ;;
c906108c
SS
942
943 -bindir | --bindir | --bindi | --bind | --bin | --bi)
944 ac_prev=bindir ;;
945 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
bec39cab 946 bindir=$ac_optarg ;;
c906108c
SS
947
948 -build | --build | --buil | --bui | --bu)
bec39cab 949 ac_prev=build_alias ;;
c906108c 950 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
bec39cab 951 build_alias=$ac_optarg ;;
c906108c
SS
952
953 -cache-file | --cache-file | --cache-fil | --cache-fi \
954 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
955 ac_prev=cache_file ;;
956 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
957 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
bec39cab
AC
958 cache_file=$ac_optarg ;;
959
960 --config-cache | -C)
961 cache_file=config.cache ;;
c906108c 962
81ecdfbb 963 -datadir | --datadir | --datadi | --datad)
c906108c 964 ac_prev=datadir ;;
81ecdfbb 965 -datadir=* | --datadir=* | --datadi=* | --datad=*)
bec39cab 966 datadir=$ac_optarg ;;
c906108c 967
81ecdfbb
RW
968 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
969 | --dataroo | --dataro | --datar)
970 ac_prev=datarootdir ;;
971 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
972 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
973 datarootdir=$ac_optarg ;;
974
c906108c 975 -disable-* | --disable-*)
81ecdfbb 976 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
c906108c 977 # Reject names that are not valid shell variable names.
81ecdfbb
RW
978 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
979 as_fn_error "invalid feature name: $ac_useropt"
980 ac_useropt_orig=$ac_useropt
981 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
982 case $ac_user_opts in
983 *"
984"enable_$ac_useropt"
985"*) ;;
986 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
987 ac_unrecognized_sep=', ';;
988 esac
989 eval enable_$ac_useropt=no ;;
990
991 -docdir | --docdir | --docdi | --doc | --do)
992 ac_prev=docdir ;;
993 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
994 docdir=$ac_optarg ;;
995
996 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
997 ac_prev=dvidir ;;
998 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
999 dvidir=$ac_optarg ;;
c906108c
SS
1000
1001 -enable-* | --enable-*)
81ecdfbb 1002 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
c906108c 1003 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1004 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1005 as_fn_error "invalid feature name: $ac_useropt"
1006 ac_useropt_orig=$ac_useropt
1007 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1008 case $ac_user_opts in
1009 *"
1010"enable_$ac_useropt"
1011"*) ;;
1012 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1013 ac_unrecognized_sep=', ';;
b4e70030 1014 esac
81ecdfbb 1015 eval enable_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1016
1017 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1018 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1019 | --exec | --exe | --ex)
1020 ac_prev=exec_prefix ;;
1021 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1022 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1023 | --exec=* | --exe=* | --ex=*)
bec39cab 1024 exec_prefix=$ac_optarg ;;
c906108c
SS
1025
1026 -gas | --gas | --ga | --g)
1027 # Obsolete; use --with-gas.
1028 with_gas=yes ;;
1029
bec39cab
AC
1030 -help | --help | --hel | --he | -h)
1031 ac_init_help=long ;;
1032 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1033 ac_init_help=recursive ;;
1034 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1035 ac_init_help=short ;;
c906108c
SS
1036
1037 -host | --host | --hos | --ho)
bec39cab 1038 ac_prev=host_alias ;;
c906108c 1039 -host=* | --host=* | --hos=* | --ho=*)
bec39cab 1040 host_alias=$ac_optarg ;;
c906108c 1041
81ecdfbb
RW
1042 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1043 ac_prev=htmldir ;;
1044 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1045 | --ht=*)
1046 htmldir=$ac_optarg ;;
1047
c906108c
SS
1048 -includedir | --includedir | --includedi | --included | --include \
1049 | --includ | --inclu | --incl | --inc)
1050 ac_prev=includedir ;;
1051 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1052 | --includ=* | --inclu=* | --incl=* | --inc=*)
bec39cab 1053 includedir=$ac_optarg ;;
c906108c
SS
1054
1055 -infodir | --infodir | --infodi | --infod | --info | --inf)
1056 ac_prev=infodir ;;
1057 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
bec39cab 1058 infodir=$ac_optarg ;;
c906108c
SS
1059
1060 -libdir | --libdir | --libdi | --libd)
1061 ac_prev=libdir ;;
1062 -libdir=* | --libdir=* | --libdi=* | --libd=*)
bec39cab 1063 libdir=$ac_optarg ;;
c906108c
SS
1064
1065 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1066 | --libexe | --libex | --libe)
1067 ac_prev=libexecdir ;;
1068 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1069 | --libexe=* | --libex=* | --libe=*)
bec39cab 1070 libexecdir=$ac_optarg ;;
c906108c 1071
81ecdfbb
RW
1072 -localedir | --localedir | --localedi | --localed | --locale)
1073 ac_prev=localedir ;;
1074 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1075 localedir=$ac_optarg ;;
1076
c906108c 1077 -localstatedir | --localstatedir | --localstatedi | --localstated \
81ecdfbb 1078 | --localstate | --localstat | --localsta | --localst | --locals)
c906108c
SS
1079 ac_prev=localstatedir ;;
1080 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
81ecdfbb 1081 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
bec39cab 1082 localstatedir=$ac_optarg ;;
c906108c
SS
1083
1084 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1085 ac_prev=mandir ;;
1086 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
bec39cab 1087 mandir=$ac_optarg ;;
c906108c
SS
1088
1089 -nfp | --nfp | --nf)
1090 # Obsolete; use --without-fp.
1091 with_fp=no ;;
1092
1093 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
bec39cab 1094 | --no-cr | --no-c | -n)
c906108c
SS
1095 no_create=yes ;;
1096
1097 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1098 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1099 no_recursion=yes ;;
1100
1101 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1102 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1103 | --oldin | --oldi | --old | --ol | --o)
1104 ac_prev=oldincludedir ;;
1105 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1106 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1107 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
bec39cab 1108 oldincludedir=$ac_optarg ;;
c906108c
SS
1109
1110 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1111 ac_prev=prefix ;;
1112 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
bec39cab 1113 prefix=$ac_optarg ;;
c906108c
SS
1114
1115 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1116 | --program-pre | --program-pr | --program-p)
1117 ac_prev=program_prefix ;;
1118 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1119 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
bec39cab 1120 program_prefix=$ac_optarg ;;
c906108c
SS
1121
1122 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1123 | --program-suf | --program-su | --program-s)
1124 ac_prev=program_suffix ;;
1125 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1126 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
bec39cab 1127 program_suffix=$ac_optarg ;;
c906108c
SS
1128
1129 -program-transform-name | --program-transform-name \
1130 | --program-transform-nam | --program-transform-na \
1131 | --program-transform-n | --program-transform- \
1132 | --program-transform | --program-transfor \
1133 | --program-transfo | --program-transf \
1134 | --program-trans | --program-tran \
1135 | --progr-tra | --program-tr | --program-t)
1136 ac_prev=program_transform_name ;;
1137 -program-transform-name=* | --program-transform-name=* \
1138 | --program-transform-nam=* | --program-transform-na=* \
1139 | --program-transform-n=* | --program-transform-=* \
1140 | --program-transform=* | --program-transfor=* \
1141 | --program-transfo=* | --program-transf=* \
1142 | --program-trans=* | --program-tran=* \
1143 | --progr-tra=* | --program-tr=* | --program-t=*)
bec39cab 1144 program_transform_name=$ac_optarg ;;
c906108c 1145
81ecdfbb
RW
1146 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1147 ac_prev=pdfdir ;;
1148 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1149 pdfdir=$ac_optarg ;;
1150
1151 -psdir | --psdir | --psdi | --psd | --ps)
1152 ac_prev=psdir ;;
1153 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1154 psdir=$ac_optarg ;;
1155
c906108c
SS
1156 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1157 | -silent | --silent | --silen | --sile | --sil)
1158 silent=yes ;;
1159
1160 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1161 ac_prev=sbindir ;;
1162 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1163 | --sbi=* | --sb=*)
bec39cab 1164 sbindir=$ac_optarg ;;
c906108c
SS
1165
1166 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1167 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1168 | --sharedst | --shareds | --shared | --share | --shar \
1169 | --sha | --sh)
1170 ac_prev=sharedstatedir ;;
1171 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1172 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1173 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1174 | --sha=* | --sh=*)
bec39cab 1175 sharedstatedir=$ac_optarg ;;
c906108c
SS
1176
1177 -site | --site | --sit)
1178 ac_prev=site ;;
1179 -site=* | --site=* | --sit=*)
bec39cab 1180 site=$ac_optarg ;;
3ace7edb 1181
c906108c
SS
1182 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1183 ac_prev=srcdir ;;
1184 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
bec39cab 1185 srcdir=$ac_optarg ;;
c906108c
SS
1186
1187 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1188 | --syscon | --sysco | --sysc | --sys | --sy)
1189 ac_prev=sysconfdir ;;
1190 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1191 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
bec39cab 1192 sysconfdir=$ac_optarg ;;
c906108c
SS
1193
1194 -target | --target | --targe | --targ | --tar | --ta | --t)
bec39cab 1195 ac_prev=target_alias ;;
c906108c 1196 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
bec39cab 1197 target_alias=$ac_optarg ;;
c906108c
SS
1198
1199 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1200 verbose=yes ;;
1201
bec39cab
AC
1202 -version | --version | --versio | --versi | --vers | -V)
1203 ac_init_version=: ;;
c906108c
SS
1204
1205 -with-* | --with-*)
81ecdfbb 1206 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
c906108c 1207 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1208 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1209 as_fn_error "invalid package name: $ac_useropt"
1210 ac_useropt_orig=$ac_useropt
1211 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1212 case $ac_user_opts in
1213 *"
1214"with_$ac_useropt"
1215"*) ;;
1216 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1217 ac_unrecognized_sep=', ';;
b4e70030 1218 esac
81ecdfbb 1219 eval with_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1220
1221 -without-* | --without-*)
81ecdfbb 1222 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
c906108c 1223 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1224 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1225 as_fn_error "invalid package name: $ac_useropt"
1226 ac_useropt_orig=$ac_useropt
1227 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1228 case $ac_user_opts in
1229 *"
1230"with_$ac_useropt"
1231"*) ;;
1232 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1233 ac_unrecognized_sep=', ';;
1234 esac
1235 eval with_$ac_useropt=no ;;
c906108c
SS
1236
1237 --x)
1238 # Obsolete; use --with-x.
1239 with_x=yes ;;
1240
1241 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1242 | --x-incl | --x-inc | --x-in | --x-i)
1243 ac_prev=x_includes ;;
1244 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1245 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
bec39cab 1246 x_includes=$ac_optarg ;;
c906108c
SS
1247
1248 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1249 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1250 ac_prev=x_libraries ;;
1251 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1252 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
bec39cab 1253 x_libraries=$ac_optarg ;;
c906108c 1254
81ecdfbb
RW
1255 -*) as_fn_error "unrecognized option: \`$ac_option'
1256Try \`$0 --help' for more information."
c906108c
SS
1257 ;;
1258
bec39cab
AC
1259 *=*)
1260 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1261 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1262 case $ac_envvar in #(
1263 '' | [0-9]* | *[!_$as_cr_alnum]* )
1264 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1265 esac
1266 eval $ac_envvar=\$ac_optarg
bec39cab
AC
1267 export $ac_envvar ;;
1268
c906108c 1269 *)
bec39cab 1270 # FIXME: should be removed in autoconf 3.0.
81ecdfbb 1271 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
bec39cab 1272 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
81ecdfbb 1273 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
bec39cab 1274 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
c906108c
SS
1275 ;;
1276
1277 esac
1278done
1279
1280if test -n "$ac_prev"; then
bec39cab 1281 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
81ecdfbb 1282 as_fn_error "missing argument to $ac_option"
c906108c 1283fi
c906108c 1284
81ecdfbb
RW
1285if test -n "$ac_unrecognized_opts"; then
1286 case $enable_option_checking in
1287 no) ;;
1288 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
1289 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
b4e70030 1290 esac
81ecdfbb 1291fi
b4e70030 1292
81ecdfbb
RW
1293# Check all directory arguments for consistency.
1294for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1295 datadir sysconfdir sharedstatedir localstatedir includedir \
1296 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1297 libdir localedir mandir
b4e70030 1298do
81ecdfbb
RW
1299 eval ac_val=\$$ac_var
1300 # Remove trailing slashes.
1301 case $ac_val in
1302 */ )
1303 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1304 eval $ac_var=\$ac_val;;
1305 esac
1306 # Be sure to have absolute directory names.
b4e70030 1307 case $ac_val in
81ecdfbb
RW
1308 [\\/$]* | ?:[\\/]* ) continue;;
1309 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
c906108c 1310 esac
81ecdfbb 1311 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
c906108c
SS
1312done
1313
bec39cab
AC
1314# There might be people who depend on the old broken behavior: `$host'
1315# used to hold the argument of --host etc.
1316# FIXME: To remove some day.
1317build=$build_alias
1318host=$host_alias
1319target=$target_alias
1320
1321# FIXME: To remove some day.
1322if test "x$host_alias" != x; then
1323 if test "x$build_alias" = x; then
1324 cross_compiling=maybe
81ecdfbb 1325 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
bec39cab
AC
1326 If a cross compiler is detected then cross compile mode will be used." >&2
1327 elif test "x$build_alias" != "x$host_alias"; then
1328 cross_compiling=yes
1329 fi
1330fi
c906108c 1331
bec39cab
AC
1332ac_tool_prefix=
1333test -n "$host_alias" && ac_tool_prefix=$host_alias-
1334
1335test "$silent" = yes && exec 6>/dev/null
c906108c 1336
c906108c 1337
81ecdfbb
RW
1338ac_pwd=`pwd` && test -n "$ac_pwd" &&
1339ac_ls_di=`ls -di .` &&
1340ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1341 as_fn_error "working directory cannot be determined"
1342test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1343 as_fn_error "pwd does not report name of working directory"
1344
1345
c906108c
SS
1346# Find the source files, if location was not specified.
1347if test -z "$srcdir"; then
1348 ac_srcdir_defaulted=yes
81ecdfbb
RW
1349 # Try the directory containing this script, then the parent directory.
1350 ac_confdir=`$as_dirname -- "$as_myself" ||
1351$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1352 X"$as_myself" : 'X\(//\)[^/]' \| \
1353 X"$as_myself" : 'X\(//\)$' \| \
1354 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1355$as_echo X"$as_myself" |
1356 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1357 s//\1/
1358 q
1359 }
1360 /^X\(\/\/\)[^/].*/{
1361 s//\1/
1362 q
1363 }
1364 /^X\(\/\/\)$/{
1365 s//\1/
1366 q
1367 }
1368 /^X\(\/\).*/{
1369 s//\1/
1370 q
1371 }
1372 s/.*/./; q'`
c906108c 1373 srcdir=$ac_confdir
81ecdfbb 1374 if test ! -r "$srcdir/$ac_unique_file"; then
c906108c
SS
1375 srcdir=..
1376 fi
1377else
1378 ac_srcdir_defaulted=no
1379fi
81ecdfbb
RW
1380if test ! -r "$srcdir/$ac_unique_file"; then
1381 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1382 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
1383fi
1384ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1385ac_abs_confdir=`(
1386 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
1387 pwd)`
1388# When building in place, set srcdir=.
1389if test "$ac_abs_confdir" = "$ac_pwd"; then
1390 srcdir=.
1391fi
1392# Remove unnecessary trailing slashes from srcdir.
1393# Double slashes in file names in object file debugging info
1394# mess up M-x gdb in Emacs.
1395case $srcdir in
1396*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1397esac
1398for ac_var in $ac_precious_vars; do
1399 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1400 eval ac_env_${ac_var}_value=\$${ac_var}
1401 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1402 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1403done
c906108c 1404
bec39cab
AC
1405#
1406# Report the --help message.
1407#
1408if test "$ac_init_help" = "long"; then
1409 # Omit some internal or obsolete options to make the list less imposing.
1410 # This message is too long to be a string in the A/UX 3.1 sh.
1411 cat <<_ACEOF
1412\`configure' configures this package to adapt to many kinds of systems.
1413
1414Usage: $0 [OPTION]... [VAR=VALUE]...
1415
1416To assign environment variables (e.g., CC, CFLAGS...), specify them as
1417VAR=VALUE. See below for descriptions of some of the useful variables.
1418
1419Defaults for the options are specified in brackets.
1420
1421Configuration:
1422 -h, --help display this help and exit
1423 --help=short display options specific to this package
1424 --help=recursive display the short help of all the included packages
1425 -V, --version display version information and exit
1426 -q, --quiet, --silent do not print \`checking...' messages
1427 --cache-file=FILE cache test results in FILE [disabled]
1428 -C, --config-cache alias for \`--cache-file=config.cache'
1429 -n, --no-create do not create output files
1430 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1431
bec39cab
AC
1432Installation directories:
1433 --prefix=PREFIX install architecture-independent files in PREFIX
81ecdfbb 1434 [$ac_default_prefix]
bec39cab 1435 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
81ecdfbb 1436 [PREFIX]
bec39cab
AC
1437
1438By default, \`make install' will install all the files in
1439\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1440an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1441for instance \`--prefix=\$HOME'.
1442
1443For better control, use the options below.
1444
1445Fine tuning of the installation directories:
81ecdfbb
RW
1446 --bindir=DIR user executables [EPREFIX/bin]
1447 --sbindir=DIR system admin executables [EPREFIX/sbin]
1448 --libexecdir=DIR program executables [EPREFIX/libexec]
1449 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1450 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1451 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1452 --libdir=DIR object code libraries [EPREFIX/lib]
1453 --includedir=DIR C header files [PREFIX/include]
1454 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1455 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1456 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1457 --infodir=DIR info documentation [DATAROOTDIR/info]
1458 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1459 --mandir=DIR man documentation [DATAROOTDIR/man]
1460 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1461 --htmldir=DIR html documentation [DOCDIR]
1462 --dvidir=DIR dvi documentation [DOCDIR]
1463 --pdfdir=DIR pdf documentation [DOCDIR]
1464 --psdir=DIR ps documentation [DOCDIR]
bec39cab
AC
1465_ACEOF
1466
1467 cat <<\_ACEOF
1468
9009e1ae
MR
1469Program names:
1470 --program-prefix=PREFIX prepend PREFIX to installed program names
1471 --program-suffix=SUFFIX append SUFFIX to installed program names
1472 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1473
bec39cab
AC
1474X features:
1475 --x-includes=DIR X include files are in DIR
1476 --x-libraries=DIR X library files are in DIR
1477
1478System types:
1479 --build=BUILD configure for building on BUILD [guessed]
1480 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1481 --target=TARGET configure for building compilers for TARGET [HOST]
1482_ACEOF
1483fi
1484
1485if test -n "$ac_init_help"; then
1486
1487 cat <<\_ACEOF
1488
1489Optional Features:
81ecdfbb 1490 --disable-option-checking ignore unrecognized --enable/--with options
bec39cab
AC
1491 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1492 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
85981d60
AC
1493 --enable-maintainer-mode enable make rules and dependencies not useful
1494 (and sometimes confusing) to the casual installer
2974be62 1495 --enable-plugins Enable support for plugins
da2f07f1 1496 --disable-largefile omit support for large files
3bc3d82a 1497 --enable-build-with-cxx build with C++ compiler instead of C compiler
a1220294
TT
1498 --enable-targets=TARGETS
1499 alternative target configurations
c0993dbe 1500 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
bec39cab
AC
1501 --disable-gdbcli disable command-line interface (CLI)
1502 --disable-gdbmi disable machine-interface (MI)
1503 --enable-tui enable full-screen terminal user interface (TUI)
1504 --enable-gdbtk enable gdbtk graphical user interface (GUI)
1505 --enable-profiling enable profiling of GDB
3841debe 1506 --disable-rpath do not hardcode runtime library paths
17ef446e 1507 --enable-libmcheck Try linking with -lmcheck if available
a1220294 1508 --enable-werror treat compile warnings as errors
32c1c914 1509 --enable-build-warnings enable build-time compiler warnings if gcc is used
a1220294 1510 --enable-gdb-build-warnings
32c1c914 1511 enable GDB specific build-time compiler warnings if
a1220294 1512 gcc is used
32c1c914 1513 --enable-sim link gdb with simulator
bec39cab 1514 --enable-multi-ice build the multi-ice-gdb-server
496c0e1b
JB
1515 --enable-gdbserver automatically build gdbserver (yes/no/auto, default
1516 is auto)
bec39cab
AC
1517
1518Optional Packages:
1519 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1520 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
a1220294 1521 --with-separate-debug-dir=PATH
32c1c914 1522 look for global separate debug info in this path
62e4f60c 1523 [LIBDIR/debug]
b14b1491
TT
1524 --with-gdb-datadir=PATH look for global separate data files in this path
1525 [DATADIR/gdb]
29b0e8a2 1526 --with-relocated-sources=PATH
32c1c914 1527 automatically relocate this path for source files
7349ff92 1528 --with-auto-load-dir=PATH
aff139ff 1529 directories from which to load auto-loaded scripts
1564a261 1530 [$debugdir:$datadir/auto-load]
bccbefd2 1531 --with-auto-load-safe-path=PATH
aff139ff 1532 directories safe to hold auto-loaded files
7349ff92 1533 [--with-auto-load-dir]
bccbefd2
JK
1534 --without-auto-load-safe-path
1535 do not restrict auto-loaded files locations
05e7c244 1536 --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets
cb01cfba
JB
1537 --with-curses use the curses library instead of the termcap
1538 library
c16158bc
JM
1539 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
1540 --with-bugurl=URL Direct users to URL to report a bug
711a72d3 1541 --with-system-zlib use installed libz
a1220294
TT
1542 --with-libiconv-prefix=DIR
1543 search for libiconv in DIR/include and DIR/lib
478aac75 1544 --with-iconv-bin=PATH specify where to find the iconv program
6a30b0a5 1545 --with-system-readline use installed readline library
b8e0a31c
SD
1546 --with-jit-reader-dir=PATH
1547 directory to load the JIT readers from
5c39566f 1548 --with-expat include expat support (auto/yes/no)
3841debe
DJ
1549 --with-gnu-ld assume the C compiler uses GNU ld default=no
1550 --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib
1551 --without-libexpat-prefix don't search for libexpat in includedir and libdir
0c4a4063
DE
1552 --with-python[=PYTHON] include python support
1553 (auto/yes/no/<python-program>)
ed3ef339
DE
1554 --with-guile[=GUILE] include guile support
1555 (auto/yes/no/<guile-version>/<pkg-config-program>)
a1220294
TT
1556 --without-included-regex
1557 don't use included regex; this is the default on
1558 systems with version 2 of the GNU C library (use
1559 with caution on other system)
81ecdfbb 1560 --with-sysroot[=DIR] search for usr/lib et al within DIR
b14b1491 1561 --with-system-gdbinit=PATH
32c1c914 1562 automatically load a system-wide gdbinit file
608e2dbb
TT
1563 --with-lzma support lzma compression (auto/yes/no)
1564 --with-liblzma-prefix[=DIR] search for liblzma in DIR/include and DIR/lib
1565 --without-liblzma-prefix don't search for liblzma in includedir and libdir
5062cc19
KS
1566 --with-tcl directory containing tcl configuration (tclConfig.sh)
1567 --with-tk directory containing tk configuration (tkConfig.sh)
bec39cab 1568 --with-x use the X Window System
393fd4c3
YQ
1569 --with-babeltrace include babeltrace support (auto/yes/no)
1570 --with-libbabeltrace-prefix[=DIR] search for libbabeltrace in DIR/include and DIR/lib
1571 --without-libbabeltrace-prefix don't search for libbabeltrace in includedir and libdir
bec39cab
AC
1572
1573Some influential environment variables:
1574 CC C compiler command
1575 CFLAGS C compiler flags
1576 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1577 nonstandard directory <lib dir>
81ecdfbb
RW
1578 LIBS libraries to pass to the linker, e.g. -l<library>
1579 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1580 you have headers in a nonstandard directory <include dir>
3bc3d82a
PA
1581 CXX C++ compiler command
1582 CXXFLAGS C++ compiler flags
bec39cab 1583 CPP C preprocessor
f06e05e0
JK
1584 MAKEINFO Parent configure detects if it is of sufficient version.
1585 MAKEINFOFLAGS
1586 Parameters for MAKEINFO.
81ecdfbb
RW
1587 YACC The `Yet Another C Compiler' implementation to use. Defaults to
1588 the first program found out of: `bison -y', `byacc', `yacc'.
1589 YFLAGS The list of arguments that will be passed by default to $YACC.
1590 This script will default YFLAGS to the empty string to avoid a
1591 default value of `-d' given by some make applications.
1592 XMKMF Path to xmkmf, Makefile generator for X Window System
bec39cab
AC
1593
1594Use these variables to override the choices made by `configure' or to help
1595it to find libraries and programs with nonstandard names/locations.
1596
81ecdfbb 1597Report bugs to the package provider.
bec39cab 1598_ACEOF
81ecdfbb 1599ac_status=$?
bec39cab
AC
1600fi
1601
1602if test "$ac_init_help" = "recursive"; then
1603 # If there are subdirs, report their specific --help.
bec39cab 1604 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
81ecdfbb
RW
1605 test -d "$ac_dir" ||
1606 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1607 continue
bec39cab
AC
1608 ac_builddir=.
1609
81ecdfbb
RW
1610case "$ac_dir" in
1611.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1612*)
1613 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1614 # A ".." for each directory in $ac_dir_suffix.
1615 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1616 case $ac_top_builddir_sub in
1617 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1618 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1619 esac ;;
1620esac
1621ac_abs_top_builddir=$ac_pwd
1622ac_abs_builddir=$ac_pwd$ac_dir_suffix
1623# for backward compatibility:
1624ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
1625
1626case $srcdir in
81ecdfbb 1627 .) # We are building in place.
bec39cab 1628 ac_srcdir=.
81ecdfbb
RW
1629 ac_top_srcdir=$ac_top_builddir_sub
1630 ac_abs_top_srcdir=$ac_pwd ;;
1631 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 1632 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
1633 ac_top_srcdir=$srcdir
1634 ac_abs_top_srcdir=$srcdir ;;
1635 *) # Relative name.
1636 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1637 ac_top_srcdir=$ac_top_build_prefix$srcdir
1638 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 1639esac
81ecdfbb 1640ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 1641
81ecdfbb
RW
1642 cd "$ac_dir" || { ac_status=$?; continue; }
1643 # Check for guested configure.
1644 if test -f "$ac_srcdir/configure.gnu"; then
1645 echo &&
1646 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1647 elif test -f "$ac_srcdir/configure"; then
1648 echo &&
1649 $SHELL "$ac_srcdir/configure" --help=recursive
3ace7edb 1650 else
81ecdfbb
RW
1651 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1652 fi || ac_status=$?
1653 cd "$ac_pwd" || { ac_status=$?; break; }
bec39cab
AC
1654 done
1655fi
1656
81ecdfbb 1657test -n "$ac_init_help" && exit $ac_status
bec39cab
AC
1658if $ac_init_version; then
1659 cat <<\_ACEOF
81ecdfbb
RW
1660configure
1661generated by GNU Autoconf 2.64
bec39cab 1662
81ecdfbb 1663Copyright (C) 2009 Free Software Foundation, Inc.
bec39cab
AC
1664This configure script is free software; the Free Software Foundation
1665gives unlimited permission to copy, distribute and modify it.
1666_ACEOF
81ecdfbb 1667 exit
bec39cab 1668fi
bec39cab 1669
81ecdfbb
RW
1670## ------------------------ ##
1671## Autoconf initialization. ##
1672## ------------------------ ##
bec39cab 1673
81ecdfbb
RW
1674# ac_fn_c_try_compile LINENO
1675# --------------------------
1676# Try to compile conftest.$ac_ext, and return whether this succeeded.
1677ac_fn_c_try_compile ()
1678{
1679 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1680 rm -f conftest.$ac_objext
1681 if { { ac_try="$ac_compile"
1682case "(($ac_try" in
1683 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1684 *) ac_try_echo=$ac_try;;
1685esac
1686eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1687$as_echo "$ac_try_echo"; } >&5
1688 (eval "$ac_compile") 2>conftest.err
1689 ac_status=$?
1690 if test -s conftest.err; then
1691 grep -v '^ *+' conftest.err >conftest.er1
1692 cat conftest.er1 >&5
1693 mv -f conftest.er1 conftest.err
1694 fi
1695 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1696 test $ac_status = 0; } && {
1697 test -z "$ac_c_werror_flag" ||
1698 test ! -s conftest.err
1699 } && test -s conftest.$ac_objext; then :
1700 ac_retval=0
1701else
1702 $as_echo "$as_me: failed program was:" >&5
1703sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1704
81ecdfbb
RW
1705 ac_retval=1
1706fi
1707 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1708 return $ac_retval
1709
1710} # ac_fn_c_try_compile
1711
3bc3d82a
PA
1712# ac_fn_cxx_try_compile LINENO
1713# ----------------------------
1714# Try to compile conftest.$ac_ext, and return whether this succeeded.
1715ac_fn_cxx_try_compile ()
1716{
1717 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1718 rm -f conftest.$ac_objext
1719 if { { ac_try="$ac_compile"
1720case "(($ac_try" in
1721 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1722 *) ac_try_echo=$ac_try;;
1723esac
1724eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1725$as_echo "$ac_try_echo"; } >&5
1726 (eval "$ac_compile") 2>conftest.err
1727 ac_status=$?
1728 if test -s conftest.err; then
1729 grep -v '^ *+' conftest.err >conftest.er1
1730 cat conftest.er1 >&5
1731 mv -f conftest.er1 conftest.err
1732 fi
1733 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1734 test $ac_status = 0; } && {
1735 test -z "$ac_cxx_werror_flag" ||
1736 test ! -s conftest.err
1737 } && test -s conftest.$ac_objext; then :
1738 ac_retval=0
1739else
1740 $as_echo "$as_me: failed program was:" >&5
1741sed 's/^/| /' conftest.$ac_ext >&5
1742
1743 ac_retval=1
1744fi
1745 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1746 return $ac_retval
1747
1748} # ac_fn_cxx_try_compile
1749
81ecdfbb
RW
1750# ac_fn_c_try_cpp LINENO
1751# ----------------------
1752# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1753ac_fn_c_try_cpp ()
bec39cab 1754{
81ecdfbb
RW
1755 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1756 if { { ac_try="$ac_cpp conftest.$ac_ext"
1757case "(($ac_try" in
1758 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1759 *) ac_try_echo=$ac_try;;
1760esac
1761eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1762$as_echo "$ac_try_echo"; } >&5
1763 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1764 ac_status=$?
1765 if test -s conftest.err; then
1766 grep -v '^ *+' conftest.err >conftest.er1
1767 cat conftest.er1 >&5
1768 mv -f conftest.er1 conftest.err
1769 fi
1770 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1771 test $ac_status = 0; } >/dev/null && {
1772 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1773 test ! -s conftest.err
1774 }; then :
1775 ac_retval=0
1776else
1777 $as_echo "$as_me: failed program was:" >&5
1778sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1779
81ecdfbb
RW
1780 ac_retval=1
1781fi
1782 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1783 return $ac_retval
bec39cab 1784
81ecdfbb 1785} # ac_fn_c_try_cpp
bec39cab 1786
81ecdfbb
RW
1787# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1788# -------------------------------------------------------
1789# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1790# the include files in INCLUDES and setting the cache variable VAR
1791# accordingly.
1792ac_fn_c_check_header_mongrel ()
1793{
1794 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1795 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1796 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1797$as_echo_n "checking for $2... " >&6; }
1798if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1799 $as_echo_n "(cached) " >&6
1800fi
1801eval ac_res=\$$3
1802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1803$as_echo "$ac_res" >&6; }
1804else
1805 # Is the header compilable?
1806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1807$as_echo_n "checking $2 usability... " >&6; }
1808cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1809/* end confdefs.h. */
1810$4
1811#include <$2>
1812_ACEOF
1813if ac_fn_c_try_compile "$LINENO"; then :
1814 ac_header_compiler=yes
1815else
1816 ac_header_compiler=no
1817fi
1818rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1819{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1820$as_echo "$ac_header_compiler" >&6; }
bec39cab 1821
81ecdfbb
RW
1822# Is the header present?
1823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1824$as_echo_n "checking $2 presence... " >&6; }
1825cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1826/* end confdefs.h. */
1827#include <$2>
1828_ACEOF
1829if ac_fn_c_try_cpp "$LINENO"; then :
1830 ac_header_preproc=yes
1831else
1832 ac_header_preproc=no
1833fi
1834rm -f conftest.err conftest.$ac_ext
1835{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1836$as_echo "$ac_header_preproc" >&6; }
bec39cab 1837
81ecdfbb
RW
1838# So? What about this header?
1839case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1840 yes:no: )
1841 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1842$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1843 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1844$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1845 ;;
1846 no:yes:* )
1847 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1848$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1849 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1850$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1851 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1852$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1853 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1854$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1855 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1856$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1857 ;;
1858esac
1859 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1860$as_echo_n "checking for $2... " >&6; }
1861if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1862 $as_echo_n "(cached) " >&6
1863else
1864 eval "$3=\$ac_header_compiler"
1865fi
1866eval ac_res=\$$3
1867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1868$as_echo "$ac_res" >&6; }
1869fi
1870 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 1871
81ecdfbb 1872} # ac_fn_c_check_header_mongrel
bec39cab 1873
81ecdfbb
RW
1874# ac_fn_c_try_run LINENO
1875# ----------------------
1876# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1877# that executables *can* be run.
1878ac_fn_c_try_run ()
1879{
1880 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1881 if { { ac_try="$ac_link"
1882case "(($ac_try" in
1883 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1884 *) ac_try_echo=$ac_try;;
1885esac
1886eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1887$as_echo "$ac_try_echo"; } >&5
1888 (eval "$ac_link") 2>&5
1889 ac_status=$?
1890 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1891 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1892 { { case "(($ac_try" in
1893 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1894 *) ac_try_echo=$ac_try;;
1895esac
1896eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1897$as_echo "$ac_try_echo"; } >&5
1898 (eval "$ac_try") 2>&5
1899 ac_status=$?
1900 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1901 test $ac_status = 0; }; }; then :
1902 ac_retval=0
1903else
1904 $as_echo "$as_me: program exited with status $ac_status" >&5
1905 $as_echo "$as_me: failed program was:" >&5
1906sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1907
81ecdfbb
RW
1908 ac_retval=$ac_status
1909fi
1910 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1911 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1912 return $ac_retval
bec39cab 1913
81ecdfbb 1914} # ac_fn_c_try_run
bec39cab 1915
81ecdfbb
RW
1916# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1917# -------------------------------------------------------
1918# Tests whether HEADER exists and can be compiled using the include files in
1919# INCLUDES, setting the cache variable VAR accordingly.
1920ac_fn_c_check_header_compile ()
1921{
1922 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1924$as_echo_n "checking for $2... " >&6; }
1925if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1926 $as_echo_n "(cached) " >&6
1927else
1928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1929/* end confdefs.h. */
1930$4
1931#include <$2>
bec39cab 1932_ACEOF
81ecdfbb
RW
1933if ac_fn_c_try_compile "$LINENO"; then :
1934 eval "$3=yes"
1935else
1936 eval "$3=no"
1937fi
1938rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1939fi
1940eval ac_res=\$$3
1941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1942$as_echo "$ac_res" >&6; }
1943 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 1944
81ecdfbb 1945} # ac_fn_c_check_header_compile
bec39cab 1946
2974be62
AM
1947# ac_fn_c_try_link LINENO
1948# -----------------------
1949# Try to link conftest.$ac_ext, and return whether this succeeded.
1950ac_fn_c_try_link ()
1951{
1952 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1953 rm -f conftest.$ac_objext conftest$ac_exeext
1954 if { { ac_try="$ac_link"
1955case "(($ac_try" in
1956 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1957 *) ac_try_echo=$ac_try;;
1958esac
1959eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1960$as_echo "$ac_try_echo"; } >&5
1961 (eval "$ac_link") 2>conftest.err
1962 ac_status=$?
1963 if test -s conftest.err; then
1964 grep -v '^ *+' conftest.err >conftest.er1
1965 cat conftest.er1 >&5
1966 mv -f conftest.er1 conftest.err
1967 fi
1968 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1969 test $ac_status = 0; } && {
1970 test -z "$ac_c_werror_flag" ||
1971 test ! -s conftest.err
1972 } && test -s conftest$ac_exeext && {
1973 test "$cross_compiling" = yes ||
1974 $as_test_x conftest$ac_exeext
1975 }; then :
1976 ac_retval=0
1977else
1978 $as_echo "$as_me: failed program was:" >&5
1979sed 's/^/| /' conftest.$ac_ext >&5
1980
1981 ac_retval=1
1982fi
1983 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1984 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1985 # interfere with the next link command; also delete a directory that is
1986 # left behind by Apple's compiler. We do this before executing the actions.
1987 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1988 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1989 return $ac_retval
1990
1991} # ac_fn_c_try_link
1992
81ecdfbb
RW
1993# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1994# --------------------------------------------
1995# Tries to find the compile-time value of EXPR in a program that includes
1996# INCLUDES, setting VAR accordingly. Returns whether the value could be
1997# computed
1998ac_fn_c_compute_int ()
1999{
2000 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2001 if test "$cross_compiling" = yes; then
2002 # Depending upon the size, compute the lo and hi bounds.
2003cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2004/* end confdefs.h. */
2005$4
2006int
2007main ()
2008{
2009static int test_array [1 - 2 * !(($2) >= 0)];
2010test_array [0] = 0
bec39cab 2011
81ecdfbb
RW
2012 ;
2013 return 0;
2014}
2015_ACEOF
2016if ac_fn_c_try_compile "$LINENO"; then :
2017 ac_lo=0 ac_mid=0
2018 while :; do
2019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2020/* end confdefs.h. */
2021$4
2022int
2023main ()
2024{
2025static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2026test_array [0] = 0
bec39cab 2027
81ecdfbb
RW
2028 ;
2029 return 0;
2030}
2031_ACEOF
2032if ac_fn_c_try_compile "$LINENO"; then :
2033 ac_hi=$ac_mid; break
2034else
2035 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2036 if test $ac_lo -le $ac_mid; then
2037 ac_lo= ac_hi=
2038 break
2039 fi
2040 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
c906108c 2041fi
81ecdfbb
RW
2042rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2043 done
c906108c 2044else
81ecdfbb
RW
2045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2046/* end confdefs.h. */
2047$4
2048int
2049main ()
2050{
2051static int test_array [1 - 2 * !(($2) < 0)];
2052test_array [0] = 0
bec39cab 2053
81ecdfbb
RW
2054 ;
2055 return 0;
2056}
2057_ACEOF
2058if ac_fn_c_try_compile "$LINENO"; then :
2059 ac_hi=-1 ac_mid=-1
2060 while :; do
2061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2062/* end confdefs.h. */
2063$4
2064int
2065main ()
2066{
2067static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2068test_array [0] = 0
bec39cab 2069
81ecdfbb
RW
2070 ;
2071 return 0;
2072}
2073_ACEOF
2074if ac_fn_c_try_compile "$LINENO"; then :
2075 ac_lo=$ac_mid; break
2076else
2077 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2078 if test $ac_mid -le $ac_hi; then
2079 ac_lo= ac_hi=
2080 break
2081 fi
2082 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2083fi
2084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2085 done
2086else
2087 ac_lo= ac_hi=
2088fi
2089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2090fi
2091rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2092# Binary search between lo and hi bounds.
2093while test "x$ac_lo" != "x$ac_hi"; do
2094 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2096/* end confdefs.h. */
2097$4
2098int
2099main ()
2100{
2101static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2102test_array [0] = 0
bec39cab 2103
81ecdfbb
RW
2104 ;
2105 return 0;
2106}
2107_ACEOF
2108if ac_fn_c_try_compile "$LINENO"; then :
2109 ac_hi=$ac_mid
2110else
2111 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2112fi
2113rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2114done
2115case $ac_lo in #((
2116?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2117'') ac_retval=1 ;;
2118esac
2119 else
2120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2121/* end confdefs.h. */
2122$4
2123static long int longval () { return $2; }
2124static unsigned long int ulongval () { return $2; }
2125#include <stdio.h>
2126#include <stdlib.h>
2127int
2128main ()
2129{
bec39cab 2130
81ecdfbb
RW
2131 FILE *f = fopen ("conftest.val", "w");
2132 if (! f)
2133 return 1;
2134 if (($2) < 0)
2135 {
2136 long int i = longval ();
2137 if (i != ($2))
2138 return 1;
2139 fprintf (f, "%ld", i);
2140 }
2141 else
2142 {
2143 unsigned long int i = ulongval ();
2144 if (i != ($2))
2145 return 1;
2146 fprintf (f, "%lu", i);
2147 }
2148 /* Do not output a trailing newline, as this causes \r\n confusion
2149 on some platforms. */
2150 return ferror (f) || fclose (f) != 0;
bec39cab 2151
81ecdfbb
RW
2152 ;
2153 return 0;
2154}
2155_ACEOF
2156if ac_fn_c_try_run "$LINENO"; then :
2157 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2158else
2159 ac_retval=1
2160fi
2161rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2162 conftest.$ac_objext conftest.beam conftest.$ac_ext
2163rm -f conftest.val
bec39cab 2164
81ecdfbb
RW
2165 fi
2166 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2167 return $ac_retval
bec39cab 2168
81ecdfbb 2169} # ac_fn_c_compute_int
bec39cab 2170
55a8c076
YQ
2171# ac_fn_c_check_func LINENO FUNC VAR
2172# ----------------------------------
2173# Tests whether FUNC exists, setting the cache variable VAR accordingly
2174ac_fn_c_check_func ()
81ecdfbb
RW
2175{
2176 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2177 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2178$as_echo_n "checking for $2... " >&6; }
2179if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2180 $as_echo_n "(cached) " >&6
2181else
81ecdfbb
RW
2182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2183/* end confdefs.h. */
55a8c076
YQ
2184/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2185 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2186#define $2 innocuous_$2
2187
2188/* System header to define __stub macros and hopefully few prototypes,
2189 which can conflict with char $2 (); below.
2190 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2191 <limits.h> exists even on freestanding compilers. */
2192
2193#ifdef __STDC__
2194# include <limits.h>
2195#else
2196# include <assert.h>
2197#endif
2198
2199#undef $2
2200
2201/* Override any GCC internal prototype to avoid an error.
2202 Use char because int might match the return type of a GCC
2203 builtin and then its argument prototype would still apply. */
2204#ifdef __cplusplus
2205extern "C"
2206#endif
2207char $2 ();
2208/* The GNU C library defines this for functions which it implements
2209 to always fail with ENOSYS. Some functions are actually named
2210 something starting with __ and the normal name is an alias. */
2211#if defined __stub_$2 || defined __stub___$2
2212choke me
2213#endif
2214
2215int
2216main ()
2217{
2218return $2 ();
2219 ;
2220 return 0;
2221}
2222_ACEOF
2223if ac_fn_c_try_link "$LINENO"; then :
2224 eval "$3=yes"
2225else
2226 eval "$3=no"
2227fi
2228rm -f core conftest.err conftest.$ac_objext \
2229 conftest$ac_exeext conftest.$ac_ext
2230fi
2231eval ac_res=\$$3
2232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2233$as_echo "$ac_res" >&6; }
2234 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2235
2236} # ac_fn_c_check_func
2237
07697489
PA
2238# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2239# -------------------------------------------
2240# Tests whether TYPE exists after having included INCLUDES, setting cache
2241# variable VAR accordingly.
2242ac_fn_c_check_type ()
2243{
2244 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2246$as_echo_n "checking for $2... " >&6; }
2247if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2248 $as_echo_n "(cached) " >&6
2249else
2250 eval "$3=no"
2251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2252/* end confdefs.h. */
2253$4
2254int
2255main ()
2256{
2257if (sizeof ($2))
2258 return 0;
2259 ;
2260 return 0;
2261}
2262_ACEOF
2263if ac_fn_c_try_compile "$LINENO"; then :
2264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2265/* end confdefs.h. */
2266$4
2267int
2268main ()
2269{
2270if (sizeof (($2)))
2271 return 0;
2272 ;
2273 return 0;
2274}
2275_ACEOF
2276if ac_fn_c_try_compile "$LINENO"; then :
2277
2278else
2279 eval "$3=yes"
2280fi
2281rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2282fi
2283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2284fi
2285eval ac_res=\$$3
2286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2287$as_echo "$ac_res" >&6; }
2288 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2289
2290} # ac_fn_c_check_type
2291
770d76d7
PA
2292# ac_fn_c_check_decl LINENO SYMBOL VAR
2293# ------------------------------------
2294# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2295ac_fn_c_check_decl ()
2296{
2297 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2298 as_decl_name=`echo $2|sed 's/ *(.*//'`
2299 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2301$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2302if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2303 $as_echo_n "(cached) " >&6
2304else
2305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2306/* end confdefs.h. */
2307$4
2308int
2309main ()
2310{
2311#ifndef $as_decl_name
2312#ifdef __cplusplus
2313 (void) $as_decl_use;
2314#else
2315 (void) $as_decl_name;
2316#endif
2317#endif
2318
2319 ;
2320 return 0;
2321}
2322_ACEOF
2323if ac_fn_c_try_compile "$LINENO"; then :
2324 eval "$3=yes"
2325else
2326 eval "$3=no"
2327fi
2328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2329fi
2330eval ac_res=\$$3
2331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2332$as_echo "$ac_res" >&6; }
2333 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2334
2335} # ac_fn_c_check_decl
2336
55a8c076
YQ
2337# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2338# ----------------------------------------------------
2339# Tries to find if the field MEMBER exists in type AGGR, after including
2340# INCLUDES, setting cache variable VAR accordingly.
2341ac_fn_c_check_member ()
2342{
2343 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2344 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2345$as_echo_n "checking for $2.$3... " >&6; }
2346if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
2347 $as_echo_n "(cached) " >&6
2348else
2349 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2350/* end confdefs.h. */
2351$5
2352int
2353main ()
2354{
2355static $2 ac_aggr;
2356if (ac_aggr.$3)
2357return 0;
2358 ;
2359 return 0;
2360}
2361_ACEOF
2362if ac_fn_c_try_compile "$LINENO"; then :
2363 eval "$4=yes"
2364else
2365 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2366/* end confdefs.h. */
2367$5
2368int
2369main ()
2370{
2371static $2 ac_aggr;
2372if (sizeof ac_aggr.$3)
2373return 0;
2374 ;
2375 return 0;
2376}
2377_ACEOF
2378if ac_fn_c_try_compile "$LINENO"; then :
2379 eval "$4=yes"
2380else
2381 eval "$4=no"
2382fi
2383rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2384fi
2385rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2386fi
2387eval ac_res=\$$4
2388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2389$as_echo "$ac_res" >&6; }
2390 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2391
2392} # ac_fn_c_check_member
81ecdfbb
RW
2393cat >config.log <<_ACEOF
2394This file contains any messages produced by compilers while
2395running configure, to aid debugging if configure makes a mistake.
d5af19ba 2396
81ecdfbb
RW
2397It was created by $as_me, which was
2398generated by GNU Autoconf 2.64. Invocation command line was
b4e70030 2399
81ecdfbb 2400 $ $0 $@
413ccac7 2401
81ecdfbb
RW
2402_ACEOF
2403exec 5>>config.log
2404{
2405cat <<_ASUNAME
2406## --------- ##
2407## Platform. ##
2408## --------- ##
413ccac7 2409
81ecdfbb
RW
2410hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2411uname -m = `(uname -m) 2>/dev/null || echo unknown`
2412uname -r = `(uname -r) 2>/dev/null || echo unknown`
2413uname -s = `(uname -s) 2>/dev/null || echo unknown`
2414uname -v = `(uname -v) 2>/dev/null || echo unknown`
85981d60 2415
81ecdfbb
RW
2416/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2417/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
413ccac7 2418
81ecdfbb
RW
2419/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2420/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2421/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2422/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2423/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2424/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2425/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
c906108c 2426
81ecdfbb 2427_ASUNAME
bec39cab 2428
bec39cab
AC
2429as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2430for as_dir in $PATH
2431do
2432 IFS=$as_save_IFS
2433 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2434 $as_echo "PATH: $as_dir"
2435 done
2436IFS=$as_save_IFS
bec39cab 2437
81ecdfbb 2438} >&5
bec39cab 2439
81ecdfbb 2440cat >&5 <<_ACEOF
bec39cab 2441
bec39cab 2442
81ecdfbb
RW
2443## ----------- ##
2444## Core tests. ##
2445## ----------- ##
2446
2447_ACEOF
2448
2449
2450# Keep a trace of the command line.
2451# Strip out --no-create and --no-recursion so they do not pile up.
2452# Strip out --silent because we don't want to record it for future runs.
2453# Also quote any args containing shell meta-characters.
2454# Make two passes to allow for proper duplicate-argument suppression.
2455ac_configure_args=
2456ac_configure_args0=
2457ac_configure_args1=
2458ac_must_keep_next=false
2459for ac_pass in 1 2
2460do
2461 for ac_arg
2462 do
2463 case $ac_arg in
2464 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2465 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2466 | -silent | --silent | --silen | --sile | --sil)
2467 continue ;;
2468 *\'*)
2469 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2470 esac
2471 case $ac_pass in
2472 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2473 2)
2474 as_fn_append ac_configure_args1 " '$ac_arg'"
2475 if test $ac_must_keep_next = true; then
2476 ac_must_keep_next=false # Got value, back to normal.
2477 else
2478 case $ac_arg in
2479 *=* | --config-cache | -C | -disable-* | --disable-* \
2480 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2481 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2482 | -with-* | --with-* | -without-* | --without-* | --x)
2483 case "$ac_configure_args0 " in
2484 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2485 esac
2486 ;;
2487 -* ) ac_must_keep_next=true ;;
2488 esac
2489 fi
2490 as_fn_append ac_configure_args " '$ac_arg'"
2491 ;;
2492 esac
2493 done
2494done
2495{ ac_configure_args0=; unset ac_configure_args0;}
2496{ ac_configure_args1=; unset ac_configure_args1;}
2497
2498# When interrupted or exit'd, cleanup temporary files, and complete
2499# config.log. We remove comments because anyway the quotes in there
2500# would cause problems or look ugly.
2501# WARNING: Use '\'' to represent an apostrophe within the trap.
2502# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2503trap 'exit_status=$?
2504 # Save into config.log some information that might help in debugging.
2505 {
2506 echo
2507
2508 cat <<\_ASBOX
2509## ---------------- ##
2510## Cache variables. ##
2511## ---------------- ##
2512_ASBOX
2513 echo
2514 # The following way of writing the cache mishandles newlines in values,
2515(
2516 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2517 eval ac_val=\$$ac_var
2518 case $ac_val in #(
2519 *${as_nl}*)
2520 case $ac_var in #(
2521 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2522$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2523 esac
2524 case $ac_var in #(
2525 _ | IFS | as_nl) ;; #(
2526 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2527 *) { eval $ac_var=; unset $ac_var;} ;;
2528 esac ;;
2529 esac
2530 done
2531 (set) 2>&1 |
2532 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2533 *${as_nl}ac_space=\ *)
2534 sed -n \
2535 "s/'\''/'\''\\\\'\'''\''/g;
2536 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2537 ;; #(
2538 *)
2539 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2540 ;;
2541 esac |
2542 sort
2543)
2544 echo
2545
2546 cat <<\_ASBOX
2547## ----------------- ##
2548## Output variables. ##
2549## ----------------- ##
2550_ASBOX
2551 echo
2552 for ac_var in $ac_subst_vars
2553 do
2554 eval ac_val=\$$ac_var
2555 case $ac_val in
2556 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2557 esac
2558 $as_echo "$ac_var='\''$ac_val'\''"
2559 done | sort
2560 echo
2561
2562 if test -n "$ac_subst_files"; then
2563 cat <<\_ASBOX
2564## ------------------- ##
2565## File substitutions. ##
2566## ------------------- ##
2567_ASBOX
2568 echo
2569 for ac_var in $ac_subst_files
2570 do
2571 eval ac_val=\$$ac_var
2572 case $ac_val in
2573 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2574 esac
2575 $as_echo "$ac_var='\''$ac_val'\''"
2576 done | sort
2577 echo
2578 fi
2579
2580 if test -s confdefs.h; then
2581 cat <<\_ASBOX
2582## ----------- ##
2583## confdefs.h. ##
2584## ----------- ##
2585_ASBOX
2586 echo
2587 cat confdefs.h
2588 echo
2589 fi
2590 test "$ac_signal" != 0 &&
2591 $as_echo "$as_me: caught signal $ac_signal"
2592 $as_echo "$as_me: exit $exit_status"
2593 } >&5
2594 rm -f core *.core core.conftest.* &&
2595 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2596 exit $exit_status
2597' 0
2598for ac_signal in 1 2 13 15; do
2599 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2600done
2601ac_signal=0
2602
2603# confdefs.h avoids OS command line length limits that DEFS can exceed.
2604rm -f -r conftest* confdefs.h
2605
2606$as_echo "/* confdefs.h */" > confdefs.h
2607
2608# Predefined preprocessor variables.
2609
2610cat >>confdefs.h <<_ACEOF
2611#define PACKAGE_NAME "$PACKAGE_NAME"
2612_ACEOF
2613
2614cat >>confdefs.h <<_ACEOF
2615#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2616_ACEOF
2617
2618cat >>confdefs.h <<_ACEOF
2619#define PACKAGE_VERSION "$PACKAGE_VERSION"
2620_ACEOF
2621
2622cat >>confdefs.h <<_ACEOF
2623#define PACKAGE_STRING "$PACKAGE_STRING"
2624_ACEOF
2625
2626cat >>confdefs.h <<_ACEOF
2627#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2628_ACEOF
2629
2630cat >>confdefs.h <<_ACEOF
2631#define PACKAGE_URL "$PACKAGE_URL"
2632_ACEOF
2633
2634
2635# Let the site file select an alternate cache file if it wants to.
2636# Prefer an explicitly selected file to automatically selected ones.
2637ac_site_file1=NONE
2638ac_site_file2=NONE
2639if test -n "$CONFIG_SITE"; then
2640 ac_site_file1=$CONFIG_SITE
2641elif test "x$prefix" != xNONE; then
2642 ac_site_file1=$prefix/share/config.site
2643 ac_site_file2=$prefix/etc/config.site
2644else
2645 ac_site_file1=$ac_default_prefix/share/config.site
2646 ac_site_file2=$ac_default_prefix/etc/config.site
2647fi
2648for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2649do
2650 test "x$ac_site_file" = xNONE && continue
2651 if test -r "$ac_site_file"; then
2652 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2653$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2654 sed 's/^/| /' "$ac_site_file" >&5
2655 . "$ac_site_file"
2656 fi
2657done
2658
2659if test -r "$cache_file"; then
2660 # Some versions of bash will fail to source /dev/null (special
2661 # files actually), so we avoid doing that.
2662 if test -f "$cache_file"; then
2663 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2664$as_echo "$as_me: loading cache $cache_file" >&6;}
2665 case $cache_file in
2666 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2667 *) . "./$cache_file";;
2668 esac
2669 fi
2670else
2671 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2672$as_echo "$as_me: creating cache $cache_file" >&6;}
2673 >$cache_file
bec39cab
AC
2674fi
2675
81ecdfbb
RW
2676# Check that the precious variables saved in the cache have kept the same
2677# value.
2678ac_cache_corrupted=false
2679for ac_var in $ac_precious_vars; do
2680 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2681 eval ac_new_set=\$ac_env_${ac_var}_set
2682 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2683 eval ac_new_val=\$ac_env_${ac_var}_value
2684 case $ac_old_set,$ac_new_set in
2685 set,)
2686 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2687$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2688 ac_cache_corrupted=: ;;
2689 ,set)
2690 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2691$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2692 ac_cache_corrupted=: ;;
2693 ,);;
2694 *)
2695 if test "x$ac_old_val" != "x$ac_new_val"; then
2696 # differences in whitespace do not lead to failure.
2697 ac_old_val_w=`echo x $ac_old_val`
2698 ac_new_val_w=`echo x $ac_new_val`
2699 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2700 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2701$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2702 ac_cache_corrupted=:
2703 else
2704 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2705$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2706 eval $ac_var=\$ac_old_val
2707 fi
2708 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2709$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2710 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2711$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2712 fi;;
2713 esac
2714 # Pass precious variables to config.status.
2715 if test "$ac_new_set" = set; then
2716 case $ac_new_val in
2717 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2718 *) ac_arg=$ac_var=$ac_new_val ;;
2719 esac
2720 case " $ac_configure_args " in
2721 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2722 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2723 esac
2724 fi
2725done
2726if $ac_cache_corrupted; then
2727 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2728$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2729 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2730$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2731 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2732fi
2733## -------------------- ##
2734## Main body of script. ##
2735## -------------------- ##
2736
2737ac_ext=c
2738ac_cpp='$CPP $CPPFLAGS'
2739ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2740ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2741ac_compiler_gnu=$ac_cv_c_compiler_gnu
2742
2743
2744
2745
2746
2747ac_config_headers="$ac_config_headers config.h:config.in"
2748
2749
2750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2751$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2752 # Check whether --enable-maintainer-mode was given.
2753if test "${enable_maintainer_mode+set}" = set; then :
2754 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2755else
2756 USE_MAINTAINER_MODE=no
2757fi
2758
2759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
2760$as_echo "$USE_MAINTAINER_MODE" >&6; }
2761 if test $USE_MAINTAINER_MODE = yes; then
2762 MAINTAINER_MODE_TRUE=
2763 MAINTAINER_MODE_FALSE='#'
2764else
2765 MAINTAINER_MODE_TRUE='#'
2766 MAINTAINER_MODE_FALSE=
2767fi
2768
2769 MAINT=$MAINTAINER_MODE_TRUE
2770
2771
2772
17ef446e 2773# Set the 'development' global.
270c9937 2774. $srcdir/../bfd/development.sh
f5f1cdb6 2775
81ecdfbb
RW
2776ac_ext=c
2777ac_cpp='$CPP $CPPFLAGS'
2778ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2779ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2780ac_compiler_gnu=$ac_cv_c_compiler_gnu
2781if test -n "$ac_tool_prefix"; then
2782 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2783set dummy ${ac_tool_prefix}gcc; ac_word=$2
2784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2785$as_echo_n "checking for $ac_word... " >&6; }
2786if test "${ac_cv_prog_CC+set}" = set; then :
2787 $as_echo_n "(cached) " >&6
c906108c
SS
2788else
2789 if test -n "$CC"; then
2790 ac_cv_prog_CC="$CC" # Let the user override the test.
2791else
bec39cab
AC
2792as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2793for as_dir in $PATH
2794do
2795 IFS=$as_save_IFS
2796 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2797 for ac_exec_ext in '' $ac_executable_extensions; do
2798 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2799 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2800 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2801 break 2
2802 fi
2803done
81ecdfbb
RW
2804 done
2805IFS=$as_save_IFS
bec39cab 2806
c906108c
SS
2807fi
2808fi
bec39cab 2809CC=$ac_cv_prog_CC
c906108c 2810if test -n "$CC"; then
81ecdfbb
RW
2811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2812$as_echo "$CC" >&6; }
c906108c 2813else
81ecdfbb
RW
2814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2815$as_echo "no" >&6; }
c906108c
SS
2816fi
2817
81ecdfbb 2818
b4e70030
JB
2819fi
2820if test -z "$ac_cv_prog_CC"; then
2821 ac_ct_CC=$CC
81ecdfbb
RW
2822 # Extract the first word of "gcc", so it can be a program name with args.
2823set dummy gcc; ac_word=$2
2824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2825$as_echo_n "checking for $ac_word... " >&6; }
2826if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
2827 $as_echo_n "(cached) " >&6
b4e70030
JB
2828else
2829 if test -n "$ac_ct_CC"; then
2830 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2831else
2832as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2833for as_dir in $PATH
2834do
2835 IFS=$as_save_IFS
2836 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2837 for ac_exec_ext in '' $ac_executable_extensions; do
2838 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2839 ac_cv_prog_ac_ct_CC="gcc"
2840 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b4e70030 2841 break 2
4e8d927d 2842 fi
b4e70030 2843done
81ecdfbb
RW
2844 done
2845IFS=$as_save_IFS
b4e70030
JB
2846
2847fi
2848fi
2849ac_ct_CC=$ac_cv_prog_ac_ct_CC
2850if test -n "$ac_ct_CC"; then
81ecdfbb
RW
2851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2852$as_echo "$ac_ct_CC" >&6; }
b4e70030 2853else
81ecdfbb
RW
2854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2855$as_echo "no" >&6; }
b4e70030
JB
2856fi
2857
81ecdfbb
RW
2858 if test "x$ac_ct_CC" = x; then
2859 CC=""
2860 else
2861 case $cross_compiling:$ac_tool_warned in
2862yes:)
2863{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2864$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2865ac_tool_warned=yes ;;
2866esac
2867 CC=$ac_ct_CC
2868 fi
b4e70030
JB
2869else
2870 CC="$ac_cv_prog_CC"
2871fi
2872
c906108c 2873if test -z "$CC"; then
81ecdfbb
RW
2874 if test -n "$ac_tool_prefix"; then
2875 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2876set dummy ${ac_tool_prefix}cc; ac_word=$2
2877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2878$as_echo_n "checking for $ac_word... " >&6; }
2879if test "${ac_cv_prog_CC+set}" = set; then :
2880 $as_echo_n "(cached) " >&6
c906108c
SS
2881else
2882 if test -n "$CC"; then
2883 ac_cv_prog_CC="$CC" # Let the user override the test.
2884else
bec39cab
AC
2885as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2886for as_dir in $PATH
2887do
2888 IFS=$as_save_IFS
2889 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2890 for ac_exec_ext in '' $ac_executable_extensions; do
2891 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2892 ac_cv_prog_CC="${ac_tool_prefix}cc"
2893 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2894 break 2
2895 fi
2896done
81ecdfbb
RW
2897 done
2898IFS=$as_save_IFS
2899
2900fi
2901fi
2902CC=$ac_cv_prog_CC
2903if test -n "$CC"; then
2904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2905$as_echo "$CC" >&6; }
2906else
2907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2908$as_echo "no" >&6; }
2909fi
2910
2911
2912 fi
2913fi
2914if test -z "$CC"; then
2915 # Extract the first word of "cc", so it can be a program name with args.
2916set dummy cc; ac_word=$2
2917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2918$as_echo_n "checking for $ac_word... " >&6; }
2919if test "${ac_cv_prog_CC+set}" = set; then :
2920 $as_echo_n "(cached) " >&6
2921else
2922 if test -n "$CC"; then
2923 ac_cv_prog_CC="$CC" # Let the user override the test.
2924else
2925 ac_prog_rejected=no
2926as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2927for as_dir in $PATH
2928do
2929 IFS=$as_save_IFS
2930 test -z "$as_dir" && as_dir=.
2931 for ac_exec_ext in '' $ac_executable_extensions; do
2932 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2933 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2934 ac_prog_rejected=yes
2935 continue
2936 fi
2937 ac_cv_prog_CC="cc"
2938 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2939 break 2
2940 fi
2941done
2942 done
2943IFS=$as_save_IFS
bec39cab 2944
c906108c
SS
2945if test $ac_prog_rejected = yes; then
2946 # We found a bogon in the path, so make sure we never use it.
2947 set dummy $ac_cv_prog_CC
2948 shift
bec39cab 2949 if test $# != 0; then
c906108c
SS
2950 # We chose a different compiler from the bogus one.
2951 # However, it has the same basename, so the bogon will be chosen
2952 # first if we set CC to just the basename; use the full file name.
2953 shift
bec39cab 2954 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
c906108c
SS
2955 fi
2956fi
2957fi
2958fi
bec39cab 2959CC=$ac_cv_prog_CC
c906108c 2960if test -n "$CC"; then
81ecdfbb
RW
2961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2962$as_echo "$CC" >&6; }
c906108c 2963else
81ecdfbb
RW
2964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2965$as_echo "no" >&6; }
c906108c
SS
2966fi
2967
81ecdfbb 2968
bec39cab
AC
2969fi
2970if test -z "$CC"; then
2971 if test -n "$ac_tool_prefix"; then
81ecdfbb 2972 for ac_prog in cl.exe
bec39cab
AC
2973 do
2974 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2975set dummy $ac_tool_prefix$ac_prog; ac_word=$2
81ecdfbb
RW
2976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2977$as_echo_n "checking for $ac_word... " >&6; }
2978if test "${ac_cv_prog_CC+set}" = set; then :
2979 $as_echo_n "(cached) " >&6
c906108c
SS
2980else
2981 if test -n "$CC"; then
2982 ac_cv_prog_CC="$CC" # Let the user override the test.
2983else
bec39cab
AC
2984as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2985for as_dir in $PATH
2986do
2987 IFS=$as_save_IFS
2988 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2989 for ac_exec_ext in '' $ac_executable_extensions; do
2990 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 2991 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
81ecdfbb 2992 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2993 break 2
2994 fi
2995done
81ecdfbb
RW
2996 done
2997IFS=$as_save_IFS
bec39cab 2998
c906108c
SS
2999fi
3000fi
bec39cab 3001CC=$ac_cv_prog_CC
c906108c 3002if test -n "$CC"; then
81ecdfbb
RW
3003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3004$as_echo "$CC" >&6; }
c906108c 3005else
81ecdfbb
RW
3006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3007$as_echo "no" >&6; }
c906108c 3008fi
bec39cab 3009
81ecdfbb 3010
bec39cab
AC
3011 test -n "$CC" && break
3012 done
3013fi
3014if test -z "$CC"; then
3015 ac_ct_CC=$CC
81ecdfbb 3016 for ac_prog in cl.exe
bec39cab
AC
3017do
3018 # Extract the first word of "$ac_prog", so it can be a program name with args.
3019set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
3020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3021$as_echo_n "checking for $ac_word... " >&6; }
3022if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3023 $as_echo_n "(cached) " >&6
bec39cab
AC
3024else
3025 if test -n "$ac_ct_CC"; then
3026 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3027else
3028as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3029for as_dir in $PATH
3030do
3031 IFS=$as_save_IFS
3032 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
3033 for ac_exec_ext in '' $ac_executable_extensions; do
3034 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 3035 ac_cv_prog_ac_ct_CC="$ac_prog"
81ecdfbb 3036 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab 3037 break 2
c906108c 3038 fi
bec39cab 3039done
81ecdfbb
RW
3040 done
3041IFS=$as_save_IFS
bec39cab
AC
3042
3043fi
3044fi
3045ac_ct_CC=$ac_cv_prog_ac_ct_CC
3046if test -n "$ac_ct_CC"; then
81ecdfbb
RW
3047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3048$as_echo "$ac_ct_CC" >&6; }
bec39cab 3049else
81ecdfbb
RW
3050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3051$as_echo "no" >&6; }
c906108c
SS
3052fi
3053
81ecdfbb 3054
bec39cab
AC
3055 test -n "$ac_ct_CC" && break
3056done
c906108c 3057
81ecdfbb
RW
3058 if test "x$ac_ct_CC" = x; then
3059 CC=""
3060 else
3061 case $cross_compiling:$ac_tool_warned in
3062yes:)
3063{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3064$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3065ac_tool_warned=yes ;;
3066esac
3067 CC=$ac_ct_CC
3068 fi
bec39cab
AC
3069fi
3070
3071fi
3072
3073
81ecdfbb
RW
3074test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3075$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3076as_fn_error "no acceptable C compiler found in \$PATH
3077See \`config.log' for more details." "$LINENO" 5; }
bec39cab
AC
3078
3079# Provide some information about the compiler.
81ecdfbb
RW
3080$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3081set X $ac_compile
3082ac_compiler=$2
3083for ac_option in --version -v -V -qversion; do
3084 { { ac_try="$ac_compiler $ac_option >&5"
3085case "(($ac_try" in
3086 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3087 *) ac_try_echo=$ac_try;;
3088esac
3089eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3090$as_echo "$ac_try_echo"; } >&5
3091 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
bec39cab 3092 ac_status=$?
81ecdfbb
RW
3093 if test -s conftest.err; then
3094 sed '10a\
3095... rest of stderr output deleted ...
3096 10q' conftest.err >conftest.er1
3097 cat conftest.er1 >&5
3098 rm -f conftest.er1 conftest.err
3099 fi
3100 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3101 test $ac_status = 0; }
3102done
bec39cab 3103
81ecdfbb 3104cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3105/* end confdefs.h. */
3106
3107int
3108main ()
3109{
3110
3111 ;
3112 return 0;
3113}
3114_ACEOF
3115ac_clean_files_save=$ac_clean_files
81ecdfbb 3116ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out"
bec39cab
AC
3117# Try to create an executable without -o first, disregard a.out.
3118# It will help us diagnose broken compilers, and finding out an intuition
3119# of exeext.
81ecdfbb
RW
3120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3121$as_echo_n "checking for C compiler default output file name... " >&6; }
3122ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3123
3124# The possible output files:
3125ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3126
3127ac_rmfiles=
3128for ac_file in $ac_files
3129do
3130 case $ac_file in
3131 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3132 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3133 esac
3134done
3135rm -f $ac_rmfiles
3136
3137if { { ac_try="$ac_link_default"
3138case "(($ac_try" in
3139 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3140 *) ac_try_echo=$ac_try;;
3141esac
3142eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3143$as_echo "$ac_try_echo"; } >&5
3144 (eval "$ac_link_default") 2>&5
3145 ac_status=$?
3146 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3147 test $ac_status = 0; }; then :
3148 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3149# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3150# in a Makefile. We should not override ac_cv_exeext if it was cached,
3151# so that the user can short-circuit this test for compilers unknown to
3152# Autoconf.
3153for ac_file in $ac_files ''
bec39cab
AC
3154do
3155 test -f "$ac_file" || continue
3156 case $ac_file in
81ecdfbb 3157 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
b4e70030
JB
3158 ;;
3159 [ab].out )
3160 # We found the default executable, but exeext='' is most
3161 # certainly right.
3162 break;;
3163 *.* )
81ecdfbb
RW
3164 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3165 then :; else
3166 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3167 fi
3168 # We set ac_cv_exeext here because the later test for it is not
3169 # safe: cross compilers may not add the suffix if given an `-o'
3170 # argument, so we may need to know it at that point already.
3171 # Even if this section looks crufty: it has the advantage of
3172 # actually working.
b4e70030
JB
3173 break;;
3174 * )
3175 break;;
bec39cab
AC
3176 esac
3177done
81ecdfbb
RW
3178test "$ac_cv_exeext" = no && ac_cv_exeext=
3179
bec39cab 3180else
81ecdfbb
RW
3181 ac_file=''
3182fi
3183{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3184$as_echo "$ac_file" >&6; }
3185if test -z "$ac_file"; then :
3186 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3187sed 's/^/| /' conftest.$ac_ext >&5
3188
81ecdfbb
RW
3189{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3190$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3191{ as_fn_set_status 77
3192as_fn_error "C compiler cannot create executables
3193See \`config.log' for more details." "$LINENO" 5; }; }
bec39cab 3194fi
b4e70030 3195ac_exeext=$ac_cv_exeext
b4e70030 3196
81ecdfbb 3197# Check that the compiler produces executables we can run. If not, either
bec39cab 3198# the compiler is broken, or we cross compile.
81ecdfbb
RW
3199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3200$as_echo_n "checking whether the C compiler works... " >&6; }
bec39cab
AC
3201# If not cross compiling, check that we can run a simple program.
3202if test "$cross_compiling" != yes; then
3203 if { ac_try='./$ac_file'
81ecdfbb
RW
3204 { { case "(($ac_try" in
3205 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3206 *) ac_try_echo=$ac_try;;
3207esac
3208eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3209$as_echo "$ac_try_echo"; } >&5
3210 (eval "$ac_try") 2>&5
bec39cab 3211 ac_status=$?
81ecdfbb
RW
3212 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3213 test $ac_status = 0; }; }; then
bec39cab 3214 cross_compiling=no
c906108c 3215 else
bec39cab
AC
3216 if test "$cross_compiling" = maybe; then
3217 cross_compiling=yes
3218 else
81ecdfbb
RW
3219 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3220$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3221as_fn_error "cannot run C compiled programs.
bec39cab 3222If you meant to cross compile, use \`--host'.
81ecdfbb 3223See \`config.log' for more details." "$LINENO" 5; }
bec39cab 3224 fi
c906108c 3225 fi
bec39cab 3226fi
81ecdfbb
RW
3227{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3228$as_echo "yes" >&6; }
bec39cab 3229
81ecdfbb 3230rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out
b4e70030 3231ac_clean_files=$ac_clean_files_save
81ecdfbb 3232# Check that the compiler produces executables we can run. If not, either
b4e70030 3233# the compiler is broken, or we cross compile.
81ecdfbb
RW
3234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3235$as_echo_n "checking whether we are cross compiling... " >&6; }
3236{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3237$as_echo "$cross_compiling" >&6; }
3238
3239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3240$as_echo_n "checking for suffix of executables... " >&6; }
3241if { { ac_try="$ac_link"
3242case "(($ac_try" in
3243 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3244 *) ac_try_echo=$ac_try;;
3245esac
3246eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3247$as_echo "$ac_try_echo"; } >&5
3248 (eval "$ac_link") 2>&5
bec39cab 3249 ac_status=$?
81ecdfbb
RW
3250 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3251 test $ac_status = 0; }; then :
b4e70030
JB
3252 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3253# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3254# work properly (i.e., refer to `conftest.exe'), while it won't with
3255# `rm'.
3256for ac_file in conftest.exe conftest conftest.*; do
3257 test -f "$ac_file" || continue
3258 case $ac_file in
81ecdfbb 3259 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
b4e70030 3260 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
b4e70030
JB
3261 break;;
3262 * ) break;;
3263 esac
3264done
c906108c 3265else
81ecdfbb
RW
3266 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3267$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3268as_fn_error "cannot compute suffix of executables: cannot compile and link
3269See \`config.log' for more details." "$LINENO" 5; }
c906108c 3270fi
b4e70030 3271rm -f conftest$ac_cv_exeext
81ecdfbb
RW
3272{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3273$as_echo "$ac_cv_exeext" >&6; }
c906108c 3274
b4e70030 3275rm -f conftest.$ac_ext
bec39cab
AC
3276EXEEXT=$ac_cv_exeext
3277ac_exeext=$EXEEXT
81ecdfbb
RW
3278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3279$as_echo_n "checking for suffix of object files... " >&6; }
3280if test "${ac_cv_objext+set}" = set; then :
3281 $as_echo_n "(cached) " >&6
bec39cab 3282else
81ecdfbb 3283 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
3284/* end confdefs.h. */
3285
3286int
3287main ()
3288{
3289
3290 ;
3291 return 0;
3292}
3293_ACEOF
3294rm -f conftest.o conftest.obj
81ecdfbb
RW
3295if { { ac_try="$ac_compile"
3296case "(($ac_try" in
3297 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3298 *) ac_try_echo=$ac_try;;
3299esac
3300eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3301$as_echo "$ac_try_echo"; } >&5
3302 (eval "$ac_compile") 2>&5
3303 ac_status=$?
3304 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3305 test $ac_status = 0; }; then :
3306 for ac_file in conftest.o conftest.obj conftest.*; do
3307 test -f "$ac_file" || continue;
bec39cab 3308 case $ac_file in
81ecdfbb 3309 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
bec39cab
AC
3310 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3311 break;;
3312 esac
3313done
c906108c 3314else
81ecdfbb 3315 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3316sed 's/^/| /' conftest.$ac_ext >&5
3317
81ecdfbb
RW
3318{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3319$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3320as_fn_error "cannot compute suffix of object files: cannot compile
3321See \`config.log' for more details." "$LINENO" 5; }
c906108c 3322fi
b4e70030 3323rm -f conftest.$ac_cv_objext conftest.$ac_ext
bec39cab 3324fi
81ecdfbb
RW
3325{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3326$as_echo "$ac_cv_objext" >&6; }
bec39cab
AC
3327OBJEXT=$ac_cv_objext
3328ac_objext=$OBJEXT
81ecdfbb
RW
3329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3330$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3331if test "${ac_cv_c_compiler_gnu+set}" = set; then :
3332 $as_echo_n "(cached) " >&6
c906108c 3333else
81ecdfbb 3334 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3335/* end confdefs.h. */
3336
3337int
3338main ()
3339{
3340#ifndef __GNUC__
3341 choke me
3342#endif
3343
3344 ;
3345 return 0;
3346}
3347_ACEOF
81ecdfbb 3348if ac_fn_c_try_compile "$LINENO"; then :
bec39cab
AC
3349 ac_compiler_gnu=yes
3350else
81ecdfbb 3351 ac_compiler_gnu=no
bec39cab 3352fi
81ecdfbb 3353rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab
AC
3354ac_cv_c_compiler_gnu=$ac_compiler_gnu
3355
3356fi
81ecdfbb
RW
3357{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3358$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3359if test $ac_compiler_gnu = yes; then
3360 GCC=yes
3361else
3362 GCC=
3363fi
bec39cab
AC
3364ac_test_CFLAGS=${CFLAGS+set}
3365ac_save_CFLAGS=$CFLAGS
81ecdfbb
RW
3366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3367$as_echo_n "checking whether $CC accepts -g... " >&6; }
3368if test "${ac_cv_prog_cc_g+set}" = set; then :
3369 $as_echo_n "(cached) " >&6
bec39cab 3370else
81ecdfbb
RW
3371 ac_save_c_werror_flag=$ac_c_werror_flag
3372 ac_c_werror_flag=yes
3373 ac_cv_prog_cc_g=no
3374 CFLAGS="-g"
3375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3376/* end confdefs.h. */
3377
3378int
3379main ()
3380{
3381
3382 ;
3383 return 0;
3384}
3385_ACEOF
81ecdfbb 3386if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
3387 ac_cv_prog_cc_g=yes
3388else
81ecdfbb
RW
3389 CFLAGS=""
3390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3391/* end confdefs.h. */
3392
3393int
3394main ()
3395{
3396
3397 ;
3398 return 0;
3399}
3400_ACEOF
3401if ac_fn_c_try_compile "$LINENO"; then :
3402
3403else
3404 ac_c_werror_flag=$ac_save_c_werror_flag
3405 CFLAGS="-g"
3406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3407/* end confdefs.h. */
3408
3409int
3410main ()
3411{
c906108c 3412
81ecdfbb
RW
3413 ;
3414 return 0;
3415}
3416_ACEOF
3417if ac_fn_c_try_compile "$LINENO"; then :
3418 ac_cv_prog_cc_g=yes
3419fi
3420rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3421fi
3422rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4e8d927d 3423fi
81ecdfbb
RW
3424rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3425 ac_c_werror_flag=$ac_save_c_werror_flag
bec39cab 3426fi
81ecdfbb
RW
3427{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3428$as_echo "$ac_cv_prog_cc_g" >&6; }
c906108c 3429if test "$ac_test_CFLAGS" = set; then
bec39cab 3430 CFLAGS=$ac_save_CFLAGS
c906108c
SS
3431elif test $ac_cv_prog_cc_g = yes; then
3432 if test "$GCC" = yes; then
3433 CFLAGS="-g -O2"
3434 else
3435 CFLAGS="-g"
3436 fi
3437else
3438 if test "$GCC" = yes; then
3439 CFLAGS="-O2"
3440 else
3441 CFLAGS=
3442 fi
3443fi
81ecdfbb
RW
3444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3445$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3446if test "${ac_cv_prog_cc_c89+set}" = set; then :
3447 $as_echo_n "(cached) " >&6
bec39cab 3448else
81ecdfbb 3449 ac_cv_prog_cc_c89=no
bec39cab 3450ac_save_CC=$CC
81ecdfbb 3451cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3452/* end confdefs.h. */
c906108c
SS
3453#include <stdarg.h>
3454#include <stdio.h>
3455#include <sys/types.h>
3456#include <sys/stat.h>
3457/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3458struct buf { int x; };
3459FILE * (*rcsopen) (struct buf *, struct stat *, int);
3460static char *e (p, i)
3461 char **p;
3462 int i;
3463{
3464 return p[i];
3465}
3466static char *f (char * (*g) (char **, int), char **p, ...)
3467{
3468 char *s;
3469 va_list v;
3470 va_start (v,p);
3471 s = g (p, va_arg (v,int));
3472 va_end (v);
3473 return s;
3474}
bec39cab
AC
3475
3476/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3477 function prototypes and stuff, but not '\xHH' hex character constants.
3478 These don't provoke an error unfortunately, instead are silently treated
81ecdfbb 3479 as 'x'. The following induces an error, until -std is added to get
bec39cab
AC
3480 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3481 array size at least. It's necessary to write '\x00'==0 to get something
81ecdfbb 3482 that's true only with -std. */
bec39cab
AC
3483int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3484
81ecdfbb
RW
3485/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3486 inside strings and character constants. */
3487#define FOO(x) 'x'
3488int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3489
c906108c
SS
3490int test (int i, double x);
3491struct s1 {int (*f) (int a);};
3492struct s2 {int (*f) (double a);};
3493int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3494int argc;
3495char **argv;
bec39cab
AC
3496int
3497main ()
3498{
c906108c 3499return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
bec39cab
AC
3500 ;
3501 return 0;
3502}
3503_ACEOF
81ecdfbb
RW
3504for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3505 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
bec39cab
AC
3506do
3507 CC="$ac_save_CC $ac_arg"
81ecdfbb
RW
3508 if ac_fn_c_try_compile "$LINENO"; then :
3509 ac_cv_prog_cc_c89=$ac_arg
c906108c 3510fi
81ecdfbb
RW
3511rm -f core conftest.err conftest.$ac_objext
3512 test "x$ac_cv_prog_cc_c89" != "xno" && break
c906108c 3513done
81ecdfbb 3514rm -f conftest.$ac_ext
bec39cab 3515CC=$ac_save_CC
c906108c
SS
3516
3517fi
81ecdfbb
RW
3518# AC_CACHE_VAL
3519case "x$ac_cv_prog_cc_c89" in
3520 x)
3521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3522$as_echo "none needed" >&6; } ;;
3523 xno)
3524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3525$as_echo "unsupported" >&6; } ;;
bec39cab 3526 *)
81ecdfbb
RW
3527 CC="$CC $ac_cv_prog_cc_c89"
3528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3529$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
c906108c 3530esac
81ecdfbb 3531if test "x$ac_cv_prog_cc_c89" != xno; then :
c906108c 3532
b4e70030
JB
3533fi
3534
bec39cab
AC
3535ac_ext=c
3536ac_cpp='$CPP $CPPFLAGS'
3537ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3538ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3539ac_compiler_gnu=$ac_cv_c_compiler_gnu
c906108c 3540
3bc3d82a
PA
3541ac_ext=cpp
3542ac_cpp='$CXXCPP $CPPFLAGS'
3543ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3544ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3545ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3546if test -z "$CXX"; then
3547 if test -n "$CCC"; then
3548 CXX=$CCC
3549 else
3550 if test -n "$ac_tool_prefix"; then
3551 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3552 do
3553 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3554set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3556$as_echo_n "checking for $ac_word... " >&6; }
3557if test "${ac_cv_prog_CXX+set}" = set; then :
3558 $as_echo_n "(cached) " >&6
3559else
3560 if test -n "$CXX"; then
3561 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3562else
3563as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3564for as_dir in $PATH
3565do
3566 IFS=$as_save_IFS
3567 test -z "$as_dir" && as_dir=.
3568 for ac_exec_ext in '' $ac_executable_extensions; do
3569 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3570 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3571 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3572 break 2
3573 fi
3574done
3575 done
3576IFS=$as_save_IFS
3577
3578fi
3579fi
3580CXX=$ac_cv_prog_CXX
3581if test -n "$CXX"; then
3582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
3583$as_echo "$CXX" >&6; }
3584else
3585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3586$as_echo "no" >&6; }
3587fi
3588
3589
3590 test -n "$CXX" && break
3591 done
3592fi
3593if test -z "$CXX"; then
3594 ac_ct_CXX=$CXX
3595 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3596do
3597 # Extract the first word of "$ac_prog", so it can be a program name with args.
3598set dummy $ac_prog; ac_word=$2
3599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3600$as_echo_n "checking for $ac_word... " >&6; }
3601if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
3602 $as_echo_n "(cached) " >&6
3603else
3604 if test -n "$ac_ct_CXX"; then
3605 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3606else
3607as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3608for as_dir in $PATH
3609do
3610 IFS=$as_save_IFS
3611 test -z "$as_dir" && as_dir=.
3612 for ac_exec_ext in '' $ac_executable_extensions; do
3613 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3614 ac_cv_prog_ac_ct_CXX="$ac_prog"
3615 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3616 break 2
3617 fi
3618done
3619 done
3620IFS=$as_save_IFS
3621
3622fi
3623fi
3624ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3625if test -n "$ac_ct_CXX"; then
3626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
3627$as_echo "$ac_ct_CXX" >&6; }
3628else
3629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3630$as_echo "no" >&6; }
3631fi
3632
3633
3634 test -n "$ac_ct_CXX" && break
3635done
3636
3637 if test "x$ac_ct_CXX" = x; then
3638 CXX="g++"
3639 else
3640 case $cross_compiling:$ac_tool_warned in
3641yes:)
3642{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3643$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3644ac_tool_warned=yes ;;
3645esac
3646 CXX=$ac_ct_CXX
3647 fi
3648fi
3649
3650 fi
3651fi
3652# Provide some information about the compiler.
3653$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
3654set X $ac_compile
3655ac_compiler=$2
3656for ac_option in --version -v -V -qversion; do
3657 { { ac_try="$ac_compiler $ac_option >&5"
3658case "(($ac_try" in
3659 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3660 *) ac_try_echo=$ac_try;;
3661esac
3662eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3663$as_echo "$ac_try_echo"; } >&5
3664 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3665 ac_status=$?
3666 if test -s conftest.err; then
3667 sed '10a\
3668... rest of stderr output deleted ...
3669 10q' conftest.err >conftest.er1
3670 cat conftest.er1 >&5
3671 rm -f conftest.er1 conftest.err
3672 fi
3673 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3674 test $ac_status = 0; }
3675done
3676
3677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
3678$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
3679if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
3680 $as_echo_n "(cached) " >&6
3681else
3682 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3683/* end confdefs.h. */
3684
3685int
3686main ()
3687{
3688#ifndef __GNUC__
3689 choke me
3690#endif
3691
3692 ;
3693 return 0;
3694}
3695_ACEOF
3696if ac_fn_cxx_try_compile "$LINENO"; then :
3697 ac_compiler_gnu=yes
3698else
3699 ac_compiler_gnu=no
3700fi
3701rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3702ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3703
3704fi
3705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
3706$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
3707if test $ac_compiler_gnu = yes; then
3708 GXX=yes
3709else
3710 GXX=
3711fi
3712ac_test_CXXFLAGS=${CXXFLAGS+set}
3713ac_save_CXXFLAGS=$CXXFLAGS
3714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
3715$as_echo_n "checking whether $CXX accepts -g... " >&6; }
3716if test "${ac_cv_prog_cxx_g+set}" = set; then :
3717 $as_echo_n "(cached) " >&6
3718else
3719 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
3720 ac_cxx_werror_flag=yes
3721 ac_cv_prog_cxx_g=no
3722 CXXFLAGS="-g"
3723 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3724/* end confdefs.h. */
3725
3726int
3727main ()
3728{
3729
3730 ;
3731 return 0;
3732}
3733_ACEOF
3734if ac_fn_cxx_try_compile "$LINENO"; then :
3735 ac_cv_prog_cxx_g=yes
3736else
3737 CXXFLAGS=""
3738 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3739/* end confdefs.h. */
3740
3741int
3742main ()
3743{
3744
3745 ;
3746 return 0;
3747}
3748_ACEOF
3749if ac_fn_cxx_try_compile "$LINENO"; then :
3750
3751else
3752 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3753 CXXFLAGS="-g"
3754 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3755/* end confdefs.h. */
3756
3757int
3758main ()
3759{
3760
3761 ;
3762 return 0;
3763}
3764_ACEOF
3765if ac_fn_cxx_try_compile "$LINENO"; then :
3766 ac_cv_prog_cxx_g=yes
3767fi
3768rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3769fi
3770rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3771fi
3772rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3773 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3774fi
3775{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
3776$as_echo "$ac_cv_prog_cxx_g" >&6; }
3777if test "$ac_test_CXXFLAGS" = set; then
3778 CXXFLAGS=$ac_save_CXXFLAGS
3779elif test $ac_cv_prog_cxx_g = yes; then
3780 if test "$GXX" = yes; then
3781 CXXFLAGS="-g -O2"
3782 else
3783 CXXFLAGS="-g"
3784 fi
3785else
3786 if test "$GXX" = yes; then
3787 CXXFLAGS="-O2"
3788 else
3789 CXXFLAGS=
3790 fi
3791fi
3792ac_ext=c
3793ac_cpp='$CPP $CPPFLAGS'
3794ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3795ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3796ac_compiler_gnu=$ac_cv_c_compiler_gnu
3797
3798
60ca704f 3799
bec39cab
AC
3800ac_ext=c
3801ac_cpp='$CPP $CPPFLAGS'
3802ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3803ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3804ac_compiler_gnu=$ac_cv_c_compiler_gnu
81ecdfbb
RW
3805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3806$as_echo_n "checking how to run the C preprocessor... " >&6; }
bec39cab
AC
3807# On Suns, sometimes $CPP names a directory.
3808if test -n "$CPP" && test -d "$CPP"; then
3809 CPP=
8bb2c122 3810fi
bec39cab 3811if test -z "$CPP"; then
81ecdfbb
RW
3812 if test "${ac_cv_prog_CPP+set}" = set; then :
3813 $as_echo_n "(cached) " >&6
bec39cab
AC
3814else
3815 # Double quotes because CPP needs to be expanded
3816 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3817 do
3818 ac_preproc_ok=false
3819for ac_c_preproc_warn_flag in '' yes
3820do
3821 # Use a header file that comes with gcc, so configuring glibc
3822 # with a fresh cross-compiler works.
3823 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3824 # <limits.h> exists even on freestanding compilers.
3825 # On the NeXT, cc -E runs the code through the compiler's parser,
3826 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3828/* end confdefs.h. */
3829#ifdef __STDC__
3830# include <limits.h>
3831#else
3832# include <assert.h>
3833#endif
3834 Syntax error
3835_ACEOF
81ecdfbb 3836if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3837
81ecdfbb 3838else
bec39cab
AC
3839 # Broken: fails on valid input.
3840continue
3841fi
3842rm -f conftest.err conftest.$ac_ext
3843
81ecdfbb 3844 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3845 # can be detected and how.
81ecdfbb 3846 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3847/* end confdefs.h. */
3848#include <ac_nonexistent.h>
3849_ACEOF
81ecdfbb 3850if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3851 # Broken: success on invalid input.
3852continue
8bb2c122 3853else
bec39cab
AC
3854 # Passes both tests.
3855ac_preproc_ok=:
3856break
8bb2c122 3857fi
bec39cab 3858rm -f conftest.err conftest.$ac_ext
8bb2c122 3859
bec39cab
AC
3860done
3861# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3862rm -f conftest.err conftest.$ac_ext
81ecdfbb 3863if $ac_preproc_ok; then :
bec39cab
AC
3864 break
3865fi
8bb2c122 3866
bec39cab
AC
3867 done
3868 ac_cv_prog_CPP=$CPP
ddc9cd0f 3869
c906108c 3870fi
bec39cab
AC
3871 CPP=$ac_cv_prog_CPP
3872else
3873 ac_cv_prog_CPP=$CPP
c906108c 3874fi
81ecdfbb
RW
3875{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3876$as_echo "$CPP" >&6; }
bec39cab
AC
3877ac_preproc_ok=false
3878for ac_c_preproc_warn_flag in '' yes
3879do
3880 # Use a header file that comes with gcc, so configuring glibc
3881 # with a fresh cross-compiler works.
3882 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3883 # <limits.h> exists even on freestanding compilers.
3884 # On the NeXT, cc -E runs the code through the compiler's parser,
3885 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3887/* end confdefs.h. */
3888#ifdef __STDC__
3889# include <limits.h>
3890#else
3891# include <assert.h>
3892#endif
3893 Syntax error
3894_ACEOF
81ecdfbb 3895if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3896
81ecdfbb 3897else
bec39cab
AC
3898 # Broken: fails on valid input.
3899continue
3900fi
3901rm -f conftest.err conftest.$ac_ext
3902
81ecdfbb 3903 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3904 # can be detected and how.
81ecdfbb 3905 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3906/* end confdefs.h. */
3907#include <ac_nonexistent.h>
3908_ACEOF
81ecdfbb 3909if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3910 # Broken: success on invalid input.
3911continue
c906108c 3912else
bec39cab
AC
3913 # Passes both tests.
3914ac_preproc_ok=:
3915break
c906108c 3916fi
bec39cab 3917rm -f conftest.err conftest.$ac_ext
c906108c 3918
bec39cab
AC
3919done
3920# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3921rm -f conftest.err conftest.$ac_ext
81ecdfbb
RW
3922if $ac_preproc_ok; then :
3923
c906108c 3924else
81ecdfbb
RW
3925 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3926$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3927as_fn_error "C preprocessor \"$CPP\" fails sanity check
3928See \`config.log' for more details." "$LINENO" 5; }
c906108c 3929fi
c906108c 3930
bec39cab
AC
3931ac_ext=c
3932ac_cpp='$CPP $CPPFLAGS'
3933ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3934ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3935ac_compiler_gnu=$ac_cv_c_compiler_gnu
3936
3937
81ecdfbb
RW
3938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3939$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3940if test "${ac_cv_path_GREP+set}" = set; then :
3941 $as_echo_n "(cached) " >&6
4e8d927d 3942else
81ecdfbb
RW
3943 if test -z "$GREP"; then
3944 ac_path_GREP_found=false
3945 # Loop through the user's path and test for each of PROGNAME-LIST
3946 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3947for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3948do
3949 IFS=$as_save_IFS
3950 test -z "$as_dir" && as_dir=.
3951 for ac_prog in grep ggrep; do
3952 for ac_exec_ext in '' $ac_executable_extensions; do
3953 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3954 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3955# Check for GNU ac_path_GREP and select it if it is found.
3956 # Check for GNU $ac_path_GREP
3957case `"$ac_path_GREP" --version 2>&1` in
3958*GNU*)
3959 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3960*)
3961 ac_count=0
3962 $as_echo_n 0123456789 >"conftest.in"
3963 while :
3964 do
3965 cat "conftest.in" "conftest.in" >"conftest.tmp"
3966 mv "conftest.tmp" "conftest.in"
3967 cp "conftest.in" "conftest.nl"
3968 $as_echo 'GREP' >> "conftest.nl"
3969 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3970 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3971 as_fn_arith $ac_count + 1 && ac_count=$as_val
3972 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3973 # Best one so far, save it but keep looking for a better one
3974 ac_cv_path_GREP="$ac_path_GREP"
3975 ac_path_GREP_max=$ac_count
bec39cab 3976 fi
81ecdfbb
RW
3977 # 10*(2^10) chars as input seems more than enough
3978 test $ac_count -gt 10 && break
3979 done
3980 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3981esac
bec39cab 3982
81ecdfbb
RW
3983 $ac_path_GREP_found && break 3
3984 done
3985 done
3986 done
3987IFS=$as_save_IFS
3988 if test -z "$ac_cv_path_GREP"; then
3989 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3990 fi
c906108c 3991else
81ecdfbb 3992 ac_cv_path_GREP=$GREP
c906108c 3993fi
c906108c 3994
81ecdfbb
RW
3995fi
3996{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
3997$as_echo "$ac_cv_path_GREP" >&6; }
3998 GREP="$ac_cv_path_GREP"
c906108c 3999
c906108c 4000
81ecdfbb
RW
4001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4002$as_echo_n "checking for egrep... " >&6; }
4003if test "${ac_cv_path_EGREP+set}" = set; then :
4004 $as_echo_n "(cached) " >&6
783e057b 4005else
81ecdfbb
RW
4006 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4007 then ac_cv_path_EGREP="$GREP -E"
4008 else
4009 if test -z "$EGREP"; then
4010 ac_path_EGREP_found=false
4011 # Loop through the user's path and test for each of PROGNAME-LIST
4012 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4013for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
783e057b
DJ
4014do
4015 IFS=$as_save_IFS
4016 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
4017 for ac_prog in egrep; do
4018 for ac_exec_ext in '' $ac_executable_extensions; do
4019 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4020 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4021# Check for GNU ac_path_EGREP and select it if it is found.
4022 # Check for GNU $ac_path_EGREP
4023case `"$ac_path_EGREP" --version 2>&1` in
4024*GNU*)
4025 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4026*)
4027 ac_count=0
4028 $as_echo_n 0123456789 >"conftest.in"
4029 while :
4030 do
4031 cat "conftest.in" "conftest.in" >"conftest.tmp"
4032 mv "conftest.tmp" "conftest.in"
4033 cp "conftest.in" "conftest.nl"
4034 $as_echo 'EGREP' >> "conftest.nl"
4035 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4036 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4037 as_fn_arith $ac_count + 1 && ac_count=$as_val
4038 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4039 # Best one so far, save it but keep looking for a better one
4040 ac_cv_path_EGREP="$ac_path_EGREP"
4041 ac_path_EGREP_max=$ac_count
4042 fi
4043 # 10*(2^10) chars as input seems more than enough
4044 test $ac_count -gt 10 && break
4045 done
4046 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4047esac
bec39cab 4048
81ecdfbb
RW
4049 $ac_path_EGREP_found && break 3
4050 done
4051 done
4052 done
4053IFS=$as_save_IFS
4054 if test -z "$ac_cv_path_EGREP"; then
4055 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
783e057b 4056 fi
783e057b 4057else
81ecdfbb 4058 ac_cv_path_EGREP=$EGREP
783e057b
DJ
4059fi
4060
81ecdfbb 4061 fi
783e057b 4062fi
81ecdfbb
RW
4063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4064$as_echo "$ac_cv_path_EGREP" >&6; }
4065 EGREP="$ac_cv_path_EGREP"
4066
783e057b 4067
81ecdfbb
RW
4068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4069$as_echo_n "checking for ANSI C header files... " >&6; }
4070if test "${ac_cv_header_stdc+set}" = set; then :
4071 $as_echo_n "(cached) " >&6
783e057b 4072else
81ecdfbb 4073 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 4074/* end confdefs.h. */
783e057b 4075#include <stdlib.h>
bec39cab 4076#include <stdarg.h>
783e057b
DJ
4077#include <string.h>
4078#include <float.h>
c906108c 4079
bec39cab
AC
4080int
4081main ()
4082{
c906108c 4083
bec39cab
AC
4084 ;
4085 return 0;
4086}
4087_ACEOF
81ecdfbb 4088if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4089 ac_cv_header_stdc=yes
c906108c 4090else
81ecdfbb 4091 ac_cv_header_stdc=no
c906108c 4092fi
81ecdfbb 4093rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 4094
783e057b
DJ
4095if test $ac_cv_header_stdc = yes; then
4096 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
81ecdfbb 4097 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4098/* end confdefs.h. */
4099#include <string.h>
c906108c 4100
783e057b
DJ
4101_ACEOF
4102if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4103 $EGREP "memchr" >/dev/null 2>&1; then :
4104
c906108c 4105else
783e057b 4106 ac_cv_header_stdc=no
c906108c 4107fi
783e057b 4108rm -f conftest*
c906108c
SS
4109
4110fi
4111
783e057b
DJ
4112if test $ac_cv_header_stdc = yes; then
4113 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
81ecdfbb 4114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4115/* end confdefs.h. */
4116#include <stdlib.h>
bec39cab 4117
783e057b
DJ
4118_ACEOF
4119if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4120 $EGREP "free" >/dev/null 2>&1; then :
4121
bec39cab 4122else
783e057b 4123 ac_cv_header_stdc=no
bec39cab 4124fi
783e057b 4125rm -f conftest*
bec39cab
AC
4126
4127fi
bec39cab 4128
783e057b
DJ
4129if test $ac_cv_header_stdc = yes; then
4130 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
81ecdfbb 4131 if test "$cross_compiling" = yes; then :
783e057b 4132 :
bec39cab 4133else
81ecdfbb 4134 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4135/* end confdefs.h. */
4136#include <ctype.h>
81ecdfbb 4137#include <stdlib.h>
783e057b
DJ
4138#if ((' ' & 0x0FF) == 0x020)
4139# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4140# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4141#else
4142# define ISLOWER(c) \
4143 (('a' <= (c) && (c) <= 'i') \
4144 || ('j' <= (c) && (c) <= 'r') \
4145 || ('s' <= (c) && (c) <= 'z'))
4146# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4147#endif
4148
4149#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4150int
4151main ()
4152{
4153 int i;
4154 for (i = 0; i < 256; i++)
4155 if (XOR (islower (i), ISLOWER (i))
4156 || toupper (i) != TOUPPER (i))
81ecdfbb
RW
4157 return 2;
4158 return 0;
783e057b
DJ
4159}
4160_ACEOF
81ecdfbb 4161if ac_fn_c_try_run "$LINENO"; then :
783e057b 4162
81ecdfbb
RW
4163else
4164 ac_cv_header_stdc=no
783e057b 4165fi
81ecdfbb
RW
4166rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4167 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 4168fi
81ecdfbb 4169
783e057b
DJ
4170fi
4171fi
81ecdfbb
RW
4172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4173$as_echo "$ac_cv_header_stdc" >&6; }
783e057b
DJ
4174if test $ac_cv_header_stdc = yes; then
4175
81ecdfbb 4176$as_echo "#define STDC_HEADERS 1" >>confdefs.h
783e057b
DJ
4177
4178fi
4179
4180# On IRIX 5.3, sys/types and inttypes.h are conflicting.
783e057b
DJ
4181for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4182 inttypes.h stdint.h unistd.h
81ecdfbb
RW
4183do :
4184 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4185ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4186"
4187eval as_val=\$$as_ac_Header
4188 if test "x$as_val" = x""yes; then :
783e057b 4189 cat >>confdefs.h <<_ACEOF
81ecdfbb 4190#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
783e057b
DJ
4191_ACEOF
4192
4193fi
4194
4195done
4196
4197
4198
81ecdfbb
RW
4199 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4200if test "x$ac_cv_header_minix_config_h" = x""yes; then :
783e057b
DJ
4201 MINIX=yes
4202else
4203 MINIX=
4204fi
4205
4206
4207 if test "$MINIX" = yes; then
4208
81ecdfbb 4209$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
783e057b
DJ
4210
4211
81ecdfbb 4212$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
783e057b
DJ
4213
4214
81ecdfbb 4215$as_echo "#define _MINIX 1" >>confdefs.h
783e057b
DJ
4216
4217 fi
4218
4219
81ecdfbb
RW
4220 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4221$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4222if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
4223 $as_echo_n "(cached) " >&6
783e057b 4224else
81ecdfbb 4225 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4226/* end confdefs.h. */
4227
c971b7fa
PA
4228# define __EXTENSIONS__ 1
4229 $ac_includes_default
783e057b
DJ
4230int
4231main ()
4232{
4233
4234 ;
4235 return 0;
4236}
4237_ACEOF
81ecdfbb 4238if ac_fn_c_try_compile "$LINENO"; then :
783e057b
DJ
4239 ac_cv_safe_to_define___extensions__=yes
4240else
81ecdfbb 4241 ac_cv_safe_to_define___extensions__=no
783e057b 4242fi
81ecdfbb 4243rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b 4244fi
81ecdfbb
RW
4245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4246$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
783e057b 4247 test $ac_cv_safe_to_define___extensions__ = yes &&
81ecdfbb 4248 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
783e057b 4249
81ecdfbb 4250 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
783e057b 4251
81ecdfbb 4252 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
783e057b 4253
81ecdfbb 4254 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
783e057b 4255
81ecdfbb 4256 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
783e057b
DJ
4257
4258
c971b7fa
PA
4259ac_aux_dir=
4260for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4261 for ac_t in install-sh install.sh shtool; do
4262 if test -f "$ac_dir/$ac_t"; then
4263 ac_aux_dir=$ac_dir
4264 ac_install_sh="$ac_aux_dir/$ac_t -c"
4265 break 2
4266 fi
4267 done
4268done
4269if test -z "$ac_aux_dir"; then
4270 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
4271fi
770d76d7 4272
c971b7fa
PA
4273# These three variables are undocumented and unsupported,
4274# and are intended to be withdrawn in a future Autoconf release.
4275# They can cause serious problems if a builder's source tree is in a directory
4276# whose full name contains unusual characters.
4277ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4278ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4279ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
770d76d7 4280
770d76d7 4281
c971b7fa
PA
4282# Make sure we can run config.sub.
4283$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
4284 as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
770d76d7 4285
c971b7fa
PA
4286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4287$as_echo_n "checking build system type... " >&6; }
4288if test "${ac_cv_build+set}" = set; then :
4289 $as_echo_n "(cached) " >&6
770d76d7 4290else
c971b7fa
PA
4291 ac_build_alias=$build_alias
4292test "x$ac_build_alias" = x &&
4293 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4294test "x$ac_build_alias" = x &&
4295 as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
4296ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
4297 as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
4298
770d76d7 4299fi
c971b7fa
PA
4300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4301$as_echo "$ac_cv_build" >&6; }
4302case $ac_cv_build in
4303*-*-*) ;;
4304*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
770d76d7 4305esac
c971b7fa
PA
4306build=$ac_cv_build
4307ac_save_IFS=$IFS; IFS='-'
4308set x $ac_cv_build
4309shift
4310build_cpu=$1
4311build_vendor=$2
4312shift; shift
4313# Remember, the first character of IFS is used to create $*,
4314# except with old shells:
4315build_os=$*
4316IFS=$ac_save_IFS
4317case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
770d76d7
PA
4318
4319
c971b7fa
PA
4320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4321$as_echo_n "checking host system type... " >&6; }
4322if test "${ac_cv_host+set}" = set; then :
81ecdfbb
RW
4323 $as_echo_n "(cached) " >&6
4324else
c971b7fa
PA
4325 if test "x$host_alias" = x; then
4326 ac_cv_host=$ac_cv_build
81ecdfbb 4327else
c971b7fa
PA
4328 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
4329 as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
81ecdfbb 4330fi
81ecdfbb
RW
4331
4332fi
c971b7fa
PA
4333{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4334$as_echo "$ac_cv_host" >&6; }
4335case $ac_cv_host in
4336*-*-*) ;;
4337*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
81ecdfbb 4338esac
c971b7fa
PA
4339host=$ac_cv_host
4340ac_save_IFS=$IFS; IFS='-'
4341set x $ac_cv_host
4342shift
4343host_cpu=$1
4344host_vendor=$2
4345shift; shift
4346# Remember, the first character of IFS is used to create $*,
4347# except with old shells:
4348host_os=$*
4349IFS=$ac_save_IFS
4350case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3388710e
JM
4351
4352
4353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4354$as_echo_n "checking target system type... " >&6; }
4355if test "${ac_cv_target+set}" = set; then :
4356 $as_echo_n "(cached) " >&6
4357else
4358 if test "x$target_alias" = x; then
4359 ac_cv_target=$ac_cv_host
4360else
4361 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
4362 as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
4363fi
4364
4365fi
4366{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4367$as_echo "$ac_cv_target" >&6; }
4368case $ac_cv_target in
4369*-*-*) ;;
4370*) as_fn_error "invalid value of canonical target" "$LINENO" 5;;
4371esac
4372target=$ac_cv_target
4373ac_save_IFS=$IFS; IFS='-'
4374set x $ac_cv_target
4375shift
4376target_cpu=$1
4377target_vendor=$2
4378shift; shift
4379# Remember, the first character of IFS is used to create $*,
4380# except with old shells:
4381target_os=$*
4382IFS=$ac_save_IFS
4383case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4384
4385
4386# The aliases save the names the user supplied, while $host etc.
4387# will get canonicalized.
4388test -n "$target_alias" &&
4389 test "$program_prefix$program_suffix$program_transform_name" = \
4390 NONENONEs,x,x, &&
4391 program_prefix=${target_alias}-
4392
4393# The tests for host and target for $enable_largefile require
4394# canonical names.
4395
4396
81ecdfbb 4397
da2f07f1
JK
4398# As the $enable_largefile decision depends on --enable-plugins we must set it
4399# even in directories otherwise not depending on the $plugins option.
4400
4401
2974be62
AM
4402 maybe_plugins=no
4403 for ac_header in dlfcn.h
4404do :
4405 ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
4406"
4407if test "x$ac_cv_header_dlfcn_h" = x""yes; then :
4408 cat >>confdefs.h <<_ACEOF
4409#define HAVE_DLFCN_H 1
4410_ACEOF
4411 maybe_plugins=yes
4412fi
4413
4414done
4415
4416 for ac_header in windows.h
4417do :
4418 ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
4419"
4420if test "x$ac_cv_header_windows_h" = x""yes; then :
4421 cat >>confdefs.h <<_ACEOF
4422#define HAVE_WINDOWS_H 1
4423_ACEOF
4424 maybe_plugins=yes
4425fi
4426
4427done
4428
4429
4430 # Check whether --enable-plugins was given.
da2f07f1
JK
4431if test "${enable_plugins+set}" = set; then :
4432 enableval=$enable_plugins; case "${enableval}" in
2974be62
AM
4433 no) plugins=no ;;
4434 *) plugins=yes
4435 if test "$maybe_plugins" != "yes" ; then
4436 as_fn_error "Building with plugin support requires a host that supports dlopen." "$LINENO" 5
4437 fi ;;
4438 esac
da2f07f1 4439else
2974be62
AM
4440 plugins=$maybe_plugins
4441
da2f07f1
JK
4442fi
4443
2974be62
AM
4444 if test "$plugins" = "yes"; then
4445 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
4446$as_echo_n "checking for library containing dlopen... " >&6; }
4447if test "${ac_cv_search_dlopen+set}" = set; then :
4448 $as_echo_n "(cached) " >&6
4449else
4450 ac_func_search_save_LIBS=$LIBS
4451cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4452/* end confdefs.h. */
4453
4454/* Override any GCC internal prototype to avoid an error.
4455 Use char because int might match the return type of a GCC
4456 builtin and then its argument prototype would still apply. */
4457#ifdef __cplusplus
4458extern "C"
4459#endif
4460char dlopen ();
4461int
4462main ()
4463{
4464return dlopen ();
4465 ;
4466 return 0;
4467}
4468_ACEOF
4469for ac_lib in '' dl; do
4470 if test -z "$ac_lib"; then
4471 ac_res="none required"
4472 else
4473 ac_res=-l$ac_lib
4474 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4475 fi
4476 if ac_fn_c_try_link "$LINENO"; then :
4477 ac_cv_search_dlopen=$ac_res
4478fi
4479rm -f core conftest.err conftest.$ac_objext \
4480 conftest$ac_exeext
4481 if test "${ac_cv_search_dlopen+set}" = set; then :
4482 break
4483fi
4484done
4485if test "${ac_cv_search_dlopen+set}" = set; then :
4486
4487else
4488 ac_cv_search_dlopen=no
4489fi
4490rm conftest.$ac_ext
4491LIBS=$ac_func_search_save_LIBS
4492fi
4493{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
4494$as_echo "$ac_cv_search_dlopen" >&6; }
4495ac_res=$ac_cv_search_dlopen
4496if test "$ac_res" != no; then :
4497 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4498
4499fi
4500
4501 fi
da2f07f1
JK
4502
4503
4504case "${host}" in
4505 sparc-*-solaris*|i[3-7]86-*-solaris*)
4506 # On native 32bit sparc and ia32 solaris, large-file and procfs support
4507 # are mutually exclusive; and without procfs support, the bfd/ elf module
4508 # cannot provide certain routines such as elfcore_write_prpsinfo
4509 # or elfcore_write_prstatus. So unless the user explicitly requested
4510 # large-file support through the --enable-largefile switch, disable
4511 # large-file support in favor of procfs support.
4512 test "${target}" = "${host}" -a "x$plugins" = xno \
4513 && : ${enable_largefile="no"}
4514 ;;
4515esac
4516
4517# Check whether --enable-largefile was given.
4518if test "${enable_largefile+set}" = set; then :
4519 enableval=$enable_largefile;
4520fi
4521
4522if test "$enable_largefile" != no; then
4523
4524 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4525$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
4526if test "${ac_cv_sys_largefile_CC+set}" = set; then :
4527 $as_echo_n "(cached) " >&6
4528else
4529 ac_cv_sys_largefile_CC=no
4530 if test "$GCC" != yes; then
4531 ac_save_CC=$CC
4532 while :; do
4533 # IRIX 6.2 and later do not support large files by default,
4534 # so use the C compiler's -n32 option if that helps.
4535 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4536/* end confdefs.h. */
4537#include <sys/types.h>
4538 /* Check that off_t can represent 2**63 - 1 correctly.
4539 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4540 since some C++ compilers masquerading as C compilers
4541 incorrectly reject 9223372036854775807. */
4542#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4543 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4544 && LARGE_OFF_T % 2147483647 == 1)
4545 ? 1 : -1];
4546int
4547main ()
4548{
4549
4550 ;
4551 return 0;
4552}
4553_ACEOF
4554 if ac_fn_c_try_compile "$LINENO"; then :
4555 break
4556fi
4557rm -f core conftest.err conftest.$ac_objext
4558 CC="$CC -n32"
4559 if ac_fn_c_try_compile "$LINENO"; then :
4560 ac_cv_sys_largefile_CC=' -n32'; break
4561fi
4562rm -f core conftest.err conftest.$ac_objext
4563 break
4564 done
4565 CC=$ac_save_CC
4566 rm -f conftest.$ac_ext
4567 fi
4568fi
4569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4570$as_echo "$ac_cv_sys_largefile_CC" >&6; }
4571 if test "$ac_cv_sys_largefile_CC" != no; then
4572 CC=$CC$ac_cv_sys_largefile_CC
4573 fi
4574
4575 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4576$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
4577if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
4578 $as_echo_n "(cached) " >&6
4579else
4580 while :; do
4581 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4582/* end confdefs.h. */
4583#include <sys/types.h>
4584 /* Check that off_t can represent 2**63 - 1 correctly.
4585 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4586 since some C++ compilers masquerading as C compilers
4587 incorrectly reject 9223372036854775807. */
4588#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4589 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4590 && LARGE_OFF_T % 2147483647 == 1)
4591 ? 1 : -1];
4592int
4593main ()
4594{
4595
4596 ;
4597 return 0;
4598}
4599_ACEOF
4600if ac_fn_c_try_compile "$LINENO"; then :
4601 ac_cv_sys_file_offset_bits=no; break
4602fi
4603rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4604 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4605/* end confdefs.h. */
4606#define _FILE_OFFSET_BITS 64
4607#include <sys/types.h>
4608 /* Check that off_t can represent 2**63 - 1 correctly.
4609 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4610 since some C++ compilers masquerading as C compilers
4611 incorrectly reject 9223372036854775807. */
4612#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4613 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4614 && LARGE_OFF_T % 2147483647 == 1)
4615 ? 1 : -1];
4616int
4617main ()
4618{
4619
4620 ;
4621 return 0;
4622}
4623_ACEOF
4624if ac_fn_c_try_compile "$LINENO"; then :
4625 ac_cv_sys_file_offset_bits=64; break
4626fi
4627rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4628 ac_cv_sys_file_offset_bits=unknown
4629 break
4630done
4631fi
4632{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4633$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4634case $ac_cv_sys_file_offset_bits in #(
4635 no | unknown) ;;
4636 *)
4637cat >>confdefs.h <<_ACEOF
4638#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4639_ACEOF
4640;;
4641esac
4642rm -rf conftest*
4643 if test $ac_cv_sys_file_offset_bits = unknown; then
4644 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4645$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
4646if test "${ac_cv_sys_large_files+set}" = set; then :
4647 $as_echo_n "(cached) " >&6
4648else
4649 while :; do
4650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4651/* end confdefs.h. */
4652#include <sys/types.h>
4653 /* Check that off_t can represent 2**63 - 1 correctly.
4654 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4655 since some C++ compilers masquerading as C compilers
4656 incorrectly reject 9223372036854775807. */
4657#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4658 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4659 && LARGE_OFF_T % 2147483647 == 1)
4660 ? 1 : -1];
4661int
4662main ()
4663{
4664
4665 ;
4666 return 0;
4667}
4668_ACEOF
4669if ac_fn_c_try_compile "$LINENO"; then :
4670 ac_cv_sys_large_files=no; break
4671fi
4672rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4674/* end confdefs.h. */
4675#define _LARGE_FILES 1
4676#include <sys/types.h>
4677 /* Check that off_t can represent 2**63 - 1 correctly.
4678 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4679 since some C++ compilers masquerading as C compilers
4680 incorrectly reject 9223372036854775807. */
4681#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4682 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4683 && LARGE_OFF_T % 2147483647 == 1)
4684 ? 1 : -1];
4685int
4686main ()
4687{
4688
4689 ;
4690 return 0;
4691}
4692_ACEOF
4693if ac_fn_c_try_compile "$LINENO"; then :
4694 ac_cv_sys_large_files=1; break
4695fi
4696rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4697 ac_cv_sys_large_files=unknown
4698 break
4699done
4700fi
4701{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4702$as_echo "$ac_cv_sys_large_files" >&6; }
4703case $ac_cv_sys_large_files in #(
4704 no | unknown) ;;
4705 *)
4706cat >>confdefs.h <<_ACEOF
4707#define _LARGE_FILES $ac_cv_sys_large_files
4708_ACEOF
4709;;
4710esac
4711rm -rf conftest*
4712 fi
4713fi
4714
4715
4716
81ecdfbb
RW
4717
4718
4719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5
4720$as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; }
4721if test "${am_cv_prog_cc_stdc+set}" = set; then :
4722 $as_echo_n "(cached) " >&6
4723else
4724 am_cv_prog_cc_stdc=no
4725ac_save_CC="$CC"
4726# Don't try gcc -ansi; that turns off useful extensions and
4727# breaks some systems' header files.
4728# AIX -qlanglvl=ansi
4729# Ultrix and OSF/1 -std1
4730# HP-UX 10.20 and later -Ae
4731# HP-UX older versions -Aa -D_HPUX_SOURCE
4732# SVR4 -Xc -D__EXTENSIONS__
4733for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4734do
783e057b 4735 CC="$ac_save_CC $ac_arg"
81ecdfbb 4736 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4737/* end confdefs.h. */
4738#include <stdarg.h>
4739#include <stdio.h>
4740#include <sys/types.h>
4741#include <sys/stat.h>
4742/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4743struct buf { int x; };
4744FILE * (*rcsopen) (struct buf *, struct stat *, int);
4745static char *e (p, i)
4746 char **p;
4747 int i;
4748{
4749 return p[i];
4750}
4751static char *f (char * (*g) (char **, int), char **p, ...)
4752{
4753 char *s;
4754 va_list v;
4755 va_start (v,p);
4756 s = g (p, va_arg (v,int));
4757 va_end (v);
4758 return s;
4759}
4760int test (int i, double x);
4761struct s1 {int (*f) (int a);};
4762struct s2 {int (*f) (double a);};
4763int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4764int argc;
4765char **argv;
4766
4767int
4768main ()
4769{
4770
4771return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4772
4773 ;
4774 return 0;
4775}
4776_ACEOF
81ecdfbb 4777if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4778 am_cv_prog_cc_stdc="$ac_arg"; break
783e057b 4779fi
81ecdfbb 4780rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
4781done
4782CC="$ac_save_CC"
4783
4784fi
4785
4786if test -z "$am_cv_prog_cc_stdc"; then
81ecdfbb
RW
4787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4788$as_echo "none needed" >&6; }
783e057b 4789else
81ecdfbb
RW
4790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5
4791$as_echo "$am_cv_prog_cc_stdc" >&6; }
783e057b
DJ
4792fi
4793case "x$am_cv_prog_cc_stdc" in
4794 x|xno) ;;
4795 *) CC="$CC $am_cv_prog_cc_stdc" ;;
4796esac
4797
4869db5e
RM
4798# expand $ac_aux_dir to an absolute path
4799am_aux_dir=`cd $ac_aux_dir && pwd`
4800
4801if test x"${install_sh}" != xset; then
4802 case $am_aux_dir in
4803 *\ * | *\ *)
4804 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
4805 *)
4806 install_sh="\${SHELL} $am_aux_dir/install-sh"
4807 esac
4808fi
4809
4810# Installed binaries are usually stripped using `strip' when the user
4811# run `make install-strip'. However `strip' might not be the right
4812# tool to use in cross-compilation environments, therefore Automake
4813# will honor the `STRIP' environment variable to overrule this program.
4814if test "$cross_compiling" != no; then
4815 if test -n "$ac_tool_prefix"; then
4816 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4817set dummy ${ac_tool_prefix}strip; ac_word=$2
4818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4819$as_echo_n "checking for $ac_word... " >&6; }
4820if test "${ac_cv_prog_STRIP+set}" = set; then :
4821 $as_echo_n "(cached) " >&6
4822else
4823 if test -n "$STRIP"; then
4824 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4825else
4826as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4827for as_dir in $PATH
4828do
4829 IFS=$as_save_IFS
4830 test -z "$as_dir" && as_dir=.
4831 for ac_exec_ext in '' $ac_executable_extensions; do
4832 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4833 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4834 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4835 break 2
4836 fi
4837done
4838 done
4839IFS=$as_save_IFS
4840
4841fi
4842fi
4843STRIP=$ac_cv_prog_STRIP
4844if test -n "$STRIP"; then
4845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
4846$as_echo "$STRIP" >&6; }
4847else
4848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4849$as_echo "no" >&6; }
4850fi
4851
4852
4853fi
4854if test -z "$ac_cv_prog_STRIP"; then
4855 ac_ct_STRIP=$STRIP
4856 # Extract the first word of "strip", so it can be a program name with args.
4857set dummy strip; ac_word=$2
4858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4859$as_echo_n "checking for $ac_word... " >&6; }
4860if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
4861 $as_echo_n "(cached) " >&6
4862else
4863 if test -n "$ac_ct_STRIP"; then
4864 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
4865else
4866as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4867for as_dir in $PATH
4868do
4869 IFS=$as_save_IFS
4870 test -z "$as_dir" && as_dir=.
4871 for ac_exec_ext in '' $ac_executable_extensions; do
4872 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4873 ac_cv_prog_ac_ct_STRIP="strip"
4874 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4875 break 2
4876 fi
4877done
4878 done
4879IFS=$as_save_IFS
4880
4881fi
4882fi
4883ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
4884if test -n "$ac_ct_STRIP"; then
4885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
4886$as_echo "$ac_ct_STRIP" >&6; }
4887else
4888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4889$as_echo "no" >&6; }
4890fi
4891
4892 if test "x$ac_ct_STRIP" = x; then
4893 STRIP=":"
4894 else
4895 case $cross_compiling:$ac_tool_warned in
4896yes:)
4897{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4898$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4899ac_tool_warned=yes ;;
4900esac
4901 STRIP=$ac_ct_STRIP
4902 fi
4903else
4904 STRIP="$ac_cv_prog_STRIP"
4905fi
4906
4907fi
4908INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
4909
783e057b
DJ
4910
4911ac_aux_dir=
81ecdfbb
RW
4912for ac_dir in .. "$srcdir"/..; do
4913 for ac_t in install-sh install.sh shtool; do
4914 if test -f "$ac_dir/$ac_t"; then
4915 ac_aux_dir=$ac_dir
4916 ac_install_sh="$ac_aux_dir/$ac_t -c"
4917 break 2
4918 fi
4919 done
783e057b
DJ
4920done
4921if test -z "$ac_aux_dir"; then
81ecdfbb 4922 as_fn_error "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
783e057b 4923fi
81ecdfbb
RW
4924
4925# These three variables are undocumented and unsupported,
4926# and are intended to be withdrawn in a future Autoconf release.
4927# They can cause serious problems if a builder's source tree is in a directory
4928# whose full name contains unusual characters.
4929ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4930ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4931ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4932
783e057b 4933
783e057b 4934
9009e1ae
MR
4935test "$program_prefix" != NONE &&
4936 program_transform_name="s&^&$program_prefix&;$program_transform_name"
4937# Use a double $ so make ignores it.
4938test "$program_suffix" != NONE &&
4939 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
4940# Double any \ or $.
4941# By default was `s,x,x', remove it if useless.
4942ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
4943program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
4944
81ecdfbb 4945
3bc3d82a
PA
4946# See if we are building with C++, and substitute COMPILER.
4947
4948 # Check whether --enable-build-with-cxx was given.
4949if test "${enable_build_with_cxx+set}" = set; then :
4950 enableval=$enable_build_with_cxx; case $enableval in
4951 yes | no)
4952 ;;
4953 *)
4954 as_fn_error "bad value $enableval for --enable-build-with-cxx" "$LINENO" 5 ;;
4955 esac
4956else
4957 enable_build_with_cxx=no
4958fi
4959
4960
4961 if test "$enable_build_with_cxx" = "yes"; then
4962 # We're using -fpermissive as shortcut for now.
4963 COMPILER='$(CXX) -fpermissive'
4964 else
4965 COMPILER='$(CC)'
4966 fi
4967
4968
4969
a417dc56
RW
4970# Dependency checking.
4971rm -rf .tst 2>/dev/null
4972mkdir .tst 2>/dev/null
4973if test -d .tst; then
4974 am__leading_dot=.
4975else
4976 am__leading_dot=_
4977fi
4978rmdir .tst 2>/dev/null
4979
4980DEPDIR="${am__leading_dot}deps"
4981
81ecdfbb 4982ac_config_commands="$ac_config_commands depdir"
a417dc56
RW
4983
4984
4985depcc="$CC" am_compiler_list=
4986
4987am_depcomp=$ac_aux_dir/depcomp
81ecdfbb
RW
4988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
4989$as_echo_n "checking dependency style of $depcc... " >&6; }
4990if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
4991 $as_echo_n "(cached) " >&6
a417dc56
RW
4992else
4993 if test -f "$am_depcomp"; then
4994 # We make a subdir and do the tests there. Otherwise we can end up
4995 # making bogus files that we don't know about and never remove. For
4996 # instance it was reported that on HP-UX the gcc test will end up
4997 # making a dummy file named `D' -- because `-MD' means `put the output
4998 # in D'.
4999 mkdir conftest.dir
5000 # Copy depcomp to subdir because otherwise we won't find it if we're
5001 # using a relative directory.
5002 cp "$am_depcomp" conftest.dir
5003 cd conftest.dir
5004 # We will build objects and dependencies in a subdirectory because
5005 # it helps to detect inapplicable dependency modes. For instance
5006 # both Tru64's cc and ICC support -MD to output dependencies as a
5007 # side effect of compilation, but ICC will put the dependencies in
5008 # the current directory while Tru64 will put them in the object
5009 # directory.
5010 mkdir sub
5011
5012 am_cv_CC_dependencies_compiler_type=none
5013 if test "$am_compiler_list" = ""; then
5014 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
5015 fi
5016 for depmode in $am_compiler_list; do
5017 if test $depmode = none; then break; fi
5018
81ecdfbb 5019 $as_echo "$as_me:$LINENO: trying $depmode" >&5
a417dc56
RW
5020 # Setup a source with many dependencies, because some compilers
5021 # like to wrap large dependency lists on column 80 (with \), and
5022 # we should not choose a depcomp mode which is confused by this.
5023 #
5024 # We need to recreate these files for each test, as the compiler may
5025 # overwrite some of them when testing with obscure command lines.
5026 # This happens at least with the AIX C compiler.
5027 : > sub/conftest.c
5028 for i in 1 2 3 4 5 6; do
5029 echo '#include "conftst'$i'.h"' >> sub/conftest.c
5030 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
5031 # Solaris 8's {/usr,}/bin/sh.
5032 touch sub/conftst$i.h
5033 done
5034 echo "include sub/conftest.Po" > confmf
5035
5036 # We check with `-c' and `-o' for the sake of the "dashmstdout"
5037 # mode. It turns out that the SunPro C++ compiler does not properly
5038 # handle `-M -o', and we need to detect this.
5039 depcmd="depmode=$depmode \
5040 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
5041 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
5042 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
5043 echo "| $depcmd" | sed -e 's/ */ /g' >&5
5044 if env $depcmd > conftest.err 2>&1 &&
5045 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
5046 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
5047 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
5048 # icc doesn't choke on unknown options, it will just issue warnings
5049 # or remarks (even with -Werror). So we grep stderr for any message
5050 # that says an option was ignored or not supported.
5051 # When given -MP, icc 7.0 and 7.1 complain thusly:
5052 # icc: Command line warning: ignoring option '-M'; no argument required
5053 # The diagnosis changed in icc 8.0:
5054 # icc: Command line remark: option '-MP' not supported
5055 if (grep 'ignoring option' conftest.err ||
5056 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
5057 am_cv_CC_dependencies_compiler_type=$depmode
81ecdfbb 5058 $as_echo "$as_me:$LINENO: success" >&5
a417dc56
RW
5059 break
5060 fi
5061 fi
81ecdfbb 5062 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
a417dc56
RW
5063 sed -e 's/^/| /' < conftest.err >&5
5064 done
5065
5066 cd ..
5067 rm -rf conftest.dir
5068else
5069 am_cv_CC_dependencies_compiler_type=none
5070fi
5071
5072fi
81ecdfbb
RW
5073{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
5074$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
a417dc56 5075if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
81ecdfbb 5076then as_fn_error "no usable dependency style found" "$LINENO" 5
a417dc56
RW
5077else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
5078
5079fi
5080
5081
5082# Check for the 'make' the user wants to use.
5083for ac_prog in make
5084do
5085 # Extract the first word of "$ac_prog", so it can be a program name with args.
5086set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
5087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5088$as_echo_n "checking for $ac_word... " >&6; }
5089if test "${ac_cv_prog_MAKE+set}" = set; then :
5090 $as_echo_n "(cached) " >&6
a417dc56
RW
5091else
5092 if test -n "$MAKE"; then
5093 ac_cv_prog_MAKE="$MAKE" # Let the user override the test.
5094else
5095as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5096for as_dir in $PATH
5097do
5098 IFS=$as_save_IFS
5099 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5100 for ac_exec_ext in '' $ac_executable_extensions; do
5101 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
a417dc56 5102 ac_cv_prog_MAKE="$ac_prog"
81ecdfbb 5103 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
a417dc56
RW
5104 break 2
5105 fi
5106done
81ecdfbb
RW
5107 done
5108IFS=$as_save_IFS
a417dc56
RW
5109
5110fi
5111fi
5112MAKE=$ac_cv_prog_MAKE
5113if test -n "$MAKE"; then
81ecdfbb
RW
5114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
5115$as_echo "$MAKE" >&6; }
a417dc56 5116else
81ecdfbb
RW
5117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5118$as_echo "no" >&6; }
a417dc56
RW
5119fi
5120
81ecdfbb 5121
a417dc56
RW
5122 test -n "$MAKE" && break
5123done
5124
5125MAKE_IS_GNU=
5126case "`$MAKE --version 2>&1 | sed 1q`" in
5127 *GNU*)
5128 MAKE_IS_GNU=yes
5129 ;;
5130esac
81ecdfbb 5131 if test "$MAKE_IS_GNU" = yes; then
a417dc56
RW
5132 GMAKE_TRUE=
5133 GMAKE_FALSE='#'
5134else
5135 GMAKE_TRUE='#'
5136 GMAKE_FALSE=
5137fi
5138
81ecdfbb
RW
5139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
5140$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
5141set x ${MAKE-make}
5142ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
5143if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
5144 $as_echo_n "(cached) " >&6
a417dc56
RW
5145else
5146 cat >conftest.make <<\_ACEOF
81ecdfbb 5147SHELL = /bin/sh
a417dc56 5148all:
81ecdfbb 5149 @echo '@@@%%%=$(MAKE)=@@@%%%'
a417dc56
RW
5150_ACEOF
5151# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
81ecdfbb
RW
5152case `${MAKE-make} -f conftest.make 2>/dev/null` in
5153 *@@@%%%=?*=@@@%%%*)
5154 eval ac_cv_prog_make_${ac_make}_set=yes;;
5155 *)
5156 eval ac_cv_prog_make_${ac_make}_set=no;;
5157esac
a417dc56
RW
5158rm -f conftest.make
5159fi
81ecdfbb
RW
5160if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
5161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5162$as_echo "yes" >&6; }
a417dc56
RW
5163 SET_MAKE=
5164else
81ecdfbb
RW
5165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5166$as_echo "no" >&6; }
a417dc56
RW
5167 SET_MAKE="MAKE=${MAKE-make}"
5168fi
5169
5170
648d586d
JB
5171gnulib_extra_configure_args=
5172# If large-file support is disabled, make sure gnulib does the same.
5173if test "$enable_largefile" = no; then
5174gnulib_extra_configure_args="$gnulib_extra_configure_args --disable-largefile"
5175fi
5176
c971b7fa
PA
5177# Configure gnulib. We need to build gnulib under some other
5178# directory not "gnulib", to avoid the problem of both GDB and
5179# GDBserver wanting to build it in the same directory, when building
5180# in the source dir.
783e057b 5181
c971b7fa
PA
5182 in_src="gnulib"
5183 in_build="build-gnulib"
648d586d 5184 in_extra_args="$gnulib_extra_configure_args"
c971b7fa
PA
5185
5186 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
5187 # so they do not pile up.
5188 ac_sub_configure_args=
5189 ac_prev=
5190 eval "set x $ac_configure_args"
5191 shift
5192 for ac_arg
5193 do
5194 if test -n "$ac_prev"; then
5195 ac_prev=
5196 continue
5197 fi
5198 case $ac_arg in
5199 -cache-file | --cache-file | --cache-fil | --cache-fi \
5200 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
5201 ac_prev=cache_file ;;
5202 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
5203 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
5204 | --c=*)
5205 ;;
5206 --config-cache | -C)
5207 ;;
5208 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
5209 ac_prev=srcdir ;;
5210 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
5211 ;;
5212 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
5213 ac_prev=prefix ;;
5214 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
5215 ;;
5216 --disable-option-checking)
5217 ;;
5218 *)
5219 case $ac_arg in
5220 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
5221 esac
5222 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
5223 esac
5224 done
5225
5226 # Always prepend --prefix to ensure using the same prefix
5227 # in subdir configurations.
5228 ac_arg="--prefix=$prefix"
5229 case $ac_arg in
5230 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
5231 esac
5232 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
5233
5234 # Pass --silent
5235 if test "$silent" = yes; then
5236 ac_sub_configure_args="--silent $ac_sub_configure_args"
5237 fi
5238
5239 # Always prepend --disable-option-checking to silence warnings, since
5240 # different subdirs can have different --enable and --with options.
5241 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
5242
5243 ac_popdir=`pwd`
5244 ac_dir=$in_build
5245
5246 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
5247 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
5248 $as_echo "$ac_msg" >&6
5249 as_dir="$ac_dir"; as_fn_mkdir_p
5250
38ea300a
PA
5251 case $srcdir in
5252 [\\/]* | ?:[\\/]* )
5253 ac_srcdir=$srcdir/$in_src ;;
5254 *) # Relative name.
5255 ac_srcdir=../$srcdir/$in_src ;;
5256 esac
c971b7fa
PA
5257
5258 cd "$ac_dir"
5259
5260 ac_sub_configure=$ac_srcdir/configure
5261
5262 # Make the cache file name correct relative to the subdirectory.
5263 case $cache_file in
5264 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
5265 *) # Relative name.
5266 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
5267 esac
5268
648d586d
JB
5269 if test -n "$in_extra_args"; then
5270 # Add the extra args at the end.
5271 ac_sub_configure_args="$ac_sub_configure_args $in_extra_args"
5272 fi
5273
c971b7fa
PA
5274 { $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
5275$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
5276 # The eval makes quoting arguments work.
5277 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
5278 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
5279 as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
5280
5281 cd "$ac_popdir"
783e057b 5282
c971b7fa
PA
5283
5284
5285CONFIG_OBS=
5286CONFIG_DEPS=
5287CONFIG_SRCS=
5288ENABLE_CFLAGS=
5289
5290CONFIG_ALL=
5291CONFIG_CLEAN=
5292CONFIG_INSTALL=
5293CONFIG_UNINSTALL=
5294
5295# If we haven't got the data from the intl directory,
5296# assume NLS is disabled.
5297USE_NLS=no
5298LIBINTL=
5299LIBINTL_DEP=
5300INCINTL=
5301XGETTEXT=
5302GMSGFMT=
5303POSUB=
783e057b
DJ
5304
5305if test -f ../intl/config.intl; then
5306 . ../intl/config.intl
5307fi
81ecdfbb
RW
5308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
5309$as_echo_n "checking whether NLS is requested... " >&6; }
783e057b 5310if test x"$USE_NLS" != xyes; then
81ecdfbb
RW
5311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5312$as_echo "no" >&6; }
783e057b 5313else
81ecdfbb
RW
5314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5315$as_echo "yes" >&6; }
783e057b 5316
81ecdfbb 5317$as_echo "#define ENABLE_NLS 1" >>confdefs.h
783e057b
DJ
5318
5319
81ecdfbb
RW
5320 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
5321$as_echo_n "checking for catalogs to be installed... " >&6; }
783e057b
DJ
5322 # Look for .po and .gmo files in the source directory.
5323 CATALOGS=
5324 XLINGUAS=
5325 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
5326 # If there aren't any .gmo files the shell will give us the
5327 # literal string "../path/to/srcdir/po/*.gmo" which has to be
5328 # weeded out.
5329 case "$cat" in *\**)
5330 continue;;
5331 esac
5332 # The quadruple backslash is collapsed to a double backslash
5333 # by the backticks, then collapsed again by the double quotes,
5334 # leaving us with one backslash in the sed expression (right
5335 # before the dot that mustn't act as a wildcard).
c971b7fa
PA
5336 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
5337 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
5338 # The user is allowed to set LINGUAS to a list of languages to
5339 # install catalogs for. If it's empty that means "all of them."
5340 if test "x$LINGUAS" = x; then
5341 CATALOGS="$CATALOGS $cat"
5342 XLINGUAS="$XLINGUAS $lang"
5343 else
5344 case "$LINGUAS" in *$lang*)
5345 CATALOGS="$CATALOGS $cat"
5346 XLINGUAS="$XLINGUAS $lang"
5347 ;;
5348 esac
e28b3332
DJ
5349 fi
5350 done
c971b7fa
PA
5351 LINGUAS="$XLINGUAS"
5352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
5353$as_echo "$LINGUAS" >&6; }
5354
5355
5356 DATADIRNAME=share
5357
5358 INSTOBJEXT=.mo
5359
5360 GENCAT=gencat
5361
5362 CATOBJEXT=.gmo
e28b3332 5363
e28b3332
DJ
5364fi
5365
c971b7fa
PA
5366localedir='${datadir}/locale'
5367
5368
5369if test x"$USE_NLS" = xyes; then
5370 CONFIG_ALL="$CONFIG_ALL all-po"
5371 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
5372 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
5373 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
e28b3332 5374fi
e28b3332 5375
c971b7fa
PA
5376GNULIB=build-gnulib/import
5377
5378# For Makefile dependencies.
5379GNULIB_STDINT_H=
5380if test x"$STDINT_H" != x; then
5381 GNULIB_STDINT_H=$GNULIB/$STDINT_H
e28b3332
DJ
5382fi
5383
5384
c971b7fa
PA
5385PACKAGE=gdb
5386
5387cat >>confdefs.h <<_ACEOF
5388#define PACKAGE "$PACKAGE"
5389_ACEOF
5390
5391
5392
5393# We never need to detect it in this sub-configure.
5394# But preserve it for config.status --recheck.
5395
5396
5397
5398MAKEINFO_EXTRA_FLAGS=""
5399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5
5400$as_echo_n "checking whether $MAKEINFO supports @click... " >&6; }
5401if test "${gdb_cv_have_makeinfo_click+set}" = set; then :
5402 $as_echo_n "(cached) " >&6
5403else
5404 echo '@clicksequence{a @click{} b}' >conftest.texinfo
5405 if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then
5406 gdb_cv_have_makeinfo_click=yes
5407 else
5408 gdb_cv_have_makeinfo_click=no
5409 fi
5410fi
5411{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5
5412$as_echo "$gdb_cv_have_makeinfo_click" >&6; }
5413if test x"$gdb_cv_have_makeinfo_click" = xyes; then
5414 MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK"
5415fi
e28b3332
DJ
5416
5417
bec39cab
AC
5418
5419
81ecdfbb
RW
5420# Check whether --with-separate-debug-dir was given.
5421if test "${with_separate_debug_dir+set}" = set; then :
5422 withval=$with_separate_debug_dir;
b14b1491
TT
5423 DEBUGDIR=$withval
5424else
5425 DEBUGDIR=${libdir}/debug
81ecdfbb
RW
5426fi
5427
20e95c23 5428
783e057b
DJ
5429 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5430 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 5431 ac_define_dir=`eval echo $DEBUGDIR`
783e057b 5432 ac_define_dir=`eval echo $ac_define_dir`
20e95c23 5433
783e057b
DJ
5434cat >>confdefs.h <<_ACEOF
5435#define DEBUGDIR "$ac_define_dir"
20e95c23 5436_ACEOF
20e95c23 5437
20e95c23 5438
20e95c23 5439
0c4a4063 5440
b14b1491
TT
5441 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
5442 if test "x$prefix" = xNONE; then
5443 test_prefix=/usr/local
5444 else
5445 test_prefix=$prefix
5446 fi
783e057b 5447 else
b14b1491 5448 test_prefix=$exec_prefix
783e057b 5449 fi
b14b1491
TT
5450 value=0
5451 case ${ac_define_dir} in
5452 "${test_prefix}"|"${test_prefix}/"*|\
5453 '${exec_prefix}'|'${exec_prefix}/'*)
5454 value=1
5455 ;;
5456 esac
5457
5458cat >>confdefs.h <<_ACEOF
5459#define DEBUGDIR_RELOCATABLE $value
5460_ACEOF
5461
5462
5463
0c4a4063 5464
f83d8a90
DE
5465# We can't pass paths as command line arguments.
5466# Mingw32 tries to be clever and will convert the paths for us.
5467# For example -DBINDIR="/usr/local/bin" passed on the command line may get
5468# converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin".
5469# This breaks GDB's relocatable path conversions since paths passed in
5470# config.h would not get so translated, the path prefixes no longer match.
5471
5472 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5473 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5474 ac_define_dir=`eval echo $bindir`
5475 ac_define_dir=`eval echo $ac_define_dir`
5476
5477cat >>confdefs.h <<_ACEOF
5478#define BINDIR "$ac_define_dir"
5479_ACEOF
5480
5481
5482
b14b1491
TT
5483# GDB's datadir relocation
5484
5485
5486
81ecdfbb
RW
5487# Check whether --with-gdb-datadir was given.
5488if test "${with_gdb_datadir+set}" = set; then :
5489 withval=$with_gdb_datadir;
b14b1491 5490 GDB_DATADIR=$withval
20e95c23 5491else
b14b1491 5492 GDB_DATADIR=${datadir}/gdb
81ecdfbb
RW
5493fi
5494
20e95c23 5495
b14b1491
TT
5496 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5497 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5498 ac_define_dir=`eval echo $GDB_DATADIR`
5499 ac_define_dir=`eval echo $ac_define_dir`
5500
5501cat >>confdefs.h <<_ACEOF
5502#define GDB_DATADIR "$ac_define_dir"
20e95c23
DJ
5503_ACEOF
5504
b14b1491
TT
5505
5506
0c4a4063 5507
b14b1491
TT
5508 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
5509 if test "x$prefix" = xNONE; then
5510 test_prefix=/usr/local
5511 else
5512 test_prefix=$prefix
5513 fi
5514 else
5515 test_prefix=$exec_prefix
5516 fi
5517 value=0
5518 case ${ac_define_dir} in
5519 "${test_prefix}"|"${test_prefix}/"*|\
5520 '${exec_prefix}'|'${exec_prefix}/'*)
5521 value=1
5522 ;;
5523 esac
5524
5525cat >>confdefs.h <<_ACEOF
5526#define GDB_DATADIR_RELOCATABLE $value
5527_ACEOF
5528
5529
783e057b 5530
20e95c23 5531
0c4a4063 5532
81ecdfbb
RW
5533# Check whether --with-relocated-sources was given.
5534if test "${with_relocated_sources+set}" = set; then :
5535 withval=$with_relocated_sources; reloc_srcdir="${withval}"
29b0e8a2
JM
5536
5537 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5538 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5539 ac_define_dir=`eval echo $reloc_srcdir`
5540 ac_define_dir=`eval echo $ac_define_dir`
5541
5542cat >>confdefs.h <<_ACEOF
5543#define RELOC_SRCDIR "$ac_define_dir"
5544_ACEOF
5545
5546
5547
81ecdfbb
RW
5548fi
5549
29b0e8a2 5550
7349ff92
JK
5551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5
5552$as_echo_n "checking for default auto-load directory... " >&6; }
5553
5554# Check whether --with-auto-load-dir was given.
5555if test "${with_auto_load_dir+set}" = set; then :
5556 withval=$with_auto_load_dir;
5557else
1564a261 5558 with_auto_load_dir='$debugdir:$datadir/auto-load'
7349ff92
JK
5559fi
5560
1564a261 5561escape_dir=`echo $with_auto_load_dir | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'`
7349ff92
JK
5562
5563 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5564 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5565 ac_define_dir=`eval echo $escape_dir`
5566 ac_define_dir=`eval echo $ac_define_dir`
5567
5568cat >>confdefs.h <<_ACEOF
5569#define AUTO_LOAD_DIR "$ac_define_dir"
5570_ACEOF
5571
5572
5573{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5
5574$as_echo "$with_auto_load_dir" >&6; }
5575
bccbefd2
JK
5576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5
5577$as_echo_n "checking for default auto-load safe-path... " >&6; }
5578
5579# Check whether --with-auto-load-safe-path was given.
5580if test "${with_auto_load_safe_path+set}" = set; then :
5581 withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then
6dea1fbd
JK
5582 with_auto_load_safe_path="/"
5583 fi
bccbefd2 5584else
7349ff92 5585 with_auto_load_safe_path="$with_auto_load_dir"
bccbefd2
JK
5586fi
5587
1564a261 5588escape_dir=`echo $with_auto_load_safe_path | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'`
bccbefd2
JK
5589
5590 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5591 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6dea1fbd 5592 ac_define_dir=`eval echo $escape_dir`
bccbefd2
JK
5593 ac_define_dir=`eval echo $ac_define_dir`
5594
5595cat >>confdefs.h <<_ACEOF
6dea1fbd 5596#define AUTO_LOAD_SAFE_PATH "$ac_define_dir"
bccbefd2
JK
5597_ACEOF
5598
5599
5600{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
5601$as_echo "$with_auto_load_safe_path" >&6; }
5602
29b0e8a2 5603
20e95c23 5604
5ae98d25 5605subdirs="$subdirs testsuite"
20e95c23
DJ
5606
5607
783e057b 5608# Check whether to support alternative target configurations
81ecdfbb
RW
5609# Check whether --enable-targets was given.
5610if test "${enable_targets+set}" = set; then :
5611 enableval=$enable_targets; case "${enableval}" in
5612 yes | "") as_fn_error "enable-targets option must specify target names or 'all'" "$LINENO" 5
783e057b
DJ
5613 ;;
5614 no) enable_targets= ;;
5615 *) enable_targets=$enableval ;;
5616esac
81ecdfbb
RW
5617fi
5618
20e95c23 5619
783e057b 5620# Check whether to enable 64-bit support on 32-bit hosts
81ecdfbb
RW
5621# Check whether --enable-64-bit-bfd was given.
5622if test "${enable_64_bit_bfd+set}" = set; then :
5623 enableval=$enable_64_bit_bfd; case "${enableval}" in
783e057b
DJ
5624 yes) want64=true ;;
5625 no) want64=false ;;
81ecdfbb 5626 *) as_fn_error "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
783e057b
DJ
5627esac
5628else
5629 want64=false
81ecdfbb
RW
5630fi
5631
783e057b
DJ
5632# Provide defaults for some variables set by the per-host and per-target
5633# configuration.
5634gdb_host_obs=posix-hdep.o
20e95c23 5635
783e057b
DJ
5636if test "${target}" = "${host}"; then
5637 gdb_native=yes
5638else
5639 gdb_native=no
5640fi
20e95c23 5641
783e057b 5642. $srcdir/configure.host
20e95c23 5643
fb23d554
SDJ
5644# Add in the common host objects.
5645. $srcdir/common/common.host
5646gdb_host_obs="$gdb_host_obs $common_host_obs"
5647
783e057b 5648# Accumulate some settings from configure.tgt over all enabled targets
20e95c23 5649
783e057b
DJ
5650TARGET_OBS=
5651all_targets=
b292c783 5652HAVE_NATIVE_GCORE_TARGET=
20e95c23 5653
783e057b 5654for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
20e95c23 5655do
783e057b
DJ
5656 if test "$targ_alias" = "all"; then
5657 all_targets=true
5658 else
5659 # Canonicalize the secondary target names.
5660 result=`$ac_config_sub $targ_alias 2>/dev/null`
5661 if test -n "$result"; then
5662 targ=$result
5663 else
5664 targ=$targ_alias
5665 fi
20e95c23 5666
783e057b 5667 . ${srcdir}/configure.tgt
20e95c23 5668
bf307134
JB
5669 if test -z "${gdb_target_obs}"; then :
5670 as_fn_error "configuration ${targ} is unsupported." "$LINENO" 5
5671fi
5672
783e057b
DJ
5673 # Target-specific object files
5674 for i in ${gdb_target_obs}; do
5675 case " $TARGET_OBS " in
5676 *" ${i} "*) ;;
5677 *)
5678 TARGET_OBS="$TARGET_OBS ${i}"
5679 ;;
5680 esac
5681 done
20e95c23 5682
783e057b
DJ
5683 # Check whether this target needs 64-bit CORE_ADDR
5684 if test x${want64} = xfalse; then
5685 . ${srcdir}/../bfd/config.bfd
5686 fi
b292c783
JK
5687
5688 # Check whether this target is native and supports gcore.
5689 if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \
5690 && $gdb_have_gcore; then
5691 HAVE_NATIVE_GCORE_TARGET=1
5692 fi
783e057b 5693 fi
20e95c23
DJ
5694done
5695
783e057b
DJ
5696if test x${all_targets} = xtrue; then
5697
5698 # We want all 64-bit targets if we either:
5699 # - run on a 64-bit host or
5700 # - already require 64-bit support for some other target or
5701 # - the --enable-64-bit-bfd option was supplied
5702 # Otherwise we only support all 32-bit targets.
5703 #
5704 # NOTE: This test must be in sync with the corresponding
5705 # tests in BFD!
20e95c23 5706
783e057b 5707 if test x${want64} = xfalse; then
81ecdfbb
RW
5708 # The cast to long int works around a bug in the HP C Compiler
5709# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5710# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5711# This bug is HP SR number 8606223364.
5712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
5713$as_echo_n "checking size of long... " >&6; }
5714if test "${ac_cv_sizeof_long+set}" = set; then :
5715 $as_echo_n "(cached) " >&6
c0993dbe 5716else
81ecdfbb 5717 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
c0993dbe 5718
81ecdfbb
RW
5719else
5720 if test "$ac_cv_type_long" = yes; then
5721 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5722$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5723{ as_fn_set_status 77
5724as_fn_error "cannot compute sizeof (long)
5725See \`config.log' for more details." "$LINENO" 5; }; }
5726 else
5727 ac_cv_sizeof_long=0
5728 fi
c0993dbe 5729fi
81ecdfbb 5730
c0993dbe 5731fi
81ecdfbb
RW
5732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
5733$as_echo "$ac_cv_sizeof_long" >&6; }
c0993dbe 5734
c0993dbe 5735
c0993dbe 5736
c0993dbe
UW
5737cat >>confdefs.h <<_ACEOF
5738#define SIZEOF_LONG $ac_cv_sizeof_long
5739_ACEOF
5740
5741
5742 if test "x${ac_cv_sizeof_long}" = "x8"; then
5743 want64=true
5744 fi
5745 fi
5746 if test x${want64} = xtrue; then
5747 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
5748 else
5749 TARGET_OBS='$(ALL_TARGET_OBS)'
5750 fi
5751fi
5752
5753
5754
b292c783 5755
c0993dbe
UW
5756# For other settings, only the main target counts.
5757gdb_sim=
5758gdb_osabi=
5759build_gdbserver=
5760targ=$target; . ${srcdir}/configure.tgt
5761
5762# Fetch the default architecture and default target vector from BFD.
5763targ=$target; . $srcdir/../bfd/config.bfd
5764
5765# We only want the first architecture, so strip off the others if
5766# there is more than one.
5767targ_archs=`echo $targ_archs | sed 's/ .*//'`
5768
5769if test "x$targ_archs" != x; then
5770
5771cat >>confdefs.h <<_ACEOF
5772#define DEFAULT_BFD_ARCH $targ_archs
5773_ACEOF
5774
5775fi
5776if test "x$targ_defvec" != x; then
5777
5778cat >>confdefs.h <<_ACEOF
5779#define DEFAULT_BFD_VEC $targ_defvec
5780_ACEOF
5781
5782fi
5783
c0993dbe
UW
5784# The CLI cannot be disabled yet, but may be in the future.
5785
5786# Enable CLI.
81ecdfbb
RW
5787# Check whether --enable-gdbcli was given.
5788if test "${enable_gdbcli+set}" = set; then :
5789 enableval=$enable_gdbcli; case $enableval in
c0993dbe
UW
5790 yes)
5791 ;;
5792 no)
81ecdfbb 5793 as_fn_error "the command-line interface cannot be disabled yet" "$LINENO" 5 ;;
c0993dbe 5794 *)
81ecdfbb 5795 as_fn_error "bad value $enableval for --enable-gdbcli" "$LINENO" 5 ;;
c0993dbe
UW
5796 esac
5797else
5798 enable_gdbcli=yes
81ecdfbb
RW
5799fi
5800
c0993dbe
UW
5801if test x"$enable_gdbcli" = xyes; then
5802 if test -d $srcdir/cli; then
5803 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
5804 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
5805 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
5806 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
5807 fi
5808fi
5809
5810# Enable MI.
81ecdfbb
RW
5811# Check whether --enable-gdbmi was given.
5812if test "${enable_gdbmi+set}" = set; then :
5813 enableval=$enable_gdbmi; case $enableval in
c0993dbe
UW
5814 yes | no)
5815 ;;
5816 *)
81ecdfbb 5817 as_fn_error "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
c0993dbe
UW
5818 esac
5819else
5820 enable_gdbmi=yes
81ecdfbb
RW
5821fi
5822
c0993dbe
UW
5823if test x"$enable_gdbmi" = xyes; then
5824 if test -d $srcdir/mi; then
5825 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
5826 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
5827 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
5828 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
5829 fi
5830fi
5831
5832# Enable TUI.
81ecdfbb
RW
5833# Check whether --enable-tui was given.
5834if test "${enable_tui+set}" = set; then :
5835 enableval=$enable_tui; case $enableval in
3ca64bd3 5836 yes | no | auto)
c0993dbe
UW
5837 ;;
5838 *)
81ecdfbb 5839 as_fn_error "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
c0993dbe
UW
5840 esac
5841else
3ca64bd3 5842 enable_tui=auto
81ecdfbb
RW
5843fi
5844
c0993dbe
UW
5845
5846# Enable gdbtk.
81ecdfbb
RW
5847# Check whether --enable-gdbtk was given.
5848if test "${enable_gdbtk+set}" = set; then :
5849 enableval=$enable_gdbtk; case $enableval in
c0993dbe
UW
5850 yes | no)
5851 ;;
5852 *)
81ecdfbb 5853 as_fn_error "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
c0993dbe
UW
5854 esac
5855else
5062cc19 5856 if test -d $srcdir/gdbtk; then
c0993dbe
UW
5857 enable_gdbtk=yes
5858 else
5859 enable_gdbtk=no
5860 fi
81ecdfbb
RW
5861fi
5862
c0993dbe
UW
5863# We unconditionally disable gdbtk tests on selected platforms.
5864case $host_os in
5865 go32* | windows*)
81ecdfbb
RW
5866 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
5867$as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
c0993dbe
UW
5868 enable_gdbtk=no ;;
5869esac
5870
05e7c244 5871# Libunwind support for ia64.
bec39cab 5872
05e7c244
JK
5873
5874# Check whether --with-libunwind-ia64 was given.
5875if test "${with_libunwind_ia64+set}" = set; then :
5876 withval=$with_libunwind_ia64;
bec39cab 5877else
05e7c244
JK
5878 with_libunwind_ia64=auto
5879fi
bec39cab 5880
05e7c244
JK
5881
5882# Backward compatibility option.
5883if test "${with_libunwind+set}" = set; then
5884 if test x"$with_libunwind_ia64" != xauto; then
5885 as_fn_error "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5
5886 fi
5887 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5
5888$as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;}
5889 with_libunwind_ia64="$with_libunwind"
5890fi
5891
5892case "$with_libunwind_ia64" in
5893 yes | no)
5894 ;;
5895 auto)
5896 for ac_header in libunwind-ia64.h
81ecdfbb 5897do :
b54a8fd7
PA
5898 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
5899if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
bec39cab 5900 cat >>confdefs.h <<_ACEOF
b54a8fd7 5901#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
5902_ACEOF
5903
5904fi
5905
5906done
5907
05e7c244
JK
5908 with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h
5909 ;;
5910 *)
5911 as_fn_error "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5
5912 ;;
5913esac
bec39cab 5914
05e7c244 5915if test x"$with_libunwind_ia64" = xyes; then
b54a8fd7 5916 for ac_header in libunwind-ia64.h
81ecdfbb 5917do :
b54a8fd7
PA
5918 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
5919if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
bec39cab 5920 cat >>confdefs.h <<_ACEOF
b54a8fd7 5921#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
5922_ACEOF
5923
5924fi
5925
5926done
5927
05e7c244
JK
5928 if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then
5929 as_fn_error "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5
5930 fi
5931 CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o"
5932 CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o"
5933 CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c"
a9322a30
TT
5934fi
5935
cb01cfba
JB
5936opt_curses=no
5937
81ecdfbb
RW
5938# Check whether --with-curses was given.
5939if test "${with_curses+set}" = set; then :
5940 withval=$with_curses; opt_curses=$withval
5941fi
5942
cb01cfba 5943
76a39ba7 5944prefer_curses=no
cb01cfba 5945if test "$opt_curses" = "yes"; then
76a39ba7 5946 prefer_curses=yes
cb01cfba
JB
5947fi
5948
a9322a30 5949# Profiling support.
81ecdfbb
RW
5950# Check whether --enable-profiling was given.
5951if test "${enable_profiling+set}" = set; then :
5952 enableval=$enable_profiling; case $enableval in
a9322a30
TT
5953 yes | no)
5954 ;;
5955 *)
81ecdfbb 5956 as_fn_error "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
a9322a30
TT
5957 esac
5958else
5959 enable_profiling=no
81ecdfbb 5960fi
bec39cab 5961
a9322a30
TT
5962
5963for ac_func in monstartup _mcleanup
81ecdfbb
RW
5964do :
5965 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
5966ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
5967eval as_val=\$$as_ac_var
5968 if test "x$as_val" = x""yes; then :
5969 cat >>confdefs.h <<_ACEOF
5970#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 5971_ACEOF
a9322a30 5972
81ecdfbb
RW
5973fi
5974done
a9322a30 5975
81ecdfbb
RW
5976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
5977$as_echo_n "checking for _etext... " >&6; }
5978if test "${ac_cv_var__etext+set}" = set; then :
5979 $as_echo_n "(cached) " >&6
5980else
5981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5982/* end confdefs.h. */
5983#include <stdlib.h>
5984extern char _etext;
a9322a30
TT
5985
5986int
5987main ()
5988{
5989free (&_etext);
5990 ;
5991 return 0;
5992}
bec39cab 5993_ACEOF
81ecdfbb 5994if ac_fn_c_try_link "$LINENO"; then :
a9322a30 5995 ac_cv_var__etext=yes
bec39cab 5996else
81ecdfbb 5997 ac_cv_var__etext=no
bec39cab 5998fi
81ecdfbb
RW
5999rm -f core conftest.err conftest.$ac_objext \
6000 conftest$ac_exeext conftest.$ac_ext
bec39cab 6001fi
81ecdfbb
RW
6002{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
6003$as_echo "$ac_cv_var__etext" >&6; }
a9322a30 6004if test $ac_cv_var__etext = yes; then
60ca704f 6005
81ecdfbb 6006$as_echo "#define HAVE__ETEXT 1" >>confdefs.h
bec39cab 6007
bec39cab 6008fi
81ecdfbb
RW
6009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
6010$as_echo_n "checking for etext... " >&6; }
6011if test "${ac_cv_var_etext+set}" = set; then :
6012 $as_echo_n "(cached) " >&6
bec39cab 6013else
81ecdfbb 6014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6015/* end confdefs.h. */
a9322a30
TT
6016#include <stdlib.h>
6017extern char etext;
bec39cab
AC
6018
6019int
6020main ()
6021{
a9322a30 6022free (&etext);
bec39cab
AC
6023 ;
6024 return 0;
6025}
6026_ACEOF
81ecdfbb 6027if ac_fn_c_try_link "$LINENO"; then :
a9322a30 6028 ac_cv_var_etext=yes
bec39cab 6029else
81ecdfbb 6030 ac_cv_var_etext=no
bec39cab 6031fi
81ecdfbb
RW
6032rm -f core conftest.err conftest.$ac_objext \
6033 conftest$ac_exeext conftest.$ac_ext
bec39cab 6034fi
81ecdfbb
RW
6035{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
6036$as_echo "$ac_cv_var_etext" >&6; }
a9322a30
TT
6037if test $ac_cv_var_etext = yes; then
6038
81ecdfbb 6039$as_echo "#define HAVE_ETEXT 1" >>confdefs.h
bec39cab
AC
6040
6041fi
a9322a30
TT
6042if test "$enable_profiling" = yes ; then
6043 if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
81ecdfbb 6044 as_fn_error "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
a9322a30
TT
6045 fi
6046 PROFILE_CFLAGS=-pg
6047 OLD_CFLAGS="$CFLAGS"
6048 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
bec39cab 6049
81ecdfbb
RW
6050 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
6051$as_echo_n "checking whether $CC supports -pg... " >&6; }
6052if test "${ac_cv_cc_supports_pg+set}" = set; then :
6053 $as_echo_n "(cached) " >&6
bec39cab 6054else
81ecdfbb 6055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6056/* end confdefs.h. */
bec39cab
AC
6057
6058int
6059main ()
6060{
a9322a30 6061int x;
bec39cab
AC
6062 ;
6063 return 0;
6064}
6065_ACEOF
81ecdfbb 6066if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 6067 ac_cv_cc_supports_pg=yes
bec39cab 6068else
81ecdfbb 6069 ac_cv_cc_supports_pg=no
bec39cab 6070fi
81ecdfbb 6071rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 6072fi
81ecdfbb
RW
6073{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
6074$as_echo "$ac_cv_cc_supports_pg" >&6; }
bec39cab 6075
a9322a30 6076 if test $ac_cv_cc_supports_pg = no; then
81ecdfbb 6077 as_fn_error "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
a9322a30 6078 fi
bec39cab 6079
a9322a30 6080 CFLAGS="$OLD_CFLAGS"
bec39cab
AC
6081fi
6082
c16158bc
JM
6083
6084
81ecdfbb
RW
6085# Check whether --with-pkgversion was given.
6086if test "${with_pkgversion+set}" = set; then :
6087 withval=$with_pkgversion; case "$withval" in
6088 yes) as_fn_error "package version not specified" "$LINENO" 5 ;;
c16158bc
JM
6089 no) PKGVERSION= ;;
6090 *) PKGVERSION="($withval) " ;;
6091 esac
6092else
6093 PKGVERSION="(GDB) "
6094
81ecdfbb 6095fi
c16158bc
JM
6096
6097
6098
6099
81ecdfbb
RW
6100
6101# Check whether --with-bugurl was given.
6102if test "${with_bugurl+set}" = set; then :
6103 withval=$with_bugurl; case "$withval" in
6104 yes) as_fn_error "bug URL not specified" "$LINENO" 5 ;;
c16158bc
JM
6105 no) BUGURL=
6106 ;;
6107 *) BUGURL="$withval"
6108 ;;
6109 esac
6110else
6111 BUGURL="http://www.gnu.org/software/gdb/bugs/"
6112
81ecdfbb
RW
6113fi
6114
c16158bc
JM
6115 case ${BUGURL} in
6116 "")
6117 REPORT_BUGS_TO=
6118 REPORT_BUGS_TEXI=
6119 ;;
6120 *)
6121 REPORT_BUGS_TO="<$BUGURL>"
6122 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
6123 ;;
6124 esac;
6125
6126
6127
6128
6129cat >>confdefs.h <<_ACEOF
6130#define PKGVERSION "$PKGVERSION"
6131_ACEOF
6132
6133
6134cat >>confdefs.h <<_ACEOF
6135#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
6136_ACEOF
6137
6138
bec39cab
AC
6139# --------------------- #
6140# Checks for programs. #
6141# --------------------- #
6142
6143for ac_prog in gawk mawk nawk awk
6144do
6145 # Extract the first word of "$ac_prog", so it can be a program name with args.
6146set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
6147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6148$as_echo_n "checking for $ac_word... " >&6; }
6149if test "${ac_cv_prog_AWK+set}" = set; then :
6150 $as_echo_n "(cached) " >&6
bec39cab
AC
6151else
6152 if test -n "$AWK"; then
6153 ac_cv_prog_AWK="$AWK" # Let the user override the test.
6154else
6155as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6156for as_dir in $PATH
6157do
6158 IFS=$as_save_IFS
6159 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6160 for ac_exec_ext in '' $ac_executable_extensions; do
6161 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6162 ac_cv_prog_AWK="$ac_prog"
81ecdfbb 6163 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6164 break 2
6165 fi
6166done
81ecdfbb
RW
6167 done
6168IFS=$as_save_IFS
bec39cab
AC
6169
6170fi
6171fi
6172AWK=$ac_cv_prog_AWK
6173if test -n "$AWK"; then
81ecdfbb
RW
6174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
6175$as_echo "$AWK" >&6; }
bec39cab 6176else
81ecdfbb
RW
6177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6178$as_echo "no" >&6; }
bec39cab
AC
6179fi
6180
bec39cab 6181
81ecdfbb 6182 test -n "$AWK" && break
bec39cab
AC
6183done
6184
c971b7fa
PA
6185# Find a good install program. We prefer a C program (faster),
6186# so one script is as good as another. But avoid the broken or
6187# incompatible versions:
6188# SysV /etc/install, /usr/sbin/install
6189# SunOS /usr/etc/install
6190# IRIX /sbin/install
6191# AIX /bin/install
6192# AmigaOS /C/install, which installs bootblocks on floppy discs
6193# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6194# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6195# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6196# OS/2's system install, which has a completely different semantic
6197# ./install, which can be erroneously created by make from ./install.sh.
6198# Reject install programs that cannot install multiple files.
6199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6200$as_echo_n "checking for a BSD-compatible install... " >&6; }
6201if test -z "$INSTALL"; then
6202if test "${ac_cv_path_install+set}" = set; then :
6203 $as_echo_n "(cached) " >&6
6204else
6205 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6206for as_dir in $PATH
6207do
6208 IFS=$as_save_IFS
6209 test -z "$as_dir" && as_dir=.
6210 # Account for people who put trailing slashes in PATH elements.
6211case $as_dir/ in #((
6212 ./ | .// | /[cC]/* | \
6213 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
6214 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
6215 /usr/ucb/* ) ;;
6216 *)
6217 # OSF1 and SCO ODT 3.0 have their own names for install.
6218 # Don't use installbsd from OSF since it installs stuff as root
6219 # by default.
6220 for ac_prog in ginstall scoinst install; do
6221 for ac_exec_ext in '' $ac_executable_extensions; do
6222 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
6223 if test $ac_prog = install &&
6224 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6225 # AIX install. It has an incompatible calling convention.
6226 :
6227 elif test $ac_prog = install &&
6228 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6229 # program-specific install script used by HP pwplus--don't use.
6230 :
6231 else
6232 rm -rf conftest.one conftest.two conftest.dir
6233 echo one > conftest.one
6234 echo two > conftest.two
6235 mkdir conftest.dir
6236 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6237 test -s conftest.one && test -s conftest.two &&
6238 test -s conftest.dir/conftest.one &&
6239 test -s conftest.dir/conftest.two
6240 then
6241 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6242 break 3
6243 fi
6244 fi
6245 fi
6246 done
6247 done
6248 ;;
6249esac
6250
6251 done
6252IFS=$as_save_IFS
6253
6254rm -rf conftest.one conftest.two conftest.dir
6255
6256fi
6257 if test "${ac_cv_path_install+set}" = set; then
6258 INSTALL=$ac_cv_path_install
6259 else
6260 # As a last resort, use the slow shell script. Don't cache a
6261 # value for INSTALL within a source directory, because that will
6262 # break other packages using the cache if that directory is
6263 # removed, or if the value is a relative name.
6264 INSTALL=$ac_install_sh
6265 fi
6266fi
6267{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6268$as_echo "$INSTALL" >&6; }
6269
6270# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6271# It thinks the first close brace ends the variable substitution.
6272test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6273
6274test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6275
6276test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
bec39cab 6277
81ecdfbb
RW
6278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
6279$as_echo_n "checking whether ln -s works... " >&6; }
bec39cab
AC
6280LN_S=$as_ln_s
6281if test "$LN_S" = "ln -s"; then
81ecdfbb
RW
6282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6283$as_echo "yes" >&6; }
bec39cab 6284else
81ecdfbb
RW
6285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
6286$as_echo "no, using $LN_S" >&6; }
bec39cab
AC
6287fi
6288
6289if test -n "$ac_tool_prefix"; then
6290 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6291set dummy ${ac_tool_prefix}ranlib; ac_word=$2
81ecdfbb
RW
6292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6293$as_echo_n "checking for $ac_word... " >&6; }
6294if test "${ac_cv_prog_RANLIB+set}" = set; then :
6295 $as_echo_n "(cached) " >&6
bec39cab
AC
6296else
6297 if test -n "$RANLIB"; then
6298 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6299else
6300as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6301for as_dir in $PATH
6302do
6303 IFS=$as_save_IFS
6304 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6305 for ac_exec_ext in '' $ac_executable_extensions; do
6306 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6307 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
81ecdfbb 6308 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6309 break 2
6310 fi
6311done
81ecdfbb
RW
6312 done
6313IFS=$as_save_IFS
bec39cab
AC
6314
6315fi
6316fi
6317RANLIB=$ac_cv_prog_RANLIB
6318if test -n "$RANLIB"; then
81ecdfbb
RW
6319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6320$as_echo "$RANLIB" >&6; }
bec39cab 6321else
81ecdfbb
RW
6322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6323$as_echo "no" >&6; }
bec39cab
AC
6324fi
6325
81ecdfbb 6326
bec39cab
AC
6327fi
6328if test -z "$ac_cv_prog_RANLIB"; then
6329 ac_ct_RANLIB=$RANLIB
6330 # Extract the first word of "ranlib", so it can be a program name with args.
6331set dummy ranlib; ac_word=$2
81ecdfbb
RW
6332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6333$as_echo_n "checking for $ac_word... " >&6; }
6334if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
6335 $as_echo_n "(cached) " >&6
bec39cab
AC
6336else
6337 if test -n "$ac_ct_RANLIB"; then
6338 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6339else
6340as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6341for as_dir in $PATH
6342do
6343 IFS=$as_save_IFS
6344 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6345 for ac_exec_ext in '' $ac_executable_extensions; do
6346 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6347 ac_cv_prog_ac_ct_RANLIB="ranlib"
81ecdfbb 6348 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6349 break 2
6350 fi
6351done
81ecdfbb
RW
6352 done
6353IFS=$as_save_IFS
bec39cab 6354
bec39cab
AC
6355fi
6356fi
6357ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6358if test -n "$ac_ct_RANLIB"; then
81ecdfbb
RW
6359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6360$as_echo "$ac_ct_RANLIB" >&6; }
bec39cab 6361else
81ecdfbb
RW
6362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6363$as_echo "no" >&6; }
bec39cab
AC
6364fi
6365
81ecdfbb
RW
6366 if test "x$ac_ct_RANLIB" = x; then
6367 RANLIB=":"
6368 else
6369 case $cross_compiling:$ac_tool_warned in
6370yes:)
6371{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6372$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6373ac_tool_warned=yes ;;
6374esac
6375 RANLIB=$ac_ct_RANLIB
6376 fi
bec39cab
AC
6377else
6378 RANLIB="$ac_cv_prog_RANLIB"
6379fi
6380
6381for ac_prog in 'bison -y' byacc
6382do
6383 # Extract the first word of "$ac_prog", so it can be a program name with args.
6384set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
6385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6386$as_echo_n "checking for $ac_word... " >&6; }
6387if test "${ac_cv_prog_YACC+set}" = set; then :
6388 $as_echo_n "(cached) " >&6
bec39cab
AC
6389else
6390 if test -n "$YACC"; then
6391 ac_cv_prog_YACC="$YACC" # Let the user override the test.
6392else
6393as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6394for as_dir in $PATH
6395do
6396 IFS=$as_save_IFS
6397 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6398 for ac_exec_ext in '' $ac_executable_extensions; do
6399 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6400 ac_cv_prog_YACC="$ac_prog"
81ecdfbb 6401 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6402 break 2
6403 fi
6404done
81ecdfbb
RW
6405 done
6406IFS=$as_save_IFS
bec39cab
AC
6407
6408fi
6409fi
6410YACC=$ac_cv_prog_YACC
6411if test -n "$YACC"; then
81ecdfbb
RW
6412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
6413$as_echo "$YACC" >&6; }
bec39cab 6414else
81ecdfbb
RW
6415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6416$as_echo "no" >&6; }
bec39cab
AC
6417fi
6418
81ecdfbb 6419
bec39cab
AC
6420 test -n "$YACC" && break
6421done
6422test -n "$YACC" || YACC="yacc"
6423
6424
6425if test -n "$ac_tool_prefix"; then
6426 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6427set dummy ${ac_tool_prefix}ar; ac_word=$2
81ecdfbb
RW
6428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6429$as_echo_n "checking for $ac_word... " >&6; }
6430if test "${ac_cv_prog_AR+set}" = set; then :
6431 $as_echo_n "(cached) " >&6
bec39cab
AC
6432else
6433 if test -n "$AR"; then
6434 ac_cv_prog_AR="$AR" # Let the user override the test.
6435else
6436as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6437for as_dir in $PATH
6438do
6439 IFS=$as_save_IFS
6440 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6441 for ac_exec_ext in '' $ac_executable_extensions; do
6442 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6443 ac_cv_prog_AR="${ac_tool_prefix}ar"
81ecdfbb 6444 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6445 break 2
6446 fi
6447done
81ecdfbb
RW
6448 done
6449IFS=$as_save_IFS
bec39cab
AC
6450
6451fi
6452fi
6453AR=$ac_cv_prog_AR
6454if test -n "$AR"; then
81ecdfbb
RW
6455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6456$as_echo "$AR" >&6; }
bec39cab 6457else
81ecdfbb
RW
6458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6459$as_echo "no" >&6; }
bec39cab
AC
6460fi
6461
81ecdfbb 6462
bec39cab
AC
6463fi
6464if test -z "$ac_cv_prog_AR"; then
6465 ac_ct_AR=$AR
6466 # Extract the first word of "ar", so it can be a program name with args.
6467set dummy ar; ac_word=$2
81ecdfbb
RW
6468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6469$as_echo_n "checking for $ac_word... " >&6; }
6470if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
6471 $as_echo_n "(cached) " >&6
bec39cab
AC
6472else
6473 if test -n "$ac_ct_AR"; then
6474 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6475else
6476as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6477for as_dir in $PATH
6478do
6479 IFS=$as_save_IFS
6480 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6481 for ac_exec_ext in '' $ac_executable_extensions; do
6482 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6483 ac_cv_prog_ac_ct_AR="ar"
81ecdfbb 6484 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6485 break 2
6486 fi
6487done
81ecdfbb
RW
6488 done
6489IFS=$as_save_IFS
bec39cab
AC
6490
6491fi
6492fi
6493ac_ct_AR=$ac_cv_prog_ac_ct_AR
6494if test -n "$ac_ct_AR"; then
81ecdfbb
RW
6495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6496$as_echo "$ac_ct_AR" >&6; }
bec39cab 6497else
81ecdfbb
RW
6498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6499$as_echo "no" >&6; }
bec39cab
AC
6500fi
6501
81ecdfbb
RW
6502 if test "x$ac_ct_AR" = x; then
6503 AR=""
6504 else
6505 case $cross_compiling:$ac_tool_warned in
6506yes:)
6507{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6508$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6509ac_tool_warned=yes ;;
6510esac
6511 AR=$ac_ct_AR
6512 fi
bec39cab
AC
6513else
6514 AR="$ac_cv_prog_AR"
6515fi
6516
6517if test -n "$ac_tool_prefix"; then
6518 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
6519set dummy ${ac_tool_prefix}dlltool; ac_word=$2
81ecdfbb
RW
6520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6521$as_echo_n "checking for $ac_word... " >&6; }
6522if test "${ac_cv_prog_DLLTOOL+set}" = set; then :
6523 $as_echo_n "(cached) " >&6
bec39cab
AC
6524else
6525 if test -n "$DLLTOOL"; then
6526 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
6527else
6528as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6529for as_dir in $PATH
6530do
6531 IFS=$as_save_IFS
6532 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6533 for ac_exec_ext in '' $ac_executable_extensions; do
6534 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6535 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
81ecdfbb 6536 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6537 break 2
6538 fi
6539done
81ecdfbb
RW
6540 done
6541IFS=$as_save_IFS
bec39cab
AC
6542
6543fi
6544fi
6545DLLTOOL=$ac_cv_prog_DLLTOOL
6546if test -n "$DLLTOOL"; then
81ecdfbb
RW
6547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
6548$as_echo "$DLLTOOL" >&6; }
bec39cab 6549else
81ecdfbb
RW
6550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6551$as_echo "no" >&6; }
bec39cab
AC
6552fi
6553
81ecdfbb 6554
bec39cab
AC
6555fi
6556if test -z "$ac_cv_prog_DLLTOOL"; then
6557 ac_ct_DLLTOOL=$DLLTOOL
6558 # Extract the first word of "dlltool", so it can be a program name with args.
6559set dummy dlltool; ac_word=$2
81ecdfbb
RW
6560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6561$as_echo_n "checking for $ac_word... " >&6; }
6562if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then :
6563 $as_echo_n "(cached) " >&6
bec39cab
AC
6564else
6565 if test -n "$ac_ct_DLLTOOL"; then
6566 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
6567else
6568as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6569for as_dir in $PATH
6570do
6571 IFS=$as_save_IFS
6572 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6573 for ac_exec_ext in '' $ac_executable_extensions; do
6574 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6575 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
81ecdfbb 6576 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6577 break 2
6578 fi
6579done
81ecdfbb
RW
6580 done
6581IFS=$as_save_IFS
bec39cab
AC
6582
6583fi
6584fi
6585ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
6586if test -n "$ac_ct_DLLTOOL"; then
81ecdfbb
RW
6587 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
6588$as_echo "$ac_ct_DLLTOOL" >&6; }
bec39cab 6589else
81ecdfbb
RW
6590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6591$as_echo "no" >&6; }
bec39cab
AC
6592fi
6593
81ecdfbb
RW
6594 if test "x$ac_ct_DLLTOOL" = x; then
6595 DLLTOOL=""
6596 else
6597 case $cross_compiling:$ac_tool_warned in
6598yes:)
6599{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6600$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6601ac_tool_warned=yes ;;
6602esac
6603 DLLTOOL=$ac_ct_DLLTOOL
6604 fi
bec39cab
AC
6605else
6606 DLLTOOL="$ac_cv_prog_DLLTOOL"
6607fi
6608
6609if test -n "$ac_tool_prefix"; then
6610 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
6611set dummy ${ac_tool_prefix}windres; ac_word=$2
81ecdfbb
RW
6612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6613$as_echo_n "checking for $ac_word... " >&6; }
6614if test "${ac_cv_prog_WINDRES+set}" = set; then :
6615 $as_echo_n "(cached) " >&6
bec39cab
AC
6616else
6617 if test -n "$WINDRES"; then
6618 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
6619else
6620as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6621for as_dir in $PATH
6622do
6623 IFS=$as_save_IFS
6624 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6625 for ac_exec_ext in '' $ac_executable_extensions; do
6626 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6627 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
81ecdfbb 6628 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6629 break 2
6630 fi
6631done
81ecdfbb
RW
6632 done
6633IFS=$as_save_IFS
bec39cab
AC
6634
6635fi
6636fi
6637WINDRES=$ac_cv_prog_WINDRES
6638if test -n "$WINDRES"; then
81ecdfbb
RW
6639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
6640$as_echo "$WINDRES" >&6; }
bec39cab 6641else
81ecdfbb
RW
6642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6643$as_echo "no" >&6; }
bec39cab
AC
6644fi
6645
81ecdfbb 6646
bec39cab
AC
6647fi
6648if test -z "$ac_cv_prog_WINDRES"; then
6649 ac_ct_WINDRES=$WINDRES
6650 # Extract the first word of "windres", so it can be a program name with args.
6651set dummy windres; ac_word=$2
81ecdfbb
RW
6652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6653$as_echo_n "checking for $ac_word... " >&6; }
6654if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then :
6655 $as_echo_n "(cached) " >&6
bec39cab
AC
6656else
6657 if test -n "$ac_ct_WINDRES"; then
6658 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
6659else
6660as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6661for as_dir in $PATH
6662do
6663 IFS=$as_save_IFS
6664 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6665 for ac_exec_ext in '' $ac_executable_extensions; do
6666 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6667 ac_cv_prog_ac_ct_WINDRES="windres"
81ecdfbb 6668 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6669 break 2
6670 fi
6671done
81ecdfbb
RW
6672 done
6673IFS=$as_save_IFS
bec39cab
AC
6674
6675fi
6676fi
6677ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
6678if test -n "$ac_ct_WINDRES"; then
81ecdfbb
RW
6679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
6680$as_echo "$ac_ct_WINDRES" >&6; }
bec39cab 6681else
81ecdfbb
RW
6682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6683$as_echo "no" >&6; }
c906108c 6684fi
bec39cab 6685
81ecdfbb
RW
6686 if test "x$ac_ct_WINDRES" = x; then
6687 WINDRES=""
6688 else
6689 case $cross_compiling:$ac_tool_warned in
6690yes:)
6691{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6692$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6693ac_tool_warned=yes ;;
6694esac
6695 WINDRES=$ac_ct_WINDRES
6696 fi
c906108c 6697else
bec39cab 6698 WINDRES="$ac_cv_prog_WINDRES"
c906108c
SS
6699fi
6700
bec39cab 6701
036c3acb
TS
6702case $host_os in
6703 gnu*)
6704 # Needed for GNU Hurd hosts.
6705 if test -n "$ac_tool_prefix"; then
bec39cab
AC
6706 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
6707set dummy ${ac_tool_prefix}mig; ac_word=$2
81ecdfbb
RW
6708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6709$as_echo_n "checking for $ac_word... " >&6; }
6710if test "${ac_cv_prog_MIG+set}" = set; then :
6711 $as_echo_n "(cached) " >&6
c906108c 6712else
bec39cab
AC
6713 if test -n "$MIG"; then
6714 ac_cv_prog_MIG="$MIG" # Let the user override the test.
6715else
6716as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6717for as_dir in $PATH
6718do
6719 IFS=$as_save_IFS
6720 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6721 for ac_exec_ext in '' $ac_executable_extensions; do
6722 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6723 ac_cv_prog_MIG="${ac_tool_prefix}mig"
81ecdfbb 6724 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6725 break 2
6726 fi
6727done
81ecdfbb
RW
6728 done
6729IFS=$as_save_IFS
bec39cab 6730
c906108c 6731fi
bec39cab
AC
6732fi
6733MIG=$ac_cv_prog_MIG
6734if test -n "$MIG"; then
81ecdfbb
RW
6735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
6736$as_echo "$MIG" >&6; }
c906108c 6737else
81ecdfbb
RW
6738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6739$as_echo "no" >&6; }
c906108c
SS
6740fi
6741
81ecdfbb 6742
bec39cab
AC
6743fi
6744if test -z "$ac_cv_prog_MIG"; then
6745 ac_ct_MIG=$MIG
6746 # Extract the first word of "mig", so it can be a program name with args.
6747set dummy mig; ac_word=$2
81ecdfbb
RW
6748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6749$as_echo_n "checking for $ac_word... " >&6; }
6750if test "${ac_cv_prog_ac_ct_MIG+set}" = set; then :
6751 $as_echo_n "(cached) " >&6
bec39cab
AC
6752else
6753 if test -n "$ac_ct_MIG"; then
6754 ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
6755else
6756as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6757for as_dir in $PATH
6758do
6759 IFS=$as_save_IFS
6760 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6761 for ac_exec_ext in '' $ac_executable_extensions; do
6762 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6763 ac_cv_prog_ac_ct_MIG="mig"
81ecdfbb 6764 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6765 break 2
6766 fi
6767done
81ecdfbb
RW
6768 done
6769IFS=$as_save_IFS
c906108c 6770
bec39cab
AC
6771fi
6772fi
6773ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
6774if test -n "$ac_ct_MIG"; then
81ecdfbb
RW
6775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
6776$as_echo "$ac_ct_MIG" >&6; }
bec39cab 6777else
81ecdfbb
RW
6778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6779$as_echo "no" >&6; }
bec39cab 6780fi
c906108c 6781
81ecdfbb
RW
6782 if test "x$ac_ct_MIG" = x; then
6783 MIG=""
6784 else
6785 case $cross_compiling:$ac_tool_warned in
6786yes:)
6787{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6788$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6789ac_tool_warned=yes ;;
6790esac
6791 MIG=$ac_ct_MIG
6792 fi
bec39cab
AC
6793else
6794 MIG="$ac_cv_prog_MIG"
6795fi
c906108c 6796
036c3acb
TS
6797 if test x"$MIG" = x; then
6798 as_fn_error "MIG not found but required for $host hosts" "$LINENO" 5
6799 fi
6800 ;;
6801esac
c906108c 6802
bec39cab
AC
6803# ---------------------- #
6804# Checks for libraries. #
6805# ---------------------- #
c906108c 6806
bec39cab 6807# We might need to link with -lm; most simulators need it.
81ecdfbb
RW
6808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
6809$as_echo_n "checking for main in -lm... " >&6; }
6810if test "${ac_cv_lib_m_main+set}" = set; then :
6811 $as_echo_n "(cached) " >&6
bec39cab
AC
6812else
6813 ac_check_lib_save_LIBS=$LIBS
6814LIBS="-lm $LIBS"
81ecdfbb 6815cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6816/* end confdefs.h. */
c906108c 6817
c906108c 6818
bec39cab
AC
6819int
6820main ()
6821{
81ecdfbb 6822return main ();
bec39cab
AC
6823 ;
6824 return 0;
6825}
6826_ACEOF
81ecdfbb 6827if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
6828 ac_cv_lib_m_main=yes
6829else
81ecdfbb 6830 ac_cv_lib_m_main=no
bec39cab 6831fi
81ecdfbb
RW
6832rm -f core conftest.err conftest.$ac_objext \
6833 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
6834LIBS=$ac_check_lib_save_LIBS
6835fi
81ecdfbb
RW
6836{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
6837$as_echo "$ac_cv_lib_m_main" >&6; }
6838if test "x$ac_cv_lib_m_main" = x""yes; then :
bec39cab
AC
6839 cat >>confdefs.h <<_ACEOF
6840#define HAVE_LIBM 1
6841_ACEOF
6842
6843 LIBS="-lm $LIBS"
c906108c 6844
c906108c 6845fi
bec39cab
AC
6846
6847
6848# We need to link with -lw to get `wctype' on Solaris before Solaris
6849# 2.6. Solaris 2.6 and beyond have this function in libc, and have a
6850# libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
6851# is known to have this problem). Therefore we avoid libw if we can.
81ecdfbb
RW
6852ac_fn_c_check_func "$LINENO" "wctype" "ac_cv_func_wctype"
6853if test "x$ac_cv_func_wctype" = x""yes; then :
bec39cab 6854
c906108c 6855else
81ecdfbb
RW
6856 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype in -lw" >&5
6857$as_echo_n "checking for wctype in -lw... " >&6; }
6858if test "${ac_cv_lib_w_wctype+set}" = set; then :
6859 $as_echo_n "(cached) " >&6
bec39cab
AC
6860else
6861 ac_check_lib_save_LIBS=$LIBS
6862LIBS="-lw $LIBS"
81ecdfbb 6863cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6864/* end confdefs.h. */
c906108c 6865
81ecdfbb
RW
6866/* Override any GCC internal prototype to avoid an error.
6867 Use char because int might match the return type of a GCC
6868 builtin and then its argument prototype would still apply. */
bec39cab
AC
6869#ifdef __cplusplus
6870extern "C"
6871#endif
bec39cab
AC
6872char wctype ();
6873int
6874main ()
6875{
81ecdfbb 6876return wctype ();
bec39cab
AC
6877 ;
6878 return 0;
6879}
6880_ACEOF
81ecdfbb 6881if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
6882 ac_cv_lib_w_wctype=yes
6883else
81ecdfbb 6884 ac_cv_lib_w_wctype=no
bec39cab 6885fi
81ecdfbb
RW
6886rm -f core conftest.err conftest.$ac_objext \
6887 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
6888LIBS=$ac_check_lib_save_LIBS
6889fi
81ecdfbb
RW
6890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_w_wctype" >&5
6891$as_echo "$ac_cv_lib_w_wctype" >&6; }
6892if test "x$ac_cv_lib_w_wctype" = x""yes; then :
bec39cab
AC
6893 cat >>confdefs.h <<_ACEOF
6894#define HAVE_LIBW 1
6895_ACEOF
c906108c 6896
bec39cab 6897 LIBS="-lw $LIBS"
c906108c 6898
bec39cab 6899fi
c906108c 6900
bec39cab 6901fi
c906108c 6902
ddc9cd0f 6903
bec39cab 6904# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
81ecdfbb
RW
6905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
6906$as_echo_n "checking for library containing gethostbyname... " >&6; }
6907if test "${ac_cv_search_gethostbyname+set}" = set; then :
6908 $as_echo_n "(cached) " >&6
bec39cab
AC
6909else
6910 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6911cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6912/* end confdefs.h. */
ddc9cd0f 6913
81ecdfbb
RW
6914/* Override any GCC internal prototype to avoid an error.
6915 Use char because int might match the return type of a GCC
6916 builtin and then its argument prototype would still apply. */
bec39cab
AC
6917#ifdef __cplusplus
6918extern "C"
6919#endif
bec39cab
AC
6920char gethostbyname ();
6921int
6922main ()
6923{
81ecdfbb 6924return gethostbyname ();
bec39cab
AC
6925 ;
6926 return 0;
6927}
6928_ACEOF
81ecdfbb
RW
6929for ac_lib in '' nsl; do
6930 if test -z "$ac_lib"; then
6931 ac_res="none required"
6932 else
6933 ac_res=-l$ac_lib
b4e70030 6934 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
6935 fi
6936 if ac_fn_c_try_link "$LINENO"; then :
6937 ac_cv_search_gethostbyname=$ac_res
6938fi
6939rm -f core conftest.err conftest.$ac_objext \
6940 conftest$ac_exeext
6941 if test "${ac_cv_search_gethostbyname+set}" = set; then :
6942 break
6943fi
6944done
6945if test "${ac_cv_search_gethostbyname+set}" = set; then :
ddc9cd0f 6946
bec39cab 6947else
81ecdfbb 6948 ac_cv_search_gethostbyname=no
bec39cab 6949fi
81ecdfbb 6950rm conftest.$ac_ext
bec39cab
AC
6951LIBS=$ac_func_search_save_LIBS
6952fi
81ecdfbb
RW
6953{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
6954$as_echo "$ac_cv_search_gethostbyname" >&6; }
6955ac_res=$ac_cv_search_gethostbyname
6956if test "$ac_res" != no; then :
6957 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
96baa820 6958
bec39cab 6959fi
96baa820 6960
c906108c 6961
b4e70030 6962# Some systems (e.g. Solaris) have `socketpair' in libsocket.
81ecdfbb
RW
6963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
6964$as_echo_n "checking for library containing socketpair... " >&6; }
6965if test "${ac_cv_search_socketpair+set}" = set; then :
6966 $as_echo_n "(cached) " >&6
b4e70030
JB
6967else
6968 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6969cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
6970/* end confdefs.h. */
6971
81ecdfbb
RW
6972/* Override any GCC internal prototype to avoid an error.
6973 Use char because int might match the return type of a GCC
6974 builtin and then its argument prototype would still apply. */
b4e70030
JB
6975#ifdef __cplusplus
6976extern "C"
6977#endif
b4e70030
JB
6978char socketpair ();
6979int
6980main ()
6981{
81ecdfbb 6982return socketpair ();
b4e70030
JB
6983 ;
6984 return 0;
6985}
6986_ACEOF
81ecdfbb
RW
6987for ac_lib in '' socket; do
6988 if test -z "$ac_lib"; then
6989 ac_res="none required"
6990 else
6991 ac_res=-l$ac_lib
b4e70030 6992 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
6993 fi
6994 if ac_fn_c_try_link "$LINENO"; then :
6995 ac_cv_search_socketpair=$ac_res
6996fi
6997rm -f core conftest.err conftest.$ac_objext \
6998 conftest$ac_exeext
6999 if test "${ac_cv_search_socketpair+set}" = set; then :
7000 break
7001fi
7002done
7003if test "${ac_cv_search_socketpair+set}" = set; then :
b4e70030 7004
b4e70030 7005else
81ecdfbb 7006 ac_cv_search_socketpair=no
b4e70030 7007fi
81ecdfbb 7008rm conftest.$ac_ext
b4e70030
JB
7009LIBS=$ac_func_search_save_LIBS
7010fi
81ecdfbb
RW
7011{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
7012$as_echo "$ac_cv_search_socketpair" >&6; }
7013ac_res=$ac_cv_search_socketpair
7014if test "$ac_res" != no; then :
7015 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
b4e70030
JB
7016
7017fi
7018
7019
233a11ab 7020# Link in zlib if we can. This allows us to read compressed debug sections.
b040ad30 7021
711a72d3 7022 # Use the system's zlib library.
39f3de7c
L
7023 zlibdir="-L\$(top_builddir)/../zlib"
7024 zlibinc="-I\$(top_srcdir)/../zlib"
b040ad30 7025
711a72d3
L
7026# Check whether --with-system-zlib was given.
7027if test "${with_system_zlib+set}" = set; then :
afa59b79
L
7028 withval=$with_system_zlib; if test x$with_system_zlib = xyes ; then
7029 zlibdir=
7030 zlibinc=
7031 fi
b040ad30 7032
233a11ab 7033fi
233a11ab 7034
233a11ab 7035
233a11ab 7036
b040ad30 7037
233a11ab 7038
25268153
JB
7039# On FreeBSD we may need libutil for kinfo_getvmmap (used by fbsd-nat.c).
7040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getvmmap" >&5
7041$as_echo_n "checking for library containing kinfo_getvmmap... " >&6; }
7042if test "${ac_cv_search_kinfo_getvmmap+set}" = set; then :
7043 $as_echo_n "(cached) " >&6
7044else
7045 ac_func_search_save_LIBS=$LIBS
7046cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7047/* end confdefs.h. */
7048
7049/* Override any GCC internal prototype to avoid an error.
7050 Use char because int might match the return type of a GCC
7051 builtin and then its argument prototype would still apply. */
7052#ifdef __cplusplus
7053extern "C"
7054#endif
7055char kinfo_getvmmap ();
7056int
7057main ()
7058{
7059return kinfo_getvmmap ();
7060 ;
7061 return 0;
7062}
7063_ACEOF
7064for ac_lib in '' util; do
7065 if test -z "$ac_lib"; then
7066 ac_res="none required"
7067 else
7068 ac_res=-l$ac_lib
7069 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7070 fi
7071 if ac_fn_c_try_link "$LINENO"; then :
7072 ac_cv_search_kinfo_getvmmap=$ac_res
7073fi
7074rm -f core conftest.err conftest.$ac_objext \
7075 conftest$ac_exeext
7076 if test "${ac_cv_search_kinfo_getvmmap+set}" = set; then :
7077 break
7078fi
7079done
7080if test "${ac_cv_search_kinfo_getvmmap+set}" = set; then :
7081
7082else
7083 ac_cv_search_kinfo_getvmmap=no
7084fi
7085rm conftest.$ac_ext
7086LIBS=$ac_func_search_save_LIBS
7087fi
7088{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getvmmap" >&5
7089$as_echo "$ac_cv_search_kinfo_getvmmap" >&6; }
7090ac_res=$ac_cv_search_kinfo_getvmmap
7091if test "$ac_res" != no; then :
7092 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7093
7094$as_echo "#define HAVE_KINFO_GETVMMAP 1" >>confdefs.h
7095
7096fi
7097
7098
77f120bf 7099
77f120bf 7100
6c7a06a3 7101
81ecdfbb
RW
7102# Check whether --with-libiconv-prefix was given.
7103if test "${with_libiconv_prefix+set}" = set; then :
7104 withval=$with_libiconv_prefix;
6c7a06a3 7105 for dir in `echo "$withval" | tr : ' '`; do
94ae1714
TT
7106 if test -d $dir/include; then LIBICONV_INCLUDE="-I$dir/include"; fi
7107 if test -d $dir/lib; then LIBICONV_LIBDIR="-L$dir/lib"; fi
6c7a06a3
TT
7108 done
7109
81ecdfbb
RW
7110fi
7111
6c7a06a3 7112
f18c4681 7113 BUILD_LIBICONV_LIBDIRS="../libiconv/lib/.libs ../libiconv/lib/_libs"
6c7a06a3
TT
7114 BUILD_LIBICONV_INCLUDE="-I../libiconv/include"
7115
81ecdfbb
RW
7116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
7117$as_echo_n "checking for iconv... " >&6; }
7118if test "${am_cv_func_iconv+set}" = set; then :
7119 $as_echo_n "(cached) " >&6
d542061a 7120else
6c7a06a3
TT
7121
7122 am_cv_func_iconv="no, consider installing GNU libiconv"
7123 am_cv_lib_iconv=no
7124 am_cv_use_build_libiconv=no
f0f20949 7125 am_cv_build_libiconv_path=
4edb1e84
JB
7126
7127 # If libiconv is part of the build tree, then try using it over
7128 # any system iconv.
7129 if test -d ../libiconv; then
f18c4681
JB
7130 for lib_dir in $BUILD_LIBICONV_LIBDIRS; do
7131 am_save_LIBS="$LIBS"
7132 am_save_CPPFLAGS="$CPPFLAGS"
7133 LIBS="$LIBS $lib_dir/libiconv.a"
7134 CPPFLAGS="$CPPFLAGS $BUILD_LIBICONV_INCLUDE"
7135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 7136/* end confdefs.h. */
6c7a06a3
TT
7137#include <stdlib.h>
7138#include <iconv.h>
d542061a
UW
7139int
7140main ()
7141{
6c7a06a3 7142iconv_t cd = iconv_open("","");
f18c4681
JB
7143 iconv(cd,NULL,NULL,NULL,NULL);
7144 iconv_close(cd);
d542061a
UW
7145 ;
7146 return 0;
7147}
7148_ACEOF
81ecdfbb 7149if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 7150 am_cv_use_build_libiconv=yes
f0f20949 7151 am_cv_build_libiconv_path=$lib_dir/libiconv.a
f18c4681
JB
7152 am_cv_lib_iconv=yes
7153 am_cv_func_iconv=yes
d542061a 7154fi
81ecdfbb
RW
7155rm -f core conftest.err conftest.$ac_objext \
7156 conftest$ac_exeext conftest.$ac_ext
f18c4681
JB
7157 LIBS="$am_save_LIBS"
7158 CPPFLAGS="$am_save_CPPFLAGS"
7159 if test "$am_cv_use_build_libiconv" = "yes"; then
f18c4681
JB
7160 break
7161 fi
7162 done
4edb1e84 7163 fi
94ae1714 7164
4edb1e84 7165 # Next, try to find iconv in libc.
6c7a06a3 7166 if test "$am_cv_func_iconv" != yes; then
81ecdfbb 7167 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 7168/* end confdefs.h. */
6c7a06a3
TT
7169#include <stdlib.h>
7170#include <iconv.h>
d542061a
UW
7171int
7172main ()
7173{
6c7a06a3
TT
7174iconv_t cd = iconv_open("","");
7175 iconv(cd,NULL,NULL,NULL,NULL);
7176 iconv_close(cd);
d542061a
UW
7177 ;
7178 return 0;
7179}
7180_ACEOF
81ecdfbb 7181if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 7182 am_cv_func_iconv=yes
d542061a 7183fi
81ecdfbb
RW
7184rm -f core conftest.err conftest.$ac_objext \
7185 conftest$ac_exeext conftest.$ac_ext
77f120bf 7186 fi
94ae1714 7187
4edb1e84
JB
7188 # If iconv was not in libc, try -liconv. In this case, arrange to
7189 # look in the libiconv prefix, if it was specified by the user.
7190 if test "$am_cv_func_iconv" != yes; then
6c7a06a3 7191 am_save_CPPFLAGS="$CPPFLAGS"
4edb1e84
JB
7192 am_save_LIBS="$LIBS"
7193 if test -n "$LIBICONV_INCLUDE"; then
7194 CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE"
7195 LIBS="$LIBS $LIBICONV_LIBDIR"
7196 fi
7197 LIBS="$LIBS -liconv"
81ecdfbb 7198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7199/* end confdefs.h. */
6c7a06a3
TT
7200#include <stdlib.h>
7201#include <iconv.h>
bec39cab
AC
7202int
7203main ()
7204{
6c7a06a3
TT
7205iconv_t cd = iconv_open("","");
7206 iconv(cd,NULL,NULL,NULL,NULL);
7207 iconv_close(cd);
bec39cab
AC
7208 ;
7209 return 0;
7210}
7211_ACEOF
81ecdfbb 7212if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 7213 am_cv_lib_iconv=yes
6c7a06a3 7214 am_cv_func_iconv=yes
627af7ea 7215fi
81ecdfbb
RW
7216rm -f core conftest.err conftest.$ac_objext \
7217 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 7218 LIBS="$am_save_LIBS"
fc3b640d 7219 CPPFLAGS="$am_save_CPPFLAGS"
6c7a06a3
TT
7220 fi
7221
7222fi
81ecdfbb
RW
7223{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
7224$as_echo "$am_cv_func_iconv" >&6; }
94ae1714
TT
7225
7226 # Set the various flags based on the cache variables. We can't rely
7227 # on the flags to remain set from the above code, due to caching.
fc3b640d
TT
7228 LIBICONV=
7229 if test "$am_cv_lib_iconv" = yes; then
7230 LIBICONV="-liconv"
94ae1714
TT
7231 else
7232 LIBICONV_LIBDIR=
7233 LIBICONV_INCLUDE=
fc3b640d
TT
7234 fi
7235 if test "$am_cv_use_build_libiconv" = yes; then
f0f20949 7236 LIBICONV="$am_cv_build_libiconv_path"
f18c4681 7237 LIBICONV_LIBDIR=""
fc3b640d
TT
7238 LIBICONV_INCLUDE="$BUILD_LIBICONV_INCLUDE"
7239 fi
7240 CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE"
7241 LIBS="$LIBS $LIBICONV_LIBDIR $LIBICONV"
94ae1714 7242
6c7a06a3
TT
7243 if test "$am_cv_func_iconv" = yes; then
7244
81ecdfbb 7245$as_echo "#define HAVE_ICONV 1" >>confdefs.h
6c7a06a3 7246
81ecdfbb
RW
7247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
7248$as_echo_n "checking for iconv declaration... " >&6; }
7249 if test "${am_cv_proto_iconv+set}" = set; then :
7250 $as_echo_n "(cached) " >&6
6c7a06a3
TT
7251else
7252
81ecdfbb 7253 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
7254/* end confdefs.h. */
7255
6c7a06a3
TT
7256#include <stdlib.h>
7257#include <iconv.h>
7258extern
b4e70030 7259#ifdef __cplusplus
6c7a06a3 7260"C"
b4e70030 7261#endif
6c7a06a3
TT
7262#if defined(__STDC__) || defined(__cplusplus)
7263size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
7264#else
7265size_t iconv();
7266#endif
7267
b4e70030
JB
7268int
7269main ()
7270{
6c7a06a3 7271
b4e70030
JB
7272 ;
7273 return 0;
7274}
7275_ACEOF
81ecdfbb 7276if ac_fn_c_try_compile "$LINENO"; then :
6c7a06a3 7277 am_cv_proto_iconv_arg1=""
4e8d927d 7278else
81ecdfbb 7279 am_cv_proto_iconv_arg1="const"
b4e70030 7280fi
81ecdfbb 7281rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6c7a06a3
TT
7282 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);"
7283fi
7284
7285 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
81ecdfbb 7286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
6c7a06a3 7287 }$am_cv_proto_iconv" >&5
81ecdfbb
RW
7288$as_echo "${ac_t:-
7289 }$am_cv_proto_iconv" >&6; }
6c7a06a3
TT
7290
7291cat >>confdefs.h <<_ACEOF
7292#define ICONV_CONST $am_cv_proto_iconv_arg1
7293_ACEOF
7294
7295 fi
6c7a06a3
TT
7296
7297
478aac75
DE
7298# GDB may fork/exec the iconv program to get the list of supported character
7299# sets. Allow the user to specify where to find it.
7300# There are several factors affecting the choice of option name:
7301# - There is already --with-libiconv-prefix but we can't use it, it specifies
7302# the build-time location of libiconv files.
7303# - The program we need to find is iconv, which comes with glibc. The user
7304# doesn't necessarily have libiconv installed. Therefore naming this
7305# --with-libiconv-foo feels wrong.
7306# - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is
7307# defined to work on directories not files (though it really doesn't know
7308# the difference).
7309# - Calling this --with-iconv-prefix is perceived to cause too much confusion
7310# with --with-libiconv-prefix.
7311# Putting these together is why the option name is --with-iconv-bin.
7312
7313
7314# Check whether --with-iconv-bin was given.
7315if test "${with_iconv_bin+set}" = set; then :
7316 withval=$with_iconv_bin; iconv_bin="${withval}"
7317
7318cat >>confdefs.h <<_ACEOF
7319#define ICONV_BIN "${iconv_bin}"
7320_ACEOF
7321
7322
7323 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
7324 if test "x$prefix" = xNONE; then
7325 test_prefix=/usr/local
7326 else
7327 test_prefix=$prefix
7328 fi
7329 else
7330 test_prefix=$exec_prefix
7331 fi
7332 value=0
7333 case ${iconv_bin} in
7334 "${test_prefix}"|"${test_prefix}/"*|\
7335 '${exec_prefix}'|'${exec_prefix}/'*)
7336 value=1
7337 ;;
7338 esac
7339
7340cat >>confdefs.h <<_ACEOF
7341#define ICONV_BIN_RELOCATABLE $value
7342_ACEOF
7343
7344
7345
7346fi
7347
7348
cb01cfba 7349# For the TUI, we need enhanced curses functionality.
bd8a8e1b 7350if test x"$enable_tui" != xno; then
cb01cfba
JB
7351 prefer_curses=yes
7352fi
7353
7354curses_found=no
7355if test x"$prefer_curses" = xyes; then
7356 # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
7357 # curses library because the latter might not provide all the
7358 # functionality we need. However, this leads to problems on systems
7359 # where the linker searches /usr/local/lib, but the compiler doesn't
7360 # search /usr/local/include, if ncurses is installed in /usr/local. A
7361 # default installation of ncurses on alpha*-dec-osf* will lead to such
7362 # a situation.
81ecdfbb
RW
7363 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
7364$as_echo_n "checking for library containing waddstr... " >&6; }
7365if test "${ac_cv_search_waddstr+set}" = set; then :
7366 $as_echo_n "(cached) " >&6
6c7a06a3
TT
7367else
7368 ac_func_search_save_LIBS=$LIBS
81ecdfbb 7369cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
7370/* end confdefs.h. */
7371
81ecdfbb
RW
7372/* Override any GCC internal prototype to avoid an error.
7373 Use char because int might match the return type of a GCC
7374 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
7375#ifdef __cplusplus
7376extern "C"
7377#endif
6c7a06a3
TT
7378char waddstr ();
7379int
7380main ()
7381{
81ecdfbb 7382return waddstr ();
6c7a06a3
TT
7383 ;
7384 return 0;
7385}
7386_ACEOF
81ecdfbb
RW
7387for ac_lib in '' ncurses cursesX curses; do
7388 if test -z "$ac_lib"; then
7389 ac_res="none required"
7390 else
7391 ac_res=-l$ac_lib
7392 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7393 fi
7394 if ac_fn_c_try_link "$LINENO"; then :
7395 ac_cv_search_waddstr=$ac_res
7396fi
7397rm -f core conftest.err conftest.$ac_objext \
7398 conftest$ac_exeext
7399 if test "${ac_cv_search_waddstr+set}" = set; then :
7400 break
7401fi
7402done
7403if test "${ac_cv_search_waddstr+set}" = set; then :
7404
6c7a06a3 7405else
81ecdfbb
RW
7406 ac_cv_search_waddstr=no
7407fi
7408rm conftest.$ac_ext
7409LIBS=$ac_func_search_save_LIBS
7410fi
7411{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
7412$as_echo "$ac_cv_search_waddstr" >&6; }
7413ac_res=$ac_cv_search_waddstr
7414if test "$ac_res" != no; then :
7415 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3
TT
7416
7417fi
7418
7419
cb01cfba
JB
7420 if test "$ac_cv_search_waddstr" != no; then
7421 curses_found=yes
7422 fi
7423fi
7424
7425# Check whether we should enable the TUI, but only do so if we really
7426# can.
7427if test x"$enable_tui" != xno; then
7428 if test -d $srcdir/tui; then
7429 if test "$curses_found" != no; then
6c7a06a3
TT
7430 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
7431 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
7432 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
7433 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
6c7a06a3
TT
7434 else
7435 if test x"$enable_tui" = xyes; then
81ecdfbb 7436 as_fn_error "no enhanced curses library found; disable TUI" "$LINENO" 5
6c7a06a3 7437 else
81ecdfbb
RW
7438 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
7439$as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
6c7a06a3
TT
7440 fi
7441 fi
7442 fi
7443fi
7444
7445# Since GDB uses Readline, we need termcap functionality. In many
7446# cases this will be provided by the curses library, but some systems
7447# have a seperate termcap library, or no curses library at all.
7448
7449case $host_os in
7450 cygwin*)
7451 if test -d $srcdir/libtermcap; then
7452 LIBS="../libtermcap/libtermcap.a $LIBS"
7453 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
7454 fi ;;
7455 go32* | *djgpp*)
7456 ac_cv_search_tgetent="none required"
7457 ;;
6c7a06a3
TT
7458esac
7459
7460# These are the libraries checked by Readline.
81ecdfbb
RW
7461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
7462$as_echo_n "checking for library containing tgetent... " >&6; }
7463if test "${ac_cv_search_tgetent+set}" = set; then :
7464 $as_echo_n "(cached) " >&6
6c7a06a3
TT
7465else
7466 ac_func_search_save_LIBS=$LIBS
81ecdfbb 7467cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
7468/* end confdefs.h. */
7469
81ecdfbb
RW
7470/* Override any GCC internal prototype to avoid an error.
7471 Use char because int might match the return type of a GCC
7472 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
7473#ifdef __cplusplus
7474extern "C"
7475#endif
6c7a06a3
TT
7476char tgetent ();
7477int
7478main ()
7479{
81ecdfbb 7480return tgetent ();
6c7a06a3
TT
7481 ;
7482 return 0;
7483}
7484_ACEOF
81ecdfbb
RW
7485for ac_lib in '' termcap tinfo curses ncurses; do
7486 if test -z "$ac_lib"; then
7487 ac_res="none required"
7488 else
7489 ac_res=-l$ac_lib
6c7a06a3 7490 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
7491 fi
7492 if ac_fn_c_try_link "$LINENO"; then :
7493 ac_cv_search_tgetent=$ac_res
7494fi
7495rm -f core conftest.err conftest.$ac_objext \
7496 conftest$ac_exeext
7497 if test "${ac_cv_search_tgetent+set}" = set; then :
7498 break
7499fi
7500done
7501if test "${ac_cv_search_tgetent+set}" = set; then :
6c7a06a3 7502
6c7a06a3 7503else
81ecdfbb 7504 ac_cv_search_tgetent=no
6c7a06a3 7505fi
81ecdfbb 7506rm conftest.$ac_ext
6c7a06a3
TT
7507LIBS=$ac_func_search_save_LIBS
7508fi
81ecdfbb
RW
7509{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
7510$as_echo "$ac_cv_search_tgetent" >&6; }
7511ac_res=$ac_cv_search_tgetent
7512if test "$ac_res" != no; then :
7513 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3 7514
06825bd1
MK
7515fi
7516
06825bd1 7517
bec39cab 7518if test "$ac_cv_search_tgetent" = no; then
7a85168d 7519 CONFIG_OBS="$CONFIG_OBS stub-termcap.o"
8ee53726
MK
7520fi
7521
3841debe 7522
81ecdfbb
RW
7523# Check whether --with-system-readline was given.
7524if test "${with_system_readline+set}" = set; then :
7525 withval=$with_system_readline;
7526fi
6a30b0a5 7527
6a30b0a5
AS
7528
7529if test "$with_system_readline" = yes; then
7530 READLINE=-lreadline
7531 READLINE_DEPS=
7532 READLINE_CFLAGS=
39037522 7533 READLINE_TEXI_INCFLAG=
6a30b0a5
AS
7534else
7535 READLINE='$(READLINE_DIR)/libreadline.a'
7536 READLINE_DEPS='$(READLINE)'
7537 READLINE_CFLAGS='-I$(READLINE_SRC)/..'
39037522 7538 READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
6a30b0a5
AS
7539fi
7540
7541
7542
7543
7544
f997c383
SD
7545# Generate jit-reader.h
7546
7547# This is typedeffed to GDB_CORE_ADDR in jit-reader.h
7548TARGET_PTR=
7549
7550# The cast to long int works around a bug in the HP C Compiler
7551# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7552# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7553# This bug is HP SR number 8606223364.
7554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5
7555$as_echo_n "checking size of unsigned long long... " >&6; }
7556if test "${ac_cv_sizeof_unsigned_long_long+set}" = set; then :
7557 $as_echo_n "(cached) " >&6
7558else
7559 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then :
7560
7561else
7562 if test "$ac_cv_type_unsigned_long_long" = yes; then
7563 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7564$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7565{ as_fn_set_status 77
7566as_fn_error "cannot compute sizeof (unsigned long long)
7567See \`config.log' for more details." "$LINENO" 5; }; }
7568 else
7569 ac_cv_sizeof_unsigned_long_long=0
7570 fi
7571fi
7572
7573fi
7574{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5
7575$as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; }
7576
7577
7578
7579cat >>confdefs.h <<_ACEOF
7580#define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
7581_ACEOF
7582
7583
7584# The cast to long int works around a bug in the HP C Compiler
7585# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7586# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7587# This bug is HP SR number 8606223364.
7588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
7589$as_echo_n "checking size of unsigned long... " >&6; }
7590if test "${ac_cv_sizeof_unsigned_long+set}" = set; then :
7591 $as_echo_n "(cached) " >&6
7592else
7593 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then :
7594
7595else
7596 if test "$ac_cv_type_unsigned_long" = yes; then
7597 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7598$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7599{ as_fn_set_status 77
7600as_fn_error "cannot compute sizeof (unsigned long)
7601See \`config.log' for more details." "$LINENO" 5; }; }
7602 else
7603 ac_cv_sizeof_unsigned_long=0
7604 fi
7605fi
7606
7607fi
7608{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
7609$as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
7610
7611
7612
7613cat >>confdefs.h <<_ACEOF
7614#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
7615_ACEOF
7616
7617
7618# The cast to long int works around a bug in the HP C Compiler
7619# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7620# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7621# This bug is HP SR number 8606223364.
7622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5
7623$as_echo_n "checking size of unsigned __int128... " >&6; }
7624if test "${ac_cv_sizeof_unsigned___int128+set}" = set; then :
7625 $as_echo_n "(cached) " >&6
7626else
7627 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then :
7628
7629else
7630 if test "$ac_cv_type_unsigned___int128" = yes; then
7631 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7632$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7633{ as_fn_set_status 77
7634as_fn_error "cannot compute sizeof (unsigned __int128)
7635See \`config.log' for more details." "$LINENO" 5; }; }
7636 else
7637 ac_cv_sizeof_unsigned___int128=0
7638 fi
7639fi
7640
7641fi
7642{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5
7643$as_echo "$ac_cv_sizeof_unsigned___int128" >&6; }
7644
7645
7646
7647cat >>confdefs.h <<_ACEOF
7648#define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128
7649_ACEOF
7650
7651
7652
7653if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
7654 TARGET_PTR="unsigned long"
7655elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
7656 TARGET_PTR="unsigned long long"
7657elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
7658 TARGET_PTR="unsigned __int128"
7659else
7660 TARGET_PTR="unsigned long"
7661fi
7662
7663
7664ac_config_files="$ac_config_files jit-reader.h:jit-reader.in"
7665
7666
a2d08b9e
SD
7667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
7668$as_echo_n "checking for library containing dlopen... " >&6; }
7669if test "${ac_cv_search_dlopen+set}" = set; then :
7670 $as_echo_n "(cached) " >&6
7671else
7672 ac_func_search_save_LIBS=$LIBS
7673cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7674/* end confdefs.h. */
7675
7676/* Override any GCC internal prototype to avoid an error.
7677 Use char because int might match the return type of a GCC
7678 builtin and then its argument prototype would still apply. */
7679#ifdef __cplusplus
7680extern "C"
7681#endif
7682char dlopen ();
7683int
7684main ()
7685{
7686return dlopen ();
7687 ;
7688 return 0;
7689}
7690_ACEOF
7691for ac_lib in '' dl; do
7692 if test -z "$ac_lib"; then
7693 ac_res="none required"
7694 else
7695 ac_res=-l$ac_lib
7696 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7697 fi
7698 if ac_fn_c_try_link "$LINENO"; then :
7699 ac_cv_search_dlopen=$ac_res
7700fi
7701rm -f core conftest.err conftest.$ac_objext \
7702 conftest$ac_exeext
7703 if test "${ac_cv_search_dlopen+set}" = set; then :
7704 break
7705fi
7706done
7707if test "${ac_cv_search_dlopen+set}" = set; then :
7708
7709else
7710 ac_cv_search_dlopen=no
7711fi
7712rm conftest.$ac_ext
7713LIBS=$ac_func_search_save_LIBS
7714fi
7715{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
7716$as_echo "$ac_cv_search_dlopen" >&6; }
7717ac_res=$ac_cv_search_dlopen
7718if test "$ac_res" != no; then :
7719 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7720
7721fi
7722
7723
39037522 7724
b8e0a31c
SD
7725
7726# Check whether --with-jit-reader-dir was given.
7727if test "${with_jit_reader_dir+set}" = set; then :
7728 withval=$with_jit_reader_dir;
7729 JIT_READER_DIR=$withval
7730else
7731 JIT_READER_DIR=${libdir}/gdb
7732fi
7733
7734
7735 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
7736 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7737 ac_define_dir=`eval echo $JIT_READER_DIR`
7738 ac_define_dir=`eval echo $ac_define_dir`
7739
7740cat >>confdefs.h <<_ACEOF
7741#define JIT_READER_DIR "$ac_define_dir"
7742_ACEOF
7743
7744
7745
7746
7747 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
7748 if test "x$prefix" = xNONE; then
7749 test_prefix=/usr/local
7750 else
7751 test_prefix=$prefix
7752 fi
7753 else
7754 test_prefix=$exec_prefix
7755 fi
7756 value=0
7757 case ${ac_define_dir} in
7758 "${test_prefix}"|"${test_prefix}/"*|\
7759 '${exec_prefix}'|'${exec_prefix}/'*)
7760 value=1
7761 ;;
7762 esac
7763
7764cat >>confdefs.h <<_ACEOF
7765#define JIT_READER_DIR_RELOCATABLE $value
7766_ACEOF
7767
7768
7769
7770
7771
81ecdfbb
RW
7772# Check whether --with-expat was given.
7773if test "${with_expat+set}" = set; then :
7774 withval=$with_expat;
5c39566f
DJ
7775else
7776 with_expat=auto
81ecdfbb
RW
7777fi
7778
7779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
7780$as_echo_n "checking whether to use expat... " >&6; }
7781{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
7782$as_echo "$with_expat" >&6; }
5c39566f
DJ
7783
7784if test "${with_expat}" = no; then
81ecdfbb
RW
7785 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
7786$as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
5c39566f
DJ
7787 HAVE_LIBEXPAT=no
7788else
7789
3841debe
DJ
7790 if test "X$prefix" = "XNONE"; then
7791 acl_final_prefix="$ac_default_prefix"
7792 else
7793 acl_final_prefix="$prefix"
7794 fi
7795 if test "X$exec_prefix" = "XNONE"; then
7796 acl_final_exec_prefix='${prefix}'
7797 else
7798 acl_final_exec_prefix="$exec_prefix"
7799 fi
7800 acl_save_prefix="$prefix"
7801 prefix="$acl_final_prefix"
7802 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
7803 prefix="$acl_save_prefix"
7804
7805
81ecdfbb
RW
7806# Check whether --with-gnu-ld was given.
7807if test "${with_gnu_ld+set}" = set; then :
7808 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
3841debe
DJ
7809else
7810 with_gnu_ld=no
81ecdfbb
RW
7811fi
7812
3841debe
DJ
7813# Prepare PATH_SEPARATOR.
7814# The user is always right.
7815if test "${PATH_SEPARATOR+set}" != set; then
7816 echo "#! /bin/sh" >conf$$.sh
7817 echo "exit 0" >>conf$$.sh
7818 chmod +x conf$$.sh
7819 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
7820 PATH_SEPARATOR=';'
7821 else
7822 PATH_SEPARATOR=:
7823 fi
7824 rm -f conf$$.sh
7825fi
7826ac_prog=ld
7827if test "$GCC" = yes; then
7828 # Check if gcc -print-prog-name=ld gives a path.
81ecdfbb
RW
7829 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
7830$as_echo_n "checking for ld used by GCC... " >&6; }
3841debe
DJ
7831 case $host in
7832 *-*-mingw*)
7833 # gcc leaves a trailing carriage return which upsets mingw
7834 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
7835 *)
7836 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
7837 esac
7838 case $ac_prog in
7839 # Accept absolute paths.
7840 [\\/]* | [A-Za-z]:[\\/]*)
7841 re_direlt='/[^/][^/]*/\.\./'
7842 # Canonicalize the path of ld
7843 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
7844 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
7845 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
7846 done
7847 test -z "$LD" && LD="$ac_prog"
7848 ;;
7849 "")
7850 # If it fails, then pretend we aren't using GCC.
7851 ac_prog=ld
7852 ;;
7853 *)
7854 # If it is relative, then search for the first ld in PATH.
7855 with_gnu_ld=unknown
7856 ;;
7857 esac
7858elif test "$with_gnu_ld" = yes; then
81ecdfbb
RW
7859 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
7860$as_echo_n "checking for GNU ld... " >&6; }
3841debe 7861else
81ecdfbb
RW
7862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
7863$as_echo_n "checking for non-GNU ld... " >&6; }
3841debe 7864fi
81ecdfbb
RW
7865if test "${acl_cv_path_LD+set}" = set; then :
7866 $as_echo_n "(cached) " >&6
3841debe
DJ
7867else
7868 if test -z "$LD"; then
7869 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
7870 for ac_dir in $PATH; do
7871 test -z "$ac_dir" && ac_dir=.
7872 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
7873 acl_cv_path_LD="$ac_dir/$ac_prog"
7874 # Check to see if the program is GNU ld. I'd rather use --version,
7875 # but apparently some GNU ld's only accept -v.
7876 # Break only if it was the GNU/non-GNU ld that we prefer.
7877 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
7878 test "$with_gnu_ld" != no && break
7879 else
7880 test "$with_gnu_ld" != yes && break
7881 fi
7882 fi
7883 done
7884 IFS="$ac_save_ifs"
7885else
7886 acl_cv_path_LD="$LD" # Let the user override the test with a path.
7887fi
7888fi
7889
7890LD="$acl_cv_path_LD"
7891if test -n "$LD"; then
81ecdfbb
RW
7892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
7893$as_echo "$LD" >&6; }
3841debe 7894else
81ecdfbb
RW
7895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7896$as_echo "no" >&6; }
3841debe 7897fi
81ecdfbb
RW
7898test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
7899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
7900$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
7901if test "${acl_cv_prog_gnu_ld+set}" = set; then :
7902 $as_echo_n "(cached) " >&6
3841debe
DJ
7903else
7904 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
7905if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
7906 acl_cv_prog_gnu_ld=yes
7907else
7908 acl_cv_prog_gnu_ld=no
7909fi
7910fi
81ecdfbb
RW
7911{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
7912$as_echo "$acl_cv_prog_gnu_ld" >&6; }
3841debe
DJ
7913with_gnu_ld=$acl_cv_prog_gnu_ld
7914
7915
7916
81ecdfbb
RW
7917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
7918$as_echo_n "checking for shared library run path origin... " >&6; }
7919if test "${acl_cv_rpath+set}" = set; then :
7920 $as_echo_n "(cached) " >&6
3841debe
DJ
7921else
7922
7923 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
7924 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
7925 . ./conftest.sh
7926 rm -f ./conftest.sh
7927 acl_cv_rpath=done
7928
7929fi
81ecdfbb
RW
7930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
7931$as_echo "$acl_cv_rpath" >&6; }
3841debe
DJ
7932 wl="$acl_cv_wl"
7933 libext="$acl_cv_libext"
7934 shlibext="$acl_cv_shlibext"
7935 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
7936 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
7937 hardcode_direct="$acl_cv_hardcode_direct"
7938 hardcode_minus_L="$acl_cv_hardcode_minus_L"
81ecdfbb
RW
7939 # Check whether --enable-rpath was given.
7940if test "${enable_rpath+set}" = set; then :
7941 enableval=$enable_rpath; :
3841debe
DJ
7942else
7943 enable_rpath=yes
81ecdfbb
RW
7944fi
7945
3841debe
DJ
7946
7947
7948
7949
7950
7951
7952
7953
7954
7955 use_additional=yes
7956
7957 acl_save_prefix="$prefix"
7958 prefix="$acl_final_prefix"
7959 acl_save_exec_prefix="$exec_prefix"
7960 exec_prefix="$acl_final_exec_prefix"
7961
7962 eval additional_includedir=\"$includedir\"
7963 eval additional_libdir=\"$libdir\"
7964
7965 exec_prefix="$acl_save_exec_prefix"
7966 prefix="$acl_save_prefix"
7967
7968
81ecdfbb
RW
7969# Check whether --with-libexpat-prefix was given.
7970if test "${with_libexpat_prefix+set}" = set; then :
7971 withval=$with_libexpat_prefix;
3841debe
DJ
7972 if test "X$withval" = "Xno"; then
7973 use_additional=no
7974 else
7975 if test "X$withval" = "X"; then
7976
7977 acl_save_prefix="$prefix"
7978 prefix="$acl_final_prefix"
7979 acl_save_exec_prefix="$exec_prefix"
7980 exec_prefix="$acl_final_exec_prefix"
7981
7982 eval additional_includedir=\"$includedir\"
7983 eval additional_libdir=\"$libdir\"
7984
7985 exec_prefix="$acl_save_exec_prefix"
7986 prefix="$acl_save_prefix"
7987
7988 else
7989 additional_includedir="$withval/include"
7990 additional_libdir="$withval/lib"
7991 fi
7992 fi
7993
81ecdfbb
RW
7994fi
7995
3841debe
DJ
7996 LIBEXPAT=
7997 LTLIBEXPAT=
7998 INCEXPAT=
7999 rpathdirs=
8000 ltrpathdirs=
8001 names_already_handled=
8002 names_next_round='expat '
8003 while test -n "$names_next_round"; do
8004 names_this_round="$names_next_round"
8005 names_next_round=
8006 for name in $names_this_round; do
8007 already_handled=
8008 for n in $names_already_handled; do
8009 if test "$n" = "$name"; then
8010 already_handled=yes
8011 break
8012 fi
8013 done
8014 if test -z "$already_handled"; then
8015 names_already_handled="$names_already_handled $name"
8016 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
8017 eval value=\"\$HAVE_LIB$uppername\"
8018 if test -n "$value"; then
8019 if test "$value" = yes; then
8020 eval value=\"\$LIB$uppername\"
8021 test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
8022 eval value=\"\$LTLIB$uppername\"
8023 test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
8024 else
8025 :
8026 fi
8027 else
8028 found_dir=
8029 found_la=
8030 found_so=
8031 found_a=
8032 if test $use_additional = yes; then
8033 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
8034 found_dir="$additional_libdir"
8035 found_so="$additional_libdir/lib$name.$shlibext"
8036 if test -f "$additional_libdir/lib$name.la"; then
8037 found_la="$additional_libdir/lib$name.la"
8038 fi
8039 else
8040 if test -f "$additional_libdir/lib$name.$libext"; then
8041 found_dir="$additional_libdir"
8042 found_a="$additional_libdir/lib$name.$libext"
8043 if test -f "$additional_libdir/lib$name.la"; then
8044 found_la="$additional_libdir/lib$name.la"
8045 fi
8046 fi
8047 fi
8048 fi
8049 if test "X$found_dir" = "X"; then
8050 for x in $LDFLAGS $LTLIBEXPAT; do
8051
8052 acl_save_prefix="$prefix"
8053 prefix="$acl_final_prefix"
8054 acl_save_exec_prefix="$exec_prefix"
8055 exec_prefix="$acl_final_exec_prefix"
8056 eval x=\"$x\"
8057 exec_prefix="$acl_save_exec_prefix"
8058 prefix="$acl_save_prefix"
8059
8060 case "$x" in
8061 -L*)
8062 dir=`echo "X$x" | sed -e 's/^X-L//'`
8063 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
8064 found_dir="$dir"
8065 found_so="$dir/lib$name.$shlibext"
8066 if test -f "$dir/lib$name.la"; then
8067 found_la="$dir/lib$name.la"
8068 fi
8069 else
8070 if test -f "$dir/lib$name.$libext"; then
8071 found_dir="$dir"
8072 found_a="$dir/lib$name.$libext"
8073 if test -f "$dir/lib$name.la"; then
8074 found_la="$dir/lib$name.la"
8075 fi
8076 fi
8077 fi
8078 ;;
8079 esac
8080 if test "X$found_dir" != "X"; then
8081 break
8082 fi
8083 done
8084 fi
8085 if test "X$found_dir" != "X"; then
8086 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
8087 if test "X$found_so" != "X"; then
8088 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
8089 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
8090 else
8091 haveit=
8092 for x in $ltrpathdirs; do
8093 if test "X$x" = "X$found_dir"; then
8094 haveit=yes
8095 break
8096 fi
8097 done
8098 if test -z "$haveit"; then
8099 ltrpathdirs="$ltrpathdirs $found_dir"
8100 fi
8101 if test "$hardcode_direct" = yes; then
8102 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
8103 else
8104 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
8105 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
8106 haveit=
8107 for x in $rpathdirs; do
8108 if test "X$x" = "X$found_dir"; then
8109 haveit=yes
8110 break
8111 fi
8112 done
8113 if test -z "$haveit"; then
8114 rpathdirs="$rpathdirs $found_dir"
8115 fi
8116 else
8117 haveit=
8118 for x in $LDFLAGS $LIBEXPAT; do
8119
8120 acl_save_prefix="$prefix"
8121 prefix="$acl_final_prefix"
8122 acl_save_exec_prefix="$exec_prefix"
8123 exec_prefix="$acl_final_exec_prefix"
8124 eval x=\"$x\"
8125 exec_prefix="$acl_save_exec_prefix"
8126 prefix="$acl_save_prefix"
8127
8128 if test "X$x" = "X-L$found_dir"; then
8129 haveit=yes
8130 break
8131 fi
8132 done
8133 if test -z "$haveit"; then
8134 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
8135 fi
8136 if test "$hardcode_minus_L" != no; then
8137 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
8138 else
8139 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
8140 fi
8141 fi
8142 fi
8143 fi
8144 else
8145 if test "X$found_a" != "X"; then
8146 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
8147 else
8148 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
8149 fi
8150 fi
8151 additional_includedir=
8152 case "$found_dir" in
8153 */lib | */lib/)
8154 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
8155 additional_includedir="$basedir/include"
8156 ;;
8157 esac
8158 if test "X$additional_includedir" != "X"; then
8159 if test "X$additional_includedir" != "X/usr/include"; then
8160 haveit=
8161 if test "X$additional_includedir" = "X/usr/local/include"; then
8162 if test -n "$GCC"; then
8163 case $host_os in
8164 linux*) haveit=yes;;
8165 esac
8166 fi
8167 fi
8168 if test -z "$haveit"; then
8169 for x in $CPPFLAGS $INCEXPAT; do
8170
8171 acl_save_prefix="$prefix"
8172 prefix="$acl_final_prefix"
8173 acl_save_exec_prefix="$exec_prefix"
8174 exec_prefix="$acl_final_exec_prefix"
8175 eval x=\"$x\"
8176 exec_prefix="$acl_save_exec_prefix"
8177 prefix="$acl_save_prefix"
8178
8179 if test "X$x" = "X-I$additional_includedir"; then
8180 haveit=yes
8181 break
8182 fi
8183 done
8184 if test -z "$haveit"; then
8185 if test -d "$additional_includedir"; then
8186 INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
8187 fi
8188 fi
8189 fi
8190 fi
8191 fi
8192 if test -n "$found_la"; then
8193 save_libdir="$libdir"
8194 case "$found_la" in
8195 */* | *\\*) . "$found_la" ;;
8196 *) . "./$found_la" ;;
8197 esac
8198 libdir="$save_libdir"
8199 for dep in $dependency_libs; do
8200 case "$dep" in
8201 -L*)
8202 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
8203 if test "X$additional_libdir" != "X/usr/lib"; then
8204 haveit=
8205 if test "X$additional_libdir" = "X/usr/local/lib"; then
8206 if test -n "$GCC"; then
8207 case $host_os in
8208 linux*) haveit=yes;;
8209 esac
8210 fi
8211 fi
8212 if test -z "$haveit"; then
8213 haveit=
8214 for x in $LDFLAGS $LIBEXPAT; do
8215
8216 acl_save_prefix="$prefix"
8217 prefix="$acl_final_prefix"
8218 acl_save_exec_prefix="$exec_prefix"
8219 exec_prefix="$acl_final_exec_prefix"
8220 eval x=\"$x\"
8221 exec_prefix="$acl_save_exec_prefix"
8222 prefix="$acl_save_prefix"
8223
8224 if test "X$x" = "X-L$additional_libdir"; then
8225 haveit=yes
8226 break
8227 fi
8228 done
8229 if test -z "$haveit"; then
8230 if test -d "$additional_libdir"; then
8231 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
8232 fi
8233 fi
8234 haveit=
8235 for x in $LDFLAGS $LTLIBEXPAT; do
8236
8237 acl_save_prefix="$prefix"
8238 prefix="$acl_final_prefix"
8239 acl_save_exec_prefix="$exec_prefix"
8240 exec_prefix="$acl_final_exec_prefix"
8241 eval x=\"$x\"
8242 exec_prefix="$acl_save_exec_prefix"
8243 prefix="$acl_save_prefix"
8244
8245 if test "X$x" = "X-L$additional_libdir"; then
8246 haveit=yes
8247 break
8248 fi
8249 done
8250 if test -z "$haveit"; then
8251 if test -d "$additional_libdir"; then
8252 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
8253 fi
8254 fi
8255 fi
8256 fi
8257 ;;
8258 -R*)
8259 dir=`echo "X$dep" | sed -e 's/^X-R//'`
8260 if test "$enable_rpath" != no; then
8261 haveit=
8262 for x in $rpathdirs; do
8263 if test "X$x" = "X$dir"; then
8264 haveit=yes
8265 break
8266 fi
8267 done
8268 if test -z "$haveit"; then
8269 rpathdirs="$rpathdirs $dir"
8270 fi
8271 haveit=
8272 for x in $ltrpathdirs; do
8273 if test "X$x" = "X$dir"; then
8274 haveit=yes
8275 break
8276 fi
8277 done
8278 if test -z "$haveit"; then
8279 ltrpathdirs="$ltrpathdirs $dir"
8280 fi
8281 fi
8282 ;;
8283 -l*)
8284 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
8285 ;;
8286 *.la)
8287 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
8288 ;;
8289 *)
8290 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
8291 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
8292 ;;
81ecdfbb
RW
8293 esac
8294 done
8295 fi
8296 else
8297 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
8298 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
8299 fi
8300 fi
8301 fi
8302 done
8303 done
8304 if test "X$rpathdirs" != "X"; then
8305 if test -n "$hardcode_libdir_separator"; then
8306 alldirs=
8307 for found_dir in $rpathdirs; do
8308 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
8309 done
8310 acl_save_libdir="$libdir"
8311 libdir="$alldirs"
8312 eval flag=\"$hardcode_libdir_flag_spec\"
8313 libdir="$acl_save_libdir"
8314 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
8315 else
8316 for found_dir in $rpathdirs; do
8317 acl_save_libdir="$libdir"
8318 libdir="$found_dir"
8319 eval flag=\"$hardcode_libdir_flag_spec\"
8320 libdir="$acl_save_libdir"
8321 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
8322 done
8323 fi
8324 fi
8325 if test "X$ltrpathdirs" != "X"; then
8326 for found_dir in $ltrpathdirs; do
8327 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
8328 done
8329 fi
a9322a30
TT
8330
8331
81ecdfbb 8332 ac_save_CPPFLAGS="$CPPFLAGS"
a9322a30 8333
81ecdfbb
RW
8334 for element in $INCEXPAT; do
8335 haveit=
8336 for x in $CPPFLAGS; do
a9322a30 8337
81ecdfbb
RW
8338 acl_save_prefix="$prefix"
8339 prefix="$acl_final_prefix"
8340 acl_save_exec_prefix="$exec_prefix"
8341 exec_prefix="$acl_final_exec_prefix"
8342 eval x=\"$x\"
8343 exec_prefix="$acl_save_exec_prefix"
8344 prefix="$acl_save_prefix"
a8111142 8345
81ecdfbb
RW
8346 if test "X$x" = "X$element"; then
8347 haveit=yes
8348 break
8349 fi
8350 done
8351 if test -z "$haveit"; then
8352 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
8353 fi
8354 done
a9322a30
TT
8355
8356
81ecdfbb
RW
8357 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
8358$as_echo_n "checking for libexpat... " >&6; }
8359if test "${ac_cv_libexpat+set}" = set; then :
8360 $as_echo_n "(cached) " >&6
bec39cab 8361else
bec39cab 8362
81ecdfbb
RW
8363 ac_save_LIBS="$LIBS"
8364 LIBS="$LIBS $LIBEXPAT"
8365 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8366/* end confdefs.h. */
81ecdfbb
RW
8367#include "expat.h"
8368int
8369main ()
8370{
8371XML_Parser p = XML_ParserCreate (0);
8372 ;
8373 return 0;
8374}
bec39cab 8375_ACEOF
81ecdfbb
RW
8376if ac_fn_c_try_link "$LINENO"; then :
8377 ac_cv_libexpat=yes
c906108c 8378else
81ecdfbb 8379 ac_cv_libexpat=no
bec39cab 8380fi
81ecdfbb
RW
8381rm -f core conftest.err conftest.$ac_objext \
8382 conftest$ac_exeext conftest.$ac_ext
8383 LIBS="$ac_save_LIBS"
c906108c 8384
95ca63c4 8385fi
81ecdfbb
RW
8386{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
8387$as_echo "$ac_cv_libexpat" >&6; }
8388 if test "$ac_cv_libexpat" = yes; then
8389 HAVE_LIBEXPAT=yes
bec39cab 8390
81ecdfbb 8391$as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
bec39cab 8392
81ecdfbb
RW
8393 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
8394$as_echo_n "checking how to link with libexpat... " >&6; }
8395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
8396$as_echo "$LIBEXPAT" >&6; }
8397 else
8398 HAVE_LIBEXPAT=no
8399 CPPFLAGS="$ac_save_CPPFLAGS"
8400 LIBEXPAT=
8401 LTLIBEXPAT=
8402 fi
95ca63c4
CF
8403
8404
8405
7cb9022a
MK
8406
8407
bec39cab 8408
81ecdfbb
RW
8409 if test "$HAVE_LIBEXPAT" != yes; then
8410 if test "$with_expat" = yes; then
8411 as_fn_error "expat is missing or unusable" "$LINENO" 5
8412 else
8413 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
8414$as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
8415 fi
8416 else
8417 save_LIBS=$LIBS
8418 LIBS="$LIBS $LIBEXPAT"
8419 for ac_func in XML_StopParser
8420do :
8421 ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
8422if test "x$ac_cv_func_XML_StopParser" = x""yes; then :
bec39cab 8423 cat >>confdefs.h <<_ACEOF
81ecdfbb 8424#define HAVE_XML_STOPPARSER 1
bec39cab 8425_ACEOF
95ca63c4 8426
bec39cab 8427fi
bec39cab 8428done
95ca63c4 8429
81ecdfbb
RW
8430 LIBS=$save_LIBS
8431 fi
a9322a30
TT
8432fi
8433
d344e670
DE
8434# --------------------- #
8435# Check for libpython. #
8436# --------------------- #
8437
a9322a30 8438
a9322a30
TT
8439
8440
ec685c5e 8441
0c4a4063 8442
81ecdfbb
RW
8443# Check whether --with-python was given.
8444if test "${with_python+set}" = set; then :
8445 withval=$with_python;
bec39cab 8446else
81ecdfbb 8447 with_python=auto
bec39cab 8448fi
bec39cab 8449
81ecdfbb
RW
8450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
8451$as_echo_n "checking whether to use python... " >&6; }
8452{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
8453$as_echo "$with_python" >&6; }
9a156167 8454
81ecdfbb
RW
8455if test "${with_python}" = no; then
8456 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
8457$as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
8458 have_libpython=no
bec39cab 8459else
81ecdfbb 8460 case "${with_python}" in
8c85a4e2 8461 [\\/]* | ?:[\\/]*)
ec685c5e
DE
8462 if test -d ${with_python}; then
8463 # Assume the python binary is ${with_python}/bin/python.
ec685c5e 8464 python_prog="${with_python}/bin/python"
0c4a4063 8465 python_prefix=
9c4ea6c5
JB
8466 # If python does not exit ${with_python}/bin, then try in
8467 # ${with_python}. On Windows/MinGW, this is where the Python
8468 # executable is.
8469 if test ! -x "${python_prog}"; then
8470 python_prog="${with_python}/python"
8471 python_prefix=
8472 fi
e7a30f46 8473 if test ! -x "${python_prog}"; then
ec685c5e
DE
8474 # Fall back to gdb 7.0/7.1 behaviour.
8475 python_prog=missing
0c4a4063 8476 python_prefix=${with_python}
ec685c5e 8477 fi
e7a30f46 8478 elif test -x "${with_python}"; then
ec685c5e
DE
8479 # While we can't run python compiled for $host (unless host == build),
8480 # the user could write a script that provides the needed information,
8481 # so we support that.
ec685c5e 8482 python_prog=${with_python}
0c4a4063 8483 python_prefix=
ec685c5e
DE
8484 else
8485 as_fn_error "invalid value for --with-python" "$LINENO" 5
8486 fi
81ecdfbb 8487 ;;
ec685c5e
DE
8488 */*)
8489 # Disallow --with-python=foo/bar.
81ecdfbb
RW
8490 as_fn_error "invalid value for --with-python" "$LINENO" 5
8491 ;;
ec685c5e
DE
8492 *)
8493 # The user has either specified auto, yes, or the name of the python
8494 # program assumed to be in $PATH.
8495 python_prefix=
8496 case "${with_python}" in
8497 yes | auto)
8498 if test ${build} = ${host}; then
8499 # Extract the first word of "python", so it can be a program name with args.
8500set dummy python; ac_word=$2
8501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8502$as_echo_n "checking for $ac_word... " >&6; }
8503if test "${ac_cv_path_python_prog_path+set}" = set; then :
8504 $as_echo_n "(cached) " >&6
8505else
8506 case $python_prog_path in
8507 [\\/]* | ?:[\\/]*)
8508 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
8509 ;;
8510 *)
8511 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8512for as_dir in $PATH
8513do
8514 IFS=$as_save_IFS
8515 test -z "$as_dir" && as_dir=.
8516 for ac_exec_ext in '' $ac_executable_extensions; do
8517 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8518 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
8519 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8520 break 2
8521 fi
8522done
8523 done
8524IFS=$as_save_IFS
8525
8526 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
8527 ;;
8528esac
8529fi
8530python_prog_path=$ac_cv_path_python_prog_path
8531if test -n "$python_prog_path"; then
8532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
8533$as_echo "$python_prog_path" >&6; }
8534else
8535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8536$as_echo "no" >&6; }
8537fi
8538
8539
8540 if test "${python_prog_path}" = missing; then
8541 python_prog=missing
8542 else
8543 python_prog=${python_prog_path}
8544 fi
8545 else
8546 # Not much we can do except assume the cross-compiler will find the
8547 # right files.
8548 python_prog=missing
8549 fi
8550 ;;
8551 *)
8552 # While we can't run python compiled for $host (unless host == build),
8553 # the user could write a script that provides the needed information,
8554 # so we support that.
8555 python_prog="${with_python}"
8556 # Extract the first word of "${python_prog}", so it can be a program name with args.
8557set dummy ${python_prog}; ac_word=$2
8558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8559$as_echo_n "checking for $ac_word... " >&6; }
8560if test "${ac_cv_path_python_prog_path+set}" = set; then :
8561 $as_echo_n "(cached) " >&6
8562else
8563 case $python_prog_path in
8564 [\\/]* | ?:[\\/]*)
8565 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
8566 ;;
8567 *)
8568 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8569for as_dir in $PATH
8570do
8571 IFS=$as_save_IFS
8572 test -z "$as_dir" && as_dir=.
8573 for ac_exec_ext in '' $ac_executable_extensions; do
8574 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8575 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
8576 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8577 break 2
8578 fi
8579done
8580 done
8581IFS=$as_save_IFS
8582
8583 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
8584 ;;
8585esac
8586fi
8587python_prog_path=$ac_cv_path_python_prog_path
8588if test -n "$python_prog_path"; then
8589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
8590$as_echo "$python_prog_path" >&6; }
8591else
8592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8593$as_echo "no" >&6; }
8594fi
8595
8596
8597 if test "${python_prog_path}" = missing; then
8598 as_fn_error "unable to find python program ${python_prog}" "$LINENO" 5
8599 fi
8600 ;;
8601 esac
81ecdfbb
RW
8602 esac
8603
ec685c5e 8604 if test "${python_prog}" != missing; then
e7a30f46
DE
8605 # We have a python program to use, but it may be too old.
8606 # Don't flag an error for --with-python=auto (the default).
8607 have_python_config=yes
ec685c5e
DE
8608 python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
8609 if test $? != 0; then
e7a30f46
DE
8610 have_python_config=failed
8611 if test "${with_python}" != auto; then
8612 as_fn_error "failure running python-config --includes" "$LINENO" 5
8613 fi
ec685c5e
DE
8614 fi
8615 python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
8616 if test $? != 0; then
e7a30f46
DE
8617 have_python_config=failed
8618 if test "${with_python}" != auto; then
8619 as_fn_error "failure running python-config --ldflags" "$LINENO" 5
8620 fi
ec685c5e 8621 fi
0c4a4063
DE
8622 python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
8623 if test $? != 0; then
e7a30f46
DE
8624 have_python_config=failed
8625 if test "${with_python}" != auto; then
8626 as_fn_error "failure running python-config --exec-prefix" "$LINENO" 5
8627 fi
0c4a4063 8628 fi
ec685c5e 8629 else
ac534cba
JB
8630 # We do not have a python executable we can use to determine where
8631 # to find the Python headers and libs. We cannot guess the include
8632 # path from the python_prefix either, because that include path
8633 # depends on the Python version. So, there is nothing much we can
8634 # do except assume that the compiler will be able to find those files.
8635 python_includes=
8636 python_libs=
0c4a4063 8637 have_python_config=no
ec685c5e 8638 fi
bec39cab 8639
ec685c5e
DE
8640 # If we have python-config, only try the configuration it provides.
8641 # Otherwise fallback on the old way of trying different versions of
8642 # python in turn.
81ecdfbb 8643
ec685c5e
DE
8644 have_libpython=no
8645 if test "${have_python_config}" = yes; then
c1039e3c
JB
8646 # Determine the Python version by extracting "-lpython<version>"
8647 # part of the python_libs. <version> is usually X.Y with X and Y
8648 # being decimal numbers, but can also be XY (seen on Windows).
8649 #
8650 # The extraction is performed using sed with a regular expression.
8651 # Initially, the regexp used was using the '?' quantifier to make
8652 # the dot in the version number optional. Unfortunately, this
8653 # does not work with non-GNU versions of sed because, because of
8654 # what looks like a limitation (the '?' quantifier does not work
8655 # with back-references). We work around this limitation by using
8656 # the '*' quantifier instead. It means that, in theory, we might
8657 # match unexpected version strings such as "-lpython2..7", but
8658 # this seems unlikely in practice. And even if that happens,
8659 # an error will be triggered later on, when checking that version
8660 # number.
ec685c5e 8661 python_version=`echo " ${python_libs} " \
c1039e3c 8662 | sed -e 's,^.* -l\(python[0-9]*[.]*[0-9]*\).*$,\1,'`
0c4a4063
DE
8663 case "${python_version}" in
8664 python*)
ec685c5e
DE
8665
8666 version=${python_version}
8667
8668 new_CPPFLAGS=${python_includes}
8669 new_LIBS=${python_libs}
81ecdfbb
RW
8670 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8671$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 8672 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 8673 save_LIBS=$LIBS
ec685c5e
DE
8674 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8675 LIBS="$LIBS $new_LIBS"
8676 found_usable_python=no
81ecdfbb 8677 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8678/* end confdefs.h. */
ac534cba 8679#include "Python.h"
81ecdfbb
RW
8680int
8681main ()
8682{
8683Py_Initialize ();
8684 ;
8685 return 0;
8686}
bec39cab 8687_ACEOF
81ecdfbb 8688if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
8689 have_libpython=${version}
8690 found_usable_python=yes
ac534cba
JB
8691 PYTHON_CPPFLAGS=$new_CPPFLAGS
8692 PYTHON_LIBS=$new_LIBS
9a156167 8693fi
81ecdfbb
RW
8694rm -f core conftest.err conftest.$ac_objext \
8695 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
8696 CPPFLAGS=$save_CPPFLAGS
8697 LIBS=$save_LIBS
ec685c5e
DE
8698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8699$as_echo "${found_usable_python}" >&6; }
9a156167 8700
0c4a4063
DE
8701 ;;
8702 *)
ec685c5e 8703 as_fn_error "unable to determine python version from ${python_libs}" "$LINENO" 5
0c4a4063
DE
8704 ;;
8705 esac
e7a30f46 8706 elif test "${have_python_config}" != failed; then
ec685c5e 8707 if test "${have_libpython}" = no; then
9a156167 8708
420697bb
TT
8709 version=python2.7
8710
8711 new_CPPFLAGS=${python_includes}
8712 new_LIBS="${python_libs} -lpython2.7"
8713 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8714$as_echo_n "checking for ${version}... " >&6; }
8715 save_CPPFLAGS=$CPPFLAGS
8716 save_LIBS=$LIBS
8717 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8718 LIBS="$LIBS $new_LIBS"
8719 found_usable_python=no
8720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8721/* end confdefs.h. */
ac534cba 8722#include "Python.h"
420697bb
TT
8723int
8724main ()
8725{
8726Py_Initialize ();
8727 ;
8728 return 0;
8729}
8730_ACEOF
8731if ac_fn_c_try_link "$LINENO"; then :
8732 have_libpython=${version}
8733 found_usable_python=yes
ac534cba
JB
8734 PYTHON_CPPFLAGS=$new_CPPFLAGS
8735 PYTHON_LIBS=$new_LIBS
420697bb
TT
8736fi
8737rm -f core conftest.err conftest.$ac_objext \
8738 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
8739 CPPFLAGS=$save_CPPFLAGS
8740 LIBS=$save_LIBS
420697bb
TT
8741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8742$as_echo "${found_usable_python}" >&6; }
8743
8744 fi
8745 if test "${have_libpython}" = no; then
8746
ec685c5e
DE
8747 version=python2.6
8748
8749 new_CPPFLAGS=${python_includes}
8750 new_LIBS="${python_libs} -lpython2.6"
8751 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8752$as_echo_n "checking for ${version}... " >&6; }
8753 save_CPPFLAGS=$CPPFLAGS
8754 save_LIBS=$LIBS
8755 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8756 LIBS="$LIBS $new_LIBS"
8757 found_usable_python=no
8758 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8759/* end confdefs.h. */
ac534cba 8760#include "Python.h"
ec685c5e
DE
8761int
8762main ()
8763{
8764Py_Initialize ();
8765 ;
8766 return 0;
8767}
8768_ACEOF
8769if ac_fn_c_try_link "$LINENO"; then :
8770 have_libpython=${version}
8771 found_usable_python=yes
ac534cba
JB
8772 PYTHON_CPPFLAGS=$new_CPPFLAGS
8773 PYTHON_LIBS=$new_LIBS
ec685c5e
DE
8774fi
8775rm -f core conftest.err conftest.$ac_objext \
8776 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
8777 CPPFLAGS=$save_CPPFLAGS
8778 LIBS=$save_LIBS
ec685c5e
DE
8779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8780$as_echo "${found_usable_python}" >&6; }
9a156167 8781
81ecdfbb 8782 fi
ec685c5e 8783 if test ${have_libpython} = no; then
9a156167 8784
81ecdfbb 8785 version=python2.5
9a156167 8786
ec685c5e
DE
8787 new_CPPFLAGS=${python_includes}
8788 new_LIBS="${python_libs} -lpython2.5"
81ecdfbb
RW
8789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8790$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 8791 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 8792 save_LIBS=$LIBS
ec685c5e
DE
8793 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8794 LIBS="$LIBS $new_LIBS"
8795 found_usable_python=no
81ecdfbb 8796 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 8797/* end confdefs.h. */
ac534cba 8798#include "Python.h"
81ecdfbb
RW
8799int
8800main ()
8801{
8802Py_Initialize ();
8803 ;
8804 return 0;
8805}
436868fb 8806_ACEOF
81ecdfbb 8807if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
8808 have_libpython=${version}
8809 found_usable_python=yes
ac534cba
JB
8810 PYTHON_CPPFLAGS=$new_CPPFLAGS
8811 PYTHON_LIBS=$new_LIBS
436868fb 8812fi
81ecdfbb
RW
8813rm -f core conftest.err conftest.$ac_objext \
8814 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
8815 CPPFLAGS=$save_CPPFLAGS
8816 LIBS=$save_LIBS
ec685c5e
DE
8817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8818$as_echo "${found_usable_python}" >&6; }
a9322a30 8819
81ecdfbb 8820 fi
ec685c5e 8821 if test ${have_libpython} = no; then
a9322a30 8822
81ecdfbb 8823 version=python2.4
a9322a30 8824
ec685c5e
DE
8825 new_CPPFLAGS=${python_includes}
8826 new_LIBS="${python_libs} -lpython2.4"
81ecdfbb
RW
8827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8828$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 8829 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 8830 save_LIBS=$LIBS
ec685c5e
DE
8831 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8832 LIBS="$LIBS $new_LIBS"
8833 found_usable_python=no
81ecdfbb 8834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 8835/* end confdefs.h. */
ac534cba 8836#include "Python.h"
a9322a30
TT
8837int
8838main ()
8839{
81ecdfbb 8840Py_Initialize ();
a9322a30
TT
8841 ;
8842 return 0;
8843}
436868fb 8844_ACEOF
81ecdfbb 8845if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
8846 have_libpython=${version}
8847 found_usable_python=yes
ac534cba
JB
8848 PYTHON_CPPFLAGS=$new_CPPFLAGS
8849 PYTHON_LIBS=$new_LIBS
436868fb 8850fi
81ecdfbb
RW
8851rm -f core conftest.err conftest.$ac_objext \
8852 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
8853 CPPFLAGS=$save_CPPFLAGS
8854 LIBS=$save_LIBS
ec685c5e
DE
8855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8856$as_echo "${found_usable_python}" >&6; }
81ecdfbb 8857
ec685c5e
DE
8858 fi
8859 fi
9c4ea6c5 8860 if test "${have_libpython}" = python2.7 -o "${have_libpython}" = python27; then
11763c18
TT
8861
8862$as_echo "#define HAVE_LIBPYTHON2_7 1" >>confdefs.h
8863
9c4ea6c5 8864 elif test "${have_libpython}" = python2.6 -o "${have_libpython}" = python26; then
ec685c5e
DE
8865
8866$as_echo "#define HAVE_LIBPYTHON2_6 1" >>confdefs.h
8867
9c4ea6c5 8868 elif test "${have_libpython}" = python2.5 -o "${have_libpython}" = python25; then
ec685c5e
DE
8869
8870$as_echo "#define HAVE_LIBPYTHON2_5 1" >>confdefs.h
8871
9c4ea6c5 8872 elif test "${have_libpython}" = python2.4 -o "${have_libpython}" = python24; then
81ecdfbb
RW
8873
8874$as_echo "#define HAVE_LIBPYTHON2_4 1" >>confdefs.h
8875
81ecdfbb 8876 fi
ec685c5e
DE
8877
8878 if test "${have_libpython}" = no; then
81ecdfbb
RW
8879 case "${with_python}" in
8880 yes)
8881 as_fn_error "python is missing or unusable" "$LINENO" 5
8882 ;;
8883 auto)
8884 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
8885$as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
8886 ;;
8887 *)
8888 as_fn_error "no usable python found at ${with_python}" "$LINENO" 5
8889 ;;
8890 esac
0c4a4063
DE
8891 else
8892 if test -n "${python_prefix}"; then
8893
8894cat >>confdefs.h <<_ACEOF
8895#define WITH_PYTHON_PATH "${python_prefix}"
8896_ACEOF
8897
8898
8899 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
8900 if test "x$prefix" = xNONE; then
8901 test_prefix=/usr/local
8902 else
8903 test_prefix=$prefix
8904 fi
8905 else
8906 test_prefix=$exec_prefix
8907 fi
8908 value=0
8909 case ${python_prefix} in
8910 "${test_prefix}"|"${test_prefix}/"*|\
8911 '${exec_prefix}'|'${exec_prefix}/'*)
8912 value=1
8913 ;;
8914 esac
8915
8916cat >>confdefs.h <<_ACEOF
8917#define PYTHON_PATH_RELOCATABLE $value
8918_ACEOF
8919
8920
8921 fi
81ecdfbb 8922 fi
436868fb 8923fi
436868fb 8924
ec685c5e 8925if test "${have_libpython}" != no; then
436868fb 8926
81ecdfbb 8927$as_echo "#define HAVE_PYTHON 1" >>confdefs.h
436868fb 8928
81ecdfbb
RW
8929 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
8930 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
8931 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
94f7449c 8932 CONFIG_INSTALL="$CONFIG_INSTALL install-python"
81ecdfbb 8933 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
436868fb 8934
81ecdfbb
RW
8935 # Flags needed to compile Python code (taken from python-config --cflags).
8936 # We cannot call python-config directly because it will output whatever was
8937 # used when compiling the Python interpreter itself, including flags which
8938 # would make the python-related objects be compiled differently from the
8939 # rest of GDB (e.g., -O2 and -fPIC).
8940 if test "${GCC}" = yes; then
8941 tentative_python_cflags="-fno-strict-aliasing -DNDEBUG -fwrapv"
8942 fi
436868fb 8943
81ecdfbb
RW
8944 if test "x${tentative_python_cflags}" != x; then
8945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
8946$as_echo_n "checking compiler flags for python code... " >&6; }
8947 for flag in ${tentative_python_cflags}; do
8948 # Check that the compiler accepts it
8949 saved_CFLAGS="$CFLAGS"
8950 CFLAGS="$CFLAGS $flag"
8951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8952/* end confdefs.h. */
81ecdfbb 8953
a9322a30
TT
8954int
8955main ()
8956{
a9322a30
TT
8957
8958 ;
8959 return 0;
8960}
bec39cab 8961_ACEOF
81ecdfbb
RW
8962if ac_fn_c_try_compile "$LINENO"; then :
8963 PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
bec39cab 8964fi
81ecdfbb
RW
8965rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8966 CFLAGS="$saved_CFLAGS"
8967 done
8968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
8969$as_echo "${PYTHON_CFLAGS}" >&6; }
8970 fi
043b6510 8971
c83393b9
JB
8972 # On x64 Windows, Python's include headers, and pyconfig.h in
8973 # particular, rely on MS_WIN64 macro to detect that it's a 64bit
8974 # version of Windows. Unfortunately, MS_WIN64 is only defined if
8975 # _MSC_VER, a Microsoft-specific macro, is defined. So, when
8976 # building on x64 Windows with GCC, we define MS_WIN64 ourselves.
8977 # The issue was reported to the Python community, but still isn't
8978 # solved as of 2012-10-02 (http://bugs.python.org/issue4709).
8979
043b6510 8980 case "$gdb_host" in
c83393b9
JB
8981 mingw64)
8982 if test "${GCC}" = yes; then
8983 CPPFLAGS="$CPPFLAGS -DMS_WIN64"
8984 fi
8985 ;;
043b6510 8986 esac
a8db4212
YPK
8987
8988 # Note that "python -m threading" cannot be used to check for
8989 # threading support due to a bug in Python 2.7.3
8990 # (http://bugs.python.org/issue15567).
8991 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether python supports threads" >&5
8992$as_echo_n "checking whether python supports threads... " >&6; }
8993 saved_CPPFLAGS="${CPPFLAGS}"
8994 CPPFLAGS="${PYTHON_CPPFLAGS}"
8995 # Note that the test is reversed so that python_has_threads=yes on
8996 # unexpected failures.
8997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8998/* end confdefs.h. */
8999
9000#include <Python.h>
9001#ifdef WITH_THREAD
9002# error
9003#endif
9004
9005_ACEOF
9006if ac_fn_c_try_cpp "$LINENO"; then :
9007 python_has_threads=no
9008else
9009 python_has_threads=yes
9010fi
9011rm -f conftest.err conftest.$ac_ext
9012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_has_threads}" >&5
9013$as_echo "${python_has_threads}" >&6; }
9014 CPPFLAGS="${saved_CPPFLAGS}"
81ecdfbb 9015else
6dddc817
DE
9016 # Even if Python support is not compiled in, we need to have this file
9017 # included so that the "python" command, et.al., still exists.
9018 CONFIG_OBS="$CONFIG_OBS python.o"
9019 CONFIG_SRCS="$CONFIG_SRCS python/python.c"
a9322a30 9020fi
9a156167 9021
ed3ef339
DE
9022
9023
4df42755
DE
9024 if test "${have_libpython}" != no; then
9025 HAVE_PYTHON_TRUE=
9026 HAVE_PYTHON_FALSE='#'
9027else
9028 HAVE_PYTHON_TRUE='#'
9029 HAVE_PYTHON_FALSE=
9030fi
9031
ed3ef339
DE
9032
9033# -------------------- #
9034# Check for libguile. #
9035# -------------------- #
9036
9037
e1402065
DE
9038
9039
9040
9041
9042# Check whether --with-guile was given.
9043if test "${with_guile+set}" = set; then :
9044 withval=$with_guile;
9045else
9046 with_guile=auto
9047fi
9048
9049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use guile" >&5
9050$as_echo_n "checking whether to use guile... " >&6; }
9051{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_guile" >&5
9052$as_echo "$with_guile" >&6; }
9053
ed3ef339
DE
9054# Extract the first word of "pkg-config", so it can be a program name with args.
9055set dummy pkg-config; ac_word=$2
9056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9057$as_echo_n "checking for $ac_word... " >&6; }
9058if test "${ac_cv_path_pkg_config_prog_path+set}" = set; then :
9059 $as_echo_n "(cached) " >&6
9060else
9061 case $pkg_config_prog_path in
9062 [\\/]* | ?:[\\/]*)
9063 ac_cv_path_pkg_config_prog_path="$pkg_config_prog_path" # Let the user override the test with a path.
9064 ;;
9065 *)
9066 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9067for as_dir in $PATH
9068do
9069 IFS=$as_save_IFS
9070 test -z "$as_dir" && as_dir=.
9071 for ac_exec_ext in '' $ac_executable_extensions; do
9072 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9073 ac_cv_path_pkg_config_prog_path="$as_dir/$ac_word$ac_exec_ext"
9074 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9075 break 2
9076 fi
9077done
9078 done
9079IFS=$as_save_IFS
9080
9081 test -z "$ac_cv_path_pkg_config_prog_path" && ac_cv_path_pkg_config_prog_path="missing"
9082 ;;
9083esac
9084fi
9085pkg_config_prog_path=$ac_cv_path_pkg_config_prog_path
9086if test -n "$pkg_config_prog_path"; then
9087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config_prog_path" >&5
9088$as_echo "$pkg_config_prog_path" >&6; }
9089else
9090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9091$as_echo "no" >&6; }
9092fi
9093
9094
9095
214ab2da 9096try_guile_versions="guile-2.2 guile-2.0"
ed3ef339
DE
9097have_libguile=no
9098case "${with_guile}" in
9099no)
9100 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: guile support disabled; some features will be unavailable." >&5
9101$as_echo "$as_me: WARNING: guile support disabled; some features will be unavailable." >&2;}
9102 ;;
9103auto)
e1402065
DE
9104 if test "${pkg_config_prog_path}" = "missing"; then
9105 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found, guile support disabled" >&5
9106$as_echo "$as_me: WARNING: pkg-config not found, guile support disabled" >&2;}
9107 else
ed3ef339
DE
9108
9109 pkg_config=${pkg_config_prog_path}
9110 guile_version_list=${try_guile_versions}
9111 flag_errors=no
9112
ed3ef339
DE
9113 found_usable_guile=checking
9114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
9115$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
9116 for guile_version in ${guile_version_list}; do
9117 ${pkg_config} --exists ${guile_version} 2>/dev/null
9118 if test $? != 0; then
9119 continue
9120 fi
9121 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
9122 if test $? != 0; then
9123 as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
9124 fi
9125 new_LIBS=`${pkg_config} --libs ${guile_version}`
9126 if test $? != 0; then
9127 as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
9128 fi
9129 found_usable_guile=${guile_version}
9130 break
9131 done
9132 if test "${found_usable_guile}" = "checking"; then
9133 if test "${flag_errors}" = "yes"; then
9134 as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
9135 else
9136 found_usable_guile=no
9137 fi
9138 fi
9139 if test "${found_usable_guile}" != no; then
9140 save_CPPFLAGS=$CPPFLAGS
9141 save_LIBS=$LIBS
9142 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9143 LIBS="$LIBS $new_LIBS"
9144 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9145/* end confdefs.h. */
9146#include "libguile.h"
9147int
9148main ()
9149{
9150scm_init_guile ();
9151 ;
9152 return 0;
9153}
9154_ACEOF
9155if ac_fn_c_try_link "$LINENO"; then :
9156 have_libguile=yes
9157 GUILE_CPPFLAGS=$new_CPPFLAGS
9158 GUILE_LIBS=$new_LIBS
9159else
9160 found_usable_guile=no
9161fi
9162rm -f core conftest.err conftest.$ac_objext \
9163 conftest$ac_exeext conftest.$ac_ext
92fab5a6
AW
9164 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
9165if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then :
9166
9167$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
9168
9169
9170fi
9171
ed3ef339
DE
9172 CPPFLAGS=$save_CPPFLAGS
9173 LIBS=$save_LIBS
9174 if test "${found_usable_guile}" = no; then
9175 if test "${flag_errors}" = yes; then
9176 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9177$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9178as_fn_error "linking guile version ${guile_version} test program failed
9179See \`config.log' for more details." "$LINENO" 5; }
9180 fi
9181 fi
9182 fi
9183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
9184$as_echo "${found_usable_guile}" >&6; }
9185
e1402065 9186 fi
ed3ef339
DE
9187 ;;
9188yes)
e1402065
DE
9189 if test "${pkg_config_prog_path}" = "missing"; then
9190 as_fn_error "pkg-config not found" "$LINENO" 5
9191 fi
ed3ef339
DE
9192
9193 pkg_config=${pkg_config_prog_path}
9194 guile_version_list=${try_guile_versions}
9195 flag_errors=yes
9196
ed3ef339
DE
9197 found_usable_guile=checking
9198 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
9199$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
9200 for guile_version in ${guile_version_list}; do
9201 ${pkg_config} --exists ${guile_version} 2>/dev/null
9202 if test $? != 0; then
9203 continue
9204 fi
9205 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
9206 if test $? != 0; then
9207 as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
9208 fi
9209 new_LIBS=`${pkg_config} --libs ${guile_version}`
9210 if test $? != 0; then
9211 as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
9212 fi
9213 found_usable_guile=${guile_version}
9214 break
9215 done
9216 if test "${found_usable_guile}" = "checking"; then
9217 if test "${flag_errors}" = "yes"; then
9218 as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
9219 else
9220 found_usable_guile=no
9221 fi
9222 fi
9223 if test "${found_usable_guile}" != no; then
9224 save_CPPFLAGS=$CPPFLAGS
9225 save_LIBS=$LIBS
9226 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9227 LIBS="$LIBS $new_LIBS"
9228 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9229/* end confdefs.h. */
9230#include "libguile.h"
9231int
9232main ()
9233{
9234scm_init_guile ();
9235 ;
9236 return 0;
9237}
9238_ACEOF
9239if ac_fn_c_try_link "$LINENO"; then :
9240 have_libguile=yes
9241 GUILE_CPPFLAGS=$new_CPPFLAGS
9242 GUILE_LIBS=$new_LIBS
9243else
9244 found_usable_guile=no
9245fi
9246rm -f core conftest.err conftest.$ac_objext \
9247 conftest$ac_exeext conftest.$ac_ext
92fab5a6
AW
9248 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
9249if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then :
9250
9251$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
9252
9253
9254fi
9255
ed3ef339
DE
9256 CPPFLAGS=$save_CPPFLAGS
9257 LIBS=$save_LIBS
9258 if test "${found_usable_guile}" = no; then
9259 if test "${flag_errors}" = yes; then
9260 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9261$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9262as_fn_error "linking guile version ${guile_version} test program failed
9263See \`config.log' for more details." "$LINENO" 5; }
9264 fi
9265 fi
9266 fi
9267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
9268$as_echo "${found_usable_guile}" >&6; }
9269
9270 ;;
9271[\\/]* | ?:[\\/]*)
e1402065 9272 if test -x "${with_guile}"; then
ed3ef339
DE
9273
9274 pkg_config=${with_guile}
9275 guile_version_list=${try_guile_versions}
9276 flag_errors=yes
9277
ed3ef339
DE
9278 found_usable_guile=checking
9279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
9280$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
9281 for guile_version in ${guile_version_list}; do
9282 ${pkg_config} --exists ${guile_version} 2>/dev/null
9283 if test $? != 0; then
9284 continue
9285 fi
9286 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
9287 if test $? != 0; then
9288 as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
9289 fi
9290 new_LIBS=`${pkg_config} --libs ${guile_version}`
9291 if test $? != 0; then
9292 as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
9293 fi
9294 found_usable_guile=${guile_version}
9295 break
9296 done
9297 if test "${found_usable_guile}" = "checking"; then
9298 if test "${flag_errors}" = "yes"; then
9299 as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
9300 else
9301 found_usable_guile=no
9302 fi
9303 fi
9304 if test "${found_usable_guile}" != no; then
9305 save_CPPFLAGS=$CPPFLAGS
9306 save_LIBS=$LIBS
9307 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9308 LIBS="$LIBS $new_LIBS"
9309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9310/* end confdefs.h. */
9311#include "libguile.h"
9312int
9313main ()
9314{
9315scm_init_guile ();
9316 ;
9317 return 0;
9318}
9319_ACEOF
9320if ac_fn_c_try_link "$LINENO"; then :
9321 have_libguile=yes
9322 GUILE_CPPFLAGS=$new_CPPFLAGS
9323 GUILE_LIBS=$new_LIBS
9324else
9325 found_usable_guile=no
9326fi
9327rm -f core conftest.err conftest.$ac_objext \
9328 conftest$ac_exeext conftest.$ac_ext
92fab5a6
AW
9329 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
9330if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then :
9331
9332$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
9333
9334
9335fi
9336
ed3ef339
DE
9337 CPPFLAGS=$save_CPPFLAGS
9338 LIBS=$save_LIBS
9339 if test "${found_usable_guile}" = no; then
9340 if test "${flag_errors}" = yes; then
9341 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9342$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9343as_fn_error "linking guile version ${guile_version} test program failed
9344See \`config.log' for more details." "$LINENO" 5; }
9345 fi
9346 fi
9347 fi
9348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
9349$as_echo "${found_usable_guile}" >&6; }
9350
e1402065
DE
9351 else
9352 as_fn_error "Guile config program not executable: ${with_guile}" "$LINENO" 5
9353 fi
ed3ef339
DE
9354 ;;
9355"" | */*)
9356 # Disallow --with=guile="" and --with-guile=foo/bar.
9357 as_fn_error "invalid value for --with-guile" "$LINENO" 5
9358 ;;
9359*)
9360 # A space separate list of guile versions to try, in order.
e1402065
DE
9361 if test "${pkg_config_prog_path}" = "missing"; then
9362 as_fn_error "pkg-config not found" "$LINENO" 5
9363 fi
ed3ef339
DE
9364
9365 pkg_config=${pkg_config_prog_path}
9366 guile_version_list=${with_guile}
9367 flag_errors=yes
9368
ed3ef339
DE
9369 found_usable_guile=checking
9370 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
9371$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
9372 for guile_version in ${guile_version_list}; do
9373 ${pkg_config} --exists ${guile_version} 2>/dev/null
9374 if test $? != 0; then
9375 continue
9376 fi
9377 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
9378 if test $? != 0; then
9379 as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
9380 fi
9381 new_LIBS=`${pkg_config} --libs ${guile_version}`
9382 if test $? != 0; then
9383 as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
9384 fi
9385 found_usable_guile=${guile_version}
9386 break
9387 done
9388 if test "${found_usable_guile}" = "checking"; then
9389 if test "${flag_errors}" = "yes"; then
9390 as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
9391 else
9392 found_usable_guile=no
9393 fi
9394 fi
9395 if test "${found_usable_guile}" != no; then
9396 save_CPPFLAGS=$CPPFLAGS
9397 save_LIBS=$LIBS
9398 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9399 LIBS="$LIBS $new_LIBS"
9400 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9401/* end confdefs.h. */
9402#include "libguile.h"
9403int
9404main ()
9405{
9406scm_init_guile ();
9407 ;
9408 return 0;
9409}
9410_ACEOF
9411if ac_fn_c_try_link "$LINENO"; then :
9412 have_libguile=yes
9413 GUILE_CPPFLAGS=$new_CPPFLAGS
9414 GUILE_LIBS=$new_LIBS
9415else
9416 found_usable_guile=no
9417fi
9418rm -f core conftest.err conftest.$ac_objext \
9419 conftest$ac_exeext conftest.$ac_ext
92fab5a6
AW
9420 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
9421if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then :
9422
9423$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
9424
9425
9426fi
9427
ed3ef339
DE
9428 CPPFLAGS=$save_CPPFLAGS
9429 LIBS=$save_LIBS
9430 if test "${found_usable_guile}" = no; then
9431 if test "${flag_errors}" = yes; then
9432 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9433$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9434as_fn_error "linking guile version ${guile_version} test program failed
9435See \`config.log' for more details." "$LINENO" 5; }
9436 fi
9437 fi
9438 fi
9439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
9440$as_echo "${found_usable_guile}" >&6; }
9441
9442 ;;
9443esac
9444
e76c5d17 9445if test "${have_libguile}" != no; then
d342a0da
DE
9446 case "${with_guile}" in
9447 [\\/]* | ?:[\\/]*)
e76c5d17
DE
9448
9449 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
9450$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
9451if test "${ac_cv_guild_program_name+set}" = set; then :
9452 $as_echo_n "(cached) " >&6
9453else
d342a0da 9454 ac_cv_guild_program_name="`"${with_guile}" --variable guild "${guile_version}"`"
e76c5d17
DE
9455
9456 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
9457 # the 'guild' and 'bindir' variables. In that case, try to guess
9458 # what the program name is, at the risk of getting it wrong if
9459 # Guile was configured with '--program-suffix' or similar.
9460 if test "x$ac_cv_guild_program_name" = "x"; then
d342a0da 9461 guile_exec_prefix="`"${with_guile}" --variable exec_prefix "${guile_version}"`"
e76c5d17
DE
9462 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
9463 fi
9464
9465fi
9466{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
9467$as_echo "$ac_cv_guild_program_name" >&6; }
9468
9469 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
9470 as_fn_error "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
9471 fi
9472
9473 GUILD="$ac_cv_guild_program_name"
9474
9475
d342a0da
DE
9476 ;;
9477 *)
9478
9479 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
9480$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
9481if test "${ac_cv_guild_program_name+set}" = set; then :
9482 $as_echo_n "(cached) " >&6
9483else
9484 ac_cv_guild_program_name="`"${pkg_config_prog_path}" --variable guild "${guile_version}"`"
9485
9486 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
9487 # the 'guild' and 'bindir' variables. In that case, try to guess
9488 # what the program name is, at the risk of getting it wrong if
9489 # Guile was configured with '--program-suffix' or similar.
9490 if test "x$ac_cv_guild_program_name" = "x"; then
9491 guile_exec_prefix="`"${pkg_config_prog_path}" --variable exec_prefix "${guile_version}"`"
9492 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
9493 fi
9494
9495fi
9496{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
9497$as_echo "$ac_cv_guild_program_name" >&6; }
9498
9499 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
9500 as_fn_error "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
9501 fi
9502
9503 GUILD="$ac_cv_guild_program_name"
9504
9505
9506 ;;
9507 esac
e76c5d17
DE
9508
9509
9510 if test "$cross_compiling" = no; then
9511 GUILD_TARGET_FLAG=
9512 else
9513 GUILD_TARGET_FLAG="--target=$host"
9514 fi
9515
9516
9517
9518
9519 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether guild supports this host" >&5
9520$as_echo_n "checking whether guild supports this host... " >&6; }
9521if test "${ac_cv_guild_ok+set}" = set; then :
9522 $as_echo_n "(cached) " >&6
9523else
9524 echo "$ac_cv_guild_program_name compile $GUILD_TARGET_FLAG -o conftest.go $srcdir/guile/lib/gdb/support.scm" >&5
9525 if "$ac_cv_guild_program_name" compile $GUILD_TARGET_FLAG -o conftest.go "$srcdir/guile/lib/gdb/support.scm" >&5 2>&5; then
9526 ac_cv_guild_ok=yes
9527 else
9528 ac_cv_guild_ok=no
9529 fi
9530fi
9531{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_ok" >&5
9532$as_echo "$ac_cv_guild_ok" >&6; }
9533
9534 if test "$ac_cv_guild_ok" = no; then
9535 have_libguile=no
9536 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling guile support" >&5
9537$as_echo "$as_me: WARNING: disabling guile support" >&2;}
9538 fi
9539fi
9540
ed3ef339
DE
9541if test "${have_libguile}" != no; then
9542
9543$as_echo "#define HAVE_GUILE 1" >>confdefs.h
9544
9545 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_GUILE_OBS)"
9546 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_GUILE_DEPS)"
9547 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_GUILE_SRCS)"
9548 CONFIG_INSTALL="$CONFIG_INSTALL install-guile"
9549 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_GUILE_CFLAGS)"
16954d5d
LC
9550
9551 save_LIBS="$LIBS"
9552 save_CPPFLAGS="$CPPFLAGS"
9553 LIBS="$GUILE_LIBS"
9554 CPPFLAGS="$GUILE_CPPFLAGS"
9555 for ac_func in scm_new_smob
9556do :
9557 ac_fn_c_check_func "$LINENO" "scm_new_smob" "ac_cv_func_scm_new_smob"
9558if test "x$ac_cv_func_scm_new_smob" = x""yes; then :
9559 cat >>confdefs.h <<_ACEOF
9560#define HAVE_SCM_NEW_SMOB 1
9561_ACEOF
9562
9563fi
9564done
9565
9566 LIBS="$save_LIBS"
9567 CPPFLAGS="$save_CPPFLAGS"
ed3ef339
DE
9568else
9569 # Even if Guile support is not compiled in, we need to have these files
9570 # included.
9571 CONFIG_OBS="$CONFIG_OBS guile.o"
9572 CONFIG_SRCS="$CONFIG_SRCS guile/guile.c"
9573fi
9a156167 9574
ac534cba 9575
4df42755
DE
9576 if test "${have_libguile}" != no; then
9577 HAVE_GUILE_TRUE=
9578 HAVE_GUILE_FALSE='#'
9579else
9580 HAVE_GUILE_TRUE='#'
9581 HAVE_GUILE_FALSE=
9582fi
9583
ac534cba 9584
d344e670
DE
9585# --------------------- #
9586# Check for libmcheck. #
9587# --------------------- #
9588
a8db4212
YPK
9589# Enable -lmcheck by default (it provides cheap-enough memory mangling),
9590# but turn it off if Python is enabled with threads, since -lmcheck is
9591# not thread safe (http://sourceware.org/bugzilla/show_bug.cgi?id=9939),
9592# and for releases.
17ef446e
PA
9593if test \( "${have_libpython}" = "no" -o "${python_has_threads}" = "no" \) \
9594 && $development; then
9595 libmcheck_default=yes
9596else
9597 libmcheck_default=no
a8db4212
YPK
9598fi
9599
17ef446e
PA
9600 # Check whether --enable-libmcheck was given.
9601if test "${enable_libmcheck+set}" = set; then :
9602 enableval=$enable_libmcheck; case "${enableval}" in
9603 yes | y) ENABLE_LIBMCHECK="yes" ;;
9604 no | n) ENABLE_LIBMCHECK="no" ;;
9605 *) as_fn_error "bad value ${enableval} for --enable-libmcheck" "$LINENO" 5 ;;
9606 esac
9607fi
9608
9609
9610 if test -z "${ENABLE_LIBMCHECK}"; then
9611 ENABLE_LIBMCHECK=${libmcheck_default}
a8db4212 9612 fi
17ef446e
PA
9613
9614 if test "$ENABLE_LIBMCHECK" = "yes" ; then
9615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lmcheck" >&5
a8db4212
YPK
9616$as_echo_n "checking for main in -lmcheck... " >&6; }
9617if test "${ac_cv_lib_mcheck_main+set}" = set; then :
9618 $as_echo_n "(cached) " >&6
9619else
9620 ac_check_lib_save_LIBS=$LIBS
9621LIBS="-lmcheck $LIBS"
9622cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9623/* end confdefs.h. */
9624
9625
9626int
9627main ()
9628{
9629return main ();
9630 ;
9631 return 0;
9632}
9633_ACEOF
9634if ac_fn_c_try_link "$LINENO"; then :
9635 ac_cv_lib_mcheck_main=yes
9636else
9637 ac_cv_lib_mcheck_main=no
9638fi
9639rm -f core conftest.err conftest.$ac_objext \
9640 conftest$ac_exeext conftest.$ac_ext
9641LIBS=$ac_check_lib_save_LIBS
9642fi
9643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mcheck_main" >&5
9644$as_echo "$ac_cv_lib_mcheck_main" >&6; }
9645if test "x$ac_cv_lib_mcheck_main" = x""yes; then :
9646 cat >>confdefs.h <<_ACEOF
9647#define HAVE_LIBMCHECK 1
9648_ACEOF
9649
9650 LIBS="-lmcheck $LIBS"
9651
9652fi
9653
17ef446e
PA
9654 fi
9655
9656
9657if test "$ENABLE_LIBMCHECK" = "yes" \
9658 -a "${have_libpython}" != "no" \
9659 -a "${python_has_threads}" = "yes" ; then
9660 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&5
9661$as_echo "$as_me: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&2;}
a8db4212
YPK
9662fi
9663
81ecdfbb
RW
9664# ------------------------- #
9665# Checks for header files. #
9666# ------------------------- #
c890192f 9667
81ecdfbb
RW
9668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
9669$as_echo_n "checking for ANSI C header files... " >&6; }
9670if test "${ac_cv_header_stdc+set}" = set; then :
9671 $as_echo_n "(cached) " >&6
bec39cab 9672else
81ecdfbb 9673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9674/* end confdefs.h. */
81ecdfbb
RW
9675#include <stdlib.h>
9676#include <stdarg.h>
9677#include <string.h>
9678#include <float.h>
9679
a9322a30
TT
9680int
9681main ()
9682{
a9322a30
TT
9683
9684 ;
9685 return 0;
9686}
bec39cab 9687_ACEOF
81ecdfbb
RW
9688if ac_fn_c_try_compile "$LINENO"; then :
9689 ac_cv_header_stdc=yes
bec39cab 9690else
81ecdfbb 9691 ac_cv_header_stdc=no
a9322a30 9692fi
81ecdfbb 9693rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 9694
81ecdfbb
RW
9695if test $ac_cv_header_stdc = yes; then
9696 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
9697 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9698/* end confdefs.h. */
9699#include <string.h>
bec39cab 9700
81ecdfbb
RW
9701_ACEOF
9702if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9703 $EGREP "memchr" >/dev/null 2>&1; then :
bec39cab 9704
bec39cab 9705else
81ecdfbb
RW
9706 ac_cv_header_stdc=no
9707fi
9708rm -f conftest*
9709
9710fi
9711
9712if test $ac_cv_header_stdc = yes; then
9713 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
9714 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9715/* end confdefs.h. */
9716#include <stdlib.h>
9717
bec39cab 9718_ACEOF
81ecdfbb
RW
9719if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9720 $EGREP "free" >/dev/null 2>&1; then :
06825bd1 9721
81ecdfbb
RW
9722else
9723 ac_cv_header_stdc=no
9724fi
9725rm -f conftest*
bec39cab 9726
bec39cab 9727fi
81ecdfbb
RW
9728
9729if test $ac_cv_header_stdc = yes; then
9730 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
9731 if test "$cross_compiling" = yes; then :
9732 :
bec39cab 9733else
81ecdfbb 9734 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9735/* end confdefs.h. */
81ecdfbb
RW
9736#include <ctype.h>
9737#include <stdlib.h>
9738#if ((' ' & 0x0FF) == 0x020)
9739# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
9740# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
9741#else
9742# define ISLOWER(c) \
9743 (('a' <= (c) && (c) <= 'i') \
9744 || ('j' <= (c) && (c) <= 'r') \
9745 || ('s' <= (c) && (c) <= 'z'))
9746# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
9747#endif
9748
9749#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
a9322a30
TT
9750int
9751main ()
9752{
81ecdfbb
RW
9753 int i;
9754 for (i = 0; i < 256; i++)
9755 if (XOR (islower (i), ISLOWER (i))
9756 || toupper (i) != TOUPPER (i))
9757 return 2;
a9322a30
TT
9758 return 0;
9759}
bec39cab 9760_ACEOF
81ecdfbb
RW
9761if ac_fn_c_try_run "$LINENO"; then :
9762
bec39cab 9763else
81ecdfbb
RW
9764 ac_cv_header_stdc=no
9765fi
9766rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9767 conftest.$ac_objext conftest.beam conftest.$ac_ext
9768fi
bec39cab 9769
bec39cab 9770fi
a9322a30 9771fi
81ecdfbb
RW
9772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
9773$as_echo "$ac_cv_header_stdc" >&6; }
9774if test $ac_cv_header_stdc = yes; then
bec39cab 9775
81ecdfbb 9776$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5ee754fc 9777
81ecdfbb 9778fi
bec39cab 9779
81ecdfbb 9780# elf_hp.h is for HP/UX 64-bit shared library support.
9467110b 9781for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
161d1bec 9782 thread_db.h \
0080a2f6 9783 sys/fault.h \
81ecdfbb
RW
9784 sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
9785 sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
9786 sys/reg.h sys/debugreg.h sys/select.h sys/syscall.h \
9467110b 9787 termios.h termio.h \
3447c057 9788 sgtty.h elf_hp.h \
9467110b 9789 dlfcn.h
81ecdfbb
RW
9790do :
9791 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9792ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9793eval as_val=\$$as_ac_Header
9794 if test "x$as_val" = x""yes; then :
bec39cab 9795 cat >>confdefs.h <<_ACEOF
81ecdfbb 9796#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 9797_ACEOF
c906108c 9798
bec39cab 9799fi
81ecdfbb
RW
9800
9801done
9802
81ecdfbb
RW
9803for ac_header in sys/proc.h
9804do :
9805 ac_fn_c_check_header_compile "$LINENO" "sys/proc.h" "ac_cv_header_sys_proc_h" "#if HAVE_SYS_PARAM_H
9806# include <sys/param.h>
9807#endif
c906108c 9808
81ecdfbb
RW
9809"
9810if test "x$ac_cv_header_sys_proc_h" = x""yes; then :
bec39cab 9811 cat >>confdefs.h <<_ACEOF
81ecdfbb 9812#define HAVE_SYS_PROC_H 1
bec39cab 9813_ACEOF
5ee754fc 9814
bec39cab 9815fi
81ecdfbb
RW
9816
9817done
9818
9819for ac_header in sys/user.h
9820do :
9821 ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
9822# include <sys/param.h>
a9322a30
TT
9823#endif
9824
81ecdfbb
RW
9825"
9826if test "x$ac_cv_header_sys_user_h" = x""yes; then :
9827 cat >>confdefs.h <<_ACEOF
9828#define HAVE_SYS_USER_H 1
bec39cab 9829_ACEOF
bec39cab 9830
a9322a30 9831fi
bec39cab 9832
81ecdfbb 9833done
5ee754fc 9834
5ee754fc 9835
81ecdfbb
RW
9836# On Solaris 2.[789], we need to define _MSE_INT_H to avoid a clash
9837# between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
9838# think that we don't have <curses.h> if we're using GCC.
9839case $host_os in
9840 solaris2.[789])
9841 if test "$GCC" = yes; then
9842
9843$as_echo "#define _MSE_INT_H 1" >>confdefs.h
9844
9845 fi ;;
9846esac
9847for ac_header in curses.h cursesX.h ncurses.h ncurses/ncurses.h ncurses/term.h
9848do :
9849 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9850ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9851eval as_val=\$$as_ac_Header
9852 if test "x$as_val" = x""yes; then :
bec39cab 9853 cat >>confdefs.h <<_ACEOF
81ecdfbb 9854#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 9855_ACEOF
5ee754fc
MK
9856
9857fi
9858
81ecdfbb 9859done
bec39cab 9860
81ecdfbb
RW
9861for ac_header in term.h
9862do :
9863 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
9864# include <curses.h>
9865#endif
bec39cab 9866
81ecdfbb
RW
9867"
9868if test "x$ac_cv_header_term_h" = x""yes; then :
9869 cat >>confdefs.h <<_ACEOF
9870#define HAVE_TERM_H 1
a8111142 9871_ACEOF
a8111142 9872
a8111142 9873fi
a8111142 9874
81ecdfbb 9875done
a8111142
TT
9876
9877
81ecdfbb
RW
9878# ------------------------- #
9879# Checks for declarations. #
9880# ------------------------- #
a9322a30 9881
07697489
PA
9882
9883 # Check for presence and size of long long.
9884 ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
9885if test "x$ac_cv_type_long_long" = x""yes; then :
9886
9887cat >>confdefs.h <<_ACEOF
9888#define HAVE_LONG_LONG 1
9889_ACEOF
9890
9891# The cast to long int works around a bug in the HP C Compiler
9892# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9893# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9894# This bug is HP SR number 8606223364.
9895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
9896$as_echo_n "checking size of long long... " >&6; }
9897if test "${ac_cv_sizeof_long_long+set}" = set; then :
9898 $as_echo_n "(cached) " >&6
9899else
9900 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
9901
9902else
9903 if test "$ac_cv_type_long_long" = yes; then
9904 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9905$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9906{ as_fn_set_status 77
9907as_fn_error "cannot compute sizeof (long long)
9908See \`config.log' for more details." "$LINENO" 5; }; }
9909 else
9910 ac_cv_sizeof_long_long=0
9911 fi
9912fi
9913
9914fi
9915{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
9916$as_echo "$ac_cv_sizeof_long_long" >&6; }
9917
9918
9919
9920cat >>confdefs.h <<_ACEOF
9921#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
9922_ACEOF
9923
9924
9925fi
9926
9927
9928 ac_fn_c_check_decl "$LINENO" "basename(char *)" "ac_cv_have_decl_basename_char_p_" "$ac_includes_default"
9929if test "x$ac_cv_have_decl_basename_char_p_" = x""yes; then :
9930 ac_have_decl=1
9931else
9932 ac_have_decl=0
9933fi
9934
9935cat >>confdefs.h <<_ACEOF
9936#define HAVE_DECL_BASENAME $ac_have_decl
9937_ACEOF
9938ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default"
9939if test "x$ac_cv_have_decl_ffs" = x""yes; then :
9940 ac_have_decl=1
9941else
9942 ac_have_decl=0
9943fi
9944
9945cat >>confdefs.h <<_ACEOF
9946#define HAVE_DECL_FFS $ac_have_decl
9947_ACEOF
9948ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default"
9949if test "x$ac_cv_have_decl_asprintf" = x""yes; then :
9950 ac_have_decl=1
9951else
9952 ac_have_decl=0
9953fi
9954
9955cat >>confdefs.h <<_ACEOF
9956#define HAVE_DECL_ASPRINTF $ac_have_decl
9957_ACEOF
9958ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
9959if test "x$ac_cv_have_decl_vasprintf" = x""yes; then :
9960 ac_have_decl=1
9961else
9962 ac_have_decl=0
9963fi
9964
9965cat >>confdefs.h <<_ACEOF
9966#define HAVE_DECL_VASPRINTF $ac_have_decl
9967_ACEOF
9968ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
9969if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
9970 ac_have_decl=1
9971else
9972 ac_have_decl=0
9973fi
9974
9975cat >>confdefs.h <<_ACEOF
9976#define HAVE_DECL_SNPRINTF $ac_have_decl
9977_ACEOF
9978ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
9979if test "x$ac_cv_have_decl_vsnprintf" = x""yes; then :
9980 ac_have_decl=1
9981else
9982 ac_have_decl=0
9983fi
9984
9985cat >>confdefs.h <<_ACEOF
9986#define HAVE_DECL_VSNPRINTF $ac_have_decl
9987_ACEOF
9988
9989 ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default"
9990if test "x$ac_cv_have_decl_strtol" = x""yes; then :
9991 ac_have_decl=1
9992else
9993 ac_have_decl=0
9994fi
9995
9996cat >>confdefs.h <<_ACEOF
9997#define HAVE_DECL_STRTOL $ac_have_decl
9998_ACEOF
9999ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default"
10000if test "x$ac_cv_have_decl_strtoul" = x""yes; then :
10001 ac_have_decl=1
10002else
10003 ac_have_decl=0
10004fi
10005
10006cat >>confdefs.h <<_ACEOF
10007#define HAVE_DECL_STRTOUL $ac_have_decl
10008_ACEOF
10009ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
10010if test "x$ac_cv_have_decl_strtoll" = x""yes; then :
10011 ac_have_decl=1
10012else
10013 ac_have_decl=0
10014fi
10015
10016cat >>confdefs.h <<_ACEOF
10017#define HAVE_DECL_STRTOLL $ac_have_decl
10018_ACEOF
10019ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
10020if test "x$ac_cv_have_decl_strtoull" = x""yes; then :
10021 ac_have_decl=1
10022else
10023 ac_have_decl=0
10024fi
10025
10026cat >>confdefs.h <<_ACEOF
10027#define HAVE_DECL_STRTOULL $ac_have_decl
10028_ACEOF
10029
10030 ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default"
10031if test "x$ac_cv_have_decl_strverscmp" = x""yes; then :
10032 ac_have_decl=1
10033else
10034 ac_have_decl=0
10035fi
10036
10037cat >>confdefs.h <<_ACEOF
10038#define HAVE_DECL_STRVERSCMP $ac_have_decl
10039_ACEOF
10040
10041
10042
81ecdfbb
RW
10043ac_fn_c_check_decl "$LINENO" "free" "ac_cv_have_decl_free" "$ac_includes_default"
10044if test "x$ac_cv_have_decl_free" = x""yes; then :
10045 ac_have_decl=1
bec39cab 10046else
81ecdfbb
RW
10047 ac_have_decl=0
10048fi
10049
10050cat >>confdefs.h <<_ACEOF
10051#define HAVE_DECL_FREE $ac_have_decl
bec39cab 10052_ACEOF
81ecdfbb
RW
10053ac_fn_c_check_decl "$LINENO" "malloc" "ac_cv_have_decl_malloc" "$ac_includes_default"
10054if test "x$ac_cv_have_decl_malloc" = x""yes; then :
10055 ac_have_decl=1
10056else
10057 ac_have_decl=0
10058fi
10059
10060cat >>confdefs.h <<_ACEOF
10061#define HAVE_DECL_MALLOC $ac_have_decl
bec39cab 10062_ACEOF
81ecdfbb
RW
10063ac_fn_c_check_decl "$LINENO" "realloc" "ac_cv_have_decl_realloc" "$ac_includes_default"
10064if test "x$ac_cv_have_decl_realloc" = x""yes; then :
10065 ac_have_decl=1
bec39cab 10066else
81ecdfbb
RW
10067 ac_have_decl=0
10068fi
bec39cab 10069
81ecdfbb
RW
10070cat >>confdefs.h <<_ACEOF
10071#define HAVE_DECL_REALLOC $ac_have_decl
bec39cab 10072_ACEOF
81ecdfbb
RW
10073ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
10074if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
10075 ac_have_decl=1
10076else
10077 ac_have_decl=0
5ee754fc 10078fi
81ecdfbb
RW
10079
10080cat >>confdefs.h <<_ACEOF
10081#define HAVE_DECL_SNPRINTF $ac_have_decl
a9322a30 10082_ACEOF
5ee754fc 10083
5ee754fc 10084
81ecdfbb
RW
10085 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
10086$as_echo_n "checking for LC_MESSAGES... " >&6; }
10087if test "${am_cv_val_LC_MESSAGES+set}" = set; then :
10088 $as_echo_n "(cached) " >&6
bec39cab 10089else
81ecdfbb 10090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10091/* end confdefs.h. */
81ecdfbb 10092#include <locale.h>
a9322a30
TT
10093int
10094main ()
10095{
81ecdfbb 10096return LC_MESSAGES
a9322a30
TT
10097 ;
10098 return 0;
10099}
bec39cab 10100_ACEOF
81ecdfbb
RW
10101if ac_fn_c_try_link "$LINENO"; then :
10102 am_cv_val_LC_MESSAGES=yes
bec39cab 10103else
81ecdfbb
RW
10104 am_cv_val_LC_MESSAGES=no
10105fi
10106rm -f core conftest.err conftest.$ac_objext \
10107 conftest$ac_exeext conftest.$ac_ext
10108fi
10109{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
10110$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
10111 if test $am_cv_val_LC_MESSAGES = yes; then
bec39cab 10112
81ecdfbb
RW
10113$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
10114
10115 fi
10116
10117
10118# ----------------------- #
10119# Checks for structures. #
10120# ----------------------- #
10121
10122ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
10123if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
10124
10125cat >>confdefs.h <<_ACEOF
10126#define HAVE_STRUCT_STAT_ST_BLOCKS 1
7eb368b3 10127_ACEOF
7eb368b3 10128
81ecdfbb 10129
7eb368b3 10130fi
81ecdfbb
RW
10131ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
10132if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
7eb368b3 10133
a9322a30
TT
10134cat >>confdefs.h <<_ACEOF
10135#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
7eb368b3
NR
10136_ACEOF
10137
a9322a30 10138
7eb368b3
NR
10139fi
10140
7eb368b3 10141
a9322a30
TT
10142# ------------------ #
10143# Checks for types. #
10144# ------------------ #
7eb368b3 10145
81ecdfbb
RW
10146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
10147$as_echo_n "checking return type of signal handlers... " >&6; }
10148if test "${ac_cv_type_signal+set}" = set; then :
10149 $as_echo_n "(cached) " >&6
bec39cab 10150else
81ecdfbb 10151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10152/* end confdefs.h. */
a9322a30
TT
10153#include <sys/types.h>
10154#include <signal.h>
7cb9022a 10155
a9322a30
TT
10156int
10157main ()
10158{
81ecdfbb 10159return *(signal (0, 0)) (0) == 1;
a9322a30
TT
10160 ;
10161 return 0;
10162}
bec39cab 10163_ACEOF
81ecdfbb
RW
10164if ac_fn_c_try_compile "$LINENO"; then :
10165 ac_cv_type_signal=int
bec39cab 10166else
81ecdfbb 10167 ac_cv_type_signal=void
bec39cab 10168fi
81ecdfbb 10169rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 10170fi
81ecdfbb
RW
10171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
10172$as_echo "$ac_cv_type_signal" >&6; }
bec39cab 10173
a9322a30
TT
10174cat >>confdefs.h <<_ACEOF
10175#define RETSIGTYPE $ac_cv_type_signal
10176_ACEOF
5ee754fc 10177
bec39cab 10178
81ecdfbb 10179ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
a9322a30
TT
10180#include <sys/socket.h>
10181
81ecdfbb
RW
10182"
10183if test "x$ac_cv_type_socklen_t" = x""yes; then :
bec39cab 10184
a9322a30
TT
10185cat >>confdefs.h <<_ACEOF
10186#define HAVE_SOCKLEN_T 1
10187_ACEOF
10188
10189
10190fi
10191
10192
10193# ------------------------------------- #
10194# Checks for compiler characteristics. #
10195# ------------------------------------- #
10196
81ecdfbb
RW
10197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
10198$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
10199if test "${ac_cv_c_const+set}" = set; then :
10200 $as_echo_n "(cached) " >&6
a9322a30 10201else
81ecdfbb 10202 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10203/* end confdefs.h. */
a9322a30
TT
10204
10205int
10206main ()
10207{
10208/* FIXME: Include the comments suggested by Paul. */
10209#ifndef __cplusplus
10210 /* Ultrix mips cc rejects this. */
10211 typedef int charset[2];
81ecdfbb 10212 const charset cs;
a9322a30 10213 /* SunOS 4.1.1 cc rejects this. */
81ecdfbb
RW
10214 char const *const *pcpcc;
10215 char **ppc;
a9322a30
TT
10216 /* NEC SVR4.0.2 mips cc rejects this. */
10217 struct point {int x, y;};
10218 static struct point const zero = {0,0};
10219 /* AIX XL C 1.02.0.0 rejects this.
10220 It does not let you subtract one const X* pointer from another in
10221 an arm of an if-expression whose if-part is not a constant
10222 expression */
10223 const char *g = "string";
81ecdfbb 10224 pcpcc = &g + (g ? g-g : 0);
a9322a30 10225 /* HPUX 7.0 cc rejects these. */
81ecdfbb
RW
10226 ++pcpcc;
10227 ppc = (char**) pcpcc;
10228 pcpcc = (char const *const *) ppc;
a9322a30
TT
10229 { /* SCO 3.2v4 cc rejects this. */
10230 char *t;
10231 char const *s = 0 ? (char *) 0 : (char const *) 0;
10232
10233 *t++ = 0;
81ecdfbb 10234 if (s) return 0;
a9322a30
TT
10235 }
10236 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
10237 int x[] = {25, 17};
10238 const int *foo = &x[0];
10239 ++foo;
10240 }
10241 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
10242 typedef const int *iptr;
10243 iptr p = 0;
10244 ++p;
10245 }
10246 { /* AIX XL C 1.02.0.0 rejects this saying
10247 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
10248 struct s { int j; const int *ap[3]; };
10249 struct s *b; b->j = 5;
10250 }
10251 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
10252 const int foo = 10;
81ecdfbb 10253 if (!foo) return 0;
a9322a30 10254 }
81ecdfbb 10255 return !cs[0] && !zero.x;
a9322a30
TT
10256#endif
10257
10258 ;
10259 return 0;
10260}
bec39cab 10261_ACEOF
81ecdfbb 10262if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 10263 ac_cv_c_const=yes
5ee754fc 10264else
81ecdfbb 10265 ac_cv_c_const=no
5ee754fc 10266fi
81ecdfbb 10267rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 10268fi
81ecdfbb
RW
10269{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
10270$as_echo "$ac_cv_c_const" >&6; }
a9322a30 10271if test $ac_cv_c_const = no; then
bec39cab 10272
81ecdfbb 10273$as_echo "#define const /**/" >>confdefs.h
bec39cab 10274
5ee754fc 10275fi
bec39cab 10276
81ecdfbb
RW
10277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
10278$as_echo_n "checking for inline... " >&6; }
10279if test "${ac_cv_c_inline+set}" = set; then :
10280 $as_echo_n "(cached) " >&6
bec39cab 10281else
a9322a30
TT
10282 ac_cv_c_inline=no
10283for ac_kw in inline __inline__ __inline; do
81ecdfbb 10284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10285/* end confdefs.h. */
a9322a30
TT
10286#ifndef __cplusplus
10287typedef int foo_t;
10288static $ac_kw foo_t static_foo () {return 0; }
10289$ac_kw foo_t foo () {return 0; }
10290#endif
10291
bec39cab 10292_ACEOF
81ecdfbb
RW
10293if ac_fn_c_try_compile "$LINENO"; then :
10294 ac_cv_c_inline=$ac_kw
bec39cab 10295fi
81ecdfbb
RW
10296rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10297 test "$ac_cv_c_inline" != no && break
a9322a30 10298done
bec39cab 10299
5ee754fc 10300fi
81ecdfbb
RW
10301{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
10302$as_echo "$ac_cv_c_inline" >&6; }
5ee754fc 10303
a9322a30
TT
10304case $ac_cv_c_inline in
10305 inline | yes) ;;
10306 *)
10307 case $ac_cv_c_inline in
10308 no) ac_val=;;
10309 *) ac_val=$ac_cv_c_inline;;
10310 esac
10311 cat >>confdefs.h <<_ACEOF
10312#ifndef __cplusplus
10313#define inline $ac_val
10314#endif
10315_ACEOF
bec39cab
AC
10316 ;;
10317esac
bec39cab 10318
81ecdfbb
RW
10319 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
10320$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
10321if test "${ac_cv_c_bigendian+set}" = set; then :
10322 $as_echo_n "(cached) " >&6
bec39cab 10323else
81ecdfbb
RW
10324 ac_cv_c_bigendian=unknown
10325 # See if we're dealing with a universal compiler.
10326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10327/* end confdefs.h. */
10328#ifndef __APPLE_CC__
10329 not a universal capable compiler
10330 #endif
10331 typedef int dummy;
10332
10333_ACEOF
10334if ac_fn_c_try_compile "$LINENO"; then :
10335
10336 # Check for potential -arch flags. It is not universal unless
10337 # there are at least two -arch flags with different values.
10338 ac_arch=
10339 ac_prev=
10340 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
10341 if test -n "$ac_prev"; then
10342 case $ac_word in
10343 i?86 | x86_64 | ppc | ppc64)
10344 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
10345 ac_arch=$ac_word
10346 else
10347 ac_cv_c_bigendian=universal
10348 break
10349 fi
10350 ;;
10351 esac
10352 ac_prev=
10353 elif test "x$ac_word" = "x-arch"; then
10354 ac_prev=arch
10355 fi
10356 done
10357fi
10358rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10359 if test $ac_cv_c_bigendian = unknown; then
10360 # See if sys/param.h defines the BYTE_ORDER macro.
10361 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10362/* end confdefs.h. */
a9322a30 10363#include <sys/types.h>
81ecdfbb 10364 #include <sys/param.h>
a9322a30
TT
10365
10366int
10367main ()
10368{
81ecdfbb
RW
10369#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
10370 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
10371 && LITTLE_ENDIAN)
10372 bogus endian macros
10373 #endif
a9322a30
TT
10374
10375 ;
10376 return 0;
10377}
bec39cab 10378_ACEOF
81ecdfbb 10379if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 10380 # It does; now see whether it defined to BIG_ENDIAN or not.
81ecdfbb 10381 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10382/* end confdefs.h. */
a9322a30 10383#include <sys/types.h>
81ecdfbb 10384 #include <sys/param.h>
a9322a30
TT
10385
10386int
10387main ()
10388{
10389#if BYTE_ORDER != BIG_ENDIAN
81ecdfbb
RW
10390 not big endian
10391 #endif
a9322a30
TT
10392
10393 ;
10394 return 0;
10395}
bec39cab 10396_ACEOF
81ecdfbb 10397if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 10398 ac_cv_c_bigendian=yes
5ee754fc 10399else
81ecdfbb 10400 ac_cv_c_bigendian=no
5ee754fc 10401fi
81ecdfbb
RW
10402rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10403fi
10404rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10405 fi
10406 if test $ac_cv_c_bigendian = unknown; then
10407 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
10408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10409/* end confdefs.h. */
10410#include <limits.h>
bec39cab 10411
81ecdfbb
RW
10412int
10413main ()
10414{
10415#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
10416 bogus endian macros
10417 #endif
10418
10419 ;
10420 return 0;
10421}
7eb368b3 10422_ACEOF
81ecdfbb
RW
10423if ac_fn_c_try_compile "$LINENO"; then :
10424 # It does; now see whether it defined to _BIG_ENDIAN or not.
10425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7eb368b3 10426/* end confdefs.h. */
81ecdfbb
RW
10427#include <limits.h>
10428
7eb368b3
NR
10429int
10430main ()
10431{
81ecdfbb
RW
10432#ifndef _BIG_ENDIAN
10433 not big endian
10434 #endif
10435
7eb368b3
NR
10436 ;
10437 return 0;
10438}
10439_ACEOF
81ecdfbb 10440if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 10441 ac_cv_c_bigendian=yes
81ecdfbb
RW
10442else
10443 ac_cv_c_bigendian=no
a9322a30 10444fi
81ecdfbb 10445rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30 10446fi
81ecdfbb
RW
10447rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10448 fi
10449 if test $ac_cv_c_bigendian = unknown; then
10450 # Compile a test program.
10451 if test "$cross_compiling" = yes; then :
10452 # Try to guess by grepping values from an object file.
10453 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10454/* end confdefs.h. */
10455short int ascii_mm[] =
10456 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
10457 short int ascii_ii[] =
10458 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
10459 int use_ascii (int i) {
10460 return ascii_mm[i] + ascii_ii[i];
10461 }
10462 short int ebcdic_ii[] =
10463 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
10464 short int ebcdic_mm[] =
10465 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
10466 int use_ebcdic (int i) {
10467 return ebcdic_mm[i] + ebcdic_ii[i];
10468 }
10469 extern int foo;
7eb368b3 10470
81ecdfbb
RW
10471int
10472main ()
10473{
10474return use_ascii (foo) == use_ebcdic (foo);
10475 ;
10476 return 0;
10477}
10478_ACEOF
10479if ac_fn_c_try_compile "$LINENO"; then :
10480 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
10481 ac_cv_c_bigendian=yes
10482 fi
10483 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
10484 if test "$ac_cv_c_bigendian" = unknown; then
10485 ac_cv_c_bigendian=no
10486 else
10487 # finding both strings is unlikely to happen, but who knows?
10488 ac_cv_c_bigendian=unknown
10489 fi
10490 fi
7eb368b3 10491fi
81ecdfbb 10492rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 10493else
81ecdfbb 10494 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10495/* end confdefs.h. */
81ecdfbb 10496$ac_includes_default
d3ea6809
MM
10497int
10498main ()
10499{
81ecdfbb
RW
10500
10501 /* Are we little or big endian? From Harbison&Steele. */
10502 union
10503 {
10504 long int l;
10505 char c[sizeof (long int)];
10506 } u;
10507 u.l = 1;
10508 return u.c[sizeof (long int) - 1] == 1;
10509
10510 ;
10511 return 0;
d3ea6809
MM
10512}
10513_ACEOF
81ecdfbb 10514if ac_fn_c_try_run "$LINENO"; then :
a9322a30 10515 ac_cv_c_bigendian=no
d3ea6809 10516else
81ecdfbb 10517 ac_cv_c_bigendian=yes
d3ea6809 10518fi
81ecdfbb
RW
10519rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10520 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 10521fi
a9322a30 10522
81ecdfbb
RW
10523 fi
10524fi
10525{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
10526$as_echo "$ac_cv_c_bigendian" >&6; }
10527 case $ac_cv_c_bigendian in #(
10528 yes)
10529 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
10530;; #(
10531 no)
10532 ;; #(
10533 universal)
10534
10535$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
10536
10537 ;; #(
10538 *)
10539 as_fn_error "unknown endianness
10540 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
10541 esac
d3ea6809
MM
10542
10543
a9322a30
TT
10544# ------------------------------ #
10545# Checks for library functions. #
10546# ------------------------------ #
d3ea6809 10547
a9322a30 10548for ac_header in stdlib.h unistd.h
81ecdfbb
RW
10549do :
10550 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10551ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
10552eval as_val=\$$as_ac_Header
10553 if test "x$as_val" = x""yes; then :
bec39cab 10554 cat >>confdefs.h <<_ACEOF
81ecdfbb 10555#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 10556_ACEOF
b757528f 10557
b757528f 10558fi
bec39cab 10559
a9322a30 10560done
a3828db0 10561
a9322a30 10562for ac_func in getpagesize
81ecdfbb
RW
10563do :
10564 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
10565if test "x$ac_cv_func_getpagesize" = x""yes; then :
bec39cab 10566 cat >>confdefs.h <<_ACEOF
81ecdfbb 10567#define HAVE_GETPAGESIZE 1
bec39cab 10568_ACEOF
bcb3dc3d 10569
bcb3dc3d
MK
10570fi
10571done
10572
81ecdfbb
RW
10573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
10574$as_echo_n "checking for working mmap... " >&6; }
10575if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then :
10576 $as_echo_n "(cached) " >&6
a9322a30 10577else
81ecdfbb 10578 if test "$cross_compiling" = yes; then :
a9322a30 10579 ac_cv_func_mmap_fixed_mapped=no
bec39cab 10580else
81ecdfbb 10581 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10582/* end confdefs.h. */
a9322a30
TT
10583$ac_includes_default
10584/* malloc might have been renamed as rpl_malloc. */
10585#undef malloc
bec39cab 10586
a9322a30
TT
10587/* Thanks to Mike Haertel and Jim Avera for this test.
10588 Here is a matrix of mmap possibilities:
10589 mmap private not fixed
10590 mmap private fixed at somewhere currently unmapped
10591 mmap private fixed at somewhere already mapped
10592 mmap shared not fixed
10593 mmap shared fixed at somewhere currently unmapped
10594 mmap shared fixed at somewhere already mapped
10595 For private mappings, we should verify that changes cannot be read()
10596 back from the file, nor mmap's back from the file at a different
10597 address. (There have been systems where private was not correctly
10598 implemented like the infamous i386 svr4.0, and systems where the
10599 VM page cache was not coherent with the file system buffer cache
10600 like early versions of FreeBSD and possibly contemporary NetBSD.)
10601 For shared mappings, we should conversely verify that changes get
10602 propagated back to all the places they're supposed to be.
bec39cab 10603
a9322a30
TT
10604 Grep wants private fixed already mapped.
10605 The main things grep needs to know about mmap are:
10606 * does it exist and is it safe to write into the mmap'd area
10607 * how to use it (BSD variants) */
8b9cf735 10608
a9322a30
TT
10609#include <fcntl.h>
10610#include <sys/mman.h>
8b9cf735 10611
81ecdfbb 10612#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
a9322a30 10613char *malloc ();
a3828db0
MK
10614#endif
10615
a9322a30 10616/* This mess was copied from the GNU getpagesize.h. */
81ecdfbb 10617#ifndef HAVE_GETPAGESIZE
a9322a30 10618/* Assume that all systems that can run configure have sys/param.h. */
81ecdfbb 10619# ifndef HAVE_SYS_PARAM_H
a9322a30
TT
10620# define HAVE_SYS_PARAM_H 1
10621# endif
10622
10623# ifdef _SC_PAGESIZE
10624# define getpagesize() sysconf(_SC_PAGESIZE)
10625# else /* no _SC_PAGESIZE */
81ecdfbb 10626# ifdef HAVE_SYS_PARAM_H
a9322a30
TT
10627# include <sys/param.h>
10628# ifdef EXEC_PAGESIZE
10629# define getpagesize() EXEC_PAGESIZE
10630# else /* no EXEC_PAGESIZE */
10631# ifdef NBPG
10632# define getpagesize() NBPG * CLSIZE
10633# ifndef CLSIZE
10634# define CLSIZE 1
10635# endif /* no CLSIZE */
10636# else /* no NBPG */
10637# ifdef NBPC
10638# define getpagesize() NBPC
10639# else /* no NBPC */
10640# ifdef PAGESIZE
10641# define getpagesize() PAGESIZE
10642# endif /* PAGESIZE */
10643# endif /* no NBPC */
10644# endif /* no NBPG */
10645# endif /* no EXEC_PAGESIZE */
10646# else /* no HAVE_SYS_PARAM_H */
10647# define getpagesize() 8192 /* punt totally */
10648# endif /* no HAVE_SYS_PARAM_H */
10649# endif /* no _SC_PAGESIZE */
10650
10651#endif /* no HAVE_GETPAGESIZE */
10652
bec39cab
AC
10653int
10654main ()
10655{
a9322a30
TT
10656 char *data, *data2, *data3;
10657 int i, pagesize;
10658 int fd;
10659
10660 pagesize = getpagesize ();
10661
10662 /* First, make a file with some known garbage in it. */
10663 data = (char *) malloc (pagesize);
10664 if (!data)
81ecdfbb 10665 return 1;
a9322a30
TT
10666 for (i = 0; i < pagesize; ++i)
10667 *(data + i) = rand ();
10668 umask (0);
10669 fd = creat ("conftest.mmap", 0600);
10670 if (fd < 0)
81ecdfbb 10671 return 1;
a9322a30 10672 if (write (fd, data, pagesize) != pagesize)
81ecdfbb 10673 return 1;
a9322a30
TT
10674 close (fd);
10675
10676 /* Next, try to mmap the file at a fixed address which already has
10677 something else allocated at it. If we can, also make sure that
10678 we see the same garbage. */
10679 fd = open ("conftest.mmap", O_RDWR);
10680 if (fd < 0)
81ecdfbb 10681 return 1;
a9322a30
TT
10682 data2 = (char *) malloc (2 * pagesize);
10683 if (!data2)
81ecdfbb
RW
10684 return 1;
10685 data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
a9322a30
TT
10686 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
10687 MAP_PRIVATE | MAP_FIXED, fd, 0L))
81ecdfbb 10688 return 1;
a9322a30
TT
10689 for (i = 0; i < pagesize; ++i)
10690 if (*(data + i) != *(data2 + i))
81ecdfbb 10691 return 1;
a9322a30
TT
10692
10693 /* Finally, make sure that changes to the mapped area do not
10694 percolate back to the file as seen by read(). (This is a bug on
10695 some variants of i386 svr4.0.) */
10696 for (i = 0; i < pagesize; ++i)
10697 *(data2 + i) = *(data2 + i) + 1;
10698 data3 = (char *) malloc (pagesize);
10699 if (!data3)
81ecdfbb 10700 return 1;
a9322a30 10701 if (read (fd, data3, pagesize) != pagesize)
81ecdfbb 10702 return 1;
a9322a30
TT
10703 for (i = 0; i < pagesize; ++i)
10704 if (*(data + i) != *(data3 + i))
81ecdfbb 10705 return 1;
a9322a30 10706 close (fd);
81ecdfbb 10707 return 0;
bec39cab
AC
10708}
10709_ACEOF
81ecdfbb 10710if ac_fn_c_try_run "$LINENO"; then :
a9322a30 10711 ac_cv_func_mmap_fixed_mapped=yes
086ec9eb 10712else
81ecdfbb 10713 ac_cv_func_mmap_fixed_mapped=no
a3828db0 10714fi
81ecdfbb
RW
10715rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10716 conftest.$ac_objext conftest.beam conftest.$ac_ext
a3828db0 10717fi
81ecdfbb 10718
a9322a30 10719fi
81ecdfbb
RW
10720{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
10721$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
a9322a30
TT
10722if test $ac_cv_func_mmap_fixed_mapped = yes; then
10723
81ecdfbb 10724$as_echo "#define HAVE_MMAP 1" >>confdefs.h
a3828db0 10725
086ec9eb 10726fi
a9322a30 10727rm -f conftest.mmap
a3828db0 10728
81ecdfbb
RW
10729ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
10730if test "x$ac_cv_type_pid_t" = x""yes; then :
bec39cab 10731
a9322a30
TT
10732else
10733
10734cat >>confdefs.h <<_ACEOF
10735#define pid_t int
bec39cab 10736_ACEOF
086ec9eb
MK
10737
10738fi
10739
81ecdfbb
RW
10740for ac_header in vfork.h
10741do :
10742 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
10743if test "x$ac_cv_header_vfork_h" = x""yes; then :
a3828db0 10744 cat >>confdefs.h <<_ACEOF
81ecdfbb 10745#define HAVE_VFORK_H 1
bec39cab 10746_ACEOF
c906108c
SS
10747
10748fi
a9322a30 10749
a3828db0 10750done
c906108c 10751
a9322a30 10752for ac_func in fork vfork
81ecdfbb
RW
10753do :
10754 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10755ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10756eval as_val=\$$as_ac_var
10757 if test "x$as_val" = x""yes; then :
a3828db0 10758 cat >>confdefs.h <<_ACEOF
81ecdfbb 10759#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 10760_ACEOF
b83266a0 10761
97bf5e38 10762fi
a3828db0 10763done
b83266a0 10764
a9322a30 10765if test "x$ac_cv_func_fork" = xyes; then
81ecdfbb
RW
10766 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
10767$as_echo_n "checking for working fork... " >&6; }
10768if test "${ac_cv_func_fork_works+set}" = set; then :
10769 $as_echo_n "(cached) " >&6
a9322a30 10770else
81ecdfbb 10771 if test "$cross_compiling" = yes; then :
a9322a30
TT
10772 ac_cv_func_fork_works=cross
10773else
81ecdfbb
RW
10774 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10775/* end confdefs.h. */
10776$ac_includes_default
10777int
10778main ()
10779{
10780
10781 /* By Ruediger Kuhlmann. */
10782 return fork () < 0;
10783
10784 ;
10785 return 0;
10786}
a9322a30 10787_ACEOF
81ecdfbb 10788if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
10789 ac_cv_func_fork_works=yes
10790else
81ecdfbb 10791 ac_cv_func_fork_works=no
a9322a30 10792fi
81ecdfbb
RW
10793rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10794 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 10795fi
81ecdfbb 10796
a9322a30 10797fi
81ecdfbb
RW
10798{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
10799$as_echo "$ac_cv_func_fork_works" >&6; }
a9322a30
TT
10800
10801else
10802 ac_cv_func_fork_works=$ac_cv_func_fork
10803fi
10804if test "x$ac_cv_func_fork_works" = xcross; then
10805 case $host in
10806 *-*-amigaos* | *-*-msdosdjgpp*)
10807 # Override, as these systems have only a dummy fork() stub
10808 ac_cv_func_fork_works=no
10809 ;;
10810 *)
10811 ac_cv_func_fork_works=yes
10812 ;;
10813 esac
81ecdfbb
RW
10814 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
10815$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
a9322a30
TT
10816fi
10817ac_cv_func_vfork_works=$ac_cv_func_vfork
10818if test "x$ac_cv_func_vfork" = xyes; then
81ecdfbb
RW
10819 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
10820$as_echo_n "checking for working vfork... " >&6; }
10821if test "${ac_cv_func_vfork_works+set}" = set; then :
10822 $as_echo_n "(cached) " >&6
a9322a30 10823else
81ecdfbb 10824 if test "$cross_compiling" = yes; then :
a9322a30
TT
10825 ac_cv_func_vfork_works=cross
10826else
81ecdfbb 10827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30
TT
10828/* end confdefs.h. */
10829/* Thanks to Paul Eggert for this test. */
81ecdfbb 10830$ac_includes_default
a9322a30 10831#include <sys/wait.h>
81ecdfbb 10832#ifdef HAVE_VFORK_H
a9322a30
TT
10833# include <vfork.h>
10834#endif
10835/* On some sparc systems, changes by the child to local and incoming
10836 argument registers are propagated back to the parent. The compiler
10837 is told about this with #include <vfork.h>, but some compilers
10838 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
10839 static variable whose address is put into a register that is
10840 clobbered by the vfork. */
10841static void
10842#ifdef __cplusplus
10843sparc_address_test (int arg)
10844# else
10845sparc_address_test (arg) int arg;
10846#endif
10847{
10848 static pid_t child;
10849 if (!child) {
10850 child = vfork ();
10851 if (child < 0) {
10852 perror ("vfork");
10853 _exit(2);
10854 }
10855 if (!child) {
10856 arg = getpid();
10857 write(-1, "", 0);
10858 _exit (arg);
10859 }
10860 }
10861}
10862
10863int
10864main ()
10865{
10866 pid_t parent = getpid ();
10867 pid_t child;
10868
10869 sparc_address_test (0);
10870
10871 child = vfork ();
10872
10873 if (child == 0) {
10874 /* Here is another test for sparc vfork register problems. This
10875 test uses lots of local variables, at least as many local
10876 variables as main has allocated so far including compiler
10877 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
10878 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
10879 reuse the register of parent for one of the local variables,
10880 since it will think that parent can't possibly be used any more
10881 in this routine. Assigning to the local variable will thus
10882 munge parent in the parent process. */
10883 pid_t
10884 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
10885 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
10886 /* Convince the compiler that p..p7 are live; otherwise, it might
10887 use the same hardware register for all 8 local variables. */
10888 if (p != p1 || p != p2 || p != p3 || p != p4
10889 || p != p5 || p != p6 || p != p7)
10890 _exit(1);
10891
10892 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
10893 from child file descriptors. If the child closes a descriptor
10894 before it execs or exits, this munges the parent's descriptor
10895 as well. Test for this by closing stdout in the child. */
10896 _exit(close(fileno(stdout)) != 0);
10897 } else {
10898 int status;
10899 struct stat st;
10900
10901 while (wait(&status) != child)
10902 ;
81ecdfbb 10903 return (
a9322a30
TT
10904 /* Was there some problem with vforking? */
10905 child < 0
10906
10907 /* Did the child fail? (This shouldn't happen.) */
10908 || status
10909
10910 /* Did the vfork/compiler bug occur? */
10911 || parent != getpid()
10912
10913 /* Did the file descriptor bug occur? */
10914 || fstat(fileno(stdout), &st) != 0
10915 );
10916 }
10917}
10918_ACEOF
81ecdfbb 10919if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
10920 ac_cv_func_vfork_works=yes
10921else
81ecdfbb 10922 ac_cv_func_vfork_works=no
a9322a30 10923fi
81ecdfbb
RW
10924rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10925 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 10926fi
81ecdfbb 10927
a9322a30 10928fi
81ecdfbb
RW
10929{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
10930$as_echo "$ac_cv_func_vfork_works" >&6; }
a9322a30
TT
10931
10932fi;
10933if test "x$ac_cv_func_fork_works" = xcross; then
10934 ac_cv_func_vfork_works=$ac_cv_func_vfork
81ecdfbb
RW
10935 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
10936$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
a9322a30
TT
10937fi
10938
10939if test "x$ac_cv_func_vfork_works" = xyes; then
10940
81ecdfbb 10941$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
a9322a30
TT
10942
10943else
10944
81ecdfbb 10945$as_echo "#define vfork fork" >>confdefs.h
a9322a30
TT
10946
10947fi
10948if test "x$ac_cv_func_fork_works" = xyes; then
10949
81ecdfbb 10950$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
a9322a30
TT
10951
10952fi
10953
cdf43629 10954for ac_func in getauxval getrusage getuid getgid \
bdca27a2 10955 pipe poll pread pread64 pwrite resize_term \
7313baad 10956 sbrk setpgid setpgrp setsid \
9467110b 10957 sigaction sigprocmask sigsetmask socketpair \
110ed339 10958 ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
3332aaf2 10959 setrlimit getrlimit posix_madvise waitpid \
1bc1068a 10960 ptrace64 sigaltstack mkdtemp
81ecdfbb
RW
10961do :
10962 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10963ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10964eval as_val=\$$as_ac_var
10965 if test "x$as_val" = x""yes; then :
6c7a06a3 10966 cat >>confdefs.h <<_ACEOF
81ecdfbb 10967#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6c7a06a3
TT
10968_ACEOF
10969
10970fi
10971done
10972
10973
81ecdfbb
RW
10974 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
10975$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
10976if test "${am_cv_langinfo_codeset+set}" = set; then :
10977 $as_echo_n "(cached) " >&6
6c7a06a3 10978else
81ecdfbb 10979 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
10980/* end confdefs.h. */
10981#include <langinfo.h>
10982int
10983main ()
10984{
10985char* cs = nl_langinfo(CODESET);
bec39cab
AC
10986 ;
10987 return 0;
10988}
10989_ACEOF
81ecdfbb 10990if ac_fn_c_try_link "$LINENO"; then :
6c7a06a3 10991 am_cv_langinfo_codeset=yes
a4db0f07 10992else
81ecdfbb 10993 am_cv_langinfo_codeset=no
a4db0f07 10994fi
81ecdfbb
RW
10995rm -f core conftest.err conftest.$ac_objext \
10996 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 10997
a4db0f07 10998fi
81ecdfbb
RW
10999{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
11000$as_echo "$am_cv_langinfo_codeset" >&6; }
6c7a06a3
TT
11001 if test $am_cv_langinfo_codeset = yes; then
11002
81ecdfbb 11003$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
a4db0f07 11004
6c7a06a3 11005 fi
c906108c 11006
06825bd1 11007
3266f10b
TT
11008 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
11009$as_echo_n "checking for ANSI C header files... " >&6; }
11010if test "${ac_cv_header_stdc+set}" = set; then :
11011 $as_echo_n "(cached) " >&6
11012else
11013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11014/* end confdefs.h. */
11015#include <stdlib.h>
11016#include <stdarg.h>
11017#include <string.h>
11018#include <float.h>
11019
11020int
11021main ()
11022{
11023
11024 ;
11025 return 0;
11026}
11027_ACEOF
11028if ac_fn_c_try_compile "$LINENO"; then :
11029 ac_cv_header_stdc=yes
11030else
11031 ac_cv_header_stdc=no
11032fi
11033rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11034
11035if test $ac_cv_header_stdc = yes; then
11036 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11037 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11038/* end confdefs.h. */
11039#include <string.h>
11040
11041_ACEOF
11042if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11043 $EGREP "memchr" >/dev/null 2>&1; then :
11044
11045else
11046 ac_cv_header_stdc=no
11047fi
11048rm -f conftest*
11049
11050fi
11051
11052if test $ac_cv_header_stdc = yes; then
11053 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11055/* end confdefs.h. */
11056#include <stdlib.h>
11057
11058_ACEOF
11059if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11060 $EGREP "free" >/dev/null 2>&1; then :
11061
11062else
11063 ac_cv_header_stdc=no
11064fi
11065rm -f conftest*
11066
11067fi
11068
11069if test $ac_cv_header_stdc = yes; then
11070 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11071 if test "$cross_compiling" = yes; then :
11072 :
11073else
11074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11075/* end confdefs.h. */
11076#include <ctype.h>
11077#include <stdlib.h>
11078#if ((' ' & 0x0FF) == 0x020)
11079# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11080# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11081#else
11082# define ISLOWER(c) \
11083 (('a' <= (c) && (c) <= 'i') \
11084 || ('j' <= (c) && (c) <= 'r') \
11085 || ('s' <= (c) && (c) <= 'z'))
11086# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11087#endif
11088
11089#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11090int
11091main ()
11092{
11093 int i;
11094 for (i = 0; i < 256; i++)
11095 if (XOR (islower (i), ISLOWER (i))
11096 || toupper (i) != TOUPPER (i))
11097 return 2;
11098 return 0;
11099}
11100_ACEOF
11101if ac_fn_c_try_run "$LINENO"; then :
11102
11103else
11104 ac_cv_header_stdc=no
11105fi
11106rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11107 conftest.$ac_objext conftest.beam conftest.$ac_ext
11108fi
11109
11110fi
11111fi
11112{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
11113$as_echo "$ac_cv_header_stdc" >&6; }
11114if test $ac_cv_header_stdc = yes; then
11115
11116$as_echo "#define STDC_HEADERS 1" >>confdefs.h
11117
3266f10b
TT
11118fi
11119
11120 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
11121# for constant arguments. Useless!
11122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
11123$as_echo_n "checking for working alloca.h... " >&6; }
11124if test "${ac_cv_working_alloca_h+set}" = set; then :
11125 $as_echo_n "(cached) " >&6
11126else
11127 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11128/* end confdefs.h. */
11129#include <alloca.h>
11130int
11131main ()
11132{
11133char *p = (char *) alloca (2 * sizeof (int));
11134 if (p) return 0;
11135 ;
11136 return 0;
11137}
11138_ACEOF
11139if ac_fn_c_try_link "$LINENO"; then :
11140 ac_cv_working_alloca_h=yes
11141else
11142 ac_cv_working_alloca_h=no
11143fi
11144rm -f core conftest.err conftest.$ac_objext \
11145 conftest$ac_exeext conftest.$ac_ext
11146fi
11147{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
11148$as_echo "$ac_cv_working_alloca_h" >&6; }
11149if test $ac_cv_working_alloca_h = yes; then
11150
11151$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
11152
11153fi
11154
11155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
11156$as_echo_n "checking for alloca... " >&6; }
11157if test "${ac_cv_func_alloca_works+set}" = set; then :
11158 $as_echo_n "(cached) " >&6
11159else
11160 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11161/* end confdefs.h. */
11162#ifdef __GNUC__
11163# define alloca __builtin_alloca
11164#else
11165# ifdef _MSC_VER
11166# include <malloc.h>
11167# define alloca _alloca
11168# else
11169# ifdef HAVE_ALLOCA_H
11170# include <alloca.h>
11171# else
11172# ifdef _AIX
11173 #pragma alloca
11174# else
11175# ifndef alloca /* predefined by HP cc +Olibcalls */
11176char *alloca ();
11177# endif
11178# endif
11179# endif
11180# endif
11181#endif
11182
11183int
11184main ()
11185{
11186char *p = (char *) alloca (1);
11187 if (p) return 0;
11188 ;
11189 return 0;
11190}
11191_ACEOF
11192if ac_fn_c_try_link "$LINENO"; then :
11193 ac_cv_func_alloca_works=yes
11194else
11195 ac_cv_func_alloca_works=no
11196fi
11197rm -f core conftest.err conftest.$ac_objext \
11198 conftest$ac_exeext conftest.$ac_ext
11199fi
11200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
11201$as_echo "$ac_cv_func_alloca_works" >&6; }
11202
11203if test $ac_cv_func_alloca_works = yes; then
11204
11205$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
11206
11207else
11208 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
11209# that cause trouble. Some versions do not even contain alloca or
11210# contain a buggy version. If you still want to use their alloca,
11211# use ar to extract alloca.o from them instead of compiling alloca.c.
11212
11213ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
11214
11215$as_echo "#define C_ALLOCA 1" >>confdefs.h
11216
11217
11218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
11219$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
11220if test "${ac_cv_os_cray+set}" = set; then :
11221 $as_echo_n "(cached) " >&6
11222else
11223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11224/* end confdefs.h. */
11225#if defined CRAY && ! defined CRAY2
11226webecray
11227#else
11228wenotbecray
11229#endif
11230
11231_ACEOF
11232if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11233 $EGREP "webecray" >/dev/null 2>&1; then :
11234 ac_cv_os_cray=yes
11235else
11236 ac_cv_os_cray=no
11237fi
11238rm -f conftest*
11239
11240fi
11241{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
11242$as_echo "$ac_cv_os_cray" >&6; }
11243if test $ac_cv_os_cray = yes; then
11244 for ac_func in _getb67 GETB67 getb67; do
11245 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11246ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11247eval as_val=\$$as_ac_var
11248 if test "x$as_val" = x""yes; then :
11249
11250cat >>confdefs.h <<_ACEOF
11251#define CRAY_STACKSEG_END $ac_func
11252_ACEOF
11253
11254 break
11255fi
11256
11257 done
11258fi
11259
11260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
11261$as_echo_n "checking stack direction for C alloca... " >&6; }
11262if test "${ac_cv_c_stack_direction+set}" = set; then :
11263 $as_echo_n "(cached) " >&6
11264else
11265 if test "$cross_compiling" = yes; then :
11266 ac_cv_c_stack_direction=0
11267else
11268 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11269/* end confdefs.h. */
11270$ac_includes_default
11271int
11272find_stack_direction ()
11273{
11274 static char *addr = 0;
11275 auto char dummy;
11276 if (addr == 0)
11277 {
11278 addr = &dummy;
11279 return find_stack_direction ();
11280 }
11281 else
11282 return (&dummy > addr) ? 1 : -1;
11283}
11284
11285int
11286main ()
11287{
11288 return find_stack_direction () < 0;
11289}
11290_ACEOF
11291if ac_fn_c_try_run "$LINENO"; then :
11292 ac_cv_c_stack_direction=1
11293else
11294 ac_cv_c_stack_direction=-1
11295fi
11296rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11297 conftest.$ac_objext conftest.beam conftest.$ac_ext
11298fi
11299
11300fi
11301{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
11302$as_echo "$ac_cv_c_stack_direction" >&6; }
11303cat >>confdefs.h <<_ACEOF
11304#define STACK_DIRECTION $ac_cv_c_stack_direction
11305_ACEOF
11306
11307
11308fi
11309
11310
11311
11312 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
11313$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
11314if test "${am_cv_langinfo_codeset+set}" = set; then :
11315 $as_echo_n "(cached) " >&6
11316else
11317 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11318/* end confdefs.h. */
11319#include <langinfo.h>
11320int
11321main ()
11322{
11323char* cs = nl_langinfo(CODESET);
11324 ;
11325 return 0;
11326}
11327_ACEOF
11328if ac_fn_c_try_link "$LINENO"; then :
11329 am_cv_langinfo_codeset=yes
11330else
11331 am_cv_langinfo_codeset=no
11332fi
11333rm -f core conftest.err conftest.$ac_objext \
11334 conftest$ac_exeext conftest.$ac_ext
11335
11336fi
11337{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
11338$as_echo "$am_cv_langinfo_codeset" >&6; }
11339 if test $am_cv_langinfo_codeset = yes; then
11340
11341$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
11342
11343 fi
11344
11345
a3d08894 11346 for ac_header in linux/perf_event.h locale.h memory.h signal.h sys/resource.h sys/socket.h sys/syscall.h sys/un.h sys/wait.h thread_db.h wait.h
3266f10b
TT
11347do :
11348 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11349ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
11350eval as_val=\$$as_ac_Header
11351 if test "x$as_val" = x""yes; then :
11352 cat >>confdefs.h <<_ACEOF
11353#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
11354_ACEOF
11355
11356fi
11357
11358done
11359
11360
11361 for ac_func in fdwalk getrlimit pipe pipe2 socketpair
11362do :
11363 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11364ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11365eval as_val=\$$as_ac_var
11366 if test "x$as_val" = x""yes; then :
11367 cat >>confdefs.h <<_ACEOF
11368#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11369_ACEOF
11370
11371fi
11372done
11373
11374
11375 ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default"
11376if test "x$ac_cv_have_decl_strerror" = x""yes; then :
11377 ac_have_decl=1
11378else
11379 ac_have_decl=0
11380fi
11381
11382cat >>confdefs.h <<_ACEOF
11383#define HAVE_DECL_STRERROR $ac_have_decl
11384_ACEOF
11385ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
11386if test "x$ac_cv_have_decl_strstr" = x""yes; then :
11387 ac_have_decl=1
11388else
11389 ac_have_decl=0
11390fi
11391
11392cat >>confdefs.h <<_ACEOF
11393#define HAVE_DECL_STRSTR $ac_have_decl
11394_ACEOF
11395
11396
e9bcb658
GB
11397 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
11398$as_echo_n "checking for sigsetjmp... " >&6; }
11399if test "${gdb_cv_func_sigsetjmp+set}" = set; then :
11400 $as_echo_n "(cached) " >&6
11401else
11402 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11403/* end confdefs.h. */
11404
11405#include <setjmp.h>
11406
11407int
11408main ()
11409{
11410sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
11411 ;
11412 return 0;
11413}
11414_ACEOF
11415if ac_fn_c_try_compile "$LINENO"; then :
11416 gdb_cv_func_sigsetjmp=yes
11417else
11418 gdb_cv_func_sigsetjmp=no
11419fi
11420rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11421fi
11422{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
11423$as_echo "$gdb_cv_func_sigsetjmp" >&6; }
11424if test $gdb_cv_func_sigsetjmp = yes; then
11425
11426$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
11427
11428fi
11429
3266f10b 11430
a3828db0
MK
11431# Check the return and argument types of ptrace. No canned test for
11432# this, so roll our own.
11433gdb_ptrace_headers='
4ff70b84 11434#include <sys/types.h>
a3828db0
MK
11435#if HAVE_SYS_PTRACE_H
11436# include <sys/ptrace.h>
11437#endif
11438#if HAVE_UNISTD_H
11439# include <unistd.h>
11440#endif
11441'
11442# There is no point in checking if we don't have a prototype.
81ecdfbb
RW
11443ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers
11444"
11445if test "x$ac_cv_have_decl_ptrace" = x""yes; then :
11446 ac_have_decl=1
06825bd1 11447else
81ecdfbb 11448 ac_have_decl=0
06825bd1 11449fi
06825bd1 11450
a3828db0 11451cat >>confdefs.h <<_ACEOF
81ecdfbb 11452#define HAVE_DECL_PTRACE $ac_have_decl
a3828db0 11453_ACEOF
81ecdfbb 11454if test $ac_have_decl = 1; then :
bec39cab 11455
a3828db0 11456else
a3828db0
MK
11457
11458 : ${gdb_cv_func_ptrace_ret='int'}
11459 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
11460
06825bd1
MK
11461fi
11462
064ef605
DJ
11463# Check return type. Varargs (used on GNU/Linux) conflict with the
11464# empty argument list, so check for that explicitly.
81ecdfbb
RW
11465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
11466$as_echo_n "checking return type of ptrace... " >&6; }
11467if test "${gdb_cv_func_ptrace_ret+set}" = set; then :
11468 $as_echo_n "(cached) " >&6
bec39cab 11469else
81ecdfbb 11470 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11471/* end confdefs.h. */
a3828db0 11472$gdb_ptrace_headers
bec39cab
AC
11473int
11474main ()
11475{
064ef605
DJ
11476extern long ptrace (enum __ptrace_request, ...);
11477 ;
11478 return 0;
11479}
11480_ACEOF
81ecdfbb 11481if ac_fn_c_try_compile "$LINENO"; then :
064ef605
DJ
11482 gdb_cv_func_ptrace_ret='long'
11483else
81ecdfbb 11484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
11485/* end confdefs.h. */
11486$gdb_ptrace_headers
11487int
11488main ()
11489{
a3828db0 11490extern int ptrace ();
bec39cab
AC
11491 ;
11492 return 0;
11493}
11494_ACEOF
81ecdfbb 11495if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 11496 gdb_cv_func_ptrace_ret='int'
70f9f479 11497else
81ecdfbb 11498 gdb_cv_func_ptrace_ret='long'
70f9f479 11499fi
81ecdfbb 11500rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
70f9f479 11501fi
81ecdfbb 11502rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
064ef605 11503fi
81ecdfbb
RW
11504{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
11505$as_echo "$gdb_cv_func_ptrace_ret" >&6; }
bec39cab 11506
a3828db0
MK
11507cat >>confdefs.h <<_ACEOF
11508#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
bec39cab 11509_ACEOF
70f9f479 11510
a3828db0 11511# Check argument types.
81ecdfbb
RW
11512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
11513$as_echo_n "checking types of arguments for ptrace... " >&6; }
11514if test "${gdb_cv_func_ptrace_args+set}" = set; then :
11515 $as_echo_n "(cached) " >&6
bec39cab 11516else
a3828db0 11517
81ecdfbb 11518 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
11519/* end confdefs.h. */
11520$gdb_ptrace_headers
11521int
11522main ()
11523{
11524extern long ptrace (enum __ptrace_request, ...);
11525 ;
11526 return 0;
11527}
11528_ACEOF
81ecdfbb 11529if ac_fn_c_try_compile "$LINENO"; then :
064ef605
DJ
11530 gdb_cv_func_ptrace_args='int,int,long,long'
11531else
064ef605 11532
a3828db0
MK
11533for gdb_arg1 in 'int' 'long'; do
11534 for gdb_arg2 in 'pid_t' 'int' 'long'; do
5ed10e6e 11535 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
96d7229d 11536 for gdb_arg4 in 'int' 'long' 'void *'; do
81ecdfbb 11537 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11538/* end confdefs.h. */
a3828db0 11539$gdb_ptrace_headers
bec39cab
AC
11540int
11541main ()
11542{
a3828db0
MK
11543
11544extern $gdb_cv_func_ptrace_ret
11545 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
11546
bec39cab
AC
11547 ;
11548 return 0;
11549}
11550_ACEOF
81ecdfbb 11551if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
11552 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
11553 break 4;
5c7f2947 11554fi
81ecdfbb 11555rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0 11556 for gdb_arg5 in 'int *' 'int' 'long'; do
81ecdfbb 11557 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11558/* end confdefs.h. */
a3828db0 11559$gdb_ptrace_headers
bec39cab
AC
11560int
11561main ()
11562{
a3828db0
MK
11563
11564extern $gdb_cv_func_ptrace_ret
11565 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
11566
bec39cab
AC
11567 ;
11568 return 0;
11569}
11570_ACEOF
81ecdfbb 11571if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
11572
11573gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
11574 break 5;
78434e59 11575fi
81ecdfbb 11576rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0
MK
11577 done
11578 done
11579 done
11580 done
11581done
11582# Provide a safe default value.
11583: ${gdb_cv_func_ptrace_args='int,int,long,long'}
11584
064ef605 11585fi
81ecdfbb 11586rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
78434e59 11587fi
81ecdfbb
RW
11588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
11589$as_echo "$gdb_cv_func_ptrace_args" >&6; }
a3828db0
MK
11590ac_save_IFS=$IFS; IFS=','
11591set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
11592IFS=$ac_save_IFS
11593shift
bec39cab 11594
a3828db0
MK
11595cat >>confdefs.h <<_ACEOF
11596#define PTRACE_TYPE_ARG3 $3
11597_ACEOF
11598
96d7229d
LM
11599
11600cat >>confdefs.h <<_ACEOF
11601#define PTRACE_TYPE_ARG4 $4
11602_ACEOF
11603
a3828db0
MK
11604if test -n "$5"; then
11605
11606cat >>confdefs.h <<_ACEOF
11607#define PTRACE_TYPE_ARG5 $5
bec39cab 11608_ACEOF
78434e59
MK
11609
11610fi
11611
a3828db0 11612if test "$cross_compiling" = no; then
81ecdfbb
RW
11613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
11614$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
11615if test "${ac_cv_func_setpgrp_void+set}" = set; then :
11616 $as_echo_n "(cached) " >&6
a3828db0 11617else
81ecdfbb
RW
11618 if test "$cross_compiling" = yes; then :
11619 as_fn_error "cannot check setpgrp when cross compiling" "$LINENO" 5
bec39cab 11620else
81ecdfbb 11621 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11622/* end confdefs.h. */
81ecdfbb 11623$ac_includes_default
bec39cab
AC
11624int
11625main ()
11626{
a3828db0
MK
11627/* If this system has a BSD-style setpgrp which takes arguments,
11628 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
11629 exit successfully. */
81ecdfbb 11630 return setpgrp (1,1) != -1;
bec39cab
AC
11631 ;
11632 return 0;
11633}
11634_ACEOF
81ecdfbb 11635if ac_fn_c_try_run "$LINENO"; then :
a3828db0 11636 ac_cv_func_setpgrp_void=no
c906108c 11637else
81ecdfbb 11638 ac_cv_func_setpgrp_void=yes
c906108c 11639fi
81ecdfbb
RW
11640rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11641 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 11642fi
81ecdfbb 11643
a3828db0 11644fi
81ecdfbb
RW
11645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
11646$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0
MK
11647if test $ac_cv_func_setpgrp_void = yes; then
11648
81ecdfbb 11649$as_echo "#define SETPGRP_VOID 1" >>confdefs.h
97bf5e38
MK
11650
11651fi
a3828db0
MK
11652
11653else
81ecdfbb
RW
11654 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
11655$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
11656if test "${ac_cv_func_setpgrp_void+set}" = set; then :
11657 $as_echo_n "(cached) " >&6
97bf5e38 11658else
81ecdfbb 11659 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11660/* end confdefs.h. */
a3828db0
MK
11661
11662#include <unistd.h>
11663
bec39cab
AC
11664int
11665main ()
11666{
a3828db0
MK
11667
11668 if (setpgrp(1,1) == -1)
11669 exit (0);
11670 else
11671 exit (1);
11672
bec39cab
AC
11673 ;
11674 return 0;
11675}
11676_ACEOF
81ecdfbb 11677if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 11678 ac_cv_func_setpgrp_void=no
c906108c 11679else
81ecdfbb 11680 ac_cv_func_setpgrp_void=yes
c906108c 11681fi
81ecdfbb 11682rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 11683fi
81ecdfbb
RW
11684{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
11685$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0 11686if test $ac_cv_func_setpgrp_void = yes; then
81ecdfbb 11687 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
c3f6f71d 11688
a3828db0 11689fi
c906108c
SS
11690fi
11691
a3828db0
MK
11692# Assume we'll default to using the included libiberty regex.
11693gdb_use_included_regex=yes
11694
11695# However, if the system regex is GNU regex, then default to *not*
11696# using the included regex.
81ecdfbb
RW
11697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5
11698$as_echo_n "checking for GNU regex... " >&6; }
11699if test "${gdb_cv_have_gnu_regex+set}" = set; then :
11700 $as_echo_n "(cached) " >&6
bec39cab 11701else
81ecdfbb 11702 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11703/* end confdefs.h. */
a3828db0 11704#include <gnu-versions.h>
bec39cab
AC
11705int
11706main ()
11707{
81ecdfbb
RW
11708#define REGEX_INTERFACE_VERSION 1
11709#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
11710# error "Version mismatch"
11711#endif
5c45e068
MK
11712 ;
11713 return 0;
11714}
11715_ACEOF
81ecdfbb
RW
11716if ac_fn_c_try_compile "$LINENO"; then :
11717 gdb_cv_have_gnu_regex=yes
5c45e068 11718else
81ecdfbb
RW
11719 gdb_cv_have_gnu_regex=no
11720fi
11721rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11722fi
11723{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
11724$as_echo "$gdb_cv_have_gnu_regex" >&6; }
11725if test $gdb_cv_have_gnu_regex = yes; then
11726 gdb_use_included_regex=no
5c45e068 11727fi
81ecdfbb
RW
11728
11729
11730# Check whether --with-included-regex was given.
11731if test "${with_included_regex+set}" = set; then :
11732 withval=$with_included_regex; gdb_with_regex=$withval
11733else
11734 gdb_with_regex=$gdb_use_included_regex
c906108c 11735fi
81ecdfbb
RW
11736
11737if test "$gdb_with_regex" = yes; then
11738
11739$as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h
11740
c906108c 11741fi
81ecdfbb
RW
11742
11743# Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
11744ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
11745#include <sys/proc.h>
11746
11747"
11748if test "x$ac_cv_member_struct_thread_td_pcb" = x""yes; then :
c906108c 11749
5c45e068 11750cat >>confdefs.h <<_ACEOF
a3828db0 11751#define HAVE_STRUCT_THREAD_TD_PCB 1
bec39cab 11752_ACEOF
c906108c 11753
5c45e068 11754
97bf5e38 11755fi
c906108c 11756
5c45e068 11757
a3828db0 11758# See if <sys/lwp.h> defines `struct lwp`.
81ecdfbb
RW
11759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
11760$as_echo_n "checking for struct lwp... " >&6; }
11761if test "${gdb_cv_struct_lwp+set}" = set; then :
11762 $as_echo_n "(cached) " >&6
bec39cab 11763else
81ecdfbb 11764 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11765/* end confdefs.h. */
a3828db0
MK
11766#include <sys/param.h>
11767#include <sys/lwp.h>
bec39cab
AC
11768int
11769main ()
11770{
a3828db0 11771struct lwp l;
bec39cab
AC
11772 ;
11773 return 0;
11774}
11775_ACEOF
81ecdfbb 11776if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 11777 gdb_cv_struct_lwp=yes
c906108c 11778else
81ecdfbb 11779 gdb_cv_struct_lwp=no
c906108c 11780fi
81ecdfbb 11781rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 11782fi
81ecdfbb
RW
11783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
11784$as_echo "$gdb_cv_struct_lwp" >&6; }
a3828db0 11785if test $gdb_cv_struct_lwp = yes; then
c906108c 11786
81ecdfbb 11787$as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
c906108c 11788
97bf5e38 11789fi
c906108c 11790
a3828db0 11791# See if <machine/reg.h> degines `struct reg'.
81ecdfbb
RW
11792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
11793$as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
11794if test "${gdb_cv_struct_reg+set}" = set; then :
11795 $as_echo_n "(cached) " >&6
bec39cab 11796else
81ecdfbb 11797 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11798/* end confdefs.h. */
a3828db0
MK
11799#include <sys/types.h>
11800#include <machine/reg.h>
bec39cab
AC
11801int
11802main ()
11803{
a3828db0 11804struct reg r;
bec39cab
AC
11805 ;
11806 return 0;
11807}
11808_ACEOF
81ecdfbb 11809if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 11810 gdb_cv_struct_reg=yes
27ca5dad 11811else
81ecdfbb 11812 gdb_cv_struct_reg=no
27ca5dad 11813fi
81ecdfbb 11814rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27ca5dad 11815fi
81ecdfbb
RW
11816{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
11817$as_echo "$gdb_cv_struct_reg" >&6; }
a3828db0 11818if test $gdb_cv_struct_reg = yes; then
bec39cab 11819
81ecdfbb 11820$as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
27ca5dad
MC
11821
11822fi
97bf5e38 11823
a3828db0
MK
11824# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
11825# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
81ecdfbb
RW
11826ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <machine/reg.h>
11827"
11828if test "x$ac_cv_member_struct_reg_r_fs" = x""yes; then :
5c45e068
MK
11829
11830cat >>confdefs.h <<_ACEOF
a3828db0 11831#define HAVE_STRUCT_REG_R_FS 1
bec39cab 11832_ACEOF
3862412b 11833
5c45e068 11834
97bf5e38 11835fi
81ecdfbb
RW
11836ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <machine/reg.h>
11837"
11838if test "x$ac_cv_member_struct_reg_r_gs" = x""yes; then :
5c45e068
MK
11839
11840cat >>confdefs.h <<_ACEOF
a3828db0 11841#define HAVE_STRUCT_REG_R_GS 1
bec39cab 11842_ACEOF
3862412b 11843
5c45e068 11844
97bf5e38 11845fi
3862412b 11846
5c45e068 11847
6fea9e18
L
11848# See if <sys/user.h> supports the %fs_base and %gs_bas amd64 segment registers.
11849# Older amd64 Linux's don't have the fs_base and gs_base members of
11850# `struct user_regs_struct'.
11851ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "fs_base" "ac_cv_member_struct_user_regs_struct_fs_base" "#include <sys/user.h>
11852"
11853if test "x$ac_cv_member_struct_user_regs_struct_fs_base" = x""yes; then :
11854
11855cat >>confdefs.h <<_ACEOF
11856#define HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE 1
11857_ACEOF
11858
11859
11860fi
11861ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "gs_base" "ac_cv_member_struct_user_regs_struct_gs_base" "#include <sys/user.h>
11862"
11863if test "x$ac_cv_member_struct_user_regs_struct_gs_base" = x""yes; then :
11864
11865cat >>confdefs.h <<_ACEOF
11866#define HAVE_STRUCT_USER_REGS_STRUCT_GS_BASE 1
11867_ACEOF
11868
11869
11870fi
11871
11872
a3828db0 11873# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
81ecdfbb
RW
11874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
11875$as_echo_n "checking for PTRACE_GETREGS... " >&6; }
11876if test "${gdb_cv_have_ptrace_getregs+set}" = set; then :
11877 $as_echo_n "(cached) " >&6
451928c5 11878else
81ecdfbb 11879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11880/* end confdefs.h. */
a3828db0 11881#include <sys/ptrace.h>
bec39cab
AC
11882int
11883main ()
11884{
a3828db0 11885PTRACE_GETREGS;
bec39cab
AC
11886 ;
11887 return 0;
11888}
11889_ACEOF
81ecdfbb 11890if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 11891 gdb_cv_have_ptrace_getregs=yes
451928c5 11892else
81ecdfbb 11893 gdb_cv_have_ptrace_getregs=no
451928c5 11894fi
81ecdfbb 11895rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
11896fi
11897
81ecdfbb
RW
11898{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
11899$as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
a3828db0 11900if test $gdb_cv_have_ptrace_getregs = yes; then
60ca704f 11901
81ecdfbb 11902$as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
451928c5 11903
97bf5e38 11904fi
451928c5 11905
a3828db0 11906# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
81ecdfbb
RW
11907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
11908$as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
11909if test "${gdb_cv_have_ptrace_getfpxregs+set}" = set; then :
11910 $as_echo_n "(cached) " >&6
451928c5 11911else
81ecdfbb 11912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11913/* end confdefs.h. */
a3828db0 11914#include <sys/ptrace.h>
bec39cab
AC
11915int
11916main ()
11917{
a3828db0 11918PTRACE_GETFPXREGS;
bec39cab
AC
11919 ;
11920 return 0;
11921}
11922_ACEOF
81ecdfbb 11923if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 11924 gdb_cv_have_ptrace_getfpxregs=yes
451928c5 11925else
81ecdfbb 11926 gdb_cv_have_ptrace_getfpxregs=no
451928c5 11927fi
81ecdfbb 11928rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
11929fi
11930
81ecdfbb
RW
11931{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
11932$as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
a3828db0 11933if test $gdb_cv_have_ptrace_getfpxregs = yes; then
60ca704f 11934
81ecdfbb 11935$as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
451928c5 11936
97bf5e38 11937fi
451928c5 11938
a3828db0 11939# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
81ecdfbb
RW
11940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
11941$as_echo_n "checking for PT_GETDBREGS... " >&6; }
11942if test "${gdb_cv_have_pt_getdbregs+set}" = set; then :
11943 $as_echo_n "(cached) " >&6
3862412b 11944else
81ecdfbb 11945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11946/* end confdefs.h. */
a3828db0
MK
11947#include <sys/types.h>
11948#include <sys/ptrace.h>
bec39cab
AC
11949int
11950main ()
11951{
a3828db0 11952PT_GETDBREGS;
bec39cab
AC
11953 ;
11954 return 0;
11955}
11956_ACEOF
81ecdfbb 11957if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 11958 gdb_cv_have_pt_getdbregs=yes
3862412b 11959else
81ecdfbb 11960 gdb_cv_have_pt_getdbregs=no
3862412b 11961fi
81ecdfbb 11962rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
11963fi
11964
81ecdfbb
RW
11965{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
11966$as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
a3828db0 11967if test $gdb_cv_have_pt_getdbregs = yes; then
60ca704f 11968
81ecdfbb 11969$as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
3862412b 11970
97bf5e38 11971fi
3862412b 11972
a3828db0 11973# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
81ecdfbb
RW
11974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
11975$as_echo_n "checking for PT_GETXMMREGS... " >&6; }
11976if test "${gdb_cv_have_pt_getxmmregs+set}" = set; then :
11977 $as_echo_n "(cached) " >&6
3862412b 11978else
81ecdfbb 11979 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11980/* end confdefs.h. */
a3828db0
MK
11981#include <sys/types.h>
11982#include <sys/ptrace.h>
bec39cab
AC
11983int
11984main ()
11985{
a3828db0 11986PT_GETXMMREGS;
bec39cab
AC
11987 ;
11988 return 0;
11989}
11990_ACEOF
81ecdfbb 11991if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 11992 gdb_cv_have_pt_getxmmregs=yes
3862412b 11993else
81ecdfbb 11994 gdb_cv_have_pt_getxmmregs=no
3862412b 11995fi
81ecdfbb 11996rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
11997fi
11998
81ecdfbb
RW
11999{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
12000$as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
a3828db0 12001if test $gdb_cv_have_pt_getxmmregs = yes; then
60ca704f 12002
81ecdfbb 12003$as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
3862412b 12004
97bf5e38 12005fi
3862412b 12006
05b4bd79 12007# Detect which type of /proc is in use, such as for Solaris.
97bf5e38
MK
12008
12009if test "${target}" = "${host}"; then
12010 case "${host}" in
7b00db47 12011 *-*-sysv4.2* | *-*-sysv5* )
60ca704f 12012
81ecdfbb 12013$as_echo "#define NEW_PROC_API 1" >>confdefs.h
97bf5e38
MK
12014
12015 ;;
c162e8c9 12016 *-*-solaris2.[6789] | *-*-solaris2.1[0-9]*)
60ca704f 12017
81ecdfbb 12018$as_echo "#define NEW_PROC_API 1" >>confdefs.h
c960c18f
AC
12019
12020 ;;
12021 mips-sgi-irix5*)
12022 # Work around <sys/proc.h> needing _KMEMUSER problem on IRIX 5.
60ca704f 12023
81ecdfbb 12024$as_echo "#define _KMEMUSER 1" >>confdefs.h
97bf5e38
MK
12025
12026 ;;
12027 esac
12028fi
12029
12030if test "$ac_cv_header_sys_procfs_h" = yes; then
81ecdfbb
RW
12031 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
12032$as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
12033 if test "${bfd_cv_have_sys_procfs_type_gregset_t+set}" = set; then :
12034 $as_echo_n "(cached) " >&6
596c9d4b 12035else
81ecdfbb 12036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12037/* end confdefs.h. */
596c9d4b
KB
12038
12039#define _SYSCALL32
d30c5336
JK
12040/* Needed for new procfs interface on sparc-solaris. */
12041#define _STRUCTURED_PROC 1
596c9d4b 12042#include <sys/procfs.h>
bec39cab
AC
12043int
12044main ()
12045{
97bf5e38 12046gregset_t avar
bec39cab
AC
12047 ;
12048 return 0;
12049}
12050_ACEOF
81ecdfbb 12051if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 12052 bfd_cv_have_sys_procfs_type_gregset_t=yes
596c9d4b 12053else
81ecdfbb 12054 bfd_cv_have_sys_procfs_type_gregset_t=no
bec39cab 12055
596c9d4b 12056fi
81ecdfbb 12057rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
12058fi
12059
97bf5e38 12060 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
bec39cab 12061
81ecdfbb 12062$as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
596c9d4b
KB
12063
12064 fi
81ecdfbb
RW
12065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
12066$as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
451928c5 12067
81ecdfbb
RW
12068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
12069$as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
12070 if test "${bfd_cv_have_sys_procfs_type_fpregset_t+set}" = set; then :
12071 $as_echo_n "(cached) " >&6
d84dd0c5 12072else
81ecdfbb 12073 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12074/* end confdefs.h. */
97bf5e38
MK
12075
12076#define _SYSCALL32
d30c5336
JK
12077/* Needed for new procfs interface on sparc-solaris. */
12078#define _STRUCTURED_PROC 1
d84dd0c5 12079#include <sys/procfs.h>
bec39cab
AC
12080int
12081main ()
12082{
97bf5e38 12083fpregset_t avar
bec39cab
AC
12084 ;
12085 return 0;
12086}
12087_ACEOF
81ecdfbb 12088if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 12089 bfd_cv_have_sys_procfs_type_fpregset_t=yes
d84dd0c5 12090else
81ecdfbb 12091 bfd_cv_have_sys_procfs_type_fpregset_t=no
bec39cab 12092
d84dd0c5 12093fi
81ecdfbb 12094rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d84dd0c5
MK
12095fi
12096
97bf5e38 12097 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
bec39cab 12098
81ecdfbb 12099$as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
d84dd0c5 12100
97bf5e38 12101 fi
81ecdfbb
RW
12102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
12103$as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
d84dd0c5 12104
81ecdfbb
RW
12105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
12106$as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
12107 if test "${bfd_cv_have_sys_procfs_type_prgregset_t+set}" = set; then :
12108 $as_echo_n "(cached) " >&6
c906108c 12109else
81ecdfbb 12110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12111/* end confdefs.h. */
c906108c 12112
97bf5e38 12113#define _SYSCALL32
d30c5336
JK
12114/* Needed for new procfs interface on sparc-solaris. */
12115#define _STRUCTURED_PROC 1
97bf5e38 12116#include <sys/procfs.h>
bec39cab
AC
12117int
12118main ()
12119{
97bf5e38 12120prgregset_t avar
bec39cab
AC
12121 ;
12122 return 0;
12123}
12124_ACEOF
81ecdfbb 12125if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 12126 bfd_cv_have_sys_procfs_type_prgregset_t=yes
c906108c 12127else
81ecdfbb 12128 bfd_cv_have_sys_procfs_type_prgregset_t=no
bec39cab 12129
c906108c 12130fi
81ecdfbb 12131rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
12132fi
12133
97bf5e38 12134 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
bec39cab 12135
81ecdfbb 12136$as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
c906108c 12137
97bf5e38 12138 fi
81ecdfbb
RW
12139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
12140$as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
c906108c 12141
81ecdfbb
RW
12142 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
12143$as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
12144 if test "${bfd_cv_have_sys_procfs_type_prfpregset_t+set}" = set; then :
12145 $as_echo_n "(cached) " >&6
d45fe813 12146else
81ecdfbb 12147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12148/* end confdefs.h. */
97bf5e38
MK
12149
12150#define _SYSCALL32
d30c5336
JK
12151/* Needed for new procfs interface on sparc-solaris. */
12152#define _STRUCTURED_PROC 1
97bf5e38 12153#include <sys/procfs.h>
bec39cab
AC
12154int
12155main ()
12156{
97bf5e38 12157prfpregset_t avar
bec39cab
AC
12158 ;
12159 return 0;
12160}
12161_ACEOF
81ecdfbb 12162if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 12163 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
d45fe813 12164else
81ecdfbb 12165 bfd_cv_have_sys_procfs_type_prfpregset_t=no
bec39cab 12166
d45fe813 12167fi
81ecdfbb 12168rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
12169fi
12170
97bf5e38 12171 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
bec39cab 12172
81ecdfbb 12173$as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
d45fe813 12174
97bf5e38 12175 fi
81ecdfbb
RW
12176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
12177$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
d45fe813 12178
81ecdfbb
RW
12179 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
12180$as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
12181 if test "${bfd_cv_have_sys_procfs_type_prgregset32_t+set}" = set; then :
12182 $as_echo_n "(cached) " >&6
d45fe813 12183else
81ecdfbb 12184 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12185/* end confdefs.h. */
97bf5e38
MK
12186
12187#define _SYSCALL32
d30c5336
JK
12188/* Needed for new procfs interface on sparc-solaris. */
12189#define _STRUCTURED_PROC 1
97bf5e38 12190#include <sys/procfs.h>
bec39cab
AC
12191int
12192main ()
12193{
97bf5e38 12194prgregset32_t avar
bec39cab
AC
12195 ;
12196 return 0;
12197}
12198_ACEOF
81ecdfbb 12199if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 12200 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
d45fe813 12201else
81ecdfbb 12202 bfd_cv_have_sys_procfs_type_prgregset32_t=no
bec39cab 12203
d45fe813 12204fi
81ecdfbb 12205rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
12206fi
12207
97bf5e38 12208 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
bec39cab 12209
81ecdfbb 12210$as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
d45fe813 12211
97bf5e38 12212 fi
81ecdfbb
RW
12213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
12214$as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
d45fe813 12215
81ecdfbb
RW
12216 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
12217$as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
12218 if test "${bfd_cv_have_sys_procfs_type_lwpid_t+set}" = set; then :
12219 $as_echo_n "(cached) " >&6
d45fe813 12220else
81ecdfbb 12221 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12222/* end confdefs.h. */
97bf5e38 12223
d45fe813 12224#define _SYSCALL32
d30c5336
JK
12225/* Needed for new procfs interface on sparc-solaris. */
12226#define _STRUCTURED_PROC 1
97bf5e38 12227#include <sys/procfs.h>
bec39cab
AC
12228int
12229main ()
12230{
97bf5e38 12231lwpid_t avar
bec39cab
AC
12232 ;
12233 return 0;
12234}
12235_ACEOF
81ecdfbb 12236if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 12237 bfd_cv_have_sys_procfs_type_lwpid_t=yes
d45fe813 12238else
81ecdfbb 12239 bfd_cv_have_sys_procfs_type_lwpid_t=no
bec39cab 12240
d45fe813 12241fi
81ecdfbb 12242rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
12243fi
12244
97bf5e38 12245 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
bec39cab 12246
81ecdfbb 12247$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
d45fe813 12248
97bf5e38 12249 fi
81ecdfbb
RW
12250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
12251$as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
c906108c 12252
81ecdfbb
RW
12253 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
12254$as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
12255 if test "${bfd_cv_have_sys_procfs_type_psaddr_t+set}" = set; then :
12256 $as_echo_n "(cached) " >&6
c906108c 12257else
81ecdfbb 12258 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12259/* end confdefs.h. */
c906108c 12260
97bf5e38 12261#define _SYSCALL32
d30c5336
JK
12262/* Needed for new procfs interface on sparc-solaris. */
12263#define _STRUCTURED_PROC 1
97bf5e38 12264#include <sys/procfs.h>
bec39cab
AC
12265int
12266main ()
12267{
97bf5e38 12268psaddr_t avar
bec39cab
AC
12269 ;
12270 return 0;
12271}
12272_ACEOF
81ecdfbb 12273if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 12274 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c 12275else
81ecdfbb 12276 bfd_cv_have_sys_procfs_type_psaddr_t=no
bec39cab 12277
c906108c 12278fi
81ecdfbb 12279rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
12280fi
12281
97bf5e38 12282 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
bec39cab 12283
81ecdfbb 12284$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
c906108c 12285
97bf5e38 12286 fi
81ecdfbb
RW
12287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
12288$as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
c906108c 12289
81ecdfbb
RW
12290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prsysent_t in sys/procfs.h" >&5
12291$as_echo_n "checking for prsysent_t in sys/procfs.h... " >&6; }
12292 if test "${bfd_cv_have_sys_procfs_type_prsysent_t+set}" = set; then :
12293 $as_echo_n "(cached) " >&6
c906108c 12294else
81ecdfbb 12295 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12296/* end confdefs.h. */
c906108c 12297
97bf5e38 12298#define _SYSCALL32
d30c5336
JK
12299/* Needed for new procfs interface on sparc-solaris. */
12300#define _STRUCTURED_PROC 1
97bf5e38 12301#include <sys/procfs.h>
bec39cab
AC
12302int
12303main ()
12304{
97bf5e38 12305prsysent_t avar
bec39cab
AC
12306 ;
12307 return 0;
12308}
12309_ACEOF
81ecdfbb 12310if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 12311 bfd_cv_have_sys_procfs_type_prsysent_t=yes
c906108c 12312else
81ecdfbb 12313 bfd_cv_have_sys_procfs_type_prsysent_t=no
bec39cab 12314
c906108c 12315fi
81ecdfbb 12316rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
12317fi
12318
97bf5e38 12319 if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
bec39cab 12320
81ecdfbb 12321$as_echo "#define HAVE_PRSYSENT_T 1" >>confdefs.h
c906108c 12322
97bf5e38 12323 fi
81ecdfbb
RW
12324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prsysent_t" >&5
12325$as_echo "$bfd_cv_have_sys_procfs_type_prsysent_t" >&6; }
c906108c 12326
81ecdfbb
RW
12327 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigset_t in sys/procfs.h" >&5
12328$as_echo_n "checking for pr_sigset_t in sys/procfs.h... " >&6; }
12329 if test "${bfd_cv_have_sys_procfs_type_pr_sigset_t+set}" = set; then :
12330 $as_echo_n "(cached) " >&6
c906108c 12331else
81ecdfbb 12332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12333/* end confdefs.h. */
c906108c 12334
97bf5e38 12335#define _SYSCALL32
d30c5336
JK
12336/* Needed for new procfs interface on sparc-solaris. */
12337#define _STRUCTURED_PROC 1
97bf5e38 12338#include <sys/procfs.h>
bec39cab
AC
12339int
12340main ()
12341{
97bf5e38 12342pr_sigset_t avar
bec39cab
AC
12343 ;
12344 return 0;
12345}
12346_ACEOF
81ecdfbb 12347if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 12348 bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
c906108c 12349else
81ecdfbb 12350 bfd_cv_have_sys_procfs_type_pr_sigset_t=no
bec39cab 12351
c906108c 12352fi
81ecdfbb 12353rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
12354fi
12355
97bf5e38 12356 if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
bec39cab 12357
81ecdfbb 12358$as_echo "#define HAVE_PR_SIGSET_T 1" >>confdefs.h
c906108c 12359
97bf5e38 12360 fi
81ecdfbb
RW
12361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigset_t" >&5
12362$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigset_t" >&6; }
c906108c 12363
81ecdfbb
RW
12364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigaction64_t in sys/procfs.h" >&5
12365$as_echo_n "checking for pr_sigaction64_t in sys/procfs.h... " >&6; }
12366 if test "${bfd_cv_have_sys_procfs_type_pr_sigaction64_t+set}" = set; then :
12367 $as_echo_n "(cached) " >&6
c906108c 12368else
81ecdfbb 12369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12370/* end confdefs.h. */
c906108c 12371
97bf5e38 12372#define _SYSCALL32
d30c5336
JK
12373/* Needed for new procfs interface on sparc-solaris. */
12374#define _STRUCTURED_PROC 1
97bf5e38 12375#include <sys/procfs.h>
bec39cab
AC
12376int
12377main ()
12378{
97bf5e38 12379pr_sigaction64_t avar
bec39cab
AC
12380 ;
12381 return 0;
12382}
12383_ACEOF
81ecdfbb 12384if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 12385 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
c906108c 12386else
81ecdfbb 12387 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
bec39cab 12388
c906108c 12389fi
81ecdfbb 12390rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
12391fi
12392
97bf5e38 12393 if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
bec39cab 12394
81ecdfbb 12395$as_echo "#define HAVE_PR_SIGACTION64_T 1" >>confdefs.h
c906108c 12396
97bf5e38 12397 fi
81ecdfbb
RW
12398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&5
12399$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&6; }
97bf5e38 12400
81ecdfbb
RW
12401 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_siginfo64_t in sys/procfs.h" >&5
12402$as_echo_n "checking for pr_siginfo64_t in sys/procfs.h... " >&6; }
12403 if test "${bfd_cv_have_sys_procfs_type_pr_siginfo64_t+set}" = set; then :
12404 $as_echo_n "(cached) " >&6
97bf5e38 12405else
81ecdfbb 12406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12407/* end confdefs.h. */
97bf5e38
MK
12408
12409#define _SYSCALL32
d30c5336
JK
12410/* Needed for new procfs interface on sparc-solaris. */
12411#define _STRUCTURED_PROC 1
97bf5e38 12412#include <sys/procfs.h>
bec39cab
AC
12413int
12414main ()
12415{
97bf5e38 12416pr_siginfo64_t avar
bec39cab
AC
12417 ;
12418 return 0;
12419}
12420_ACEOF
81ecdfbb 12421if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
12422 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
12423else
81ecdfbb 12424 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
bec39cab 12425
97bf5e38 12426fi
81ecdfbb 12427rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 12428fi
c906108c 12429
97bf5e38 12430 if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
bec39cab 12431
81ecdfbb 12432$as_echo "#define HAVE_PR_SIGINFO64_T 1" >>confdefs.h
c906108c 12433
97bf5e38 12434 fi
81ecdfbb
RW
12435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&5
12436$as_echo "$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&6; }
bec39cab
AC
12437
12438
97bf5e38
MK
12439
12440
12441
97bf5e38 12442 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
81ecdfbb
RW
12443 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether prfpregset_t type is broken" >&5
12444$as_echo_n "checking whether prfpregset_t type is broken... " >&6; }
12445 if test "${gdb_cv_prfpregset_t_broken+set}" = set; then :
12446 $as_echo_n "(cached) " >&6
c906108c 12447else
81ecdfbb 12448 if test "$cross_compiling" = yes; then :
97bf5e38 12449 gdb_cv_prfpregset_t_broken=yes
c906108c 12450else
81ecdfbb 12451 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12452/* end confdefs.h. */
97bf5e38
MK
12453#include <sys/procfs.h>
12454 int main ()
12455 {
12456 if (sizeof (prfpregset_t) == sizeof (void *))
12457 return 1;
12458 return 0;
12459 }
bec39cab 12460_ACEOF
81ecdfbb 12461if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 12462 gdb_cv_prfpregset_t_broken=no
81ecdfbb
RW
12463else
12464 gdb_cv_prfpregset_t_broken=yes
c906108c 12465fi
81ecdfbb
RW
12466rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12467 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 12468fi
81ecdfbb 12469
c906108c
SS
12470fi
12471
81ecdfbb
RW
12472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_prfpregset_t_broken" >&5
12473$as_echo "$gdb_cv_prfpregset_t_broken" >&6; }
97bf5e38 12474 if test $gdb_cv_prfpregset_t_broken = yes; then
60ca704f 12475
81ecdfbb 12476$as_echo "#define PRFPREGSET_T_BROKEN 1" >>confdefs.h
c906108c 12477
97bf5e38
MK
12478 fi
12479 fi
c906108c 12480fi
c906108c 12481
bc8bcb4b 12482# Check if the compiler supports the `long long' type.
c906108c 12483
81ecdfbb
RW
12484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
12485$as_echo_n "checking for long long support in compiler... " >&6; }
12486if test "${gdb_cv_c_long_long+set}" = set; then :
12487 $as_echo_n "(cached) " >&6
97bf5e38 12488else
81ecdfbb 12489 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12490/* end confdefs.h. */
bc8bcb4b 12491extern long long foo;
bec39cab
AC
12492int
12493main ()
12494{
bc8bcb4b 12495switch (foo & 2) { case 0: return 1; }
bec39cab
AC
12496 ;
12497 return 0;
12498}
12499_ACEOF
81ecdfbb 12500if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
12501 gdb_cv_c_long_long=yes
12502else
81ecdfbb 12503 gdb_cv_c_long_long=no
97bf5e38 12504fi
81ecdfbb 12505rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 12506fi
81ecdfbb
RW
12507{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
12508$as_echo "$gdb_cv_c_long_long" >&6; }
74a0d9f6
JK
12509if test $gdb_cv_c_long_long != yes; then
12510 # libdecnumber requires long long.
12511 as_fn_error "Compiler must support long long for GDB." "$LINENO" 5
97bf5e38
MK
12512fi
12513
bc8bcb4b 12514# Check if the compiler and runtime support printing long longs.
97bf5e38 12515
81ecdfbb
RW
12516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
12517$as_echo_n "checking for long long support in printf... " >&6; }
12518if test "${gdb_cv_printf_has_long_long+set}" = set; then :
12519 $as_echo_n "(cached) " >&6
97bf5e38 12520else
81ecdfbb 12521 if test "$cross_compiling" = yes; then :
97bf5e38
MK
12522 gdb_cv_printf_has_long_long=no
12523else
81ecdfbb 12524 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12525/* end confdefs.h. */
bc8bcb4b
MK
12526$ac_includes_default
12527int
12528main ()
12529{
12530char buf[32];
97bf5e38
MK
12531 long long l = 0;
12532 l = (l << 16) + 0x0123;
12533 l = (l << 16) + 0x4567;
12534 l = (l << 16) + 0x89ab;
12535 l = (l << 16) + 0xcdef;
12536 sprintf (buf, "0x%016llx", l);
12537 return (strcmp ("0x0123456789abcdef", buf));
bc8bcb4b
MK
12538 ;
12539 return 0;
c906108c 12540}
bec39cab 12541_ACEOF
81ecdfbb 12542if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
12543 gdb_cv_printf_has_long_long=yes
12544else
81ecdfbb 12545 gdb_cv_printf_has_long_long=no
97bf5e38 12546fi
81ecdfbb
RW
12547rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12548 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 12549fi
81ecdfbb 12550
97bf5e38 12551fi
81ecdfbb
RW
12552{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
12553$as_echo "$gdb_cv_printf_has_long_long" >&6; }
97bf5e38 12554if test $gdb_cv_printf_has_long_long = yes; then
bc8bcb4b 12555
81ecdfbb 12556$as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
97bf5e38
MK
12557
12558fi
97bf5e38 12559
1a619819
LM
12560# Check if the compiler and runtime support printing decfloats.
12561
81ecdfbb
RW
12562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
12563$as_echo_n "checking for decfloat support in printf... " >&6; }
12564if test "${gdb_cv_printf_has_decfloat+set}" = set; then :
12565 $as_echo_n "(cached) " >&6
1a619819 12566else
81ecdfbb 12567 if test "$cross_compiling" = yes; then :
1a619819
LM
12568 gdb_cv_printf_has_decfloat=no
12569else
81ecdfbb 12570 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1a619819
LM
12571/* end confdefs.h. */
12572$ac_includes_default
12573int
12574main ()
12575{
12576char buf[64];
12577 _Decimal32 d32 = 1.2345df;
12578 _Decimal64 d64 = 1.2345dd;
12579 _Decimal128 d128 = 1.2345dl;
12580 sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
12581 return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
12582 ;
12583 return 0;
12584}
12585_ACEOF
81ecdfbb 12586if ac_fn_c_try_run "$LINENO"; then :
1a619819
LM
12587 gdb_cv_printf_has_decfloat=yes
12588else
81ecdfbb 12589 gdb_cv_printf_has_decfloat=no
1a619819 12590fi
81ecdfbb
RW
12591rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12592 conftest.$ac_objext conftest.beam conftest.$ac_ext
1a619819 12593fi
81ecdfbb 12594
1a619819 12595fi
81ecdfbb
RW
12596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
12597$as_echo "$gdb_cv_printf_has_decfloat" >&6; }
1a619819
LM
12598if test $gdb_cv_printf_has_decfloat = yes; then
12599
81ecdfbb 12600$as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
1a619819
LM
12601
12602fi
12603
bc8bcb4b
MK
12604# Check if the compiler supports the `long double' type. We can't use
12605# AC_C_LONG_DOUBLE because that one does additional checks on the
12606# constants defined in <float.h> that fail on some systems,
12607# e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
97bf5e38 12608
81ecdfbb
RW
12609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
12610$as_echo_n "checking for long double support in compiler... " >&6; }
12611if test "${gdb_cv_c_long_double+set}" = set; then :
12612 $as_echo_n "(cached) " >&6
97bf5e38 12613else
81ecdfbb 12614 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12615/* end confdefs.h. */
97bf5e38 12616long double foo;
bec39cab 12617_ACEOF
81ecdfbb 12618if ac_fn_c_try_compile "$LINENO"; then :
bc8bcb4b 12619 gdb_cv_c_long_double=yes
97bf5e38 12620else
81ecdfbb 12621 gdb_cv_c_long_double=no
97bf5e38 12622fi
81ecdfbb 12623rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 12624fi
81ecdfbb
RW
12625{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
12626$as_echo "$gdb_cv_c_long_double" >&6; }
bc8bcb4b 12627if test $gdb_cv_c_long_double = yes; then
c906108c 12628
81ecdfbb 12629$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
12630
12631fi
12632
bc8bcb4b 12633# Check if the compiler and runtime support printing long doubles.
97bf5e38 12634
81ecdfbb
RW
12635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
12636$as_echo_n "checking for long double support in printf... " >&6; }
12637if test "${gdb_cv_printf_has_long_double+set}" = set; then :
12638 $as_echo_n "(cached) " >&6
97bf5e38 12639else
81ecdfbb 12640 if test "$cross_compiling" = yes; then :
97bf5e38
MK
12641 gdb_cv_printf_has_long_double=no
12642else
81ecdfbb 12643 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12644/* end confdefs.h. */
bc8bcb4b
MK
12645$ac_includes_default
12646int
12647main ()
12648{
12649char buf[16];
97bf5e38
MK
12650 long double f = 3.141592653;
12651 sprintf (buf, "%Lg", f);
12652 return (strncmp ("3.14159", buf, 7));
bc8bcb4b
MK
12653 ;
12654 return 0;
97bf5e38 12655}
bec39cab 12656_ACEOF
81ecdfbb 12657if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 12658 gdb_cv_printf_has_long_double=yes
c906108c 12659else
81ecdfbb 12660 gdb_cv_printf_has_long_double=no
c906108c 12661fi
81ecdfbb
RW
12662rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12663 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 12664fi
81ecdfbb 12665
c906108c 12666fi
81ecdfbb
RW
12667{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
12668$as_echo "$gdb_cv_printf_has_long_double" >&6; }
97bf5e38 12669if test $gdb_cv_printf_has_long_double = yes; then
bc8bcb4b 12670
81ecdfbb 12671$as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
12672
12673fi
97bf5e38 12674
bc8bcb4b 12675# Check if the compiler and runtime support scanning long doubles.
97bf5e38 12676
81ecdfbb
RW
12677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
12678$as_echo_n "checking for long double support in scanf... " >&6; }
12679if test "${gdb_cv_scanf_has_long_double+set}" = set; then :
12680 $as_echo_n "(cached) " >&6
97bf5e38 12681else
81ecdfbb 12682 if test "$cross_compiling" = yes; then :
97bf5e38
MK
12683 gdb_cv_scanf_has_long_double=no
12684else
81ecdfbb 12685 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12686/* end confdefs.h. */
bc8bcb4b
MK
12687#include <stdio.h>
12688int
12689main ()
12690{
12691char *buf = "3.141592653";
97bf5e38
MK
12692 long double f = 0;
12693 sscanf (buf, "%Lg", &f);
12694 return !(f > 3.14159 && f < 3.14160);
bc8bcb4b
MK
12695 ;
12696 return 0;
97bf5e38 12697}
bec39cab 12698_ACEOF
81ecdfbb 12699if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
12700 gdb_cv_scanf_has_long_double=yes
12701else
81ecdfbb 12702 gdb_cv_scanf_has_long_double=no
97bf5e38 12703fi
81ecdfbb
RW
12704rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12705 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 12706fi
81ecdfbb 12707
c906108c 12708fi
81ecdfbb
RW
12709{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
12710$as_echo "$gdb_cv_scanf_has_long_double" >&6; }
97bf5e38 12711if test $gdb_cv_scanf_has_long_double = yes; then
bc8bcb4b 12712
81ecdfbb 12713$as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
12714
12715fi
c906108c 12716
438013df
AO
12717case ${host_os} in
12718aix*)
81ecdfbb
RW
12719 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
12720$as_echo_n "checking for -bbigtoc option... " >&6; }
12721if test "${gdb_cv_bigtoc+set}" = set; then :
12722 $as_echo_n "(cached) " >&6
438013df 12723else
bec39cab 12724
438013df
AO
12725 SAVE_LDFLAGS=$LDFLAGS
12726
12727 case $GCC in
12728 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
12729 *) gdb_cv_bigtoc=-bbigtoc ;;
12730 esac
12731
12732 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
81ecdfbb 12733 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12734/* end confdefs.h. */
438013df 12735
bec39cab
AC
12736int
12737main ()
12738{
438013df 12739int i;
bec39cab
AC
12740 ;
12741 return 0;
12742}
12743_ACEOF
81ecdfbb 12744if ac_fn_c_try_link "$LINENO"; then :
bec39cab 12745
81ecdfbb
RW
12746else
12747 gdb_cv_bigtoc=
438013df 12748fi
81ecdfbb
RW
12749rm -f core conftest.err conftest.$ac_objext \
12750 conftest$ac_exeext conftest.$ac_ext
ec76baa5 12751 LDFLAGS="${SAVE_LDFLAGS}"
438013df 12752
bec39cab 12753fi
81ecdfbb
RW
12754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
12755$as_echo "$gdb_cv_bigtoc" >&6; }
438013df
AO
12756 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
12757 ;;
12758esac
12759
38f6b338 12760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
f6528abd 12761$as_echo_n "checking for the dynamic export flag... " >&6; }
38f6b338
JK
12762dynamic_list=false
12763if test "${gdb_native}" = yes; then
12764 # The dynamically loaded libthread_db needs access to symbols in the gdb
12765 # executable. Older GNU ld supports --export-dynamic but --dynamic-list
12766 # may not be supported there.
12767 old_LDFLAGS="$LDFLAGS"
12768 # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
12769 RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
12770 LDFLAGS="$LDFLAGS $RDYNAMIC"
12771 if test "${have_libpython}" = no; then
12772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f6528abd
JK
12773/* end confdefs.h. */
12774
12775int
12776main ()
12777{
12778
12779 ;
12780 return 0;
12781}
12782_ACEOF
12783if ac_fn_c_try_link "$LINENO"; then :
3bebe2f2
JK
12784 dynamic_list=true
12785fi
12786rm -f core conftest.err conftest.$ac_objext \
12787 conftest$ac_exeext conftest.$ac_ext
38f6b338
JK
12788 else
12789 # Workaround http://bugs.python.org/issue4434 where static
12790 # libpythonX.Y.a would get its symbols required for
12791 # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
12792 # Problem does not happen for the recommended libpythonX.Y.so linkage.
12793 old_CFLAGS="$CFLAGS"
12794 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
8c1fb155
JK
12795 old_LIBS="$LIBS"
12796 LIBS="$LIBS $PYTHON_LIBS"
38f6b338 12797 if test "$cross_compiling" = yes; then :
3bebe2f2 12798 true
f6528abd 12799else
3bebe2f2
JK
12800 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12801/* end confdefs.h. */
12802#include "${have_libpython}/Python.h"
12803int
12804main ()
12805{
12806int err;
38f6b338
JK
12807 Py_Initialize ();
12808 err = PyRun_SimpleString ("import itertools\n");
12809 Py_Finalize ();
12810 return err == 0 ? 0 : 1;
3bebe2f2
JK
12811 ;
12812 return 0;
12813}
12814_ACEOF
12815if ac_fn_c_try_run "$LINENO"; then :
12816 dynamic_list=true
12817fi
12818rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12819 conftest.$ac_objext conftest.beam conftest.$ac_ext
12820fi
12821
8c1fb155 12822 LIBS="$old_LIBS"
38f6b338
JK
12823 CFLAGS="$old_CFLAGS"
12824 fi
12825 LDFLAGS="$old_LDFLAGS"
12826fi
12827if $dynamic_list; then
12828 found="-Wl,--dynamic-list"
12829 RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
f6528abd 12830else
38f6b338
JK
12831 found="-rdynamic"
12832 RDYNAMIC="-rdynamic"
f6528abd 12833fi
f6528abd 12834
38f6b338 12835{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
f6528abd 12836$as_echo "$found" >&6; }
0407b3f1 12837
f6528abd 12838
0407b3f1 12839if test ${build} = ${host} -a ${host} = ${target} ; then
c906108c 12840 case ${host_os} in
c906108c 12841 solaris*)
d92419e5
JB
12842 # See if thread_db library is around for Solaris thread debugging.
12843 # Note that we must explicitly test for version 1 of the library
12844 # because version 0 (present on Solaris 2.4 or earlier) doesn't have
12845 # the same API.
81ecdfbb
RW
12846 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris thread debugging library" >&5
12847$as_echo_n "checking for Solaris thread debugging library... " >&6; }
c906108c 12848 if test -f /usr/lib/libthread_db.so.1 ; then
81ecdfbb
RW
12849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12850$as_echo "yes" >&6; }
60ca704f 12851
81ecdfbb 12852$as_echo "#define HAVE_THREAD_DB_LIB 1" >>confdefs.h
c906108c 12853
3483b318 12854 CONFIG_OBS="${CONFIG_OBS} sol-thread.o"
c906108c 12855 CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
81ecdfbb
RW
12856 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
12857$as_echo_n "checking for dlopen in -ldl... " >&6; }
12858if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
12859 $as_echo_n "(cached) " >&6
c906108c 12860else
bec39cab 12861 ac_check_lib_save_LIBS=$LIBS
c906108c 12862LIBS="-ldl $LIBS"
81ecdfbb 12863cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
12864/* end confdefs.h. */
12865
81ecdfbb
RW
12866/* Override any GCC internal prototype to avoid an error.
12867 Use char because int might match the return type of a GCC
12868 builtin and then its argument prototype would still apply. */
bec39cab
AC
12869#ifdef __cplusplus
12870extern "C"
12871#endif
bec39cab
AC
12872char dlopen ();
12873int
12874main ()
12875{
81ecdfbb 12876return dlopen ();
bec39cab
AC
12877 ;
12878 return 0;
12879}
12880_ACEOF
81ecdfbb 12881if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
12882 ac_cv_lib_dl_dlopen=yes
12883else
81ecdfbb 12884 ac_cv_lib_dl_dlopen=no
bec39cab 12885fi
81ecdfbb
RW
12886rm -f core conftest.err conftest.$ac_objext \
12887 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
12888LIBS=$ac_check_lib_save_LIBS
12889fi
81ecdfbb
RW
12890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
12891$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
12892if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
bec39cab
AC
12893 cat >>confdefs.h <<_ACEOF
12894#define HAVE_LIBDL 1
12895_ACEOF
c906108c
SS
12896
12897 LIBS="-ldl $LIBS"
12898
c906108c
SS
12899fi
12900
f6528abd 12901 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} $RDYNAMIC"
c906108c
SS
12902 # Sun randomly tweaked the prototypes in <proc_service.h>
12903 # at one point.
81ecdfbb
RW
12904 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if <proc_service.h> is old" >&5
12905$as_echo_n "checking if <proc_service.h> is old... " >&6; }
12906 if test "${gdb_cv_proc_service_is_old+set}" = set; then :
12907 $as_echo_n "(cached) " >&6
c906108c 12908else
bec39cab 12909
81ecdfbb 12910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12911/* end confdefs.h. */
c906108c
SS
12912
12913 #include <proc_service.h>
12914 ps_err_e ps_pdwrite
12915 (struct ps_prochandle*, psaddr_t, const void*, size_t);
c906108c 12916
bec39cab
AC
12917int
12918main ()
12919{
12920
12921 ;
12922 return 0;
12923}
12924_ACEOF
81ecdfbb 12925if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
12926 gdb_cv_proc_service_is_old=no
12927else
81ecdfbb 12928 gdb_cv_proc_service_is_old=yes
c906108c 12929fi
81ecdfbb 12930rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 12931
c906108c
SS
12932fi
12933
81ecdfbb
RW
12934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_proc_service_is_old" >&5
12935$as_echo "$gdb_cv_proc_service_is_old" >&6; }
c906108c 12936 if test $gdb_cv_proc_service_is_old = yes; then
60ca704f 12937
81ecdfbb 12938$as_echo "#define PROC_SERVICE_IS_OLD 1" >>confdefs.h
c906108c
SS
12939
12940 fi
12941 else
81ecdfbb
RW
12942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12943$as_echo "no" >&6; }
c906108c
SS
12944 fi
12945 ;;
d92419e5 12946 aix*)
81ecdfbb
RW
12947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
12948$as_echo_n "checking for AiX thread debugging library... " >&6; }
12949 if test "${gdb_cv_have_aix_thread_debug+set}" = set; then :
12950 $as_echo_n "(cached) " >&6
bec39cab 12951else
81ecdfbb 12952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12953/* end confdefs.h. */
d92419e5 12954#include <sys/pthdebug.h>
bec39cab
AC
12955int
12956main ()
12957{
d92419e5
JB
12958#ifndef PTHDB_VERSION_3
12959 #error
12960 #endif
bec39cab
AC
12961 ;
12962 return 0;
12963}
12964_ACEOF
81ecdfbb 12965if ac_fn_c_try_compile "$LINENO"; then :
d92419e5
JB
12966 gdb_cv_have_aix_thread_debug=yes
12967else
81ecdfbb 12968 gdb_cv_have_aix_thread_debug=no
d92419e5 12969fi
81ecdfbb 12970rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d92419e5
JB
12971fi
12972
81ecdfbb
RW
12973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
12974$as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
d92419e5
JB
12975 if test $gdb_cv_have_aix_thread_debug = yes; then
12976 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
3483b318 12977 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
7f533142 12978 LIBS="$LIBS -lpthdebug"
d645e32e
JB
12979
12980 # Older versions of AIX do not provide the declaration for
12981 # the getthrds function (it appears that it was introduced
12982 # with AIX 6.x).
12983 ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h>
12984"
12985if test "x$ac_cv_have_decl_getthrds" = x""yes; then :
12986 ac_have_decl=1
12987else
12988 ac_have_decl=0
12989fi
12990
12991cat >>confdefs.h <<_ACEOF
12992#define HAVE_DECL_GETTHRDS $ac_have_decl
12993_ACEOF
12994
d92419e5
JB
12995 fi
12996 ;;
c906108c 12997 esac
bec39cab 12998
c906108c
SS
12999fi
13000
3f47be5c 13001if test "x$ac_cv_header_thread_db_h" = "xyes"; then
81ecdfbb
RW
13002 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
13003$as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
13004if test "${gdb_cv_thread_db_h_has_td_notalloc+set}" = set; then :
13005 $as_echo_n "(cached) " >&6
bec39cab 13006else
81ecdfbb 13007 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13008/* end confdefs.h. */
3f47be5c 13009#include <thread_db.h>
bec39cab
AC
13010int
13011main ()
13012{
3f47be5c 13013int i = TD_NOTALLOC;
bec39cab
AC
13014 ;
13015 return 0;
13016}
13017_ACEOF
81ecdfbb 13018if ac_fn_c_try_compile "$LINENO"; then :
3f47be5c
EZ
13019 gdb_cv_thread_db_h_has_td_notalloc=yes
13020else
81ecdfbb 13021 gdb_cv_thread_db_h_has_td_notalloc=no
bec39cab 13022
3f47be5c 13023fi
81ecdfbb 13024rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3f47be5c 13025
bec39cab 13026fi
81ecdfbb
RW
13027{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
13028$as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
13029 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
13030$as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
13031if test "${gdb_cv_thread_db_h_has_td_version+set}" = set; then :
13032 $as_echo_n "(cached) " >&6
59f80f10 13033else
81ecdfbb 13034 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
13035/* end confdefs.h. */
13036#include <thread_db.h>
13037int
13038main ()
13039{
13040int i = TD_VERSION;
13041 ;
13042 return 0;
13043}
13044_ACEOF
81ecdfbb 13045if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
13046 gdb_cv_thread_db_h_has_td_version=yes
13047else
81ecdfbb 13048 gdb_cv_thread_db_h_has_td_version=no
59f80f10
DJ
13049
13050fi
81ecdfbb 13051rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
13052
13053fi
81ecdfbb
RW
13054{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
13055$as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
13056 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
13057$as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
13058if test "${gdb_cv_thread_db_h_has_td_notls+set}" = set; then :
13059 $as_echo_n "(cached) " >&6
59f80f10 13060else
81ecdfbb 13061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
13062/* end confdefs.h. */
13063#include <thread_db.h>
13064int
13065main ()
13066{
13067int i = TD_NOTLS;
13068 ;
13069 return 0;
13070}
13071_ACEOF
81ecdfbb 13072if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
13073 gdb_cv_thread_db_h_has_td_notls=yes
13074else
81ecdfbb 13075 gdb_cv_thread_db_h_has_td_notls=no
59f80f10
DJ
13076
13077fi
81ecdfbb 13078rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
13079
13080fi
81ecdfbb
RW
13081{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
13082$as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
3f47be5c
EZ
13083fi
13084if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
bec39cab 13085
81ecdfbb 13086$as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
3f47be5c 13087
59f80f10
DJ
13088fi
13089if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
13090
81ecdfbb 13091$as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
59f80f10
DJ
13092
13093fi
13094if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
13095
81ecdfbb 13096$as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
59f80f10 13097
3f47be5c
EZ
13098fi
13099
b757528f 13100if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then
81ecdfbb
RW
13101 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/syscall.h> has __NR_tkill" >&5
13102$as_echo_n "checking whether <sys/syscall.h> has __NR_tkill... " >&6; }
13103if test "${gdb_cv_sys_syscall_h_has_tkill+set}" = set; then :
13104 $as_echo_n "(cached) " >&6
bec39cab 13105else
81ecdfbb 13106 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13107/* end confdefs.h. */
b757528f 13108#include <sys/syscall.h>
bec39cab
AC
13109int
13110main ()
13111{
b757528f 13112int i = __NR_tkill;
bec39cab
AC
13113 ;
13114 return 0;
13115}
13116_ACEOF
81ecdfbb 13117if ac_fn_c_try_compile "$LINENO"; then :
b757528f
JJ
13118 gdb_cv_sys_syscall_h_has_tkill=yes
13119else
81ecdfbb 13120 gdb_cv_sys_syscall_h_has_tkill=no
bec39cab 13121
b757528f 13122fi
81ecdfbb 13123rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b757528f 13124
bec39cab 13125fi
81ecdfbb
RW
13126{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_sys_syscall_h_has_tkill" >&5
13127$as_echo "$gdb_cv_sys_syscall_h_has_tkill" >&6; }
b757528f 13128fi
99c1d451
TT
13129if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes"; then
13130 ac_fn_c_check_func "$LINENO" "syscall" "ac_cv_func_syscall"
13131if test "x$ac_cv_func_syscall" = x""yes; then :
bec39cab 13132
81ecdfbb 13133$as_echo "#define HAVE_TKILL_SYSCALL 1" >>confdefs.h
b757528f 13134
99c1d451
TT
13135
13136fi
13137
b757528f
JJ
13138fi
13139
81ecdfbb
RW
13140ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
13141"
13142if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = x""yes; then :
13143 ac_have_decl=1
10568435 13144else
81ecdfbb 13145 ac_have_decl=0
10568435 13146fi
10568435
JK
13147
13148cat >>confdefs.h <<_ACEOF
81ecdfbb 13149#define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
10568435
JK
13150_ACEOF
13151
13152
81ecdfbb
RW
13153if test "$cross_compiling" = yes; then :
13154 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
13155/* end confdefs.h. */
13156#include <sys/personality.h>
13157int
13158main ()
13159{
13160
13161# if !HAVE_DECL_ADDR_NO_RANDOMIZE
13162# define ADDR_NO_RANDOMIZE 0x0040000
13163# endif
13164 /* Test the flag could be set and stays set. */
13165 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
13166 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
13167 return 1
13168 ;
13169 return 0;
13170}
13171_ACEOF
81ecdfbb 13172if ac_fn_c_try_link "$LINENO"; then :
10568435
JK
13173 have_personality=true
13174else
81ecdfbb 13175 have_personality=false
10568435 13176fi
81ecdfbb
RW
13177rm -f core conftest.err conftest.$ac_objext \
13178 conftest$ac_exeext conftest.$ac_ext
10568435 13179else
81ecdfbb 13180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
13181/* end confdefs.h. */
13182#include <sys/personality.h>
13183int
13184main ()
13185{
13186
13187# if !HAVE_DECL_ADDR_NO_RANDOMIZE
13188# define ADDR_NO_RANDOMIZE 0x0040000
13189# endif
13190 /* Test the flag could be set and stays set. */
13191 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
13192 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
13193 return 1
13194 ;
13195 return 0;
13196}
13197_ACEOF
81ecdfbb 13198if ac_fn_c_try_run "$LINENO"; then :
10568435
JK
13199 have_personality=true
13200else
81ecdfbb 13201 have_personality=false
10568435 13202fi
81ecdfbb
RW
13203rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13204 conftest.$ac_objext conftest.beam conftest.$ac_ext
10568435 13205fi
81ecdfbb 13206
10568435
JK
13207if $have_personality
13208then
13209
81ecdfbb 13210$as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
10568435
JK
13211
13212fi
13213
e655c1a2
PA
13214case $host_os in
13215 go32* | *djgpp*)
13216 gdbinit=gdb.ini
13217 ;;
13218 *)
13219 gdbinit=.gdbinit
13220 ;;
13221esac
13222
13223cat >>confdefs.h <<_ACEOF
13224#define GDBINIT "$gdbinit"
13225_ACEOF
13226
13227
fb40c209 13228
f83d8a90
DE
13229# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
13230# except that the argument to --with-sysroot is optional.
13231# --with-sysroot (or --with-sysroot=yes) sets the default sysroot path.
13232if test "x$with_sysroot" = xyes; then
13233 with_sysroot="${exec_prefix}/${target_alias}/sys-root"
13234fi
bec39cab 13235
81ecdfbb
RW
13236# Check whether --with-sysroot was given.
13237if test "${with_sysroot+set}" = set; then :
f83d8a90
DE
13238 withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval
13239else
13240 TARGET_SYSTEM_ROOT=
13241fi
030292b7 13242
030292b7 13243
f83d8a90
DE
13244 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
13245 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
13246 ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT`
13247 ac_define_dir=`eval echo $ac_define_dir`
030292b7 13248
f83d8a90
DE
13249cat >>confdefs.h <<_ACEOF
13250#define TARGET_SYSTEM_ROOT "$ac_define_dir"
13251_ACEOF
bec39cab 13252
030292b7 13253
b14b1491 13254
f83d8a90
DE
13255
13256 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
13257 if test "x$prefix" = xNONE; then
13258 test_prefix=/usr/local
13259 else
13260 test_prefix=$prefix
13261 fi
13262 else
13263 test_prefix=$exec_prefix
13264 fi
13265 value=0
13266 case ${ac_define_dir} in
13267 "${test_prefix}"|"${test_prefix}/"*|\
13268 '${exec_prefix}'|'${exec_prefix}/'*)
13269 value=1
13270 ;;
13271 esac
13272
13273cat >>confdefs.h <<_ACEOF
13274#define TARGET_SYSTEM_ROOT_RELOCATABLE $value
13275_ACEOF
030292b7
DJ
13276
13277
13278
16e7150e 13279
16e7150e 13280
81ecdfbb
RW
13281# Check whether --with-system-gdbinit was given.
13282if test "${with_system_gdbinit+set}" = set; then :
13283 withval=$with_system_gdbinit;
b14b1491
TT
13284 SYSTEM_GDBINIT=$withval
13285else
13286 SYSTEM_GDBINIT=
81ecdfbb
RW
13287fi
13288
16e7150e
JG
13289
13290 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
13291 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 13292 ac_define_dir=`eval echo $SYSTEM_GDBINIT`
16e7150e
JG
13293 ac_define_dir=`eval echo $ac_define_dir`
13294
13295cat >>confdefs.h <<_ACEOF
13296#define SYSTEM_GDBINIT "$ac_define_dir"
13297_ACEOF
13298
13299
13300
0c4a4063 13301
b14b1491
TT
13302 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
13303 if test "x$prefix" = xNONE; then
13304 test_prefix=/usr/local
13305 else
13306 test_prefix=$prefix
13307 fi
13308 else
13309 test_prefix=$exec_prefix
13310 fi
13311 value=0
13312 case ${ac_define_dir} in
13313 "${test_prefix}"|"${test_prefix}/"*|\
13314 '${exec_prefix}'|'${exec_prefix}/'*)
13315 value=1
13316 ;;
13317 esac
16e7150e 13318
b14b1491
TT
13319cat >>confdefs.h <<_ACEOF
13320#define SYSTEM_GDBINIT_RELOCATABLE $value
16e7150e
JG
13321_ACEOF
13322
b14b1491 13323
16e7150e 13324
0c4a4063 13325
81ecdfbb
RW
13326# Check whether --enable-werror was given.
13327if test "${enable_werror+set}" = set; then :
13328 enableval=$enable_werror; case "${enableval}" in
094a342e
MK
13329 yes | y) ERROR_ON_WARNING="yes" ;;
13330 no | n) ERROR_ON_WARNING="no" ;;
81ecdfbb 13331 *) as_fn_error "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
094a342e 13332 esac
81ecdfbb
RW
13333fi
13334
094a342e 13335
3bc3d82a
PA
13336# Enable -Werror by default when using gcc in C mode. Leave it off
13337# for C++ until we're warning clean. Turn it off for releases.
13338if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" \
13339 && test x"$enable_build_with_cxx" != x"yes" \
13340 && $development; then
094a342e
MK
13341 ERROR_ON_WARNING=yes
13342fi
13343
13344WERROR_CFLAGS=""
13345if test "${ERROR_ON_WARNING}" = yes ; then
13346 WERROR_CFLAGS="-Werror"
13347fi
13348
3bc3d82a 13349# These options work in either C or C++ modes.
aac331e4 13350build_warnings="-Wall -Wpointer-arith \
1cb5e2a4 13351-Wno-unused -Wunused-value -Wunused-function \
aac331e4
PA
13352-Wno-switch -Wno-char-subscripts \
13353-Wempty-body"
a3b362c4 13354
3bc3d82a
PA
13355# Now add in C and C++ specific options, depending on mode.
13356if test "$enable_build_with_cxx" = "yes"; then
13357 build_warnings="$build_warnings -Wno-sign-compare -Wno-write-strings \
13358-Wno-narrowing"
13359else
aac331e4
PA
13360 build_warnings="$build_warnings -Wpointer-sign -Wmissing-prototypes \
13361-Wdeclaration-after-statement -Wmissing-parameter-type \
13362-Wold-style-declaration -Wold-style-definition"
3bc3d82a
PA
13363fi
13364
3526781e
DJ
13365# Enable -Wno-format by default when using gcc on mingw since many
13366# GCC versions complain about %I64.
13367case "${host}" in
13368 *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;;
d3685d60 13369 *) build_warnings="$build_warnings -Wformat-nonliteral" ;;
3526781e
DJ
13370esac
13371
81ecdfbb
RW
13372# Check whether --enable-build-warnings was given.
13373if test "${enable_build_warnings+set}" = set; then :
13374 enableval=$enable_build_warnings; case "${enableval}" in
c906108c
SS
13375 yes) ;;
13376 no) build_warnings="-w";;
13377 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
13378 build_warnings="${build_warnings} ${t}";;
13379 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
13380 build_warnings="${t} ${build_warnings}";;
13381 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
13382esac
d4f3574e 13383if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 13384 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 13385fi
81ecdfbb
RW
13386fi
13387# Check whether --enable-gdb-build-warnings was given.
13388if test "${enable_gdb_build_warnings+set}" = set; then :
13389 enableval=$enable_gdb_build_warnings; case "${enableval}" in
3b851bce
AC
13390 yes) ;;
13391 no) build_warnings="-w";;
13392 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
13393 build_warnings="${build_warnings} ${t}";;
13394 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
13395 build_warnings="${t} ${build_warnings}";;
13396 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
13397esac
13398if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
13399 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
13400fi
81ecdfbb 13401fi
3bc3d82a
PA
13402
13403# The set of warnings supported by a C++ compiler is not the same as
13404# of the C compiler.
13405if test "$enable_build_with_cxx" = "yes"; then
13406 ac_ext=cpp
13407ac_cpp='$CXXCPP $CPPFLAGS'
13408ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13409ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13410ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
13411
13412fi
13413
81ecdfbb 13414WARN_CFLAGS=""
c906108c
SS
13415if test "x${build_warnings}" != x -a "x$GCC" = xyes
13416then
81ecdfbb
RW
13417 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
13418$as_echo_n "checking compiler warning flags... " >&6; }
746a987d
AC
13419 # Separate out the -Werror flag as some files just cannot be
13420 # compiled with it enabled.
13421 for w in ${build_warnings}; do
13422 case $w in
13423 -Werr*) WERROR_CFLAGS=-Werror ;;
3bc3d82a
PA
13424 *)
13425 # Check whether GCC accepts it.
4536bbc6
AC
13426 saved_CFLAGS="$CFLAGS"
13427 CFLAGS="$CFLAGS $w"
3bc3d82a
PA
13428 saved_CXXFLAGS="$CXXFLAGS"
13429 CXXFLAGS="$CXXFLAGS $w"
13430
13431cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13432/* end confdefs.h. */
4536bbc6 13433
bec39cab
AC
13434int
13435main ()
13436{
4536bbc6 13437
bec39cab
AC
13438 ;
13439 return 0;
13440}
13441_ACEOF
3bc3d82a 13442if ac_fn_cxx_try_compile "$LINENO"; then :
4536bbc6 13443 WARN_CFLAGS="${WARN_CFLAGS} $w"
4536bbc6 13444fi
81ecdfbb 13445rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4536bbc6 13446 CFLAGS="$saved_CFLAGS"
3bc3d82a 13447 CXXFLAGS="$saved_CXXFLAGS"
746a987d
AC
13448 esac
13449 done
81ecdfbb
RW
13450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
13451$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
c906108c
SS
13452fi
13453
13454
104c1213 13455
3bc3d82a
PA
13456if test "$enable_build_with_cxx" = "yes"; then
13457 ac_ext=c
13458ac_cpp='$CPP $CPPFLAGS'
13459ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13460ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13461ac_compiler_gnu=$ac_cv_c_compiler_gnu
13462
13463fi
13464
7a292a7a 13465# In the Cygwin environment, we need some additional flags.
81ecdfbb
RW
13466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
13467$as_echo_n "checking for cygwin... " >&6; }
13468if test "${gdb_cv_os_cygwin+set}" = set; then :
13469 $as_echo_n "(cached) " >&6
bec39cab 13470else
81ecdfbb 13471 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13472/* end confdefs.h. */
7a292a7a
SS
13473
13474#if defined (__CYGWIN__) || defined (__CYGWIN32__)
13475lose
13476#endif
bec39cab 13477_ACEOF
7a292a7a 13478if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
92a021de 13479 $EGREP "^lose$" >/dev/null 2>&1; then :
7a292a7a
SS
13480 gdb_cv_os_cygwin=yes
13481else
7a292a7a
SS
13482 gdb_cv_os_cygwin=no
13483fi
13484rm -f conftest*
13485
13486fi
81ecdfbb
RW
13487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
13488$as_echo "$gdb_cv_os_cygwin" >&6; }
7a292a7a 13489
aff38e61 13490
3eb25fda 13491SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
aff38e61 13492case ${host} in
95cbc983
AC
13493 *go32* ) SER_HARDWIRE=ser-go32.o ;;
13494 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
0ea3f30e 13495 *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
aff38e61
AC
13496esac
13497
13498
cd0fc7c3
SS
13499# libreadline needs libuser32.a in a cygwin environment
13500WIN32LIBS=
13501if test x$gdb_cv_os_cygwin = xyes; then
c5394b80
JM
13502 WIN32LIBS="-luser32"
13503 case "${target}" in
13504 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
13505 ;;
13506 esac
cd0fc7c3 13507fi
c906108c 13508
b4505029
MM
13509# The ser-tcp.c module requires sockets.
13510case ${host} in
13511 *mingw32*)
13512
81ecdfbb 13513$as_echo "#define USE_WIN32API 1" >>confdefs.h
b4505029
MM
13514
13515 WIN32LIBS="$WIN32LIBS -lws2_32"
13516 ;;
13517esac
13518
7a292a7a 13519
31d99776 13520# Add ELF support to GDB, but only if BFD includes ELF support.
def63ff0
TT
13521
13522 OLD_CFLAGS=$CFLAGS
13523 OLD_LDFLAGS=$LDFLAGS
13524 OLD_LIBS=$LIBS
13525 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
13526 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
13527 # always want our bfd.
13528 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
711a72d3 13529 LDFLAGS="-L../bfd -L../libiberty $zlibdir $LDFLAGS"
def63ff0 13530 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
711a72d3 13531 LIBS="-lbfd -liberty -lz $intl $LIBS"
def63ff0 13532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
81ecdfbb
RW
13533$as_echo_n "checking for ELF support in BFD... " >&6; }
13534if test "${gdb_cv_var_elf+set}" = set; then :
13535 $as_echo_n "(cached) " >&6
31d99776 13536else
81ecdfbb 13537 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31d99776
DJ
13538/* end confdefs.h. */
13539#include <stdlib.h>
def63ff0
TT
13540 #include "bfd.h"
13541 #include "elf-bfd.h"
31d99776
DJ
13542
13543int
13544main ()
13545{
def63ff0 13546return bfd_get_elf_phdr_upper_bound (NULL);
31d99776
DJ
13547 ;
13548 return 0;
13549}
13550_ACEOF
81ecdfbb 13551if ac_fn_c_try_link "$LINENO"; then :
31d99776
DJ
13552 gdb_cv_var_elf=yes
13553else
81ecdfbb 13554 gdb_cv_var_elf=no
31d99776 13555fi
81ecdfbb
RW
13556rm -f core conftest.err conftest.$ac_objext \
13557 conftest$ac_exeext conftest.$ac_ext
31d99776 13558fi
81ecdfbb
RW
13559{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
13560$as_echo "$gdb_cv_var_elf" >&6; }
def63ff0
TT
13561 CFLAGS=$OLD_CFLAGS
13562 LDFLAGS=$OLD_LDFLAGS
13563 LIBS=$OLD_LIBS
31d99776 13564if test $gdb_cv_var_elf = yes; then
d4777acb 13565 CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o dtrace-probe.o"
31d99776 13566
81ecdfbb 13567$as_echo "#define HAVE_ELF 1" >>confdefs.h
31d99776 13568
075ff26d
JK
13569 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
13570 if test "$plugins" = "yes"; then
a48b32c0
L
13571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
13572$as_echo_n "checking for library containing dlopen... " >&6; }
13573if test "${ac_cv_search_dlopen+set}" = set; then :
13574 $as_echo_n "(cached) " >&6
13575else
13576 ac_func_search_save_LIBS=$LIBS
13577cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13578/* end confdefs.h. */
13579
13580/* Override any GCC internal prototype to avoid an error.
13581 Use char because int might match the return type of a GCC
13582 builtin and then its argument prototype would still apply. */
13583#ifdef __cplusplus
13584extern "C"
13585#endif
13586char dlopen ();
13587int
13588main ()
13589{
13590return dlopen ();
13591 ;
13592 return 0;
13593}
13594_ACEOF
13595for ac_lib in '' dl; do
13596 if test -z "$ac_lib"; then
13597 ac_res="none required"
13598 else
13599 ac_res=-l$ac_lib
13600 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
13601 fi
13602 if ac_fn_c_try_link "$LINENO"; then :
13603 ac_cv_search_dlopen=$ac_res
13604fi
13605rm -f core conftest.err conftest.$ac_objext \
13606 conftest$ac_exeext
13607 if test "${ac_cv_search_dlopen+set}" = set; then :
13608 break
13609fi
13610done
13611if test "${ac_cv_search_dlopen+set}" = set; then :
13612
13613else
13614 ac_cv_search_dlopen=no
13615fi
13616rm conftest.$ac_ext
13617LIBS=$ac_func_search_save_LIBS
13618fi
13619{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
13620$as_echo "$ac_cv_search_dlopen" >&6; }
13621ac_res=$ac_cv_search_dlopen
13622if test "$ac_res" != no; then :
13623 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13624
13625fi
13626
075ff26d 13627 fi
31d99776 13628fi
31d99776 13629
4f05add4
TT
13630# Add macho support to GDB, but only if BFD includes it.
13631
13632 OLD_CFLAGS=$CFLAGS
13633 OLD_LDFLAGS=$LDFLAGS
13634 OLD_LIBS=$LIBS
13635 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
13636 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
13637 # always want our bfd.
13638 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
711a72d3 13639 LDFLAGS="-L../bfd -L../libiberty $zlibdir $LDFLAGS"
4f05add4 13640 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
711a72d3 13641 LIBS="-lbfd -liberty -lz $intl $LIBS"
4f05add4
TT
13642 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5
13643$as_echo_n "checking for Mach-O support in BFD... " >&6; }
13644if test "${gdb_cv_var_macho+set}" = set; then :
13645 $as_echo_n "(cached) " >&6
13646else
13647 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13648/* end confdefs.h. */
13649#include <stdlib.h>
13650 #include "bfd.h"
13651 #include "mach-o.h"
13652
13653int
13654main ()
13655{
13656return bfd_mach_o_lookup_command (NULL, 0, NULL);
13657 ;
13658 return 0;
13659}
13660_ACEOF
13661if ac_fn_c_try_link "$LINENO"; then :
13662 gdb_cv_var_macho=yes
13663else
13664 gdb_cv_var_macho=no
13665fi
13666rm -f core conftest.err conftest.$ac_objext \
13667 conftest$ac_exeext conftest.$ac_ext
13668fi
13669{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5
13670$as_echo "$gdb_cv_var_macho" >&6; }
13671 CFLAGS=$OLD_CFLAGS
13672 LDFLAGS=$OLD_LDFLAGS
13673 LIBS=$OLD_LIBS
13674if test $gdb_cv_var_macho = yes; then
13675 CONFIG_OBS="$CONFIG_OBS machoread.o"
13676fi
13677
121ce6e5
DJ
13678# Add any host-specific objects to GDB.
13679CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
13680
608e2dbb
TT
13681# If building on ELF, look for lzma support for embedded compressed debug info.
13682if test $gdb_cv_var_elf = yes; then
13683
13684# Check whether --with-lzma was given.
13685if test "${with_lzma+set}" = set; then :
13686 withval=$with_lzma;
13687else
13688 with_lzma=auto
13689fi
13690
13691 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5
13692$as_echo_n "checking whether to use lzma... " >&6; }
13693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5
13694$as_echo "$with_lzma" >&6; }
13695
13696 if test "${with_lzma}" != no; then
13697
13698
13699
13700
13701
13702
13703
13704
13705 use_additional=yes
13706
13707 acl_save_prefix="$prefix"
13708 prefix="$acl_final_prefix"
13709 acl_save_exec_prefix="$exec_prefix"
13710 exec_prefix="$acl_final_exec_prefix"
13711
13712 eval additional_includedir=\"$includedir\"
13713 eval additional_libdir=\"$libdir\"
13714
13715 exec_prefix="$acl_save_exec_prefix"
13716 prefix="$acl_save_prefix"
13717
13718
13719# Check whether --with-liblzma-prefix was given.
13720if test "${with_liblzma_prefix+set}" = set; then :
13721 withval=$with_liblzma_prefix;
13722 if test "X$withval" = "Xno"; then
13723 use_additional=no
13724 else
13725 if test "X$withval" = "X"; then
13726
13727 acl_save_prefix="$prefix"
13728 prefix="$acl_final_prefix"
13729 acl_save_exec_prefix="$exec_prefix"
13730 exec_prefix="$acl_final_exec_prefix"
13731
13732 eval additional_includedir=\"$includedir\"
13733 eval additional_libdir=\"$libdir\"
13734
13735 exec_prefix="$acl_save_exec_prefix"
13736 prefix="$acl_save_prefix"
13737
13738 else
13739 additional_includedir="$withval/include"
13740 additional_libdir="$withval/lib"
13741 fi
13742 fi
13743
13744fi
13745
13746 LIBLZMA=
13747 LTLIBLZMA=
13748 INCLZMA=
13749 rpathdirs=
13750 ltrpathdirs=
13751 names_already_handled=
13752 names_next_round='lzma '
13753 while test -n "$names_next_round"; do
13754 names_this_round="$names_next_round"
13755 names_next_round=
13756 for name in $names_this_round; do
13757 already_handled=
13758 for n in $names_already_handled; do
13759 if test "$n" = "$name"; then
13760 already_handled=yes
13761 break
13762 fi
13763 done
13764 if test -z "$already_handled"; then
13765 names_already_handled="$names_already_handled $name"
13766 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
13767 eval value=\"\$HAVE_LIB$uppername\"
13768 if test -n "$value"; then
13769 if test "$value" = yes; then
13770 eval value=\"\$LIB$uppername\"
13771 test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value"
13772 eval value=\"\$LTLIB$uppername\"
13773 test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value"
13774 else
13775 :
13776 fi
13777 else
13778 found_dir=
13779 found_la=
13780 found_so=
13781 found_a=
13782 if test $use_additional = yes; then
13783 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
13784 found_dir="$additional_libdir"
13785 found_so="$additional_libdir/lib$name.$shlibext"
13786 if test -f "$additional_libdir/lib$name.la"; then
13787 found_la="$additional_libdir/lib$name.la"
13788 fi
13789 else
13790 if test -f "$additional_libdir/lib$name.$libext"; then
13791 found_dir="$additional_libdir"
13792 found_a="$additional_libdir/lib$name.$libext"
13793 if test -f "$additional_libdir/lib$name.la"; then
13794 found_la="$additional_libdir/lib$name.la"
13795 fi
13796 fi
13797 fi
13798 fi
13799 if test "X$found_dir" = "X"; then
13800 for x in $LDFLAGS $LTLIBLZMA; do
13801
13802 acl_save_prefix="$prefix"
13803 prefix="$acl_final_prefix"
13804 acl_save_exec_prefix="$exec_prefix"
13805 exec_prefix="$acl_final_exec_prefix"
13806 eval x=\"$x\"
13807 exec_prefix="$acl_save_exec_prefix"
13808 prefix="$acl_save_prefix"
13809
13810 case "$x" in
13811 -L*)
13812 dir=`echo "X$x" | sed -e 's/^X-L//'`
13813 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
13814 found_dir="$dir"
13815 found_so="$dir/lib$name.$shlibext"
13816 if test -f "$dir/lib$name.la"; then
13817 found_la="$dir/lib$name.la"
13818 fi
13819 else
13820 if test -f "$dir/lib$name.$libext"; then
13821 found_dir="$dir"
13822 found_a="$dir/lib$name.$libext"
13823 if test -f "$dir/lib$name.la"; then
13824 found_la="$dir/lib$name.la"
13825 fi
13826 fi
13827 fi
13828 ;;
13829 esac
13830 if test "X$found_dir" != "X"; then
13831 break
13832 fi
13833 done
13834 fi
13835 if test "X$found_dir" != "X"; then
13836 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name"
13837 if test "X$found_so" != "X"; then
13838 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
13839 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
13840 else
13841 haveit=
13842 for x in $ltrpathdirs; do
13843 if test "X$x" = "X$found_dir"; then
13844 haveit=yes
13845 break
13846 fi
13847 done
13848 if test -z "$haveit"; then
13849 ltrpathdirs="$ltrpathdirs $found_dir"
13850 fi
13851 if test "$hardcode_direct" = yes; then
13852 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
13853 else
13854 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
13855 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
13856 haveit=
13857 for x in $rpathdirs; do
13858 if test "X$x" = "X$found_dir"; then
13859 haveit=yes
13860 break
13861 fi
13862 done
13863 if test -z "$haveit"; then
13864 rpathdirs="$rpathdirs $found_dir"
13865 fi
13866 else
13867 haveit=
13868 for x in $LDFLAGS $LIBLZMA; do
13869
13870 acl_save_prefix="$prefix"
13871 prefix="$acl_final_prefix"
13872 acl_save_exec_prefix="$exec_prefix"
13873 exec_prefix="$acl_final_exec_prefix"
13874 eval x=\"$x\"
13875 exec_prefix="$acl_save_exec_prefix"
13876 prefix="$acl_save_prefix"
13877
13878 if test "X$x" = "X-L$found_dir"; then
13879 haveit=yes
13880 break
13881 fi
13882 done
13883 if test -z "$haveit"; then
13884 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir"
13885 fi
13886 if test "$hardcode_minus_L" != no; then
13887 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
13888 else
13889 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
13890 fi
13891 fi
13892 fi
13893 fi
13894 else
13895 if test "X$found_a" != "X"; then
13896 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a"
13897 else
13898 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name"
13899 fi
13900 fi
13901 additional_includedir=
13902 case "$found_dir" in
13903 */lib | */lib/)
13904 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
13905 additional_includedir="$basedir/include"
13906 ;;
13907 esac
13908 if test "X$additional_includedir" != "X"; then
13909 if test "X$additional_includedir" != "X/usr/include"; then
13910 haveit=
13911 if test "X$additional_includedir" = "X/usr/local/include"; then
13912 if test -n "$GCC"; then
13913 case $host_os in
13914 linux*) haveit=yes;;
13915 esac
13916 fi
13917 fi
13918 if test -z "$haveit"; then
13919 for x in $CPPFLAGS $INCLZMA; do
13920
13921 acl_save_prefix="$prefix"
13922 prefix="$acl_final_prefix"
13923 acl_save_exec_prefix="$exec_prefix"
13924 exec_prefix="$acl_final_exec_prefix"
13925 eval x=\"$x\"
13926 exec_prefix="$acl_save_exec_prefix"
13927 prefix="$acl_save_prefix"
13928
13929 if test "X$x" = "X-I$additional_includedir"; then
13930 haveit=yes
13931 break
13932 fi
13933 done
13934 if test -z "$haveit"; then
13935 if test -d "$additional_includedir"; then
13936 INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir"
13937 fi
13938 fi
13939 fi
13940 fi
13941 fi
13942 if test -n "$found_la"; then
13943 save_libdir="$libdir"
13944 case "$found_la" in
13945 */* | *\\*) . "$found_la" ;;
13946 *) . "./$found_la" ;;
13947 esac
13948 libdir="$save_libdir"
13949 for dep in $dependency_libs; do
13950 case "$dep" in
13951 -L*)
13952 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
13953 if test "X$additional_libdir" != "X/usr/lib"; then
13954 haveit=
13955 if test "X$additional_libdir" = "X/usr/local/lib"; then
13956 if test -n "$GCC"; then
13957 case $host_os in
13958 linux*) haveit=yes;;
13959 esac
13960 fi
13961 fi
13962 if test -z "$haveit"; then
13963 haveit=
13964 for x in $LDFLAGS $LIBLZMA; do
13965
13966 acl_save_prefix="$prefix"
13967 prefix="$acl_final_prefix"
13968 acl_save_exec_prefix="$exec_prefix"
13969 exec_prefix="$acl_final_exec_prefix"
13970 eval x=\"$x\"
13971 exec_prefix="$acl_save_exec_prefix"
13972 prefix="$acl_save_prefix"
13973
13974 if test "X$x" = "X-L$additional_libdir"; then
13975 haveit=yes
13976 break
13977 fi
13978 done
13979 if test -z "$haveit"; then
13980 if test -d "$additional_libdir"; then
13981 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir"
13982 fi
13983 fi
13984 haveit=
13985 for x in $LDFLAGS $LTLIBLZMA; do
13986
13987 acl_save_prefix="$prefix"
13988 prefix="$acl_final_prefix"
13989 acl_save_exec_prefix="$exec_prefix"
13990 exec_prefix="$acl_final_exec_prefix"
13991 eval x=\"$x\"
13992 exec_prefix="$acl_save_exec_prefix"
13993 prefix="$acl_save_prefix"
13994
13995 if test "X$x" = "X-L$additional_libdir"; then
13996 haveit=yes
13997 break
13998 fi
13999 done
14000 if test -z "$haveit"; then
14001 if test -d "$additional_libdir"; then
14002 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir"
14003 fi
14004 fi
14005 fi
14006 fi
14007 ;;
14008 -R*)
14009 dir=`echo "X$dep" | sed -e 's/^X-R//'`
14010 if test "$enable_rpath" != no; then
14011 haveit=
14012 for x in $rpathdirs; do
14013 if test "X$x" = "X$dir"; then
14014 haveit=yes
14015 break
14016 fi
14017 done
14018 if test -z "$haveit"; then
14019 rpathdirs="$rpathdirs $dir"
14020 fi
14021 haveit=
14022 for x in $ltrpathdirs; do
14023 if test "X$x" = "X$dir"; then
14024 haveit=yes
14025 break
14026 fi
14027 done
14028 if test -z "$haveit"; then
14029 ltrpathdirs="$ltrpathdirs $dir"
14030 fi
14031 fi
14032 ;;
14033 -l*)
14034 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
14035 ;;
14036 *.la)
14037 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
14038 ;;
14039 *)
14040 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep"
14041 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep"
14042 ;;
14043 esac
14044 done
14045 fi
14046 else
14047 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
14048 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name"
14049 fi
14050 fi
14051 fi
14052 done
14053 done
14054 if test "X$rpathdirs" != "X"; then
14055 if test -n "$hardcode_libdir_separator"; then
14056 alldirs=
14057 for found_dir in $rpathdirs; do
14058 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
14059 done
14060 acl_save_libdir="$libdir"
14061 libdir="$alldirs"
14062 eval flag=\"$hardcode_libdir_flag_spec\"
14063 libdir="$acl_save_libdir"
14064 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
14065 else
14066 for found_dir in $rpathdirs; do
14067 acl_save_libdir="$libdir"
14068 libdir="$found_dir"
14069 eval flag=\"$hardcode_libdir_flag_spec\"
14070 libdir="$acl_save_libdir"
14071 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
14072 done
14073 fi
14074 fi
14075 if test "X$ltrpathdirs" != "X"; then
14076 for found_dir in $ltrpathdirs; do
14077 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir"
14078 done
14079 fi
14080
14081
14082 ac_save_CPPFLAGS="$CPPFLAGS"
14083
14084 for element in $INCLZMA; do
14085 haveit=
14086 for x in $CPPFLAGS; do
14087
14088 acl_save_prefix="$prefix"
14089 prefix="$acl_final_prefix"
14090 acl_save_exec_prefix="$exec_prefix"
14091 exec_prefix="$acl_final_exec_prefix"
14092 eval x=\"$x\"
14093 exec_prefix="$acl_save_exec_prefix"
14094 prefix="$acl_save_prefix"
14095
14096 if test "X$x" = "X$element"; then
14097 haveit=yes
14098 break
14099 fi
14100 done
14101 if test -z "$haveit"; then
14102 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
14103 fi
14104 done
14105
14106
14107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5
14108$as_echo_n "checking for liblzma... " >&6; }
14109if test "${ac_cv_liblzma+set}" = set; then :
14110 $as_echo_n "(cached) " >&6
14111else
14112
14113 ac_save_LIBS="$LIBS"
14114 LIBS="$LIBS $LIBLZMA"
14115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14116/* end confdefs.h. */
14117#include "lzma.h"
14118int
14119main ()
14120{
14121lzma_index_iter iter;
14122 lzma_index_iter_init (&iter, 0);
14123 lzma_mf_is_supported (LZMA_MF_HC3);
14124 ;
14125 return 0;
14126}
14127_ACEOF
14128if ac_fn_c_try_link "$LINENO"; then :
14129 ac_cv_liblzma=yes
14130else
14131 ac_cv_liblzma=no
14132fi
14133rm -f core conftest.err conftest.$ac_objext \
14134 conftest$ac_exeext conftest.$ac_ext
14135 LIBS="$ac_save_LIBS"
14136
14137fi
14138{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5
14139$as_echo "$ac_cv_liblzma" >&6; }
14140 if test "$ac_cv_liblzma" = yes; then
14141 HAVE_LIBLZMA=yes
14142
14143$as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h
14144
14145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5
14146$as_echo_n "checking how to link with liblzma... " >&6; }
14147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5
14148$as_echo "$LIBLZMA" >&6; }
14149 else
14150 HAVE_LIBLZMA=no
14151 CPPFLAGS="$ac_save_CPPFLAGS"
14152 LIBLZMA=
14153 LTLIBLZMA=
14154 fi
14155
14156
14157
14158
14159
14160
14161 if test "$HAVE_LIBLZMA" != yes; then
14162 if test "$with_lzma" = yes; then
14163 as_fn_error "missing liblzma for --with-lzma" "$LINENO" 5
14164 fi
14165 fi
14166 fi
14167fi
14168
3fc11d3e
JM
14169LIBGUI="../libgui/src/libgui.a"
14170GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
14171
14172
7a292a7a 14173
3fc11d3e
JM
14174WIN32LDAPP=
14175
14176
14177
d91670b9 14178case "${host}" in
686a5eed 14179*-*-cygwin* | *-*-mingw* )
d91670b9
CV
14180 configdir="win"
14181 ;;
14182*)
14183 configdir="unix"
14184 ;;
14185esac
3fc11d3e
JM
14186
14187GDBTKLIBS=
14188if test "${enable_gdbtk}" = "yes"; then
14189
d1c3b63a
KS
14190 # Gdbtk must have an absolute path to srcdir in order to run
14191 # properly when not installed.
14192 here=`pwd`
14193 cd ${srcdir}
14194 GDBTK_SRC_DIR=`pwd`
14195 cd $here
14196
bec39cab 14197
5062cc19
KS
14198 #
14199 # Ok, lets find the tcl configuration
14200 # First, look for one uninstalled.
14201 # the alternative search directory is invoked by --with-tcl
14202 #
3fc11d3e 14203
5062cc19
KS
14204 if test x"${no_tcl}" = x ; then
14205 # we reset no_tcl in case something fails here
14206 no_tcl=true
bec39cab 14207
81ecdfbb
RW
14208# Check whether --with-tcl was given.
14209if test "${with_tcl+set}" = set; then :
14210 withval=$with_tcl; with_tclconfig=${withval}
14211fi
14212
14213 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
14214$as_echo_n "checking for Tcl configuration... " >&6; }
14215 if test "${ac_cv_c_tclconfig+set}" = set; then :
14216 $as_echo_n "(cached) " >&6
3fc11d3e 14217else
bec39cab 14218
3fc11d3e 14219
5062cc19
KS
14220 # First check to see if --with-tcl was specified.
14221 case "${host}" in
14222 *-*-cygwin*) platDir="win" ;;
14223 *) platDir="unix" ;;
14224 esac
14225 if test x"${with_tclconfig}" != x ; then
14226 if test -f "${with_tclconfig}/tclConfig.sh" ; then
14227 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
14228 else
81ecdfbb 14229 as_fn_error "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
5062cc19
KS
14230 fi
14231 fi
14232
14233 # then check for a private Tcl installation
14234 if test x"${ac_cv_c_tclconfig}" = x ; then
14235 for i in \
14236 ../tcl \
14237 `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
14238 `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
14239 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
14240 ../../tcl \
14241 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
14242 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
14243 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
14244 ../../../tcl \
14245 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
14246 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
14247 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
14248 if test -f "$i/$platDir/tclConfig.sh" ; then
14249 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
14250 break
14251 fi
14252 done
14253 fi
14254
14255 # on Darwin, check in Framework installation locations
14256 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
14257 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
14258 `ls -d /Library/Frameworks 2>/dev/null` \
14259 `ls -d /Network/Library/Frameworks 2>/dev/null` \
14260 `ls -d /System/Library/Frameworks 2>/dev/null` \
14261 ; do
14262 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
14263 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
14264 break
14265 fi
14266 done
14267 fi
14268
14269 # check in a few common install locations
14270 if test x"${ac_cv_c_tclconfig}" = x ; then
14271 for i in `ls -d ${libdir} 2>/dev/null` \
14272 `ls -d ${exec_prefix}/lib 2>/dev/null` \
14273 `ls -d ${prefix}/lib 2>/dev/null` \
14274 `ls -d /usr/local/lib 2>/dev/null` \
14275 `ls -d /usr/contrib/lib 2>/dev/null` \
14276 `ls -d /usr/lib 2>/dev/null` \
14277 ; do
14278 if test -f "$i/tclConfig.sh" ; then
14279 ac_cv_c_tclconfig=`(cd $i; pwd)`
14280 break
14281 fi
14282 done
14283 fi
3fc11d3e 14284
5062cc19
KS
14285 # check in a few other private locations
14286 if test x"${ac_cv_c_tclconfig}" = x ; then
14287 for i in \
14288 ${srcdir}/../tcl \
14289 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
14290 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
14291 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
14292 if test -f "$i/$platDir/tclConfig.sh" ; then
14293 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
14294 break
14295 fi
14296 done
14297 fi
bec39cab 14298
3fc11d3e
JM
14299fi
14300
5062cc19
KS
14301
14302 if test x"${ac_cv_c_tclconfig}" = x ; then
14303 TCL_BIN_DIR="# no Tcl configs found"
81ecdfbb
RW
14304 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
14305$as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
5062cc19
KS
14306 else
14307 no_tcl=
14308 TCL_BIN_DIR=${ac_cv_c_tclconfig}
81ecdfbb
RW
14309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
14310$as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
5062cc19
KS
14311 fi
14312 fi
3fc11d3e 14313
bec39cab 14314
85541719
DE
14315 # If $no_tk is nonempty, then we can't do Tk, and there is no
14316 # point to doing Tcl.
bec39cab 14317
5062cc19
KS
14318 #
14319 # Ok, lets find the tk configuration
14320 # First, look for one uninstalled.
14321 # the alternative search directory is invoked by --with-tk
14322 #
3fc11d3e 14323
5062cc19
KS
14324 if test x"${no_tk}" = x ; then
14325 # we reset no_tk in case something fails here
14326 no_tk=true
bec39cab 14327
81ecdfbb
RW
14328# Check whether --with-tk was given.
14329if test "${with_tk+set}" = set; then :
14330 withval=$with_tk; with_tkconfig=${withval}
14331fi
14332
14333 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
14334$as_echo_n "checking for Tk configuration... " >&6; }
14335 if test "${ac_cv_c_tkconfig+set}" = set; then :
14336 $as_echo_n "(cached) " >&6
bec39cab 14337else
3fc11d3e
JM
14338
14339
5062cc19
KS
14340 # First check to see if --with-tkconfig was specified.
14341 if test x"${with_tkconfig}" != x ; then
14342 if test -f "${with_tkconfig}/tkConfig.sh" ; then
14343 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
14344 else
81ecdfbb 14345 as_fn_error "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
5062cc19
KS
14346 fi
14347 fi
3fc11d3e 14348
5062cc19
KS
14349 # then check for a private Tk library
14350 case "${host}" in
14351 *-*-cygwin*) platDir="win" ;;
14352 *) platDir="unix" ;;
14353 esac
14354 if test x"${ac_cv_c_tkconfig}" = x ; then
14355 for i in \
14356 ../tk \
14357 `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
14358 `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
14359 `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
14360 ../../tk \
14361 `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
14362 `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
14363 `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
14364 ../../../tk \
14365 `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
14366 `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
14367 `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
14368 if test -f "$i/$platDir/tkConfig.sh" ; then
14369 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
14370 break
14371 fi
14372 done
14373 fi
14374
14375 # on Darwin, check in Framework installation locations
14376 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
14377 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
14378 `ls -d /Library/Frameworks 2>/dev/null` \
14379 `ls -d /Network/Library/Frameworks 2>/dev/null` \
14380 `ls -d /System/Library/Frameworks 2>/dev/null` \
14381 ; do
14382 if test -f "$i/Tk.framework/tkConfig.sh" ; then
14383 ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
14384 break
14385 fi
14386 done
14387 fi
14388
14389 # check in a few common install locations
14390 if test x"${ac_cv_c_tkconfig}" = x ; then
14391 for i in `ls -d ${libdir} 2>/dev/null` \
14392 `ls -d ${exec_prefix}/lib 2>/dev/null` \
14393 `ls -d ${prefix}/lib 2>/dev/null` \
14394 `ls -d /usr/local/lib 2>/dev/null` \
14395 `ls -d /usr/contrib/lib 2>/dev/null` \
14396 `ls -d /usr/lib 2>/dev/null` \
14397 ; do
14398 if test -f "$i/tkConfig.sh" ; then
14399 ac_cv_c_tkconfig=`(cd $i; pwd)`
14400 break
14401 fi
14402 done
14403 fi
14404 # check in a few other private locations
14405 if test x"${ac_cv_c_tkconfig}" = x ; then
14406 for i in \
14407 ${srcdir}/../tk \
14408 `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
14409 `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
14410 `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
14411 if test -f "$i/$platDir/tkConfig.sh" ; then
14412 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
14413 break
14414 fi
14415 done
14416 fi
3fc11d3e 14417
3fc11d3e
JM
14418fi
14419
14420
5062cc19
KS
14421 if test x"${ac_cv_c_tkconfig}" = x ; then
14422 TK_BIN_DIR="# no Tk configs found"
81ecdfbb
RW
14423 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
14424$as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
5062cc19
KS
14425 else
14426 no_tk=
14427 TK_BIN_DIR=${ac_cv_c_tkconfig}
81ecdfbb
RW
14428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
14429$as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
5062cc19 14430 fi
3fc11d3e 14431 fi
dd2504ab 14432
dd2504ab 14433
85541719
DE
14434 if test -z "${no_tcl}" -a -z "${no_tk}"; then
14435
81ecdfbb
RW
14436 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
14437$as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
85541719
DE
14438
14439 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
81ecdfbb
RW
14440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
14441$as_echo "loading" >&6; }
85541719
DE
14442 . ${TCL_BIN_DIR}/tclConfig.sh
14443 else
81ecdfbb
RW
14444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
14445$as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
85541719
DE
14446 fi
14447
14448 # eval is required to do the TCL_DBGX substitution
14449 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
14450 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
14451
14452 # If the TCL_BIN_DIR is the build directory (not the install directory),
14453 # then set the common variable name to the value of the build variables.
14454 # For example, the variable TCL_LIB_SPEC will be set to the value
14455 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
14456 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
14457 # installed and uninstalled version of Tcl.
14458 if test -f "${TCL_BIN_DIR}/Makefile" ; then
14459 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
14460 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
14461 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
14462 elif test "`uname -s`" = "Darwin"; then
14463 # If Tcl was built as a framework, attempt to use the libraries
14464 # from the framework at the given location so that linking works
a68ffae9 14465 # against Tcl.framework installed in an arbitrary location.
85541719
DE
14466 case ${TCL_DEFS} in
14467 *TCL_FRAMEWORK*)
14468 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
14469 for i in "`cd ${TCL_BIN_DIR}; pwd`" \
14470 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
14471 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
14472 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
14473 break
14474 fi
14475 done
14476 fi
14477 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
14478 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
14479 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
14480 fi
14481 ;;
14482 esac
14483 fi
14484
14485 # eval is required to do the TCL_DBGX substitution
14486 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
14487 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
14488 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
14489 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
14490
14491
14492
14493
14494
14495
14496
14497
14498
14499
14500
14501
14502
14503
14504
14505 # Check for in-tree tcl
14506 here=`pwd`
14507 cd ${srcdir}/..
14508 topdir=`pwd`
14509 cd ${here}
14510
14511 intree="no"
14512 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
14513 intree="yes"
14514 fi
14515
14516 # Find Tcl private headers
14517 if test x"${intree}" = xno; then
14518
81ecdfbb
RW
14519 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
14520$as_echo_n "checking for Tcl private headers... " >&6; }
85541719
DE
14521 private_dir=""
14522 dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
14523 if test -f ${dir}/tclInt.h ; then
14524 private_dir=${dir}
14525 fi
14526
14527 if test x"${private_dir}" = x; then
81ecdfbb 14528 as_fn_error "could not find private Tcl headers" "$LINENO" 5
85541719
DE
14529 else
14530 TCL_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
14531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
14532$as_echo "${private_dir}" >&6; }
85541719
DE
14533 fi
14534
14535 TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
14536 TCL_LIBRARY="${TCL_LIB_SPEC}"
14537 TCL_DEPS=""
14538 else
14539 # If building tcl in the same src tree, private headers
14540 # are not needed, but we need to be sure to use the right
14541 # headers library
14542 TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
14543 TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
14544 TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
14545 fi
14546
14547
14548
14549
14550
81ecdfbb
RW
14551 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
14552$as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
dd2504ab 14553
5062cc19 14554 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
81ecdfbb
RW
14555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
14556$as_echo "loading" >&6; }
5062cc19 14557 . ${TK_BIN_DIR}/tkConfig.sh
3fc11d3e 14558 else
81ecdfbb
RW
14559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
14560$as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
3fc11d3e 14561 fi
bec39cab 14562
5062cc19
KS
14563 # eval is required to do the TK_DBGX substitution
14564 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
14565 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
14566
14567 # If the TK_BIN_DIR is the build directory (not the install directory),
14568 # then set the common variable name to the value of the build variables.
14569 # For example, the variable TK_LIB_SPEC will be set to the value
14570 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
14571 # instead of TK_BUILD_LIB_SPEC since it will work with both an
14572 # installed and uninstalled version of Tcl.
85541719 14573 if test -f "${TK_BIN_DIR}/Makefile" ; then
5062cc19
KS
14574 TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
14575 TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
14576 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
14577 elif test "`uname -s`" = "Darwin"; then
14578 # If Tk was built as a framework, attempt to use the libraries
14579 # from the framework at the given location so that linking works
a68ffae9 14580 # against Tk.framework installed in an arbitrary location.
5062cc19
KS
14581 case ${TK_DEFS} in
14582 *TK_FRAMEWORK*)
85541719 14583 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
5062cc19
KS
14584 for i in "`cd ${TK_BIN_DIR}; pwd`" \
14585 "`cd ${TK_BIN_DIR}/../..; pwd`"; do
14586 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
14587 TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
14588 break
14589 fi
14590 done
14591 fi
85541719 14592 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
5062cc19
KS
14593 TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
14594 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
14595 fi
14596 ;;
14597 esac
3fc11d3e
JM
14598 fi
14599
5062cc19
KS
14600 # eval is required to do the TK_DBGX substitution
14601 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
14602 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
14603 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
14604 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
3fc11d3e 14605
3fc11d3e
JM
14606
14607
bec39cab
AC
14608
14609
14610
14611
14612
14613
14614
3fc11d3e 14615
3fc11d3e 14616
bec39cab 14617
bec39cab 14618
85541719
DE
14619 # Check for in-tree Tk
14620 intree="no"
14621 if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
14622 intree="yes"
14623 fi
3fc11d3e 14624
85541719
DE
14625 # Find Tk private headers
14626 if test x"${intree}" = xno; then
3fc11d3e 14627
81ecdfbb
RW
14628 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
14629$as_echo_n "checking for Tk private headers... " >&6; }
5062cc19
KS
14630 private_dir=""
14631 dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
14632 if test -f ${dir}/tkInt.h; then
14633 private_dir=${dir}
3fc11d3e 14634 fi
bec39cab 14635
5062cc19 14636 if test x"${private_dir}" = x; then
81ecdfbb 14637 as_fn_error "could not find Tk private headers" "$LINENO" 5
3fc11d3e 14638 else
5062cc19 14639 TK_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
14640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
14641$as_echo "${private_dir}" >&6; }
3fc11d3e 14642 fi
3fc11d3e 14643
85541719
DE
14644 TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
14645 TK_LIBRARY=${TK_LIB_SPEC}
14646 TK_DEPS=""
14647 else
14648 TK_INCLUDE="-I${TK_SRC_DIR}/generic"
14649 TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
14650 TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
14651 fi
3fc11d3e
JM
14652
14653
3fc11d3e
JM
14654
14655
3fc11d3e 14656
85541719 14657 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e 14658
85541719
DE
14659 # Include some libraries that Tcl and Tk want.
14660 TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
14661 # Yes, the ordering seems wrong here. But it isn't.
14662 # TK_LIBS is the list of libraries that need to be linked
14663 # after Tcl/Tk. Note that this isn't put into LIBS. If it
14664 # were in LIBS then any link tests after this point would
14665 # try to include things like `$(LIBGUI)', which wouldn't work.
14666 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5 14667
85541719
DE
14668 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
14669 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
14670 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
14671 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
14672 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
14673 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
14674 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
3fc11d3e 14675
85541719
DE
14676 if test x$gdb_cv_os_cygwin = xyes; then
14677 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
14678 WIN32LDAPP="-Wl,--subsystem,console"
14679 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
3fc11d3e 14680 fi
ffc6a242 14681
81ecdfbb 14682 subdirs="$subdirs gdbtk"
3ace7edb 14683
85541719 14684 fi
3fc11d3e
JM
14685fi
14686
14687
14688
14689
14690
14691
14692
14693
81ecdfbb
RW
14694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
14695$as_echo_n "checking for X... " >&6; }
bec39cab 14696
c906108c 14697
81ecdfbb
RW
14698# Check whether --with-x was given.
14699if test "${with_x+set}" = set; then :
14700 withval=$with_x;
14701fi
c906108c
SS
14702
14703# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
14704if test "x$with_x" = xno; then
14705 # The user explicitly disabled X.
14706 have_x=disabled
14707else
81ecdfbb
RW
14708 case $x_includes,$x_libraries in #(
14709 *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
14710 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
14711 $as_echo_n "(cached) " >&6
c906108c
SS
14712else
14713 # One or both of the vars are not set, and there is no cached value.
bec39cab 14714ac_x_includes=no ac_x_libraries=no
81ecdfbb 14715rm -f -r conftest.dir
bec39cab
AC
14716if mkdir conftest.dir; then
14717 cd conftest.dir
bec39cab 14718 cat >Imakefile <<'_ACEOF'
81ecdfbb
RW
14719incroot:
14720 @echo incroot='${INCROOT}'
14721usrlibdir:
14722 @echo usrlibdir='${USRLIBDIR}'
14723libdir:
14724 @echo libdir='${LIBDIR}'
14725_ACEOF
14726 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
c906108c 14727 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
81ecdfbb
RW
14728 for ac_var in incroot usrlibdir libdir; do
14729 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
14730 done
c906108c 14731 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
81ecdfbb
RW
14732 for ac_extension in a so sl dylib la dll; do
14733 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
14734 test -f "$ac_im_libdir/libX11.$ac_extension"; then
bec39cab 14735 ac_im_usrlibdir=$ac_im_libdir; break
c906108c
SS
14736 fi
14737 done
14738 # Screen out bogus values from the imake configuration. They are
14739 # bogus both because they are the default anyway, and because
14740 # using them would break gcc on systems where it needs fixed includes.
bec39cab 14741 case $ac_im_incroot in
81ecdfbb 14742 /usr/include) ac_x_includes= ;;
bec39cab 14743 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
c906108c 14744 esac
bec39cab 14745 case $ac_im_usrlibdir in
81ecdfbb 14746 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
bec39cab 14747 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
c906108c
SS
14748 esac
14749 fi
14750 cd ..
81ecdfbb 14751 rm -f -r conftest.dir
c906108c
SS
14752fi
14753
bec39cab
AC
14754# Standard set of common directories for X headers.
14755# Check X11 before X11Rn because it is often a symlink to the current release.
14756ac_x_header_dirs='
14757/usr/X11/include
81ecdfbb 14758/usr/X11R7/include
bec39cab
AC
14759/usr/X11R6/include
14760/usr/X11R5/include
14761/usr/X11R4/include
14762
14763/usr/include/X11
81ecdfbb 14764/usr/include/X11R7
bec39cab
AC
14765/usr/include/X11R6
14766/usr/include/X11R5
14767/usr/include/X11R4
14768
14769/usr/local/X11/include
81ecdfbb 14770/usr/local/X11R7/include
bec39cab
AC
14771/usr/local/X11R6/include
14772/usr/local/X11R5/include
14773/usr/local/X11R4/include
14774
14775/usr/local/include/X11
81ecdfbb 14776/usr/local/include/X11R7
bec39cab
AC
14777/usr/local/include/X11R6
14778/usr/local/include/X11R5
14779/usr/local/include/X11R4
14780
14781/usr/X386/include
14782/usr/x386/include
14783/usr/XFree86/include/X11
14784
14785/usr/include
14786/usr/local/include
14787/usr/unsupported/include
14788/usr/athena/include
14789/usr/local/x11r5/include
14790/usr/lpp/Xamples/include
14791
14792/usr/openwin/include
14793/usr/openwin/share/include'
14794
14795if test "$ac_x_includes" = no; then
81ecdfbb 14796 # Guess where to find include files, by looking for Xlib.h.
c906108c 14797 # First, try using that file with no special directory specified.
81ecdfbb 14798 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14799/* end confdefs.h. */
81ecdfbb 14800#include <X11/Xlib.h>
bec39cab 14801_ACEOF
81ecdfbb 14802if ac_fn_c_try_cpp "$LINENO"; then :
c906108c
SS
14803 # We can compile using X headers with no special include directory.
14804ac_x_includes=
14805else
bec39cab 14806 for ac_dir in $ac_x_header_dirs; do
81ecdfbb 14807 if test -r "$ac_dir/X11/Xlib.h"; then
bec39cab
AC
14808 ac_x_includes=$ac_dir
14809 break
14810 fi
14811done
c906108c 14812fi
bec39cab
AC
14813rm -f conftest.err conftest.$ac_ext
14814fi # $ac_x_includes = no
c906108c 14815
bec39cab 14816if test "$ac_x_libraries" = no; then
c906108c 14817 # Check for the libraries.
c906108c
SS
14818 # See if we find them without any special options.
14819 # Don't add to $LIBS permanently.
bec39cab 14820 ac_save_LIBS=$LIBS
81ecdfbb
RW
14821 LIBS="-lX11 $LIBS"
14822 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14823/* end confdefs.h. */
81ecdfbb 14824#include <X11/Xlib.h>
bec39cab
AC
14825int
14826main ()
14827{
81ecdfbb 14828XrmInitialize ()
bec39cab
AC
14829 ;
14830 return 0;
14831}
14832_ACEOF
81ecdfbb 14833if ac_fn_c_try_link "$LINENO"; then :
bec39cab 14834 LIBS=$ac_save_LIBS
c906108c
SS
14835# We can link X programs with no special library path.
14836ac_x_libraries=
14837else
81ecdfbb
RW
14838 LIBS=$ac_save_LIBS
14839for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
c906108c 14840do
bec39cab 14841 # Don't even attempt the hair of trying to link an X program!
81ecdfbb
RW
14842 for ac_extension in a so sl dylib la dll; do
14843 if test -r "$ac_dir/libX11.$ac_extension"; then
c906108c
SS
14844 ac_x_libraries=$ac_dir
14845 break 2
14846 fi
14847 done
14848done
14849fi
81ecdfbb
RW
14850rm -f core conftest.err conftest.$ac_objext \
14851 conftest$ac_exeext conftest.$ac_ext
bec39cab 14852fi # $ac_x_libraries = no
c906108c 14853
81ecdfbb
RW
14854case $ac_x_includes,$ac_x_libraries in #(
14855 no,* | *,no | *\'*)
14856 # Didn't find X, or a directory has "'" in its name.
14857 ac_cv_have_x="have_x=no";; #(
14858 *)
14859 # Record where we found X for the cache.
14860 ac_cv_have_x="have_x=yes\
14861 ac_x_includes='$ac_x_includes'\
14862 ac_x_libraries='$ac_x_libraries'"
14863esac
c906108c 14864fi
81ecdfbb
RW
14865;; #(
14866 *) have_x=yes;;
14867 esac
c906108c
SS
14868 eval "$ac_cv_have_x"
14869fi # $with_x != no
14870
14871if test "$have_x" != yes; then
81ecdfbb
RW
14872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
14873$as_echo "$have_x" >&6; }
c906108c
SS
14874 no_x=yes
14875else
14876 # If each of the values was on the command line, it overrides each guess.
14877 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
14878 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
14879 # Update the cache value to reflect the command line values.
81ecdfbb
RW
14880 ac_cv_have_x="have_x=yes\
14881 ac_x_includes='$x_includes'\
14882 ac_x_libraries='$x_libraries'"
14883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
14884$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
c906108c
SS
14885fi
14886
14887
bec39cab 14888# Unlike the sim directory, whether a simulator is linked is controlled by
9b624dbe 14889# presence of a gdb_sim definition in the target configure.tgt entry.
7a292a7a
SS
14890# This code just checks for a few cases where we'd like to ignore those
14891# definitions, even when they're present in the '.mt' file. These cases
14892# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 14893# not part of the source tree.
7a292a7a 14894#
81ecdfbb
RW
14895# Check whether --enable-sim was given.
14896if test "${enable_sim+set}" = set; then :
14897 enableval=$enable_sim; echo "enable_sim = $enable_sim";
7a292a7a
SS
14898 echo "enableval = ${enableval}";
14899 case "${enableval}" in
14900 yes) ignore_sim=false ;;
14901 no) ignore_sim=true ;;
14902 *) ignore_sim=false ;;
14903 esac
14904else
14905 ignore_sim=false
81ecdfbb
RW
14906fi
14907
7a292a7a
SS
14908
14909if test ! -d "${srcdir}/../sim"; then
14910 ignore_sim=true
14911fi
14912
9b624dbe
UW
14913SIM=
14914SIM_OBS=
14915if test "${ignore_sim}" = "false"; then
14916 if test x"${gdb_sim}" != x ; then
14917 SIM="${gdb_sim}"
14918 SIM_OBS="remote-sim.o"
60ca704f 14919
81ecdfbb 14920$as_echo "#define WITH_SIM 1" >>confdefs.h
7a292a7a 14921
9b624dbe 14922 fi
7a292a7a
SS
14923fi
14924
14925
14926
c906108c
SS
14927
14928
14929
14930
14931
14932
dfcd3bfb 14933
e56ac5c3
AC
14934
14935
b3a90332
AC
14936
14937
c35f4ffc 14938# List of host floatformats.
bec39cab
AC
14939
14940cat >>confdefs.h <<_ACEOF
c35f4ffc 14941#define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
bec39cab 14942_ACEOF
c35f4ffc 14943
bec39cab
AC
14944
14945cat >>confdefs.h <<_ACEOF
c35f4ffc 14946#define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
bec39cab
AC
14947_ACEOF
14948
c35f4ffc 14949
bec39cab 14950cat >>confdefs.h <<_ACEOF
c35f4ffc 14951#define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
bec39cab 14952_ACEOF
c35f4ffc
AC
14953
14954
c906108c
SS
14955# target_subdir is used by the testsuite to find the target libraries.
14956target_subdir=
14957if test "${host}" != "${target}"; then
14958 target_subdir="${target_alias}/"
14959fi
14960
14961
14962frags=
771b4502 14963if test "${gdb_native}" = "yes"; then
0dad8a66
MK
14964 host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
14965 if test ! -f ${host_makefile_frag}; then
81ecdfbb 14966 as_fn_error "\"*** Gdb does not support native target ${host}\"" "$LINENO" 5
0dad8a66
MK
14967 fi
14968 frags="$frags $host_makefile_frag"
14969else
14970 host_makefile_frag=/dev/null
c906108c 14971fi
c906108c 14972
c906108c
SS
14973
14974
14975
771b4502 14976if test "${gdb_native}" = "yes"; then
a85f51e7
DJ
14977# We pick this up from the host configuration file (.mh) because we
14978# do not have a native configuration Makefile fragment.
c906108c
SS
14979nativefile=`sed -n '
14980s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
14981' ${host_makefile_frag}`
c906108c
SS
14982fi
14983
14984
b00a8037 14985if test x"${gdb_osabi}" != x ; then
bec39cab
AC
14986
14987cat >>confdefs.h <<_ACEOF
b00a8037 14988#define GDB_OSABI_DEFAULT $gdb_osabi
bec39cab 14989_ACEOF
b00a8037
DJ
14990
14991fi
14992
8dcde887 14993# Enable multi-ice-gdb-server.
81ecdfbb
RW
14994# Check whether --enable-multi-ice was given.
14995if test "${enable_multi_ice+set}" = set; then :
14996 enableval=$enable_multi_ice; case $enableval in
8dcde887
MK
14997 yes | no)
14998 ;;
81ecdfbb 14999 *) as_fn_error "bad value $enableval for --enable-multi-ice" "$LINENO" 5 ;;
8dcde887 15000 esac
81ecdfbb 15001fi
b4e70030 15002
81ecdfbb
RW
15003if test "x$enable_multi_ice" = xyes; then
15004 subdirs="$subdirs multi-ice"
3ace7edb 15005
a85f51e7
DJ
15006fi
15007
496c0e1b
JB
15008# Check whether --enable-gdbserver was given.
15009if test "${enable_gdbserver+set}" = set; then :
15010 enableval=$enable_gdbserver; case "${enableval}" in
15011 yes| no|auto) ;;
15012 *) as_fn_error "bad value ${enableval} for --enable-gdbserver option" "$LINENO" 5 ;;
15013esac
15014else
15015 enable_gdbserver=auto
15016fi
15017
15018
15019# We only build gdbserver automatically in a native configuration, and
15020# only if the user did not explicitly disable its build.
15021if test "$gdb_native" = "yes" -a "$enable_gdbserver" != "no"; then
81ecdfbb
RW
15022 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5
15023$as_echo_n "checking whether gdbserver is supported on this host... " >&6; }
8dcde887 15024 if test "x$build_gdbserver" = xyes; then
81ecdfbb
RW
15025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15026$as_echo "yes" >&6; }
15027 subdirs="$subdirs gdbserver"
3ace7edb 15028
496c0e1b 15029 gdbserver_build_enabled=yes
8dcde887 15030 else
81ecdfbb
RW
15031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15032$as_echo "no" >&6; }
8dcde887
MK
15033 fi
15034fi
15035
496c0e1b
JB
15036# If the user explicitly request the gdbserver to be built, verify that
15037# we were in fact able to enable it.
15038if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then
15039 as_fn_error "Automatic gdbserver build is not supported for this configuration" "$LINENO" 5
15040fi
15041
393fd4c3
YQ
15042# Check for babeltrace and babeltrace-ctf
15043
15044# Check whether --with-babeltrace was given.
15045if test "${with_babeltrace+set}" = set; then :
15046 withval=$with_babeltrace;
15047else
15048 with_babeltrace=auto
15049fi
15050
15051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltrace" >&5
15052$as_echo_n "checking whether to use babeltrace... " >&6; }
15053{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5
15054$as_echo "$with_babeltrace" >&6; }
15055
15056if test "x$with_babeltrace" = "xno"; then
15057 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&5
15058$as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&2;}
15059else
15060 # Append -Werror to CFLAGS so that configure can catch the warning
15061 # "assignment from incompatible pointer type", which is related to
15062 # the babeltrace change from 1.0.3 to 1.1.0. Babeltrace 1.1.0 works
15063 # in GDB, while babeltrace 1.0.3 is broken.
15064 # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be
15065 # safe to save and restore CFLAGS here.
15066 saved_CFLAGS=$CFLAGS
15067 CFLAGS="$CFLAGS -Werror"
15068
15069
15070
15071
15072
15073
15074
15075
15076 use_additional=yes
15077
15078 acl_save_prefix="$prefix"
15079 prefix="$acl_final_prefix"
15080 acl_save_exec_prefix="$exec_prefix"
15081 exec_prefix="$acl_final_exec_prefix"
15082
15083 eval additional_includedir=\"$includedir\"
15084 eval additional_libdir=\"$libdir\"
15085
15086 exec_prefix="$acl_save_exec_prefix"
15087 prefix="$acl_save_prefix"
15088
15089
15090# Check whether --with-libbabeltrace-prefix was given.
15091if test "${with_libbabeltrace_prefix+set}" = set; then :
15092 withval=$with_libbabeltrace_prefix;
15093 if test "X$withval" = "Xno"; then
15094 use_additional=no
15095 else
15096 if test "X$withval" = "X"; then
15097
15098 acl_save_prefix="$prefix"
15099 prefix="$acl_final_prefix"
15100 acl_save_exec_prefix="$exec_prefix"
15101 exec_prefix="$acl_final_exec_prefix"
15102
15103 eval additional_includedir=\"$includedir\"
15104 eval additional_libdir=\"$libdir\"
15105
15106 exec_prefix="$acl_save_exec_prefix"
15107 prefix="$acl_save_prefix"
15108
15109 else
15110 additional_includedir="$withval/include"
15111 additional_libdir="$withval/lib"
15112 fi
15113 fi
15114
15115fi
15116
15117 LIBBABELTRACE=
15118 LTLIBBABELTRACE=
15119 INCBABELTRACE=
15120 rpathdirs=
15121 ltrpathdirs=
15122 names_already_handled=
15123 names_next_round='babeltrace babeltrace-ctf'
15124 while test -n "$names_next_round"; do
15125 names_this_round="$names_next_round"
15126 names_next_round=
15127 for name in $names_this_round; do
15128 already_handled=
15129 for n in $names_already_handled; do
15130 if test "$n" = "$name"; then
15131 already_handled=yes
15132 break
15133 fi
15134 done
15135 if test -z "$already_handled"; then
15136 names_already_handled="$names_already_handled $name"
15137 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
15138 eval value=\"\$HAVE_LIB$uppername\"
15139 if test -n "$value"; then
15140 if test "$value" = yes; then
15141 eval value=\"\$LIB$uppername\"
15142 test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value"
15143 eval value=\"\$LTLIB$uppername\"
15144 test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value"
15145 else
15146 :
15147 fi
15148 else
15149 found_dir=
15150 found_la=
15151 found_so=
15152 found_a=
15153 if test $use_additional = yes; then
15154 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
15155 found_dir="$additional_libdir"
15156 found_so="$additional_libdir/lib$name.$shlibext"
15157 if test -f "$additional_libdir/lib$name.la"; then
15158 found_la="$additional_libdir/lib$name.la"
15159 fi
15160 else
15161 if test -f "$additional_libdir/lib$name.$libext"; then
15162 found_dir="$additional_libdir"
15163 found_a="$additional_libdir/lib$name.$libext"
15164 if test -f "$additional_libdir/lib$name.la"; then
15165 found_la="$additional_libdir/lib$name.la"
15166 fi
15167 fi
15168 fi
15169 fi
15170 if test "X$found_dir" = "X"; then
15171 for x in $LDFLAGS $LTLIBBABELTRACE; do
15172
15173 acl_save_prefix="$prefix"
15174 prefix="$acl_final_prefix"
15175 acl_save_exec_prefix="$exec_prefix"
15176 exec_prefix="$acl_final_exec_prefix"
15177 eval x=\"$x\"
15178 exec_prefix="$acl_save_exec_prefix"
15179 prefix="$acl_save_prefix"
15180
15181 case "$x" in
15182 -L*)
15183 dir=`echo "X$x" | sed -e 's/^X-L//'`
15184 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
15185 found_dir="$dir"
15186 found_so="$dir/lib$name.$shlibext"
15187 if test -f "$dir/lib$name.la"; then
15188 found_la="$dir/lib$name.la"
15189 fi
15190 else
15191 if test -f "$dir/lib$name.$libext"; then
15192 found_dir="$dir"
15193 found_a="$dir/lib$name.$libext"
15194 if test -f "$dir/lib$name.la"; then
15195 found_la="$dir/lib$name.la"
15196 fi
15197 fi
15198 fi
15199 ;;
15200 esac
15201 if test "X$found_dir" != "X"; then
15202 break
15203 fi
15204 done
15205 fi
15206 if test "X$found_dir" != "X"; then
15207 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name"
15208 if test "X$found_so" != "X"; then
15209 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
15210 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
15211 else
15212 haveit=
15213 for x in $ltrpathdirs; do
15214 if test "X$x" = "X$found_dir"; then
15215 haveit=yes
15216 break
15217 fi
15218 done
15219 if test -z "$haveit"; then
15220 ltrpathdirs="$ltrpathdirs $found_dir"
15221 fi
15222 if test "$hardcode_direct" = yes; then
15223 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
15224 else
15225 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
15226 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
15227 haveit=
15228 for x in $rpathdirs; do
15229 if test "X$x" = "X$found_dir"; then
15230 haveit=yes
15231 break
15232 fi
15233 done
15234 if test -z "$haveit"; then
15235 rpathdirs="$rpathdirs $found_dir"
15236 fi
15237 else
15238 haveit=
15239 for x in $LDFLAGS $LIBBABELTRACE; do
15240
15241 acl_save_prefix="$prefix"
15242 prefix="$acl_final_prefix"
15243 acl_save_exec_prefix="$exec_prefix"
15244 exec_prefix="$acl_final_exec_prefix"
15245 eval x=\"$x\"
15246 exec_prefix="$acl_save_exec_prefix"
15247 prefix="$acl_save_prefix"
15248
15249 if test "X$x" = "X-L$found_dir"; then
15250 haveit=yes
15251 break
15252 fi
15253 done
15254 if test -z "$haveit"; then
15255 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir"
15256 fi
15257 if test "$hardcode_minus_L" != no; then
15258 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
15259 else
15260 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
15261 fi
15262 fi
15263 fi
15264 fi
15265 else
15266 if test "X$found_a" != "X"; then
15267 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a"
15268 else
15269 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name"
15270 fi
15271 fi
15272 additional_includedir=
15273 case "$found_dir" in
15274 */lib | */lib/)
15275 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
15276 additional_includedir="$basedir/include"
15277 ;;
15278 esac
15279 if test "X$additional_includedir" != "X"; then
15280 if test "X$additional_includedir" != "X/usr/include"; then
15281 haveit=
15282 if test "X$additional_includedir" = "X/usr/local/include"; then
15283 if test -n "$GCC"; then
15284 case $host_os in
15285 linux*) haveit=yes;;
15286 esac
15287 fi
15288 fi
15289 if test -z "$haveit"; then
15290 for x in $CPPFLAGS $INCBABELTRACE; do
15291
15292 acl_save_prefix="$prefix"
15293 prefix="$acl_final_prefix"
15294 acl_save_exec_prefix="$exec_prefix"
15295 exec_prefix="$acl_final_exec_prefix"
15296 eval x=\"$x\"
15297 exec_prefix="$acl_save_exec_prefix"
15298 prefix="$acl_save_prefix"
15299
15300 if test "X$x" = "X-I$additional_includedir"; then
15301 haveit=yes
15302 break
15303 fi
15304 done
15305 if test -z "$haveit"; then
15306 if test -d "$additional_includedir"; then
15307 INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir"
15308 fi
15309 fi
15310 fi
15311 fi
15312 fi
15313 if test -n "$found_la"; then
15314 save_libdir="$libdir"
15315 case "$found_la" in
15316 */* | *\\*) . "$found_la" ;;
15317 *) . "./$found_la" ;;
15318 esac
15319 libdir="$save_libdir"
15320 for dep in $dependency_libs; do
15321 case "$dep" in
15322 -L*)
15323 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
15324 if test "X$additional_libdir" != "X/usr/lib"; then
15325 haveit=
15326 if test "X$additional_libdir" = "X/usr/local/lib"; then
15327 if test -n "$GCC"; then
15328 case $host_os in
15329 linux*) haveit=yes;;
15330 esac
15331 fi
15332 fi
15333 if test -z "$haveit"; then
15334 haveit=
15335 for x in $LDFLAGS $LIBBABELTRACE; do
15336
15337 acl_save_prefix="$prefix"
15338 prefix="$acl_final_prefix"
15339 acl_save_exec_prefix="$exec_prefix"
15340 exec_prefix="$acl_final_exec_prefix"
15341 eval x=\"$x\"
15342 exec_prefix="$acl_save_exec_prefix"
15343 prefix="$acl_save_prefix"
15344
15345 if test "X$x" = "X-L$additional_libdir"; then
15346 haveit=yes
15347 break
15348 fi
15349 done
15350 if test -z "$haveit"; then
15351 if test -d "$additional_libdir"; then
15352 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir"
15353 fi
15354 fi
15355 haveit=
15356 for x in $LDFLAGS $LTLIBBABELTRACE; do
15357
15358 acl_save_prefix="$prefix"
15359 prefix="$acl_final_prefix"
15360 acl_save_exec_prefix="$exec_prefix"
15361 exec_prefix="$acl_final_exec_prefix"
15362 eval x=\"$x\"
15363 exec_prefix="$acl_save_exec_prefix"
15364 prefix="$acl_save_prefix"
15365
15366 if test "X$x" = "X-L$additional_libdir"; then
15367 haveit=yes
15368 break
15369 fi
15370 done
15371 if test -z "$haveit"; then
15372 if test -d "$additional_libdir"; then
15373 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir"
15374 fi
15375 fi
15376 fi
15377 fi
15378 ;;
15379 -R*)
15380 dir=`echo "X$dep" | sed -e 's/^X-R//'`
15381 if test "$enable_rpath" != no; then
15382 haveit=
15383 for x in $rpathdirs; do
15384 if test "X$x" = "X$dir"; then
15385 haveit=yes
15386 break
15387 fi
15388 done
15389 if test -z "$haveit"; then
15390 rpathdirs="$rpathdirs $dir"
15391 fi
15392 haveit=
15393 for x in $ltrpathdirs; do
15394 if test "X$x" = "X$dir"; then
15395 haveit=yes
15396 break
15397 fi
15398 done
15399 if test -z "$haveit"; then
15400 ltrpathdirs="$ltrpathdirs $dir"
15401 fi
15402 fi
15403 ;;
15404 -l*)
15405 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
15406 ;;
15407 *.la)
15408 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
15409 ;;
15410 *)
15411 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$dep"
15412 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$dep"
15413 ;;
15414 esac
15415 done
15416 fi
15417 else
15418 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
15419 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name"
15420 fi
15421 fi
15422 fi
15423 done
15424 done
15425 if test "X$rpathdirs" != "X"; then
15426 if test -n "$hardcode_libdir_separator"; then
15427 alldirs=
15428 for found_dir in $rpathdirs; do
15429 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
15430 done
15431 acl_save_libdir="$libdir"
15432 libdir="$alldirs"
15433 eval flag=\"$hardcode_libdir_flag_spec\"
15434 libdir="$acl_save_libdir"
15435 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
15436 else
15437 for found_dir in $rpathdirs; do
15438 acl_save_libdir="$libdir"
15439 libdir="$found_dir"
15440 eval flag=\"$hardcode_libdir_flag_spec\"
15441 libdir="$acl_save_libdir"
15442 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
15443 done
15444 fi
15445 fi
15446 if test "X$ltrpathdirs" != "X"; then
15447 for found_dir in $ltrpathdirs; do
15448 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir"
15449 done
15450 fi
15451
15452
15453 ac_save_CPPFLAGS="$CPPFLAGS"
15454
15455 for element in $INCBABELTRACE; do
15456 haveit=
15457 for x in $CPPFLAGS; do
15458
15459 acl_save_prefix="$prefix"
15460 prefix="$acl_final_prefix"
15461 acl_save_exec_prefix="$exec_prefix"
15462 exec_prefix="$acl_final_exec_prefix"
15463 eval x=\"$x\"
15464 exec_prefix="$acl_save_exec_prefix"
15465 prefix="$acl_save_prefix"
15466
15467 if test "X$x" = "X$element"; then
15468 haveit=yes
15469 break
15470 fi
15471 done
15472 if test -z "$haveit"; then
15473 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
15474 fi
15475 done
15476
15477
15478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5
15479$as_echo_n "checking for libbabeltrace... " >&6; }
15480if test "${ac_cv_libbabeltrace+set}" = set; then :
15481 $as_echo_n "(cached) " >&6
15482else
15483
15484 ac_save_LIBS="$LIBS"
15485 LIBS="$LIBS $LIBBABELTRACE"
15486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15487/* end confdefs.h. */
15488#include <babeltrace/babeltrace.h>
15489 #include <babeltrace/ctf/events.h>
15490 #include <babeltrace/ctf/iterator.h>
15491int
15492main ()
15493{
15494struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL));
15495 struct bt_ctf_event *event = NULL;
15496 const struct bt_definition *scope;
15497
65c749e7 15498 bt_iter_set_pos (bt_ctf_get_iter (NULL), pos);
393fd4c3
YQ
15499 scope = bt_ctf_get_top_level_scope (event,
15500 BT_STREAM_EVENT_HEADER);
15501 bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id"));
15502
15503 ;
15504 return 0;
15505}
15506_ACEOF
15507if ac_fn_c_try_link "$LINENO"; then :
15508 ac_cv_libbabeltrace=yes
15509else
15510 ac_cv_libbabeltrace=no
15511fi
15512rm -f core conftest.err conftest.$ac_objext \
15513 conftest$ac_exeext conftest.$ac_ext
15514 LIBS="$ac_save_LIBS"
15515
15516fi
15517{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5
15518$as_echo "$ac_cv_libbabeltrace" >&6; }
15519 if test "$ac_cv_libbabeltrace" = yes; then
15520 HAVE_LIBBABELTRACE=yes
15521
15522$as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h
15523
15524 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libbabeltrace" >&5
15525$as_echo_n "checking how to link with libbabeltrace... " >&6; }
15526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5
15527$as_echo "$LIBBABELTRACE" >&6; }
15528 else
15529 HAVE_LIBBABELTRACE=no
15530 CPPFLAGS="$ac_save_CPPFLAGS"
15531 LIBBABELTRACE=
15532 LTLIBBABELTRACE=
15533 fi
15534
15535
15536
15537
15538
15539
15540 CFLAGS=$saved_CFLAGS
15541
15542 if test "$HAVE_LIBBABELTRACE" != yes; then
15543 if test "$with_babeltrace" = yes; then
15544 as_fn_error "babeltrace is missing or unusable" "$LINENO" 5
15545 else
15546 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&5
15547$as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&2;}
15548 fi
15549 fi
15550fi
15551
db985757 15552# If nativefile (NAT_FILE) is not set in config/*/*.m[ht] files, we link
2c0fc042 15553# to an empty version.
c906108c
SS
15554
15555files=
15556links=
5a2402b8 15557
c906108c
SS
15558rm -f nm.h
15559if test "${nativefile}" != ""; then
0f475e27
AC
15560 case "${nativefile}" in
15561 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
15562 * ) GDB_NM_FILE="${nativefile}"
15563 esac
5a2402b8
AC
15564 files="${files} ${GDB_NM_FILE}"
15565 links="${links} nm.h"
60ca704f
SE
15566
15567cat >>confdefs.h <<_ACEOF
b78960be 15568#define GDB_NM_FILE "${GDB_NM_FILE}"
bec39cab 15569_ACEOF
5a2402b8 15570
c906108c 15571fi
5a2402b8
AC
15572
15573
bec39cab
AC
15574ac_sources="$files"
15575ac_dests="$links"
15576while test -n "$ac_sources"; do
15577 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
15578 set $ac_sources; ac_source=$1; shift; ac_sources=$*
15579 ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source"
15580done
81ecdfbb 15581ac_config_links="$ac_config_links $ac_config_links_1"
c906108c
SS
15582
15583
c906108c
SS
15584
15585
c906108c 15586
81ecdfbb 15587$as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
bec39cab 15588
bec39cab 15589
b292c783 15590
f6a88844
JM
15591 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
15592 GDB_TRANSFORM_NAME=`echo gdb | sed -e "$gdb_ac_transform"`
15593 if test "x$GDB_TRANSFORM_NAME" = x; then
15594 GDB_TRANSFORM_NAME=gdb
15595 fi
15596
15597
15598
15599 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
15600 GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$gdb_ac_transform"`
15601 if test "x$GCORE_TRANSFORM_NAME" = x; then
15602 GCORE_TRANSFORM_NAME=gcore
15603 fi
15604
b292c783
JK
15605
15606ac_config_files="$ac_config_files gcore"
15607
15608
c971b7fa 15609ac_config_files="$ac_config_files Makefile gdb-gdb.gdb doc/Makefile data-directory/Makefile"
81ecdfbb
RW
15610
15611ac_config_commands="$ac_config_commands default"
89a34d1b 15612
bec39cab
AC
15613cat >confcache <<\_ACEOF
15614# This file is a shell script that caches the results of configure
15615# tests run on this system so they can be shared between configure
15616# scripts and configure runs, see configure's option --config-cache.
15617# It is not useful on other systems. If it contains results you don't
15618# want to keep, you may remove or edit it.
15619#
15620# config.status only pays attention to the cache file if you give it
15621# the --recheck option to rerun configure.
15622#
15623# `ac_cv_env_foo' variables (set or unset) will be overridden when
15624# loading this file, other *unset* `ac_cv_foo' will be assigned the
15625# following values.
15626
15627_ACEOF
15628
15629# The following way of writing the cache mishandles newlines in values,
15630# but we know of no workaround that is simple, portable, and efficient.
81ecdfbb 15631# So, we kill variables containing newlines.
bec39cab
AC
15632# Ultrix sh set writes to stderr and can't be redirected directly,
15633# and sets the high bit in the cache file unless we assign to the vars.
81ecdfbb
RW
15634(
15635 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15636 eval ac_val=\$$ac_var
15637 case $ac_val in #(
15638 *${as_nl}*)
15639 case $ac_var in #(
15640 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15641$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
15642 esac
15643 case $ac_var in #(
15644 _ | IFS | as_nl) ;; #(
15645 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15646 *) { eval $ac_var=; unset $ac_var;} ;;
15647 esac ;;
15648 esac
15649 done
15650
bec39cab 15651 (set) 2>&1 |
81ecdfbb
RW
15652 case $as_nl`(ac_space=' '; set) 2>&1` in #(
15653 *${as_nl}ac_space=\ *)
15654 # `set' does not quote correctly, so add quotes: double-quote
15655 # substitution turns \\\\ into \\, and sed turns \\ into \.
bec39cab
AC
15656 sed -n \
15657 "s/'/'\\\\''/g;
15658 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
81ecdfbb 15659 ;; #(
bec39cab
AC
15660 *)
15661 # `set' quotes correctly as required by POSIX, so do not add quotes.
81ecdfbb 15662 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
bec39cab 15663 ;;
81ecdfbb
RW
15664 esac |
15665 sort
15666) |
bec39cab 15667 sed '
81ecdfbb 15668 /^ac_cv_env_/b end
bec39cab 15669 t clear
81ecdfbb 15670 :clear
bec39cab
AC
15671 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15672 t end
81ecdfbb
RW
15673 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15674 :end' >>confcache
15675if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15676 if test -w "$cache_file"; then
15677 test "x$cache_file" != "x/dev/null" &&
15678 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15679$as_echo "$as_me: updating cache $cache_file" >&6;}
bec39cab
AC
15680 cat confcache >$cache_file
15681 else
81ecdfbb
RW
15682 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15683$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
bec39cab
AC
15684 fi
15685fi
15686rm -f confcache
15687
15688test "x$prefix" = xNONE && prefix=$ac_default_prefix
15689# Let make expand exec_prefix.
15690test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15691
bec39cab
AC
15692DEFS=-DHAVE_CONFIG_H
15693
15694ac_libobjs=
15695ac_ltlibobjs=
15696for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15697 # 1. Remove the extension, and $U if already installed.
81ecdfbb
RW
15698 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
15699 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
15700 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
15701 # will be set to the directory where LIBOBJS objects are built.
15702 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15703 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
bec39cab
AC
15704done
15705LIBOBJS=$ac_libobjs
15706
15707LTLIBOBJS=$ac_ltlibobjs
15708
15709
85981d60 15710if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
81ecdfbb
RW
15711 as_fn_error "conditional \"MAINTAINER_MODE\" was never defined.
15712Usually this means the macro was only invoked conditionally." "$LINENO" 5
85981d60 15713fi
a417dc56 15714if test -z "${GMAKE_TRUE}" && test -z "${GMAKE_FALSE}"; then
81ecdfbb
RW
15715 as_fn_error "conditional \"GMAKE\" was never defined.
15716Usually this means the macro was only invoked conditionally." "$LINENO" 5
a417dc56 15717fi
4df42755
DE
15718if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then
15719 as_fn_error "conditional \"HAVE_PYTHON\" was never defined.
15720Usually this means the macro was only invoked conditionally." "$LINENO" 5
15721fi
15722if test -z "${HAVE_GUILE_TRUE}" && test -z "${HAVE_GUILE_FALSE}"; then
15723 as_fn_error "conditional \"HAVE_GUILE\" was never defined.
15724Usually this means the macro was only invoked conditionally." "$LINENO" 5
15725fi
81ecdfbb
RW
15726
15727
bec39cab 15728: ${CONFIG_STATUS=./config.status}
81ecdfbb 15729ac_write_fail=0
bec39cab
AC
15730ac_clean_files_save=$ac_clean_files
15731ac_clean_files="$ac_clean_files $CONFIG_STATUS"
81ecdfbb
RW
15732{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15733$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15734as_write_fail=0
15735cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
bec39cab
AC
15736#! $SHELL
15737# Generated by $as_me.
15738# Run this file to recreate the current configuration.
15739# Compiler output produced by configure, useful for debugging
15740# configure, is in config.log if it exists.
15741
15742debug=false
15743ac_cs_recheck=false
15744ac_cs_silent=false
bec39cab 15745
81ecdfbb
RW
15746SHELL=\${CONFIG_SHELL-$SHELL}
15747export SHELL
15748_ASEOF
15749cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15750## -------------------- ##
15751## M4sh Initialization. ##
15752## -------------------- ##
15753
15754# Be more Bourne compatible
15755DUALCASE=1; export DUALCASE # for MKS sh
15756if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
15757 emulate sh
15758 NULLCMD=:
81ecdfbb 15759 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
15760 # is contrary to our usage. Disable this feature.
15761 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
15762 setopt NO_GLOB_SUBST
15763else
15764 case `(set -o) 2>/dev/null` in #(
15765 *posix*) :
15766 set -o posix ;; #(
15767 *) :
15768 ;;
15769esac
bec39cab 15770fi
bec39cab 15771
81ecdfbb
RW
15772
15773as_nl='
15774'
15775export as_nl
15776# Printing a long string crashes Solaris 7 /usr/bin/printf.
15777as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15778as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15779as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15780# Prefer a ksh shell builtin over an external printf program on Solaris,
15781# but without wasting forks for bash or zsh.
15782if test -z "$BASH_VERSION$ZSH_VERSION" \
15783 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15784 as_echo='print -r --'
15785 as_echo_n='print -rn --'
15786elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15787 as_echo='printf %s\n'
15788 as_echo_n='printf %s'
15789else
15790 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15791 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15792 as_echo_n='/usr/ucb/echo -n'
15793 else
15794 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15795 as_echo_n_body='eval
15796 arg=$1;
15797 case $arg in #(
15798 *"$as_nl"*)
15799 expr "X$arg" : "X\\(.*\\)$as_nl";
15800 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15801 esac;
15802 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15803 '
15804 export as_echo_n_body
15805 as_echo_n='sh -c $as_echo_n_body as_echo'
15806 fi
15807 export as_echo_body
15808 as_echo='sh -c $as_echo_body as_echo'
15809fi
15810
15811# The user is always right.
15812if test "${PATH_SEPARATOR+set}" != set; then
15813 PATH_SEPARATOR=:
15814 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15815 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15816 PATH_SEPARATOR=';'
15817 }
bec39cab
AC
15818fi
15819
15820
81ecdfbb
RW
15821# IFS
15822# We need space, tab and new line, in precisely that order. Quoting is
15823# there to prevent editors from complaining about space-tab.
15824# (If _AS_PATH_WALK were called with IFS unset, it would disable word
15825# splitting by setting IFS to empty value.)
15826IFS=" "" $as_nl"
15827
15828# Find who we are. Look in the path if we contain no directory separator.
15829case $0 in #((
15830 *[\\/]* ) as_myself=$0 ;;
15831 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15832for as_dir in $PATH
15833do
15834 IFS=$as_save_IFS
15835 test -z "$as_dir" && as_dir=.
15836 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15837 done
15838IFS=$as_save_IFS
15839
15840 ;;
15841esac
15842# We did not find ourselves, most probably we were run as `sh COMMAND'
15843# in which case we are not to be found in the path.
15844if test "x$as_myself" = x; then
15845 as_myself=$0
15846fi
15847if test ! -f "$as_myself"; then
15848 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15849 exit 1
15850fi
15851
15852# Unset variables that we do not need and which cause bugs (e.g. in
15853# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
15854# suppresses any "Segmentation fault" message there. '((' could
15855# trigger a bug in pdksh 5.2.14.
15856for as_var in BASH_ENV ENV MAIL MAILPATH
15857do eval test x\${$as_var+set} = xset \
15858 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
15859done
bec39cab
AC
15860PS1='$ '
15861PS2='> '
15862PS4='+ '
15863
15864# NLS nuisances.
81ecdfbb
RW
15865LC_ALL=C
15866export LC_ALL
15867LANGUAGE=C
15868export LANGUAGE
15869
15870# CDPATH.
15871(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15872
15873
15874# as_fn_error ERROR [LINENO LOG_FD]
15875# ---------------------------------
15876# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15877# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
15878# script with status $?, using 1 if that was 0.
15879as_fn_error ()
15880{
15881 as_status=$?; test $as_status -eq 0 && as_status=1
15882 if test "$3"; then
15883 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15884 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
15885 fi
15886 $as_echo "$as_me: error: $1" >&2
15887 as_fn_exit $as_status
15888} # as_fn_error
15889
15890
15891# as_fn_set_status STATUS
15892# -----------------------
15893# Set $? to STATUS, without forking.
15894as_fn_set_status ()
15895{
15896 return $1
15897} # as_fn_set_status
15898
15899# as_fn_exit STATUS
15900# -----------------
15901# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15902as_fn_exit ()
15903{
15904 set +e
15905 as_fn_set_status $1
15906 exit $1
15907} # as_fn_exit
15908
15909# as_fn_unset VAR
15910# ---------------
15911# Portably unset VAR.
15912as_fn_unset ()
15913{
15914 { eval $1=; unset $1;}
15915}
15916as_unset=as_fn_unset
15917# as_fn_append VAR VALUE
15918# ----------------------
15919# Append the text in VALUE to the end of the definition contained in VAR. Take
15920# advantage of any shell optimizations that allow amortized linear growth over
15921# repeated appends, instead of the typical quadratic growth present in naive
15922# implementations.
15923if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15924 eval 'as_fn_append ()
15925 {
15926 eval $1+=\$2
15927 }'
15928else
15929 as_fn_append ()
15930 {
15931 eval $1=\$$1\$2
15932 }
15933fi # as_fn_append
15934
15935# as_fn_arith ARG...
15936# ------------------
15937# Perform arithmetic evaluation on the ARGs, and store the result in the
15938# global $as_val. Take advantage of shells that can avoid forks. The arguments
15939# must be portable across $(()) and expr.
15940if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15941 eval 'as_fn_arith ()
15942 {
15943 as_val=$(( $* ))
15944 }'
15945else
15946 as_fn_arith ()
15947 {
15948 as_val=`expr "$@" || test $? -eq 1`
15949 }
15950fi # as_fn_arith
bec39cab 15951
81ecdfbb
RW
15952
15953if expr a : '\(a\)' >/dev/null 2>&1 &&
15954 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
15955 as_expr=expr
15956else
15957 as_expr=false
15958fi
15959
81ecdfbb 15960if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
15961 as_basename=basename
15962else
15963 as_basename=false
15964fi
15965
81ecdfbb
RW
15966if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15967 as_dirname=dirname
15968else
15969 as_dirname=false
15970fi
bec39cab 15971
81ecdfbb 15972as_me=`$as_basename -- "$0" ||
bec39cab
AC
15973$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15974 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
15975 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
15976$as_echo X/"$0" |
15977 sed '/^.*\/\([^/][^/]*\)\/*$/{
15978 s//\1/
15979 q
15980 }
15981 /^X\/\(\/\/\)$/{
15982 s//\1/
15983 q
15984 }
15985 /^X\/\(\/\).*/{
15986 s//\1/
15987 q
15988 }
15989 s/.*/./; q'`
b4e70030 15990
b4e70030
JB
15991# Avoid depending upon Character Ranges.
15992as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15993as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15994as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15995as_cr_digits='0123456789'
15996as_cr_alnum=$as_cr_Letters$as_cr_digits
15997
81ecdfbb
RW
15998ECHO_C= ECHO_N= ECHO_T=
15999case `echo -n x` in #(((((
16000-n*)
16001 case `echo 'xy\c'` in
16002 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
16003 xy) ECHO_C='\c';;
16004 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16005 ECHO_T=' ';;
16006 esac;;
16007*)
16008 ECHO_N='-n';;
bec39cab
AC
16009esac
16010
81ecdfbb
RW
16011rm -f conf$$ conf$$.exe conf$$.file
16012if test -d conf$$.dir; then
16013 rm -f conf$$.dir/conf$$.file
bec39cab 16014else
81ecdfbb
RW
16015 rm -f conf$$.dir
16016 mkdir conf$$.dir 2>/dev/null
bec39cab 16017fi
81ecdfbb
RW
16018if (echo >conf$$.file) 2>/dev/null; then
16019 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 16020 as_ln_s='ln -s'
81ecdfbb
RW
16021 # ... but there are two gotchas:
16022 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16023 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
16024 # In both cases, we have to default to `cp -p'.
16025 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
16026 as_ln_s='cp -p'
16027 elif ln conf$$.file conf$$ 2>/dev/null; then
16028 as_ln_s=ln
16029 else
16030 as_ln_s='cp -p'
b4e70030 16031 fi
bec39cab
AC
16032else
16033 as_ln_s='cp -p'
16034fi
81ecdfbb
RW
16035rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16036rmdir conf$$.dir 2>/dev/null
16037
16038
16039# as_fn_mkdir_p
16040# -------------
16041# Create "$as_dir" as a directory, including parents if necessary.
16042as_fn_mkdir_p ()
16043{
16044
16045 case $as_dir in #(
16046 -*) as_dir=./$as_dir;;
16047 esac
16048 test -d "$as_dir" || eval $as_mkdir_p || {
16049 as_dirs=
16050 while :; do
16051 case $as_dir in #(
16052 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
16053 *) as_qdir=$as_dir;;
16054 esac
16055 as_dirs="'$as_qdir' $as_dirs"
16056 as_dir=`$as_dirname -- "$as_dir" ||
16057$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16058 X"$as_dir" : 'X\(//\)[^/]' \| \
16059 X"$as_dir" : 'X\(//\)$' \| \
16060 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
16061$as_echo X"$as_dir" |
16062 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16063 s//\1/
16064 q
16065 }
16066 /^X\(\/\/\)[^/].*/{
16067 s//\1/
16068 q
16069 }
16070 /^X\(\/\/\)$/{
16071 s//\1/
16072 q
16073 }
16074 /^X\(\/\).*/{
16075 s//\1/
16076 q
16077 }
16078 s/.*/./; q'`
16079 test -d "$as_dir" && break
16080 done
16081 test -z "$as_dirs" || eval "mkdir $as_dirs"
16082 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
16083
bec39cab 16084
81ecdfbb 16085} # as_fn_mkdir_p
bec39cab 16086if mkdir -p . 2>/dev/null; then
81ecdfbb 16087 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
16088else
16089 test -d ./-p && rmdir ./-p
16090 as_mkdir_p=false
16091fi
16092
81ecdfbb
RW
16093if test -x / >/dev/null 2>&1; then
16094 as_test_x='test -x'
16095else
16096 if ls -dL / >/dev/null 2>&1; then
16097 as_ls_L_option=L
16098 else
16099 as_ls_L_option=
16100 fi
16101 as_test_x='
16102 eval sh -c '\''
16103 if test -d "$1"; then
16104 test -d "$1/.";
16105 else
16106 case $1 in #(
16107 -*)set "./$1";;
16108 esac;
16109 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
16110 ???[sx]*):;;*)false;;esac;fi
16111 '\'' sh
16112 '
16113fi
16114as_executable_p=$as_test_x
bec39cab
AC
16115
16116# Sed expression to map a string onto a valid CPP name.
16117as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
16118
16119# Sed expression to map a string onto a valid variable name.
16120as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
16121
16122
bec39cab 16123exec 6>&1
81ecdfbb
RW
16124## ----------------------------------- ##
16125## Main body of $CONFIG_STATUS script. ##
16126## ----------------------------------- ##
16127_ASEOF
16128test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
16129
16130cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16131# Save the log message, to keep $0 and so on meaningful, and to
bec39cab 16132# report actual input values of CONFIG_FILES etc. instead of their
81ecdfbb
RW
16133# values after options handling.
16134ac_log="
bec39cab 16135This file was extended by $as_me, which was
81ecdfbb 16136generated by GNU Autoconf 2.64. Invocation command line was
bec39cab
AC
16137
16138 CONFIG_FILES = $CONFIG_FILES
16139 CONFIG_HEADERS = $CONFIG_HEADERS
16140 CONFIG_LINKS = $CONFIG_LINKS
16141 CONFIG_COMMANDS = $CONFIG_COMMANDS
16142 $ $0 $@
16143
81ecdfbb
RW
16144on `(hostname || uname -n) 2>/dev/null | sed 1q`
16145"
16146
bec39cab
AC
16147_ACEOF
16148
81ecdfbb
RW
16149case $ac_config_files in *"
16150"*) set x $ac_config_files; shift; ac_config_files=$*;;
16151esac
234b45d4 16152
81ecdfbb
RW
16153case $ac_config_headers in *"
16154"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
16155esac
b4e70030 16156
b4e70030 16157
81ecdfbb
RW
16158cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16159# Files that config.status was made for.
16160config_files="$ac_config_files"
16161config_headers="$ac_config_headers"
16162config_links="$ac_config_links"
16163config_commands="$ac_config_commands"
234b45d4 16164
81ecdfbb 16165_ACEOF
b4e70030 16166
81ecdfbb 16167cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab 16168ac_cs_usage="\
81ecdfbb
RW
16169\`$as_me' instantiates files and other configuration actions
16170from templates according to the current configuration. Unless the files
16171and actions are specified as TAGs, all are instantiated by default.
234b45d4 16172
81ecdfbb 16173Usage: $0 [OPTION]... [TAG]...
234b45d4 16174
bec39cab 16175 -h, --help print this help, then exit
81ecdfbb
RW
16176 -V, --version print version number and configuration settings, then exit
16177 -q, --quiet, --silent
16178 do not print progress messages
bec39cab
AC
16179 -d, --debug don't remove temporary files
16180 --recheck update $as_me by reconfiguring in the same conditions
81ecdfbb
RW
16181 --file=FILE[:TEMPLATE]
16182 instantiate the configuration file FILE
16183 --header=FILE[:TEMPLATE]
16184 instantiate the configuration header FILE
234b45d4 16185
bec39cab
AC
16186Configuration files:
16187$config_files
234b45d4 16188
bec39cab
AC
16189Configuration headers:
16190$config_headers
234b45d4 16191
bec39cab
AC
16192Configuration links:
16193$config_links
234b45d4 16194
bec39cab
AC
16195Configuration commands:
16196$config_commands
16197
81ecdfbb 16198Report bugs to the package provider."
b4e70030 16199
81ecdfbb
RW
16200_ACEOF
16201cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab
AC
16202ac_cs_version="\\
16203config.status
81ecdfbb
RW
16204configured by $0, generated by GNU Autoconf 2.64,
16205 with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
bec39cab 16206
81ecdfbb 16207Copyright (C) 2009 Free Software Foundation, Inc.
bec39cab
AC
16208This config.status script is free software; the Free Software Foundation
16209gives unlimited permission to copy, distribute and modify it."
81ecdfbb
RW
16210
16211ac_pwd='$ac_pwd'
16212srcdir='$srcdir'
16213INSTALL='$INSTALL'
81ecdfbb
RW
16214AWK='$AWK'
16215test -n "\$AWK" || AWK=awk
bec39cab
AC
16216_ACEOF
16217
81ecdfbb
RW
16218cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16219# The default lists apply if the user does not specify any file.
bec39cab
AC
16220ac_need_defaults=:
16221while test $# != 0
16222do
16223 case $1 in
16224 --*=*)
81ecdfbb
RW
16225 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16226 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
bec39cab 16227 ac_shift=:
c906108c 16228 ;;
81ecdfbb 16229 *)
bec39cab
AC
16230 ac_option=$1
16231 ac_optarg=$2
16232 ac_shift=shift
c906108c 16233 ;;
bec39cab 16234 esac
c906108c 16235
bec39cab
AC
16236 case $ac_option in
16237 # Handling of the options.
bec39cab
AC
16238 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16239 ac_cs_recheck=: ;;
81ecdfbb
RW
16240 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
16241 $as_echo "$ac_cs_version"; exit ;;
16242 --debug | --debu | --deb | --de | --d | -d )
bec39cab
AC
16243 debug=: ;;
16244 --file | --fil | --fi | --f )
16245 $ac_shift
81ecdfbb
RW
16246 case $ac_optarg in
16247 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16248 esac
16249 as_fn_append CONFIG_FILES " '$ac_optarg'"
bec39cab
AC
16250 ac_need_defaults=false;;
16251 --header | --heade | --head | --hea )
16252 $ac_shift
81ecdfbb
RW
16253 case $ac_optarg in
16254 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16255 esac
16256 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
bec39cab 16257 ac_need_defaults=false;;
81ecdfbb
RW
16258 --he | --h)
16259 # Conflict between --help and --header
16260 as_fn_error "ambiguous option: \`$1'
16261Try \`$0 --help' for more information.";;
16262 --help | --hel | -h )
16263 $as_echo "$ac_cs_usage"; exit ;;
bec39cab
AC
16264 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
16265 | -silent | --silent | --silen | --sile | --sil | --si | --s)
16266 ac_cs_silent=: ;;
c906108c 16267
bec39cab 16268 # This is an error.
81ecdfbb
RW
16269 -*) as_fn_error "unrecognized option: \`$1'
16270Try \`$0 --help' for more information." ;;
c906108c 16271
81ecdfbb
RW
16272 *) as_fn_append ac_config_targets " $1"
16273 ac_need_defaults=false ;;
c906108c 16274
bec39cab
AC
16275 esac
16276 shift
16277done
c906108c 16278
bec39cab 16279ac_configure_extra_args=
c906108c 16280
bec39cab
AC
16281if $ac_cs_silent; then
16282 exec 6>/dev/null
16283 ac_configure_extra_args="$ac_configure_extra_args --silent"
16284fi
c906108c 16285
bec39cab 16286_ACEOF
81ecdfbb 16287cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab 16288if \$ac_cs_recheck; then
81ecdfbb
RW
16289 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
16290 shift
16291 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
16292 CONFIG_SHELL='$SHELL'
16293 export CONFIG_SHELL
16294 exec "\$@"
bec39cab
AC
16295fi
16296
16297_ACEOF
81ecdfbb
RW
16298cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16299exec 5>>config.log
16300{
16301 echo
16302 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16303## Running $as_me. ##
16304_ASBOX
16305 $as_echo "$ac_log"
16306} >&5
bec39cab 16307
81ecdfbb
RW
16308_ACEOF
16309cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
c906108c 16310#
81ecdfbb 16311# INIT-COMMANDS
c906108c 16312#
a417dc56 16313ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
b4e70030 16314
bec39cab
AC
16315_ACEOF
16316
81ecdfbb 16317cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
4e8d927d 16318
81ecdfbb 16319# Handling of arguments.
bec39cab 16320for ac_config_target in $ac_config_targets
c906108c 16321do
81ecdfbb
RW
16322 case $ac_config_target in
16323 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
16324 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
f997c383 16325 "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
81ecdfbb 16326 "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;;
b292c783 16327 "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;;
81ecdfbb 16328 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
e2207b9a 16329 "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;;
5ae98d25 16330 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
aa2e2d8d 16331 "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
81ecdfbb
RW
16332 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
16333
16334 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
c906108c
SS
16335 esac
16336done
16337
81ecdfbb 16338
bec39cab
AC
16339# If the user did not use the arguments to specify the items to instantiate,
16340# then the envvar interface is used. Set only those that are not.
16341# We use the long form for the default assignment because of an extremely
16342# bizarre bug on SunOS 4.1.3.
16343if $ac_need_defaults; then
16344 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16345 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16346 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
16347 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
16348fi
16349
b4e70030 16350# Have a temporary directory for convenience. Make it in the build tree
81ecdfbb 16351# simply because there is no reason against having it here, and in addition,
b4e70030 16352# creating and moving files from /tmp can sometimes cause problems.
81ecdfbb
RW
16353# Hook for its removal unless debugging.
16354# Note that there is a small window in which the directory will not be cleaned:
16355# after its creation but before its name has been assigned to `$tmp'.
b4e70030
JB
16356$debug ||
16357{
81ecdfbb
RW
16358 tmp=
16359 trap 'exit_status=$?
16360 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
16361' 0
16362 trap 'as_fn_exit 1' 1 2 13 15
16363}
16364# Create a (secure) tmp directory for tmp files.
16365
16366{
16367 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
16368 test -n "$tmp" && test -d "$tmp"
16369} ||
16370{
16371 tmp=./conf$$-$RANDOM
16372 (umask 077 && mkdir "$tmp")
16373} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
16374
16375# Set up the scripts for CONFIG_FILES section.
16376# No need to generate them if there are no CONFIG_FILES.
16377# This happens for instance with `./config.status config.h'.
16378if test -n "$CONFIG_FILES"; then
16379
16380if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
16381 ac_cs_awk_getline=:
16382 ac_cs_awk_pipe_init=
16383 ac_cs_awk_read_file='
16384 while ((getline aline < (F[key])) > 0)
16385 print(aline)
16386 close(F[key])'
16387 ac_cs_awk_pipe_fini=
16388else
16389 ac_cs_awk_getline=false
16390 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
16391 ac_cs_awk_read_file='
16392 print "|#_!!_#|"
16393 print "cat " F[key] " &&"
16394 '$ac_cs_awk_pipe_init
16395 # The final `:' finishes the AND list.
16396 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
16397fi
16398ac_cr=`echo X | tr X '\015'`
16399# On cygwin, bash can eat \r inside `` if the user requested igncr.
16400# But we know of no other shell where ac_cr would be empty at this
16401# point, so we can use a bashism as a fallback.
16402if test "x$ac_cr" = x; then
16403 eval ac_cr=\$\'\\r\'
16404fi
16405ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
16406if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
16407 ac_cs_awk_cr='\r'
16408else
16409 ac_cs_awk_cr=$ac_cr
16410fi
16411
16412echo 'BEGIN {' >"$tmp/subs1.awk" &&
16413_ACEOF
16414
16415# Create commands to substitute file output variables.
16416{
16417 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
16418 echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' &&
16419 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
16420 echo "_ACAWK" &&
16421 echo "_ACEOF"
16422} >conf$$files.sh &&
16423. ./conf$$files.sh ||
16424 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
16425rm -f conf$$files.sh
16426
16427{
16428 echo "cat >conf$$subs.awk <<_ACEOF" &&
16429 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
16430 echo "_ACEOF"
16431} >conf$$subs.sh ||
16432 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
16433ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
16434ac_delim='%!_!# '
16435for ac_last_try in false false false false false :; do
16436 . ./conf$$subs.sh ||
16437 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
16438
16439 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
16440 if test $ac_delim_n = $ac_delim_num; then
16441 break
16442 elif $ac_last_try; then
16443 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
16444 else
16445 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16446 fi
16447done
16448rm -f conf$$subs.sh
16449
16450cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16451cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
16452_ACEOF
16453sed -n '
16454h
16455s/^/S["/; s/!.*/"]=/
16456p
16457g
16458s/^[^!]*!//
16459:repl
16460t repl
16461s/'"$ac_delim"'$//
16462t delim
16463:nl
16464h
16465s/\(.\{148\}\).*/\1/
16466t more1
16467s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
16468p
16469n
16470b repl
16471:more1
16472s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16473p
16474g
16475s/.\{148\}//
16476t nl
16477:delim
16478h
16479s/\(.\{148\}\).*/\1/
16480t more2
16481s/["\\]/\\&/g; s/^/"/; s/$/"/
16482p
16483b
16484:more2
16485s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16486p
16487g
16488s/.\{148\}//
16489t delim
16490' <conf$$subs.awk | sed '
16491/^[^""]/{
16492 N
16493 s/\n//
16494}
16495' >>$CONFIG_STATUS || ac_write_fail=1
16496rm -f conf$$subs.awk
16497cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16498_ACAWK
16499cat >>"\$tmp/subs1.awk" <<_ACAWK &&
16500 for (key in S) S_is_set[key] = 1
16501 FS = "\a"
16502 \$ac_cs_awk_pipe_init
16503}
16504{
16505 line = $ 0
16506 nfields = split(line, field, "@")
16507 substed = 0
16508 len = length(field[1])
16509 for (i = 2; i < nfields; i++) {
16510 key = field[i]
16511 keylen = length(key)
16512 if (S_is_set[key]) {
16513 value = S[key]
16514 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
16515 len += length(value) + length(field[++i])
16516 substed = 1
16517 } else
16518 len += 1 + keylen
16519 }
16520 if (nfields == 3 && !substed) {
16521 key = field[2]
16522 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
16523 \$ac_cs_awk_read_file
16524 next
16525 }
16526 }
16527 print line
b4e70030 16528}
81ecdfbb
RW
16529\$ac_cs_awk_pipe_fini
16530_ACAWK
16531_ACEOF
16532cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16533if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
16534 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
16535else
16536 cat
16537fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
16538 || as_fn_error "could not setup config files machinery" "$LINENO" 5
16539_ACEOF
16540
16541# VPATH may cause trouble with some makes, so we remove $(srcdir),
16542# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
16543# trailing colons and then remove the whole line if VPATH becomes empty
16544# (actually we leave an empty line to preserve line numbers).
16545if test "x$srcdir" = x.; then
16546 ac_vpsub='/^[ ]*VPATH[ ]*=/{
16547s/:*\$(srcdir):*/:/
16548s/:*\${srcdir}:*/:/
16549s/:*@srcdir@:*/:/
16550s/^\([^=]*=[ ]*\):*/\1/
16551s/:*$//
16552s/^[^=]*=[ ]*$//
16553}'
16554fi
16555
16556cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16557fi # test -n "$CONFIG_FILES"
16558
16559# Set up the scripts for CONFIG_HEADERS section.
16560# No need to generate them if there are no CONFIG_HEADERS.
16561# This happens for instance with `./config.status Makefile'.
16562if test -n "$CONFIG_HEADERS"; then
16563cat >"$tmp/defines.awk" <<\_ACAWK ||
16564BEGIN {
16565_ACEOF
16566
16567# Transform confdefs.h into an awk script `defines.awk', embedded as
16568# here-document in config.status, that substitutes the proper values into
16569# config.h.in to produce config.h.
4e8d927d 16570
81ecdfbb
RW
16571# Create a delimiter string that does not exist in confdefs.h, to ease
16572# handling of long lines.
16573ac_delim='%!_!# '
16574for ac_last_try in false false :; do
16575 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
16576 if test -z "$ac_t"; then
16577 break
16578 elif $ac_last_try; then
16579 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
16580 else
16581 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16582 fi
16583done
4e8d927d 16584
81ecdfbb
RW
16585# For the awk script, D is an array of macro values keyed by name,
16586# likewise P contains macro parameters if any. Preserve backslash
16587# newline sequences.
16588
16589ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16590sed -n '
16591s/.\{148\}/&'"$ac_delim"'/g
16592t rset
16593:rset
16594s/^[ ]*#[ ]*define[ ][ ]*/ /
16595t def
16596d
16597:def
16598s/\\$//
16599t bsnl
16600s/["\\]/\\&/g
16601s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16602D["\1"]=" \3"/p
16603s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
16604d
16605:bsnl
16606s/["\\]/\\&/g
16607s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16608D["\1"]=" \3\\\\\\n"\\/p
16609t cont
16610s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16611t cont
16612d
16613:cont
16614n
16615s/.\{148\}/&'"$ac_delim"'/g
16616t clear
16617:clear
16618s/\\$//
16619t bsnlc
16620s/["\\]/\\&/g; s/^/"/; s/$/"/p
16621d
16622:bsnlc
16623s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16624b cont
16625' <confdefs.h | sed '
16626s/'"$ac_delim"'/"\\\
16627"/g' >>$CONFIG_STATUS || ac_write_fail=1
16628
16629cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16630 for (key in D) D_is_set[key] = 1
16631 FS = "\a"
16632}
16633/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
16634 line = \$ 0
16635 split(line, arg, " ")
16636 if (arg[1] == "#") {
16637 defundef = arg[2]
16638 mac1 = arg[3]
16639 } else {
16640 defundef = substr(arg[1], 2)
16641 mac1 = arg[2]
16642 }
16643 split(mac1, mac2, "(") #)
16644 macro = mac2[1]
16645 prefix = substr(line, 1, index(line, defundef) - 1)
16646 if (D_is_set[macro]) {
16647 # Preserve the white space surrounding the "#".
16648 print prefix "define", macro P[macro] D[macro]
16649 next
16650 } else {
16651 # Replace #undef with comments. This is necessary, for example,
16652 # in the case of _POSIX_SOURCE, which is predefined and required
16653 # on some systems where configure will not decide to define it.
16654 if (defundef == "undef") {
16655 print "/*", prefix defundef, macro, "*/"
16656 next
16657 }
16658 }
b4e70030 16659}
81ecdfbb
RW
16660{ print }
16661_ACAWK
b4e70030 16662_ACEOF
81ecdfbb
RW
16663cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16664 as_fn_error "could not setup config headers machinery" "$LINENO" 5
16665fi # test -n "$CONFIG_HEADERS"
4e8d927d 16666
4e8d927d 16667
81ecdfbb
RW
16668eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
16669shift
16670for ac_tag
16671do
16672 case $ac_tag in
16673 :[FHLC]) ac_mode=$ac_tag; continue;;
16674 esac
16675 case $ac_mode$ac_tag in
16676 :[FHL]*:*);;
16677 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
16678 :[FH]-) ac_tag=-:-;;
16679 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16680 esac
16681 ac_save_IFS=$IFS
16682 IFS=:
16683 set x $ac_tag
16684 IFS=$ac_save_IFS
16685 shift
16686 ac_file=$1
16687 shift
4e8d927d 16688
81ecdfbb
RW
16689 case $ac_mode in
16690 :L) ac_source=$1;;
16691 :[FH])
16692 ac_file_inputs=
16693 for ac_f
16694 do
16695 case $ac_f in
16696 -) ac_f="$tmp/stdin";;
16697 *) # Look for the file first in the build tree, then in the source tree
16698 # (if the path is not absolute). The absolute path cannot be DOS-style,
16699 # because $ac_f cannot contain `:'.
16700 test -f "$ac_f" ||
16701 case $ac_f in
16702 [\\/$]*) false;;
16703 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16704 esac ||
16705 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
16706 esac
16707 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16708 as_fn_append ac_file_inputs " '$ac_f'"
16709 done
16710
16711 # Let's still pretend it is `configure' which instantiates (i.e., don't
16712 # use $as_me), people would be surprised to read:
16713 # /* config.h. Generated by config.status. */
16714 configure_input='Generated from '`
16715 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16716 `' by configure.'
16717 if test x"$ac_file" != x-; then
16718 configure_input="$ac_file. $configure_input"
16719 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16720$as_echo "$as_me: creating $ac_file" >&6;}
b4e70030 16721 fi
81ecdfbb
RW
16722 # Neutralize special characters interpreted by sed in replacement strings.
16723 case $configure_input in #(
16724 *\&* | *\|* | *\\* )
16725 ac_sed_conf_input=`$as_echo "$configure_input" |
16726 sed 's/[\\\\&|]/\\\\&/g'`;; #(
16727 *) ac_sed_conf_input=$configure_input;;
16728 esac
4e8d927d 16729
81ecdfbb
RW
16730 case $ac_tag in
16731 *:-:* | *:-) cat >"$tmp/stdin" \
16732 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
16733 esac
16734 ;;
c906108c
SS
16735 esac
16736
81ecdfbb 16737 ac_dir=`$as_dirname -- "$ac_file" ||
bec39cab
AC
16738$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16739 X"$ac_file" : 'X\(//\)[^/]' \| \
16740 X"$ac_file" : 'X\(//\)$' \| \
81ecdfbb
RW
16741 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
16742$as_echo X"$ac_file" |
16743 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16744 s//\1/
16745 q
16746 }
16747 /^X\(\/\/\)[^/].*/{
16748 s//\1/
16749 q
16750 }
16751 /^X\(\/\/\)$/{
16752 s//\1/
16753 q
16754 }
16755 /^X\(\/\).*/{
16756 s//\1/
16757 q
16758 }
16759 s/.*/./; q'`
16760 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
16761 ac_builddir=.
16762
81ecdfbb
RW
16763case "$ac_dir" in
16764.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16765*)
16766 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
16767 # A ".." for each directory in $ac_dir_suffix.
16768 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
16769 case $ac_top_builddir_sub in
16770 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16771 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16772 esac ;;
16773esac
16774ac_abs_top_builddir=$ac_pwd
16775ac_abs_builddir=$ac_pwd$ac_dir_suffix
16776# for backward compatibility:
16777ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
16778
16779case $srcdir in
81ecdfbb 16780 .) # We are building in place.
bec39cab 16781 ac_srcdir=.
81ecdfbb
RW
16782 ac_top_srcdir=$ac_top_builddir_sub
16783 ac_abs_top_srcdir=$ac_pwd ;;
16784 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 16785 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
16786 ac_top_srcdir=$srcdir
16787 ac_abs_top_srcdir=$srcdir ;;
16788 *) # Relative name.
16789 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16790 ac_top_srcdir=$ac_top_build_prefix$srcdir
16791 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 16792esac
81ecdfbb 16793ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 16794
c906108c 16795
81ecdfbb
RW
16796 case $ac_mode in
16797 :F)
16798 #
16799 # CONFIG_FILE
16800 #
c906108c 16801
bec39cab
AC
16802 case $INSTALL in
16803 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
81ecdfbb 16804 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
c906108c 16805 esac
81ecdfbb 16806_ACEOF
121ce6e5 16807
81ecdfbb
RW
16808cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16809# If the template does not know about datarootdir, expand it.
16810# FIXME: This hack should be removed a few years after 2.60.
16811ac_datarootdir_hack=; ac_datarootdir_seen=
16812ac_sed_dataroot='
16813/datarootdir/ {
16814 p
16815 q
16816}
16817/@datadir@/p
16818/@docdir@/p
16819/@infodir@/p
16820/@localedir@/p
16821/@mandir@/p'
16822case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
16823*datarootdir*) ac_datarootdir_seen=yes;;
16824*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
16825 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16826$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
16827_ACEOF
16828cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16829 ac_datarootdir_hack='
16830 s&@datadir@&$datadir&g
16831 s&@docdir@&$docdir&g
16832 s&@infodir@&$infodir&g
16833 s&@localedir@&$localedir&g
16834 s&@mandir@&$mandir&g
16835 s&\\\${datarootdir}&$datarootdir&g' ;;
16836esac
4e8d927d 16837_ACEOF
81ecdfbb
RW
16838
16839# Neutralize VPATH when `$srcdir' = `.'.
16840# Shell code in configure.ac might set extrasub.
16841# FIXME: do we really want to maintain this feature?
16842cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16843ac_sed_extra="$ac_vpsub
bec39cab
AC
16844$extrasub
16845_ACEOF
81ecdfbb 16846cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab
AC
16847:t
16848/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
81ecdfbb
RW
16849s|@configure_input@|$ac_sed_conf_input|;t t
16850s&@top_builddir@&$ac_top_builddir_sub&;t t
16851s&@top_build_prefix@&$ac_top_build_prefix&;t t
16852s&@srcdir@&$ac_srcdir&;t t
16853s&@abs_srcdir@&$ac_abs_srcdir&;t t
16854s&@top_srcdir@&$ac_top_srcdir&;t t
16855s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16856s&@builddir@&$ac_builddir&;t t
16857s&@abs_builddir@&$ac_abs_builddir&;t t
16858s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16859s&@INSTALL@&$ac_INSTALL&;t t
81ecdfbb
RW
16860$ac_datarootdir_hack
16861"
16862eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
16863if $ac_cs_awk_getline; then
16864 $AWK -f "$tmp/subs.awk"
16865else
16866 $AWK -f "$tmp/subs.awk" | $SHELL
16867fi >$tmp/out \
16868 || as_fn_error "could not create $ac_file" "$LINENO" 5
16869
16870test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
16871 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
16872 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
16873 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
16874which seems to be undefined. Please make sure it is defined." >&5
16875$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
16876which seems to be undefined. Please make sure it is defined." >&2;}
16877
16878 rm -f "$tmp/stdin"
bec39cab 16879 case $ac_file in
81ecdfbb
RW
16880 -) cat "$tmp/out" && rm -f "$tmp/out";;
16881 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
16882 esac \
16883 || as_fn_error "could not create $ac_file" "$LINENO" 5
16884 ;;
16885 :H)
16886 #
16887 # CONFIG_HEADER
16888 #
bec39cab 16889 if test x"$ac_file" != x-; then
81ecdfbb
RW
16890 {
16891 $as_echo "/* $configure_input */" \
16892 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
16893 } >"$tmp/config.h" \
16894 || as_fn_error "could not create $ac_file" "$LINENO" 5
16895 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
16896 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16897$as_echo "$as_me: $ac_file is unchanged" >&6;}
bec39cab 16898 else
81ecdfbb
RW
16899 rm -f "$ac_file"
16900 mv "$tmp/config.h" "$ac_file" \
16901 || as_fn_error "could not create $ac_file" "$LINENO" 5
bec39cab
AC
16902 fi
16903 else
81ecdfbb
RW
16904 $as_echo "/* $configure_input */" \
16905 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
16906 || as_fn_error "could not create -" "$LINENO" 5
bec39cab 16907 fi
81ecdfbb
RW
16908 ;;
16909 :L)
16910 #
16911 # CONFIG_LINK
16912 #
c906108c 16913
81ecdfbb
RW
16914 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
16915 :
b4e70030 16916 else
81ecdfbb
RW
16917 # Prefer the file from the source tree if names are identical.
16918 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
16919 ac_source=$srcdir/$ac_source
16920 fi
b4e70030 16921
81ecdfbb
RW
16922 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
16923$as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
b4e70030 16924
81ecdfbb
RW
16925 if test ! -r "$ac_source"; then
16926 as_fn_error "$ac_source: file not found" "$LINENO" 5
16927 fi
16928 rm -f "$ac_file"
bec39cab 16929
81ecdfbb
RW
16930 # Try a relative symlink, then a hard link, then a copy.
16931 case $srcdir in
16932 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
16933 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
16934 esac
16935 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
16936 ln "$ac_source" "$ac_file" 2>/dev/null ||
16937 cp -p "$ac_source" "$ac_file" ||
16938 as_fn_error "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
16939 fi
16940 ;;
16941 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
16942$as_echo "$as_me: executing $ac_file commands" >&6;}
16943 ;;
c906108c 16944 esac
b4e70030 16945
bec39cab 16946
81ecdfbb
RW
16947 case $ac_file$ac_mode in
16948 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
b292c783 16949 "gcore":F) chmod +x gcore ;;
81ecdfbb 16950 "default":C)
c906108c
SS
16951case x$CONFIG_HEADERS in
16952xconfig.h:config.in)
16953echo > stamp-h ;;
16954esac
bec39cab 16955 ;;
81ecdfbb 16956
bec39cab 16957 esac
81ecdfbb 16958done # for ac_tag
c906108c 16959
bec39cab 16960
81ecdfbb 16961as_fn_exit 0
bec39cab 16962_ACEOF
bec39cab
AC
16963ac_clean_files=$ac_clean_files_save
16964
81ecdfbb
RW
16965test $ac_write_fail = 0 ||
16966 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
16967
bec39cab
AC
16968
16969# configure is writing to config.log, and then calls config.status.
16970# config.status does its own redirection, appending to config.log.
16971# Unfortunately, on DOS this fails, as config.log is still kept open
16972# by configure, so config.status won't be able to write to it; its
16973# output is simply discarded. So we exec the FD to /dev/null,
16974# effectively closing config.log, so it can be properly (re)opened and
16975# appended to by config.status. When coming back to configure, we
16976# need to make the FD available again.
16977if test "$no_create" != yes; then
16978 ac_cs_success=:
16979 ac_config_status_args=
16980 test "$silent" = yes &&
16981 ac_config_status_args="$ac_config_status_args --quiet"
16982 exec 5>/dev/null
16983 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
16984 exec 5>>config.log
16985 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16986 # would make configure fail if this is the last instruction.
81ecdfbb 16987 $ac_cs_success || as_fn_exit $?
bec39cab 16988fi
c906108c 16989
bec39cab 16990#
81ecdfbb 16991# CONFIG_SUBDIRS section.
bec39cab 16992#
c906108c
SS
16993if test "$no_recursion" != yes; then
16994
81ecdfbb
RW
16995 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
16996 # so they do not pile up.
c906108c
SS
16997 ac_sub_configure_args=
16998 ac_prev=
fdc59709
PB
16999 eval "set x $ac_configure_args"
17000 shift
17001 for ac_arg
17002 do
c906108c
SS
17003 if test -n "$ac_prev"; then
17004 ac_prev=
17005 continue
17006 fi
bec39cab 17007 case $ac_arg in
c906108c
SS
17008 -cache-file | --cache-file | --cache-fil | --cache-fi \
17009 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
17010 ac_prev=cache_file ;;
17011 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
bec39cab
AC
17012 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
17013 | --c=*)
17014 ;;
17015 --config-cache | -C)
c906108c
SS
17016 ;;
17017 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
17018 ac_prev=srcdir ;;
17019 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
17020 ;;
bec39cab
AC
17021 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
17022 ac_prev=prefix ;;
17023 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
17024 ;;
81ecdfbb
RW
17025 --disable-option-checking)
17026 ;;
fdc59709
PB
17027 *)
17028 case $ac_arg in
81ecdfbb 17029 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 17030 esac
81ecdfbb 17031 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
c906108c
SS
17032 esac
17033 done
17034
bec39cab
AC
17035 # Always prepend --prefix to ensure using the same prefix
17036 # in subdir configurations.
fdc59709
PB
17037 ac_arg="--prefix=$prefix"
17038 case $ac_arg in
81ecdfbb 17039 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 17040 esac
81ecdfbb
RW
17041 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
17042
17043 # Pass --silent
17044 if test "$silent" = yes; then
17045 ac_sub_configure_args="--silent $ac_sub_configure_args"
17046 fi
17047
17048 # Always prepend --disable-option-checking to silence warnings, since
17049 # different subdirs can have different --enable and --with options.
17050 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
bec39cab 17051
b4e70030 17052 ac_popdir=`pwd`
bec39cab 17053 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
c906108c
SS
17054
17055 # Do not complain, so a configure script can configure whichever
17056 # parts of a large source tree are present.
fdc59709 17057 test -d "$srcdir/$ac_dir" || continue
c906108c 17058
81ecdfbb
RW
17059 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
17060 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
17061 $as_echo "$ac_msg" >&6
17062 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
17063 ac_builddir=.
17064
81ecdfbb
RW
17065case "$ac_dir" in
17066.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17067*)
17068 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
17069 # A ".." for each directory in $ac_dir_suffix.
17070 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
17071 case $ac_top_builddir_sub in
17072 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17073 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17074 esac ;;
17075esac
17076ac_abs_top_builddir=$ac_pwd
17077ac_abs_builddir=$ac_pwd$ac_dir_suffix
17078# for backward compatibility:
17079ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
17080
17081case $srcdir in
81ecdfbb 17082 .) # We are building in place.
bec39cab 17083 ac_srcdir=.
81ecdfbb
RW
17084 ac_top_srcdir=$ac_top_builddir_sub
17085 ac_abs_top_srcdir=$ac_pwd ;;
17086 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 17087 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
17088 ac_top_srcdir=$srcdir
17089 ac_abs_top_srcdir=$srcdir ;;
17090 *) # Relative name.
17091 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17092 ac_top_srcdir=$ac_top_build_prefix$srcdir
17093 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 17094esac
81ecdfbb 17095ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
c906108c 17096
c906108c 17097
fdc59709 17098 cd "$ac_dir"
c906108c
SS
17099
17100 # Check for guested configure; otherwise get Cygnus style configure.
fdc59709
PB
17101 if test -f "$ac_srcdir/configure.gnu"; then
17102 ac_sub_configure=$ac_srcdir/configure.gnu
17103 elif test -f "$ac_srcdir/configure"; then
17104 ac_sub_configure=$ac_srcdir/configure
17105 elif test -f "$ac_srcdir/configure.in"; then
17106 # This should be Cygnus configure.
17107 ac_sub_configure=$ac_aux_dir/configure
c906108c 17108 else
81ecdfbb
RW
17109 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
17110$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
c906108c
SS
17111 ac_sub_configure=
17112 fi
17113
17114 # The recursion is here.
17115 if test -n "$ac_sub_configure"; then
c906108c 17116 # Make the cache file name correct relative to the subdirectory.
bec39cab
AC
17117 case $cache_file in
17118 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
81ecdfbb
RW
17119 *) # Relative name.
17120 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
c906108c 17121 esac
c906108c 17122
81ecdfbb
RW
17123 { $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
17124$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
c906108c 17125 # The eval makes quoting arguments work.
fdc59709
PB
17126 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
17127 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
81ecdfbb 17128 as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
c906108c
SS
17129 fi
17130
fdc59709 17131 cd "$ac_popdir"
c906108c
SS
17132 done
17133fi
81ecdfbb
RW
17134if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17135 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17136$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
17137fi
c906108c
SS
17138
17139
17140exit 0
This page took 2.503127 seconds and 4 git commands to generate.